SModal.js 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918
  1. var xt = Object.defineProperty, $t = Object.defineProperties;
  2. var wt = Object.getOwnPropertyDescriptors;
  3. var ke = Object.getOwnPropertySymbols;
  4. var Tt = Object.prototype.hasOwnProperty, Bt = Object.prototype.propertyIsEnumerable;
  5. var _e = (e, t, o) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, pe = (e, t) => {
  6. for (var o in t || (t = {}))
  7. Tt.call(t, o) && _e(e, o, t[o]);
  8. if (ke)
  9. for (var o of ke(t))
  10. Bt.call(t, o) && _e(e, o, t[o]);
  11. return e;
  12. }, Me = (e, t) => $t(e, wt(t));
  13. import { defineComponent as te, ref as T, computed as q, createVNode as a, Transition as Ze, withDirectives as et, vShow as tt, nextTick as ot, shallowRef as L, watch as _, onBeforeUnmount as nt, watchEffect as lt, Fragment as He, render as We, unref as Ne, isRef as at, toRefs as Pt, customRef as Ft, getCurrentScope as Ot, onScopeDispose as Mt, useAttrs as At, resolveComponent as we, openBlock as D, createBlock as ne, mergeProps as Ht, withCtx as N, createElementVNode as de, createElementBlock as le, renderList as Ve, createCommentVNode as ee, renderSlot as je, normalizeStyle as zt, resolveDynamicComponent as It, createTextVNode as ue, toDisplayString as ae } from "vue";
  14. import Nt from "./ModalHeader.js";
  15. import { d3 as Rt, cy as it, P as E, _ as P, bb as rt, d as f, cL as Et, c as ye, o as st, i as Be, d4 as Dt, K as Ge, d5 as Lt, bR as kt, g as _t, m as Wt, bD as Vt, r as jt, cJ as Gt, cP as Kt, b4 as Re, u as Xt, br as ct, a4 as Te, bV as Yt, B as ze, d6 as Ut, e as ge, d7 as Qt, a as qt, bf as Jt, be as Zt, bg as eo, d8 as to, d9 as oo, da as no, d1 as lo, db as ao, dc as io, b6 as ro, n as so, aB as co } from "./index2.js";
  16. import { A as Ke } from "./ActionButton.js";
  17. import { T as uo, _ as fo } from "./index13.js";
  18. import { _ as mo, S as vo } from "./index12.js";
  19. import { S as po } from "./index9.js";
  20. const go = new it("antFadeIn", {
  21. "0%": {
  22. opacity: 0
  23. },
  24. "100%": {
  25. opacity: 1
  26. }
  27. }), yo = new it("antFadeOut", {
  28. "0%": {
  29. opacity: 1
  30. },
  31. "100%": {
  32. opacity: 0
  33. }
  34. }), Co = function(e) {
  35. let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  36. const {
  37. antCls: o
  38. } = e, n = `${o}-fade`, l = t ? "&" : "";
  39. return [Rt(n, go, yo, e.motionDurationMid, t), {
  40. [`
  41. ${l}${n}-enter,
  42. ${l}${n}-appear
  43. `]: {
  44. opacity: 0,
  45. animationTimingFunction: "linear"
  46. },
  47. [`${l}${n}-leave`]: {
  48. animationTimingFunction: "linear"
  49. }
  50. }];
  51. };
  52. function Ee() {
  53. return {
  54. keyboard: {
  55. type: Boolean,
  56. default: void 0
  57. },
  58. mask: {
  59. type: Boolean,
  60. default: void 0
  61. },
  62. afterClose: Function,
  63. closable: {
  64. type: Boolean,
  65. default: void 0
  66. },
  67. maskClosable: {
  68. type: Boolean,
  69. default: void 0
  70. },
  71. visible: {
  72. type: Boolean,
  73. default: void 0
  74. },
  75. destroyOnClose: {
  76. type: Boolean,
  77. default: void 0
  78. },
  79. mousePosition: E.shape({
  80. x: Number,
  81. y: Number
  82. }).loose,
  83. title: E.any,
  84. footer: E.any,
  85. transitionName: String,
  86. maskTransitionName: String,
  87. animation: E.any,
  88. maskAnimation: E.any,
  89. wrapStyle: {
  90. type: Object,
  91. default: void 0
  92. },
  93. bodyStyle: {
  94. type: Object,
  95. default: void 0
  96. },
  97. maskStyle: {
  98. type: Object,
  99. default: void 0
  100. },
  101. prefixCls: String,
  102. wrapClassName: String,
  103. rootClassName: String,
  104. width: [String, Number],
  105. height: [String, Number],
  106. zIndex: Number,
  107. bodyProps: E.any,
  108. maskProps: E.any,
  109. wrapProps: E.any,
  110. getContainer: E.any,
  111. dialogStyle: {
  112. type: Object,
  113. default: void 0
  114. },
  115. dialogClass: String,
  116. closeIcon: E.any,
  117. forceRender: {
  118. type: Boolean,
  119. default: void 0
  120. },
  121. getOpenCount: Function,
  122. // https://github.com/ant-design/ant-design/issues/19771
  123. // https://github.com/react-component/dialog/issues/95
  124. focusTriggerAfterClose: {
  125. type: Boolean,
  126. default: void 0
  127. },
  128. onClose: Function,
  129. modalRender: Function
  130. };
  131. }
  132. function Xe(e, t, o) {
  133. let n = t;
  134. return !n && o && (n = `${e}-${o}`), n;
  135. }
  136. let Ye = -1;
  137. function bo() {
  138. return Ye += 1, Ye;
  139. }
  140. function Ue(e, t) {
  141. let o = e[`page${t ? "Y" : "X"}Offset`];
  142. const n = `scroll${t ? "Top" : "Left"}`;
  143. if (typeof o != "number") {
  144. const l = e.document;
  145. o = l.documentElement[n], typeof o != "number" && (o = l.body[n]);
  146. }
  147. return o;
  148. }
  149. function ho(e) {
  150. const t = e.getBoundingClientRect(), o = {
  151. left: t.left,
  152. top: t.top
  153. }, n = e.ownerDocument, l = n.defaultView || n.parentWindow;
  154. return o.left += Ue(l), o.top += Ue(l, !0), o;
  155. }
  156. const So = {
  157. width: 0,
  158. height: 0,
  159. overflow: "hidden",
  160. outline: "none"
  161. }, xo = {
  162. outline: "none"
  163. }, $o = te({
  164. compatConfig: {
  165. MODE: 3
  166. },
  167. name: "DialogContent",
  168. inheritAttrs: !1,
  169. props: f(f({}, Ee()), {
  170. motionName: String,
  171. ariaId: String,
  172. onVisibleChanged: Function,
  173. onMousedown: Function,
  174. onMouseup: Function
  175. }),
  176. setup(e, t) {
  177. let {
  178. expose: o,
  179. slots: n,
  180. attrs: l
  181. } = t;
  182. const r = T(), p = T(), m = T();
  183. o({
  184. focus: () => {
  185. var s;
  186. (s = r.value) === null || s === void 0 || s.focus({
  187. preventScroll: !0
  188. });
  189. },
  190. changeActive: (s) => {
  191. const {
  192. activeElement: i
  193. } = document;
  194. s && i === p.value ? r.value.focus({
  195. preventScroll: !0
  196. }) : !s && i === r.value && p.value.focus({
  197. preventScroll: !0
  198. });
  199. }
  200. });
  201. const x = T(), v = q(() => {
  202. const {
  203. width: s,
  204. height: i
  205. } = e, y = {};
  206. return s !== void 0 && (y.width = typeof s == "number" ? `${s}px` : s), i !== void 0 && (y.height = typeof i == "number" ? `${i}px` : i), x.value && (y.transformOrigin = x.value), y;
  207. }), d = () => {
  208. ot(() => {
  209. if (m.value) {
  210. const s = ho(m.value);
  211. x.value = e.mousePosition ? `${e.mousePosition.x - s.left}px ${e.mousePosition.y - s.top}px` : "";
  212. }
  213. });
  214. }, u = (s) => {
  215. e.onVisibleChanged(s);
  216. };
  217. return () => {
  218. var s, i, y, S;
  219. const {
  220. prefixCls: $,
  221. footer: c = (s = n.footer) === null || s === void 0 ? void 0 : s.call(n),
  222. title: h = (i = n.title) === null || i === void 0 ? void 0 : i.call(n),
  223. ariaId: C,
  224. closable: B,
  225. closeIcon: O = (y = n.closeIcon) === null || y === void 0 ? void 0 : y.call(n),
  226. onClose: A,
  227. bodyStyle: z,
  228. bodyProps: b,
  229. onMousedown: F,
  230. onMouseup: M,
  231. visible: w,
  232. modalRender: H = n.modalRender,
  233. destroyOnClose: X,
  234. motionName: G
  235. } = e;
  236. let U;
  237. c && (U = a("div", {
  238. class: `${$}-footer`
  239. }, [c]));
  240. let k;
  241. h && (k = a("div", {
  242. class: `${$}-header`
  243. }, [a("div", {
  244. class: `${$}-title`,
  245. id: C
  246. }, [h])]));
  247. let I;
  248. B && (I = a("button", {
  249. type: "button",
  250. onClick: A,
  251. "aria-label": "Close",
  252. class: `${$}-close`
  253. }, [O || a("span", {
  254. class: `${$}-close-x`
  255. }, null)]));
  256. const V = a("div", {
  257. class: `${$}-content`
  258. }, [I, k, a("div", P({
  259. class: `${$}-body`,
  260. style: z
  261. }, b), [(S = n.default) === null || S === void 0 ? void 0 : S.call(n)]), U]), me = rt(G);
  262. return a(Ze, P(P({}, me), {}, {
  263. onBeforeEnter: d,
  264. onAfterEnter: () => u(!0),
  265. onAfterLeave: () => u(!1)
  266. }), {
  267. default: () => [w || !X ? et(a("div", P(P({}, l), {}, {
  268. ref: m,
  269. key: "dialog-element",
  270. role: "document",
  271. style: [v.value, l.style],
  272. class: [$, l.class],
  273. onMousedown: F,
  274. onMouseup: M
  275. }), [a("div", {
  276. tabindex: 0,
  277. ref: r,
  278. style: xo
  279. }, [H ? H({
  280. originVNode: V
  281. }) : V]), a("div", {
  282. tabindex: 0,
  283. ref: p,
  284. style: So
  285. }, null)]), [[tt, w]]) : null]
  286. });
  287. };
  288. }
  289. }), wo = te({
  290. compatConfig: {
  291. MODE: 3
  292. },
  293. name: "DialogMask",
  294. props: {
  295. prefixCls: String,
  296. visible: Boolean,
  297. motionName: String,
  298. maskProps: Object
  299. },
  300. setup(e, t) {
  301. return () => {
  302. const {
  303. prefixCls: o,
  304. visible: n,
  305. maskProps: l,
  306. motionName: r
  307. } = e, p = rt(r);
  308. return a(Ze, p, {
  309. default: () => [et(a("div", P({
  310. class: `${o}-mask`
  311. }, l), null), [[tt, n]])]
  312. });
  313. };
  314. }
  315. }), Qe = te({
  316. compatConfig: {
  317. MODE: 3
  318. },
  319. name: "VcDialog",
  320. inheritAttrs: !1,
  321. props: Be(f(f({}, Ee()), {
  322. getOpenCount: Function,
  323. scrollLocker: Object
  324. }), {
  325. mask: !0,
  326. visible: !1,
  327. keyboard: !0,
  328. closable: !0,
  329. maskClosable: !0,
  330. destroyOnClose: !1,
  331. prefixCls: "rc-dialog",
  332. getOpenCount: () => null,
  333. focusTriggerAfterClose: !0
  334. }),
  335. setup(e, t) {
  336. let {
  337. attrs: o,
  338. slots: n
  339. } = t;
  340. const l = L(), r = L(), p = L(), m = L(e.visible), x = L(`vcDialogTitle${bo()}`), v = (c) => {
  341. var h, C;
  342. if (c)
  343. Dt(r.value, document.activeElement) || (l.value = document.activeElement, (h = p.value) === null || h === void 0 || h.focus());
  344. else {
  345. const B = m.value;
  346. if (m.value = !1, e.mask && l.value && e.focusTriggerAfterClose) {
  347. try {
  348. l.value.focus({
  349. preventScroll: !0
  350. });
  351. } catch (O) {
  352. }
  353. l.value = null;
  354. }
  355. B && ((C = e.afterClose) === null || C === void 0 || C.call(e));
  356. }
  357. }, d = (c) => {
  358. var h;
  359. (h = e.onClose) === null || h === void 0 || h.call(e, c);
  360. }, u = L(!1), s = L(), i = () => {
  361. clearTimeout(s.value), u.value = !0;
  362. }, y = () => {
  363. s.value = setTimeout(() => {
  364. u.value = !1;
  365. });
  366. }, S = (c) => {
  367. if (!e.maskClosable) return null;
  368. u.value ? u.value = !1 : r.value === c.target && d(c);
  369. }, $ = (c) => {
  370. if (e.keyboard && c.keyCode === Ge.ESC) {
  371. c.stopPropagation(), d(c);
  372. return;
  373. }
  374. e.visible && c.keyCode === Ge.TAB && p.value.changeActive(!c.shiftKey);
  375. };
  376. return _(() => e.visible, () => {
  377. e.visible && (m.value = !0);
  378. }, {
  379. flush: "post"
  380. }), nt(() => {
  381. var c;
  382. clearTimeout(s.value), (c = e.scrollLocker) === null || c === void 0 || c.unLock();
  383. }), lt(() => {
  384. var c, h;
  385. (c = e.scrollLocker) === null || c === void 0 || c.unLock(), m.value && ((h = e.scrollLocker) === null || h === void 0 || h.lock());
  386. }), () => {
  387. const {
  388. prefixCls: c,
  389. mask: h,
  390. visible: C,
  391. maskTransitionName: B,
  392. maskAnimation: O,
  393. zIndex: A,
  394. wrapClassName: z,
  395. rootClassName: b,
  396. wrapStyle: F,
  397. closable: M,
  398. maskProps: w,
  399. maskStyle: H,
  400. transitionName: X,
  401. animation: G,
  402. wrapProps: U,
  403. title: k = n.title
  404. } = e, {
  405. style: I,
  406. class: V
  407. } = o;
  408. return a("div", P({
  409. class: [`${c}-root`, b]
  410. }, Et(e, {
  411. data: !0
  412. })), [a(wo, {
  413. prefixCls: c,
  414. visible: h && C,
  415. motionName: Xe(c, B, O),
  416. style: f({
  417. zIndex: A
  418. }, H),
  419. maskProps: w
  420. }, null), a("div", P({
  421. tabIndex: -1,
  422. onKeydown: $,
  423. class: ye(`${c}-wrap`, z),
  424. ref: r,
  425. onClick: S,
  426. role: "dialog",
  427. "aria-labelledby": k ? x.value : null,
  428. style: f(f({
  429. zIndex: A
  430. }, F), {
  431. display: m.value ? null : "none"
  432. })
  433. }, U), [a($o, P(P({}, st(e, ["scrollLocker"])), {}, {
  434. style: I,
  435. class: V,
  436. onMousedown: i,
  437. onMouseup: y,
  438. ref: p,
  439. closable: M,
  440. ariaId: x.value,
  441. prefixCls: c,
  442. visible: C,
  443. onClose: d,
  444. onVisibleChanged: v,
  445. motionName: Xe(c, X, G)
  446. }), n)])]);
  447. };
  448. }
  449. }), To = Ee(), Bo = te({
  450. compatConfig: {
  451. MODE: 3
  452. },
  453. name: "DialogWrap",
  454. inheritAttrs: !1,
  455. props: Be(To, {
  456. visible: !1
  457. }),
  458. setup(e, t) {
  459. let {
  460. attrs: o,
  461. slots: n
  462. } = t;
  463. const l = T(e.visible);
  464. return Lt({}, {
  465. inTriggerContext: !1
  466. }), _(() => e.visible, () => {
  467. e.visible && (l.value = !0);
  468. }, {
  469. flush: "post"
  470. }), () => {
  471. const {
  472. visible: r,
  473. getContainer: p,
  474. forceRender: m,
  475. destroyOnClose: x = !1,
  476. afterClose: v
  477. } = e;
  478. let d = f(f(f({}, e), o), {
  479. ref: "_component",
  480. key: "dialog"
  481. });
  482. return p === !1 ? a(Qe, P(P({}, d), {}, {
  483. getOpenCount: () => 2
  484. }), n) : !m && x && !l.value ? null : a(kt, {
  485. autoLock: !0,
  486. visible: r,
  487. forceRender: m,
  488. getContainer: p
  489. }, {
  490. default: (u) => (d = f(f(f({}, d), u), {
  491. afterClose: () => {
  492. v == null || v(), l.value = !1;
  493. }
  494. }), a(Qe, d, n))
  495. });
  496. };
  497. }
  498. });
  499. function qe(e) {
  500. return {
  501. position: e,
  502. top: 0,
  503. insetInlineEnd: 0,
  504. bottom: 0,
  505. insetInlineStart: 0
  506. };
  507. }
  508. const Po = (e) => {
  509. const {
  510. componentCls: t
  511. } = e;
  512. return [{
  513. [`${t}-root`]: {
  514. [`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]: {
  515. // reset scale avoid mousePosition bug
  516. transform: "none",
  517. opacity: 0,
  518. animationDuration: e.motionDurationSlow,
  519. // https://github.com/ant-design/ant-design/issues/11777
  520. userSelect: "none"
  521. },
  522. [`${t}${e.antCls}-zoom-leave ${t}-content`]: {
  523. pointerEvents: "none"
  524. },
  525. [`${t}-mask`]: f(f({}, qe("fixed")), {
  526. zIndex: e.zIndexPopupBase,
  527. height: "100%",
  528. backgroundColor: e.colorBgMask,
  529. [`${t}-hidden`]: {
  530. display: "none"
  531. }
  532. }),
  533. [`${t}-wrap`]: f(f({}, qe("fixed")), {
  534. overflow: "auto",
  535. outline: 0,
  536. WebkitOverflowScrolling: "touch"
  537. })
  538. }
  539. }, {
  540. [`${t}-root`]: Co(e)
  541. }];
  542. }, Fo = (e) => {
  543. const {
  544. componentCls: t
  545. } = e;
  546. return [
  547. // ======================== Root =========================
  548. {
  549. [`${t}-root`]: {
  550. [`${t}-wrap`]: {
  551. zIndex: e.zIndexPopupBase,
  552. position: "fixed",
  553. inset: 0,
  554. overflow: "auto",
  555. outline: 0,
  556. WebkitOverflowScrolling: "touch"
  557. },
  558. [`${t}-wrap-rtl`]: {
  559. direction: "rtl"
  560. },
  561. [`${t}-centered`]: {
  562. textAlign: "center",
  563. "&::before": {
  564. display: "inline-block",
  565. width: 0,
  566. height: "100%",
  567. verticalAlign: "middle",
  568. content: '""'
  569. },
  570. [t]: {
  571. top: 0,
  572. display: "inline-block",
  573. paddingBottom: 0,
  574. textAlign: "start",
  575. verticalAlign: "middle"
  576. }
  577. },
  578. [`@media (max-width: ${e.screenSMMax})`]: {
  579. [t]: {
  580. maxWidth: "calc(100vw - 16px)",
  581. margin: `${e.marginXS} auto`
  582. },
  583. [`${t}-centered`]: {
  584. [t]: {
  585. flex: 1
  586. }
  587. }
  588. }
  589. }
  590. },
  591. // ======================== Modal ========================
  592. {
  593. [t]: f(f({}, jt(e)), {
  594. pointerEvents: "none",
  595. position: "relative",
  596. top: 100,
  597. width: "auto",
  598. maxWidth: `calc(100vw - ${e.margin * 2}px)`,
  599. margin: "0 auto",
  600. paddingBottom: e.paddingLG,
  601. [`${t}-title`]: {
  602. margin: 0,
  603. color: e.modalHeadingColor,
  604. fontWeight: e.fontWeightStrong,
  605. fontSize: e.modalHeaderTitleFontSize,
  606. lineHeight: e.modalHeaderTitleLineHeight,
  607. wordWrap: "break-word"
  608. },
  609. [`${t}-content`]: {
  610. position: "relative",
  611. backgroundColor: e.modalContentBg,
  612. backgroundClip: "padding-box",
  613. border: 0,
  614. borderRadius: e.borderRadiusLG,
  615. boxShadow: e.boxShadowSecondary,
  616. pointerEvents: "auto",
  617. padding: `${e.paddingMD}px ${e.paddingContentHorizontalLG}px`
  618. },
  619. [`${t}-close`]: f({
  620. position: "absolute",
  621. top: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
  622. insetInlineEnd: (e.modalHeaderCloseSize - e.modalCloseBtnSize) / 2,
  623. zIndex: e.zIndexPopupBase + 10,
  624. padding: 0,
  625. color: e.modalCloseColor,
  626. fontWeight: e.fontWeightStrong,
  627. lineHeight: 1,
  628. textDecoration: "none",
  629. background: "transparent",
  630. borderRadius: e.borderRadiusSM,
  631. width: e.modalConfirmIconSize,
  632. height: e.modalConfirmIconSize,
  633. border: 0,
  634. outline: 0,
  635. cursor: "pointer",
  636. transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
  637. "&-x": {
  638. display: "block",
  639. fontSize: e.fontSizeLG,
  640. fontStyle: "normal",
  641. lineHeight: `${e.modalCloseBtnSize}px`,
  642. textAlign: "center",
  643. textTransform: "none",
  644. textRendering: "auto"
  645. },
  646. "&:hover": {
  647. color: e.modalIconHoverColor,
  648. backgroundColor: e.wireframe ? "transparent" : e.colorFillContent,
  649. textDecoration: "none"
  650. },
  651. "&:active": {
  652. backgroundColor: e.wireframe ? "transparent" : e.colorFillContentHover
  653. }
  654. }, Gt(e)),
  655. [`${t}-header`]: {
  656. color: e.colorText,
  657. background: e.modalHeaderBg,
  658. borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,
  659. marginBottom: e.marginXS
  660. },
  661. [`${t}-body`]: {
  662. fontSize: e.fontSize,
  663. lineHeight: e.lineHeight,
  664. wordWrap: "break-word"
  665. },
  666. [`${t}-footer`]: {
  667. textAlign: "end",
  668. background: e.modalFooterBg,
  669. marginTop: e.marginSM,
  670. [`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]: {
  671. marginBottom: 0,
  672. marginInlineStart: e.marginXS
  673. }
  674. },
  675. [`${t}-open`]: {
  676. overflow: "hidden"
  677. }
  678. })
  679. },
  680. // ======================== Pure =========================
  681. {
  682. [`${t}-pure-panel`]: {
  683. top: "auto",
  684. padding: 0,
  685. display: "flex",
  686. flexDirection: "column",
  687. [`${t}-content,
  688. ${t}-body,
  689. ${t}-confirm-body-wrapper`]: {
  690. display: "flex",
  691. flexDirection: "column",
  692. flex: "auto"
  693. },
  694. [`${t}-confirm-body`]: {
  695. marginBottom: "auto"
  696. }
  697. }
  698. }
  699. ];
  700. }, Oo = (e) => {
  701. const {
  702. componentCls: t
  703. } = e, o = `${t}-confirm`;
  704. return {
  705. [o]: {
  706. "&-rtl": {
  707. direction: "rtl"
  708. },
  709. [`${e.antCls}-modal-header`]: {
  710. display: "none"
  711. },
  712. [`${o}-body-wrapper`]: f({}, Kt()),
  713. [`${o}-body`]: {
  714. display: "flex",
  715. flexWrap: "wrap",
  716. alignItems: "center",
  717. [`${o}-title`]: {
  718. flex: "0 0 100%",
  719. display: "block",
  720. // create BFC to avoid
  721. // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
  722. overflow: "hidden",
  723. color: e.colorTextHeading,
  724. fontWeight: e.fontWeightStrong,
  725. fontSize: e.modalHeaderTitleFontSize,
  726. lineHeight: e.modalHeaderTitleLineHeight,
  727. [`+ ${o}-content`]: {
  728. marginBlockStart: e.marginXS,
  729. flexBasis: "100%",
  730. maxWidth: `calc(100% - ${e.modalConfirmIconSize + e.marginSM}px)`
  731. }
  732. },
  733. [`${o}-content`]: {
  734. color: e.colorText,
  735. fontSize: e.fontSize
  736. },
  737. [`> ${e.iconCls}`]: {
  738. flex: "none",
  739. marginInlineEnd: e.marginSM,
  740. fontSize: e.modalConfirmIconSize,
  741. [`+ ${o}-title`]: {
  742. flex: 1
  743. },
  744. // `content` after `icon` should set marginLeft
  745. [`+ ${o}-title + ${o}-content`]: {
  746. marginInlineStart: e.modalConfirmIconSize + e.marginSM
  747. }
  748. }
  749. },
  750. [`${o}-btns`]: {
  751. textAlign: "end",
  752. marginTop: e.marginSM,
  753. [`${e.antCls}-btn + ${e.antCls}-btn`]: {
  754. marginBottom: 0,
  755. marginInlineStart: e.marginXS
  756. }
  757. }
  758. },
  759. [`${o}-error ${o}-body > ${e.iconCls}`]: {
  760. color: e.colorError
  761. },
  762. [`${o}-warning ${o}-body > ${e.iconCls},
  763. ${o}-confirm ${o}-body > ${e.iconCls}`]: {
  764. color: e.colorWarning
  765. },
  766. [`${o}-info ${o}-body > ${e.iconCls}`]: {
  767. color: e.colorInfo
  768. },
  769. [`${o}-success ${o}-body > ${e.iconCls}`]: {
  770. color: e.colorSuccess
  771. },
  772. // https://github.com/ant-design/ant-design/issues/37329
  773. [`${t}-zoom-leave ${t}-btns`]: {
  774. pointerEvents: "none"
  775. }
  776. };
  777. }, Mo = (e) => {
  778. const {
  779. componentCls: t
  780. } = e;
  781. return {
  782. [`${t}-root`]: {
  783. [`${t}-wrap-rtl`]: {
  784. direction: "rtl",
  785. [`${t}-confirm-body`]: {
  786. direction: "rtl"
  787. }
  788. }
  789. }
  790. };
  791. }, Ao = (e) => {
  792. const {
  793. componentCls: t,
  794. antCls: o
  795. } = e, n = `${t}-confirm`;
  796. return {
  797. [t]: {
  798. [`${t}-content`]: {
  799. padding: 0
  800. },
  801. [`${t}-header`]: {
  802. padding: e.modalHeaderPadding,
  803. borderBottom: `${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,
  804. marginBottom: 0
  805. },
  806. [`${t}-body`]: {
  807. padding: e.modalBodyPadding
  808. },
  809. [`${t}-footer`]: {
  810. padding: `${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,
  811. borderTop: `${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,
  812. borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,
  813. marginTop: 0
  814. }
  815. },
  816. [n]: {
  817. [`${o}-modal-body`]: {
  818. padding: `${e.padding * 2}px ${e.padding * 2}px ${e.paddingLG}px`
  819. },
  820. [`${n}-body`]: {
  821. [`> ${e.iconCls}`]: {
  822. marginInlineEnd: e.margin,
  823. // `content` after `icon` should set marginLeft
  824. [`+ ${n}-title + ${n}-content`]: {
  825. marginInlineStart: e.modalConfirmIconSize + e.margin
  826. }
  827. }
  828. },
  829. [`${n}-btns`]: {
  830. marginTop: e.marginLG
  831. }
  832. }
  833. };
  834. }, Ho = _t("Modal", (e) => {
  835. const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5, l = Wt(e, {
  836. modalBodyPadding: e.paddingLG,
  837. modalHeaderBg: e.colorBgElevated,
  838. modalHeaderPadding: `${t}px ${e.paddingLG}px`,
  839. modalHeaderBorderWidth: e.lineWidth,
  840. modalHeaderBorderStyle: e.lineType,
  841. modalHeaderTitleLineHeight: n,
  842. modalHeaderTitleFontSize: o,
  843. modalHeaderBorderColorSplit: e.colorSplit,
  844. modalHeaderCloseSize: n * o + t * 2,
  845. modalContentBg: e.colorBgElevated,
  846. modalHeadingColor: e.colorTextHeading,
  847. modalCloseColor: e.colorTextDescription,
  848. modalFooterBg: "transparent",
  849. modalFooterBorderColorSplit: e.colorSplit,
  850. modalFooterBorderStyle: e.lineType,
  851. modalFooterPaddingVertical: e.paddingXS,
  852. modalFooterPaddingHorizontal: e.padding,
  853. modalFooterBorderWidth: e.lineWidth,
  854. modalConfirmTitleFontSize: e.fontSizeLG,
  855. modalIconHoverColor: e.colorIconHover,
  856. modalConfirmIconSize: e.fontSize * e.lineHeight,
  857. modalCloseBtnSize: e.controlHeightLG * 0.55
  858. });
  859. return [Fo(l), Oo(l), Mo(l), Po(l), e.wireframe && Ao(l), Vt(l, "zoom")];
  860. });
  861. var zo = function(e, t) {
  862. var o = {};
  863. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
  864. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, n = Object.getOwnPropertySymbols(e); l < n.length; l++)
  865. t.indexOf(n[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[l]) && (o[n[l]] = e[n[l]]);
  866. return o;
  867. };
  868. let Ie;
  869. const Io = (e) => {
  870. Ie = {
  871. x: e.pageX,
  872. y: e.pageY
  873. }, setTimeout(() => Ie = null, 100);
  874. };
  875. Qt() && qt(document.documentElement, "click", Io, !0);
  876. const No = () => ({
  877. prefixCls: String,
  878. /** @deprecated Please use `open` instead. */
  879. visible: {
  880. type: Boolean,
  881. default: void 0
  882. },
  883. open: {
  884. type: Boolean,
  885. default: void 0
  886. },
  887. confirmLoading: {
  888. type: Boolean,
  889. default: void 0
  890. },
  891. title: E.any,
  892. closable: {
  893. type: Boolean,
  894. default: void 0
  895. },
  896. closeIcon: E.any,
  897. onOk: Function,
  898. onCancel: Function,
  899. "onUpdate:visible": Function,
  900. "onUpdate:open": Function,
  901. onChange: Function,
  902. afterClose: Function,
  903. centered: {
  904. type: Boolean,
  905. default: void 0
  906. },
  907. width: [String, Number],
  908. footer: E.any,
  909. okText: E.any,
  910. okType: String,
  911. cancelText: E.any,
  912. icon: E.any,
  913. maskClosable: {
  914. type: Boolean,
  915. default: void 0
  916. },
  917. forceRender: {
  918. type: Boolean,
  919. default: void 0
  920. },
  921. okButtonProps: ge(),
  922. cancelButtonProps: ge(),
  923. destroyOnClose: {
  924. type: Boolean,
  925. default: void 0
  926. },
  927. wrapClassName: String,
  928. maskTransitionName: String,
  929. transitionName: String,
  930. getContainer: {
  931. type: [String, Function, Boolean, Object],
  932. default: void 0
  933. },
  934. zIndex: Number,
  935. bodyStyle: ge(),
  936. maskStyle: ge(),
  937. mask: {
  938. type: Boolean,
  939. default: void 0
  940. },
  941. keyboard: {
  942. type: Boolean,
  943. default: void 0
  944. },
  945. wrapProps: Object,
  946. focusTriggerAfterClose: {
  947. type: Boolean,
  948. default: void 0
  949. },
  950. modalRender: Function,
  951. mousePosition: ge()
  952. }), W = te({
  953. compatConfig: {
  954. MODE: 3
  955. },
  956. name: "AModal",
  957. inheritAttrs: !1,
  958. props: Be(No(), {
  959. width: 520,
  960. confirmLoading: !1,
  961. okType: "primary"
  962. }),
  963. setup(e, t) {
  964. let {
  965. emit: o,
  966. slots: n,
  967. attrs: l
  968. } = t;
  969. const [r] = Re("Modal"), {
  970. prefixCls: p,
  971. rootPrefixCls: m,
  972. direction: x,
  973. getPopupContainer: v
  974. } = Xt("modal", e), [d, u] = Ho(p);
  975. ct(e.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
  976. const s = (S) => {
  977. o("update:visible", !1), o("update:open", !1), o("cancel", S), o("change", !1);
  978. }, i = (S) => {
  979. o("ok", S);
  980. }, y = () => {
  981. var S, $;
  982. const {
  983. okText: c = (S = n.okText) === null || S === void 0 ? void 0 : S.call(n),
  984. okType: h,
  985. cancelText: C = ($ = n.cancelText) === null || $ === void 0 ? void 0 : $.call(n),
  986. confirmLoading: B
  987. } = e;
  988. return a(He, null, [a(ze, P({
  989. onClick: s
  990. }, e.cancelButtonProps), {
  991. default: () => [C || r.value.cancelText]
  992. }), a(ze, P(P({}, Ut(h)), {}, {
  993. loading: B,
  994. onClick: i
  995. }, e.okButtonProps), {
  996. default: () => [c || r.value.okText]
  997. })]);
  998. };
  999. return () => {
  1000. var S, $;
  1001. const {
  1002. prefixCls: c,
  1003. visible: h,
  1004. open: C,
  1005. wrapClassName: B,
  1006. centered: O,
  1007. getContainer: A,
  1008. closeIcon: z = (S = n.closeIcon) === null || S === void 0 ? void 0 : S.call(n),
  1009. focusTriggerAfterClose: b = !0
  1010. } = e, F = zo(e, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), M = ye(B, {
  1011. [`${p.value}-centered`]: !!O,
  1012. [`${p.value}-wrap-rtl`]: x.value === "rtl"
  1013. });
  1014. return d(a(Bo, P(P(P({}, F), l), {}, {
  1015. rootClassName: u.value,
  1016. class: ye(u.value, l.class),
  1017. getContainer: A || (v == null ? void 0 : v.value),
  1018. prefixCls: p.value,
  1019. wrapClassName: M,
  1020. visible: C != null ? C : h,
  1021. onClose: s,
  1022. focusTriggerAfterClose: b,
  1023. transitionName: Te(m.value, "zoom", e.transitionName),
  1024. maskTransitionName: Te(m.value, "fade", e.maskTransitionName),
  1025. mousePosition: ($ = F.mousePosition) !== null && $ !== void 0 ? $ : Ie
  1026. }), f(f({}, n), {
  1027. footer: n.footer || y,
  1028. closeIcon: () => a("span", {
  1029. class: `${p.value}-close-x`
  1030. }, [z || a(Yt, {
  1031. class: `${p.value}-close-icon`
  1032. }, null)])
  1033. })));
  1034. };
  1035. }
  1036. });
  1037. function fe(e) {
  1038. return typeof e == "function" ? e() : e;
  1039. }
  1040. const dt = te({
  1041. name: "ConfirmDialog",
  1042. inheritAttrs: !1,
  1043. props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  1044. setup(e, t) {
  1045. let {
  1046. attrs: o
  1047. } = t;
  1048. const [n] = Re("Modal");
  1049. return process.env.NODE_ENV !== "production" && ct(e.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
  1050. const {
  1051. icon: l,
  1052. onCancel: r,
  1053. onOk: p,
  1054. close: m,
  1055. okText: x,
  1056. closable: v = !1,
  1057. zIndex: d,
  1058. afterClose: u,
  1059. keyboard: s,
  1060. centered: i,
  1061. getContainer: y,
  1062. maskStyle: S,
  1063. okButtonProps: $,
  1064. cancelButtonProps: c,
  1065. okCancel: h,
  1066. width: C = 416,
  1067. mask: B = !0,
  1068. maskClosable: O = !1,
  1069. type: A,
  1070. open: z,
  1071. title: b,
  1072. content: F,
  1073. direction: M,
  1074. closeIcon: w,
  1075. modalRender: H,
  1076. focusTriggerAfterClose: X,
  1077. rootPrefixCls: G,
  1078. bodyStyle: U,
  1079. wrapClassName: k,
  1080. footer: I
  1081. } = e;
  1082. let V = l;
  1083. if (!l && l !== null)
  1084. switch (A) {
  1085. case "info":
  1086. V = a(to, null, null);
  1087. break;
  1088. case "success":
  1089. V = a(eo, null, null);
  1090. break;
  1091. case "error":
  1092. V = a(Zt, null, null);
  1093. break;
  1094. default:
  1095. V = a(Jt, null, null);
  1096. }
  1097. const me = e.okType || "primary", Q = e.prefixCls || "ant-modal", Y = `${Q}-confirm`, Pe = o.style || {}, be = h != null ? h : A === "confirm", re = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", se = `${Q}-confirm`, Fe = ye(se, `${se}-${e.type}`, {
  1098. [`${se}-rtl`]: M === "rtl"
  1099. }, o.class), ve = n.value, Oe = be && a(Ke, {
  1100. actionFn: r,
  1101. close: m,
  1102. autofocus: re === "cancel",
  1103. buttonProps: c,
  1104. prefixCls: `${G}-btn`
  1105. }, {
  1106. default: () => [fe(e.cancelText) || ve.cancelText]
  1107. });
  1108. return a(W, {
  1109. prefixCls: Q,
  1110. class: Fe,
  1111. wrapClassName: ye({
  1112. [`${se}-centered`]: !!i
  1113. }, k),
  1114. onCancel: (he) => m == null ? void 0 : m({
  1115. triggerCancel: !0
  1116. }, he),
  1117. open: z,
  1118. title: "",
  1119. footer: "",
  1120. transitionName: Te(G, "zoom", e.transitionName),
  1121. maskTransitionName: Te(G, "fade", e.maskTransitionName),
  1122. mask: B,
  1123. maskClosable: O,
  1124. maskStyle: S,
  1125. style: Pe,
  1126. bodyStyle: U,
  1127. width: C,
  1128. zIndex: d,
  1129. afterClose: u,
  1130. keyboard: s,
  1131. centered: i,
  1132. getContainer: y,
  1133. closable: v,
  1134. closeIcon: w,
  1135. modalRender: H,
  1136. focusTriggerAfterClose: X
  1137. }, {
  1138. default: () => [a("div", {
  1139. class: `${Y}-body-wrapper`
  1140. }, [a("div", {
  1141. class: `${Y}-body`
  1142. }, [fe(V), b === void 0 ? null : a("span", {
  1143. class: `${Y}-title`
  1144. }, [fe(b)]), a("div", {
  1145. class: `${Y}-content`
  1146. }, [fe(F)])]), I !== void 0 ? fe(I) : a("div", {
  1147. class: `${Y}-btns`
  1148. }, [Oe, a(Ke, {
  1149. type: me,
  1150. actionFn: p,
  1151. close: m,
  1152. autofocus: re === "ok",
  1153. buttonProps: $,
  1154. prefixCls: `${G}-btn`
  1155. }, {
  1156. default: () => [fe(x) || (be ? ve.okText : ve.justOkText)]
  1157. })])])]
  1158. });
  1159. };
  1160. }
  1161. }), ie = [], Ce = (e) => {
  1162. const t = document.createDocumentFragment();
  1163. let o = f(f({}, st(e, ["parentContext", "appContext"])), {
  1164. close: r,
  1165. open: !0
  1166. }), n = null;
  1167. function l() {
  1168. n && (We(null, t), n = null);
  1169. for (var v = arguments.length, d = new Array(v), u = 0; u < v; u++)
  1170. d[u] = arguments[u];
  1171. const s = d.some((i) => i && i.triggerCancel);
  1172. e.onCancel && s && e.onCancel(() => {
  1173. }, ...d.slice(1));
  1174. for (let i = 0; i < ie.length; i++)
  1175. if (ie[i] === r) {
  1176. ie.splice(i, 1);
  1177. break;
  1178. }
  1179. }
  1180. function r() {
  1181. for (var v = arguments.length, d = new Array(v), u = 0; u < v; u++)
  1182. d[u] = arguments[u];
  1183. o = f(f({}, o), {
  1184. open: !1,
  1185. afterClose: () => {
  1186. typeof e.afterClose == "function" && e.afterClose(), l.apply(this, d);
  1187. }
  1188. }), o.visible && delete o.visible, p(o);
  1189. }
  1190. function p(v) {
  1191. typeof v == "function" ? o = v(o) : o = f(f({}, o), v), n && oo(n, o, t);
  1192. }
  1193. const m = (v) => {
  1194. const d = no, u = d.prefixCls, s = v.prefixCls || `${u}-modal`, i = d.iconPrefixCls, y = ao();
  1195. return a(lo, P(P({}, d), {}, {
  1196. prefixCls: u
  1197. }), {
  1198. default: () => [a(dt, P(P({}, v), {}, {
  1199. rootPrefixCls: u,
  1200. prefixCls: s,
  1201. iconPrefixCls: i,
  1202. locale: y,
  1203. cancelText: v.cancelText || y.cancelText
  1204. }), null)]
  1205. });
  1206. };
  1207. function x(v) {
  1208. const d = a(m, f({}, v));
  1209. return d.appContext = e.parentContext || e.appContext || d.appContext, We(d, t), d;
  1210. }
  1211. return n = x(o), ie.push(r), {
  1212. destroy: r,
  1213. update: p
  1214. };
  1215. };
  1216. function ut(e) {
  1217. return f(f({}, e), {
  1218. type: "warning"
  1219. });
  1220. }
  1221. function ft(e) {
  1222. return f(f({}, e), {
  1223. type: "info"
  1224. });
  1225. }
  1226. function mt(e) {
  1227. return f(f({}, e), {
  1228. type: "success"
  1229. });
  1230. }
  1231. function vt(e) {
  1232. return f(f({}, e), {
  1233. type: "error"
  1234. });
  1235. }
  1236. function pt(e) {
  1237. return f(f({}, e), {
  1238. type: "confirm"
  1239. });
  1240. }
  1241. const Ro = () => ({
  1242. config: Object,
  1243. afterClose: Function,
  1244. destroyAction: Function,
  1245. open: Boolean
  1246. }), Eo = te({
  1247. name: "HookModal",
  1248. inheritAttrs: !1,
  1249. props: Be(Ro(), {
  1250. config: {
  1251. width: 520,
  1252. okType: "primary"
  1253. }
  1254. }),
  1255. setup(e, t) {
  1256. let {
  1257. expose: o
  1258. } = t;
  1259. var n;
  1260. const l = q(() => e.open), r = q(() => e.config), {
  1261. direction: p,
  1262. getPrefixCls: m
  1263. } = io(), x = m("modal"), v = m(), d = () => {
  1264. var y, S;
  1265. e == null || e.afterClose(), (S = (y = r.value).afterClose) === null || S === void 0 || S.call(y);
  1266. }, u = function() {
  1267. e.destroyAction(...arguments);
  1268. };
  1269. o({
  1270. destroy: u
  1271. });
  1272. const s = (n = r.value.okCancel) !== null && n !== void 0 ? n : r.value.type === "confirm", [i] = Re("Modal", ro.Modal);
  1273. return () => a(dt, P(P({
  1274. prefixCls: x,
  1275. rootPrefixCls: v
  1276. }, r.value), {}, {
  1277. close: u,
  1278. open: l.value,
  1279. afterClose: d,
  1280. okText: r.value.okText || (s ? i == null ? void 0 : i.value.okText : i == null ? void 0 : i.value.justOkText),
  1281. direction: r.value.direction || p.value,
  1282. cancelText: r.value.cancelText || (i == null ? void 0 : i.value.cancelText)
  1283. }), null);
  1284. }
  1285. });
  1286. let Je = 0;
  1287. const Do = te({
  1288. name: "ElementsHolder",
  1289. inheritAttrs: !1,
  1290. setup(e, t) {
  1291. let {
  1292. expose: o
  1293. } = t;
  1294. const n = L([]);
  1295. return o({
  1296. addModal: (r) => (n.value.push(r), n.value = n.value.slice(), () => {
  1297. n.value = n.value.filter((p) => p !== r);
  1298. })
  1299. }), () => n.value.map((r) => r());
  1300. }
  1301. });
  1302. function Lo() {
  1303. const e = L(null), t = L([]);
  1304. _(t, () => {
  1305. t.value.length && ([...t.value].forEach((p) => {
  1306. p();
  1307. }), t.value = []);
  1308. }, {
  1309. immediate: !0
  1310. });
  1311. const o = (r) => function(m) {
  1312. var x;
  1313. Je += 1;
  1314. const v = L(!0), d = L(null), u = L(Ne(m)), s = L({});
  1315. _(() => m, (C) => {
  1316. $(f(f({}, at(C) ? C.value : C), s.value));
  1317. });
  1318. const i = function() {
  1319. v.value = !1;
  1320. for (var C = arguments.length, B = new Array(C), O = 0; O < C; O++)
  1321. B[O] = arguments[O];
  1322. const A = B.some((z) => z && z.triggerCancel);
  1323. u.value.onCancel && A && u.value.onCancel(() => {
  1324. }, ...B.slice(1));
  1325. };
  1326. let y;
  1327. const S = () => a(Eo, {
  1328. key: `modal-${Je}`,
  1329. config: r(u.value),
  1330. ref: d,
  1331. open: v.value,
  1332. destroyAction: i,
  1333. afterClose: () => {
  1334. y == null || y();
  1335. }
  1336. }, null);
  1337. y = (x = e.value) === null || x === void 0 ? void 0 : x.addModal(S), y && ie.push(y);
  1338. const $ = (C) => {
  1339. u.value = f(f({}, u.value), C);
  1340. };
  1341. return {
  1342. destroy: () => {
  1343. d.value ? i() : t.value = [...t.value, i];
  1344. },
  1345. update: (C) => {
  1346. s.value = C, d.value ? $(C) : t.value = [...t.value, () => $(C)];
  1347. }
  1348. };
  1349. }, n = q(() => ({
  1350. info: o(ft),
  1351. success: o(mt),
  1352. error: o(vt),
  1353. warning: o(ut),
  1354. confirm: o(pt)
  1355. })), l = Symbol("modalHolderKey");
  1356. return [n.value, () => a(Do, {
  1357. key: l,
  1358. ref: e
  1359. }, null)];
  1360. }
  1361. function gt(e) {
  1362. return Ce(ut(e));
  1363. }
  1364. W.useModal = Lo;
  1365. W.info = function(t) {
  1366. return Ce(ft(t));
  1367. };
  1368. W.success = function(t) {
  1369. return Ce(mt(t));
  1370. };
  1371. W.error = function(t) {
  1372. return Ce(vt(t));
  1373. };
  1374. W.warning = gt;
  1375. W.warn = gt;
  1376. W.confirm = function(t) {
  1377. return Ce(pt(t));
  1378. };
  1379. W.destroyAll = function() {
  1380. for (; ie.length; ) {
  1381. const t = ie.pop();
  1382. t && t();
  1383. }
  1384. };
  1385. W.install = function(e) {
  1386. return e.component(W.name, W), e;
  1387. };
  1388. function ko(e) {
  1389. return Ot() ? (Mt(e), !0) : !1;
  1390. }
  1391. function R(e) {
  1392. return typeof e == "function" ? e() : Ne(e);
  1393. }
  1394. const yt = typeof window != "undefined" && typeof document != "undefined";
  1395. typeof WorkerGlobalScope != "undefined" && globalThis instanceof WorkerGlobalScope;
  1396. const _o = Object.prototype.toString, Wo = (e) => _o.call(e) === "[object Object]", Vo = () => {
  1397. };
  1398. function jo(e, t = {}) {
  1399. if (!at(e))
  1400. return Pt(e);
  1401. const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
  1402. for (const n in e.value)
  1403. o[n] = Ft(() => ({
  1404. get() {
  1405. return e.value[n];
  1406. },
  1407. set(l) {
  1408. var r;
  1409. if ((r = R(t.replaceRef)) != null ? r : !0)
  1410. if (Array.isArray(e.value)) {
  1411. const m = [...e.value];
  1412. m[n] = l, e.value = m;
  1413. } else {
  1414. const m = Me(pe({}, e.value), { [n]: l });
  1415. Object.setPrototypeOf(m, Object.getPrototypeOf(e.value)), e.value = m;
  1416. }
  1417. else
  1418. e.value[n] = l;
  1419. }
  1420. }));
  1421. return o;
  1422. }
  1423. const Ct = yt ? window : void 0;
  1424. function Go(e) {
  1425. var t;
  1426. const o = R(e);
  1427. return (t = o == null ? void 0 : o.$el) != null ? t : o;
  1428. }
  1429. function Ae(...e) {
  1430. let t, o, n, l;
  1431. if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, n, l] = e, t = Ct) : [t, o, n, l] = e, !t)
  1432. return Vo;
  1433. Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]);
  1434. const r = [], p = () => {
  1435. r.forEach((d) => d()), r.length = 0;
  1436. }, m = (d, u, s, i) => (d.addEventListener(u, s, i), () => d.removeEventListener(u, s, i)), x = _(
  1437. () => [Go(t), R(l)],
  1438. ([d, u]) => {
  1439. if (p(), !d)
  1440. return;
  1441. const s = Wo(u) ? pe({}, u) : u;
  1442. r.push(
  1443. ...o.flatMap((i) => n.map((y) => m(d, i, y, s)))
  1444. );
  1445. },
  1446. { immediate: !0, flush: "post" }
  1447. ), v = () => {
  1448. x(), p();
  1449. };
  1450. return ko(v), v;
  1451. }
  1452. function Ko(e, t = {}) {
  1453. var o, n;
  1454. const {
  1455. pointerTypes: l,
  1456. preventDefault: r,
  1457. stopPropagation: p,
  1458. exact: m,
  1459. onMove: x,
  1460. onEnd: v,
  1461. onStart: d,
  1462. initialValue: u,
  1463. axis: s = "both",
  1464. draggingElement: i = Ct,
  1465. containerElement: y,
  1466. handle: S = e,
  1467. buttons: $ = [0]
  1468. } = t, c = T(
  1469. (o = R(u)) != null ? o : { x: 0, y: 0 }
  1470. ), h = T(), C = (b) => l ? l.includes(b.pointerType) : !0, B = (b) => {
  1471. R(r) && b.preventDefault(), R(p) && b.stopPropagation();
  1472. }, O = (b) => {
  1473. var F;
  1474. if (!R($).includes(b.button) || R(t.disabled) || !C(b) || R(m) && b.target !== R(e))
  1475. return;
  1476. const M = R(y), w = (F = M == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : F.call(M), H = R(e).getBoundingClientRect(), X = {
  1477. x: b.clientX - (M ? H.left - w.left + M.scrollLeft : H.left),
  1478. y: b.clientY - (M ? H.top - w.top + M.scrollTop : H.top)
  1479. };
  1480. (d == null ? void 0 : d(X, b)) !== !1 && (h.value = X, B(b));
  1481. }, A = (b) => {
  1482. if (R(t.disabled) || !C(b) || !h.value)
  1483. return;
  1484. const F = R(y), M = R(e).getBoundingClientRect();
  1485. let { x: w, y: H } = c.value;
  1486. (s === "x" || s === "both") && (w = b.clientX - h.value.x, F && (w = Math.min(Math.max(0, w), F.scrollWidth - M.width))), (s === "y" || s === "both") && (H = b.clientY - h.value.y, F && (H = Math.min(Math.max(0, H), F.scrollHeight - M.height))), c.value = {
  1487. x: w,
  1488. y: H
  1489. }, x == null || x(c.value, b), B(b);
  1490. }, z = (b) => {
  1491. R(t.disabled) || !C(b) || h.value && (h.value = void 0, v == null || v(c.value, b), B(b));
  1492. };
  1493. if (yt) {
  1494. const b = { capture: (n = t.capture) != null ? n : !0 };
  1495. Ae(S, "pointerdown", O, b), Ae(i, "pointermove", A, b), Ae(i, "pointerup", z, b);
  1496. }
  1497. return Me(pe({}, jo(c)), {
  1498. position: c,
  1499. isDragging: q(() => !!h.value),
  1500. style: q(
  1501. () => `left:${c.value.x}px;top:${c.value.y}px;`
  1502. )
  1503. });
  1504. }
  1505. const Xo = { class: "modalHeader" }, Yo = {
  1506. key: 0,
  1507. class: "tabs-wrap"
  1508. }, Uo = {
  1509. key: 1,
  1510. class: "step-wrap",
  1511. ref: "stepRef"
  1512. }, Qo = { class: "modal-body-container" }, qo = /* @__PURE__ */ Object.assign({ name: "SModal" }, {
  1513. __name: "SModal",
  1514. props: {
  1515. // 确定按钮 loading,保存中禁止关闭
  1516. loading: {
  1517. type: Boolean,
  1518. default: !1
  1519. },
  1520. // 是否垂直居中显示
  1521. centered: {
  1522. type: Boolean,
  1523. default: !0
  1524. },
  1525. // 点遮罩是否关闭
  1526. maskClosable: {
  1527. type: Boolean,
  1528. default: !0
  1529. },
  1530. // 是否显示遮罩
  1531. mask: {
  1532. type: Boolean,
  1533. default: !0
  1534. },
  1535. // 非居中时的距顶距离
  1536. topStyle: {
  1537. type: String,
  1538. default: ""
  1539. },
  1540. // 是否显示右上角关闭按钮
  1541. closable: {
  1542. type: Boolean,
  1543. default: !0
  1544. },
  1545. // 关闭后是否销毁内容
  1546. destroyOnClose: {
  1547. type: Boolean,
  1548. default: !1
  1549. },
  1550. // 是否支持 Esc 关闭
  1551. keyboardOpen: {
  1552. type: Boolean,
  1553. default: !0
  1554. },
  1555. // 弹窗标题
  1556. title: {
  1557. type: String,
  1558. default: ""
  1559. },
  1560. // 显隐(v-model:value)
  1561. value: {
  1562. type: Boolean,
  1563. default: !1
  1564. },
  1565. // 弹窗宽度,默认 60vw
  1566. width: {
  1567. type: [String, Number],
  1568. default: "60vw"
  1569. },
  1570. // 内容区高度占视口的百分比(60 = 60vh)
  1571. boxHeight: {
  1572. type: [String, Number],
  1573. default: 60
  1574. },
  1575. // 内容区样式,默认纵向滚动、隐藏横向滚动
  1576. bodyStyle: {
  1577. type: Object,
  1578. default() {
  1579. return {
  1580. overflowX: "hidden",
  1581. overflowY: "auto"
  1582. };
  1583. }
  1584. },
  1585. // 是否显示全屏按钮
  1586. showFullScreen: {
  1587. type: Boolean,
  1588. default: !0
  1589. },
  1590. // 是否默认以全屏状态展示,仍可点右上角还原
  1591. defaultFullScreen: {
  1592. type: Boolean,
  1593. default: !1
  1594. },
  1595. // 页签配置,传了才显示页签区
  1596. tabs: {
  1597. type: Array,
  1598. default: () => []
  1599. },
  1600. // 页签字段映射:{ label, value }
  1601. tabKey: {
  1602. type: Object,
  1603. default: () => ({
  1604. label: "label",
  1605. value: "value"
  1606. })
  1607. },
  1608. // 步骤条配置,传了才显示步骤区
  1609. steps: {
  1610. type: Array,
  1611. default: () => []
  1612. },
  1613. // 步骤条默认选中下标
  1614. stepDefaultActive: {
  1615. type: Number,
  1616. default: 0
  1617. },
  1618. // 切换步骤前的校验函数,返回 false 停在当前步
  1619. stepValid: {
  1620. type: Function,
  1621. default: void 0
  1622. },
  1623. // 确定按钮文案
  1624. saveBtnText: {
  1625. type: String,
  1626. default: window.$l("保存")
  1627. }
  1628. },
  1629. emits: [
  1630. "update:value",
  1631. "handCancel",
  1632. "afterClose",
  1633. "tabsChange",
  1634. "stepCallback",
  1635. "handSave"
  1636. ],
  1637. setup(e, { emit: t }) {
  1638. const o = e, n = t, l = At(), r = T(null), p = T(), { x: m, y: x, isDragging: v } = Ko(r), d = T(0), u = T(0), s = T(!1), i = T(0), y = T(0), S = T(0), $ = T(0), c = T({ left: 0, right: 0, top: 0, bottom: 0 }), h = T(null), C = T(null), B = T(o.defaultFullScreen ? "100vw" : o.width), O = T(o.defaultFullScreen ? "s-full-modal" : ""), A = T(o.value), z = T(8), b = q(() => o.tabKey && o.tabKey.value || "value"), F = T("");
  1639. _(() => o.tabs, () => {
  1640. const g = o.tabs || [];
  1641. if (!g.length) {
  1642. F.value = "";
  1643. return;
  1644. }
  1645. const j = b.value;
  1646. g.some((K) => K && K[j] === F.value) || (F.value = g[0][j]);
  1647. }, { immediate: !0, deep: !0 });
  1648. const w = T(0), H = q(() => w.value === o.steps.length - 1), X = q(() => ({
  1649. transform: `translate(${i.value}px, ${y.value}px)`
  1650. })), G = T(pe({}, o.bodyStyle));
  1651. let U = -1, k = null, I = null;
  1652. const V = (g) => {
  1653. p.value = g, r.value = O.value ? null : g;
  1654. }, me = () => {
  1655. const g = h.value;
  1656. if (!g) return;
  1657. const j = r.value, K = C.value, J = g.scrollHeight || g.clientHeight;
  1658. if (!J) return;
  1659. const Se = (j == null ? void 0 : j.clientHeight) || 0, xe = (K == null ? void 0 : K.clientHeight) || 0, $e = document.body.offsetHeight, Z = J + Se + xe + 85 >= $e ? $e - Se - xe - 82 : J;
  1660. Z <= 0 || Z === U || (U = Z, G.value = Object.assign({ height: `${Z}px` }, o.bodyStyle));
  1661. }, Q = () => {
  1662. ot(() => {
  1663. k || (k = requestAnimationFrame(() => {
  1664. k = null, me();
  1665. }));
  1666. });
  1667. }, Y = (g) => {
  1668. g ? (B.value = "100vw", O.value = "s-full-modal", r.value = null, i.value = 0, y.value = 0) : (B.value = o.width, O.value = "", r.value = p.value);
  1669. }, Pe = () => {
  1670. Y(!0);
  1671. }, be = () => {
  1672. Y(!1);
  1673. }, re = () => {
  1674. n("update:value", !1), n("handCancel");
  1675. }, se = () => {
  1676. Y(o.defaultFullScreen), n("afterClose");
  1677. };
  1678. _(
  1679. () => o.defaultFullScreen,
  1680. (g) => Y(g)
  1681. );
  1682. const Fe = (g) => {
  1683. F.value = g, n("tabsChange", g);
  1684. };
  1685. function ve() {
  1686. w.value--, n("stepCallback", "prev", w.value);
  1687. }
  1688. function Oe() {
  1689. if (!window.$utils.isFunction(o.stepValid)) {
  1690. w.value++, n("stepCallback", "next", w.value);
  1691. return;
  1692. }
  1693. o.stepValid(w.value).then((g) => {
  1694. g && (w.value++, n("stepCallback", "next", w.value));
  1695. });
  1696. }
  1697. function he() {
  1698. n("handSave", "save");
  1699. }
  1700. return lt(() => {
  1701. s.value && (i.value = S.value + Math.min(Math.max(c.value.left, m.value), c.value.right) - d.value, y.value = $.value + Math.min(Math.max(c.value.top, x.value), c.value.bottom) - u.value);
  1702. }), _([m, x], () => {
  1703. var g, j;
  1704. if (!s.value) {
  1705. d.value = m.value, u.value = x.value;
  1706. const K = document.body.getBoundingClientRect(), J = (j = (g = r.value) == null ? void 0 : g.getBoundingClientRect()) != null ? j : { width: 0, height: 0 };
  1707. c.value.right = K.width - J.width, c.value.bottom = K.height - J.height, S.value = i.value, $.value = y.value;
  1708. }
  1709. s.value = !0;
  1710. }), _(v, () => {
  1711. v.value || (s.value = !1);
  1712. }), _(h, (g) => {
  1713. I && (I.disconnect(), I = null), g && typeof ResizeObserver != "undefined" && (I = new ResizeObserver(() => Q()), I.observe(g)), Q();
  1714. }), _(
  1715. () => o.value,
  1716. (g) => {
  1717. g ? (A.value = !0, Q()) : A.value = !1;
  1718. },
  1719. { deep: !0 }
  1720. ), _(
  1721. () => A.value,
  1722. (g) => {
  1723. g && Q();
  1724. }
  1725. ), _(
  1726. () => o.value,
  1727. () => {
  1728. o.value && Q();
  1729. },
  1730. { immediate: !0 }
  1731. ), nt(() => {
  1732. I && (I.disconnect(), I = null), k && (cancelAnimationFrame(k), k = null);
  1733. }), (g, j) => {
  1734. const K = fo, J = uo, Se = vo, xe = mo, $e = co, Z = po, De = we("poweroff-outlined"), ce = ze, Le = we("save-outlined"), bt = we("arrow-left-outlined"), ht = we("arrow-right-outlined"), St = W;
  1735. return D(), ne(St, Ht({
  1736. open: A.value,
  1737. "body-style": G.value,
  1738. width: B.value,
  1739. centered: e.centered,
  1740. onCancel: re,
  1741. afterClose: se,
  1742. destroyOnClose: e.destroyOnClose,
  1743. keyboard: e.keyboardOpen,
  1744. style: e.topStyle,
  1745. maskClosable: e.maskClosable,
  1746. mask: e.mask,
  1747. "wrap-class-name": "s-modal " + O.value
  1748. }, Ne(l)), {
  1749. title: N(() => [
  1750. de("div", Xo, [
  1751. de("div", {
  1752. ref: V,
  1753. class: "draggableTitle"
  1754. }, ae(e.title), 513),
  1755. a(Nt, {
  1756. width: B.value,
  1757. showFullScreen: e.showFullScreen,
  1758. onFullScreen: Pe,
  1759. onReduction: be
  1760. }, null, 8, ["width", "showFullScreen"])
  1761. ])
  1762. ]),
  1763. footer: N(() => [
  1764. j[0] || (j[0] = de("div", { class: "footer-top-border" }, null, -1)),
  1765. g.$slots.footer ? (D(), le("div", {
  1766. key: 0,
  1767. ref_key: "footerSlot",
  1768. ref: C
  1769. }, [
  1770. a(Z, { size: z.value }, {
  1771. default: N(() => [
  1772. je(g.$slots, "footer", {}, void 0, !0)
  1773. ]),
  1774. _: 3
  1775. }, 8, ["size"])
  1776. ], 512)) : ee("", !0),
  1777. !g.$slots.footer && (!e.steps || !e.steps.length) ? (D(), le("div", {
  1778. key: 1,
  1779. ref_key: "footerSlot",
  1780. ref: C
  1781. }, [
  1782. a(Z, { size: z.value }, {
  1783. default: N(() => [
  1784. a(ce, { onClick: re }, {
  1785. default: N(() => [
  1786. a(De),
  1787. ue(ae(g.$l("关闭")), 1)
  1788. ]),
  1789. _: 1
  1790. }),
  1791. a(ce, {
  1792. type: "primary",
  1793. onClick: he
  1794. }, {
  1795. default: N(() => [
  1796. a(Le),
  1797. ue(" " + ae(g.$l(e.saveBtnText)), 1)
  1798. ]),
  1799. _: 1
  1800. })
  1801. ]),
  1802. _: 1
  1803. }, 8, ["size"])
  1804. ], 512)) : ee("", !0),
  1805. e.steps && e.steps.length > 0 ? (D(), le("div", {
  1806. key: 2,
  1807. ref_key: "footerSlot",
  1808. ref: C
  1809. }, [
  1810. a(Z, { size: z.value }, {
  1811. default: N(() => [
  1812. a(ce, { onClick: re }, {
  1813. default: N(() => [
  1814. a(De),
  1815. ue(ae(g.$l("关闭")), 1)
  1816. ]),
  1817. _: 1
  1818. }),
  1819. e.steps.length ? (D(), ne(ce, {
  1820. key: 0,
  1821. disabled: w.value === e.stepDefaultActive,
  1822. onClick: ve
  1823. }, {
  1824. default: N(() => [
  1825. a(bt),
  1826. ue(ae(g.$l("上一步")), 1)
  1827. ]),
  1828. _: 1
  1829. }, 8, ["disabled"])) : ee("", !0),
  1830. e.steps.length ? (D(), ne(ce, {
  1831. key: 1,
  1832. type: "primary",
  1833. disabled: w.value === e.steps.length - 1,
  1834. onClick: Oe
  1835. }, {
  1836. default: N(() => [
  1837. a(ht),
  1838. ue(ae(g.$l("下一步")), 1)
  1839. ]),
  1840. _: 1
  1841. }, 8, ["disabled"])) : ee("", !0),
  1842. H.value ? (D(), ne(ce, {
  1843. key: 2,
  1844. style: { "margin-right": "8px" },
  1845. type: "primary",
  1846. onClick: he
  1847. }, {
  1848. default: N(() => [
  1849. a(Le),
  1850. ue(" " + ae(g.$l(e.saveBtnText)), 1)
  1851. ]),
  1852. _: 1
  1853. })) : ee("", !0)
  1854. ]),
  1855. _: 1
  1856. }, 8, ["size"])
  1857. ], 512)) : ee("", !0)
  1858. ]),
  1859. modalRender: N(({ originVNode: oe }) => [
  1860. de("div", {
  1861. style: zt(X.value)
  1862. }, [
  1863. (D(), ne(It(oe)))
  1864. ], 4)
  1865. ]),
  1866. default: N(() => [
  1867. a($e, { spinning: e.loading }, {
  1868. default: N(() => [
  1869. de("div", {
  1870. ref_key: "bodySlot",
  1871. ref: h
  1872. }, [
  1873. e.tabs && e.tabs.length > 0 ? (D(), le("div", Yo, [
  1874. a(J, {
  1875. "active-key": F.value,
  1876. onChange: Fe
  1877. }, {
  1878. default: N(() => [
  1879. (D(!0), le(He, null, Ve(e.tabs, (oe) => (D(), ne(K, {
  1880. tab: oe[e.tabKey.label],
  1881. key: oe[b.value]
  1882. }, null, 8, ["tab"]))), 128))
  1883. ]),
  1884. _: 1
  1885. }, 8, ["active-key"])
  1886. ])) : ee("", !0),
  1887. e.steps && e.steps.length ? (D(), le("div", Uo, [
  1888. a(xe, {
  1889. current: w.value,
  1890. type: "navigation",
  1891. size: "small"
  1892. }, {
  1893. default: N(() => [
  1894. (D(!0), le(He, null, Ve(e.steps, (oe) => (D(), ne(Se, {
  1895. title: oe,
  1896. key: oe,
  1897. disabled: !0
  1898. }, null, 8, ["title"]))), 128))
  1899. ]),
  1900. _: 1
  1901. }, 8, ["current"])
  1902. ], 512)) : ee("", !0),
  1903. de("div", Qo, [
  1904. je(g.$slots, "default", {}, void 0, !0)
  1905. ])
  1906. ], 512)
  1907. ]),
  1908. _: 3
  1909. }, 8, ["spinning"])
  1910. ]),
  1911. _: 3
  1912. }, 16, ["open", "body-style", "width", "centered", "destroyOnClose", "keyboard", "style", "maskClosable", "mask", "wrap-class-name"]);
  1913. };
  1914. }
  1915. }), rn = /* @__PURE__ */ so(qo, [["__scopeId", "data-v-64b8c7da"]]);
  1916. export {
  1917. rn as default
  1918. };