index18.js 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  1. import { g as he, m as me, d as o, r as Re, cC as N, t as ve, c as x, cl as ze, u as B, i as ae, _ as w, o as fe, dE as E, bD as Ee, h as Le, dF as De, aT as Ge, dG as We, P as L, bI as U, dH as J } from "./index2.js";
  2. import { defineComponent as y, createVNode as r, computed as G, isVNode as pe } from "vue";
  3. import { T as be } from "./index12.js";
  4. const _e = (e) => {
  5. const {
  6. antCls: t,
  7. componentCls: n,
  8. cardHeadHeight: a,
  9. cardPaddingBase: i,
  10. cardHeadTabsMarginBottom: l
  11. } = e;
  12. return o(o({
  13. display: "flex",
  14. justifyContent: "center",
  15. flexDirection: "column",
  16. minHeight: a,
  17. marginBottom: -1,
  18. padding: `0 ${i}px`,
  19. color: e.colorTextHeading,
  20. fontWeight: e.fontWeightStrong,
  21. fontSize: e.fontSizeLG,
  22. background: "transparent",
  23. borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,
  24. borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
  25. }, N()), {
  26. "&-wrapper": {
  27. width: "100%",
  28. display: "flex",
  29. alignItems: "center"
  30. },
  31. "&-title": o(o({
  32. display: "inline-block",
  33. flex: 1
  34. }, ve), {
  35. [`
  36. > ${n}-typography,
  37. > ${n}-typography-edit-content
  38. `]: {
  39. insetInlineStart: 0,
  40. marginTop: 0,
  41. marginBottom: 0
  42. }
  43. }),
  44. [`${t}-tabs-top`]: {
  45. clear: "both",
  46. marginBottom: l,
  47. color: e.colorText,
  48. fontWeight: "normal",
  49. fontSize: e.fontSize,
  50. "&-bar": {
  51. borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`
  52. }
  53. }
  54. });
  55. }, ke = (e) => {
  56. const {
  57. cardPaddingBase: t,
  58. colorBorderSecondary: n,
  59. cardShadow: a,
  60. lineWidth: i
  61. } = e;
  62. return {
  63. width: "33.33%",
  64. padding: t,
  65. border: 0,
  66. borderRadius: 0,
  67. boxShadow: `
  68. ${i}px 0 0 0 ${n},
  69. 0 ${i}px 0 0 ${n},
  70. ${i}px ${i}px 0 0 ${n},
  71. ${i}px 0 0 0 ${n} inset,
  72. 0 ${i}px 0 0 ${n} inset;
  73. `,
  74. transition: `all ${e.motionDurationMid}`,
  75. "&-hoverable:hover": {
  76. position: "relative",
  77. zIndex: 1,
  78. boxShadow: a
  79. }
  80. };
  81. }, Oe = (e) => {
  82. const {
  83. componentCls: t,
  84. iconCls: n,
  85. cardActionsLiMargin: a,
  86. cardActionsIconSize: i,
  87. colorBorderSecondary: l
  88. } = e;
  89. return o(o({
  90. margin: 0,
  91. padding: 0,
  92. listStyle: "none",
  93. background: e.colorBgContainer,
  94. borderTop: `${e.lineWidth}px ${e.lineType} ${l}`,
  95. display: "flex",
  96. borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `
  97. }, N()), {
  98. "& > li": {
  99. margin: a,
  100. color: e.colorTextDescription,
  101. textAlign: "center",
  102. "> span": {
  103. position: "relative",
  104. display: "block",
  105. minWidth: e.cardActionsIconSize * 2,
  106. fontSize: e.fontSize,
  107. lineHeight: e.lineHeight,
  108. cursor: "pointer",
  109. "&:hover": {
  110. color: e.colorPrimary,
  111. transition: `color ${e.motionDurationMid}`
  112. },
  113. [`a:not(${t}-btn), > ${n}`]: {
  114. display: "inline-block",
  115. width: "100%",
  116. color: e.colorTextDescription,
  117. lineHeight: `${e.fontSize * e.lineHeight}px`,
  118. transition: `color ${e.motionDurationMid}`,
  119. "&:hover": {
  120. color: e.colorPrimary
  121. }
  122. },
  123. [`> ${n}`]: {
  124. fontSize: i,
  125. lineHeight: `${i * e.lineHeight}px`
  126. }
  127. },
  128. "&:not(:last-child)": {
  129. borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${l}`
  130. }
  131. }
  132. });
  133. }, Ne = (e) => o(o({
  134. margin: `-${e.marginXXS}px 0`,
  135. display: "flex"
  136. }, N()), {
  137. "&-avatar": {
  138. paddingInlineEnd: e.padding
  139. },
  140. "&-detail": {
  141. overflow: "hidden",
  142. flex: 1,
  143. "> div:not(:last-child)": {
  144. marginBottom: e.marginXS
  145. }
  146. },
  147. "&-title": o({
  148. color: e.colorTextHeading,
  149. fontWeight: e.fontWeightStrong,
  150. fontSize: e.fontSizeLG
  151. }, ve),
  152. "&-description": {
  153. color: e.colorTextDescription
  154. }
  155. }), je = (e) => {
  156. const {
  157. componentCls: t,
  158. cardPaddingBase: n,
  159. colorFillAlter: a
  160. } = e;
  161. return {
  162. [`${t}-head`]: {
  163. padding: `0 ${n}px`,
  164. background: a,
  165. "&-title": {
  166. fontSize: e.fontSize
  167. }
  168. },
  169. [`${t}-body`]: {
  170. padding: `${e.padding}px ${n}px`
  171. }
  172. };
  173. }, qe = (e) => {
  174. const {
  175. componentCls: t
  176. } = e;
  177. return {
  178. overflow: "hidden",
  179. [`${t}-body`]: {
  180. userSelect: "none"
  181. }
  182. };
  183. }, Xe = (e) => {
  184. const {
  185. componentCls: t,
  186. cardShadow: n,
  187. cardHeadPadding: a,
  188. colorBorderSecondary: i,
  189. boxShadow: l,
  190. cardPaddingBase: d
  191. } = e;
  192. return {
  193. [t]: o(o({}, Re(e)), {
  194. position: "relative",
  195. background: e.colorBgContainer,
  196. borderRadius: e.borderRadiusLG,
  197. [`&:not(${t}-bordered)`]: {
  198. boxShadow: l
  199. },
  200. [`${t}-head`]: _e(e),
  201. [`${t}-extra`]: {
  202. // https://stackoverflow.com/a/22429853/3040605
  203. marginInlineStart: "auto",
  204. color: "",
  205. fontWeight: "normal",
  206. fontSize: e.fontSize
  207. },
  208. [`${t}-body`]: o({
  209. padding: d,
  210. borderRadius: ` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`
  211. }, N()),
  212. [`${t}-grid`]: ke(e),
  213. [`${t}-cover`]: {
  214. "> *": {
  215. display: "block",
  216. width: "100%"
  217. },
  218. img: {
  219. borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`
  220. }
  221. },
  222. [`${t}-actions`]: Oe(e),
  223. [`${t}-meta`]: Ne(e)
  224. }),
  225. [`${t}-bordered`]: {
  226. border: `${e.lineWidth}px ${e.lineType} ${i}`,
  227. [`${t}-cover`]: {
  228. marginTop: -1,
  229. marginInlineStart: -1,
  230. marginInlineEnd: -1
  231. }
  232. },
  233. [`${t}-hoverable`]: {
  234. cursor: "pointer",
  235. transition: `box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,
  236. "&:hover": {
  237. borderColor: "transparent",
  238. boxShadow: n
  239. }
  240. },
  241. [`${t}-contain-grid`]: {
  242. [`${t}-body`]: {
  243. display: "flex",
  244. flexWrap: "wrap"
  245. },
  246. [`&:not(${t}-loading) ${t}-body`]: {
  247. marginBlockStart: -e.lineWidth,
  248. marginInlineStart: -e.lineWidth,
  249. padding: 0
  250. }
  251. },
  252. [`${t}-contain-tabs`]: {
  253. [`> ${t}-head`]: {
  254. [`${t}-head-title, ${t}-extra`]: {
  255. paddingTop: a
  256. }
  257. }
  258. },
  259. [`${t}-type-inner`]: je(e),
  260. [`${t}-loading`]: qe(e),
  261. [`${t}-rtl`]: {
  262. direction: "rtl"
  263. }
  264. };
  265. }, Ke = (e) => {
  266. const {
  267. componentCls: t,
  268. cardPaddingSM: n,
  269. cardHeadHeightSM: a
  270. } = e;
  271. return {
  272. [`${t}-small`]: {
  273. [`> ${t}-head`]: {
  274. minHeight: a,
  275. padding: `0 ${n}px`,
  276. fontSize: e.fontSize,
  277. [`> ${t}-head-wrapper`]: {
  278. [`> ${t}-extra`]: {
  279. fontSize: e.fontSize
  280. }
  281. }
  282. },
  283. [`> ${t}-body`]: {
  284. padding: n
  285. }
  286. },
  287. [`${t}-small${t}-contain-tabs`]: {
  288. [`> ${t}-head`]: {
  289. [`${t}-head-title, ${t}-extra`]: {
  290. minHeight: a,
  291. paddingTop: 0,
  292. display: "flex",
  293. alignItems: "center"
  294. }
  295. }
  296. }
  297. };
  298. }, Fe = he("Card", (e) => {
  299. const t = me(e, {
  300. cardShadow: e.boxShadowCard,
  301. cardHeadHeight: e.fontSizeLG * e.lineHeightLG + e.padding * 2,
  302. cardHeadHeightSM: e.fontSize * e.lineHeight + e.paddingXS * 2,
  303. cardHeadPadding: e.padding,
  304. cardPaddingBase: e.paddingLG,
  305. cardHeadTabsMarginBottom: -e.padding - e.lineWidth,
  306. cardActionsLiMargin: `${e.paddingSM}px 0`,
  307. cardActionsIconSize: e.fontSize,
  308. cardPaddingSM: 12
  309. // Fixed padding.
  310. });
  311. return [
  312. // Style
  313. Xe(t),
  314. // Size
  315. Ke(t)
  316. ];
  317. }), Ve = () => ({
  318. prefixCls: String,
  319. width: {
  320. type: [Number, String]
  321. }
  322. }), oe = y({
  323. compatConfig: {
  324. MODE: 3
  325. },
  326. name: "SkeletonTitle",
  327. props: Ve(),
  328. setup(e) {
  329. return () => {
  330. const {
  331. prefixCls: t,
  332. width: n
  333. } = e, a = typeof n == "number" ? `${n}px` : n;
  334. return r("h3", {
  335. class: t,
  336. style: {
  337. width: a
  338. }
  339. }, null);
  340. };
  341. }
  342. }), Ue = () => ({
  343. prefixCls: String,
  344. width: {
  345. type: [Number, String, Array]
  346. },
  347. rows: Number
  348. }), Je = y({
  349. compatConfig: {
  350. MODE: 3
  351. },
  352. name: "SkeletonParagraph",
  353. props: Ue(),
  354. setup(e) {
  355. const t = (n) => {
  356. const {
  357. width: a,
  358. rows: i = 2
  359. } = e;
  360. if (Array.isArray(a))
  361. return a[n];
  362. if (i - 1 === n)
  363. return a;
  364. };
  365. return () => {
  366. const {
  367. prefixCls: n,
  368. rows: a
  369. } = e, i = [...Array(a)].map((l, d) => {
  370. const g = t(d);
  371. return r("li", {
  372. key: d,
  373. style: {
  374. width: typeof g == "number" ? `${g}px` : g
  375. }
  376. }, null);
  377. });
  378. return r("ul", {
  379. class: n
  380. }, [i]);
  381. };
  382. }
  383. }), j = () => ({
  384. prefixCls: String,
  385. size: [String, Number],
  386. shape: String,
  387. active: {
  388. type: Boolean,
  389. default: void 0
  390. }
  391. }), W = (e) => {
  392. const {
  393. prefixCls: t,
  394. size: n,
  395. shape: a
  396. } = e, i = x({
  397. [`${t}-lg`]: n === "large",
  398. [`${t}-sm`]: n === "small"
  399. }), l = x({
  400. [`${t}-circle`]: a === "circle",
  401. [`${t}-square`]: a === "square",
  402. [`${t}-round`]: a === "round"
  403. }), d = typeof n == "number" ? {
  404. width: `${n}px`,
  405. height: `${n}px`,
  406. lineHeight: `${n}px`
  407. } : {};
  408. return r("span", {
  409. class: x(t, i, l),
  410. style: d
  411. }, null);
  412. };
  413. W.displayName = "SkeletonElement";
  414. const Qe = new ze("ant-skeleton-loading", {
  415. "0%": {
  416. transform: "translateX(-37.5%)"
  417. },
  418. "100%": {
  419. transform: "translateX(37.5%)"
  420. }
  421. }), q = (e) => ({
  422. height: e,
  423. lineHeight: `${e}px`
  424. }), M = (e) => o({
  425. width: e
  426. }, q(e)), Ye = (e) => ({
  427. position: "relative",
  428. // fix https://github.com/ant-design/ant-design/issues/36444
  429. // https://monshin.github.io/202109/css/safari-border-radius-overflow-hidden/
  430. /* stylelint-disable-next-line property-no-vendor-prefix,value-no-vendor-prefix */
  431. zIndex: 0,
  432. overflow: "hidden",
  433. background: "transparent",
  434. "&::after": {
  435. position: "absolute",
  436. top: 0,
  437. insetInlineEnd: "-150%",
  438. bottom: 0,
  439. insetInlineStart: "-150%",
  440. background: e.skeletonLoadingBackground,
  441. animationName: Qe,
  442. animationDuration: e.skeletonLoadingMotionDuration,
  443. animationTimingFunction: "ease",
  444. animationIterationCount: "infinite",
  445. content: '""'
  446. }
  447. }), Q = (e) => o({
  448. width: e * 5,
  449. minWidth: e * 5
  450. }, q(e)), Ze = (e) => {
  451. const {
  452. skeletonAvatarCls: t,
  453. color: n,
  454. controlHeight: a,
  455. controlHeightLG: i,
  456. controlHeightSM: l
  457. } = e;
  458. return {
  459. [`${t}`]: o({
  460. display: "inline-block",
  461. verticalAlign: "top",
  462. background: n
  463. }, M(a)),
  464. [`${t}${t}-circle`]: {
  465. borderRadius: "50%"
  466. },
  467. [`${t}${t}-lg`]: o({}, M(i)),
  468. [`${t}${t}-sm`]: o({}, M(l))
  469. };
  470. }, et = (e) => {
  471. const {
  472. controlHeight: t,
  473. borderRadiusSM: n,
  474. skeletonInputCls: a,
  475. controlHeightLG: i,
  476. controlHeightSM: l,
  477. color: d
  478. } = e;
  479. return {
  480. [`${a}`]: o({
  481. display: "inline-block",
  482. verticalAlign: "top",
  483. background: d,
  484. borderRadius: n
  485. }, Q(t)),
  486. [`${a}-lg`]: o({}, Q(i)),
  487. [`${a}-sm`]: o({}, Q(l))
  488. };
  489. }, $e = (e) => o({
  490. width: e
  491. }, q(e)), tt = (e) => {
  492. const {
  493. skeletonImageCls: t,
  494. imageSizeBase: n,
  495. color: a,
  496. borderRadiusSM: i
  497. } = e;
  498. return {
  499. [`${t}`]: o(o({
  500. display: "flex",
  501. alignItems: "center",
  502. justifyContent: "center",
  503. verticalAlign: "top",
  504. background: a,
  505. borderRadius: i
  506. }, $e(n * 2)), {
  507. [`${t}-path`]: {
  508. fill: "#bfbfbf"
  509. },
  510. [`${t}-svg`]: o(o({}, $e(n)), {
  511. maxWidth: n * 4,
  512. maxHeight: n * 4
  513. }),
  514. [`${t}-svg${t}-svg-circle`]: {
  515. borderRadius: "50%"
  516. }
  517. }),
  518. [`${t}${t}-circle`]: {
  519. borderRadius: "50%"
  520. }
  521. };
  522. }, Y = (e, t, n) => {
  523. const {
  524. skeletonButtonCls: a
  525. } = e;
  526. return {
  527. [`${n}${a}-circle`]: {
  528. width: t,
  529. minWidth: t,
  530. borderRadius: "50%"
  531. },
  532. [`${n}${a}-round`]: {
  533. borderRadius: t
  534. }
  535. };
  536. }, Z = (e) => o({
  537. width: e * 2,
  538. minWidth: e * 2
  539. }, q(e)), nt = (e) => {
  540. const {
  541. borderRadiusSM: t,
  542. skeletonButtonCls: n,
  543. controlHeight: a,
  544. controlHeightLG: i,
  545. controlHeightSM: l,
  546. color: d
  547. } = e;
  548. return o(o(o(o(o({
  549. [`${n}`]: o({
  550. display: "inline-block",
  551. verticalAlign: "top",
  552. background: d,
  553. borderRadius: t,
  554. width: a * 2,
  555. minWidth: a * 2
  556. }, Z(a))
  557. }, Y(e, a, n)), {
  558. [`${n}-lg`]: o({}, Z(i))
  559. }), Y(e, i, `${n}-lg`)), {
  560. [`${n}-sm`]: o({}, Z(l))
  561. }), Y(e, l, `${n}-sm`));
  562. }, at = (e) => {
  563. const {
  564. componentCls: t,
  565. skeletonAvatarCls: n,
  566. skeletonTitleCls: a,
  567. skeletonParagraphCls: i,
  568. skeletonButtonCls: l,
  569. skeletonInputCls: d,
  570. skeletonImageCls: g,
  571. controlHeight: T,
  572. controlHeightLG: b,
  573. controlHeightSM: m,
  574. color: v,
  575. padding: p,
  576. marginSM: u,
  577. borderRadius: s,
  578. skeletonTitleHeight: h,
  579. skeletonBlockRadius: f,
  580. skeletonParagraphLineHeight: S,
  581. controlHeightXS: H,
  582. skeletonParagraphMarginTop: I
  583. } = e;
  584. return {
  585. [`${t}`]: {
  586. display: "table",
  587. width: "100%",
  588. [`${t}-header`]: {
  589. display: "table-cell",
  590. paddingInlineEnd: p,
  591. verticalAlign: "top",
  592. // Avatar
  593. [`${n}`]: o({
  594. display: "inline-block",
  595. verticalAlign: "top",
  596. background: v
  597. }, M(T)),
  598. [`${n}-circle`]: {
  599. borderRadius: "50%"
  600. },
  601. [`${n}-lg`]: o({}, M(b)),
  602. [`${n}-sm`]: o({}, M(m))
  603. },
  604. [`${t}-content`]: {
  605. display: "table-cell",
  606. width: "100%",
  607. verticalAlign: "top",
  608. // Title
  609. [`${a}`]: {
  610. width: "100%",
  611. height: h,
  612. background: v,
  613. borderRadius: f,
  614. [`+ ${i}`]: {
  615. marginBlockStart: m
  616. }
  617. },
  618. // paragraph
  619. [`${i}`]: {
  620. padding: 0,
  621. "> li": {
  622. width: "100%",
  623. height: S,
  624. listStyle: "none",
  625. background: v,
  626. borderRadius: f,
  627. "+ li": {
  628. marginBlockStart: H
  629. }
  630. }
  631. },
  632. [`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
  633. width: "61%"
  634. }
  635. },
  636. [`&-round ${t}-content`]: {
  637. [`${a}, ${i} > li`]: {
  638. borderRadius: s
  639. }
  640. }
  641. },
  642. [`${t}-with-avatar ${t}-content`]: {
  643. // Title
  644. [`${a}`]: {
  645. marginBlockStart: u,
  646. [`+ ${i}`]: {
  647. marginBlockStart: I
  648. }
  649. }
  650. },
  651. // Skeleton element
  652. [`${t}${t}-element`]: o(o(o(o({
  653. display: "inline-block",
  654. width: "auto"
  655. }, nt(e)), Ze(e)), et(e)), tt(e)),
  656. // Skeleton Block Button, Input
  657. [`${t}${t}-block`]: {
  658. width: "100%",
  659. [`${l}`]: {
  660. width: "100%"
  661. },
  662. [`${d}`]: {
  663. width: "100%"
  664. }
  665. },
  666. // With active animation
  667. [`${t}${t}-active`]: {
  668. [`
  669. ${a},
  670. ${i} > li,
  671. ${n},
  672. ${l},
  673. ${d},
  674. ${g}
  675. `]: o({}, Ye(e))
  676. }
  677. };
  678. }, _ = he("Skeleton", (e) => {
  679. const {
  680. componentCls: t
  681. } = e, n = me(e, {
  682. skeletonAvatarCls: `${t}-avatar`,
  683. skeletonTitleCls: `${t}-title`,
  684. skeletonParagraphCls: `${t}-paragraph`,
  685. skeletonButtonCls: `${t}-button`,
  686. skeletonInputCls: `${t}-input`,
  687. skeletonImageCls: `${t}-image`,
  688. imageSizeBase: e.controlHeight * 1.5,
  689. skeletonTitleHeight: e.controlHeight / 2,
  690. skeletonBlockRadius: e.borderRadiusSM,
  691. skeletonParagraphLineHeight: e.controlHeight / 2,
  692. skeletonParagraphMarginTop: e.marginLG + e.marginXXS,
  693. borderRadius: 100,
  694. skeletonLoadingBackground: `linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,
  695. skeletonLoadingMotionDuration: "1.4s"
  696. });
  697. return [at(n)];
  698. }, (e) => {
  699. const {
  700. colorFillContent: t,
  701. colorFill: n
  702. } = e;
  703. return {
  704. color: t,
  705. colorGradientEnd: n
  706. };
  707. }), ot = () => ({
  708. active: {
  709. type: Boolean,
  710. default: void 0
  711. },
  712. loading: {
  713. type: Boolean,
  714. default: void 0
  715. },
  716. prefixCls: String,
  717. avatar: {
  718. type: [Boolean, Object],
  719. default: void 0
  720. },
  721. title: {
  722. type: [Boolean, Object],
  723. default: void 0
  724. },
  725. paragraph: {
  726. type: [Boolean, Object],
  727. default: void 0
  728. },
  729. round: {
  730. type: Boolean,
  731. default: void 0
  732. }
  733. });
  734. function ee(e) {
  735. return e && typeof e == "object" ? e : {};
  736. }
  737. function it(e, t) {
  738. return e && !t ? {
  739. size: "large",
  740. shape: "square"
  741. } : {
  742. size: "large",
  743. shape: "circle"
  744. };
  745. }
  746. function rt(e, t) {
  747. return !e && t ? {
  748. width: "38%"
  749. } : e && t ? {
  750. width: "50%"
  751. } : {};
  752. }
  753. function lt(e, t) {
  754. const n = {};
  755. return (!e || !t) && (n.width = "61%"), !e && t ? n.rows = 3 : n.rows = 2, n;
  756. }
  757. const $ = y({
  758. compatConfig: {
  759. MODE: 3
  760. },
  761. name: "ASkeleton",
  762. props: ae(ot(), {
  763. avatar: !1,
  764. title: !0,
  765. paragraph: !0
  766. }),
  767. setup(e, t) {
  768. let {
  769. slots: n
  770. } = t;
  771. const {
  772. prefixCls: a,
  773. direction: i
  774. } = B("skeleton", e), [l, d] = _(a);
  775. return () => {
  776. var g;
  777. const {
  778. loading: T,
  779. avatar: b,
  780. title: m,
  781. paragraph: v,
  782. active: p,
  783. round: u
  784. } = e, s = a.value;
  785. if (T || e.loading === void 0) {
  786. const h = !!b || b === "", f = !!m || m === "", S = !!v || v === "";
  787. let H;
  788. if (h) {
  789. const A = o(o({
  790. prefixCls: `${s}-avatar`
  791. }, it(f, S)), ee(b));
  792. H = r("div", {
  793. class: `${s}-header`
  794. }, [r(W, A, null)]);
  795. }
  796. let I;
  797. if (f || S) {
  798. let A;
  799. if (f) {
  800. const C = o(o({
  801. prefixCls: `${s}-title`
  802. }, rt(h, S)), ee(m));
  803. A = r(oe, C, null);
  804. }
  805. let P;
  806. if (S) {
  807. const C = o(o({
  808. prefixCls: `${s}-paragraph`
  809. }, lt(h, f)), ee(v));
  810. P = r(Je, C, null);
  811. }
  812. I = r("div", {
  813. class: `${s}-content`
  814. }, [A, P]);
  815. }
  816. const k = x(s, {
  817. [`${s}-with-avatar`]: h,
  818. [`${s}-active`]: p,
  819. [`${s}-rtl`]: i.value === "rtl",
  820. [`${s}-round`]: u,
  821. [d.value]: !0
  822. });
  823. return l(r("div", {
  824. class: k
  825. }, [H, I]));
  826. }
  827. return (g = n.default) === null || g === void 0 ? void 0 : g.call(n);
  828. };
  829. }
  830. }), st = () => o(o({}, j()), {
  831. size: String,
  832. block: Boolean
  833. }), Se = y({
  834. compatConfig: {
  835. MODE: 3
  836. },
  837. name: "ASkeletonButton",
  838. props: ae(st(), {
  839. size: "default"
  840. }),
  841. setup(e) {
  842. const {
  843. prefixCls: t
  844. } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
  845. [`${t.value}-active`]: e.active,
  846. [`${t.value}-block`]: e.block
  847. }, a.value));
  848. return () => n(r("div", {
  849. class: i.value
  850. }, [r(W, w(w({}, e), {}, {
  851. prefixCls: `${t.value}-button`
  852. }), null)]));
  853. }
  854. }), ye = y({
  855. compatConfig: {
  856. MODE: 3
  857. },
  858. name: "ASkeletonInput",
  859. props: o(o({}, fe(j(), ["shape"])), {
  860. size: String,
  861. block: Boolean
  862. }),
  863. setup(e) {
  864. const {
  865. prefixCls: t
  866. } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
  867. [`${t.value}-active`]: e.active,
  868. [`${t.value}-block`]: e.block
  869. }, a.value));
  870. return () => n(r("div", {
  871. class: i.value
  872. }, [r(W, w(w({}, e), {}, {
  873. prefixCls: `${t.value}-input`
  874. }), null)]));
  875. }
  876. }), dt = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", Ce = y({
  877. compatConfig: {
  878. MODE: 3
  879. },
  880. name: "ASkeletonImage",
  881. props: fe(j(), ["size", "shape", "active"]),
  882. setup(e) {
  883. const {
  884. prefixCls: t
  885. } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, a.value));
  886. return () => n(r("div", {
  887. class: i.value
  888. }, [r("div", {
  889. class: `${t.value}-image`
  890. }, [r("svg", {
  891. viewBox: "0 0 1098 1024",
  892. xmlns: "http://www.w3.org/2000/svg",
  893. class: `${t.value}-image-svg`
  894. }, [r("path", {
  895. d: dt,
  896. class: `${t.value}-image-path`
  897. }, null)])])]));
  898. }
  899. }), ct = () => o(o({}, j()), {
  900. shape: String
  901. }), xe = y({
  902. compatConfig: {
  903. MODE: 3
  904. },
  905. name: "ASkeletonAvatar",
  906. props: ae(ct(), {
  907. size: "default",
  908. shape: "circle"
  909. }),
  910. setup(e) {
  911. const {
  912. prefixCls: t
  913. } = B("skeleton", e), [n, a] = _(t), i = G(() => x(t.value, `${t.value}-element`, {
  914. [`${t.value}-active`]: e.active
  915. }, a.value));
  916. return () => n(r("div", {
  917. class: i.value
  918. }, [r(W, w(w({}, e), {}, {
  919. prefixCls: `${t.value}-avatar`
  920. }), null)]));
  921. }
  922. });
  923. $.Button = Se;
  924. $.Avatar = xe;
  925. $.Input = ye;
  926. $.Image = Ce;
  927. $.Title = oe;
  928. $.install = function(e) {
  929. return e.component($.name, $), e.component($.Button.name, Se), e.component($.Avatar.name, xe), e.component($.Input.name, ye), e.component($.Image.name, Ce), e.component($.Title.name, oe), e;
  930. };
  931. const {
  932. TabPane: ut
  933. } = be, gt = () => ({
  934. prefixCls: String,
  935. title: L.any,
  936. extra: L.any,
  937. bordered: {
  938. type: Boolean,
  939. default: !0
  940. },
  941. bodyStyle: {
  942. type: Object,
  943. default: void 0
  944. },
  945. headStyle: {
  946. type: Object,
  947. default: void 0
  948. },
  949. loading: {
  950. type: Boolean,
  951. default: !1
  952. },
  953. hoverable: {
  954. type: Boolean,
  955. default: !1
  956. },
  957. type: {
  958. type: String
  959. },
  960. size: {
  961. type: String
  962. },
  963. actions: L.any,
  964. tabList: {
  965. type: Array
  966. },
  967. tabBarExtraContent: L.any,
  968. activeTabKey: String,
  969. defaultActiveTabKey: String,
  970. cover: L.any,
  971. onTabChange: {
  972. type: Function
  973. }
  974. }), D = y({
  975. compatConfig: {
  976. MODE: 3
  977. },
  978. name: "ACard",
  979. inheritAttrs: !1,
  980. props: gt(),
  981. slots: Object,
  982. setup(e, t) {
  983. let {
  984. slots: n,
  985. attrs: a
  986. } = t;
  987. const {
  988. prefixCls: i,
  989. direction: l,
  990. size: d
  991. } = B("card", e), [g, T] = Fe(i), b = (p) => p.map((s, h) => pe(s) && !We(s) || !pe(s) ? r("li", {
  992. style: {
  993. width: `${100 / p.length}%`
  994. },
  995. key: `action-${h}`
  996. }, [r("span", null, [s])]) : null), m = (p) => {
  997. var u;
  998. (u = e.onTabChange) === null || u === void 0 || u.call(e, p);
  999. }, v = function() {
  1000. let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], u;
  1001. return p.forEach((s) => {
  1002. s && Ge(s.type) && s.type.__ANT_CARD_GRID && (u = !0);
  1003. }), u;
  1004. };
  1005. return () => {
  1006. var p, u, s, h, f, S;
  1007. const {
  1008. headStyle: H = {},
  1009. bodyStyle: I = {},
  1010. loading: k,
  1011. bordered: A = !0,
  1012. type: P,
  1013. tabList: C,
  1014. hoverable: we,
  1015. activeTabKey: ie,
  1016. defaultActiveTabKey: Be,
  1017. tabBarExtraContent: re = E((p = n.tabBarExtraContent) === null || p === void 0 ? void 0 : p.call(n)),
  1018. title: X = E((u = n.title) === null || u === void 0 ? void 0 : u.call(n)),
  1019. extra: K = E((s = n.extra) === null || s === void 0 ? void 0 : s.call(n)),
  1020. actions: F = E((h = n.actions) === null || h === void 0 ? void 0 : h.call(n)),
  1021. cover: le = E((f = n.cover) === null || f === void 0 ? void 0 : f.call(n))
  1022. } = e, R = Ee((S = n.default) === null || S === void 0 ? void 0 : S.call(n)), c = i.value, Te = {
  1023. [`${c}`]: !0,
  1024. [T.value]: !0,
  1025. [`${c}-loading`]: k,
  1026. [`${c}-bordered`]: A,
  1027. [`${c}-hoverable`]: !!we,
  1028. [`${c}-contain-grid`]: v(R),
  1029. [`${c}-contain-tabs`]: C && C.length,
  1030. [`${c}-${d.value}`]: d.value,
  1031. [`${c}-type-${P}`]: !!P,
  1032. [`${c}-rtl`]: l.value === "rtl"
  1033. }, He = r($, {
  1034. loading: !0,
  1035. active: !0,
  1036. paragraph: {
  1037. rows: 4
  1038. },
  1039. title: !1
  1040. }, {
  1041. default: () => [R]
  1042. }), se = ie !== void 0, Ie = {
  1043. size: "large",
  1044. [se ? "activeKey" : "defaultActiveKey"]: se ? ie : Be,
  1045. onChange: m,
  1046. class: `${c}-head-tabs`
  1047. };
  1048. let de;
  1049. const ce = C && C.length ? r(be, Ie, {
  1050. default: () => [C.map((z) => {
  1051. const {
  1052. tab: ue,
  1053. slots: O
  1054. } = z, ge = O == null ? void 0 : O.tab;
  1055. Le(!O, "Card", "tabList slots is deprecated, Please use `customTab` instead.");
  1056. let V = ue !== void 0 ? ue : n[ge] ? n[ge](z) : null;
  1057. return V = De(n, "customTab", z, () => [V]), r(ut, {
  1058. tab: V,
  1059. key: z.key,
  1060. disabled: z.disabled
  1061. }, null);
  1062. })],
  1063. rightExtra: re ? () => re : null
  1064. }) : null;
  1065. (X || K || ce) && (de = r("div", {
  1066. class: `${c}-head`,
  1067. style: H
  1068. }, [r("div", {
  1069. class: `${c}-head-wrapper`
  1070. }, [X && r("div", {
  1071. class: `${c}-head-title`
  1072. }, [X]), K && r("div", {
  1073. class: `${c}-extra`
  1074. }, [K])]), ce]));
  1075. const Ae = le ? r("div", {
  1076. class: `${c}-cover`
  1077. }, [le]) : null, Me = r("div", {
  1078. class: `${c}-body`,
  1079. style: I
  1080. }, [k ? He : R]), Pe = F && F.length ? r("ul", {
  1081. class: `${c}-actions`
  1082. }, [b(F)]) : null;
  1083. return g(r("div", w(w({
  1084. ref: "cardContainerRef"
  1085. }, a), {}, {
  1086. class: [Te, a.class]
  1087. }), [de, Ae, R && R.length ? Me : null, Pe]));
  1088. };
  1089. }
  1090. }), pt = () => ({
  1091. prefixCls: String,
  1092. title: J(),
  1093. description: J(),
  1094. avatar: J()
  1095. }), te = y({
  1096. compatConfig: {
  1097. MODE: 3
  1098. },
  1099. name: "ACardMeta",
  1100. props: pt(),
  1101. slots: Object,
  1102. setup(e, t) {
  1103. let {
  1104. slots: n
  1105. } = t;
  1106. const {
  1107. prefixCls: a
  1108. } = B("card", e);
  1109. return () => {
  1110. const i = {
  1111. [`${a.value}-meta`]: !0
  1112. }, l = U(n, e, "avatar"), d = U(n, e, "title"), g = U(n, e, "description"), T = l ? r("div", {
  1113. class: `${a.value}-meta-avatar`
  1114. }, [l]) : null, b = d ? r("div", {
  1115. class: `${a.value}-meta-title`
  1116. }, [d]) : null, m = g ? r("div", {
  1117. class: `${a.value}-meta-description`
  1118. }, [g]) : null, v = b || m ? r("div", {
  1119. class: `${a.value}-meta-detail`
  1120. }, [b, m]) : null;
  1121. return r("div", {
  1122. class: i
  1123. }, [T, v]);
  1124. };
  1125. }
  1126. }), $t = () => ({
  1127. prefixCls: String,
  1128. hoverable: {
  1129. type: Boolean,
  1130. default: !0
  1131. }
  1132. }), ne = y({
  1133. compatConfig: {
  1134. MODE: 3
  1135. },
  1136. name: "ACardGrid",
  1137. __ANT_CARD_GRID: !0,
  1138. props: $t(),
  1139. setup(e, t) {
  1140. let {
  1141. slots: n
  1142. } = t;
  1143. const {
  1144. prefixCls: a
  1145. } = B("card", e), i = G(() => ({
  1146. [`${a.value}-grid`]: !0,
  1147. [`${a.value}-grid-hoverable`]: e.hoverable
  1148. }));
  1149. return () => {
  1150. var l;
  1151. return r("div", {
  1152. class: i.value
  1153. }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)]);
  1154. };
  1155. }
  1156. });
  1157. D.Meta = te;
  1158. D.Grid = ne;
  1159. D.install = function(e) {
  1160. return e.component(D.name, D), e.component(te.name, te), e.component(ne.name, ne), e;
  1161. };
  1162. export {
  1163. D as C,
  1164. $ as S,
  1165. ne as _
  1166. };