@rft-rc/recycle-ui 0.0.2-rc.9 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ct={key:0,class:"rc-icon__unicode"},st=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const c=t,f=e.inject(ze,{}),n=e.computed(()=>(f==null?void 0:f.iconClass)||"iconfont"),p=e.computed(()=>c.name||""),g=e.computed(()=>typeof c.size=="number"?`${c.size}px`:c.size||"16px"),h=e.computed(()=>({fontSize:g.value,color:c.color||void 0,lineHeight:1,fontFamily:(f==null?void 0:f.iconClass)||"iconfont"})),v=e.computed(()=>{const s=c.code;if(s==null||s===""||s===0)return"";if(typeof s=="number")return String.fromCharCode(s);const m=String(s).replace(/^0x/i,""),$=parseInt(m,16);return Number.isNaN($)?"":String.fromCharCode($)});return e.onMounted(()=>{if(typeof window>"u")return;const s=f&&f.iconCssUrl||qe.iconCssUrl;if(!s)return;const m=`link[rel="stylesheet"][data-rcui-icon="true"][href="${s}"]`;if(!document.head.querySelector(m)){const C=document.createElement("link");C.rel="stylesheet",C.href=s,C.setAttribute("data-rcui-icon","true"),document.head.appendChild(C)}}),(s,m)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[n.value,p.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[v.value?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(v.value),1)):e.createCommentVNode("",!0)],6))}}),O=(t,c)=>{const f=t.__vccOpts||t;for(const[n,p]of c)f[n]=p;return f},W=O(st,[["__scopeId","data-v-3857a892"]]),it=["disabled"],ut={key:0,class:"rc-button__spinner"},dt={key:0,class:"rc-button__icon rc-button__icon--prefix"},ft={key:2,class:"rc-button__icon rc-button__icon--suffix"},mt=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},mode:{default:void 0},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},preIcon:{default:""},suffixIcon:{default:""}},emits:["click"],setup(t,{emit:c}){const f=t,n=c,p=h=>{!f.disabled&&!f.loading&&n("click",h)},g=e.computed(()=>{const h=f.round;return typeof h=="boolean"?h?"999px":"6px":typeof h=="number"?`${h}px`:String(h)});return(h,v)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,t.mode?`rc-button--${t.mode}`:"",{"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:g.value}),disabled:t.disabled||t.loading,onClick:p},[t.loading?(e.openBlock(),e.createElementBlock("span",ut)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.preIcon||h.$slots.preIcon?(e.openBlock(),e.createElementBlock("span",dt,[e.renderSlot(h.$slots,"preIcon",{},()=>[t.preIcon?(e.openBlock(),e.createBlock(W,{key:0,name:t.preIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],64)),e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0),!t.loading&&(t.suffixIcon||h.$slots.suffixIcon)?(e.openBlock(),e.createElementBlock("span",ft,[e.renderSlot(h.$slots,"suffixIcon",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(W,{key:0,name:t.suffixIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],14,it))}}),ae=O(mt,[["__scopeId","data-v-4c6a5e4f"]]);ae.name="rc-button";function Le(t){return t.component(ae.name,ae),t}const vt={class:"rc-desc-item__value"},pt=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const c=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const f=e.inject("rcDescGapPx",0),n=e.inject("rcDescColCount",1),p=e.inject("rcDescLabelWidth",""),g=e.computed(()=>{const s=typeof c.span=="string"?parseInt(c.span,10):c.span,m=typeof(n==null?void 0:n.value)=="number"?n.value:n,$=!Number.isNaN(s)&&s>0?s:1;return Math.min($,m||1)}),h=e.computed(()=>{const s=typeof(n==null?void 0:n.value)=="number"?n.value:n,m=typeof(f==null?void 0:f.value)=="number"?f.value:f,$=g.value;if(!s||s<=1||$>=s)return"100%";const C=(s-1)*m,k=($-1)*m;return`calc((100% - ${C}px) * ${$} / ${s} + ${k}px)`}),v=e.computed(()=>{const s=typeof(p==null?void 0:p.value)=="string"?p.value:p,m=c.labelWidth!==""?c.labelWidth:s||"";return m?{width:typeof m=="number"?`${m}px`:String(m),flex:"0 0 auto"}:{}});return(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:h.value,flex:`0 0 ${h.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(v.value)},[e.renderSlot(s.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",vt,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),ve=O(pt,[["__scopeId","data-v-970d0b99"]]),yt={class:"rc-descriptions"},ht={key:0,class:"rc-descriptions__title"},gt=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const c=t,f=e.ref(null),n=e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap)),p=e.computed(()=>{const m=typeof c.column=="string"?Number.parseInt(c.column,10):c.column??1;return!Number.isNaN(m)&&m>0?m:1}),g=e.ref("100%"),h=e.ref("100%");e.watchEffect(()=>{const m=p.value;if(m<=1)g.value="100%",h.value="100%";else{const $=typeof c.gap=="number"?c.gap:parseFloat(String(c.gap))||0,k=`calc((100% - ${(m-1)*$}px) / ${m})`;h.value=k,g.value=k}}),e.provide("rcDescItemWidth",g),e.provide("rcDescSingleWidth",h),e.provide("rcDescColCount",p),e.provide("rcDescGapPx",e.computed(()=>typeof c.gap=="number"?c.gap:parseFloat(String(c.gap))||0));const v=e.computed(()=>c.labelWidth===""||c.labelWidth===void 0?"":typeof c.labelWidth=="number"?`${c.labelWidth}px`:String(c.labelWidth));e.provide("rcDescLabelWidth",v),e.provide("rcDescGap",e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap)));const s=e.computed(()=>{var C,k,D;const m=((C=c.keyMap)==null?void 0:C.key)??"label",$=((k=c.keyMap)==null?void 0:k.value)??"value";return(D=c.data)!=null&&D.length?c.data.map(N=>({label:N==null?void 0:N[m],value:N==null?void 0:N[$]})):[]});return(m,$)=>(e.openBlock(),e.createElementBlock("div",yt,[m.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:n.value}),ref_key:"wrapEl",ref:f},[s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(C,k)=>(e.openBlock(),e.createBlock(ve,{key:k,label:C.label,value:C.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(m.$slots,"default",{key:1},void 0,!0)],4)]))}}),_e=O(gt,[["__scopeId","data-v-5fcaa235"]]);_e.name="rc-descriptions";ve.name="rc-descriptions-item";function Ae(t){return t.component(_e.name,_e),t.component("RcDescriptions",_e),t.component(ve.name,ve),t.component("RcDescriptionsItem",ve),t}const nt=_e,at=ve,kt={class:"rc-card__title"},_t={class:"rc-card__title-text"},bt={key:0,class:"rc-card__status"},Ct={key:1,class:"rc-card__divider"},Bt={key:2,class:"rc-card__action"},wt=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const c=t,f=e.computed(()=>{const v=typeof c.round=="boolean"?c.round?"12px":"0":typeof c.round=="number"?`${c.round}px`:String(c.round);return{backgroundColor:c.color||"var(--rc-white)",borderRadius:v,boxShadow:h(c.elevation),width:g(c.width),height:g(c.height)}}),n=e.computed(()=>c.padding||"16px"),p=e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap));function g(v){return v==null||v===""?"":typeof v=="number"?`${v}px`:String(v)}function h(v){if(!v||v<=0)return"none";const s=4*v;return`0 ${Math.round(s/2)}px ${s}px rgba(0,0,0,0.06), 0 ${Math.round(s/4)}px ${Math.round(s/2)}px rgba(0,0,0,0.04)`}return(v,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(f.value)},[v.$slots.title||t.title||v.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",kt,[e.renderSlot(v.$slots,"title",{},()=>[e.createElementVNode("span",_t,e.toDisplayString(t.title),1)],!0)]),v.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(v.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:n.value,gap:p.value})},[e.renderSlot(v.$slots,"content",{},()=>[e.renderSlot(v.$slots,"default",{},void 0,!0)],!0)],4),v.$slots.action?(e.openBlock(),e.createElementBlock("div",Ct)):e.createCommentVNode("",!0),v.$slots.action?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(v.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),be=O(wt,[["__scopeId","data-v-a7b95214"]]);be.name="rc-card";const xt="RcCard";function Ye(t){return t.component(be.name,be),t.component(xt,be),t}const Dt={key:0,class:"rc-toast__mask"},Vt={class:"rc-toast__content"},$t={key:0,class:"rc-toast__spinner"},St={key:1,class:"rc-toast__icon rc-toast__icon--success"},Et={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Nt={class:"rc-toast__text"},Mt=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:c}){const f=t,n=e.ref(!0);let p;function g(){p&&(clearTimeout(p),p=null)}function h(){g(),n.value=!1}return c({close:h}),e.onMounted(()=>{f.duration&&f.duration>0&&(p=setTimeout(()=>{h()},f.duration))}),e.onUnmounted(()=>{g()}),(v,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",Dt)):e.createCommentVNode("",!0),e.createElementVNode("div",Vt,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",$t)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",St)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",Et)):e.createCommentVNode("",!0),e.createElementVNode("div",Nt,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(v.$slots,"default",{},void 0,!0)],64))}}),Ce=O(Mt,[["__scopeId","data-v-d234c9c5"]]);let fe=null,pe=null;function Ze(){fe&&(fe.unmount(),fe=null),pe&&(document.body.removeChild(pe),pe=null)}function It(t){const c=typeof t=="string"?{message:t}:t||{};Ze(),pe=document.createElement("div"),document.body.appendChild(pe);const f={message:c.message,type:c.type??"text",duration:c.duration??2e3,mask:c.mask??!1,onAfterLeave:()=>{var n;Ze(),(n=c.onClose)==null||n.call(c)}};return fe=e.createApp(Ce,f),fe.mount(pe),{close:ot}}function ot(){var t,c,f;fe&&((f=(c=(t=fe._instance)==null?void 0:t.exposed)==null?void 0:c.close)==null||f.call(c))}Ce.name="rc-toast";function et(t){return t.component(Ce.name,Ce),t}const Rt={class:"rc-message",role:"alert","aria-live":"polite"},Tt={class:"rc-message__content"},zt=e.defineComponent({__name:"index",setup(t,{expose:c}){const f=e.reactive([]);let n=1;function p(h){const v=f.findIndex(s=>s.id===h);v>=0&&f.splice(v,1)}function g(h,v,s){const m=n++;return f.push({id:m,type:h,content:v,duration:s}),s>0&&window.setTimeout(()=>p(m),s),m}return c({add:g,remove:p}),(h,v)=>(e.openBlock(),e.createElementBlock("div",Rt,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["rc-message__item",`rc-message--${s.type}`])},[e.createElementVNode("span",Tt,e.toDisplayString(s.content),1)],2))),128))]),_:1})]))}}),Ft=O(zt,[["__scopeId","data-v-87811df0"]]);let de=null,ue=null;function Lt(){var c;if(de&&ue)return;de=document.createElement("div"),document.body.appendChild(de);const t=e.createVNode(Ft,{});e.render(t,de),ue=(c=t.component)==null?void 0:c.exposed}function me(t,c,f){var p;Lt();const n=typeof f=="number"?f:t==="loading"?0:2e3;return(p=ue==null?void 0:ue.add)==null?void 0:p.call(ue,t,c,n)}const lt={open(t){return me(t.type||"info",t.content,t.duration)},info(t,c){return me("info",t,c)},success(t,c){return me("success",t,c)},warning(t,c){return me("warning",t,c)},error(t,c){return me("error",t,c)},loading(t,c){return me("loading",t,c)},destroy(){de&&(e.render(null,de),de.remove(),de=null,ue=null)}};function Pe(t){return t.config.globalProperties.$message=lt,t}W.name="rc-icon";function We(t){return t.component(W.name,W),t.component("RcIcon",W),t}const At={class:"rc-popup__content"},Yt=e.defineComponent({name:"rc-popup",__name:"index",props:{modelValue:{type:Boolean,default:!1},position:{default:"center"},overlay:{type:Boolean,default:!0},overlayClass:{default:""},overlayStyle:{default:void 0},closeable:{type:Boolean,default:!1},closeIconPosition:{default:"top-right"},closeIcon:{default:"icon_close"},round:{type:Boolean,default:!1},popupStyle:{default:void 0},closeOnClickOverlay:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:["update:modelValue","open","close","click-overlay"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(n.modelValue);e.watch(()=>n.modelValue,u=>{h.value=u,u?(p("open"),n.lockScroll&&$()):(p("close"),n.lockScroll&&C())},{immediate:!0}),e.watch(h,u=>{u!==n.modelValue&&p("update:modelValue",u)});const v=e.computed(()=>`rc-popup-slide-${n.position}`),s=e.computed(()=>({...n.popupStyle||{}}));let m=!1;function $(){m||(m=!0,document.body.style.overflow="hidden")}function C(){m&&(m=!1,document.body.style.overflow="")}function k(){p("click-overlay"),n.closeOnClickOverlay&&N()}function D(){N()}function N(){h.value=!1}function B(){h.value=!0}return e.onUnmounted(()=>{C()}),c({open:B,close:N,visible:h}),(u,G)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-popup-fade"},{default:e.withCtx(()=>[h.value&&n.overlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__overlay",{"rc-popup__overlay--transparent":n.overlayClass==="transparent"}]),style:e.normalizeStyle(n.overlayStyle),onClick:k},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:v.value},{default:e.withCtx(()=>[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popupRef",ref:g,class:e.normalizeClass(["rc-popup",[`rc-popup--${t.position}`,{"rc-popup--round":t.round}]]),style:e.normalizeStyle(s.value),onClick:G[0]||(G[0]=e.withModifiers(()=>{},["stop"]))},[t.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__close",`rc-popup__close--${t.closeIconPosition}`]),onClick:D},[e.createVNode(W,{name:t.closeIcon,class:"rc-popup__close-icon"},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",At,[e.renderSlot(u.$slots,"default",{},void 0,!0)])],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]))}}),ye=O(Yt,[["__scopeId","data-v-f1696784"]]);ye.name="rc-popup";const Pt="RcPopup";function Oe(t){return t.component(ye.name,ye),t.component(Pt,ye),t}const Wt={key:0,class:"rc-calendar__header"},Ot={class:"rc-calendar__header-title"},Ht={key:1,class:"rc-calendar__shortcuts"},Ut={class:"rc-calendar__shortcuts-scroll"},jt=["onClick"],Kt={class:"rc-calendar__month-title"},Gt={class:"rc-calendar__weekdays"},qt={class:"rc-calendar__days"},Jt=["onClick"],Qt={class:"rc-calendar__day-content"},Xt={class:"rc-calendar__day-text"},Zt={key:0,class:"rc-calendar__day-bottom"},en={key:2,class:"rc-calendar__footer"},tn={key:0,class:"rc-calendar__month-picker-overlay"},nn={class:"rc-calendar__month-picker"},an={class:"rc-calendar__month-picker-header"},on={class:"rc-calendar__month-picker-title"},ln={key:0},rn={key:0,class:"rc-calendar__year-picker-content"},cn={class:"rc-calendar__year-picker-grid"},sn=["onClick"],un={key:1,class:"rc-calendar__month-picker-content"},dn=["onClick"],Me=48,K=3,Fe=7,fn=e.defineComponent({__name:"panel-content",props:{showTitle:{type:Boolean},title:{},range:{type:Boolean},selectedDate:{},rangeStart:{},rangeEnd:{},minDate:{},maxDate:{},disabledDate:{type:Function},formatter:{type:Function},showFooter:{type:Boolean},maxRangeDays:{}},emits:["select-day","clear","confirm","shortcut-select"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=["日","一","二","三","四","五","六"];function h(o){if(!o)return null;const i=new Date(o);return isNaN(i.getTime())?null:i}function v(o){const i=o.getFullYear(),y=String(o.getMonth()+1).padStart(2,"0"),E=String(o.getDate()).padStart(2,"0");return`${i}-${y}-${E}`}const s=e.ref(new Date);e.watch(()=>[n.selectedDate,n.rangeStart],()=>{if(n.range&&n.rangeStart){const o=h(n.rangeStart);o&&(s.value=o)}else if(!n.range&&n.selectedDate){const o=h(n.selectedDate);o&&(s.value=o)}},{immediate:!0});function m(o){const i=new Date;return o.getFullYear()===i.getFullYear()&&o.getMonth()===i.getMonth()&&o.getDate()===i.getDate()}function $(o){if(!n.rangeStart||!n.rangeEnd)return!1;const i=v(o),y=n.rangeStart,E=n.rangeEnd;return i>y&&i<E}function C(o){if(n.disabledDate&&n.disabledDate(o))return!0;const i=v(o);return!!(n.minDate&&i<n.minDate||n.maxDate&&i>n.maxDate)}function k(o,i){const y=new Date(o,i,1),E=new Date(o,i+1,0),R=y.getDay(),te=E.getDate(),ne=[],Qe=new Date(o,i,0).getDate();for(let H=R-1;H>=0;H--){const U={date:new Date(o,i-1,Qe-H),type:"prev-month",text:String(Qe-H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}for(let H=1;H<=te;H++){const U={date:new Date(o,i,H),type:"current-month",text:String(H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}const rt=42-ne.length;for(let H=1;H<=rt;H++){const U={date:new Date(o,i+1,H),type:"next-month",text:String(H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}return ne}const D=e.computed(()=>{const o=s.value.getFullYear(),i=s.value.getMonth();return k(o,i)}),N=e.computed(()=>{const o=s.value.getFullYear(),i=s.value.getMonth()+1;return`${o}年${i}月`});function B(o){const i=[];if(o.type!=="current-month"&&i.push("is-other-month"),m(o.date)&&i.push("is-today"),C(o.date))return i.push("is-disabled"),i;const y=v(o.date);return n.range?(n.rangeStart===y&&i.push("is-start"),n.rangeEnd===y&&i.push("is-end"),$(o.date)&&i.push("is-in-range")):n.selectedDate===y&&i.push("is-selected"),i}const u=e.computed(()=>!!(n.rangeStart&&n.rangeEnd)),G=e.computed(()=>n.rangeStart&&n.rangeEnd?2:n.rangeStart||n.rangeEnd?1:0);function Z(o){if(!n.minDate&&!n.maxDate)return!1;const i=n.minDate?h(n.minDate):null,y=n.maxDate?h(n.maxDate):null;return!!(i&&o<i.getFullYear()||y&&o>y.getFullYear())}function ee(o,i){const y=n.minDate?h(n.minDate):null,E=n.maxDate?h(n.maxDate):null;if(y){const R=y.getFullYear(),te=y.getMonth()+1;if(o<R||o===R&&i<te)return!0}if(E){const R=E.getFullYear(),te=E.getMonth()+1;if(o>R||o===R&&i>te)return!0}return!1}const F=e.ref(!1),T=e.ref("year"),L=e.ref(s.value.getFullYear()),M=e.ref(s.value.getMonth()+1),z=e.ref(),w=e.ref(1900),V=e.ref(1920),x=e.ref(1900),I=e.ref(2100),q=e.computed(()=>{const o=[],y=Math.floor((w.value-x.value)/K)-3,E=Math.ceil((V.value-x.value)/K)+3,R=x.value+Math.max(0,y)*K,te=x.value+E*K-1;for(let ne=R;ne<=te;ne++)o.push(ne);return o});e.watch(()=>s.value,o=>{L.value=o.getFullYear(),M.value=o.getMonth()+1},{immediate:!0});function oe(){if(!z.value)return;const o=z.value.scrollTop,y=Math.max(0,Math.floor(o/Me)),E=x.value+y*K,R=E+Fe*K-1;E<x.value?x.value=E-100:R>I.value&&(I.value=R+100),(E!==w.value||R!==V.value)&&(w.value=E,V.value=R)}function le(){L.value=s.value.getFullYear(),M.value=s.value.getMonth()+1,T.value="year",F.value=!0;const o=L.value;o<x.value?x.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99),e.nextTick(()=>{if(z.value){const i=Math.floor((o-x.value)/K),y=Math.max(0,i-2);w.value=x.value+y*K,V.value=w.value+Fe*K-1,se(o)}})}function se(o){if(!z.value)return;o<x.value?x.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99);const i=Math.floor((o-x.value)/K),y=i*Me;z.value.scrollTop=y;const E=Math.max(0,i-2);w.value=x.value+E*K,V.value=w.value+Fe*K-1}function _(){const o=new Date(s.value);o.setMonth(o.getMonth()-1),s.value=o}function r(){const o=new Date(s.value);o.setMonth(o.getMonth()+1),s.value=o}function S(o){Z(o)||(L.value=o,T.value="month")}function Y(o){ee(L.value,o)||(M.value=o,J())}function J(){const o=new Date(s.value);o.setFullYear(L.value),o.setMonth(M.value-1),s.value=o,F.value=!1,T.value="year"}function Q(o){p("select-day",o)}function re(){p("clear")}function a(){X.value&&re()}function l(){p("confirm")}function d(){F.value=!1}function b(o){T.value=o}function P(){const i=new Date().getFullYear();Z(i)||(L.value=i,T.value="month")}function A(){const i=new Date().getMonth()+1;ee(L.value,i)||(M.value=i,J())}const X=e.computed(()=>n.range?!!(n.rangeStart||n.rangeEnd):!!n.selectedDate);function ie(o,i){const y=h(o),E=h(i);if(!y||!E)return 0;const R=Math.abs(E.getTime()-y.getTime());return Math.ceil(R/(1e3*60*60*24))+1}function ce(){return v(new Date)}function ge(){const o=new Date,i=o.getDay(),y=o.getDate()-i+(i===0?-6:1);return new Date(o.getFullYear(),o.getMonth(),y)}function we(){const o=ge(),i=new Date(o);return i.setDate(o.getDate()+6),i}function xe(){const o=new Date;return new Date(o.getFullYear(),o.getMonth(),1)}function ke(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()+1,0)}function De(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()-2,1)}function Ve(){const o=new Date;return new Date(o.getFullYear(),0,1)}function $e(){const o=new Date;return new Date(o.getFullYear(),11,31)}const Se=[{key:"today",label:"本日",days:1,getRange:()=>{const o=ce();return[o,o]}},{key:"week",label:"本周",days:7,getRange:()=>{const o=v(ge()),i=v(we());return[o,i]}},{key:"month",label:"本月",getRange:()=>{const o=v(xe()),i=v(ke());return[o,i]}},{key:"threeMonths",label:"近三月",getRange:()=>{const o=v(De()),i=v(ke());return[o,i]}},{key:"year",label:"本年",getRange:()=>{const o=v(Ve()),i=v($e());return[o,i]}},{key:"last7Days",label:"近7天",days:7,getRange:()=>{const o=new Date,i=new Date(o);return i.setDate(o.getDate()-6),[v(i),ce()]}},{key:"last30Days",label:"近30天",days:30,getRange:()=>{const o=new Date,i=new Date(o);return i.setDate(o.getDate()-29),[v(i),ce()]}}],Ee=e.computed(()=>Se.filter(o=>{if(n.maxRangeDays!==void 0){if(o.days!==void 0)return o.days<=n.maxRangeDays;{const i=o.getRange();if(i)return ie(i[0],i[1])<=n.maxRangeDays}}return!0}));function Ne(o){const i=o.getRange();if(i){if(n.minDate&&i[0]<n.minDate||n.maxDate&&i[1]>n.maxDate)return;p("shortcut-select",i)}}return c({yearScrollRef:z}),(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[t.showTitle?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("div",Ot,e.toDisplayString(t.title),1),e.createElementVNode("span",{class:e.normalizeClass(["rc-calendar__header-clear",{"is-disabled":!X.value}]),onClick:a}," 清空 ",2)])):e.createCommentVNode("",!0),t.range?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.key,class:"rc-calendar__shortcut-item",onClick:E=>Ne(y)},e.toDisplayString(y.label),9,jt))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Kt,[e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:_},[e.createVNode(e.unref(W),{name:"icon_caret-left",class:"rc-calendar__nav-icon"})]),e.createElementVNode("div",{class:"rc-calendar__month-text",onClick:le},e.toDisplayString(N.value),1),e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:r},[e.createVNode(e.unref(W),{name:"icon_caret-right",class:"rc-calendar__nav-icon"})])]),e.createElementVNode("div",Gt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(g,y=>e.createElementVNode("div",{key:y,class:"rc-calendar__weekday"},e.toDisplayString(y),1)),64))]),e.createElementVNode("div",qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-calendar__day",B(y)]),onClick:R=>Q(y)},[e.createElementVNode("div",Qt,[e.createElementVNode("span",Xt,e.toDisplayString(y.text),1),y.bottomInfo?(e.openBlock(),e.createElementBlock("span",Zt,e.toDisplayString(y.bottomInfo),1)):e.createCommentVNode("",!0)])],10,Jt))),128))]),t.range&&t.showFooter?(e.openBlock(),e.createElementBlock("div",en,[e.createVNode(e.unref(ae),{type:"default",class:"rc-calendar__footer-reset",onClick:re},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(ae),{type:"primary",class:"rc-calendar__footer-confirm",disabled:!u.value,onClick:l},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value?`确定(${G.value}项)`:"确定"),1)]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"rc-calendar-fade"},{default:e.withCtx(()=>[F.value?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",nn,[e.createElementVNode("div",an,[e.createVNode(e.unref(ae),{type:"default",mode:"text",size:"small",onClick:d},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createElementVNode("div",on,[e.createElementVNode("span",{onClick:i[0]||(i[0]=y=>b("year"))},e.toDisplayString(L.value)+"年",1),T.value==="month"?(e.openBlock(),e.createElementBlock("span",ln," - ")):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createElementBlock("span",{key:1,onClick:i[1]||(i[1]=y=>b("month"))},e.toDisplayString(M.value)+"月",1)):e.createCommentVNode("",!0)]),T.value==="year"?(e.openBlock(),e.createBlock(e.unref(ae),{key:0,type:"primary",mode:"text",size:"small",onClick:P},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode(" 本年 ",-1)])]),_:1})):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createBlock(e.unref(ae),{key:1,type:"primary",mode:"text",size:"small",onClick:A},{default:e.withCtx(()=>[...i[5]||(i[5]=[e.createTextVNode(" 本月 ",-1)])]),_:1})):e.createCommentVNode("",!0)]),T.value==="year"?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",{class:"rc-calendar__year-picker-scroll",ref_key:"yearScrollRef",ref:z,onScroll:oe},[e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.floor((w.value-x.value)/K)*Me}px`})},null,4),e.createElementVNode("div",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:e.normalizeClass(["rc-calendar__year-picker-item",{"is-selected":L.value===y,"is-disabled":Z(y)}]),onClick:E=>S(y)},e.toDisplayString(y),11,sn))),128))]),e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.ceil((I.value-V.value)/K)*Me}px`})},null,4)],544)])):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createElementBlock("div",un,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(12,y=>e.createElementVNode("div",{key:y,class:e.normalizeClass(["rc-calendar__month-picker-item",{"is-selected":M.value===y,"is-disabled":ee(L.value,y)}]),onClick:E=>Y(y)},e.toDisplayString(y)+"月 ",11,dn)),64))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1})]))}}),tt=O(fn,[["__scopeId","data-v-0bf1834b"]]),mn={class:"rc-calendar"},vn=["placeholder"],pn={class:"rc-calendar__input-actions"},yn={key:1,class:"rc-calendar__panel"},hn=e.defineComponent({name:"rc-calendar",__name:"index",props:{modelValue:{default:null},range:{type:[Boolean,Number],default:!1},mode:{default:"default"},placeholder:{default:"请选择日期"},showTitle:{type:Boolean,default:!0},title:{default:"选择日期"},minDate:{default:void 0},maxDate:{default:void 0},disabledDate:{type:Function,default:void 0},formatter:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0},endDateOffset:{type:Boolean,default:!1}},emits:["update:modelValue","change","confirm"],setup(t,{emit:c}){const f=t,n=c,p=e.ref(),g=e.ref(),h=e.ref(!1),v=e.ref(""),s=e.computed(()=>f.range===!0||typeof f.range=="number"),m=e.computed(()=>typeof f.range=="number"?f.range:void 0),$=e.computed(()=>_=>{if(f.disabledDate&&f.disabledDate(_))return!0;if(m.value!==void 0&&k.value&&!D.value){const r=u(_);if(B(k.value)&&G(k.value,r)>m.value)return!0}return!1}),C=e.ref(null),k=e.ref(null),D=e.ref(null);e.watch(()=>f.modelValue,_=>{s.value?Array.isArray(_)&&_.length===2?(k.value=_[0],D.value=T(_[1])):(k.value=null,D.value=null):C.value=typeof _=="string"?_:null,N()},{immediate:!0});function N(){f.mode==="popup"&&(s.value?k.value&&D.value?v.value=`${k.value} ~ ${D.value}`:k.value?v.value=`${k.value} ~ `:v.value="":v.value=C.value||"")}function B(_){if(!_)return null;const r=new Date(_);return isNaN(r.getTime())?null:r}function u(_){const r=_.getFullYear(),S=String(_.getMonth()+1).padStart(2,"0"),Y=String(_.getDate()).padStart(2,"0");return`${r}-${S}-${Y}`}function G(_,r){const S=B(_),Y=B(r);if(!S||!Y)return 0;const J=Math.abs(Y.getTime()-S.getTime());return Math.ceil(J/(1e3*60*60*24))}function Z(_){const r=B(_);return r?(r.setDate(r.getDate()+1),u(r)):_}function ee(_){const r=B(_);return r?(r.setDate(r.getDate()-1),u(r)):_}function F(_){return f.endDateOffset&&s.value?Z(_):_}function T(_){return f.endDateOffset&&s.value?ee(_):_}function L(_){if(_.type!=="current-month"||f.disabledDate&&f.disabledDate(_.date))return;const r=u(_.date);if(!(f.minDate&&r<f.minDate)&&!(f.maxDate&&r>f.maxDate)){if(s.value)if(!k.value||k.value&&D.value)k.value=r,D.value=null;else{let S=k.value,Y=r;if(r<k.value&&(Y=k.value,S=r),k.value=S,D.value=Y,k.value&&D.value){const J=F(D.value),Q=[k.value,J];n("update:modelValue",Q),n("change",Q),f.showFooter||M()}}else{C.value=r;const S=r;n("update:modelValue",S),n("change",S),f.mode&&x()}N()}}function M(){if(k.value&&D.value){const _=F(D.value),r=[k.value,_];n("update:modelValue",r),n("change",r),n("confirm",r),x()}}function z(){s.value?(k.value=null,D.value=null):C.value=null;const _=null;n("update:modelValue",_),n("change",_),N()}function w(_){k.value=_[0],D.value=_[1];const r=F(_[1]),S=[_[0],r];n("update:modelValue",S),n("change",S),f.showFooter?N():M()}function V(){h.value=!0}function x(){h.value=!1}function I(_){h.value=_}function q(){V()}function oe(){f.mode==="popup"&&se()}function le(){h.value||V()}function se(){const _=v.value.trim();if(s.value){const r=_.split("~").map(S=>S.trim());if(r.length===2&&r[0]&&r[1]){const S=B(r[0]),Y=B(r[1]);if(S&&Y&&!isNaN(S.getTime())&&!isNaN(Y.getTime())){k.value=u(S);const J=u(Y);D.value=T(J);const Q=F(D.value),re=[k.value,Q];n("update:modelValue",re),n("change",re);return}}}else{const r=B(_);if(r&&!isNaN(r.getTime())){C.value=u(r),n("update:modelValue",C.value),n("change",C.value);return}}N()}return(_,r)=>(e.openBlock(),e.createElementBlock("div",mn,[t.mode==="popup"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-calendar__input",onClick:V},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":r[0]||(r[0]=S=>v.value=S),type:"text",class:"rc-calendar__input-field",placeholder:t.placeholder,readonly:"",onFocus:q,onBlur:oe,onInput:le},null,40,vn),[[e.vModelText,v.value]]),e.createElementVNode("div",pn,[e.createVNode(e.unref(W),{name:"icon_a-rili",class:"rc-calendar__input-icon"})])])):e.createCommentVNode("",!0),t.mode==="default"?(e.openBlock(),e.createElementBlock("div",yn,[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:s.value,"selected-date":C.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":$.value,formatter:t.formatter,"show-footer":!1,"max-range-days":m.value,onSelectDay:L,onClear:z,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","max-range-days"])])):e.createCommentVNode("",!0),t.mode==="popup"?(e.openBlock(),e.createBlock(e.unref(ye),{key:2,modelValue:h.value,"onUpdate:modelValue":[r[1]||(r[1]=S=>h.value=S),I],position:"bottom",overlay:!0,round:!0,"close-on-click-overlay":!0,"lock-scroll":!0},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"popupPanelRef",ref:g,class:"rc-calendar__panel"},[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:s.value,"selected-date":C.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":$.value,formatter:t.formatter,"show-footer":t.showFooter,"max-range-days":m.value,onSelectDay:L,onClear:z,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","show-footer","max-range-days"])],512)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]))}}),he=O(hn,[["__scopeId","data-v-96b29c22"]]);he.name="rc-calendar";const gn="RcCalendar";function He(t){return t.component(he.name,he),t.component(gn,he),t}const kn={class:"rc-search-area"},_n={class:"rc-search-area__bar"},bn=["onClick"],Cn={class:"rc-search-area__item-label"},Bn={class:"rc-search-area__panel-content"},wn={key:1,class:"rc-search-area__input-wrapper"},xn=["placeholder"],Dn={key:2,class:"rc-search-area__calendar-wrapper"},Vn={key:3,class:"rc-search-area__tree-container"},$n={class:"rc-search-area__tree-group-title"},Sn={class:"rc-search-area__tree-group-options"},En=["onClick"],Nn={class:"rc-search-area__option-label"},Mn={key:4,class:"rc-search-area__tree-container"},In={class:"rc-search-area__tree-group-title"},Rn={class:"rc-search-area__tree-group-options"},Tn=["onClick"],zn={class:"rc-search-area__option-label"},Fn={key:5,class:"rc-search-area__options-grid"},Ln=["onClick"],An={class:"rc-search-area__option-label"},Yn={key:6,class:"rc-search-area__options-grid"},Pn=["onClick"],Wn={class:"rc-search-area__option-label"},On={key:7,class:"rc-search-area__empty"},Hn={key:0,class:"rc-search-area__panel-footer"},Un=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0},autoConfirm:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(null),h=e.ref(null),v=e.ref(null),s=e.ref({top:"0px"}),m=async()=>{if(g.value===null||!h.value)return;await e.nextTick();const l=h.value.getBoundingClientRect().top;s.value={top:`${l}px`}},$=a=>{if(g.value===null||!h.value)return;const l=a.target;if(h.value.contains(l))return;const d=h.value.closest(".rc-search-area");if(d){const b=d.querySelector(".rc-search-area__bar");if(b&&b.contains(l))return}F()};e.watch(g,async a=>{a!==null?(await e.nextTick(),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("click",$,!0)):(window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("click",$,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("click",$,!0)});const C=e.ref({}),k=e.ref(""),D=e.ref(null),N=e.ref({}),B=e.ref({...n.modelValue});e.watch(()=>n.modelValue,a=>{B.value={...a||{}}},{deep:!0,immediate:!0});const u=e.computed(()=>g.value===null?null:n.items[g.value]),G=e.computed(()=>{if(!u.value)return"";const a=re(u.value);return a>0?`(${a}项)`:""}),Z=a=>{const l=B.value[a.key];if(l==null||l===""||a.slot)return a.label;if(a.type==="input"){if(l&&String(l).trim())return`${a.label}: ${l}`}else if(a.type==="calendar"){if(l){if(Array.isArray(l)&&l.length===2)return`${a.label}: ${l[0]} ~ ${l[1]}`;if(typeof l=="string")return`${a.label}: ${l}`}}else if(a.type==="single"||a.type==="tree-single"){const d=z(a,l);if(d)return`${a.label}: ${M(d,a)}`}else{const d=Array.isArray(l)?l:[l];if(d.length>0){const b=d.map(P=>{const A=z(a,P);return A?M(A,a):null}).filter(P=>P!==null);if(b.length>0)return`${a.label}: ${b.join("、")}`}}return a.label},ee=a=>{const l=n.items[a];if(!l)return;if(g.value===a){g.value=null;return}const d=B.value[l.key];l.slot?d!=null?Array.isArray(d)?N.value[l.key]=[...d]:typeof d=="object"?N.value[l.key]={...d}:N.value[l.key]=d:N.value[l.key]=void 0:l.type==="input"?k.value=d!=null?String(d):"":l.type==="calendar"?D.value=d??null:l.type==="single"||l.type==="tree-single"?C.value[l.key]=d!==void 0?d:null:C.value[l.key]=d!==void 0?Array.isArray(d)?[...d]:[d]:[],g.value=a},F=()=>{g.value=null},T=(a,l)=>{if(!l)return typeof a=="string"?a:a.label||String(a.value);const d=a;if(l.renderItem){if(typeof l.renderItem=="string")return String(typeof d=="object"&&d!==null?d[l.renderItem]??"":d);{const b=l.renderItem(d);return b!=null?String(b):""}}return typeof a=="string"?a:a.label||String(a.value)},L=(a,l)=>{if(!l)return typeof a=="string"?a:a.value!==void 0?a.value:a;const d=a;return l.format?typeof l.format=="string"?typeof d=="object"&&d!==null?d[l.format]:d:l.format(d):typeof a=="string"?a:a.value!==void 0?a.value:a},M=(a,l)=>{const d=a,b=l.renderResult||l.renderItem;if(b){if(typeof b=="string")return String(typeof d=="object"&&d!==null?d[b]??"":d);{const P=b(d);return P!=null?String(P):""}}return T(a,l)},z=(a,l,d)=>{const b=d||a.options;if(!b)return null;const P=a.childrenKey||"children";for(const A of b){const X=L(A,a);if(X===l||String(X)===String(l))return A;if(typeof A=="object"&&A!==null){const ie=A[P];if(Array.isArray(ie)&&ie.length>0){const ce=z(a,l,ie);if(ce)return ce}}}return null},w=(a,l)=>{const d=l||a.options;if(!d)return[];const b=a.childrenKey||"children",P=[];for(const A of d)if(P.push(A),typeof A=="object"&&A!==null){const X=A[b];Array.isArray(X)&&X.length>0&&P.push(...w(a,X))}return P},V=a=>{if(!u.value)return!1;const l=u.value.key,d=C.value[l],b=L(a,u.value);return u.value.type==="single"||u.value.type==="tree-single"?d!=null&&d===b:(Array.isArray(d)?d:[]).some(A=>A===b||String(A)===String(b))},x=a=>a?a.childrenKey?w(a):a.options||[]:[],I=a=>{if(!a)return[];const l=a.childrenKey||"children";return(a.options||[]).filter(d=>{if(typeof d=="string")return!1;const b=d[l];return Array.isArray(b)&&b.length>0})},q=(a,l)=>{if(!l||typeof a=="string")return[];const d=l.childrenKey||"children",b=a[d];return Array.isArray(b)?b:[]},oe=a=>{if(a)return N.value[a.key]!==void 0?N.value[a.key]:B.value[a.key]},le=(a,l)=>{if(a&&(N.value[a.key]=l,n.autoConfirm)){const d=a.key;B.value[d]=l,p("update:modelValue",{...B.value}),p("change",{...B.value},a),F()}},se=a=>{if(!u.value)return;const l=u.value.key,d=L(a,u.value);B.value[l];let b;C.value[l]===d?b=void 0:b=d,B.value[l]=b,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()},_=a=>{if(!u.value)return;const l=u.value.key,d=L(a,u.value),b=Array.isArray(C.value[l])?[...C.value[l]]:[],P=b.findIndex(A=>A===d||String(A)===String(d));if(P>=0?b.splice(P,1):b.push(d),C.value[l]=b,n.autoConfirm){const A=b.length>0?b:void 0;B.value[l]=A,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},r=()=>{if(!u.value)return;const a=u.value.key;u.value.slot?N.value[a]=void 0:u.value.type==="input"?k.value="":u.value.type==="calendar"?D.value=null:u.value.type==="single"||u.value.type==="tree-single"?C.value[a]=null:C.value[a]=[]},S=()=>{if(n.autoConfirm&&u.value){const a=u.value.key,l=k.value.trim()||void 0;B.value[a]=l,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},Y=a=>{if(D.value=a,n.autoConfirm&&u.value){const l=u.value.key,d=a??void 0;B.value[l]=d,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},J=()=>{if(!u.value)return;const a=u.value.key;B.value[a];let l;if(u.value.slot)l=N.value[a],B.value[a]=l;else if(u.value.type==="input")l=k.value.trim()||void 0,B.value[a]=l;else if(u.value.type==="calendar")l=D.value!==null&&D.value!==void 0?D.value:void 0,B.value[a]=l;else if(u.value.type==="single"||u.value.type==="tree-single"){const d=C.value[a];l=d??void 0,B.value[a]=l}else{const d=C.value[a];l=Array.isArray(d)&&d.length>0?d:void 0,B.value[a]=l}p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()},Q=a=>{const l=B.value[a.key];return l==null||l===""?0:a.slot?1:a.type==="input"?String(l).trim()?1:0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:l?1:0},re=a=>{if(a.slot){const d=N.value[a.key];return d!=null&&d!==""?1:0}else{if(a.type==="input")return k.value.trim()?1:0;if(a.type==="calendar")return D.value!==null&&D.value!==void 0?1:0}const l=C.value[a.key];return l==null||l===""?0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:0};return c({getValues:()=>({...B.value}),reset:()=>{B.value={},C.value={},N.value={},p("update:modelValue",{})}}),(a,l)=>(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",_n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,(d,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:e.normalizeClass(["rc-search-area__item",{"is-active":g.value===b,"has-value":Q(d)>0}]),onClick:P=>ee(b)},[e.createElementVNode("span",Cn,e.toDisplayString(Z(d)),1),e.createVNode(e.unref(W),{name:"icon_a-xiala2",color:g.value!==b&&Q(d)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":g.value===b}])},null,8,["color","class"])],10,bn))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[g.value!==null&&n.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:v,class:"rc-search-area__mask",style:e.normalizeStyle(s.value),onClick:F},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var d,b,P,A,X,ie,ce,ge,we,xe,ke,De,Ve,$e,Se,Ee,Ne,o,i;return[g.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:h,class:"rc-search-area__panel"},[e.createElementVNode("div",Bn,[(d=u.value)!=null&&d.slot&&a.$slots[u.value.key]?e.renderSlot(a.$slots,u.value.key,{key:0,value:oe(u.value),"update:value":y=>le(u.value,y)},void 0,!0):((b=u.value)==null?void 0:b.type)==="input"?(e.openBlock(),e.createElementBlock("div",wn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=y=>k.value=y),type:"text",class:"rc-search-area__input",placeholder:u.value.placeholder||"请输入",onInput:S},null,40,xn),[[e.vModelText,k.value]])])):((P=u.value)==null?void 0:P.type)==="calendar"?(e.openBlock(),e.createElementBlock("div",Dn,[e.createVNode(e.unref(he),{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=y=>D.value=y),range:((A=u.value.calendarConfig)==null?void 0:A.range)||!1,mode:"default","min-date":(X=u.value.calendarConfig)==null?void 0:X.minDate,"max-date":(ie=u.value.calendarConfig)==null?void 0:ie.maxDate,"disabled-date":(ce=u.value.calendarConfig)==null?void 0:ce.disabledDate,formatter:(ge=u.value.calendarConfig)==null?void 0:ge.formatter,"end-date-offset":((we=u.value.calendarConfig)==null?void 0:we.endDateOffset)||!1,onChange:Y},null,8,["modelValue","range","min-date","max-date","disabled-date","formatter","end-date-offset"])])):((xe=u.value)==null?void 0:xe.type)==="tree-single"?(e.openBlock(),e.createElementBlock("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"rc-search-area__tree-group"},[e.createElementVNode("div",$n,e.toDisplayString(T(y,u.value||void 0)),1),e.createElementVNode("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q(y,u.value),(R,te)=>(e.openBlock(),e.createElementBlock("div",{key:te,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(R)}]),onClick:ne=>se(R)},[e.createElementVNode("span",Nn,e.toDisplayString(T(R,u.value||void 0)),1),V(R)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,En))),128))])]))),128))])):((ke=u.value)==null?void 0:ke.type)==="tree-multiple"?(e.openBlock(),e.createElementBlock("div",Mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"rc-search-area__tree-group"},[e.createElementVNode("div",In,e.toDisplayString(T(y,u.value||void 0)),1),e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q(y,u.value),(R,te)=>(e.openBlock(),e.createElementBlock("div",{key:te,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(R)}]),onClick:ne=>_(R)},[e.createElementVNode("span",zn,e.toDisplayString(T(R,u.value||void 0)),1),V(R)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Tn))),128))])]))),128))])):((De=u.value)==null?void 0:De.type)==="single"?(e.openBlock(),e.createElementBlock("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(y)}]),onClick:R=>se(y)},[e.createElementVNode("span",An,e.toDisplayString(T(y,u.value||void 0)),1),V(y)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Ln))),128))])):(e.openBlock(),e.createElementBlock("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(y)}]),onClick:R=>_(y)},[e.createElementVNode("span",Wn,e.toDisplayString(T(y,u.value||void 0)),1),V(y)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Pn))),128))])),((Ve=u.value)==null?void 0:Ve.type)!=="input"&&(($e=u.value)==null?void 0:$e.type)!=="calendar"&&!((Se=u.value)!=null&&Se.slot)&&((Ne=(Ee=u.value)==null?void 0:Ee.options)==null?void 0:Ne.length)===0?(e.openBlock(),e.createElementBlock("div",On,[...l[2]||(l[2]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),!n.autoConfirm&&((o=u.value)==null?void 0:o.type)!=="single"&&((i=u.value)==null?void 0:i.type)!=="tree-single"?(e.openBlock(),e.createElementBlock("div",Hn,[e.createVNode(e.unref(ae),{block:"",onClick:r},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(ae),{type:"primary",block:"",onClick:J},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(G.value),1)]),_:1})])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]}),_:3})]))}}),Ue=O(Un,[["__scopeId","data-v-dd3a69e1"]]),je=t=>{t.component("RcSearchArea",Ue),t.component("rc-search-area",Ue)},jn={key:0,class:"rc-input__prepend"},Kn={class:"rc-input__wrapper"},Gn={key:0,class:"rc-input__prefix"},qn={key:1,class:"rc-input__suffix"},Jn={key:0,class:"rc-input__suffix-inner"},Qn={key:2,class:"rc-input__count"},Xn={key:1,class:"rc-input__append"},Zn=e.defineComponent({__name:"index",props:{modelValue:{default:""},type:{default:"text"},size:{default:"default"},placeholder:{default:"请输入"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{default:void 0},minlength:{default:void 0},showWordLimit:{type:Boolean,default:!1},rows:{default:2},autosize:{type:[Boolean,Object],default:!1},resize:{default:void 0},prefixIcon:{default:""},suffixIcon:{default:""},autocomplete:{default:"off"},name:{default:void 0},autofocus:{type:Boolean,default:!1},form:{default:void 0},tabindex:{default:void 0},formatter:{type:Function,default:void 0},parser:{type:Function,default:void 0}},emits:["update:modelValue","input","change","focus","blur","clear","keydown","mouseenter","mouseleave","compositionstart","compositionupdate","compositionend"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(n.modelValue??""),v=e.ref(!1),s=e.ref(!1),m=e.ref(!1);e.watch(()=>n.modelValue,r=>{h.value=r??""});const $=e.computed(()=>n.type==="password"?s.value?"text":"password":n.type),C=e.computed(()=>{const r=String(h.value??"");return n.formatter&&!m.value?n.formatter(r):r}),k=e.computed(()=>{const r=h.value;return r!==""&&r!==null&&r!==void 0}),D=e.computed(()=>String(h.value??"").length),N=e.useSlots(),B=e.computed(()=>!!(n.suffixIcon||n.showPassword&&n.type==="password"||n.clearable&&k.value&&!n.disabled&&!n.readonly||N.suffix)),u=e.computed(()=>{if(n.type!=="textarea")return{};const r={};return n.autosize?r.resize="none":n.resize!==void 0?r.resize=n.resize:r.resize="vertical",r});function G(r){let Y=r.target.value;n.parser&&!m.value&&(Y=n.parser(Y)),h.value=Y,p("update:modelValue",Y),p("input",Y),n.type==="textarea"&&n.autosize&&e.nextTick(()=>{q()})}function Z(r){v.value=!0,p("focus",r)}function ee(r){v.value=!1;const S=h.value;p("blur",r),p("change",S)}function F(){h.value="",p("update:modelValue",""),p("input",""),p("change",""),p("clear"),e.nextTick(()=>{var r;(r=g.value)==null||r.focus()})}function T(){s.value=!s.value}function L(r){p("keydown",r),r.key==="Enter"&&n.type!=="textarea"&&p("change",h.value)}function M(r){p("mouseenter",r)}function z(r){p("mouseleave",r)}function w(r){m.value=!0,p("compositionstart",r)}function V(r){p("compositionupdate",r)}function x(r){m.value=!1,p("compositionend",r),r.target&&G(r)}function I(){var r;n.disabled||n.readonly||(r=g.value)==null||r.focus()}function q(){if(n.type!=="textarea"||!g.value)return;const r=g.value;if(n.autosize){r.style.height="auto";const S=r.scrollHeight;if(typeof n.autosize=="object"){const{minRows:Y=2,maxRows:J}=n.autosize,Q=parseInt(getComputedStyle(r).lineHeight)||20,re=Y*Q,a=J?J*Q:1/0;r.style.height=`${Math.min(Math.max(S,re),a)}px`}else r.style.height=`${S}px`}}function oe(){var r;(r=g.value)==null||r.focus()}function le(){var r;(r=g.value)==null||r.blur()}function se(){g.value&&"select"in g.value&&g.value.select()}function _(){F()}return e.onMounted(()=>{n.type==="textarea"&&n.autosize&&q()}),c({focus:oe,blur:le,select:se,clear:_,resizeTextarea:q,inputRef:g}),(r,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-input",[`rc-input--${t.size}`,{"is-disabled":t.disabled,"is-focused":v.value,"is-readonly":t.readonly,"rc-input--textarea":t.type==="textarea","has-prepend":r.$slots.prepend,"has-append":r.$slots.append}]]),onClick:I},[r.$slots.prepend?(e.openBlock(),e.createElementBlock("div",jn,[e.renderSlot(r.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Kn,[t.prefixIcon||r.$slots.prefix?(e.openBlock(),e.createElementBlock("div",Gn,[e.renderSlot(r.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:t.prefixIcon,class:"rc-input__prefix-icon"},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type==="textarea"?"textarea":"input"),{ref_key:"inputRef",ref:g,value:C.value,type:$.value,class:e.normalizeClass(["rc-input__field",{"rc-input__field--textarea":t.type==="textarea"}]),placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,rows:t.rows,autocomplete:t.autocomplete,name:t.name,autofocus:t.autofocus,form:t.form,tabindex:t.tabindex,style:e.normalizeStyle(u.value),onInput:G,onFocus:Z,onBlur:ee,onKeydown:L,onMouseenter:M,onMouseleave:z,onCompositionstart:w,onCompositionupdate:V,onCompositionend:x},null,40,["value","type","class","placeholder","disabled","readonly","maxlength","minlength","rows","autocomplete","name","autofocus","form","tabindex","style"])),B.value?(e.openBlock(),e.createElementBlock("div",qn,[r.$slots.suffix?(e.openBlock(),e.createElementBlock("div",Jn,[e.renderSlot(r.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0),t.showPassword&&t.type==="password"&&k.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rc-input__password-toggle",onClick:e.withModifiers(T,["stop"])},[e.createVNode(e.unref(W),{color:s.value?"#1677ff":"#999",name:s.value?"icon_view":"icon_view-off"},null,8,["color","name"])])):e.createCommentVNode("",!0),t.clearable&&k.value&&!t.disabled&&!t.readonly?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"rc-input__clear",onClick:e.withModifiers(F,["stop"])},[e.createVNode(e.unref(W),{name:"icon_close",class:"rc-input__clear-icon"})])):e.createCommentVNode("",!0),t.suffixIcon&&!t.clearable&&!t.showPassword?(e.openBlock(),e.createBlock(e.unref(W),{key:3,name:t.suffixIcon,class:"rc-input__suffix-icon"},null,8,["name"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("span",Qn,e.toDisplayString(D.value)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)]),r.$slots.append?(e.openBlock(),e.createElementBlock("div",Xn,[e.renderSlot(r.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),Ie=O(Zn,[["__scopeId","data-v-df2c9b31"]]);Ie.name="rc-input";function Ke(t){return t.component(Ie.name,Ie),t}const ea=e.defineComponent({name:"rc-dropdown-menu",__name:"menu",props:{visible:{type:Boolean,default:void 0},effect:{default:"light"},maxHeight:{default:""}},emits:["mouseenter","mouseleave"],setup(t,{expose:c,emit:f}){const n=t,p=e.ref(),g=e.computed(()=>n.visible===void 0?!0:n.visible),h=e.computed(()=>n.visible!==void 0),v=e.computed(()=>{const s={};return n.maxHeight&&(s.maxHeight=typeof n.maxHeight=="number"?`${n.maxHeight}px`:n.maxHeight,s.overflowY="auto"),s});return c({menuRef:p}),(s,m)=>h.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"rc-dropdown-fade"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:p,class:e.normalizeClass(["rc-dropdown-menu",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(v.value),onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"])),onMouseenter:m[1]||(m[1]=$=>s.$emit("mouseenter",$)),onMouseleave:m[2]||(m[2]=$=>s.$emit("mouseleave",$))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],38)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock("ul",{key:1,ref_key:"menuRef",ref:p,class:e.normalizeClass(["rc-dropdown-menu rc-dropdown-menu--nested",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(v.value),onClick:m[3]||(m[3]=e.withModifiers(()=>{},["stop"])),onMouseenter:m[4]||(m[4]=$=>s.$emit("mouseenter",$)),onMouseleave:m[5]||(m[5]=$=>s.$emit("mouseleave",$))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],38))}}),Be=O(ea,[["__scopeId","data-v-288e2690"]]),ta=e.defineComponent({name:"rc-dropdown",__name:"index",props:{placement:{default:"bottom"},trigger:{default:"hover"},disabled:{type:Boolean,default:!1},effect:{default:"light"},maxHeight:{default:""},hideOnClick:{type:Boolean,default:!0},showTimeout:{default:150},hideTimeout:{default:150}},emits:["command","visible-change"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(),v=e.ref(!1);let s=null,m=null;function $(M){n.hideOnClick&&(v.value=!1),M!==void 0&&p("command",M)}e.provide("handleItemClick",$);function C(){n.disabled||(s&&(clearTimeout(s),s=null),m&&(clearTimeout(m),m=null),s=setTimeout(()=>{v.value=!0,requestAnimationFrame(()=>{e.nextTick(()=>{F()})})},n.showTimeout))}function k(){n.trigger==="hover"&&u.value||(m&&(clearTimeout(m),m=null),s&&(clearTimeout(s),s=null),m=setTimeout(()=>{v.value=!1,u.value=!1},n.hideTimeout))}function D(){n.disabled||(v.value?k():C())}function N(){n.trigger==="hover"&&!n.disabled&&C()}function B(){n.trigger==="hover"&&setTimeout(()=>{u.value||k()},50)}const u=e.ref(!1);function G(){n.trigger==="hover"&&(u.value=!0,s&&(clearTimeout(s),s=null),m&&(clearTimeout(m),m=null))}function Z(){n.trigger==="hover"&&(u.value=!1,k())}function ee(M){n.trigger==="click"&&!n.disabled&&(M.stopPropagation(),D())}function F(){var le;if(!g.value||!((le=h.value)!=null&&le.menuRef))return;const M=g.value,z=h.value.menuRef;if(!M||!z)return;const w=M.getBoundingClientRect(),V=z.getBoundingClientRect();if(V.width===0||V.height===0){setTimeout(()=>{v.value&&F()},10);return}let x=0,I=0;switch(n.placement){case"top":x=w.top-V.height,I=w.left;break;case"top-start":x=w.top-V.height,I=w.left;break;case"top-end":x=w.top-V.height,I=w.left+w.width-V.width;break;case"bottom":x=w.bottom,I=w.left+(w.width-V.width)/2;break;case"bottom-start":x=w.bottom,I=w.left;break;case"bottom-end":x=w.bottom,I=w.left+w.width-V.width;break;case"left":x=w.top+(w.height-V.height)/2,I=w.left-V.width;break;case"left-start":x=w.top,I=w.left-V.width;break;case"left-end":x=w.top+w.height-V.height,I=w.left-V.width;break;case"right":x=w.top+(w.height-V.height)/2,I=w.right;break;case"right-start":x=w.top,I=w.right;break;case"right-end":x=w.top+w.height-V.height,I=w.right;break}const q=window.innerWidth,oe=window.innerHeight;I<0&&(I=8),I+V.width>q&&(I=q-V.width-8),x<0&&(x=8),x+V.height>oe&&(x=oe-V.height-8),z.style.top=`${x}px`,z.style.left=`${I}px`,z.style.position="fixed",z.style.visibility="visible",z.style.display="block"}e.watch(v,M=>{p("visible-change",M),M?(requestAnimationFrame(()=>{e.nextTick(()=>{F()})}),document.addEventListener("click",T)):document.removeEventListener("click",T)});function T(M){if(n.trigger==="click"&&!n.disabled){const z=M.target;g.value&&!g.value.contains(z)&&k()}}function L(){v.value&&F()}return e.onMounted(()=>{window.addEventListener("resize",L),window.addEventListener("scroll",L,!0)}),e.onUnmounted(()=>{s&&clearTimeout(s),m&&clearTimeout(m),document.removeEventListener("click",T),window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}),c({show:C,hide:k,toggle:D,visible:v}),(M,z)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:g,class:e.normalizeClass(["rc-dropdown",{"is-disabled":t.disabled}]),onMouseenter:N,onMouseleave:B,onClick:ee},[e.renderSlot(M.$slots,"default",{},void 0,!0),e.createVNode(Be,{ref_key:"menuRef",ref:h,visible:v.value,effect:t.effect,"max-height":t.maxHeight,onMouseenter:G,onMouseleave:Z},{default:e.withCtx(()=>[e.renderSlot(M.$slots,"dropdown",{},void 0,!0)]),_:3},8,["visible","effect","max-height"])],34))}}),Re=O(ta,[["__scopeId","data-v-30feb4c4"]]),na={class:"rc-dropdown-item__text"},aa=e.defineComponent({name:"rc-dropdown-item",__name:"item",props:{command:{default:void 0},disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},icon:{default:""}},setup(t){const c=t,f=e.inject("handleItemClick",()=>{});function n(p){if(c.disabled){p.stopPropagation();return}f(c.command)}return(p,g)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["rc-dropdown-item",{"is-disabled":t.disabled,"is-divided":t.divided}]),onClick:n},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,name:t.icon,class:"rc-dropdown-item__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",na,[e.renderSlot(p.$slots,"default",{},void 0,!0)])],2))}}),Te=O(aa,[["__scopeId","data-v-7c739fdf"]]);Re.name="rc-dropdown";Be.name="rc-dropdown-menu";Te.name="rc-dropdown-item";function Ge(t){return t.component(Re.name,Re),t.component(Be.name,Be),t.component(Te.name,Te),t}const ze=Symbol("RECYCLE_UI_CONFIG"),qe={prefix:"rc",autoRegister:!0,provideKey:ze,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_2vm5jrrzfvq.css",iconClass:"iconfont"};function oa(t,c){c.autoRegister!==!1&&(typeof Le=="function"&&Le(t),typeof Ae=="function"&&Ae(t),typeof Ye=="function"&&Ye(t),typeof et=="function"&&et(t),typeof We=="function"&&We(t),typeof Pe=="function"&&Pe(t),typeof je=="function"&&je(t),typeof He=="function"&&He(t),typeof Oe=="function"&&Oe(t),typeof Ke=="function"&&Ke(t),typeof Ge=="function"&&Ge(t))}const Je=(t,c)=>{const f={...qe,...c||{}};if(t.provide(f.provideKey??ze,f),t.config.globalProperties.$recycleUI=f,typeof window<"u"&&f.iconCssUrl){const n=`link[rel="stylesheet"][data-rcui-icon="true"][href="${f.iconCssUrl}"]`;if(!document.head.querySelector(n)){const g=document.createElement("link");g.rel="stylesheet",g.href=f.iconCssUrl,g.setAttribute("data-rcui-icon","true"),document.head.appendChild(g)}}return oa(t,f),t},la={install:Je};function ra(t){return{install(c){Je(c,t)}}}exports.RECYCLE_UI_SYMBOL=ze;exports.RcButton=ae;exports.RcCalendar=he;exports.RcCard=be;exports.RcDescriptions=nt;exports.RcDescriptionsItem=at;exports.RcDropdown=Re;exports.RcDropdownItem=Te;exports.RcDropdownMenu=Be;exports.RcIcon=W;exports.RcInput=Ie;exports.RcPopup=ye;exports.RcSearchArea=Ue;exports.RcToast=Ce;exports.createRecycleUI=ra;exports.default=la;exports.defaultRecycleUIConfig=qe;exports.hideToast=ot;exports.install=Je;exports.installButton=Le;exports.installCalendar=He;exports.installCard=Ye;exports.installDescriptions=Ae;exports.installDropdown=Ge;exports.installIcon=We;exports.installInput=Ke;exports.installMessage=Pe;exports.installPopup=Oe;exports.installSearchArea=je;exports.message=lt;exports.rcDescriptions=nt;exports.rcDescriptionsItem=at;exports.showToast=It;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),ct={key:0,class:"rc-icon__unicode"},st=e.defineComponent({name:"rc-icon",__name:"index",props:{name:{},size:{default:16},color:{default:""},spin:{type:Boolean,default:!1},code:{default:""}},setup(t){const c=t,f=e.inject(ze,{}),n=e.computed(()=>(f==null?void 0:f.iconClass)||"iconfont"),p=e.computed(()=>c.name||""),g=e.computed(()=>typeof c.size=="number"?`${c.size}px`:c.size||"16px"),h=e.computed(()=>({fontSize:g.value,color:c.color||void 0,lineHeight:1,fontFamily:(f==null?void 0:f.iconClass)||"iconfont"})),v=e.computed(()=>{const s=c.code;if(s==null||s===""||s===0)return"";if(typeof s=="number")return String.fromCharCode(s);const m=String(s).replace(/^0x/i,""),$=parseInt(m,16);return Number.isNaN($)?"":String.fromCharCode($)});return e.onMounted(()=>{if(typeof window>"u")return;const s=f&&f.iconCssUrl||qe.iconCssUrl;if(!s)return;const m=`link[rel="stylesheet"][data-rcui-icon="true"][href="${s}"]`;if(!document.head.querySelector(m)){const C=document.createElement("link");C.rel="stylesheet",C.href=s,C.setAttribute("data-rcui-icon","true"),document.head.appendChild(C)}}),(s,m)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["rc-icon",[n.value,p.value,{"rc-icon--spin":t.spin}]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[v.value?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(v.value),1)):e.createCommentVNode("",!0)],6))}}),O=(t,c)=>{const f=t.__vccOpts||t;for(const[n,p]of c)f[n]=p;return f},W=O(st,[["__scopeId","data-v-3857a892"]]),it=["disabled"],ut={key:0,class:"rc-button__spinner"},dt={key:0,class:"rc-button__icon rc-button__icon--prefix"},ft={key:2,class:"rc-button__icon rc-button__icon--suffix"},mt=e.defineComponent({__name:"index",props:{type:{default:"default"},size:{default:"medium"},mode:{default:void 0},block:{type:Boolean,default:!1},label:{default:""},round:{type:[Number,String,Boolean],default:6},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},preIcon:{default:""},suffixIcon:{default:""}},emits:["click"],setup(t,{emit:c}){const f=t,n=c,p=h=>{!f.disabled&&!f.loading&&n("click",h)},g=e.computed(()=>{const h=f.round;return typeof h=="boolean"?h?"999px":"6px":typeof h=="number"?`${h}px`:String(h)});return(h,v)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["rc-button",[`rc-button--${t.type}`,`rc-button--${t.size}`,t.mode?`rc-button--${t.mode}`:"",{"is-block":t.block,"is-disabled":t.disabled,"is-loading":t.loading}]]),style:e.normalizeStyle({borderRadius:g.value}),disabled:t.disabled||t.loading,onClick:p},[t.loading?(e.openBlock(),e.createElementBlock("span",ut)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.preIcon||h.$slots.preIcon?(e.openBlock(),e.createElementBlock("span",dt,[e.renderSlot(h.$slots,"preIcon",{},()=>[t.preIcon?(e.openBlock(),e.createBlock(W,{key:0,name:t.preIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],64)),e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0),!t.loading&&(t.suffixIcon||h.$slots.suffixIcon)?(e.openBlock(),e.createElementBlock("span",ft,[e.renderSlot(h.$slots,"suffixIcon",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(W,{key:0,name:t.suffixIcon},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],14,it))}}),ae=O(mt,[["__scopeId","data-v-4c6a5e4f"]]);ae.name="rc-button";function Le(t){return t.component(ae.name,ae),t}const vt={class:"rc-desc-item__value"},pt=e.defineComponent({name:"rc-descriptions-item",__name:"item",props:{label:{default:""},value:{default:""},labelWidth:{default:""},span:{default:1}},setup(t){const c=t;e.inject("rcDescItemWidth",void 0),e.inject("rcDescSingleWidth",""),e.inject("rcDescGap","0px");const f=e.inject("rcDescGapPx",0),n=e.inject("rcDescColCount",1),p=e.inject("rcDescLabelWidth",""),g=e.computed(()=>{const s=typeof c.span=="string"?parseInt(c.span,10):c.span,m=typeof(n==null?void 0:n.value)=="number"?n.value:n,$=!Number.isNaN(s)&&s>0?s:1;return Math.min($,m||1)}),h=e.computed(()=>{const s=typeof(n==null?void 0:n.value)=="number"?n.value:n,m=typeof(f==null?void 0:f.value)=="number"?f.value:f,$=g.value;if(!s||s<=1||$>=s)return"100%";const C=(s-1)*m,k=($-1)*m;return`calc((100% - ${C}px) * ${$} / ${s} + ${k}px)`}),v=e.computed(()=>{const s=typeof(p==null?void 0:p.value)=="string"?p.value:p,m=c.labelWidth!==""?c.labelWidth:s||"";return m?{width:typeof m=="number"?`${m}px`:String(m),flex:"0 0 auto"}:{}});return(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:"rc-desc-item",style:e.normalizeStyle({width:h.value,flex:`0 0 ${h.value}`})},[e.createElementVNode("div",{class:"rc-desc-item__label",style:e.normalizeStyle(v.value)},[e.renderSlot(s.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4),e.createElementVNode("div",vt,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.value),1)],!0)])],4))}}),ve=O(pt,[["__scopeId","data-v-970d0b99"]]),yt={class:"rc-descriptions"},ht={key:0,class:"rc-descriptions__title"},gt=e.defineComponent({name:"rc-descriptions",__name:"index",props:{title:{},column:{default:2},gap:{default:4},labelWidth:{default:""},data:{default:()=>[]},keyMap:{}},setup(t){const c=t,f=e.ref(null),n=e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap)),p=e.computed(()=>{const m=typeof c.column=="string"?Number.parseInt(c.column,10):c.column??1;return!Number.isNaN(m)&&m>0?m:1}),g=e.ref("100%"),h=e.ref("100%");e.watchEffect(()=>{const m=p.value;if(m<=1)g.value="100%",h.value="100%";else{const $=typeof c.gap=="number"?c.gap:parseFloat(String(c.gap))||0,k=`calc((100% - ${(m-1)*$}px) / ${m})`;h.value=k,g.value=k}}),e.provide("rcDescItemWidth",g),e.provide("rcDescSingleWidth",h),e.provide("rcDescColCount",p),e.provide("rcDescGapPx",e.computed(()=>typeof c.gap=="number"?c.gap:parseFloat(String(c.gap))||0));const v=e.computed(()=>c.labelWidth===""||c.labelWidth===void 0?"":typeof c.labelWidth=="number"?`${c.labelWidth}px`:String(c.labelWidth));e.provide("rcDescLabelWidth",v),e.provide("rcDescGap",e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap)));const s=e.computed(()=>{var C,k,D;const m=((C=c.keyMap)==null?void 0:C.key)??"label",$=((k=c.keyMap)==null?void 0:k.value)??"value";return(D=c.data)!=null&&D.length?c.data.map(N=>({label:N==null?void 0:N[m],value:N==null?void 0:N[$]})):[]});return(m,$)=>(e.openBlock(),e.createElementBlock("div",yt,[m.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(m.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-descriptions__body",style:e.normalizeStyle({gap:n.value}),ref_key:"wrapEl",ref:f},[s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(C,k)=>(e.openBlock(),e.createBlock(ve,{key:k,label:C.label,value:C.value,"label-width":t.labelWidth},null,8,["label","value","label-width"]))),128)):e.renderSlot(m.$slots,"default",{key:1},void 0,!0)],4)]))}}),_e=O(gt,[["__scopeId","data-v-5fcaa235"]]);_e.name="rc-descriptions";ve.name="rc-descriptions-item";function Ae(t){return t.component(_e.name,_e),t.component("RcDescriptions",_e),t.component(ve.name,ve),t.component("RcDescriptionsItem",ve),t}const nt=_e,at=ve,kt={class:"rc-card__title"},_t={class:"rc-card__title-text"},bt={key:0,class:"rc-card__status"},Ct={key:1,class:"rc-card__divider"},Bt={key:2,class:"rc-card__action"},wt=e.defineComponent({name:"rc-card",__name:"index",props:{color:{default:"var(--rc-white)"},topBgColor:{default:"rgba(29, 133, 252, 0.05)"},title:{default:""},status:{default:""},statusColor:{default:"var(--rc-primary)"},round:{default:8},bordered:{type:Boolean,default:!1},elevation:{default:2},padding:{default:"16px"},gap:{default:12},width:{default:"100%"},height:{default:""}},setup(t){const c=t,f=e.computed(()=>{const v=typeof c.round=="boolean"?c.round?"12px":"0":typeof c.round=="number"?`${c.round}px`:String(c.round);return{backgroundColor:c.color||"var(--rc-white)",borderRadius:v,boxShadow:h(c.elevation),width:g(c.width),height:g(c.height)}}),n=e.computed(()=>c.padding||"16px"),p=e.computed(()=>typeof c.gap=="number"?`${c.gap}px`:String(c.gap));function g(v){return v==null||v===""?"":typeof v=="number"?`${v}px`:String(v)}function h(v){if(!v||v<=0)return"none";const s=4*v;return`0 ${Math.round(s/2)}px ${s}px rgba(0,0,0,0.06), 0 ${Math.round(s/4)}px ${Math.round(s/2)}px rgba(0,0,0,0.04)`}return(v,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-card",[{"rc-card--bordered":t.bordered}]]),style:e.normalizeStyle(f.value)},[v.$slots.title||t.title||v.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-card__top",style:e.normalizeStyle({backgroundColor:t.topBgColor||"rgba(29, 133, 252, 0.05)"})},[e.createElementVNode("div",kt,[e.renderSlot(v.$slots,"title",{},()=>[e.createElementVNode("span",_t,e.toDisplayString(t.title),1)],!0)]),v.$slots.status||t.status?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(v.$slots,"status",{},()=>[e.createElementVNode("span",{class:"rc-card__status-text",style:e.normalizeStyle({color:t.statusColor||"var(--rc-primary)"})},e.toDisplayString(t.status),5)],!0)])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"rc-card__body",style:e.normalizeStyle({padding:n.value,gap:p.value})},[e.renderSlot(v.$slots,"content",{},()=>[e.renderSlot(v.$slots,"default",{},void 0,!0)],!0)],4),v.$slots.action?(e.openBlock(),e.createElementBlock("div",Ct)):e.createCommentVNode("",!0),v.$slots.action?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(v.$slots,"action",{},void 0,!0)])):e.createCommentVNode("",!0)],6))}}),be=O(wt,[["__scopeId","data-v-a7b95214"]]);be.name="rc-card";const xt="RcCard";function Ye(t){return t.component(be.name,be),t.component(xt,be),t}const Dt={key:0,class:"rc-toast__mask"},Vt={class:"rc-toast__content"},$t={key:0,class:"rc-toast__spinner"},St={key:1,class:"rc-toast__icon rc-toast__icon--success"},Et={key:2,class:"rc-toast__icon rc-toast__icon--fail"},Nt={class:"rc-toast__text"},Mt=e.defineComponent({__name:"index",props:{message:{default:""},type:{default:"text"},duration:{default:2e3},mask:{type:Boolean,default:!1},onAfterLeave:{}},setup(t,{expose:c}){const f=t,n=e.ref(!0);let p;function g(){p&&(clearTimeout(p),p=null)}function h(){g(),n.value=!1}return c({close:h}),e.onMounted(()=>{f.duration&&f.duration>0&&(p=setTimeout(()=>{h()},f.duration))}),e.onUnmounted(()=>{g()}),(v,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-toast-fade",onAfterLeave:t.onAfterLeave},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-toast",[`rc-toast--${t.type}`]])},[t.mask?(e.openBlock(),e.createElementBlock("div",Dt)):e.createCommentVNode("",!0),e.createElementVNode("div",Vt,[t.type==="loading"?(e.openBlock(),e.createElementBlock("div",$t)):t.type==="success"?(e.openBlock(),e.createElementBlock("div",St)):t.type==="fail"?(e.openBlock(),e.createElementBlock("div",Et)):e.createCommentVNode("",!0),e.createElementVNode("div",Nt,e.toDisplayString(t.message),1)])],2)):e.createCommentVNode("",!0)]),_:1},8,["onAfterLeave"])])),e.renderSlot(v.$slots,"default",{},void 0,!0)],64))}}),Ce=O(Mt,[["__scopeId","data-v-d234c9c5"]]);let fe=null,pe=null;function Ze(){fe&&(fe.unmount(),fe=null),pe&&(document.body.removeChild(pe),pe=null)}function It(t){const c=typeof t=="string"?{message:t}:t||{};Ze(),pe=document.createElement("div"),document.body.appendChild(pe);const f={message:c.message,type:c.type??"text",duration:c.duration??2e3,mask:c.mask??!1,onAfterLeave:()=>{var n;Ze(),(n=c.onClose)==null||n.call(c)}};return fe=e.createApp(Ce,f),fe.mount(pe),{close:ot}}function ot(){var t,c,f;fe&&((f=(c=(t=fe._instance)==null?void 0:t.exposed)==null?void 0:c.close)==null||f.call(c))}Ce.name="rc-toast";function et(t){return t.component(Ce.name,Ce),t}const Rt={class:"rc-message",role:"alert","aria-live":"polite"},Tt={class:"rc-message__content"},zt=e.defineComponent({__name:"index",setup(t,{expose:c}){const f=e.reactive([]);let n=1;function p(h){const v=f.findIndex(s=>s.id===h);v>=0&&f.splice(v,1)}function g(h,v,s){const m=n++;return f.push({id:m,type:h,content:v,duration:s}),s>0&&window.setTimeout(()=>p(m),s),m}return c({add:g,remove:p}),(h,v)=>(e.openBlock(),e.createElementBlock("div",Rt,[e.createVNode(e.TransitionGroup,{name:"rc-message-fade",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass(["rc-message__item",`rc-message--${s.type}`])},[e.createElementVNode("span",Tt,e.toDisplayString(s.content),1)],2))),128))]),_:1})]))}}),Ft=O(zt,[["__scopeId","data-v-87811df0"]]);let de=null,ue=null;function Lt(){var c;if(de&&ue)return;de=document.createElement("div"),document.body.appendChild(de);const t=e.createVNode(Ft,{});e.render(t,de),ue=(c=t.component)==null?void 0:c.exposed}function me(t,c,f){var p;Lt();const n=typeof f=="number"?f:t==="loading"?0:2e3;return(p=ue==null?void 0:ue.add)==null?void 0:p.call(ue,t,c,n)}const lt={open(t){return me(t.type||"info",t.content,t.duration)},info(t,c){return me("info",t,c)},success(t,c){return me("success",t,c)},warning(t,c){return me("warning",t,c)},error(t,c){return me("error",t,c)},loading(t,c){return me("loading",t,c)},destroy(){de&&(e.render(null,de),de.remove(),de=null,ue=null)}};function Pe(t){return t.config.globalProperties.$message=lt,t}W.name="rc-icon";function We(t){return t.component(W.name,W),t.component("RcIcon",W),t}const At={class:"rc-popup__content"},Yt=e.defineComponent({name:"rc-popup",__name:"index",props:{modelValue:{type:Boolean,default:!1},position:{default:"center"},overlay:{type:Boolean,default:!0},overlayClass:{default:""},overlayStyle:{default:void 0},closeable:{type:Boolean,default:!1},closeIconPosition:{default:"top-right"},closeIcon:{default:"icon_close"},round:{type:Boolean,default:!1},popupStyle:{default:void 0},closeOnClickOverlay:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0}},emits:["update:modelValue","open","close","click-overlay"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(n.modelValue);e.watch(()=>n.modelValue,u=>{h.value=u,u?(p("open"),n.lockScroll&&$()):(p("close"),n.lockScroll&&C())},{immediate:!0}),e.watch(h,u=>{u!==n.modelValue&&p("update:modelValue",u)});const v=e.computed(()=>`rc-popup-slide-${n.position}`),s=e.computed(()=>({...n.popupStyle||{}}));let m=!1;function $(){m||(m=!0,document.body.style.overflow="hidden")}function C(){m&&(m=!1,document.body.style.overflow="")}function k(){p("click-overlay"),n.closeOnClickOverlay&&N()}function D(){N()}function N(){h.value=!1}function B(){h.value=!0}return e.onUnmounted(()=>{C()}),c({open:B,close:N,visible:h}),(u,G)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"rc-popup-fade"},{default:e.withCtx(()=>[h.value&&n.overlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__overlay",{"rc-popup__overlay--transparent":n.overlayClass==="transparent"}]),style:e.normalizeStyle(n.overlayStyle),onClick:k},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:v.value},{default:e.withCtx(()=>[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popupRef",ref:g,class:e.normalizeClass(["rc-popup",[`rc-popup--${t.position}`,{"rc-popup--round":t.round}]]),style:e.normalizeStyle(s.value),onClick:G[0]||(G[0]=e.withModifiers(()=>{},["stop"]))},[t.closeable?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rc-popup__close",`rc-popup__close--${t.closeIconPosition}`]),onClick:D},[e.createVNode(W,{name:t.closeIcon,class:"rc-popup__close-icon"},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",At,[e.renderSlot(u.$slots,"default",{},void 0,!0)])],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])]))}}),ye=O(Yt,[["__scopeId","data-v-f1696784"]]);ye.name="rc-popup";const Pt="RcPopup";function Oe(t){return t.component(ye.name,ye),t.component(Pt,ye),t}const Wt={key:0,class:"rc-calendar__header"},Ot={class:"rc-calendar__header-title"},Ht={key:1,class:"rc-calendar__shortcuts"},Ut={class:"rc-calendar__shortcuts-scroll"},jt=["onClick"],Kt={class:"rc-calendar__month-title"},Gt={class:"rc-calendar__weekdays"},qt={class:"rc-calendar__days"},Jt=["onClick"],Qt={class:"rc-calendar__day-content"},Xt={class:"rc-calendar__day-text"},Zt={key:0,class:"rc-calendar__day-bottom"},en={key:2,class:"rc-calendar__footer"},tn={key:0,class:"rc-calendar__month-picker-overlay"},nn={class:"rc-calendar__month-picker"},an={class:"rc-calendar__month-picker-header"},on={class:"rc-calendar__month-picker-title"},ln={key:0},rn={key:0,class:"rc-calendar__year-picker-content"},cn={class:"rc-calendar__year-picker-grid"},sn=["onClick"],un={key:1,class:"rc-calendar__month-picker-content"},dn=["onClick"],Me=48,K=3,Fe=7,fn=e.defineComponent({__name:"panel-content",props:{showTitle:{type:Boolean},title:{},range:{type:Boolean},selectedDate:{},rangeStart:{},rangeEnd:{},minDate:{},maxDate:{},disabledDate:{type:Function},formatter:{type:Function},showFooter:{type:Boolean},maxRangeDays:{}},emits:["select-day","clear","confirm","shortcut-select"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=["日","一","二","三","四","五","六"];function h(o){if(!o)return null;const i=new Date(o);return isNaN(i.getTime())?null:i}function v(o){const i=o.getFullYear(),y=String(o.getMonth()+1).padStart(2,"0"),E=String(o.getDate()).padStart(2,"0");return`${i}-${y}-${E}`}const s=e.ref(new Date);e.watch(()=>[n.selectedDate,n.rangeStart],()=>{if(n.range&&n.rangeStart){const o=h(n.rangeStart);o&&(s.value=o)}else if(!n.range&&n.selectedDate){const o=h(n.selectedDate);o&&(s.value=o)}},{immediate:!0});function m(o){const i=new Date;return o.getFullYear()===i.getFullYear()&&o.getMonth()===i.getMonth()&&o.getDate()===i.getDate()}function $(o){if(!n.rangeStart||!n.rangeEnd)return!1;const i=v(o),y=n.rangeStart,E=n.rangeEnd;return i>y&&i<E}function C(o){if(n.disabledDate&&n.disabledDate(o))return!0;const i=v(o);return!!(n.minDate&&i<n.minDate||n.maxDate&&i>n.maxDate)}function k(o,i){const y=new Date(o,i,1),E=new Date(o,i+1,0),R=y.getDay(),te=E.getDate(),ne=[],Qe=new Date(o,i,0).getDate();for(let H=R-1;H>=0;H--){const U={date:new Date(o,i-1,Qe-H),type:"prev-month",text:String(Qe-H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}for(let H=1;H<=te;H++){const U={date:new Date(o,i,H),type:"current-month",text:String(H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}const rt=42-ne.length;for(let H=1;H<=rt;H++){const U={date:new Date(o,i+1,H),type:"next-month",text:String(H)};if(n.formatter){const j=n.formatter(U);j.text&&(U.text=j.text),j.bottomInfo&&(U.bottomInfo=j.bottomInfo)}ne.push(U)}return ne}const D=e.computed(()=>{const o=s.value.getFullYear(),i=s.value.getMonth();return k(o,i)}),N=e.computed(()=>{const o=s.value.getFullYear(),i=s.value.getMonth()+1;return`${o}年${i}月`});function B(o){const i=[];if(o.type!=="current-month"&&i.push("is-other-month"),m(o.date)&&i.push("is-today"),C(o.date))return i.push("is-disabled"),i;const y=v(o.date);return n.range?(n.rangeStart===y&&i.push("is-start"),n.rangeEnd===y&&i.push("is-end"),$(o.date)&&i.push("is-in-range")):n.selectedDate===y&&i.push("is-selected"),i}const u=e.computed(()=>!!(n.rangeStart&&n.rangeEnd)),G=e.computed(()=>n.rangeStart&&n.rangeEnd?2:n.rangeStart||n.rangeEnd?1:0);function Z(o){if(!n.minDate&&!n.maxDate)return!1;const i=n.minDate?h(n.minDate):null,y=n.maxDate?h(n.maxDate):null;return!!(i&&o<i.getFullYear()||y&&o>y.getFullYear())}function ee(o,i){const y=n.minDate?h(n.minDate):null,E=n.maxDate?h(n.maxDate):null;if(y){const R=y.getFullYear(),te=y.getMonth()+1;if(o<R||o===R&&i<te)return!0}if(E){const R=E.getFullYear(),te=E.getMonth()+1;if(o>R||o===R&&i>te)return!0}return!1}const F=e.ref(!1),T=e.ref("year"),L=e.ref(s.value.getFullYear()),M=e.ref(s.value.getMonth()+1),z=e.ref(),w=e.ref(1900),V=e.ref(1920),x=e.ref(1900),I=e.ref(2100),q=e.computed(()=>{const o=[],y=Math.floor((w.value-x.value)/K)-3,E=Math.ceil((V.value-x.value)/K)+3,R=x.value+Math.max(0,y)*K,te=x.value+E*K-1;for(let ne=R;ne<=te;ne++)o.push(ne);return o});e.watch(()=>s.value,o=>{L.value=o.getFullYear(),M.value=o.getMonth()+1},{immediate:!0});function oe(){if(!z.value)return;const o=z.value.scrollTop,y=Math.max(0,Math.floor(o/Me)),E=x.value+y*K,R=E+Fe*K-1;E<x.value?x.value=E-100:R>I.value&&(I.value=R+100),(E!==w.value||R!==V.value)&&(w.value=E,V.value=R)}function le(){L.value=s.value.getFullYear(),M.value=s.value.getMonth()+1,T.value="year",F.value=!0;const o=L.value;o<x.value?x.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99),e.nextTick(()=>{if(z.value){const i=Math.floor((o-x.value)/K),y=Math.max(0,i-2);w.value=x.value+y*K,V.value=w.value+Fe*K-1,se(o)}})}function se(o){if(!z.value)return;o<x.value?x.value=Math.floor(o/100)*100:o>I.value&&(I.value=Math.ceil(o/100)*100+99);const i=Math.floor((o-x.value)/K),y=i*Me;z.value.scrollTop=y;const E=Math.max(0,i-2);w.value=x.value+E*K,V.value=w.value+Fe*K-1}function _(){const o=new Date(s.value);o.setMonth(o.getMonth()-1),s.value=o}function r(){const o=new Date(s.value);o.setMonth(o.getMonth()+1),s.value=o}function S(o){Z(o)||(L.value=o,T.value="month")}function Y(o){ee(L.value,o)||(M.value=o,J())}function J(){const o=new Date(s.value);o.setFullYear(L.value),o.setMonth(M.value-1),s.value=o,F.value=!1,T.value="year"}function Q(o){p("select-day",o)}function re(){p("clear")}function a(){X.value&&re()}function l(){p("confirm")}function d(){F.value=!1}function b(o){T.value=o}function P(){const i=new Date().getFullYear();Z(i)||(L.value=i,T.value="month")}function A(){const i=new Date().getMonth()+1;ee(L.value,i)||(M.value=i,J())}const X=e.computed(()=>n.range?!!(n.rangeStart||n.rangeEnd):!!n.selectedDate);function ie(o,i){const y=h(o),E=h(i);if(!y||!E)return 0;const R=Math.abs(E.getTime()-y.getTime());return Math.ceil(R/(1e3*60*60*24))+1}function ce(){return v(new Date)}function ge(){const o=new Date,i=o.getDay(),y=o.getDate()-i+(i===0?-6:1);return new Date(o.getFullYear(),o.getMonth(),y)}function we(){const o=ge(),i=new Date(o);return i.setDate(o.getDate()+6),i}function xe(){const o=new Date;return new Date(o.getFullYear(),o.getMonth(),1)}function ke(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()+1,0)}function De(){const o=new Date;return new Date(o.getFullYear(),o.getMonth()-2,1)}function Ve(){const o=new Date;return new Date(o.getFullYear(),0,1)}function $e(){const o=new Date;return new Date(o.getFullYear(),11,31)}const Se=[{key:"today",label:"本日",days:1,getRange:()=>{const o=ce();return[o,o]}},{key:"week",label:"本周",days:7,getRange:()=>{const o=v(ge()),i=v(we());return[o,i]}},{key:"month",label:"本月",getRange:()=>{const o=v(xe()),i=v(ke());return[o,i]}},{key:"threeMonths",label:"近三月",getRange:()=>{const o=v(De()),i=v(ke());return[o,i]}},{key:"year",label:"本年",getRange:()=>{const o=v(Ve()),i=v($e());return[o,i]}},{key:"last7Days",label:"近7天",days:7,getRange:()=>{const o=new Date,i=new Date(o);return i.setDate(o.getDate()-6),[v(i),ce()]}},{key:"last30Days",label:"近30天",days:30,getRange:()=>{const o=new Date,i=new Date(o);return i.setDate(o.getDate()-29),[v(i),ce()]}}],Ee=e.computed(()=>Se.filter(o=>{if(n.maxRangeDays!==void 0){if(o.days!==void 0)return o.days<=n.maxRangeDays;{const i=o.getRange();if(i)return ie(i[0],i[1])<=n.maxRangeDays}}return!0}));function Ne(o){const i=o.getRange();if(i){if(n.minDate&&i[0]<n.minDate||n.maxDate&&i[1]>n.maxDate)return;p("shortcut-select",i)}}return c({yearScrollRef:z}),(o,i)=>(e.openBlock(),e.createElementBlock("div",null,[t.showTitle?(e.openBlock(),e.createElementBlock("div",Wt,[e.createElementVNode("div",Ot,e.toDisplayString(t.title),1),e.createElementVNode("span",{class:e.normalizeClass(["rc-calendar__header-clear",{"is-disabled":!X.value}]),onClick:a}," 清空 ",2)])):e.createCommentVNode("",!0),t.range?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.key,class:"rc-calendar__shortcut-item",onClick:E=>Ne(y)},e.toDisplayString(y.label),9,jt))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",Kt,[e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:_},[e.createVNode(e.unref(W),{name:"icon_caret-left",class:"rc-calendar__nav-icon"})]),e.createElementVNode("div",{class:"rc-calendar__month-text",onClick:le},e.toDisplayString(N.value),1),e.createElementVNode("div",{class:"rc-calendar__nav-button",onClick:r},[e.createVNode(e.unref(W),{name:"icon_caret-right",class:"rc-calendar__nav-icon"})])]),e.createElementVNode("div",Gt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(g,y=>e.createElementVNode("div",{key:y,class:"rc-calendar__weekday"},e.toDisplayString(y),1)),64))]),e.createElementVNode("div",qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-calendar__day",B(y)]),onClick:R=>Q(y)},[e.createElementVNode("div",Qt,[e.createElementVNode("span",Xt,e.toDisplayString(y.text),1),y.bottomInfo?(e.openBlock(),e.createElementBlock("span",Zt,e.toDisplayString(y.bottomInfo),1)):e.createCommentVNode("",!0)])],10,Jt))),128))]),t.range&&t.showFooter?(e.openBlock(),e.createElementBlock("div",en,[e.createVNode(e.unref(ae),{type:"default",class:"rc-calendar__footer-reset",onClick:re},{default:e.withCtx(()=>[...i[2]||(i[2]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(e.unref(ae),{type:"primary",class:"rc-calendar__footer-confirm",disabled:!u.value,onClick:l},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value?`确定(${G.value}项)`:"确定"),1)]),_:1},8,["disabled"])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"rc-calendar-fade"},{default:e.withCtx(()=>[F.value?(e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",nn,[e.createElementVNode("div",an,[e.createVNode(e.unref(ae),{type:"default",mode:"text",size:"small",onClick:d},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("取消",-1)])]),_:1}),e.createElementVNode("div",on,[e.createElementVNode("span",{onClick:i[0]||(i[0]=y=>b("year"))},e.toDisplayString(L.value)+"年",1),T.value==="month"?(e.openBlock(),e.createElementBlock("span",ln," - ")):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createElementBlock("span",{key:1,onClick:i[1]||(i[1]=y=>b("month"))},e.toDisplayString(M.value)+"月",1)):e.createCommentVNode("",!0)]),T.value==="year"?(e.openBlock(),e.createBlock(e.unref(ae),{key:0,type:"primary",mode:"text",size:"small",onClick:P},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode(" 本年 ",-1)])]),_:1})):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createBlock(e.unref(ae),{key:1,type:"primary",mode:"text",size:"small",onClick:A},{default:e.withCtx(()=>[...i[5]||(i[5]=[e.createTextVNode(" 本月 ",-1)])]),_:1})):e.createCommentVNode("",!0)]),T.value==="year"?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("div",{class:"rc-calendar__year-picker-scroll",ref_key:"yearScrollRef",ref:z,onScroll:oe},[e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.floor((w.value-x.value)/K)*Me}px`})},null,4),e.createElementVNode("div",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y,class:e.normalizeClass(["rc-calendar__year-picker-item",{"is-selected":L.value===y,"is-disabled":Z(y)}]),onClick:E=>S(y)},e.toDisplayString(y),11,sn))),128))]),e.createElementVNode("div",{class:"rc-calendar__year-picker-spacer",style:e.normalizeStyle({height:`${Math.ceil((I.value-V.value)/K)*Me}px`})},null,4)],544)])):e.createCommentVNode("",!0),T.value==="month"?(e.openBlock(),e.createElementBlock("div",un,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(12,y=>e.createElementVNode("div",{key:y,class:e.normalizeClass(["rc-calendar__month-picker-item",{"is-selected":M.value===y,"is-disabled":ee(L.value,y)}]),onClick:E=>Y(y)},e.toDisplayString(y)+"月 ",11,dn)),64))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),_:1})]))}}),tt=O(fn,[["__scopeId","data-v-0bf1834b"]]),mn={class:"rc-calendar"},vn=["placeholder"],pn={class:"rc-calendar__input-actions"},yn={key:1,class:"rc-calendar__panel"},hn=e.defineComponent({name:"rc-calendar",__name:"index",props:{modelValue:{default:null},range:{type:[Boolean,Number],default:!1},mode:{default:"default"},placeholder:{default:"请选择日期"},showTitle:{type:Boolean,default:!0},title:{default:"选择日期"},minDate:{default:void 0},maxDate:{default:void 0},disabledDate:{type:Function,default:void 0},formatter:{type:Function,default:void 0},showFooter:{type:Boolean,default:!0},endDateOffset:{type:Boolean,default:!1}},emits:["update:modelValue","change","confirm"],setup(t,{emit:c}){const f=t,n=c,p=e.ref(),g=e.ref(),h=e.ref(!1),v=e.ref(""),s=e.computed(()=>f.range===!0||typeof f.range=="number"),m=e.computed(()=>typeof f.range=="number"?f.range:void 0),$=e.computed(()=>_=>{if(f.disabledDate&&f.disabledDate(_))return!0;if(m.value!==void 0&&k.value&&!D.value){const r=u(_);if(B(k.value)&&G(k.value,r)>m.value)return!0}return!1}),C=e.ref(null),k=e.ref(null),D=e.ref(null);e.watch(()=>f.modelValue,_=>{s.value?Array.isArray(_)&&_.length===2?(k.value=_[0],D.value=T(_[1])):(k.value=null,D.value=null):C.value=typeof _=="string"?_:null,N()},{immediate:!0});function N(){f.mode==="popup"&&(s.value?k.value&&D.value?v.value=`${k.value} ~ ${D.value}`:k.value?v.value=`${k.value} ~ `:v.value="":v.value=C.value||"")}function B(_){if(!_)return null;const r=new Date(_);return isNaN(r.getTime())?null:r}function u(_){const r=_.getFullYear(),S=String(_.getMonth()+1).padStart(2,"0"),Y=String(_.getDate()).padStart(2,"0");return`${r}-${S}-${Y}`}function G(_,r){const S=B(_),Y=B(r);if(!S||!Y)return 0;const J=Math.abs(Y.getTime()-S.getTime());return Math.ceil(J/(1e3*60*60*24))}function Z(_){const r=B(_);return r?(r.setDate(r.getDate()+1),u(r)):_}function ee(_){const r=B(_);return r?(r.setDate(r.getDate()-1),u(r)):_}function F(_){return f.endDateOffset&&s.value?Z(_):_}function T(_){return f.endDateOffset&&s.value?ee(_):_}function L(_){if(_.type!=="current-month"||f.disabledDate&&f.disabledDate(_.date))return;const r=u(_.date);if(!(f.minDate&&r<f.minDate)&&!(f.maxDate&&r>f.maxDate)){if(s.value)if(!k.value||k.value&&D.value)k.value=r,D.value=null;else{let S=k.value,Y=r;if(r<k.value&&(Y=k.value,S=r),k.value=S,D.value=Y,k.value&&D.value){const J=F(D.value),Q=[k.value,J];n("update:modelValue",Q),n("change",Q),f.showFooter||M()}}else{C.value=r;const S=r;n("update:modelValue",S),n("change",S),f.mode&&x()}N()}}function M(){if(k.value&&D.value){const _=F(D.value),r=[k.value,_];n("update:modelValue",r),n("change",r),n("confirm",r),x()}}function z(){s.value?(k.value=null,D.value=null):C.value=null;const _=null;n("update:modelValue",_),n("change",_),N()}function w(_){k.value=_[0],D.value=_[1];const r=F(_[1]),S=[_[0],r];n("update:modelValue",S),n("change",S),f.showFooter?N():M()}function V(){h.value=!0}function x(){h.value=!1}function I(_){h.value=_}function q(){V()}function oe(){f.mode==="popup"&&se()}function le(){h.value||V()}function se(){const _=v.value.trim();if(s.value){const r=_.split("~").map(S=>S.trim());if(r.length===2&&r[0]&&r[1]){const S=B(r[0]),Y=B(r[1]);if(S&&Y&&!isNaN(S.getTime())&&!isNaN(Y.getTime())){k.value=u(S);const J=u(Y);D.value=T(J);const Q=F(D.value),re=[k.value,Q];n("update:modelValue",re),n("change",re);return}}}else{const r=B(_);if(r&&!isNaN(r.getTime())){C.value=u(r),n("update:modelValue",C.value),n("change",C.value);return}}N()}return(_,r)=>(e.openBlock(),e.createElementBlock("div",mn,[t.mode==="popup"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"rc-calendar__input",onClick:V},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":r[0]||(r[0]=S=>v.value=S),type:"text",class:"rc-calendar__input-field",placeholder:t.placeholder,readonly:"",onFocus:q,onBlur:oe,onInput:le},null,40,vn),[[e.vModelText,v.value]]),e.createElementVNode("div",pn,[e.createVNode(e.unref(W),{name:"icon_a-rili",class:"rc-calendar__input-icon"})])])):e.createCommentVNode("",!0),t.mode==="default"?(e.openBlock(),e.createElementBlock("div",yn,[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:s.value,"selected-date":C.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":$.value,formatter:t.formatter,"show-footer":!1,"max-range-days":m.value,onSelectDay:L,onClear:z,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","max-range-days"])])):e.createCommentVNode("",!0),t.mode==="popup"?(e.openBlock(),e.createBlock(e.unref(ye),{key:2,modelValue:h.value,"onUpdate:modelValue":[r[1]||(r[1]=S=>h.value=S),I],position:"bottom",overlay:!0,round:!0,"close-on-click-overlay":!0,"lock-scroll":!0},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"popupPanelRef",ref:g,class:"rc-calendar__panel"},[e.createVNode(tt,{"show-title":t.showTitle,title:t.title,range:s.value,"selected-date":C.value,"range-start":k.value,"range-end":D.value,"min-date":t.minDate,"max-date":t.maxDate,"disabled-date":$.value,formatter:t.formatter,"show-footer":t.showFooter,"max-range-days":m.value,onSelectDay:L,onClear:z,onConfirm:M,onShortcutSelect:w},null,8,["show-title","title","range","selected-date","range-start","range-end","min-date","max-date","disabled-date","formatter","show-footer","max-range-days"])],512)]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]))}}),he=O(hn,[["__scopeId","data-v-96b29c22"]]);he.name="rc-calendar";const gn="RcCalendar";function He(t){return t.component(he.name,he),t.component(gn,he),t}const kn={class:"rc-search-area"},_n={class:"rc-search-area__bar"},bn=["onClick"],Cn={class:"rc-search-area__item-label"},Bn={class:"rc-search-area__panel-content"},wn={key:1,class:"rc-search-area__input-wrapper"},xn=["placeholder"],Dn={key:2,class:"rc-search-area__calendar-wrapper"},Vn={key:3,class:"rc-search-area__tree-container"},$n={class:"rc-search-area__tree-group-title"},Sn={class:"rc-search-area__tree-group-options"},En=["onClick"],Nn={class:"rc-search-area__option-label"},Mn={key:4,class:"rc-search-area__tree-container"},In={class:"rc-search-area__tree-group-title"},Rn={class:"rc-search-area__tree-group-options"},Tn=["onClick"],zn={class:"rc-search-area__option-label"},Fn={key:5,class:"rc-search-area__options-grid"},Ln=["onClick"],An={class:"rc-search-area__option-label"},Yn={key:6,class:"rc-search-area__options-grid"},Pn=["onClick"],Wn={class:"rc-search-area__option-label"},On={key:7,class:"rc-search-area__empty"},Hn={key:0,class:"rc-search-area__panel-footer"},Un=e.defineComponent({name:"rc-search-area",__name:"index",props:{items:{default:()=>[]},modelValue:{default:()=>({})},showMask:{type:Boolean,default:!0},autoConfirm:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(null),h=e.ref(null),v=e.ref(null),s=e.ref({top:"0px"}),m=async()=>{if(g.value===null||!h.value)return;await e.nextTick();const l=h.value.getBoundingClientRect().top;s.value={top:`${l}px`}},$=a=>{if(g.value===null||!h.value)return;const l=a.target;if(h.value.contains(l))return;const d=h.value.closest(".rc-search-area");if(d){const b=d.querySelector(".rc-search-area__bar");if(b&&b.contains(l))return}F()};e.watch(g,async a=>{a!==null?(await e.nextTick(),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("click",$,!0)):(window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("click",$,!0))}),e.onUnmounted(()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("click",$,!0)});const C=e.ref({}),k=e.ref(""),D=e.ref(null),N=e.ref({}),B=e.ref({...n.modelValue});e.watch(()=>n.modelValue,a=>{B.value={...a||{}}},{deep:!0,immediate:!0});const u=e.computed(()=>g.value===null?null:n.items[g.value]),G=e.computed(()=>{if(!u.value)return"";const a=re(u.value);return a>0?`(${a}项)`:""}),Z=a=>{const l=B.value[a.key];if(l==null||l===""||a.slot)return a.label;if(a.type==="input"){if(l&&String(l).trim())return`${a.label}: ${l}`}else if(a.type==="calendar"){if(l){if(Array.isArray(l)&&l.length===2)return`${a.label}: ${l[0]} ~ ${l[1]}`;if(typeof l=="string")return`${a.label}: ${l}`}}else if(a.type==="single"||a.type==="tree-single"){const d=z(a,l);if(d)return`${a.label}: ${M(d,a)}`}else{const d=Array.isArray(l)?l:[l];if(d.length>0){const b=d.map(P=>{const A=z(a,P);return A?M(A,a):null}).filter(P=>P!==null);if(b.length>0)return`${a.label}: ${b.join("、")}`}}return a.label},ee=a=>{const l=n.items[a];if(!l)return;if(g.value===a){g.value=null;return}const d=B.value[l.key];l.slot?d!=null?Array.isArray(d)?N.value[l.key]=[...d]:typeof d=="object"?N.value[l.key]={...d}:N.value[l.key]=d:N.value[l.key]=void 0:l.type==="input"?k.value=d!=null?String(d):"":l.type==="calendar"?D.value=d??null:l.type==="single"||l.type==="tree-single"?C.value[l.key]=d!==void 0?d:null:C.value[l.key]=d!==void 0?Array.isArray(d)?[...d]:[d]:[],g.value=a},F=()=>{g.value=null},T=(a,l)=>{if(!l)return typeof a=="string"?a:a.label||String(a.value);const d=a;if(l.renderItem){if(typeof l.renderItem=="string")return String(typeof d=="object"&&d!==null?d[l.renderItem]??"":d);{const b=l.renderItem(d);return b!=null?String(b):""}}return typeof a=="string"?a:a.label||String(a.value)},L=(a,l)=>{if(!l)return typeof a=="string"?a:a.value!==void 0?a.value:a;const d=a;return l.format?typeof l.format=="string"?typeof d=="object"&&d!==null?d[l.format]:d:l.format(d):typeof a=="string"?a:a.value!==void 0?a.value:a},M=(a,l)=>{const d=a,b=l.renderResult||l.renderItem;if(b){if(typeof b=="string")return String(typeof d=="object"&&d!==null?d[b]??"":d);{const P=b(d);return P!=null?String(P):""}}return T(a,l)},z=(a,l,d)=>{const b=d||a.options;if(!b)return null;const P=a.childrenKey||"children";for(const A of b){const X=L(A,a);if(X===l||String(X)===String(l))return A;if(typeof A=="object"&&A!==null){const ie=A[P];if(Array.isArray(ie)&&ie.length>0){const ce=z(a,l,ie);if(ce)return ce}}}return null},w=(a,l)=>{const d=l||a.options;if(!d)return[];const b=a.childrenKey||"children",P=[];for(const A of d)if(P.push(A),typeof A=="object"&&A!==null){const X=A[b];Array.isArray(X)&&X.length>0&&P.push(...w(a,X))}return P},V=a=>{if(!u.value)return!1;const l=u.value.key,d=C.value[l],b=L(a,u.value);return u.value.type==="single"||u.value.type==="tree-single"?d!=null&&d===b:(Array.isArray(d)?d:[]).some(A=>A===b||String(A)===String(b))},x=a=>a?a.childrenKey?w(a):a.options||[]:[],I=a=>{if(!a)return[];const l=a.childrenKey||"children";return(a.options||[]).filter(d=>{if(typeof d=="string")return!1;const b=d[l];return Array.isArray(b)&&b.length>0})},q=(a,l)=>{if(!l||typeof a=="string")return[];const d=l.childrenKey||"children",b=a[d];return Array.isArray(b)?b:[]},oe=a=>{if(a)return N.value[a.key]!==void 0?N.value[a.key]:B.value[a.key]},le=(a,l)=>{if(a&&(N.value[a.key]=l,n.autoConfirm)){const d=a.key;B.value[d]=l,p("update:modelValue",{...B.value}),p("change",{...B.value},a),F()}},se=a=>{if(!u.value)return;const l=u.value.key,d=L(a,u.value);B.value[l];let b;C.value[l]===d?b=void 0:b=d,B.value[l]=b,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()},_=a=>{if(!u.value)return;const l=u.value.key,d=L(a,u.value),b=Array.isArray(C.value[l])?[...C.value[l]]:[],P=b.findIndex(A=>A===d||String(A)===String(d));if(P>=0?b.splice(P,1):b.push(d),C.value[l]=b,n.autoConfirm){const A=b.length>0?b:void 0;B.value[l]=A,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},r=()=>{if(!u.value)return;const a=u.value.key;u.value.slot?N.value[a]=void 0:u.value.type==="input"?k.value="":u.value.type==="calendar"?D.value=null:u.value.type==="single"||u.value.type==="tree-single"?C.value[a]=null:C.value[a]=[]},S=()=>{if(n.autoConfirm&&u.value){const a=u.value.key,l=k.value.trim()||void 0;B.value[a]=l,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},Y=a=>{if(D.value=a,n.autoConfirm&&u.value){const l=u.value.key,d=a??void 0;B.value[l]=d,p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()}},J=()=>{if(!u.value)return;const a=u.value.key;B.value[a];let l;if(u.value.slot)l=N.value[a],B.value[a]=l;else if(u.value.type==="input")l=k.value.trim()||void 0,B.value[a]=l;else if(u.value.type==="calendar")l=D.value!==null&&D.value!==void 0?D.value:void 0,B.value[a]=l;else if(u.value.type==="single"||u.value.type==="tree-single"){const d=C.value[a];l=d??void 0,B.value[a]=l}else{const d=C.value[a];l=Array.isArray(d)&&d.length>0?d:void 0,B.value[a]=l}p("update:modelValue",{...B.value}),p("change",{...B.value},u.value),F()},Q=a=>{const l=B.value[a.key];return l==null||l===""?0:a.slot?1:a.type==="input"?String(l).trim()?1:0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:l?1:0},re=a=>{if(a.slot){const d=N.value[a.key];return d!=null&&d!==""?1:0}else{if(a.type==="input")return k.value.trim()?1:0;if(a.type==="calendar")return D.value!==null&&D.value!==void 0?1:0}const l=C.value[a.key];return l==null||l===""?0:a.type==="single"||a.type==="tree-single"?1:Array.isArray(l)?l.length:0};return c({getValues:()=>({...B.value}),reset:()=>{B.value={},C.value={},N.value={},p("update:modelValue",{})}}),(a,l)=>(e.openBlock(),e.createElementBlock("div",kn,[e.createElementVNode("div",_n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,(d,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:e.normalizeClass(["rc-search-area__item",{"is-active":g.value===b,"has-value":Q(d)>0}]),onClick:P=>ee(b)},[e.createElementVNode("span",Cn,e.toDisplayString(Z(d)),1),e.createVNode(e.unref(W),{name:"icon_a-xiala2",color:g.value!==b&&Q(d)>0?"#1677ff":"#969799",class:e.normalizeClass(["rc-search-area__item-arrow",{"is-up":g.value===b}])},null,8,["color","class"])],10,bn))),128))]),e.createVNode(e.Transition,{name:"rc-search-area-fade"},{default:e.withCtx(()=>[g.value!==null&&n.showMask?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"maskRef",ref:v,class:"rc-search-area__mask",style:e.normalizeStyle(s.value),onClick:F},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"rc-search-area-slide"},{default:e.withCtx(()=>{var d,b,P,A,X,ie,ce,ge,we,xe,ke,De,Ve,$e,Se,Ee,Ne,o,i;return[g.value!==null?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:h,class:"rc-search-area__panel"},[e.createElementVNode("div",Bn,[(d=u.value)!=null&&d.slot&&a.$slots[u.value.key]?e.renderSlot(a.$slots,u.value.key,{key:0,value:oe(u.value),"update:value":y=>le(u.value,y)},void 0,!0):((b=u.value)==null?void 0:b.type)==="input"?(e.openBlock(),e.createElementBlock("div",wn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=y=>k.value=y),type:"text",class:"rc-search-area__input",placeholder:u.value.placeholder||"请输入",onInput:S},null,40,xn),[[e.vModelText,k.value]])])):((P=u.value)==null?void 0:P.type)==="calendar"?(e.openBlock(),e.createElementBlock("div",Dn,[e.createVNode(e.unref(he),{modelValue:D.value,"onUpdate:modelValue":l[1]||(l[1]=y=>D.value=y),range:((A=u.value.calendarConfig)==null?void 0:A.range)||!1,mode:"default","min-date":(X=u.value.calendarConfig)==null?void 0:X.minDate,"max-date":(ie=u.value.calendarConfig)==null?void 0:ie.maxDate,"disabled-date":(ce=u.value.calendarConfig)==null?void 0:ce.disabledDate,formatter:(ge=u.value.calendarConfig)==null?void 0:ge.formatter,"end-date-offset":((we=u.value.calendarConfig)==null?void 0:we.endDateOffset)||!1,onChange:Y},null,8,["modelValue","range","min-date","max-date","disabled-date","formatter","end-date-offset"])])):((xe=u.value)==null?void 0:xe.type)==="tree-single"?(e.openBlock(),e.createElementBlock("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"rc-search-area__tree-group"},[e.createElementVNode("div",$n,e.toDisplayString(T(y,u.value||void 0)),1),e.createElementVNode("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q(y,u.value),(R,te)=>(e.openBlock(),e.createElementBlock("div",{key:te,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(R)}]),onClick:ne=>se(R)},[e.createElementVNode("span",Nn,e.toDisplayString(T(R,u.value||void 0)),1),V(R)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,En))),128))])]))),128))])):((ke=u.value)==null?void 0:ke.type)==="tree-multiple"?(e.openBlock(),e.createElementBlock("div",Mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:"rc-search-area__tree-group"},[e.createElementVNode("div",In,e.toDisplayString(T(y,u.value||void 0)),1),e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q(y,u.value),(R,te)=>(e.openBlock(),e.createElementBlock("div",{key:te,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(R)}]),onClick:ne=>_(R)},[e.createElementVNode("span",zn,e.toDisplayString(T(R,u.value||void 0)),1),V(R)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Tn))),128))])]))),128))])):((De=u.value)==null?void 0:De.type)==="single"?(e.openBlock(),e.createElementBlock("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(y)}]),onClick:R=>se(y)},[e.createElementVNode("span",An,e.toDisplayString(T(y,u.value||void 0)),1),V(y)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Ln))),128))])):(e.openBlock(),e.createElementBlock("div",Yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x(u.value),(y,E)=>(e.openBlock(),e.createElementBlock("div",{key:E,class:e.normalizeClass(["rc-search-area__option",{"is-selected":V(y)}]),onClick:R=>_(y)},[e.createElementVNode("span",Wn,e.toDisplayString(T(y,u.value||void 0)),1),V(y)?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:"icon_check",class:"rc-search-area__option-check"})):e.createCommentVNode("",!0)],10,Pn))),128))])),((Ve=u.value)==null?void 0:Ve.type)!=="input"&&(($e=u.value)==null?void 0:$e.type)!=="calendar"&&!((Se=u.value)!=null&&Se.slot)&&((Ne=(Ee=u.value)==null?void 0:Ee.options)==null?void 0:Ne.length)===0?(e.openBlock(),e.createElementBlock("div",On,[...l[2]||(l[2]=[e.createElementVNode("p",null,"暂无选项",-1)])])):e.createCommentVNode("",!0)]),!n.autoConfirm&&((o=u.value)==null?void 0:o.type)!=="single"&&((i=u.value)==null?void 0:i.type)!=="tree-single"?(e.openBlock(),e.createElementBlock("div",Hn,[e.createVNode(e.unref(ae),{block:"",onClick:r},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode(" 重置 ",-1)])]),_:1}),e.createVNode(e.unref(ae),{type:"primary",block:"",onClick:J},{default:e.withCtx(()=>[e.createTextVNode(" 确定"+e.toDisplayString(G.value),1)]),_:1})])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)]}),_:3})]))}}),Ue=O(Un,[["__scopeId","data-v-dd3a69e1"]]),je=t=>{t.component("RcSearchArea",Ue),t.component("rc-search-area",Ue)},jn={key:0,class:"rc-input__prepend"},Kn={class:"rc-input__wrapper"},Gn={key:0,class:"rc-input__prefix"},qn={key:1,class:"rc-input__suffix"},Jn={key:0,class:"rc-input__suffix-inner"},Qn={key:2,class:"rc-input__count"},Xn={key:1,class:"rc-input__append"},Zn=e.defineComponent({__name:"index",props:{modelValue:{default:""},type:{default:"text"},size:{default:"default"},placeholder:{default:"请输入"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxlength:{default:void 0},minlength:{default:void 0},showWordLimit:{type:Boolean,default:!1},rows:{default:2},autosize:{type:[Boolean,Object],default:!1},resize:{default:void 0},prefixIcon:{default:""},suffixIcon:{default:""},autocomplete:{default:"off"},name:{default:void 0},autofocus:{type:Boolean,default:!1},form:{default:void 0},tabindex:{default:void 0},formatter:{type:Function,default:void 0},parser:{type:Function,default:void 0}},emits:["update:modelValue","input","change","focus","blur","clear","keydown","mouseenter","mouseleave","compositionstart","compositionupdate","compositionend"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(n.modelValue??""),v=e.ref(!1),s=e.ref(!1),m=e.ref(!1);e.watch(()=>n.modelValue,r=>{h.value=r??""});const $=e.computed(()=>n.type==="password"?s.value?"text":"password":n.type),C=e.computed(()=>{const r=String(h.value??"");return n.formatter&&!m.value?n.formatter(r):r}),k=e.computed(()=>{const r=h.value;return r!==""&&r!==null&&r!==void 0}),D=e.computed(()=>String(h.value??"").length),N=e.useSlots(),B=e.computed(()=>!!(n.suffixIcon||n.showPassword&&n.type==="password"||n.clearable&&k.value&&!n.disabled&&!n.readonly||N.suffix)),u=e.computed(()=>{if(n.type!=="textarea")return{};const r={};return n.autosize?r.resize="none":n.resize!==void 0?r.resize=n.resize:r.resize="vertical",r});function G(r){let Y=r.target.value;n.parser&&!m.value&&(Y=n.parser(Y)),h.value=Y,p("update:modelValue",Y),p("input",Y),n.type==="textarea"&&n.autosize&&e.nextTick(()=>{q()})}function Z(r){v.value=!0,p("focus",r)}function ee(r){v.value=!1;const S=h.value;p("blur",r),p("change",S)}function F(){h.value="",p("update:modelValue",""),p("input",""),p("change",""),p("clear"),e.nextTick(()=>{var r;(r=g.value)==null||r.focus()})}function T(){s.value=!s.value}function L(r){p("keydown",r),r.key==="Enter"&&n.type!=="textarea"&&p("change",h.value)}function M(r){p("mouseenter",r)}function z(r){p("mouseleave",r)}function w(r){m.value=!0,p("compositionstart",r)}function V(r){p("compositionupdate",r)}function x(r){m.value=!1,p("compositionend",r),r.target&&G(r)}function I(){var r;n.disabled||n.readonly||(r=g.value)==null||r.focus()}function q(){if(n.type!=="textarea"||!g.value)return;const r=g.value;if(n.autosize){r.style.height="auto";const S=r.scrollHeight;if(typeof n.autosize=="object"){const{minRows:Y=2,maxRows:J}=n.autosize,Q=parseInt(getComputedStyle(r).lineHeight)||20,re=Y*Q,a=J?J*Q:1/0;r.style.height=`${Math.min(Math.max(S,re),a)}px`}else r.style.height=`${S}px`}}function oe(){var r;(r=g.value)==null||r.focus()}function le(){var r;(r=g.value)==null||r.blur()}function se(){g.value&&"select"in g.value&&g.value.select()}function _(){F()}return e.onMounted(()=>{n.type==="textarea"&&n.autosize&&q()}),c({focus:oe,blur:le,select:se,clear:_,resizeTextarea:q,inputRef:g}),(r,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rc-input",[`rc-input--${t.size}`,{"is-disabled":t.disabled,"is-focused":v.value,"is-readonly":t.readonly,"rc-input--textarea":t.type==="textarea","has-prepend":r.$slots.prepend,"has-append":r.$slots.append}]]),onClick:I},[r.$slots.prepend?(e.openBlock(),e.createElementBlock("div",jn,[e.renderSlot(r.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Kn,[t.prefixIcon||r.$slots.prefix?(e.openBlock(),e.createElementBlock("div",Gn,[e.renderSlot(r.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createBlock(e.unref(W),{key:0,name:t.prefixIcon,class:"rc-input__prefix-icon"},null,8,["name"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type==="textarea"?"textarea":"input"),{ref_key:"inputRef",ref:g,value:C.value,type:$.value,class:e.normalizeClass(["rc-input__field",{"rc-input__field--textarea":t.type==="textarea"}]),placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength,minlength:t.minlength,rows:t.rows,autocomplete:t.autocomplete,name:t.name,autofocus:t.autofocus,form:t.form,tabindex:t.tabindex,style:e.normalizeStyle(u.value),onInput:G,onFocus:Z,onBlur:ee,onKeydown:L,onMouseenter:M,onMouseleave:z,onCompositionstart:w,onCompositionupdate:V,onCompositionend:x},null,40,["value","type","class","placeholder","disabled","readonly","maxlength","minlength","rows","autocomplete","name","autofocus","form","tabindex","style"])),B.value?(e.openBlock(),e.createElementBlock("div",qn,[r.$slots.suffix?(e.openBlock(),e.createElementBlock("div",Jn,[e.renderSlot(r.$slots,"suffix",{},void 0,!0)])):e.createCommentVNode("",!0),t.showPassword&&t.type==="password"&&k.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rc-input__password-toggle",onClick:e.withModifiers(T,["stop"])},[e.createVNode(e.unref(W),{color:s.value?"#1677ff":"#999",name:s.value?"icon_view":"icon_view-off"},null,8,["color","name"])])):e.createCommentVNode("",!0),t.clearable&&k.value&&!t.disabled&&!t.readonly?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"rc-input__clear",onClick:e.withModifiers(F,["stop"])},[e.createVNode(e.unref(W),{name:"icon_close",class:"rc-input__clear-icon"})])):e.createCommentVNode("",!0),t.suffixIcon&&!t.clearable&&!t.showPassword?(e.openBlock(),e.createBlock(e.unref(W),{key:3,name:t.suffixIcon,class:"rc-input__suffix-icon"},null,8,["name"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.showWordLimit&&t.maxlength?(e.openBlock(),e.createElementBlock("span",Qn,e.toDisplayString(D.value)+" / "+e.toDisplayString(t.maxlength),1)):e.createCommentVNode("",!0)]),r.$slots.append?(e.openBlock(),e.createElementBlock("div",Xn,[e.renderSlot(r.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),Ie=O(Zn,[["__scopeId","data-v-7242da3b"]]);Ie.name="rc-input";function Ke(t){return t.component(Ie.name,Ie),t}const ea=e.defineComponent({name:"rc-dropdown-menu",__name:"menu",props:{visible:{type:Boolean,default:void 0},effect:{default:"light"},maxHeight:{default:""}},emits:["mouseenter","mouseleave"],setup(t,{expose:c,emit:f}){const n=t,p=e.ref(),g=e.computed(()=>n.visible===void 0?!0:n.visible),h=e.computed(()=>n.visible!==void 0),v=e.computed(()=>{const s={};return n.maxHeight&&(s.maxHeight=typeof n.maxHeight=="number"?`${n.maxHeight}px`:n.maxHeight,s.overflowY="auto"),s});return c({menuRef:p}),(s,m)=>h.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"rc-dropdown-fade"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:p,class:e.normalizeClass(["rc-dropdown-menu",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(v.value),onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"])),onMouseenter:m[1]||(m[1]=$=>s.$emit("mouseenter",$)),onMouseleave:m[2]||(m[2]=$=>s.$emit("mouseleave",$))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],38)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock("ul",{key:1,ref_key:"menuRef",ref:p,class:e.normalizeClass(["rc-dropdown-menu rc-dropdown-menu--nested",[`rc-dropdown-menu--${t.effect}`]]),style:e.normalizeStyle(v.value),onClick:m[3]||(m[3]=e.withModifiers(()=>{},["stop"])),onMouseenter:m[4]||(m[4]=$=>s.$emit("mouseenter",$)),onMouseleave:m[5]||(m[5]=$=>s.$emit("mouseleave",$))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],38))}}),Be=O(ea,[["__scopeId","data-v-288e2690"]]),ta=e.defineComponent({name:"rc-dropdown",__name:"index",props:{placement:{default:"bottom"},trigger:{default:"hover"},disabled:{type:Boolean,default:!1},effect:{default:"light"},maxHeight:{default:""},hideOnClick:{type:Boolean,default:!0},showTimeout:{default:150},hideTimeout:{default:150}},emits:["command","visible-change"],setup(t,{expose:c,emit:f}){const n=t,p=f,g=e.ref(),h=e.ref(),v=e.ref(!1);let s=null,m=null;function $(M){n.hideOnClick&&(v.value=!1),M!==void 0&&p("command",M)}e.provide("handleItemClick",$);function C(){n.disabled||(s&&(clearTimeout(s),s=null),m&&(clearTimeout(m),m=null),s=setTimeout(()=>{v.value=!0,requestAnimationFrame(()=>{e.nextTick(()=>{F()})})},n.showTimeout))}function k(){n.trigger==="hover"&&u.value||(m&&(clearTimeout(m),m=null),s&&(clearTimeout(s),s=null),m=setTimeout(()=>{v.value=!1,u.value=!1},n.hideTimeout))}function D(){n.disabled||(v.value?k():C())}function N(){n.trigger==="hover"&&!n.disabled&&C()}function B(){n.trigger==="hover"&&setTimeout(()=>{u.value||k()},50)}const u=e.ref(!1);function G(){n.trigger==="hover"&&(u.value=!0,s&&(clearTimeout(s),s=null),m&&(clearTimeout(m),m=null))}function Z(){n.trigger==="hover"&&(u.value=!1,k())}function ee(M){n.trigger==="click"&&!n.disabled&&(M.stopPropagation(),D())}function F(){var le;if(!g.value||!((le=h.value)!=null&&le.menuRef))return;const M=g.value,z=h.value.menuRef;if(!M||!z)return;const w=M.getBoundingClientRect(),V=z.getBoundingClientRect();if(V.width===0||V.height===0){setTimeout(()=>{v.value&&F()},10);return}let x=0,I=0;switch(n.placement){case"top":x=w.top-V.height,I=w.left;break;case"top-start":x=w.top-V.height,I=w.left;break;case"top-end":x=w.top-V.height,I=w.left+w.width-V.width;break;case"bottom":x=w.bottom,I=w.left+(w.width-V.width)/2;break;case"bottom-start":x=w.bottom,I=w.left;break;case"bottom-end":x=w.bottom,I=w.left+w.width-V.width;break;case"left":x=w.top+(w.height-V.height)/2,I=w.left-V.width;break;case"left-start":x=w.top,I=w.left-V.width;break;case"left-end":x=w.top+w.height-V.height,I=w.left-V.width;break;case"right":x=w.top+(w.height-V.height)/2,I=w.right;break;case"right-start":x=w.top,I=w.right;break;case"right-end":x=w.top+w.height-V.height,I=w.right;break}const q=window.innerWidth,oe=window.innerHeight;I<0&&(I=8),I+V.width>q&&(I=q-V.width-8),x<0&&(x=8),x+V.height>oe&&(x=oe-V.height-8),z.style.top=`${x}px`,z.style.left=`${I}px`,z.style.position="fixed",z.style.visibility="visible",z.style.display="block"}e.watch(v,M=>{p("visible-change",M),M?(requestAnimationFrame(()=>{e.nextTick(()=>{F()})}),document.addEventListener("click",T)):document.removeEventListener("click",T)});function T(M){if(n.trigger==="click"&&!n.disabled){const z=M.target;g.value&&!g.value.contains(z)&&k()}}function L(){v.value&&F()}return e.onMounted(()=>{window.addEventListener("resize",L),window.addEventListener("scroll",L,!0)}),e.onUnmounted(()=>{s&&clearTimeout(s),m&&clearTimeout(m),document.removeEventListener("click",T),window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}),c({show:C,hide:k,toggle:D,visible:v}),(M,z)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:g,class:e.normalizeClass(["rc-dropdown",{"is-disabled":t.disabled}]),onMouseenter:N,onMouseleave:B,onClick:ee},[e.renderSlot(M.$slots,"default",{},void 0,!0),e.createVNode(Be,{ref_key:"menuRef",ref:h,visible:v.value,effect:t.effect,"max-height":t.maxHeight,onMouseenter:G,onMouseleave:Z},{default:e.withCtx(()=>[e.renderSlot(M.$slots,"dropdown",{},void 0,!0)]),_:3},8,["visible","effect","max-height"])],34))}}),Re=O(ta,[["__scopeId","data-v-30feb4c4"]]),na={class:"rc-dropdown-item__text"},aa=e.defineComponent({name:"rc-dropdown-item",__name:"item",props:{command:{default:void 0},disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},icon:{default:""}},setup(t){const c=t,f=e.inject("handleItemClick",()=>{});function n(p){if(c.disabled){p.stopPropagation();return}f(c.command)}return(p,g)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["rc-dropdown-item",{"is-disabled":t.disabled,"is-divided":t.divided}]),onClick:n},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,name:t.icon,class:"rc-dropdown-item__icon"},null,8,["name"])):e.createCommentVNode("",!0),e.createElementVNode("span",na,[e.renderSlot(p.$slots,"default",{},void 0,!0)])],2))}}),Te=O(aa,[["__scopeId","data-v-7c739fdf"]]);Re.name="rc-dropdown";Be.name="rc-dropdown-menu";Te.name="rc-dropdown-item";function Ge(t){return t.component(Re.name,Re),t.component(Be.name,Be),t.component(Te.name,Te),t}const ze=Symbol("RECYCLE_UI_CONFIG"),qe={prefix:"rc",autoRegister:!0,provideKey:ze,theme:{},iconCssUrl:"//at.alicdn.com/t/c/font_4252799_2vm5jrrzfvq.css",iconClass:"iconfont"};function oa(t,c){c.autoRegister!==!1&&(typeof Le=="function"&&Le(t),typeof Ae=="function"&&Ae(t),typeof Ye=="function"&&Ye(t),typeof et=="function"&&et(t),typeof We=="function"&&We(t),typeof Pe=="function"&&Pe(t),typeof je=="function"&&je(t),typeof He=="function"&&He(t),typeof Oe=="function"&&Oe(t),typeof Ke=="function"&&Ke(t),typeof Ge=="function"&&Ge(t))}const Je=(t,c)=>{const f={...qe,...c||{}};if(t.provide(f.provideKey??ze,f),t.config.globalProperties.$recycleUI=f,typeof window<"u"&&f.iconCssUrl){const n=`link[rel="stylesheet"][data-rcui-icon="true"][href="${f.iconCssUrl}"]`;if(!document.head.querySelector(n)){const g=document.createElement("link");g.rel="stylesheet",g.href=f.iconCssUrl,g.setAttribute("data-rcui-icon","true"),document.head.appendChild(g)}}return oa(t,f),t},la={install:Je};function ra(t){return{install(c){Je(c,t)}}}exports.RECYCLE_UI_SYMBOL=ze;exports.RcButton=ae;exports.RcCalendar=he;exports.RcCard=be;exports.RcDescriptions=nt;exports.RcDescriptionsItem=at;exports.RcDropdown=Re;exports.RcDropdownItem=Te;exports.RcDropdownMenu=Be;exports.RcIcon=W;exports.RcInput=Ie;exports.RcPopup=ye;exports.RcSearchArea=Ue;exports.RcToast=Ce;exports.createRecycleUI=ra;exports.default=la;exports.defaultRecycleUIConfig=qe;exports.hideToast=ot;exports.install=Je;exports.installButton=Le;exports.installCalendar=He;exports.installCard=Ye;exports.installDescriptions=Ae;exports.installDropdown=Ge;exports.installIcon=We;exports.installInput=Ke;exports.installMessage=Pe;exports.installPopup=Oe;exports.installSearchArea=je;exports.message=lt;exports.rcDescriptions=nt;exports.rcDescriptionsItem=at;exports.showToast=It;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|