"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../../_util/cssinjs/Keyframes.js");require("../../_util/cssinjs/StyleContext.js");require("vue");require("../../_util/cssinjs/transformers/legacyLogicalProperties.js");require("../../theme/internal.js");const y=require("../../theme/util/genComponentStyleHook.js"),I=require("../../theme/util/statistic.js"),M=new f.default("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),s=e=>({height:e,lineHeight:`${e}px`}),a=e=>({width:e,...s(e)}),E=e=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:M,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),d=e=>({width:e*5,minWidth:e*5,...s(e)}),A=e=>{const{skeletonAvatarCls:t,color:n,controlHeight:o,controlHeightLG:l,controlHeightSM:i}=e;return{[`${t}`]:{display:"inline-block",verticalAlign:"top",background:n,...a(o)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...a(l)},[`${t}${t}-sm`]:{...a(i)}}},L=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:l,controlHeightSM:i,color:r}=e;return{[`${o}`]:{display:"inline-block",verticalAlign:"top",background:r,borderRadius:n,...d(t)},[`${o}-lg`]:{...d(l)},[`${o}-sm`]:{...d(i)}}},m=e=>({width:e,...s(e)}),T=e=>{const{skeletonImageCls:t,imageSizeBase:n,color:o,borderRadiusSM:l}=e;return{[`${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:l,...m(n*2),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...m(n),maxWidth:n*4,maxHeight:n*4},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},g=(e,t,n)=>{const{skeletonButtonCls:o}=e;return{[`${n}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:t}}},u=e=>({width:e*2,minWidth:e*2,...s(e)}),q=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:o,controlHeightLG:l,controlHeightSM:i,color:r}=e;return{[`${n}`]:{display:"inline-block",verticalAlign:"top",background:r,borderRadius:t,width:o*2,minWidth:o*2,...u(o)},...g(e,o,n),[`${n}-lg`]:{...u(l)},...g(e,l,`${n}-lg`),[`${n}-sm`]:{...u(i)},...g(e,i,`${n}-sm`)}},G=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:l,skeletonButtonCls:i,skeletonInputCls:r,skeletonImageCls:k,controlHeight:p,controlHeightLG:b,controlHeightSM:$,color:c,padding:S,marginSM:C,borderRadius:H,skeletonTitleHeight:v,skeletonBlockRadius:h,skeletonParagraphLineHeight:R,controlHeightXS:w,skeletonParagraphMarginTop:B}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:S,verticalAlign:"top",[`${n}`]:{display:"inline-block",verticalAlign:"top",background:c,...a(p)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...a(b)},[`${n}-sm`]:{...a($)}},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:v,background:c,borderRadius:h,[`+ ${l}`]:{marginBlockStart:$}},[`${l}`]:{padding:0,"> li":{width:"100%",height:R,listStyle:"none",background:c,borderRadius:h,"+ li":{marginBlockStart:w}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${l} > li`]:{borderRadius:H}}},[`${t}-with-avatar ${t}-content`]:{[`${o}`]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:B}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...q(e),...A(e),...L(e),...T(e)},[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${r}`]:{width:"100%"}},[`${t}${t}-active`]:{[`
        ${o},
        ${l} > li,
        ${n},
        ${i},
        ${r},
        ${k}
      `]:{...E(e)}}}},P=y.default("Skeleton",e=>{const{componentCls:t}=e,n=I.merge(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[G(n)]},e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n}});exports.default=P;
