litos-ui 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{animation-QfX4RtqD.js → animation-DttknHkX.js} +2 -2
- package/lib/base.d.ts +1 -3
- package/lib/base.js +26 -58
- package/lib/button/index.js +58 -62
- package/lib/color_picker/index.js +18 -20
- package/lib/form/form_events.js +15 -17
- package/lib/form/form_inner.js +43 -47
- package/lib/form/form_item.d.ts +1 -1
- package/lib/form/form_item.js +49 -53
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +58 -61
- package/lib/icon/arrow_down.js +4 -7
- package/lib/icon/arrow_left.js +4 -7
- package/lib/icon/arrow_right.js +4 -7
- package/lib/icon/arrow_up.js +4 -7
- package/lib/icon/base.js +21 -24
- package/lib/icon/caret_bottom.js +4 -7
- package/lib/icon/caret_top.js +4 -7
- package/lib/icon/font_icon.js +13 -17
- package/lib/icon/info.js +4 -7
- package/lib/icon/loading.js +4 -7
- package/lib/icon/mask_close.js +4 -7
- package/lib/icon/moon.js +4 -7
- package/lib/icon/reduction.js +4 -7
- package/lib/icon/refresh_left.js +4 -7
- package/lib/icon/refresh_right.js +4 -7
- package/lib/icon/search.js +4 -7
- package/lib/icon/sort.js +4 -7
- package/lib/icon/success.js +4 -7
- package/lib/icon/sun.js +4 -7
- package/lib/icon/theme_default.js +4 -7
- package/lib/icon/warn.js +4 -7
- package/lib/{index-B_9rPBWp.js → index-391POYEJ.js} +1 -1
- package/lib/index.d.ts +2 -10
- package/lib/index.js +62 -70
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.js +66 -70
- package/lib/list/index.d.ts +1 -1
- package/lib/list/index.js +26 -30
- package/lib/litos-ui.css +1 -1
- package/lib/litos-ui.min.js +1 -1
- package/lib/message/index.js +35 -33
- package/lib/polygon/index.d.ts +1 -1
- package/lib/polygon/index.js +14 -17
- package/lib/popconfirm/index.js +11 -17
- package/lib/popover/index.js +115 -120
- package/lib/radio/index.d.ts +2 -2
- package/lib/radio/index.js +65 -68
- package/lib/select_ori/index.d.ts +1 -1
- package/lib/select_ori/index.js +25 -29
- package/lib/switch/index.js +39 -48
- package/lib/tabbar/index.js +115 -123
- package/lib/theme/index.js +71 -74
- package/lib/theme/theme_color.js +17 -27
- package/lib/utils/event.js +16 -18
- package/lib/utils/index.js +48 -51
- package/lib/utils/transition.js +24 -34
- package/package.json +4 -1
- package/lib/browser.d.ts +0 -17
- package/lib/button/regist.d.ts +0 -2
- package/lib/button/regist.js +0 -7
- package/lib/form/types.js +0 -1
- package/lib/index-116dRdDj.js +0 -4
- package/lib/index-BUyxD_nH.js +0 -4
- package/lib/index-BeOxuMd4.js +0 -4
- package/lib/index-Bl8lRTJd.js +0 -4
- package/lib/index-BxlGVrX3.js +0 -4
- package/lib/index-C2D4YsFw.js +0 -4
- package/lib/index-C98Kx857.js +0 -4
- package/lib/index-CCcVpk6U.js +0 -4
- package/lib/index-CMz7GCCH.js +0 -4
- package/lib/index-D-Ikkdx0.js +0 -4
- package/lib/index-DJ70Xyma.js +0 -4
- package/lib/index-DKvzJmsR.js +0 -4
- package/lib/index-oNjb_IVt.js +0 -4
- package/lib/popconfirm/regist.d.ts +0 -2
- package/lib/popconfirm/regist.js +0 -7
- package/lib/popover/regist.d.ts +0 -2
- package/lib/popover/regist.js +0 -7
- package/lib/tabbar/regist.d.ts +0 -2
- package/lib/tabbar/regist.js +0 -7
package/lib/list/index.js
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import r from "../base.js";
|
|
2
|
+
import { initAttr as n, parseAttrValue as l } from "../utils/index.js";
|
|
3
|
+
import { $one as e } from "ph-utils/dom";
|
|
4
|
+
import { a } from "../animation-DttknHkX.js";
|
|
5
|
+
const h = ":host{display:block;overflow:auto;-webkit-overflow-scrolling:touch;height:100%;position:relative}.l-list-loadmore{padding:10px;display:flex;align-items:center;justify-content:center;color:#999}.l-list-icon{font-size:24px;margin-right:10px;transform:rotate3d(0,0,1,80deg)}";
|
|
6
|
+
class b extends r {
|
|
7
|
+
static baseName = "list";
|
|
8
|
+
/** 是否已经全部加载完成 */
|
|
9
|
+
finish = !1;
|
|
10
|
+
/** 是否显示无限加载模式 */
|
|
11
|
+
infinite = !0;
|
|
12
|
+
observer;
|
|
13
|
+
loadMoreEmit;
|
|
14
|
+
$more;
|
|
10
15
|
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
/** 是否已经全部加载完成 */
|
|
13
|
-
s(this, "finish", !1);
|
|
14
|
-
/** 是否显示无限加载模式 */
|
|
15
|
-
s(this, "infinite", !0);
|
|
16
|
-
s(this, "observer");
|
|
17
|
-
s(this, "loadMoreEmit");
|
|
18
|
-
s(this, "$more");
|
|
19
|
-
m(this), this.loadMoreEmit = new CustomEvent("load-more");
|
|
16
|
+
super(), n(this), this.loadMoreEmit = new CustomEvent("load-more");
|
|
20
17
|
}
|
|
21
18
|
static get observedAttributes() {
|
|
22
19
|
return ["finish"];
|
|
23
20
|
}
|
|
24
|
-
attributeChangedCallback(i,
|
|
21
|
+
attributeChangedCallback(i, t, o) {
|
|
25
22
|
if (i === "finish") {
|
|
26
|
-
const
|
|
27
|
-
this.finish !==
|
|
23
|
+
const s = l(o, !1, i);
|
|
24
|
+
this.finish !== s && (this.finish = s, this._finishChange());
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
connectedCallback() {
|
|
31
|
-
this.
|
|
28
|
+
this.loadStyleText([h, a]), super.connectedCallback(), this.infinite && (this.observer = new IntersectionObserver((i) => {
|
|
32
29
|
i[0].isIntersecting && !this.finish && this.dispatchEvent(this.loadMoreEmit);
|
|
33
|
-
}), this.$more =
|
|
30
|
+
}), this.$more = e(".l-list-loadmore", this.root), !this.finish && this.$more && this.observer.observe(this.$more));
|
|
34
31
|
}
|
|
35
32
|
disconnectedCallback() {
|
|
36
33
|
super.disconnectedCallback(), this.observer && (this.$more && (this.observer.unobserve(this.$more), this.$more = void 0), this.observer.disconnect(), this.observer = void 0), this.loadMoreEmit = void 0;
|
|
37
34
|
}
|
|
38
35
|
render() {
|
|
39
36
|
const i = ["<slot></slot>"];
|
|
40
|
-
this.infinite && (i.push('<div class="l-list-loadmore">'), this.finish || i.push(
|
|
37
|
+
return this.infinite && (i.push('<div class="l-list-loadmore">'), this.finish || i.push(
|
|
41
38
|
'<l-loading-icon class="l-list-icon l-rotate-anim"></l-loading-icon>'
|
|
42
39
|
), i.push(
|
|
43
40
|
`<span class="l-list-loadmore-text">${this._loadingText()}</span></div>`
|
|
44
|
-
)),
|
|
41
|
+
)), i.join("");
|
|
45
42
|
}
|
|
46
43
|
_loadingText() {
|
|
47
44
|
return this.finish ? "已经到底啦!" : "加载中……";
|
|
@@ -49,14 +46,13 @@ class v extends c {
|
|
|
49
46
|
_finishChange() {
|
|
50
47
|
if (this.$more) {
|
|
51
48
|
this.observer && (this.finish ? this.observer.unobserve(this.$more) : this.observer.observe(this.$more));
|
|
52
|
-
const i =
|
|
49
|
+
const i = e(".l-list-loadmore-text", this.$more);
|
|
53
50
|
i && (i.textContent = this._loadingText());
|
|
54
|
-
let
|
|
55
|
-
this.finish ?
|
|
51
|
+
let t = e(".l-list-icon", this.$more);
|
|
52
|
+
this.finish ? t && t.remove() : t == null && (t = document.createElement("l-loading-icon"), t.className = "l-list-icon l-rotate-anim", this.$more.prepend(t));
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
|
-
s(v, "baseName", "list");
|
|
60
56
|
export {
|
|
61
|
-
|
|
57
|
+
b as default
|
|
62
58
|
};
|
package/lib/litos-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html,body{height:100%}body{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;margin:0;font-size:14px;line-height:1.6}img{vertical-align:top}ul,ol{margin:0;padding:0;list-style:none}div{box-sizing:border-box}a{color:#4998f6;cursor:pointer;text-decoration:none;transition:color .3s}a:hover{color:#5ba2f7}a:active{color:#64a7f7}p{color:#333;margin:5px 0;font-size:16px;line-height:1.4}l-button:not([text])+l-button{margin-left:10px}.l-message{color:var(--l-primary-color,#722ed1);z-index:1000;background:#f0faff;border:1px solid #d4eeff;border-radius:5px;align-items:center;padding:10px;font-size:14px;transition:opacity .3s,transform .3s,top .3s;display:flex;position:fixed;top:20px;left:50%;transform:translate(-50%)}.l-message .l-message-icon{margin-right:5px}.l-message.l-message-success{color:var(--l-success-color,#52c41a);background:#edfff3;border-color:#bbf2cf}.l-message.l-message-error{color:var(--l-error-color,#f5222d);background:#ffefe6;border-color:#ffcfb8}.l-message.l-message-warn{color:var(--l-warn-color,#f90);background:#fff9e6;border-color:#ffe7a3}.l-message-container{align-items:center;display:flex}.l-message-fade-enter-from,.l-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}@media screen and (max-width:768px){.l-message{width:90%}}@keyframes l-rotate-frame{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.l-rotate-anim{animation:1.5s linear infinite l-rotate-frame}:host{--l-btn-text-color:#fff;--l-btn-hover-text-color:var(--l-btn-text-color);--l-btn-active-text-color:var(--l-btn-text-color);--l-btn-border-color:var(--l-primary-color,#722ed1);--l-btn-background:var(--l-btn-border-color);--l-btn-hover-border-color:var(--l-primary-color-light1,#9254de);--l-btn-hover-background:var(--l-btn-hover-border-color);--l-btn-active-border-color:var(--l-primary-color-dark1,#531dab);--l-btn-active-background:var(--l-btn-active-border-color);--l-btn-disabled-color:#c9c9c9;--l-btn-disabled-background:#fbfbfb;--l-btn-disabled-border-color:#e6e6e6;display:inline-block}.l-btn{cursor:pointer;box-sizing:border-box;vertical-align:middle;height:var(--l-form-edit-height,32px);color:var(--l-btn-text-color);background:var(--l-btn-background);border:1px solid var(--l-btn-border-color);border-radius:3px;outline:none;justify-content:center;align-items:center;gap:5px;padding:0 15px;font-size:14px;line-height:1;transition:border-color .3s,background-color .3s,color .3s;display:inline-flex;position:relative}.l-btn:hover{border-color:var(--l-btn-hover-border-color,var(--l-btn-hover-background));color:var(--l-btn-hover-text-color);background:var(--l-btn-hover-background)}.l-btn:active{border-color:var(--l-btn-active-border-color,var(--l-btn-active-background));color:var(--l-btn-active-text-color);background:var(--l-btn-active-background)}.l-btn-normal{--l-btn-text-color:auto;--l-btn-background:transparent;--l-btn-border-color:#d9d9d9;--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab);--l-btn-hover-background:#fff;--l-btn-active-background:#fff;--l-btn-hover-border-color:var(--l-btn-hover-text-color);--l-btn-active-border-color:var(--l-btn-active-text-color)}.l-btn-primary{--l-btn-background:var(--l-primary-color,#722ed1);--l-btn-hover-background:var(--l-primary-color-light1,#9254de);--l-btn-active-background:var(--l-primary-color-dark1,#531dab)}.l-btn:not(.l-btn-loading):disabled{border-color:var(--l-btn-disabled-border-color);background:var(--l-btn-disabled-background);color:var(--l-btn-disabled-color);cursor:not-allowed;opacity:1}.l-btn-text{--l-btn-background:transparent;--l-btn-border-color:transparent;--l-btn-hover-border-color:transparent;--l-btn-active-border-color:transparent;--l-btn-disabled-background:transparent;--l-btn-disabled-border-color:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;height:auto;padding:5px}.l-btn-primary.l-btn-text{--l-btn-text-color:var(--l-primary-color,#722ed1);--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab)}.l-btn-ghost{--l-btn-text-color:var(--l-btn-border-color);--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;--l-btn-hover-text-color:var(--l-btn-hover-border-color);--l-btn-active-text-color:var(--l-btn-active-border-color)}.l-btn-round{border-radius:calc(var(--l-form-edit-height,32px)/2)}.l-btn-circle{width:var(--l-form-edit-height,32px);border-radius:50%;padding:0}.l-btn-block{width:100%}.l-btn:not(.l-btn-text)+.l-btn{margin-left:10px}html.dark .l-btn:disabled{--l-btn-disabled-background:#ffffff14;--l-btn-disabled-color:#ffffff4d;--l-btn-disabled-border-color:#ffffff4d}.l-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em;display:inline-block}:host{width:var(--l-input-width,auto);display:inline-block}.l-input{box-sizing:border-box;width:100%;max-width:100%;height:var(--l-form-edit-height,32px);border:1px solid var(--l-border-color,#dedede);text-align:inherit;vertical-align:middle;border-radius:3px;outline:none;padding:0 5px;transition:border-color .3s}.l-input.is-error{--l-border-color:var(--nt-error-color,#ed3f13)}.l-input:not(.is-error):focus{border-color:var(--l-primary-color,#722ed1)}.l-input:disabled{cursor:not-allowed;background:var(--l-disabled-color,#f5f7fa)}.l-form{grid-template-columns:var(--l-form-label-width,auto)1fr;row-gap:20px;display:grid}.l-form-item{display:var(--l-form-item-display,contents);grid-template-columns:1fr;font-size:14px}.l-form-item__label{text-align:var(--l-form-label-align,right);width:var(--l-form-label-width,auto);height:var(--l-form-edit-height,32px);line-height:var(--l-form-edit-height,32px);color:#606266;padding:0 10px 0 0;display:inline-block}.l-form-item__label:empty{display:var(--l-form-label-empty-display,inline-block)}.l-form-item.is-required .l-form-item__label:before{content:"*";color:var(--l-warn-color,#f56c6c);vertical-align:middle;margin-right:4px}.l-form-item__content{flex:1;align-items:center;display:flex;position:relative}.l-form-item__error{color:var(--nt-error-color,#ed3f13);padding-top:3px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}.l-form--left .l-form-item__label{text-align:left}.l-form--top{grid-template-columns:1fr}.l-form--top .l-form-item{grid-template-columns:1fr;display:grid}.l-form--top .l-form-item__label{text-align:left}.l-form--top .l-form-item__label:empty{display:none}.l-form-inline{flex-flow:wrap;gap:20px;display:flex}.l-form.l-form-inline{--l-form-item-display:flex}.l-form.l-form--left,.l-form-item.l-form-item--left{--l-form-label-align:left}.l-form.l-form--top,.l-form-item.l-form-item--top{--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}:host{align-items:center;display:flex}.l-radio{--l-radio-size:16px;--l-radio-label-color:#333;--l-radio-disabled-color:#e6e6e6;--l-radio-disabled-label-color:var(--l-disabled-color,#c0c4cc);--l-radio-checked-color:var(--l-primary-color,#722ed1);--l-radio-item-margin:10px;cursor:pointer;align-items:center;display:inline-flex;position:relative}.l-radio__label{margin-left:5px;transition:color .3s ease-in-out}.l-radio__input{z-index:-1;opacity:0;width:0;height:0;position:absolute}.l-radio__inner{width:var(--l-radio-size);height:var(--l-radio-size);box-sizing:border-box;border:1px solid #dcddd9;border-radius:50%;justify-content:center;align-items:center;transition:border-color .3s ease-in-out;display:flex}.l-radio__inner:before{content:"";background-color:#0000;border-radius:50%;width:60%;height:60%;transition:background-color .3s ease-in-out;display:block}.l-radio.is-checked .l-radio__inner{border-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__inner:before{background-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__label{color:var(--l-primary-color,#722ed1)}.l-radio--disabled{cursor:not-allowed}.l-radio--disabledd .l-radio__inner{border-color:var(--l-radio-disabled-color)}.l-radio--disabled .l-radio__label{color:var(--l-radio-disabled-label-color)}.l-radio:not(:first-child){margin-left:var(--l-radio-item-margin)}.l-radio--button .l-radio__label{height:var(--l-form-edit-height,32px);border:1px solid #c0c4cc;border-left-width:0;justify-content:center;align-items:center;margin-left:0;padding:0 15px;display:inline-flex}.l-radio--button:not(:first-of-type){margin-left:0}.l-radio--button:first-of-type .l-radio__label{border-left-width:1px;border-top-left-radius:3px;border-bottom-left-radius:3px}.l-radio--button:last-of-type .l-radio__label{border-top-right-radius:3px;border-bottom-right-radius:3px}.is-checked.l-radio--button .l-radio__label{background-color:var(--l-radio-checked-color);color:#fff;border-color:var(--l-radio-checked-color)}:host{-webkit-overflow-scrolling:touch;height:100%;display:block;position:relative;overflow:auto}.l-list-loadmore{color:#999;justify-content:center;align-items:center;padding:10px;display:flex}.l-list-icon{margin-right:10px;font-size:24px;transform:rotate(80deg)}.l-polygon{--l-polygen-size:10px;--l-polygen-width:var(--l-polygen-size);--l-polygen-height:var(--l-polygen-size);--l-polygen-background:#666;width:var(--l-polygen-width);height:var(--l-polygen-height);background:var(--l-polygen-background);transition:background .3s ease-in-out;display:inline-block}.l-polygon-triangle-top{clip-path:polygon(calc(var(--l-polygen-width)/2)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}.l-polygon-triangle-top-left{clip-path:polygon(0 0,var(--l-polygen-width)0,0 var(--l-polygen-height))}.l-polygon-triangle-top-right{clip-path:polygon(0 0,var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-right{clip-path:polygon(0 0,var(--l-polygen-width)calc(var(--l-polygen-height)/2),0 var(--l-polygen-height))}.l-polygon-triangle-left{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 calc(var(--l-polygen-height)/2))}.l-polygon-triangle-bottom{clip-path:polygon(0 0,var(--l-polygen-width)0,calc(var(--l-polygen-width)/2)var(--l-polygen-height))}.l-polygon-triangle-bottom-left{clip-path:polygon(0 0,0 var(--l-polygen-height),var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-bottom-right{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}:host{--l-switch-height:22px;--l-switch-width:40px;box-sizing:border-box;width:var(--l-switch-width);height:var(--l-switch-height);border-radius:calc(var(--l-switch-height)/2);cursor:pointer;vertical-align:middle;background-color:#dcdfe6;border:1px solid #c2c2c2;justify-content:flex-start;align-items:center;padding:2px;transition:all .3s ease-in-out;display:inline-flex;position:relative}:host(:hover),:host(.l-switch--checked):hover{border-color:var(--l-primary-color,#722ed1)}:host(.l-switch--checked){background-color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.l-switch-action{width:calc(var(--l-switch-height) - 6px);box-sizing:border-box;background-color:#fff;border-radius:50%;justify-content:center;align-items:center;padding:2px;font-size:12px;transition:all .3s ease-in-out;display:flex;position:absolute;top:2px;bottom:2px;left:2px}.l-switch-text{color:#fff;padding-left:calc(var(--l-switch-width) - 20px);transition:padding-left .3s ease-in-out}:host(.l-switch--checked) .l-switch-action{left:calc(var(--l-switch-width) - var(--l-switch-height) + 3px)}:host(.l-switch--checked) .l-switch-text{padding-left:5px}:host{--l-input-width:60px;--l-tabbar-hover-color:var(--l-primary-color-light1,#9254de);--l-tabbar-active-color:var(--l-primary-color,#722ed1);--l-tabbar-item-gap:0;--l-tabbar-height:38px;height:var(--l-tabbar-height);background-color:#fff;display:block;position:relative;overflow:hidden}.l-tabbar-wrapper{align-items:stretch;gap:var(--l-tabbar-item-gap);flex-wrap:nowrap;height:100%;display:flex}.l-tabbar-item{color:#666;cursor:pointer;justify-content:center;align-items:center;transition:all .3s ease-in-out;display:inline-flex}.l-tabbar-item:hover{color:var(--l-tabbar-hover-color)}.l-tabbar-item.active{color:var(--l-tabbar-active-color)}.l-tabbar-item-icon{justify-content:center;align-items:center;margin-bottom:5px;font-size:18px;display:flex}.l-tabbar-item-icon.only{margin-bottom:0;font-size:24px}:host(.l-tabbar--nav){--l-tabbar-height:50px;width:100%}:host(.l-tabbar--nav) .l-tabbar-item{flex-direction:column;flex-grow:1;justify-content:center;align-items:center;font-size:12px;line-height:1;display:inline-flex}:host(.l-tabbar--bar){--l-tabbar-bar-vertical-padding:10px;--l-tabbar-item-gap:30px;--l-tabbar-line-color:var(--l-primary-color,#722ed1);white-space:nowrap;overflow:auto}.l-tabbar--bar-line{background-color:var(--l-tabbar-line-color);border-radius:1px;width:32px;height:2px;transition:all .3s ease-in-out;position:absolute;bottom:0;left:0}:host(.l-tabbar--card){--l-tabbar-card-border-color:#f5f7fa;--l-tabbar-line-color:#fff;--l-tabbar-item-gap:0;--l-tabbar-card-border-radius:5px}.l-tabbar-card-border{background-color:var(--l-tabbar-card-border-color);height:1px;position:absolute;bottom:0;left:0;right:0}:host(.l-tabbar--card) .l-tabbar-item{background:#f5f7fa;border:1px solid #f0f0f0;padding:0 15px}:host(.l-tabbar--card) .l-tabbar-item:first-child{border-top-left-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item:last-child{border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar-gap) .l-tabbar-item{border-top-left-radius:var(--l-tabbar-card-border-radius);border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item.active{background:#fff}:host{display:inline-flex}.l-theme-btn::part(default){--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-text-color:#9ca3af;--l-btn-hover-text-color:#666;width:var(--l-form-edit-height,32px);padding:0;font-size:18px}.l-theme-switch.l-switch--checked{background-color:#65757129;border-color:#3c3f44}.l-theme-switch.l-switch--checked::part(action){color:#fff;background-color:#000}html.dark .l-theme-btn{--l-btn-hover-text-color:#fff}:host{width:max-content;position:relative}.l-popover--content{--l-popover-border-color:#e4e4e4;--l-popover-color:#666;--l-popover-box-shadow:0 4px 8px #0000001f;--l-popover-background:#fff;--l-popover-arrow-size:8px;--l-popover-offset:10px;width:max-content;box-shadow:var(--l-popover-box-shadow);background:var(--l-popover-background);border:1px solid var(--l-popover-border-color);z-index:30;color:var(--l-popover-color);box-sizing:border-box;border-radius:4px;padding:10px;position:absolute}.l-popover-tooltip{--l-popover-color:#fff;--l-popover-box-shadow:4px 4px 8px #0000004d;--l-popover-background:#383838;--l-popover-arrow-size:6px;border-radius:5px;padding:8px;font-size:12px;line-height:1}.l-popover--arrow{width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);z-index:-1;position:absolute}.l-popover--arrow:before{content:"";width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);background-color:var(--l-popover-background);border-style:solid;border-width:1px;position:absolute;transform:rotate(45deg)}.l-popover-top,.l-popover-top-start,.l-popover-top-end{bottom:calc(100% + var(--l-popover-offset,10px))}.l-popover-bottom,.l-popover-bottom-start,.l-popover-bottom-end{top:calc(100% + var(--l-popover-offset,10px))}.l-popover-top-start,.l-popover-bottom-start{left:0}.l-popover-top-end,.l-popover-bottom-end{right:0}.l-popover-bottom,.l-popover-top{left:50%;transform:translate(-50%)}.l-popover-left-start,.l-popover-left,.l-popover-left-end{right:calc(100% + var(--l-popover-offset,10px))}.l-popover-left-start,.l-popover-right-start{top:0}.l-popover-left-end,.l-popover-right-end{bottom:0}.l-popover-left,.l-popover-right{top:50%;transform:translateY(-50%)}.l-popover-right-start,.l-popover-right,.l-popover-right-end{left:calc(100% + var(--l-popover-offset,10px))}.l-popover-top .l-popover--arrow,.l-popover-bottom .l-popover--arrow{margin-left:-4px;left:50%}.l-popover-top .l-popover--arrow:before,.l-popover-top-start .l-popover--arrow:before,.l-popover-top-end .l-popover--arrow:before{border-color:transparent var(--l-popover-border-color)var(--l-popover-border-color)transparent}.l-popover-bottom .l-popover--arrow:before,.l-popover-bottom-start .l-popover--arrow:before,.l-popover-bottom-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)transparent transparent var(--l-popover-border-color)}.l-popover-top .l-popover--arrow,.l-popover-top-start .l-popover--arrow,.l-popover-top-end .l-popover--arrow{bottom:calc((var(--l-popover-arrow-size,8px)/-2) + 1px)}.l-popover-top-start .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow{left:10px}.l-popover-top-end .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{right:10px}.l-popover-bottom .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{top:calc((var(--l-popover-arrow-size,8px)/-2) - 1px)}.l-popover-left .l-popover--arrow,.l-popover-left-start .l-popover--arrow,.l-popover-left-end .l-popover--arrow{margin-top:-4px;right:-4px}.l-popover-left-start .l-popover--arrow:before,.l-popover-left .l-popover--arrow:before,.l-popover-left-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)var(--l-popover-border-color)transparent transparent}.l-popover-right .l-popover--arrow,.l-popover-right-start .l-popover--arrow,.l-popover-right-end .l-popover--arrow{margin-top:-4px;left:-4px}.l-popover-right-start .l-popover--arrow:before,.l-popover-right .l-popover--arrow:before,.l-popover-right-end .l-popover--arrow:before{border-color:transparent transparent var(--l-popover-border-color)var(--l-popover-border-color)}.l-popover-left .l-popover--arrow,.l-popover-right .l-popover--arrow{top:50%}.l-popover-left-start .l-popover--arrow,.l-popover-right-start .l-popover--arrow{top:10px}.l-popover-left-end .l-popover--arrow,.l-popover-right-end .l-popover--arrow{bottom:10px}.l-popover-popconfirm{min-width:200px}.l-popconfirm-container{align-items:center;display:flex}.l-popconfirm-icon-wrapper{color:var(--nt-warn-color,#f90);margin-right:10px;display:inline-flex}.l-popconfirm-footer{justify-content:flex-end;align-items:center;gap:5px;margin-top:7px;display:flex}.l-popconfirm-footer l-button::part(default){height:24px;padding:0 6px;font-size:13px}
|
|
1
|
+
html,body{height:100%}body{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;margin:0;font-size:14px;line-height:1.6}img{vertical-align:top}ul,ol{margin:0;padding:0;list-style:none}div{box-sizing:border-box}a{color:#4998f6;cursor:pointer;text-decoration:none;transition:color .3s}a:hover{color:#5ba2f7}a:active{color:#64a7f7}p{color:#333;margin:5px 0;font-size:16px;line-height:1.4}l-button:not([text])+l-button{margin-left:10px}.l-message{color:var(--l-primary-color,#722ed1);z-index:1000;background:#f0faff;border:1px solid #d4eeff;border-radius:5px;align-items:center;padding:10px;font-size:14px;transition:opacity .3s,transform .3s,top .3s;display:flex;position:fixed;top:20px;left:50%;transform:translate(-50%)}.l-message .l-message-icon{margin-right:5px}.l-message.l-message-success{color:var(--l-success-color,#52c41a);background:#edfff3;border-color:#bbf2cf}.l-message.l-message-error{color:var(--l-error-color,#f5222d);background:#ffefe6;border-color:#ffcfb8}.l-message.l-message-warn{color:var(--l-warn-color,#f90);background:#fff9e6;border-color:#ffe7a3}.l-message-container{align-items:center;display:flex}.l-message-fade-enter-from,.l-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}@media screen and (max-width:768px){.l-message{width:90%}}@keyframes l-rotate-frame{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.l-rotate-anim{animation:1.5s linear infinite l-rotate-frame}:host{--l-btn-text-color:#fff;--l-btn-hover-text-color:var(--l-btn-text-color);--l-btn-active-text-color:var(--l-btn-text-color);--l-btn-border-color:var(--l-primary-color,#722ed1);--l-btn-background:var(--l-btn-border-color);--l-btn-hover-border-color:var(--l-primary-color-light1,#9254de);--l-btn-hover-background:var(--l-btn-hover-border-color);--l-btn-active-border-color:var(--l-primary-color-dark1,#531dab);--l-btn-active-background:var(--l-btn-active-border-color);--l-btn-disabled-color:#c9c9c9;--l-btn-disabled-background:#fbfbfb;--l-btn-disabled-border-color:#e6e6e6;display:inline-block}.l-btn{cursor:pointer;box-sizing:border-box;vertical-align:middle;height:var(--l-form-edit-height,32px);color:var(--l-btn-text-color);background:var(--l-btn-background);border:1px solid var(--l-btn-border-color);border-radius:3px;outline:none;justify-content:center;align-items:center;gap:5px;padding:0 15px;font-size:14px;line-height:1;transition:border-color .3s,background-color .3s,color .3s;display:inline-flex;position:relative}.l-btn:hover{border-color:var(--l-btn-hover-border-color,var(--l-btn-hover-background));color:var(--l-btn-hover-text-color);background:var(--l-btn-hover-background)}.l-btn:active{border-color:var(--l-btn-active-border-color,var(--l-btn-active-background));color:var(--l-btn-active-text-color);background:var(--l-btn-active-background)}.l-btn-normal{--l-btn-text-color:auto;--l-btn-background:transparent;--l-btn-border-color:#d9d9d9;--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab);--l-btn-hover-background:#fff;--l-btn-active-background:#fff;--l-btn-hover-border-color:var(--l-btn-hover-text-color);--l-btn-active-border-color:var(--l-btn-active-text-color)}.l-btn-primary{--l-btn-background:var(--l-primary-color,#722ed1);--l-btn-hover-background:var(--l-primary-color-light1,#9254de);--l-btn-active-background:var(--l-primary-color-dark1,#531dab)}.l-btn:not(.l-btn-loading):disabled{border-color:var(--l-btn-disabled-border-color);background:var(--l-btn-disabled-background);color:var(--l-btn-disabled-color);cursor:not-allowed;opacity:1}.l-btn-text{--l-btn-background:transparent;--l-btn-border-color:transparent;--l-btn-hover-border-color:transparent;--l-btn-active-border-color:transparent;--l-btn-disabled-background:transparent;--l-btn-disabled-border-color:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;height:auto;padding:5px}.l-btn-primary.l-btn-text{--l-btn-text-color:var(--l-primary-color,#722ed1);--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab)}.l-btn-ghost{--l-btn-text-color:var(--l-btn-border-color);--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;--l-btn-hover-text-color:var(--l-btn-hover-border-color);--l-btn-active-text-color:var(--l-btn-active-border-color)}.l-btn-round{border-radius:calc(var(--l-form-edit-height,32px)/2)}.l-btn-circle{width:var(--l-form-edit-height,32px);border-radius:50%;padding:0}.l-btn-block{width:100%}.l-btn:not(.l-btn-text)+.l-btn{margin-left:10px}html.dark .l-btn:disabled{--l-btn-disabled-background:#ffffff14;--l-btn-disabled-color:#ffffff4d;--l-btn-disabled-border-color:#ffffff4d}.l-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em;display:inline-block}:host{width:var(--l-input-width,auto);display:inline-block}.l-input{box-sizing:border-box;width:100%;max-width:100%;height:var(--l-form-edit-height,32px);border:1px solid var(--l-border-color,#dedede);text-align:inherit;vertical-align:middle;border-radius:3px;outline:none;padding:0 5px;transition:border-color .3s}.l-input.is-error{--l-border-color:var(--nt-error-color,#ed3f13)}.l-input:not(.is-error):focus{border-color:var(--l-primary-color,#722ed1)}.l-input:disabled{cursor:not-allowed;background:var(--l-disabled-color,#f5f7fa)}.l-form{grid-template-columns:var(--l-form-label-width,auto)1fr;row-gap:20px;display:grid}.l-form-inline{flex-flow:wrap;gap:20px;display:flex}.l-form.l-form-inline{--l-form-item-display:flex}.l-form.l-form--left{--l-form-label-align:left}.l-form.l-form--top{--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}:host{align-items:center;display:flex}.l-radio{--l-radio-size:16px;--l-radio-label-color:#333;--l-radio-disabled-color:#e6e6e6;--l-radio-disabled-label-color:var(--l-disabled-color,#c0c4cc);--l-radio-checked-color:var(--l-primary-color,#722ed1);--l-radio-item-margin:10px;cursor:pointer;align-items:center;display:inline-flex;position:relative}.l-radio__label{margin-left:5px;transition:color .3s ease-in-out}.l-radio__input{z-index:-1;opacity:0;width:0;height:0;position:absolute}.l-radio__inner{width:var(--l-radio-size);height:var(--l-radio-size);box-sizing:border-box;border:1px solid #dcddd9;border-radius:50%;justify-content:center;align-items:center;transition:border-color .3s ease-in-out;display:flex}.l-radio__inner:before{content:"";background-color:#0000;border-radius:50%;width:60%;height:60%;transition:background-color .3s ease-in-out;display:block}.l-radio.is-checked .l-radio__inner{border-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__inner:before{background-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__label{color:var(--l-primary-color,#722ed1)}.l-radio--disabled{cursor:not-allowed}.l-radio--disabledd .l-radio__inner{border-color:var(--l-radio-disabled-color)}.l-radio--disabled .l-radio__label{color:var(--l-radio-disabled-label-color)}.l-radio:not(:first-child){margin-left:var(--l-radio-item-margin)}.l-radio--button .l-radio__label{height:var(--l-form-edit-height,32px);border:1px solid #c0c4cc;border-left-width:0;justify-content:center;align-items:center;margin-left:0;padding:0 15px;display:inline-flex}.l-radio--button:not(:first-of-type){margin-left:0}.l-radio--button:first-of-type .l-radio__label{border-left-width:1px;border-top-left-radius:3px;border-bottom-left-radius:3px}.l-radio--button:last-of-type .l-radio__label{border-top-right-radius:3px;border-bottom-right-radius:3px}.is-checked.l-radio--button .l-radio__label{background-color:var(--l-radio-checked-color);color:#fff;border-color:var(--l-radio-checked-color)}:host{-webkit-overflow-scrolling:touch;height:100%;display:block;position:relative;overflow:auto}.l-list-loadmore{color:#999;justify-content:center;align-items:center;padding:10px;display:flex}.l-list-icon{margin-right:10px;font-size:24px;transform:rotate(80deg)}.l-polygon{--l-polygen-size:10px;--l-polygen-width:var(--l-polygen-size);--l-polygen-height:var(--l-polygen-size);--l-polygen-background:#666;width:var(--l-polygen-width);height:var(--l-polygen-height);background:var(--l-polygen-background);transition:background .3s ease-in-out;display:inline-block}.l-polygon-triangle-top{clip-path:polygon(calc(var(--l-polygen-width)/2)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}.l-polygon-triangle-top-left{clip-path:polygon(0 0,var(--l-polygen-width)0,0 var(--l-polygen-height))}.l-polygon-triangle-top-right{clip-path:polygon(0 0,var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-right{clip-path:polygon(0 0,var(--l-polygen-width)calc(var(--l-polygen-height)/2),0 var(--l-polygen-height))}.l-polygon-triangle-left{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 calc(var(--l-polygen-height)/2))}.l-polygon-triangle-bottom{clip-path:polygon(0 0,var(--l-polygen-width)0,calc(var(--l-polygen-width)/2)var(--l-polygen-height))}.l-polygon-triangle-bottom-left{clip-path:polygon(0 0,0 var(--l-polygen-height),var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-bottom-right{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}:host{--l-switch-height:22px;--l-switch-width:40px;box-sizing:border-box;width:var(--l-switch-width);height:var(--l-switch-height);border-radius:calc(var(--l-switch-height)/2);cursor:pointer;vertical-align:middle;background-color:#dcdfe6;border:1px solid #c2c2c2;justify-content:flex-start;align-items:center;padding:2px;transition:all .3s ease-in-out;display:inline-flex;position:relative}:host(:hover),:host(.l-switch--checked):hover{border-color:var(--l-primary-color,#722ed1)}:host(.l-switch--checked){background-color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.l-switch-action{width:calc(var(--l-switch-height) - 6px);box-sizing:border-box;background-color:#fff;border-radius:50%;justify-content:center;align-items:center;padding:2px;font-size:12px;transition:all .3s ease-in-out;display:flex;position:absolute;top:2px;bottom:2px;left:2px}.l-switch-text{color:#fff;padding-left:calc(var(--l-switch-width) - 20px);transition:padding-left .3s ease-in-out}:host(.l-switch--checked) .l-switch-action{left:calc(var(--l-switch-width) - var(--l-switch-height) + 3px)}:host(.l-switch--checked) .l-switch-text{padding-left:5px}:host{--l-input-width:60px;--l-tabbar-hover-color:var(--l-primary-color-light1,#9254de);--l-tabbar-active-color:var(--l-primary-color,#722ed1);--l-tabbar-item-gap:0;--l-tabbar-height:38px;height:var(--l-tabbar-height);background-color:#fff;display:block;position:relative;overflow:hidden}.l-tabbar-wrapper{align-items:stretch;gap:var(--l-tabbar-item-gap);flex-wrap:nowrap;height:100%;display:flex}.l-tabbar-item{color:#666;cursor:pointer;justify-content:center;align-items:center;transition:all .3s ease-in-out;display:inline-flex}.l-tabbar-item:hover{color:var(--l-tabbar-hover-color)}.l-tabbar-item.active{color:var(--l-tabbar-active-color)}.l-tabbar-item-icon{justify-content:center;align-items:center;margin-bottom:5px;font-size:18px;display:flex}.l-tabbar-item-icon.only{margin-bottom:0;font-size:24px}:host(.l-tabbar--nav){--l-tabbar-height:50px;width:100%}:host(.l-tabbar--nav) .l-tabbar-item{flex-direction:column;flex-grow:1;justify-content:center;align-items:center;font-size:12px;line-height:1;display:inline-flex}:host(.l-tabbar--bar){--l-tabbar-bar-vertical-padding:10px;--l-tabbar-item-gap:30px;--l-tabbar-line-color:var(--l-primary-color,#722ed1);white-space:nowrap;overflow:auto}.l-tabbar--bar-line{background-color:var(--l-tabbar-line-color);border-radius:1px;width:32px;height:2px;transition:all .3s ease-in-out;position:absolute;bottom:0;left:0}:host(.l-tabbar--card){--l-tabbar-card-border-color:#f5f7fa;--l-tabbar-line-color:#fff;--l-tabbar-item-gap:0;--l-tabbar-card-border-radius:5px}.l-tabbar-card-border{background-color:var(--l-tabbar-card-border-color);height:1px;position:absolute;bottom:0;left:0;right:0}:host(.l-tabbar--card) .l-tabbar-item{background:#f5f7fa;border:1px solid #f0f0f0;padding:0 15px}:host(.l-tabbar--card) .l-tabbar-item:first-child{border-top-left-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item:last-child{border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar-gap) .l-tabbar-item{border-top-left-radius:var(--l-tabbar-card-border-radius);border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item.active{background:#fff}:host{display:inline-flex}.l-theme-btn::part(default){--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-text-color:#9ca3af;--l-btn-hover-text-color:#666;width:var(--l-form-edit-height,32px);padding:0;font-size:18px}.l-theme-switch.l-switch--checked{background-color:#65757129;border-color:#3c3f44}.l-theme-switch.l-switch--checked::part(action){color:#fff;background-color:#000}html.dark .l-theme-btn{--l-btn-hover-text-color:#fff}:host{width:max-content;position:relative}.l-popover--content{--l-popover-border-color:#e4e4e4;--l-popover-color:#666;--l-popover-box-shadow:0 4px 8px #0000001f;--l-popover-background:#fff;--l-popover-arrow-size:8px;--l-popover-offset:10px;width:max-content;box-shadow:var(--l-popover-box-shadow);background:var(--l-popover-background);border:1px solid var(--l-popover-border-color);z-index:30;color:var(--l-popover-color);box-sizing:border-box;border-radius:4px;padding:10px;position:absolute}.l-popover-tooltip{--l-popover-color:#fff;--l-popover-box-shadow:4px 4px 8px #0000004d;--l-popover-background:#383838;--l-popover-arrow-size:6px;border-radius:5px;padding:8px;font-size:12px;line-height:1}.l-popover--arrow{width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);z-index:-1;position:absolute}.l-popover--arrow:before{content:"";width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);background-color:var(--l-popover-background);border-style:solid;border-width:1px;position:absolute;transform:rotate(45deg)}.l-popover-top,.l-popover-top-start,.l-popover-top-end{bottom:calc(100% + var(--l-popover-offset,10px))}.l-popover-bottom,.l-popover-bottom-start,.l-popover-bottom-end{top:calc(100% + var(--l-popover-offset,10px))}.l-popover-top-start,.l-popover-bottom-start{left:0}.l-popover-top-end,.l-popover-bottom-end{right:0}.l-popover-bottom,.l-popover-top{left:50%;transform:translate(-50%)}.l-popover-left-start,.l-popover-left,.l-popover-left-end{right:calc(100% + var(--l-popover-offset,10px))}.l-popover-left-start,.l-popover-right-start{top:0}.l-popover-left-end,.l-popover-right-end{bottom:0}.l-popover-left,.l-popover-right{top:50%;transform:translateY(-50%)}.l-popover-right-start,.l-popover-right,.l-popover-right-end{left:calc(100% + var(--l-popover-offset,10px))}.l-popover-top .l-popover--arrow,.l-popover-bottom .l-popover--arrow{margin-left:-4px;left:50%}.l-popover-top .l-popover--arrow:before,.l-popover-top-start .l-popover--arrow:before,.l-popover-top-end .l-popover--arrow:before{border-color:transparent var(--l-popover-border-color)var(--l-popover-border-color)transparent}.l-popover-bottom .l-popover--arrow:before,.l-popover-bottom-start .l-popover--arrow:before,.l-popover-bottom-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)transparent transparent var(--l-popover-border-color)}.l-popover-top .l-popover--arrow,.l-popover-top-start .l-popover--arrow,.l-popover-top-end .l-popover--arrow{bottom:calc((var(--l-popover-arrow-size,8px)/-2) + 1px)}.l-popover-top-start .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow{left:10px}.l-popover-top-end .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{right:10px}.l-popover-bottom .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{top:calc((var(--l-popover-arrow-size,8px)/-2) - 1px)}.l-popover-left .l-popover--arrow,.l-popover-left-start .l-popover--arrow,.l-popover-left-end .l-popover--arrow{margin-top:-4px;right:-4px}.l-popover-left-start .l-popover--arrow:before,.l-popover-left .l-popover--arrow:before,.l-popover-left-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)var(--l-popover-border-color)transparent transparent}.l-popover-right .l-popover--arrow,.l-popover-right-start .l-popover--arrow,.l-popover-right-end .l-popover--arrow{margin-top:-4px;left:-4px}.l-popover-right-start .l-popover--arrow:before,.l-popover-right .l-popover--arrow:before,.l-popover-right-end .l-popover--arrow:before{border-color:transparent transparent var(--l-popover-border-color)var(--l-popover-border-color)}.l-popover-left .l-popover--arrow,.l-popover-right .l-popover--arrow{top:50%}.l-popover-left-start .l-popover--arrow,.l-popover-right-start .l-popover--arrow{top:10px}.l-popover-left-end .l-popover--arrow,.l-popover-right-end .l-popover--arrow{bottom:10px}.l-popover-popconfirm{min-width:200px}.l-popconfirm-container{align-items:center;display:flex}.l-popconfirm-icon-wrapper{color:var(--nt-warn-color,#f90);margin-right:10px;display:inline-flex}.l-popconfirm-footer{justify-content:flex-end;align-items:center;gap:5px;margin-top:7px;display:flex}.l-popconfirm-footer l-button::part(default){height:24px;padding:0 6px;font-size:13px}
|
package/lib/litos-ui.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var gs=Object.defineProperty;var we=p=>{throw TypeError(p)};var vs=(p,g,v)=>g in p?gs(p,g,{enumerable:!0,configurable:!0,writable:!0,value:v}):p[g]=v;var a=(p,g,v)=>vs(p,typeof g!="symbol"?g+"":g,v),Mt=(p,g,v)=>g.has(p)||we("Cannot "+v);var b=(p,g,v)=>(Mt(p,g,"read from private field"),v?v.call(p):g.get(p)),x=(p,g,v)=>g.has(p)?we("Cannot add the same private member more than once"):g instanceof WeakSet?g.add(p):g.set(p,v),Et=(p,g,v,it)=>(Mt(p,g,"write to private field"),it?it.call(p,v):g.set(p,v),v),k=(p,g,v)=>(Mt(p,g,"access private method"),v);(function(){"use strict";var wt,tt,J,ut,q,Lt,At,V,y,xe,St,Me,Ee,Le,W,Ae,Se,ot,Ne,ct,T,Te,Ie,He,ht,O,K,et,ze,Ve;const p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g="0123456789";function v(s,n=!0){return s==null?!0:(n&&typeof s=="string"?s.trim().length:s.length)===0}function it(s,n){n={isPositive:!1,isFloat:!0,...n};const t=n.isPositive?"[+]?":"[+-]?",e=n.isFloat?"([0-9]*[.])?[0-9]+":"[0-9]+";return new RegExp("^"+t+e+"$").test(s)}function B(s){if(typeof s=="object"&&s.min!=null&&s.max!=null){const n=Math.random(),t=s.hasEnd?1:0,e=n*(s.max-s.min+t)+s.min;return s.isInteger!==!1?Math.floor(e):e}else{if(typeof s=="object"&&s.length==null)throw new Error("random_length_cannot_null");let n=typeof s=="object"?s.length:s,t=p;typeof s=="object"&&s.hasLetter===!1&&(t=g);const e=Array.from({length:n},()=>t.charAt(B({min:0,max:t.length-1,hasEnd:!0}))).join("");return typeof s=="object"&&s.firstIsZero===!1&&e.indexOf("0")===0?B(s):e}}function Nt(s,n){return typeof s=="string"?(n||document).querySelectorAll(s):[s]}function X(s,n){return Nt(s,n)}function L(s,n={},t){let e;if(s.startsWith("<")&&s.endsWith(">")?e=new DOMParser().parseFromString(s,"text/html").body.firstElementChild:e=document.createElement(s),e&&n)for(const i in n){const r=n[i];i==="class"?e.className=F(r):i==="style"?e.style.cssText=Y(r):i==="textContent"&&r?e.textContent=r:i==="innerHTML"&&r?e.innerHTML=r:i==="outerHTML"&&r?e.outerHTML=r:r===!0?e.setAttribute(i,""):typeof r=="string"&&e.setAttribute(i,r)}return e}function Tt(s,n={},t){return L(s,n)}function d(s,n){const t=Nt(s,n);return t.length>0?t[0]:void 0}function A(s,n){s.classList.add(n)}function H(s,n){s.classList.remove(n)}function It(s,n){return s.classList.contains(n)}function _(s,n,t,e){s.addEventListener(n,t,e)}function w(s,n,t,e){s.removeEventListener(n,t,e)}function Fe(s,n,t){let e=s.target,i="";do if(t&&t.isSameNode(e)||e.tagName==="BODY"||(e.getAttribute&&(i=e.getAttribute(n)||""),i===""&&(e=e.parentNode),!e))break;while(i==="");return[i!=="__stop__"&&i!=="",i,e]}function nt(s,n){for(let t=0,e=s.length;t<e&&n(s[t],t)!==!0;t++);}function ft(s,n,t){const e=s.getAttribute(n);if(t==null)return e;const i=typeof t;return e==null?t:i==="bigint"||i==="number"?e===""?t:Number(e):i==="boolean"?e===""||e==="1"||e==="true"||e===n:i==="object"?e===""?t:JSON.parse(e):e}function Re(s,n=null,t="horizontal"){n==null&&(n=s.offsetParent);const e=n.getBoundingClientRect(),i=s.getBoundingClientRect();let r=t==="horizontal"?i.left:i.top,l=t==="horizontal"?i.right:i.bottom,o=t==="horizontal"?e.left:e.top,c=t==="horizontal"?e.right:e.bottom;return r>=o&&l<=c}function F(s){let n="";if(Array.isArray(s))for(let t=0,e=s.length;t<e;t++){const i=s[t];i&&(n+=`${i} `)}else if(typeof s=="string")n=s;else for(const t in s)s[t]&&(n+=`${t} `);return n.trim()}function Y(s){let n="";if(Array.isArray(s))for(let t=0,e=s.length;t<e;t++){const i=s[t];i&&(n+=`${i};`)}else if(typeof s=="string")n=s;else for(const t in s){const e=s[t];e&&(n+=`${t}:${e};`)}return n}function rt(s,n,t="set"){for(let e=0,i=n.length;e<i;e++){const r=n[e];t==="set"?s.style.setProperty(r[0],r[1]):s.style.removeProperty(r[0])}}function Ht(s,n,t="enter",e){const i=t==="enter"?"from":"to";let r="",l="";const o=[];if(typeof n=="string")r=`${n}-${t}-${i}`,l=`${n}-${t}-active`;else for(let c=0,h=n.length;c<h;c++){const u=n[c];u.length>=3&&o.push(`${u[0]} ${u[2]}`)}t==="enter"?r?(s.classList.add(r),setTimeout(()=>{s.classList.add(l),requestAnimationFrame(()=>{s.classList.remove(r)})},0)):(rt(s,n,"set"),setTimeout(()=>{o.length>0&&s.style.setProperty("transition",o.join(", ")),requestAnimationFrame(()=>{rt(s,n,"remove")})},0)):r?(s.classList.add(l),requestAnimationFrame(()=>{s.classList.add(r)})):(o.length>0&&s.style.setProperty("transition",o.join(", ")),requestAnimationFrame(()=>{rt(s,n,"set")})),s.addEventListener("transitionend",()=>{r?(s.classList.remove(l),requestAnimationFrame(()=>{s.classList.remove(r)})):(s.style.removeProperty("transition"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{rt(s,n,"remove")})})),e&&e()},{once:!0})}let Be=-1,zt={prefix:"l"};function f(s,n){const t=Array.isArray(s)?s:[s];for(const e of t){const i=`${zt.prefix}-${e.baseName}`;customElements.get(i)||customElements.define(i,e)}}function Vt(){return`${zt.prefix}-${++Be}`}function S(s,n,t){if(s==null)return n;switch(typeof n){case"boolean":return s===""||s==="true"||s==="1"||s===t;case"number":return Number(s);default:return s}}function M(s){const n=s.attributes;for(const t of n){const{name:e,value:i}=t;if(e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("_")||e.startsWith("$"))continue;const l=e.split("-").map((o,c)=>c===0?o:o[0].toUpperCase()+o.slice(1)).join("");if(Object.hasOwn(s,l)){const o=S(i,s[l],e);s[l]=o,e==="value"&&(s._resetValue=o)}}}function z(s,n){let t=" ";return n===!0?t=` ${s}`:typeof n=="string"&&!v(n)&&(t=` ${s}="${n}"`),t}function qe(s){return s.map(t=>z(t[0],t[1])).join("")}function Pe(s,n){for(const t of n){const e=t[1],i=t[0];e===!0?s.setAttribute(i,""):typeof e=="string"&&!v(e)&&s.setAttribute(i,e)}}function mt(s,n,t,e,i=10){let r=0;return t==="top"?r=n.height+i:t==="bottom"?r=-(s.height+i):(t==="left"||t==="right")&&(e===""?r=n.height/2-s.height/2:e==="end"&&(r=n.height-s.height)),r}function pt(s,n,t,e,i=10){let r=0;return t==="left"?r=n.width+i:t==="right"?r=-(s.width+i):(t==="top"||t==="bottom")&&(e===""?r=n.width/2-s.width/2:e==="end"&&(r=n.width-s.width)),r}function je(s,n,t,e,i,r,l,o,c=10,h="absolute"){const u=window.innerHeight+r-10,$=window.innerWidth+i-10;let R=s.top+r-o;R+n.height>u&&(t==="left"||t==="right"?e="end":t="top",o=mt(s,n,t,e,c),R=s.top+r-o),R<r&&(t==="left"||t==="right"?e="start":t="bottom");let I=s.left+i-l;return I+n.width>$&&(t==="top"||t==="bottom"?e="end":t="left",l=pt(s,n,t,e,c),I=s.left+i-l),I<i&&(t==="top"||t==="bottom"?e="start":t="right"),h==="fixed"&&(o=mt(s,n,t,e,c),l=pt(s,n,t,e,c),I=s.left+i-l,R=s.top+r-o),{x:I,y:R,mainAlign:t,crossAlign:e}}class N extends HTMLElement{constructor(t=!0){super();a(this,"rendered",!1);t&&this.attachShadow({mode:"open"})}static get observedAttributes(){return[]}attributeChangedCallback(t,e,i){}get shadow(){return this.shadowRoot}get root(){return this.shadowRoot||this}createStyle(t){const e=document.createElement("style");e.textContent=t.trim(),this.root.appendChild(e)}createLink(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,this.root.appendChild(e)}loadStyle(t){{let e=document.querySelector("#litos-ui-style");e?this.createLink(e.href):queueMicrotask(()=>{e=document.querySelector("#litos-ui-style"),e&&this.createLink(e.href)})}}loadExternalStyle(t){}loadStyleText(t){this.createStyle(t)}getAttr(t,e){return ft(this,t,e)}appendToRoot(t){if(t)if(typeof t=="string"){let e=document.createElement("div");e.innerHTML=t,this.root.append(...e.children),e=void 0}else t.length?this.root.append(...t):this.root.append(t)}connectedCallback(){this.appendToRoot(this.render()),this.rendered=!0}disconnectedCallback(){this.root.innerHTML="",this.rendered=!1}render(){}}a(N,"baseName","base-component");class C extends N{constructor(){super();a(this,"useLink");a(this,"viewBox");this.useLink=!1,this.viewBox="0 0 1024 1024"}connectedCallback(){this.loadStyle(["icon"]),this.render(),this.rendered=!0}render(){const t=this.createEl("svg"),e=this.getAttr("useLink",this.useLink),i=this.getAttr("viewBox",this.viewBox);t.classList.add("l-icon"),e||t.setAttribute("viewBox",i);const r=this.renderChildren();if(typeof r=="string")if(r===""){const l=this.children,o=[];for(let c=0,h=l.length;c<h;c++){const u=l[c];o.push(u.outerHTML)}t.innerHTML=o.join("")}else t.innerHTML=r;else t.append(r);this.shadow.appendChild(t)}renderChildren(){return""}createEl(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}a(C,"baseName","base-icon");let bt=(wt=class extends C{renderChildren(){return'<path d="M520.665 64.564a29.244 29.244 0 0 0-7.071-.894c-16.211 0-29.35 13.14-29.35 29.35 0 15.83 12.538 28.696 28.223 29.293v.073c.375 0 .751-.014 1.127-.014 216.493 0 389.629 173.942 389.629 390.433 0 216.496-173.136 388.827-389.63 388.827s-389.63-172.333-389.63-388.829c0-.27.01-.536.01-.804h-.01c0-16.209-13.141-29.35-29.35-29.35s-29.35 13.139-29.35 29.35c0 .055.007.11.007.164-.001.214-.007.425-.007.64 0 247.609 200.722 448.331 448.33 448.331 247.607 0 448.33-200.722 448.33-448.33-.002-245.242-196.917-444.456-441.258-448.24z" fill="currentColor"></path>'}},a(wt,"baseName","loading-icon"),wt);const at=2,De=.16,We=.05,Oe=.05,Ke=.15,Ye=/rgba?\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)/,Ft=/^#(?:([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})|([0-9A-Fa-f]{1})([0-9A-Fa-f]{1})([0-9A-Fa-f]{1}))$/;function Ue(s){return s.r!=null&&s.g!=null&&s.b!=null}function Rt(s){return s.h!=null&&s.s!=null&&s.v!=null}function Ge(s){let n=s.match(Ye);if(n!=null){const t=parseInt(n[1].trim()),e=parseInt(n[2].trim()),i=parseInt(n[3].trim());if(isNaN(t)||isNaN(e)||isNaN(i))throw new Error("Invalid RGB color.");let r=1;return n[4]!=null&&(r=parseFloat(n[4].trim()),isNaN(r)&&(r=1)),{r:t,g:e,b:i,a:r}}}function Je(s){const n=s.match(Ft);if(n!=null){const t=n[4]!==void 0,e=parseInt(t?n[4]+n[4]:n[1],16),i=parseInt(t?n[5]+n[5]:n[2],16),r=parseInt(t?n[6]+n[6]:n[3],16);return{r:e,g:i,b:r}}}function gt(s){if(typeof s=="string"){let n=Je(s);if(n==null&&(n=Ge(s)),n!=null)return n;throw new Error("Invalid color string")}else{if(Ue(s))return s;if(Rt(s))return Ze(s);throw new Error("Invalid color")}}function Xe(s){if(Rt(s))return s;const n=gt(s),t=n.r/255,e=n.g/255,i=n.b/255;let r=Math.max(t,e,i),l=Math.min(t,e,i),o=r-l,c=r,h=r===0?0:o/r,u=0;if(r===l)u=0;else switch(r){case t:u=((e-i)/o+(e<i?6:0))/6;break;case e:u=((i-t)/o+2)/6;break;case i:u=((t-e)/o+4)/6;break}return u=u*360,{h:u,s:h,v:c}}function Ze(s){let n=s.s,t=s.v;n>1&&(n/=100),t>1&&(t/=100);const e=s.h;var i=Math.floor(e/60)%6,r=e/60-Math.floor(e/60),l=t*(1-n),o=t*(1-r*n),c=t*(1-(1-r)*n);let h=0,u=0,$=0;switch(i){case 0:h=t,u=c,$=l;break;case 1:h=o,u=t,$=l;break;case 2:h=l,u=t,$=c;break;case 3:h=l,u=o,$=t;break;case 4:h=c,u=l,$=t;break;case 5:h=t,u=l,$=o;break}return h=Math.round(h*255),u=Math.round(u*255),$=Math.round($*255),{r:h,g:u,b:$}}function Qe(s,n,t){let e;return Math.round(s.h)>=60&&Math.round(s.h)<=240?e=t?Math.round(s.h)-at*n:Math.round(s.h)+at*n:e=t?Math.round(s.h)+at*n:Math.round(s.h)-at*n,e<0?e+=360:e>=360&&(e-=360),e}function ts(s,n,t){if(s.h===0&&s.s===0)return s.s;let e;return t?e=s.s-De*n:e=s.s+We*n,e>1&&(e=1),e<.06&&(e=.06),Number(e.toFixed(2))}function es(s,n,t){let e;return t?e=s.v+Oe*n:e=s.v-Ke*n,e>1&&(e=1),Number(e.toFixed(2))}function Bt(s){const n=t=>t.toString(16).padStart(2,"0");return`#${n(s.r)}${n(s.g)}${n(s.b)}`.toUpperCase()}function ss(s){return typeof s=="string"&&Ft.test(s)?s:Bt(gt(s))}function U(s,n=1,t=!0){const e=Xe(s);return ss({h:Qe(e,n,t),s:ts(e,n,t),v:es(e,n,t)})}f(bt);class vt extends N{constructor(){super();a(this,"htmlType","button");a(this,"_handleClick",t=>{const e=t.target,i=ft(e,"html-type");if(i==="reset"||i==="submit"){const r=this._getForm();r&&(i==="reset"?r.reset():i==="submit"&&r.submit())}});M(this)}static get observedAttributes(){return["loading","color","disabled"]}attributeChangedCallback(t,e,i){const r=d(".l-btn",this.root);if(r)if(t==="loading")S(i,!1,t)?(A(r,"l-btn-loading"),r.disabled=!0,r.innerHTML=this.loadingBody()):(H(r,"l-btn-loading"),r.disabled=this.getAttr("disabled",!1),r.innerHTML="<slot></slot>");else if(t==="color"){const l=this.getAttr("text",!1),o=this.getAttr("ghost",!1);r.style.cssText=this.applyColor(i,l,o)}else t==="disabled"&&(r.disabled=this.getAttr("disabled",!1))}connectedCallback(){this.loadStyle(["button"]),this.loadExternalStyle(["animation"]),this.render(),(this.htmlType==="reset"||this.htmlType==="submit")&&_(this,"click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),(this.htmlType==="reset"||this.htmlType==="submit")&&w(this,"click",this._handleClick)}render(){const t=this.getAttr("type","normal"),e=document.createElement("button"),i=this.getAttr("loading",!1),r=this.getAttr("shape","default"),l=this.getAttr("text",!1),o=this.getAttr("ghost",!1),c=["l-btn",`l-btn-${t}`,this.getAttr("block",!1)?"l-btn-block":"",r==="round"?"l-btn-round":"",r==="circle"?"l-btn-circle":"",o?"l-btn-ghost":"",l?"l-btn-text":"",i?"l-btn-loading":""];e.className=F(c),e.disabled=this.getAttr("disabled",!1)||i,e.type=this.getAttr("html-type","button");const h=this.applyColor(this.getAttr("color"),l,o);h&&(e.style.cssText=h),i?e.innerHTML=this.loadingBody():e.innerHTML="<slot></slot>",e.setAttribute("part","default"),this.root.appendChild(e)}loadingBody(){const t=this.getAttr("loading-text",""),e=['<l-loading-icon class="l-rotate-anim"></l-loading-icon>'];return t===""?e.push("<slot></slot>"):e.push(`<span>${t}</span>`),e.join("")}applyColor(t,e=!1,i=!1){if(!t)return"";const r=U(t,1,!0),l=U(t,3,!1);return Y({"--l-btn-border-color":e?"transparent":t,"--l-btn-text-color":i||e?t:"#ffffff","--l-btn-hover-text-color":i||e?r:"#ffffff","--l-btn-background":i||e?"transparent":t,"--l-btn-active-text-color":i||e?l:"#ffffff","--l-btn-hover-border-color":e?"transparent":r,"--l-btn-hover-background":i||e?"transparent":r,"--l-btn-active-background":i||e?"transparent":l,"--l-btn-active-border-color":e?"transparent":l})}_getForm(){let t=this.parentElement,e;for(;t!=null;){const i=t.tagName;if(i==="L-FORM"){e=t;break}if(i==="BODY")break;t=t.parentElement}return t=null,e}}a(vt,"baseName","button");let m;function P(s,n,t){m==null&&(m=new Map),m.has(s)||m.set(s,new Map([[n,new Set]])),m.get(s).has(n)||m.get(s).set(n,new Set),m.get(s).get(n).add(t)}function Z(s,n,t){var e,i,r,l,o,c;(i=(e=m==null?void 0:m.get(s))==null?void 0:e.get(n))==null||i.delete(t),((l=(r=m==null?void 0:m.get(s))==null?void 0:r.get(n))==null?void 0:l.size)==0&&((o=m.get(s))==null||o.delete(n)),((c=m==null?void 0:m.get(s))==null?void 0:c.size)==0&&m.delete(s),(m==null?void 0:m.size)==0&&(m=void 0)}function qt(s){s==null?m!=null&&(m.clear(),m=void 0):m!=null&&(m.delete(s),m.size===0&&(m=void 0))}function E(s,n,...t){var i;const e=(i=m==null?void 0:m.get(s))==null?void 0:i.get(n);if(e!=null)for(const r of e)r(...t)}class Q extends N{constructor(t=!0){super();a(this,"disabled",!1);a(this,"name");a(this,"formAttrs",{});a(this,"formItemAttrs",{});a(this,"_value","");a(this,"_resetValue");a(this,"_firstPushValue",!0);a(this,"_reseting",!1);a(this,"_formAttributeChanged",(t,e,i)=>{i===this.formAttrs.formId?this.formAttrs[t]=e:this.formItemAttrs[t]=e,t==="disabled"&&this._changeDisabled()});a(this,"_resetFieldValue",()=>{this._reseting=!0,this.reset()});this._firstPushValue=t}set value(t){this.setValue(t)}get value(){return this.getValue()}setValue(t){this._value=t,this.pushValueChange()}getValue(){return this._value}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t,e,i){if(t==="disabled"){const r=S(i,!1,t);r!==this.disabled&&(this._changeDisabled(),this.disabled=r)}else this.attributeChange(t,e,i)}attributeChange(t,e,i){}connectedCallback(){const t=this._getForm();this.formAttrs=t.formAttr,this.formItemAttrs=t.formItemAttr,this.formAttrs.id&&(P(this.formAttrs.id,"attributeChanged",this._formAttributeChanged),P(this.formAttrs.id,"reset",this._resetFieldValue),this._firstPushValue&&this.pushValueChange()),this.formItemAttrs.id&&P(this.formItemAttrs.id,"attributeChanged",this._formAttributeChanged),super.connectedCallback()}disconnectedCallback(){this.formAttrs.id&&(Z(this.formAttrs.id,"attributeChanged",this._formAttributeChanged),Z(this.formAttrs.id,"reset",this._resetFieldValue)),this.formItemAttrs.id&&Z(this.formItemAttrs.id,"attributeChanged",this._formAttributeChanged),super.disconnectedCallback()}isDisabled(){return this.disabled===!0||this.formItemAttrs.disabled===!0?!0:this.formAttrs.disabled||!1}getName(){return this.name?this.name:this.formItemAttrs.name}_getForm(){let t=this.parentElement,e={},i={};for(;t!=null;){const r=t.tagName;if(r==="L-FORM"){const l=t.sharedAttrs;for(let o=0;o<l.length;o++){const c=l[o];e[c]=t[c]}break}if(r==="BODY")break;if(r==="L-FORM-ITEM"){const l=t.sharedAttrs;for(let o=0;o<l.length;o++){const c=l[o];i[c]=t[c]}}t=t.parentElement}return t=null,{formAttr:e,formItemAttr:i}}_changeDisabled(){}pushValueChange(){const t=this.getName();this.formAttrs.id&&t&&E(this.formAttrs.id,"valueChange",t,this._value,!this._reseting),this._reseting=!1}reset(){this.value=this._resetValue||""}}class Pt extends Q{constructor(){super();a(this,"type","text");a(this,"placeholder");a(this,"autosize",!1);a(this,"allowInput");a(this,"parser");a(this,"width");a(this,"block",!1);a(this,"error",!1);a(this,"$input");a(this,"_input",t=>{const e=t.target;let i=e.value;if(this.allowInput!=null){let r=this.allowInput.indexOf("."),l=r===-1?r:parseInt(this.allowInput.substring(r+1));i=this._numberInputParse(i,{integer:this.allowInput.includes("integer"),negative:this.allowInput.startsWith("-"),precition:l}),i=String(i),e.value=i}this.parser!=null&&(i=this.parser(i),e.value=i),this.setValue(i)});a(this,"_validateChange",(t,e)=>{const i=this.getName();if(i){const r=t===!0?!1:t[i]!=null;(e==null||e===i&&this.error!=r)&&(this.error=r,this._updateError()),Object.keys(t)[0]===i&&this.focus()}});M(this)}set value(t){this.setValue(t),this.$input!=null&&(this.$input.value=this.value)}get value(){return this.getValue()}static get observedAttributes(){return["disabled","error"]}connectedCallback(){super.connectedCallback(),this.loadStyle(["input"])}disconnectedCallback(){super.disconnectedCallback(),this.formAttrs.id&&Z(this.formAttrs.id,"validateChange",this._validateChange),w(this.$input,"input",this._input),this.$input=void 0}attributeChange(t,e,i){if(t==="error"){const r=S(i,!1,t);r!==this.error&&(this.error=r,this._updateError())}}render(){let t=z("value",this.value);const e=z("placeholder",this.placeholder),i=z("disabled",this.isDisabled()),r=F({"l-input":!0,"is-autosize":this.autosize,"is-error":this.error}),l=this.getName(),o=z("name",l),c=`${t}${o}${e}${i}`;this.shadow.innerHTML=`<input part="default" type="${this.type}" class="${r}"${c}></input>`,this.$input=d("input",this.root),_(this.$input,"input",this._input),this.style.cssText=Y(this._getStyleObj())+this.getAttr("style",""),l&&this.formAttrs.id&&P(this.formAttrs.id,"validateChange",this._validateChange)}setParser(t){this.parser=t}focus(){var t;(t=this.$input)==null||t.focus()}_changeDisabled(){this.$input!=null&&(this.$input.disabled=this.isDisabled())}_numberInputParse(t,e){let i=t,r=e.negative?"-?":"";if(e.integer){const o=i.match(new RegExp(`^(${r}\\d*)`));return o!=null?o[1]:i.substring(0,i.length-1)}const l=i.match(new RegExp(`(${r}\\d+\\.\\d{0,${e.precition}})|(${r}\\d*)`));return l!=null?i=l[1]||l[2]:i="",l!=null?l[1]||l[2]:""}_getStyleObj(){const t={};return this._isBlock()&&(t["--l-input-width"]="100%"),this.width&&(t["--l-input-width"]=this.width),t}_isBlock(){if(this.block===!0||this.formItemAttrs.innerBlock===!0||this.formAttrs.innerBlock===!0)return!0}_updateError(){this.$input&&(this.error?A(this.$input,"is-error"):H(this.$input,"is-error"))}}a(Pt,"componentName","input");class jt extends C{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path>'}}a(jt,"baseName","arrow-down-icon");class Dt extends C{renderChildren(){return'<path fill="currentColor" d="M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"></path>'}}a(Dt,"baseName","arrow-left-icon");class Wt extends C{renderChildren(){return'<path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path>'}}a(Wt,"baseName","arrow-right-icon");class Ot extends C{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"></path>'}}a(Ot,"baseName","arrow-up-icon");class Kt extends C{renderChildren(){return'<path fill="currentColor" d="M512 320 192 704h639.936z"></path>'}}a(Kt,"baseName","caret-top-icon");class Yt extends C{renderChildren(){return'<path fill="currentColor" d="m192 384 320 384 320-384z"></path>'}}a(Yt,"baseName","caret-bottom-icon");class Ut extends C{constructor(){super();a(this,"_t");a(this,"_start");this.useLink=!0,this._t=void 0,this._start=0}renderChildren(){return""}render(){super.render()}disconnectedCallback(){this._t!=null&&(cancelAnimationFrame(this._t),this._t=void 0)}connectedCallback(){super.connectedCallback();const t=this.getAttribute("name");this._start=Date.now(),t&&this._loadIcon(t)}_loadIcon(t){Date.now()-this._start>=1e4||(this._t=requestAnimationFrame(()=>{const i=document.querySelector(`#${t}`);if(i==null){this._loadIcon(t);return}this._t=void 0;let r=i.getAttribute("viewBox");r||(r="0 0 1024 1024");const l=this.shadow.querySelector("svg");l!=null&&(l.setAttribute("viewBox",r),l.innerHTML=i.innerHTML)}))}}a(Ut,"baseName","font-icon");class Gt extends C{renderChildren(){return'<path fill="currentColor" d="m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"></path>'}}a(Gt,"baseName","search-icon");class Jt extends C{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12 18c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zm0-10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zM12 4c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM12 24c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM5.6 6.6c-.3 0-.5-.1-.7-.3L3.5 4.9c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3zM19.8 20.8c-.3 0-.5-.1-.7-.3l-1.4-1.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zM3 13H1c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM23 13h-2c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM4.2 20.8c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.4.3-.7.3zM18.4 6.6c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.5.3-.7.3z"></path>'}}a(Jt,"baseName","sun-icon");class Xt extends C{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12.1 22h-.9c-5.5-.5-9.5-5.4-9-10.9.4-4.8 4.2-8.6 9-9 .4 0 .8.2 1 .5.2.3.2.8-.1 1.1-2 2.7-1.4 6.4 1.3 8.4 2.1 1.6 5 1.6 7.1 0 .3-.2.7-.3 1.1-.1.3.2.5.6.5 1-.2 2.7-1.5 5.1-3.6 6.8-1.9 1.4-4.1 2.2-6.4 2.2zM9.3 4.4c-2.9 1-5 3.6-5.2 6.8-.4 4.4 2.8 8.3 7.2 8.7 2.1.2 4.2-.4 5.8-1.8 1.1-.9 1.9-2.1 2.4-3.4-2.5.9-5.3.5-7.5-1.1-2.8-2.2-3.9-5.9-2.7-9.2z"></path>'}}a(Xt,"baseName","moon-icon");class Zt extends C{constructor(){super()}renderChildren(){return'<path d="M1039.92888889 967.11111111L1039.92888889 56.88888889c0-40.15900445-32.65877333-72.81777778-72.81777778-72.81777778l-910.22222222 0c-40.15900445 0-72.81777778 32.65877333-72.81777778 72.81777778l0 910.22222222c0 40.15900445 32.65877333 72.81777778 72.81777778 72.81777778L967.11111111 1039.92888889c40.15900445 0 72.81777778-32.65877333 72.81777778-72.81777778zM56.88888889 56.88888889L967.11111111 56.88888889l0 910.22222222-910.22222221 0.07281778L56.88888889 56.88888889z"></path><path d="M876.08888889 349.17944888a36.40888889 36.40888889 0 0 0-36.40888889-36.40888889l-120.47701333 1e-8L719.20298668 184.32a36.40888889 36.40888889 0 0 0-72.81777779 0l0 164.85944889a36.40888889 36.40888889 0 0 0 36.40888889 36.40888889L839.68 385.58833778a36.40888889 36.40888889 0 0 0 36.40888889-36.4088889z m-156.88590221 473.27914667L719.20298667 694.04444445 839.68 694.04444445a36.40888889 36.40888889 0 1 0 0-72.81777778l-156.88590222 0a36.40888889 36.40888889 0 0 0-36.40888889 36.40888888l0 164.82304a36.40888889 36.40888889 0 1 0 72.81777779 0zM366.36444445 349.17944888L366.36444445 184.32a36.40888889 36.40888889 0 1 0-72.81777778 0l0 128.45055999-120.51342222 1e-8a36.40888889 36.40888889 0 1 0 0 72.81777778L329.95555555 385.58833778a36.40888889 36.40888889 0 0 0 36.4088889-36.4088889z m0 473.27914667L366.36444445 657.63555555a36.40888889 36.40888889 0 0 0-36.4088889-36.40888888l-156.9223111-1e-8a36.40888889 36.40888889 0 1 0 0 72.81777779L293.54666667 694.04444445l0 128.4141511a36.40888889 36.40888889 0 1 0 72.81777778 0z"></path>'}}a(Zt,"baseName","reduction-icon");class Qt extends C{constructor(){super()}renderChildren(){return'<path d="M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"></path>'}}a(Qt,"baseName","refresh-left-icon");class te extends C{renderChildren(){return'<path d="M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"></path>'}}a(te,"baseName","refresh-right-icon");class ee extends C{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10m0-1.5v-17a8.5 8.5 0 0 1 0 17"/>'}}a(ee,"baseName","theme-default-icon");class se extends C{renderChildren(){return'<path d="M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0V141.248z"></path>'}}a(se,"baseName","sort-icon");class ie extends C{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"></path>'}}a(ie,"baseName","mask-close-icon");class ne extends C{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 0C228.693333 0 0 228.693333 0 512s228.693333 512 512 512 512-228.693333 512-512S795.306667 0 512 0z m307.2 368.64L467.626667 730.453333c0 3.413333-3.413333 3.413333-3.413334 6.826667-13.653333 13.653333-37.546667 13.653333-51.2 0l-177.493333-177.493333c-13.653333-13.653333-13.653333-37.546667 0-51.2 13.653333-13.653333 37.546667-13.653333 51.2 0l150.186667 153.6 334.506666-341.333334c13.653333-13.653333 37.546667-13.653333 51.2 0 10.24 10.24 10.24 34.133333-3.413333 47.786667z m0 0"></path>'}}a(ne,"baseName","success-icon");class Ct extends C{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 1024C229.234 1024 0 794.766 0 512S229.234 0 512 0s512 229.234 512 512-229.234 512-512 512z m-64.853-734.52l19.484 244.906 1.309 16.156c1.251 15.93 15.018 28.644 30.72 28.644h25.571c15.56 0 29.298-12.601 30.663-28.132l1.422-16.668 21.334-244.907c3.214-36.978-24.434-66.844-61.725-66.844h-6.627c-37.462 0-65.138 29.923-62.18 66.844zM512 801.393a66.788 66.788 0 1 0 0-133.575 66.788 66.788 0 0 0 0 133.575z"></path>'}}a(Ct,"baseName","warn-icon");class re extends C{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 64a448 448 0 110 896.064A448 448 0 01512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 01-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 017.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path>'}}a(re,"baseName","info-icon"),f(ie),f(ne),f(Ct),f(re);const G=[],ae=[["opacity","0","0.3s"],["transform","translate3d(-50%, -100%, 0)","0.3s"]];function le(s){const n=G.findIndex(r=>r.id===s);if(n===-1)return;const t=G.splice(n,1)[0];if(t==null)return;Ht(t,ae,"leave",()=>{t.remove()});const e=15+t.offsetHeight,i=G.length;if(i!==0)for(let r=n;r<i;r++){const l=G[r],o=parseInt(l.style.top,10)-e;l.style.setProperty("top",`${o}px`)}}function is(s){const n=document.createElement("div");n.id=s.id;const t=s.type||"info";let e=`l-message l-message-${t}`;s.customClass&&(e+=" "+s.customClass),n.className=e,n.style.setProperty("top",`${s.offset}px`),n.style.setProperty("z-index",`${s.zindex||1e3}`),s.width&&n.style.setProperty("width",s.width);let i=t;return i==="error"&&(i="mask-close"),n.innerHTML=['<div class="l-message-container">',`<l-${i}-icon class="l-message-icon"></l-${i}-icon>`,`<span class="l-message-content">${s.message}</span>`,"</div>"].join(""),n}const lt=s=>{const n=G.reduce((l,o)=>l+o.offsetHeight+15,15),t=Vt(),e=typeof s=="string"?{message:s}:s;e.id=t,e.offset=n;const i=is(e);G.push(i),document.body.appendChild(i),Ht(i,ae,"enter");let r=e.duration;return r==null&&(r=3e3),r!==0&&setTimeout(()=>{le(t)},r),t};for(const s of["info","success","error","warn","show"])lt[s]=n=>{const t=typeof n=="string"?{message:n}:n;return s!=="show"?t.type=s:t.type==null&&(t.type="info"),lt(t)};lt.close=le;const $t={mobile:"请输入正确的手机号",same:"两次输入不一致",required:"%s为必填字段"},kt="请输入正确的数据",j={same:/^same:(.+)$/i,mobile:/^1[345678]\d{9}$/,required:/^\S{1}.*/},yt={same(s,n){return n===s},pattern(s,n){return n==null?!1:s.test(String(n))}};class oe extends Error{constructor(n,t,e){super(e),this.name="ValidateError",this.key=t,this.detail=n}}class ns{constructor(n){this.rules={},this.addSchemas(n)}addSchemas(n){for(let t of n)this.rules[t.key]=this._parseSchemaRules(t)}addSchema(n){this.rules[n.key]=this._parseSchemaRules(n)}async validate(n,t=!1){return new Promise((e,i)=>{const r={};let l,o;for(let c in this.rules){let h=this._validateRule(this.rules[c],n[c],n);if(h!==""&&(h=h.replace("%s",c),r[c]=h,l=c,o=h,t))break}l==null?e(!0):i(new oe(r,l,o))})}async validateKey(n,t,e){return new Promise((i,r)=>{let l=this.rules[n];if(l==null){i({key:n,value:t});return}let o=this._validateRule(l,t,e);o!==""?(o=o.replace("%s",n),r(new oe({[n]:o},n,o))):i({key:n,value:t})})}_validateRule(n,t,e){let i="";for(let r of n)if(r.rule==="required"?(t==null||!yt.pattern(j.required,t))&&(i=r.message):typeof r.rule=="function"?r.rule(t)||(i=r.message):r.sameKey!=null?e!=null&&(yt.same(t,e[r.sameKey])||(i=r.message)):yt.pattern(r.rule,t)||(i=r.message),i!=="")break;return i}_parseSchemaRules(n){let t=[],e=n.rules;if(n.required===!0&&t.push(...this._parseStringRule("required",n.message)),e!=null)if(typeof e=="string")t=t.concat(this._parseStringRule(e,n.message));else if(e instanceof Array)for(let i of e)typeof i=="string"?t.push(...this._parseStringRule(i,n.message)):i instanceof RegExp||typeof i=="function"?t.push({rule:i,message:n.message||kt}):typeof i.rule=="string"?t.push(...this._parseStringRule(i.rule,i.message)):t.push({rule:i.rule,message:i.message||kt});else t.push({rule:e,message:kt});return t}_parseStringRule(n,t){let e=[],i=n.split("|");for(let r of i){let l=t,o=null,c;if(n==="required")o="required",l=l||t||$t.required;else if(j.same.test(r)){if(r.match(j.same)!=null){o=j.same;let u=r.match(j.same);u!=null&&(c=u[1]),l=l||$t.same}}else Object.hasOwn(j,r)&&(o=j[r],l=l||$t[r]);e.push({rule:o,message:l,sameKey:c})}return e}}class ce extends N{constructor(){super();a(this,"inline",!1);a(this,"labelPosition","right");a(this,"labelWidth");a(this,"id");a(this,"disabled",!1);a(this,"sharedAttrs",["disabled","id","innerBlock"]);a(this,"validator");a(this,"innerBlock",!1);a(this,"novalidate",!1);a(this,"_data");a(this,"emit");a(this,"ruleChange",t=>{this.validator.addSchema(t)});a(this,"_valueChange",(t,e,i=!0)=>{this._data==null&&(this._data={});const r=Object.hasOwn(this._data,t);this._data[t]=e,!this.novalidate&&r&&i&&this.validator.validateKey(t,e,this._data).then(()=>{E(this.id,"validateChange",!0,t)}).catch(l=>{E(this.id,"validateChange",l.detail,t)})});M(this),this.id==null&&(this.id=`l-f${B(3)}-${B(6)}`),this.validator=new ns([]),this.emit=new CustomEvent("submit")}static get observedAttributes(){return["disabled","label-position"]}attributeChangedCallback(t,e,i){if(t==="disabled"){const r=S(i,!1,t);r!==this.disabled&&(E(this.id,"attributeChanged",t,r,this.id),this.disabled=r)}else if(t==="label-position"){const r=d("form",this.root);r&&(r.className=F(["l-form",this.inline?"l-form-inline":void 0,`l-form--${i}`]))}}connectedCallback(){this.loadStyle(["form"]),super.connectedCallback(),P(this.id,"ruleChange",this.ruleChange),P(this.id,"valueChange",this._valueChange)}disconnectedCallback(){qt(this.id),this.validator=void 0}render(){const t=F(["l-form",this.inline?"l-form-inline":void 0,`l-form--${this.labelPosition}`]),e=Y({"--l-form-label-width":this.labelWidth?this.labelWidth:""});this.shadow.innerHTML=`<form class="${t}" style="${e}"><slot></slot></form>`}validateField(t){const e=[];if(this._data!=null){if(Array.isArray(t))for(let i=0,r=t.length;i<r;i++){const l=t[i];e.push(this.validator.validateKey(l,this._data[l],this._data))}else e.push(this.validator.validateKey(t,this._data[t],this._data));Promise.allSettled(e).then(i=>{for(let r=0,l=i.length;r<l;r++){const o=i[r];o.status==="rejected"?E(this.id,"validateChange",o.reason.detail,o.reason.key):E(this.id,"validateChange",!0,o.value.key)}})}}clearValidate(){E(this.id,"validateChange",!0)}reset(){this.clearValidate(),E(this.id,"reset")}submit(){this.novalidate?this.dispatchEvent(this.emit):this.validate().then(t=>{t&&this.dispatchEvent(this.emit)})}async validate(){if(this._data!=null)try{return await this.validator.validate(this._data),E(this.id,"validateChange",!0),Promise.resolve(!0)}catch(t){return E(this.id,"validateChange",t.detail),Promise.resolve(!1)}return Promise.resolve(!0)}getData(){return{...this._data}}}a(ce,"baseName","form");class he extends N{constructor(){super();a(this,"disabled",!1);a(this,"sharedAttrs",["disabled","id","name","innerBlock"]);a(this,"required",!1);a(this,"error");a(this,"label");a(this,"id");a(this,"verify");a(this,"validity");a(this,"pattern");a(this,"name");a(this,"innerBlock",!1);a(this,"labelPosition","right");a(this,"formId");a(this,"_validateChange",(t,e)=>{const i=t===!0?void 0:t[this.name];(e==null||e===this.name&&this.error!=i)&&(this.error=i,this._updateError())});M(this),this.id==null&&(this.id=`l-fi${B(3)}-${B(6)}`)}static get observedAttributes(){return["error","label","disabled"]}attributeChangedCallback(t,e,i){if(t==="error")i!=this.error&&(this.error=i,this._updateError());else if(t==="label")this.label=i,this._updateLabel();else if(t==="disabled"){const r=S(i,!1,t);r!==this.disabled&&(E(this.id,"attributeChanged",t,r,this.id),this.disabled=r)}}connectedCallback(){var t;if(super.connectedCallback(),this.loadStyle(["form"]),this.formId=this._getFormId(),this.name&&this.formId){let e=((t=this.verify)==null?void 0:t.split("|"))||[];this.pattern&&e.push(new RegExp(this.pattern));const i={key:this.name,required:this.required,message:this.validity,rules:e};E(this.formId,"ruleChange",i),P(this.formId,"validateChange",this._validateChange)}}disconnectedCallback(){qt(this.id),this.formId&&Z(this.formId,"validateChange",this._validateChange)}setRules(t){const e={...t,key:this.name};e.required!=null&&this.required&&(e.required=!0),this.formId&&E(this.formId,"ruleChange",e)}setError(t){this.error=t}render(){const t=["l-form-item",this.required?"is-required":void 0,this.error?"is-error":void 0,`l-form-item--${this.labelPosition}`],e=this.label!=null?`<label class="l-form-item__label">${this.label}</label>`:"",i=this.error?`<div class="l-form-item__error">${this.error}</div>`:"";this.shadow.innerHTML=[`<div class="${F(t)}">${e}`,'<div class="l-form-item__content">',`<slot></slot>${i}</div></div>`].join("")}_updateError(){if(!this.rendered)return;let t=d(".l-form-item__error",this.root);if(t)this.error?t.textContent=this.error:t.remove();else if(this.error){t=document.createElement("div"),t.className="l-form-item__error",t.textContent=this.error;const i=d(".l-form-item__content",this.root);i&&i.appendChild(t)}const e=d(".l-form-item",this.root);e&&(this.error?A(e,"is-error"):H(e,"is-error"))}_updateLabel(){if(!this.rendered)return;let t=d(".l-form-item__label",this.root);if(t==null){if(this.label!=null){t=document.createElement("div"),t.className="l-form-item__label",t.textContent=this.label;const e=d(".l-form-item",this.root);e&&e.appendChild(t)}}else this.label!=null?t.textContent=this.label:t.remove()}_getFormId(){let t=this.parentElement,e;for(;t!=null;){const i=t.tagName;if(i==="L-FORM"){e=t.id;break}if(i==="BODY")break;t=t.parentElement}return t=null,e}}a(he,"baseName","form-item");class de extends Q{constructor(){super(!1);a(this,"type");a(this,"label");a(this,"checked",!1);a(this,"_changeEvent");a(this,"_radioChange",t=>{const e=t.target;let i=e.parentElement;for(;i!=null&&!It(i,"l-radio");)i=i.parentElement;const r=d(".is-checked",this.root);r&&H(r,"is-checked"),this.value=e.value,i&&A(i,"is-checked"),this.dispatchEvent(this._changeEvent)});M(this),this._changeEvent=new CustomEvent("change")}setItems(t){this._removeEvents(),this.root.innerHTML=this._renderItems(t),this._initEvents()}connectedCallback(){super.connectedCallback(),this.loadStyle(["radio"]),this._initEvents()}disconnectedCallback(){super.disconnectedCallback(),this._removeEvents()}attributeChange(t,e,i){if(t==="checked"){const r=S(i,!1,t);this.checked=r,this.value=r;const l=d(".l-radio",this.root);if(l&&!It(l,"is-checked")){A(l,"is-checked");const o=d("input",l);o&&(o.checked=!0)}}}render(){this.getName()||(this.name=`la${B(3)}_${B(6)}`);const t=[],e=d('[slot="label"]',this),i=X("[radio-value]",this);e!=null||this.label?(this.value=this._isChecked(),e?t.push(this._renderItem("slot",void 0,this._isChecked(),"label")):t.push(this._renderItem(this.label,void 0,this._isChecked(),"label"))):i.length>0&&(nt(i,r=>{const l=r.cloneNode(!0),o=ft(r,"radio-value");t.push(this._renderItem(l.outerHTML,o,this.value===o))}),this.pushValueChange()),this.root.innerHTML=t.join("")}setValue(t){super.setValue(t);let e="";typeof t!="boolean"&&(e=`[l-value="${t}"]`);const i=d(".is-checked",this.root);i&&H(i,"is-checked");const r=d(`label${e}`,this.root);if(r){const l=d("input",r);typeof t=="boolean"?(t?A(r,"is-checked"):H(r,"is-checked"),l.checked=t):(A(r,"is-checked"),l.checked=!0)}}_renderItems(t){const e=[];for(let i=0,r=t.length;i<r;i++){const l=t[i];e.push(this._renderItem(l.label,l.value,this.value===l.value,l.labelPart))}return e.join("")}_renderItem(t,e,i=!1,r=void 0){const l=F({"l-radio":!0,"l-radio--disabled":this.isDisabled(),"l-radio--button":this.type==="button","is-checked":i}),o=z("disabled",this.isDisabled()),c=z("checked",i),h=z("value",e),$=`${z("name",this.getName())}${h}${o}${c}`,R=z("part",r),dt=z("l-value",e),I=[`<label class="${l}"${dt}>`,`<input type="radio" class="l-radio__input"${$} />`];this.type!=="button"&&I.push('<span class="l-radio__inner"></span>');let st=t==="slot"?'<slot name="label"></slot>':t;return I.push(`<div class="l-radio__label"${R}>${st}</div>`),I.push("</label>"),I.join("")}_isChecked(){return this.checked}_initEvents(){nt(X("input",this.root),t=>{_(t,"change",this._radioChange)})}_removeEvents(){nt(X("input",this.root),t=>{w(t,"change",this._radioChange)})}}a(de,"baseName","radio"),f(bt);class ue extends N{constructor(){super();a(this,"finish",!1);a(this,"infinite",!0);a(this,"observer");a(this,"loadMoreEmit");a(this,"$more");M(this),this.loadMoreEmit=new CustomEvent("load-more")}static get observedAttributes(){return["finish"]}attributeChangedCallback(t,e,i){if(t==="finish"){const r=S(i,!1,t);this.finish!==r&&(this.finish=r,this._finishChange())}}connectedCallback(){this.loadStyle(["list"]),this.loadExternalStyle(["animation"]),super.connectedCallback(),this.infinite&&(this.observer=new IntersectionObserver(t=>{t[0].isIntersecting&&!this.finish&&this.dispatchEvent(this.loadMoreEmit)}),this.$more=d(".l-list-loadmore",this.root),!this.finish&&this.$more&&this.observer.observe(this.$more))}disconnectedCallback(){super.disconnectedCallback(),this.observer&&(this.$more&&(this.observer.unobserve(this.$more),this.$more=void 0),this.observer.disconnect(),this.observer=void 0),this.loadMoreEmit=void 0}render(){const t=["<slot></slot>"];this.infinite&&(t.push('<div class="l-list-loadmore">'),this.finish||t.push('<l-loading-icon class="l-list-icon l-rotate-anim"></l-loading-icon>'),t.push(`<span class="l-list-loadmore-text">${this._loadingText()}</span></div>`)),this.root.innerHTML=t.join("")}_loadingText(){return this.finish?"已经到底啦!":"加载中……"}_finishChange(){if(this.$more){this.observer&&(this.finish?this.observer.unobserve(this.$more):this.observer.observe(this.$more));const t=d(".l-list-loadmore-text",this.$more);t&&(t.textContent=this._loadingText());let e=d(".l-list-icon",this.$more);this.finish?e&&e.remove():e==null&&(e=document.createElement("l-loading-icon"),e.className="l-list-icon l-rotate-anim",this.$more.prepend(e))}}}a(ue,"baseName","list");class fe extends N{constructor(){super();a(this,"shape","triangle-top");a(this,"background");M(this)}connectedCallback(){this.loadStyle(["polygon"]),super.connectedCallback()}render(){const t=F(["l-polygon",this.shape?`l-polygon-${this.shape}`:""]),e=Y([this.background?`--l-polygen-background: ${this.background}`:""]);this.root.innerHTML=`<div part="default" class="${t}" style="${e}"></div>`}}a(fe,"baseName","polygon");class me extends Q{constructor(){super();a(this,"$select");a(this,"changeEmit");a(this,"_handleChange",t=>{const e=t.target.value;super.setValue(e),this.dispatchEvent(this.changeEmit)});M(this),this.changeEmit=new CustomEvent("change")}connectedCallback(){this.loadStyle(["input"]),super.connectedCallback(),this.$select=d("select",this.root),this.value&&(this.$select.value=this.value),_(this.$select,"change",this._handleChange)}disconnectedCallback(){super.disconnectedCallback(),this.$select&&w(this.$select,"change",this._handleChange),this.changeEmit=void 0,this.$select=void 0}render(){let t=this.innerHTML.trim();const e=qe([["name",this.getName()],["disabled",this.isDisabled()]]);this.root.innerHTML=`<select class="l-input"${e}>${t}</select>`}_changeDisabled(){this.$select&&(this.$select.disabled=this.isDisabled())}setOptions(t){if(!this.$select)return;const e=t.map(i=>`<option value="${i.value}">${i.label}</option>`);this.$select.innerHTML=e.join("")}appendOptions(t){if(!this.$select)return;const e=document.createDocumentFragment();for(let i=0,r=t.length;i<r;i++){const l=t[i],o=document.createElement("option");o.value=l.value,o.innerHTML=l.label,e.appendChild(o)}this.$select.appendChild(e)}reset(){super.reset(),this.$select&&(this.$select.value=this.value)}setValue(t){super.setValue(t),this.$select&&(this.$select.value=this.value)}}a(me,"baseName","select-ori");class pe extends Q{constructor(){super(!1);x(this,J);a(this,"actionRender");a(this,"checkedText");a(this,"uncheckedText");x(this,tt,t=>{this.isDisabled()||(this.setValue(!this.value),this.dispatchEvent(new CustomEvent("change")))});M(this);const t=this.value?S(this.value,!1,"value"):!1;this._resetValue=t,this.value=t}connectedCallback(){this.loadStyle(["switch"]),super.connectedCallback(),this.pushValueChange(),k(this,J,ut).call(this),_(this,"click",b(this,tt))}disconnectedCallback(){super.disconnectedCallback(),w(this,"click",b(this,tt)),this.actionRender=void 0}render(){this.isDisabled()&&this.classList.add("l-switch--disabled"),this.value&&this.classList.add("l-switch--checked");const t=['<div class="l-switch-action" part="action"></div>'];if(this.checkedText||this.uncheckedText){const e=this.value?this.checkedText||"":this.uncheckedText||"";t.push(`<span class="l-switch-text">${e}</span>`)}return t.join("")}setValue(t){super.setValue(t),t?A(this,"l-switch--checked"):H(this,"l-switch--checked");const e=d(".l-switch-text",this.root);e&&(e.textContent=this.value?this.checkedText||"":this.uncheckedText||""),k(this,J,ut).call(this)}setActionRender(t){this.actionRender=t,k(this,J,ut).call(this)}}tt=new WeakMap,J=new WeakSet,ut=function(){const t=d(".l-switch-action",this.root);if(t)if(this.actionRender){const e=this.actionRender({checked:this.value});typeof e=="string"?t.innerHTML=e:t.innerHTML=e.outerHTML}else{const e=d('[slot="checked-action"]',this),i=d('[slot="unchecked-action"]',this);this.value&&e?t.innerHTML='<slot name="checked-action"></slot>':!this.value&&i&&(t.innerHTML='<slot name="unchecked-action"></slot>')}},a(pe,"baseName","switch");class be extends Q{constructor(){super();a(this,"$picker");a(this,"_value","#000000");a(this,"_handleChange",t=>{const e=t.target.value;super.setValue(e),this.dispatchEvent(new CustomEvent("change",{detail:e}))});M(this)}setValue(t){super.setValue(t),this.$picker&&(this.$picker.value=t)}connectedCallback(){this.loadStyle(["input","color_picker"]),super.connectedCallback(),this.$picker=d("input",this.root),_(this.$picker,"change",this._handleChange)}disconnectedCallback(){super.disconnectedCallback(),this.$picker&&(w(this.$picker,"change",this._handleChange),this.$picker=void 0)}render(){const t=document.createElement("input");return Pe(t,[["value",this.value],["disabled",this.isDisabled()],["name",this.getName()],["type","color"],["class","l-input l-color-picker"]]),t}_changeDisabled(){this.$picker&&(this.$picker.disabled=this.isDisabled())}}a(be,"baseName","color-picker");function rs(s,n,t){let e=s.target,i="";do if(t&&t.isSameNode(e)||e.tagName==="BODY"||(e.getAttribute&&(i=e.getAttribute(n)||""),i===""&&(e=e.parentNode),!e))break;while(i==="");return[i!=="__stop__"&&i!=="",i,e]}class ge extends N{constructor(){super();x(this,q);a(this,"type","nav");a(this,"name");a(this,"gap");a(this,"$line");a(this,"_handleClick",t=>{const[e,i]=rs(t,"l-name",this.root);e&&i!==this.name&&(this.name=i,this.dispatchEvent(new CustomEvent("change",{detail:{name:i}})),this._updateActive(),this._updateLine())});M(this)}connectedCallback(){this.loadStyle(["tabbar"]),A(this,`l-tabbar--${this.type}`),!v(this.gap)&&!this.gap.startsWith("0")&&A(this,"l-tabbar-gap"),super.connectedCallback(),this._init()}static get observedAttributes(){return["name","type","justify-content","gap"]}attributeChangedCallback(t,e,i){if(t==="name"){const r=S(i,void 0);this.name=r,this._updateActive(),this._updateLine()}else if(t==="type"){const r=S(i,"nav");if(r!==this.type&&(H(this,`l-tabbar--${this.type}`),this.type=r,H(this,`l-tabbar--${r}`),r==="card")){let l=d(".l-tabbar-card-border",this.root);l||(l=L("div",{class:"l-tabbar-card-border"}),this.root.appendChild(l))}}else{const r=S(i,void 0);this[t]=r;const l=d(".l-tabbar-wrapper",this.root);l&&(l.style.cssText=k(this,q,Lt).call(this)),t==="gap"&&(!v(this.gap)&&!this.gap.startsWith("0")?A(this,"l-tabbar-gap"):H(this,"l-tabbar-gap"))}}disconnectedCallback(){super.disconnectedCallback(),this._destroy()}render(){const t=document.createDocumentFragment(),e=document.createElement("div");if(e.className="l-tabbar-wrapper",e.style.cssText=k(this,q,Lt).call(this),e.setAttribute("part","default"),this.getAttr("custom-content",!1)){const r=document.createElement("slot");e.appendChild(r)}else{const r=X("[l-name]",this);r.length>0&&nt(r,l=>{const o=l.getAttribute("l-name");if(o){const c=l.cloneNode(!0);c.classList.add("l-tabbar-item"),c.setAttribute("part","item"),o===this.name&&c.classList.add("active");const h=d("[l-icon]",c),u=X(":not([l-icon])",c);if(h){const $=L("div",{class:["l-tabbar-item-icon",u.length===0?"only":void 0]});$.appendChild(h.cloneNode(!0)),h.replaceWith($)}e.appendChild(c)}})}if(t.appendChild(e),this.type==="card"){const r=L("div",{class:"l-tabbar-card-border"});t.appendChild(r)}return t}setItems(t){const e=d(".l-tabbar-wrapper",this.root);e&&(e.innerHTML="",e.appendChild(k(this,q,At).call(this,t)))}addItems(t){const e=d(".l-tabbar-wrapper",this.root);e&&e.appendChild(k(this,q,At).call(this,t))}_init(){_(this.root,"click",this._handleClick),setTimeout(()=>{this._updateLine()},300)}_destroy(){w(this.root,"click",this._handleClick),this.$line=void 0}_updateActive(){const e=this.getAttr("custom-content",!1)?this:this.root,i=d(".active",e);i&&H(i,"active");const r=d(`[l-name="${this.name}"]`,e);r&&A(r,"active")}_updateLine(){queueMicrotask(()=>{if(!this.name||this.type==="nav"||!this.rendered)return;const t=this.getAttr("custom-content",!1),e=d(".active",t?this:this.root);if(!e)return;const i=e.offsetLeft;if(!this.$line){const r=L("div",{class:"l-tabbar--bar-line"});r.part="line",this.root.appendChild(r),this.$line=d(".l-tabbar--bar-line",this.root)}this.$line.style.cssText=`width:${e.offsetWidth}px;left:${i}px`,Re(e,this)||this.scrollTo({left:i,behavior:"smooth"})})}}q=new WeakSet,Lt=function(){const t={},e=this.getAttr("justify-content");if(v(e)||(t["justify-content"]=e),!v(this.gap)){let i=this.gap;it(i,{isPositive:!0})&&(i=`${i}px`),t["--l-tabbar-item-gap"]=i}return Y(t)},At=function(t){const e=document.createDocumentFragment();for(let i=0,r=t.length;i<r;i++){const l=t[i],o=L("div",{class:F(["l-tabbar-item",this.name===l.name?"active":void 0]),"l-name":l.name,part:"item"}),c=l.icon;if(c){const u=L("div",{class:"l-tabbar-item-icon"});let $=typeof c=="string"?c:c();typeof $=="string"?u.innerHTML=$:u.appendChild($),o.appendChild(u)}const h=l.text;if(h){let u=typeof h=="string"?h:h();typeof u=="string"?o.appendChild(L(u)):o.appendChild(u)}e.appendChild(o)}return e},a(ge,"baseName","tabbar");function ve(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":window.matchMedia("(prefers-color-scheme: light)").matches?"light":"auto"}async function as(s,n=!0){return new Promise(t=>{const e=document.documentElement.classList;s==null&&(s=ve());function i(){s==="light"?(e.add("light"),e.remove("dark")):s==="dark"?(e.add("dark"),e.remove("light")):e.remove("light","dark")}n&&document.startViewTransition?document.startViewTransition(()=>{i(),t(s)}):(i(),t(s))})}function ls(){let s=document.documentElement.className.match(/light|dark/);return s!=null&&(s=s[0]),s==null&&(s=localStorage.getItem("web-theme-appearance")),s==null&&(s=ve()),s}async function os(s,n=!0,t=!0){return n===!0&&localStorage.setItem("web-theme-appearance",s??"auto"),as(s,t)}function cs(s){const n=document.documentElement,t=n.className.match(/color-([0-9a-fA-F]{6})/);if(t==null){let e=getComputedStyle(n).getPropertyValue("--nt-primary-color");return e===""&&(e=localStorage.getItem("web-theme-color")),e||s}return`#${t[1]}`}async function hs(s){const n=[`--nt-primary-color: ${s};`,`--l-primary-color: ${s};`,`--nt-primary-color-dark1: ${U(s,1,!1)};`,`--l-primary-color-dark1: ${U(s,1,!1)};`];for(let e=1;e<=5;e++)n.push(`--nt-primary-color-light${e}: ${U(s,e)};`),n.push(`--l-primary-color-light${e}: ${U(s,e)};`);let t=document.getElementById("color-theme-style");return t==null&&(t=document.createElement("style"),t.id="color-theme-style",document.head.appendChild(t)),t.innerHTML=`:root{${n.join("")}}`,s}function ds(s,n=!0){return n===!0&&localStorage.setItem("web-theme-color",s),hs(s)}const us=[{value:"auto",text:"跟随系统",icon:"l-theme-default-icon"},{value:"light",text:"浅色模式",icon:"l-sun-icon"},{value:"dark",text:"深色模式",icon:"l-moon-icon"}];class Ce extends N{constructor(){super();x(this,y);a(this,"type","button");a(this,"label","text");a(this,"theme");x(this,V);x(this,W,async t=>{let e;if(this.type==="button")e=this.theme==="dark"?"auto":"dark";else{const i=t.target.value;this.type!=="switch"?e=i:e=i?"dark":"light"}await os(e),this.theme=e,this.type==="button"&&k(this,y,St).call(this,b(this,V)),this.dispatchEvent(new CustomEvent("change",{detail:e}))});M(this),this.theme=ls()}connectedCallback(){this.loadStyle(["theme"]),super.connectedCallback(),k(this,y,Ae).call(this)}disconnectedCallback(){super.disconnectedCallback(),k(this,y,Se).call(this)}render(){switch(this.type){case"select":return k(this,y,Me).call(this);case"radio":return k(this,y,Le).call(this);case"switch":return k(this,y,Ee).call(this);default:return k(this,y,xe).call(this)}}}V=new WeakMap,y=new WeakSet,xe=function(){const t=L("l-button",{class:"l-theme-btn l-theme-inner"});return k(this,y,St).call(this,t),t},St=function(t){const e=this.theme==="auto"?"sun":"moon";t.innerHTML=`<l-${e}-icon></l-${e}-icon>`},Me=function(){const t=L("l-select-ori",{class:"l-theme-inner"});t.value=this.theme;const e=['<option value="auto">跟随系统</option>','<option value="light">浅色模式</option>','<option value="dark">深色模式</option>'];return t.innerHTML=e.join(""),t},Ee=function(){const t=L("l-switch",{class:"l-theme-switch l-theme-inner"});return t.value=this.theme==="dark",t.innerHTML='<l-sun-icon slot="unchecked-action"></l-sun-icon><l-moon-icon slot="checked-action"></l-moon-icon>',t},Le=function(){const t=L("l-radio",{class:"l-theme-inner"});t.value=this.theme,t.type="button";const e=us.map(i=>this.label==="icon"?`<${i.icon} radio-value="${i.value}"></${i.icon}>`:`<span radio-value="${i.value}">${i.text}</span>`);return t.innerHTML=e.join(""),t},W=new WeakMap,Ae=function(){Et(this,V,d(".l-theme-inner",this.root)),this.type==="button"?_(b(this,V),"click",b(this,W)):_(b(this,V),"change",b(this,W))},Se=function(){b(this,V)&&(this.type==="button"?w(b(this,V),"click",b(this,W)):w(b(this,V),"change",b(this,W)),Et(this,V,void 0))},a(Ce,"baseName","theme");class $e extends N{constructor(){super();x(this,ot);a(this,"color");x(this,ct,async t=>{const e=t.detail;this.color=e,await ds(e),this.dispatchEvent(new CustomEvent("change",{detail:e}))});this.color=cs()||"#722ed1"}connectedCallback(){super.connectedCallback(),k(this,ot,Ne).call(this)}render(){const t=document.createElement("l-color-picker");return t.value=this.color,t}}ot=new WeakSet,Ne=function(){const t=d("l-color-picker",this.root);t&&_(t,"change",b(this,ct))},ct=new WeakMap,a($e,"baseName","theme-color");const D=new Map;function ke(s){for(const n of D.values())for(const t of n)fs(s,t)}function fs(s,n){const t=s.target,e=!t,i=n.el.contains(t),r=n.el===t;e||i||r||n.handler(s)}function ms(s,n){D.has(s)||D.set(s,[]);const t=D.get(s);t&&t.push({el:s,handler:n}),D.size===1&&document.addEventListener("click",ke,!0)}function ps(s){D.delete(s),D.size===0&&document.removeEventListener("click",ke,!0)}class _t extends N{constructor(){super();x(this,T);a(this,"placement","top");a(this,"content");a(this,"showArrow",!0);a(this,"trigger","hover");a(this,"disabled",!1);a(this,"isShow",!1);a(this,"width");a(this,"destroyOnHide",!1);a(this,"offset");a(this,"position","absolute");a(this,"theme","default");a(this,"_t");x(this,ht,t=>{t.target.id!==this.id&&this.hide()});x(this,O,t=>{this.show(t.target)});x(this,K,()=>{this.hide()});x(this,et,t=>{this.trigger==="click"?this.toggle(t.target):this.trigger==="focus"&&this.show(t.target)});M(this)}connectedCallback(){this.loadStyle(["popover"]),k(this,T,Te).call(this),super.connectedCallback(),this.renderContent(),k(this,T,Ie).call(this)}disconnectedCallback(){super.disconnectedCallback(),k(this,T,He).call(this)}render(){const t=document.createElement("slot");return t.setAttribute("name","trigger"),t}renderContent(){if(!this.isShow)return;let t=d(".l-popover--content",this.root);if(t){t.style.removeProperty("display");return}if(t=Tt("div",{class:["l-popover--content",`l-popover-${this.placement}`,this.theme==="default"?void 0:`l-popover-${this.theme}`]}),this.offset&&(t.style.cssText="--l-popover-offset: ${this.offset}px;"),t.part="content",t.innerHTML=this.contentHTML(),this.showArrow){const e=Tt("div",{class:"l-popover--arrow"});t.appendChild(e)}this.trigger==="hover"&&(_(t,"mouseenter",b(this,O)),_(t,"mouseleave",b(this,K))),this.root.appendChild(t)}contentHTML(){return this.content?`<span>${this.content}</span>`:"<slot></slot>"}hideContent(){const t=d(".l-popover--content",this.root);t&&(this.destroyOnHide?(this.trigger==="hover"&&(w(t,"mouseenter",b(this,O)),w(t,"mouseleave",b(this,K))),this.root.removeChild(t)):t.style.display="none")}show(t){if(!this.disabled){if(this.isShow){k(this,T,ze).call(this);return}this.isShow=!0,this.renderContent(),k(this,T,Ve).call(this,t)}}hide(){this._t=setTimeout(()=>{this.isShow=!1,this.hideContent()},50)}toggle(t){this.isShow?this.hide():this.show(t)}}T=new WeakSet,Te=function(){const t=this.getAttr("inline",!1);this.style.display=t?"inline-block":"block",this.id||(this.id=`${Vt()}-popover`)},Ie=function(){const t=d('[slot="trigger"]',this);t&&(this.trigger==="hover"?(_(t,"mouseenter",b(this,O)),_(t,"mouseleave",b(this,K))):(this.trigger==="click"||this.trigger==="focus")&&(_(t,"click",b(this,et)),ms(t,b(this,ht))))},He=function(){const t=d('[slot="trigger"]',this);t&&(this.trigger==="hover"?(w(t,"mouseenter",b(this,O)),w(t,"mouseleave",b(this,K))):(this.trigger==="click"||this.trigger==="focus")&&(w(t,"click",b(this,et)),ps(t)))},ht=new WeakMap,O=new WeakMap,K=new WeakMap,et=new WeakMap,ze=function(){this._t&&(clearTimeout(this._t),this._t=void 0)},Ve=function(t){let e="bottom",i="";const r=this.placement.split("-");r!=null&&(e=r[0],i=r[1]||"");let l;t==null&&(t=d('[slot="trigger"]',this));const o=d(".l-popover--content",this.root);if(o){let c=o.getBoundingClientRect();const h=t.getBoundingClientRect();let u=document.documentElement;const $=u.scrollLeft,R=u.scrollTop;this.width!=null&&(this.width==="trigger"?l=h.width:l=this.width),l!=null&&(c.width=l);const dt=mt(h,c,e,i,this.offset),I=pt(h,c,e,i,this.offset),st=je(h,c,e,i,$,R,I,dt,this.offset);e=st.mainAlign,i=st.crossAlign,l!=null&&o.style.setProperty("width",`${l}px`);const _e=`l-popover-${e}${i===""?"":"-"+i}`,xt=o.className.split(" ");xt[1]!==_e&&(xt[1]=`${_e}`,o.className=xt.join(" "))}},a(_t,"baseName","popover"),f([vt,Ct]);class ye extends _t{constructor(){super()}connectedCallback(){this.loadStyle(["popconfirm"]),this.trigger="click",this.theme="popconfirm",super.connectedCallback(),_(this.root,"click",n=>{const[t,e]=Fe(n,"l-action",this);t&&(this.dispatchEvent(new CustomEvent(e,{detail:{action:e}})),this.hide())})}contentHTML(){const n=d('[slot="icon"]',this),t=[];return t.push('<div class="l-popconfirm-container">'),t.push('<div class="l-popconfirm-icon-wrapper">'),t.push(n?'<slot name="icon"></slot>':"<l-warn-icon></l-warn-icon>"),t.push(`</div>${super.contentHTML()}</div>`),t.push('<div class="l-popconfirm-footer">'),t.push('<l-button l-action="cancel">取消</l-button>'),t.push('<l-button type="primary" l-action="ok">确定</l-button>'),t.push("</div>"),t.join("")}}a(ye,"baseName","popconfirm"),f(ye),f(_t),f(ee),f($e),f(Ce),f(ge),f(be),f(pe),f(me),f(fe),f(ue),f(de),f(ce),f(he),f(vt),f(Pt),f(C),f(jt),f(Kt),f(Yt),f(Ut),f(bt),f(Gt),f(Jt),f(Xt),f(Zt),f(Qt),f(te),f(se),f([Dt,Wt,Ot]),globalThis.LMessage=lt;function bs(){const s=document.currentScript.src,n=s.lastIndexOf("/"),e=`${s.slice(0,n+1)}litos-ui.css`,i=document.createElement("link");i.rel="stylesheet",i.href=e,i.id="litos-ui-style",document.head.appendChild(i)}bs()})();
|
|
1
|
+
var Ir=Object.defineProperty;var Me=b=>{throw TypeError(b)};var Hr=(b,g,v)=>g in b?Ir(b,g,{enumerable:!0,configurable:!0,writable:!0,value:v}):b[g]=v;var n=(b,g,v)=>Hr(b,typeof g!="symbol"?g+"":g,v),_t=(b,g,v)=>g.has(b)||Me("Cannot "+v);var m=(b,g,v)=>(_t(b,g,"read from private field"),v?v.call(b):g.get(b)),_=(b,g,v)=>g.has(b)?Me("Cannot add the same private member more than once"):g instanceof WeakSet?g.add(b):g.set(b,v),At=(b,g,v,st)=>(_t(b,g,"write to private field"),st?st.call(b,v):g.set(b,v),v),k=(b,g,v)=>(_t(b,g,"access private method"),v);(function(){"use strict";var Ct,rt,X,ut,P,Mt,Et,V,w,Ee,Lt,Le,Te,Se,W,Ne,ze,ct,Ie,dt,N,He,Ve,Fe,ht,K,Y,it,Re,Be;const b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g="0123456789";function v(r,o=!0){return r==null?!0:(o&&typeof r=="string"?r.trim().length:r.length)===0}function st(r,o){o={isPositive:!1,isFloat:!0,...o};const t=o.isPositive?"[+]?":"[+-]?",e=o.isFloat?"([0-9]*[.])?[0-9]+":"[0-9]+";return new RegExp("^"+t+e+"$").test(r)}function B(r){if(typeof r=="object"&&r.min!=null&&r.max!=null){const o=Math.random(),t=r.hasEnd?1:0,e=o*(r.max-r.min+t)+r.min;return r.isInteger!==!1?Math.floor(e):e}else{if(typeof r=="object"&&r.length==null)throw new Error("random_length_cannot_null");let o=typeof r=="object"?r.length:r,t=b;typeof r=="object"&&r.hasLetter===!1&&(t=g);const e=Array.from({length:o},()=>t.charAt(B({min:0,max:t.length-1,hasEnd:!0}))).join("");return typeof r=="object"&&r.firstIsZero===!1&&e.indexOf("0")===0?B(r):e}}function Tt(r,o){return typeof r=="string"?(o||document).querySelectorAll(r):[r]}function Z(r,o){return Tt(r,o)}function E(r,o={},t){let e;if(r.startsWith("<")&&r.endsWith(">")?e=new DOMParser().parseFromString(r,"text/html").body.firstElementChild:e=document.createElement(r),e&&o)for(const i in o){const s=o[i];i==="class"?e.className=F(s):i==="style"?e.style.cssText=U(s):i==="textContent"&&s?e.textContent=s:i==="innerHTML"&&s?e.innerHTML=s:i==="outerHTML"&&s?e.outerHTML=s:s===!0?e.setAttribute(i,""):typeof s=="string"&&e.setAttribute(i,s)}return e}function St(r,o={},t){return E(r,o)}function p(r,o){const t=Tt(r,o);return t.length>0?t[0]:void 0}function L(r,o){r.classList.add(o)}function I(r,o){r.classList.remove(o)}function Nt(r,o){return r.classList.contains(o)}function C(r,o,t,e){r.addEventListener(o,t,e)}function $(r,o,t,e){r.removeEventListener(o,t,e)}function je(r,o,t){let e=r.target,i="";do if(t&&t.isSameNode(e)||e.tagName==="BODY"||(e.getAttribute&&(i=e.getAttribute(o)||""),i===""&&(e=e.parentNode),!e))break;while(i==="");return[i!=="__stop__"&&i!=="",i,e]}function lt(r,o){for(let t=0,e=r.length;t<e&&o(r[t],t)!==!0;t++);}function ft(r,o,t){const e=r.getAttribute(o);if(t==null)return e;const i=typeof t;return e==null?t:i==="bigint"||i==="number"?e===""?t:Number(e):i==="boolean"?e===""||e==="1"||e==="true"||e===o:i==="object"?e===""?t:JSON.parse(e):e}function Pe(r,o=null,t="horizontal"){o==null&&(o=r.offsetParent);const e=o.getBoundingClientRect(),i=r.getBoundingClientRect();let s=t==="horizontal"?i.left:i.top,l=t==="horizontal"?i.right:i.bottom,a=t==="horizontal"?e.left:e.top,c=t==="horizontal"?e.right:e.bottom;return s>=a&&l<=c}function F(r){let o="";if(Array.isArray(r))for(let t=0,e=r.length;t<e;t++){const i=r[t];i&&(o+=`${i} `)}else if(typeof r=="string")o=r;else for(const t in r)r[t]&&(o+=`${t} `);return o.trim()}function U(r){let o="";if(Array.isArray(r))for(let t=0,e=r.length;t<e;t++){const i=r[t];i&&(o+=`${i};`)}else if(typeof r=="string")o=r;else for(const t in r){const e=r[t];e&&(o+=`${t}:${e};`)}return o}function nt(r,o,t="set"){for(let e=0,i=o.length;e<i;e++){const s=o[e];t==="set"?r.style.setProperty(s[0],s[1]):r.style.removeProperty(s[0])}}function zt(r,o,t="enter",e){const i=t==="enter"?"from":"to";let s="",l="";const a=[];if(typeof o=="string")s=`${o}-${t}-${i}`,l=`${o}-${t}-active`;else for(let c=0,h=o.length;c<h;c++){const d=o[c];d.length>=3&&a.push(`${d[0]} ${d[2]}`)}t==="enter"?s?(r.classList.add(s),setTimeout(()=>{r.classList.add(l),requestAnimationFrame(()=>{r.classList.remove(s)})},0)):(nt(r,o,"set"),setTimeout(()=>{a.length>0&&r.style.setProperty("transition",a.join(", ")),requestAnimationFrame(()=>{nt(r,o,"remove")})},0)):s?(r.classList.add(l),requestAnimationFrame(()=>{r.classList.add(s)})):(a.length>0&&r.style.setProperty("transition",a.join(", ")),requestAnimationFrame(()=>{nt(r,o,"set")})),r.addEventListener("transitionend",()=>{s?(r.classList.remove(l),requestAnimationFrame(()=>{r.classList.remove(s)})):(r.style.removeProperty("transition"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{nt(r,o,"remove")})})),e&&e()},{once:!0})}let qe=-1,It={prefix:"l"};function f(r,o){const t=Array.isArray(r)?r:[r];for(const e of t){const i=`${It.prefix}-${e.baseName}`;customElements.get(i)||customElements.define(i,e)}}function Ht(){return`${It.prefix}-${++qe}`}function T(r,o,t){if(r==null)return o;switch(typeof o){case"boolean":return r===""||r==="true"||r==="1"||r===t;case"number":return Number(r);default:return r}}function A(r){const o=r.attributes;for(const t of o){const{name:e,value:i}=t;if(e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("_")||e.startsWith("$")||["id","class","style"].includes(e))continue;const l=e.split("-").map((d,y)=>y===0?d:d[0].toUpperCase()+d.slice(1)).join(""),a=T(i,r[l],e),c=Object.getOwnPropertyNames(r),h=r._ignoreInitAttrs||[];e==="value"?(r[l]=a,r._resetValue=a):c.includes(l)&&!h.includes(l)&&(r[l]=a)}}function H(r,o){let t=" ";return o===!0?t=` ${r}`:typeof o=="string"&&!v(o)&&(t=` ${r}="${o}"`),t}function De(r){return r.map(t=>H(t[0],t[1])).join("")}function Oe(r,o){for(const t of o){const e=t[1],i=t[0];e===!0?r.setAttribute(i,""):typeof e=="string"&&!v(e)&&r.setAttribute(i,e)}}function bt(r,o,t,e,i=10){let s=0;return t==="top"?s=o.height+i:t==="bottom"?s=-(r.height+i):(t==="left"||t==="right")&&(e===""?s=o.height/2-r.height/2:e==="end"&&(s=o.height-r.height)),s}function mt(r,o,t,e,i=10){let s=0;return t==="left"?s=o.width+i:t==="right"?s=-(r.width+i):(t==="top"||t==="bottom")&&(e===""?s=o.width/2-r.width/2:e==="end"&&(s=o.width-r.width)),s}function We(r,o,t,e,i,s,l,a,c=10,h="absolute"){const d=window.innerHeight+s-10,y=window.innerWidth+i-10;let R=r.top+s-a;R+o.height>d&&(t==="left"||t==="right"?e="end":t="top",a=bt(r,o,t,e,c),R=r.top+s-a),R<s&&(t==="left"||t==="right"?e="start":t="bottom");let z=r.left+i-l;return z+o.width>y&&(t==="top"||t==="bottom"?e="end":t="left",l=mt(r,o,t,e,c),z=r.left+i-l),z<i&&(t==="top"||t==="bottom"?e="start":t="right"),h==="fixed"&&(a=bt(r,o,t,e,c),l=mt(r,o,t,e,c),z=r.left+i-l,R=r.top+s-a),{x:z,y:R,mainAlign:t,crossAlign:e}}class S extends HTMLElement{constructor(t=!0){super();n(this,"rendered",!1);t&&this.attachShadow({mode:"open"})}static get observedAttributes(){return[]}attributeChangedCallback(t,e,i){}get shadow(){return this.shadowRoot}get root(){return this.shadowRoot||this}createStyle(t){const e=document.createElement("style");e.textContent=t.trim(),this.root.appendChild(e)}createLink(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,this.root.appendChild(e)}loadStyleText(t){let e=t;Array.isArray(e)&&(e=e.join("")),this.createStyle(e)}getAttr(t,e){return ft(this,t,e)}appendToRoot(t){if(t)if(typeof t=="string"){let e=document.createElement("div");e.innerHTML=t,this.root.append(...e.children),e=void 0}else t.length?this.root.append(...t):this.root.append(t)}connectedCallback(){this.appendToRoot(this.render()),this.rendered=!0}disconnectedCallback(){this.root.innerHTML="",this.rendered=!1}render(){}}n(S,"baseName","base-component");const at=2,Ke=.16,Ye=.05,Ue=.05,Ge=.15,Je=/rgba?\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)/,Vt=/^#(?:([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})|([0-9A-Fa-f]{1})([0-9A-Fa-f]{1})([0-9A-Fa-f]{1}))$/;function Xe(r){return r.r!=null&&r.g!=null&&r.b!=null}function Ft(r){return r.h!=null&&r.s!=null&&r.v!=null}function Ze(r){let o=r.match(Je);if(o!=null){const t=parseInt(o[1].trim()),e=parseInt(o[2].trim()),i=parseInt(o[3].trim());if(isNaN(t)||isNaN(e)||isNaN(i))throw new Error("Invalid RGB color.");let s=1;return o[4]!=null&&(s=parseFloat(o[4].trim()),isNaN(s)&&(s=1)),{r:t,g:e,b:i,a:s}}}function Qe(r){const o=r.match(Vt);if(o!=null){const t=o[4]!==void 0,e=parseInt(t?o[4]+o[4]:o[1],16),i=parseInt(t?o[5]+o[5]:o[2],16),s=parseInt(t?o[6]+o[6]:o[3],16);return{r:e,g:i,b:s}}}function gt(r){if(typeof r=="string"){let o=Qe(r);if(o==null&&(o=Ze(r)),o!=null)return o;throw new Error("Invalid color string")}else{if(Xe(r))return r;if(Ft(r))return er(r);throw new Error("Invalid color")}}function tr(r){if(Ft(r))return r;const o=gt(r),t=o.r/255,e=o.g/255,i=o.b/255;let s=Math.max(t,e,i),l=Math.min(t,e,i),a=s-l,c=s,h=s===0?0:a/s,d=0;if(s===l)d=0;else switch(s){case t:d=((e-i)/a+(e<i?6:0))/6;break;case e:d=((i-t)/a+2)/6;break;case i:d=((t-e)/a+4)/6;break}return d=d*360,{h:d,s:h,v:c}}function er(r){let o=r.s,t=r.v;o>1&&(o/=100),t>1&&(t/=100);const e=r.h;var i=Math.floor(e/60)%6,s=e/60-Math.floor(e/60),l=t*(1-o),a=t*(1-s*o),c=t*(1-(1-s)*o);let h=0,d=0,y=0;switch(i){case 0:h=t,d=c,y=l;break;case 1:h=a,d=t,y=l;break;case 2:h=l,d=t,y=c;break;case 3:h=l,d=a,y=t;break;case 4:h=c,d=l,y=t;break;case 5:h=t,d=l,y=a;break}return h=Math.round(h*255),d=Math.round(d*255),y=Math.round(y*255),{r:h,g:d,b:y}}function rr(r,o,t){let e;return Math.round(r.h)>=60&&Math.round(r.h)<=240?e=t?Math.round(r.h)-at*o:Math.round(r.h)+at*o:e=t?Math.round(r.h)+at*o:Math.round(r.h)-at*o,e<0?e+=360:e>=360&&(e-=360),e}function ir(r,o,t){if(r.h===0&&r.s===0)return r.s;let e;return t?e=r.s-Ke*o:e=r.s+Ye*o,e>1&&(e=1),e<.06&&(e=.06),Number(e.toFixed(2))}function or(r,o,t){let e;return t?e=r.v+Ue*o:e=r.v-Ge*o,e>1&&(e=1),Number(e.toFixed(2))}function Rt(r){const o=t=>t.toString(16).padStart(2,"0");return`#${o(r.r)}${o(r.g)}${o(r.b)}`.toUpperCase()}function sr(r){return typeof r=="string"&&Vt.test(r)?r:Rt(gt(r))}function G(r,o=1,t=!0){const e=tr(r);return sr({h:rr(e,o,t),s:ir(e,o,t),v:or(e,o,t)})}const lr=":host{--l-btn-text-color:#fff;--l-btn-hover-text-color:var(--l-btn-text-color);--l-btn-active-text-color:var(--l-btn-text-color);--l-btn-border-color:var(--l-primary-color,#722ed1);--l-btn-background:var(--l-btn-border-color);--l-btn-hover-border-color:var(--l-primary-color-light1,#9254de);--l-btn-hover-background:var(--l-btn-hover-border-color);--l-btn-active-border-color:var(--l-primary-color-dark1,#531dab);--l-btn-active-background:var(--l-btn-active-border-color);--l-btn-disabled-color:#c9c9c9;--l-btn-disabled-background:#fbfbfb;--l-btn-disabled-border-color:#e6e6e6;display:inline-block}.l-btn{cursor:pointer;box-sizing:border-box;vertical-align:middle;height:var(--l-form-edit-height,32px);color:var(--l-btn-text-color);background:var(--l-btn-background);border:1px solid var(--l-btn-border-color);border-radius:3px;outline:none;justify-content:center;align-items:center;gap:5px;padding:0 15px;font-size:14px;line-height:1;transition:border-color .3s,background-color .3s,color .3s;display:inline-flex;position:relative}.l-btn:hover{border-color:var(--l-btn-hover-border-color,var(--l-btn-hover-background));color:var(--l-btn-hover-text-color);background:var(--l-btn-hover-background)}.l-btn:active{border-color:var(--l-btn-active-border-color,var(--l-btn-active-background));color:var(--l-btn-active-text-color);background:var(--l-btn-active-background)}.l-btn-normal{--l-btn-text-color:auto;--l-btn-background:transparent;--l-btn-border-color:#d9d9d9;--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab);--l-btn-hover-background:#fff;--l-btn-active-background:#fff;--l-btn-hover-border-color:var(--l-btn-hover-text-color);--l-btn-active-border-color:var(--l-btn-active-text-color)}.l-btn-primary{--l-btn-background:var(--l-primary-color,#722ed1);--l-btn-hover-background:var(--l-primary-color-light1,#9254de);--l-btn-active-background:var(--l-primary-color-dark1,#531dab)}.l-btn:not(.l-btn-loading):disabled{border-color:var(--l-btn-disabled-border-color);background:var(--l-btn-disabled-background);color:var(--l-btn-disabled-color);cursor:not-allowed;opacity:1}.l-btn-text{--l-btn-background:transparent;--l-btn-border-color:transparent;--l-btn-hover-border-color:transparent;--l-btn-active-border-color:transparent;--l-btn-disabled-background:transparent;--l-btn-disabled-border-color:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;height:auto;padding:5px}.l-btn-primary.l-btn-text{--l-btn-text-color:var(--l-primary-color,#722ed1);--l-btn-hover-text-color:var(--l-primary-color-light1,#9254de);--l-btn-active-text-color:var(--l-primary-color-dark1,#531dab)}.l-btn-ghost{--l-btn-text-color:var(--l-btn-border-color);--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-active-background:transparent;--l-btn-hover-text-color:var(--l-btn-hover-border-color);--l-btn-active-text-color:var(--l-btn-active-border-color)}.l-btn-round{border-radius:calc(var(--l-form-edit-height,32px)/2)}.l-btn-circle{width:var(--l-form-edit-height,32px);border-radius:50%;padding:0}.l-btn-block{width:100%}.l-btn:not(.l-btn-text)+.l-btn{margin-left:10px}html.dark .l-btn:disabled{--l-btn-disabled-background:#ffffff14;--l-btn-disabled-color:#ffffff4d;--l-btn-disabled-border-color:#ffffff4d}",Bt="@keyframes l-rotate-frame{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.l-rotate-anim{animation:1.5s linear infinite l-rotate-frame}";class jt extends S{constructor(){super();n(this,"htmlType","button");n(this,"_handleClick",t=>{const e=t.target,i=ft(e,"html-type");if(i==="reset"||i==="submit"){const s=this._getForm();s&&(i==="reset"?s.reset():i==="submit"&&s.submit())}});A(this)}static get observedAttributes(){return["loading","color","disabled"]}attributeChangedCallback(t,e,i){const s=p(".l-btn",this.root);if(s)if(t==="loading")T(i,!1,t)?(L(s,"l-btn-loading"),s.disabled=!0,s.innerHTML=this.loadingBody()):(I(s,"l-btn-loading"),s.disabled=this.getAttr("disabled",!1),s.innerHTML="<slot></slot>");else if(t==="color"){const l=this.getAttr("text",!1),a=this.getAttr("ghost",!1);s.style.cssText=this.applyColor(i,l,a)}else t==="disabled"&&(s.disabled=this.getAttr("disabled",!1))}connectedCallback(){this.loadStyleText([lr,Bt]),this.render(),(this.htmlType==="reset"||this.htmlType==="submit")&&C(this,"click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),(this.htmlType==="reset"||this.htmlType==="submit")&&$(this,"click",this._handleClick)}render(){const t=this.getAttr("type","normal"),e=document.createElement("button"),i=this.getAttr("loading",!1),s=this.getAttr("shape","default"),l=this.getAttr("text",!1),a=this.getAttr("ghost",!1),c=["l-btn",`l-btn-${t}`,this.getAttr("block",!1)?"l-btn-block":"",s==="round"?"l-btn-round":"",s==="circle"?"l-btn-circle":"",a?"l-btn-ghost":"",l?"l-btn-text":"",i?"l-btn-loading":""];e.className=F(c),e.disabled=this.getAttr("disabled",!1)||i,e.type=this.getAttr("html-type","button");const h=this.applyColor(this.getAttr("color"),l,a);h&&(e.style.cssText=h),i?e.innerHTML=this.loadingBody():e.innerHTML="<slot></slot>",e.setAttribute("part","default"),this.root.appendChild(e)}loadingBody(){const t=this.getAttr("loading-text",""),e=['<l-loading-icon class="l-rotate-anim"></l-loading-icon>'];return t===""?e.push("<slot></slot>"):e.push(`<span>${t}</span>`),e.join("")}applyColor(t,e=!1,i=!1){if(!t)return"";const s=G(t,1,!0),l=G(t,3,!1);return U({"--l-btn-border-color":e?"transparent":t,"--l-btn-text-color":i||e?t:"#ffffff","--l-btn-hover-text-color":i||e?s:"#ffffff","--l-btn-background":i||e?"transparent":t,"--l-btn-active-text-color":i||e?l:"#ffffff","--l-btn-hover-border-color":e?"transparent":s,"--l-btn-hover-background":i||e?"transparent":s,"--l-btn-active-background":i||e?"transparent":l,"--l-btn-active-border-color":e?"transparent":l})}_getForm(){let t=this.parentElement,e;for(;t!=null;){const i=t.tagName;if(i==="L-FORM"){e=t;break}if(i==="BODY")break;t=t.parentElement}return t=null,e}}n(jt,"baseName","button");let u;function q(r,o,t){u==null&&(u=new Map),u.has(r)||u.set(r,new Map([[o,new Set]])),u.get(r).has(o)||u.get(r).set(o,new Set),u.get(r).get(o).add(t)}function Q(r,o,t){var e,i,s,l,a,c;(i=(e=u==null?void 0:u.get(r))==null?void 0:e.get(o))==null||i.delete(t),((l=(s=u==null?void 0:u.get(r))==null?void 0:s.get(o))==null?void 0:l.size)==0&&((a=u.get(r))==null||a.delete(o)),((c=u==null?void 0:u.get(r))==null?void 0:c.size)==0&&u.delete(r),(u==null?void 0:u.size)==0&&(u=void 0)}function Pt(r){r==null?u!=null&&(u.clear(),u=void 0):u!=null&&(u.delete(r),u.size===0&&(u=void 0))}function M(r,o,...t){var i;const e=(i=u==null?void 0:u.get(r))==null?void 0:i.get(o);if(e!=null)for(const s of e)s(...t)}class tt extends S{constructor(t=!0){super();n(this,"disabled",!1);n(this,"name");n(this,"formAttrs",{});n(this,"formItemAttrs",{});n(this,"_value","");n(this,"_resetValue");n(this,"_firstPushValue",!0);n(this,"_reseting",!1);n(this,"_formAttributeChanged",(t,e,i)=>{i===this.formAttrs.formId?this.formAttrs[t]=e:this.formItemAttrs[t]=e,t==="disabled"&&this._changeDisabled()});n(this,"_resetFieldValue",()=>{this._reseting=!0,this.reset()});this._firstPushValue=t}set value(t){this.setValue(t)}get value(){return this.getValue()}setValue(t){this._value=t,this.pushValueChange()}getValue(){return this._value}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t,e,i){if(t==="disabled"){const s=T(i,!1,t);s!==this.disabled&&(this._changeDisabled(),this.disabled=s)}else this.attributeChange(t,e,i)}attributeChange(t,e,i){}connectedCallback(){const t=this._getForm();this.formAttrs=t.formAttr,this.formItemAttrs=t.formItemAttr,this.formAttrs.id&&(q(this.formAttrs.id,"attributeChanged",this._formAttributeChanged),q(this.formAttrs.id,"reset",this._resetFieldValue),this._firstPushValue&&this.pushValueChange()),this.formItemAttrs.id&&q(this.formItemAttrs.id,"attributeChanged",this._formAttributeChanged),super.connectedCallback()}disconnectedCallback(){this.formAttrs.id&&(Q(this.formAttrs.id,"attributeChanged",this._formAttributeChanged),Q(this.formAttrs.id,"reset",this._resetFieldValue)),this.formItemAttrs.id&&Q(this.formItemAttrs.id,"attributeChanged",this._formAttributeChanged),super.disconnectedCallback()}isDisabled(){return this.disabled===!0||this.formItemAttrs.disabled===!0?!0:this.formAttrs.disabled||!1}getName(){return this.name?this.name:this.formItemAttrs.name}_getForm(){let t=this.parentElement,e={},i={};for(;t!=null;){const s=t.tagName;if(s==="L-FORM"){const l=t.sharedAttrs;for(let a=0;a<l.length;a++){const c=l[a];e[c]=t[c]}break}if(s==="BODY")break;if(s==="L-FORM-ITEM"){const l=t.sharedAttrs;for(let a=0;a<l.length;a++){const c=l[a];i[c]=t[c]}}t=t.parentElement}return t=null,{formAttr:e,formItemAttr:i}}_changeDisabled(){}pushValueChange(){const t=this.getName();this.formAttrs.id&&t&&M(this.formAttrs.id,"valueChange",t,this._value,!this._reseting),this._reseting=!1}reset(){this.value=this._resetValue||""}}const vt=":host{width:var(--l-input-width,auto);display:inline-block}.l-input{box-sizing:border-box;width:100%;max-width:100%;height:var(--l-form-edit-height,32px);border:1px solid var(--l-border-color,#dedede);text-align:inherit;vertical-align:middle;border-radius:3px;outline:none;padding:0 5px;transition:border-color .3s}.l-input.is-error{--l-border-color:var(--nt-error-color,#ed3f13)}.l-input:not(.is-error):focus{border-color:var(--l-primary-color,#722ed1)}.l-input:disabled{cursor:not-allowed;background:var(--l-disabled-color,#f5f7fa)}";class qt extends tt{constructor(){super();n(this,"type","text");n(this,"placeholder");n(this,"autosize",!1);n(this,"allowInput");n(this,"parser");n(this,"width");n(this,"block",!1);n(this,"error",!1);n(this,"$input");n(this,"_input",t=>{const e=t.target;let i=e.value;if(this.allowInput!=null){let s=this.allowInput.indexOf("."),l=s===-1?s:parseInt(this.allowInput.substring(s+1));i=this._numberInputParse(i,{integer:this.allowInput.includes("integer"),negative:this.allowInput.startsWith("-"),precition:l}),i=String(i),e.value=i}this.parser!=null&&(i=this.parser(i),e.value=i),this.setValue(i)});n(this,"_validateChange",(t,e)=>{const i=this.getName();if(i){const s=t===!0?!1:t[i]!=null;(e==null||e===i&&this.error!=s)&&(this.error=s,this._updateError()),Object.keys(t)[0]===i&&this.focus()}});A(this)}set value(t){this.setValue(t),this.$input!=null&&(this.$input.value=this.value)}get value(){return this.getValue()}static get observedAttributes(){return["disabled","error"]}connectedCallback(){super.connectedCallback(),this.loadStyleText([vt])}disconnectedCallback(){super.disconnectedCallback(),this.formAttrs.id&&Q(this.formAttrs.id,"validateChange",this._validateChange),$(this.$input,"input",this._input),this.$input=void 0}attributeChange(t,e,i){if(t==="error"){const s=T(i,!1,t);s!==this.error&&(this.error=s,this._updateError())}}render(){let t=H("value",this.value);const e=H("placeholder",this.placeholder),i=H("disabled",this.isDisabled()),s=F({"l-input":!0,"is-autosize":this.autosize,"is-error":this.error}),l=this.getName(),a=H("name",l),c=`${t}${a}${e}${i}`;this.shadow.innerHTML=`<input part="default" type="${this.type}" class="${s}"${c}></input>`,this.$input=p("input",this.root),C(this.$input,"input",this._input),this.style.cssText=U(this._getStyleObj())+this.getAttr("style",""),l&&this.formAttrs.id&&q(this.formAttrs.id,"validateChange",this._validateChange)}setParser(t){this.parser=t}focus(){var t;(t=this.$input)==null||t.focus()}_changeDisabled(){this.$input!=null&&(this.$input.disabled=this.isDisabled())}_numberInputParse(t,e){let i=t,s=e.negative?"-?":"";if(e.integer){const a=i.match(new RegExp(`^(${s}\\d*)`));return a!=null?a[1]:i.substring(0,i.length-1)}const l=i.match(new RegExp(`(${s}\\d+\\.\\d{0,${e.precition}})|(${s}\\d*)`));return l!=null?i=l[1]||l[2]:i="",l!=null?l[1]||l[2]:""}_getStyleObj(){const t={};return this._isBlock()&&(t["--l-input-width"]="100%"),this.width&&(t["--l-input-width"]=this.width),t}_isBlock(){if(this.block===!0||this.formItemAttrs.innerBlock===!0||this.formAttrs.innerBlock===!0)return!0}_updateError(){this.$input&&(this.error?L(this.$input,"is-error"):I(this.$input,"is-error"))}}n(qt,"baseName","input");const nr=":host{display:inline-flex}.l-icon{fill:currentColor;vertical-align:middle;width:1em;height:1em;display:inline-block}";class x extends S{constructor(){super();n(this,"useLink");n(this,"viewBox");this.useLink=!1,this.viewBox="0 0 1024 1024"}connectedCallback(){this.loadStyleText([nr]),this.render(),this.rendered=!0}render(){const t=this.createEl("svg"),e=this.getAttr("useLink",this.useLink),i=this.getAttr("viewBox",this.viewBox);t.classList.add("l-icon"),e||t.setAttribute("viewBox",i);const s=this.renderChildren();if(typeof s=="string")if(s===""){const l=this.children,a=[];for(let c=0,h=l.length;c<h;c++){const d=l[c];a.push(d.outerHTML)}t.innerHTML=a.join("")}else t.innerHTML=s;else t.append(s);this.shadow.appendChild(t)}renderChildren(){return""}createEl(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}n(x,"baseName","base-icon");class Dt extends x{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path>'}}n(Dt,"baseName","arrow-down-icon");class Ot extends x{renderChildren(){return'<path fill="currentColor" d="M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"></path>'}}n(Ot,"baseName","arrow-left-icon");class Wt extends x{renderChildren(){return'<path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path>'}}n(Wt,"baseName","arrow-right-icon");class Kt extends x{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"></path>'}}n(Kt,"baseName","arrow-up-icon");class Yt extends x{renderChildren(){return'<path fill="currentColor" d="M512 320 192 704h639.936z"></path>'}}n(Yt,"baseName","caret-top-icon");class Ut extends x{renderChildren(){return'<path fill="currentColor" d="m192 384 320 384 320-384z"></path>'}}n(Ut,"baseName","caret-bottom-icon");class Gt extends x{constructor(){super();n(this,"_t");n(this,"_start");this.useLink=!0,this._t=void 0,this._start=0}renderChildren(){return""}render(){super.render()}disconnectedCallback(){this._t!=null&&(cancelAnimationFrame(this._t),this._t=void 0)}connectedCallback(){super.connectedCallback();const t=this.getAttribute("name");this._start=Date.now(),t&&this._loadIcon(t)}_loadIcon(t){Date.now()-this._start>=1e4||(this._t=requestAnimationFrame(()=>{const i=document.querySelector(`#${t}`);if(i==null){this._loadIcon(t);return}this._t=void 0;let s=i.getAttribute("viewBox");s||(s="0 0 1024 1024");const l=this.shadow.querySelector("svg");l!=null&&(l.setAttribute("viewBox",s),l.innerHTML=i.innerHTML)}))}}n(Gt,"baseName","font-icon");let ar=(Ct=class extends x{renderChildren(){return'<path d="M520.665 64.564a29.244 29.244 0 0 0-7.071-.894c-16.211 0-29.35 13.14-29.35 29.35 0 15.83 12.538 28.696 28.223 29.293v.073c.375 0 .751-.014 1.127-.014 216.493 0 389.629 173.942 389.629 390.433 0 216.496-173.136 388.827-389.63 388.827s-389.63-172.333-389.63-388.829c0-.27.01-.536.01-.804h-.01c0-16.209-13.141-29.35-29.35-29.35s-29.35 13.139-29.35 29.35c0 .055.007.11.007.164-.001.214-.007.425-.007.64 0 247.609 200.722 448.331 448.33 448.331 247.607 0 448.33-200.722 448.33-448.33-.002-245.242-196.917-444.456-441.258-448.24z" fill="currentColor"></path>'}},n(Ct,"baseName","loading-icon"),Ct);class Jt extends x{renderChildren(){return'<path fill="currentColor" d="m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"></path>'}}n(Jt,"baseName","search-icon");class Xt extends x{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12 18c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6zm0-10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zM12 4c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM12 24c-.6 0-1-.4-1-1v-2c0-.6.4-1 1-1s1 .4 1 1v2c0 .6-.4 1-1 1zM5.6 6.6c-.3 0-.5-.1-.7-.3L3.5 4.9c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.1.2-.4.3-.7.3zM19.8 20.8c-.3 0-.5-.1-.7-.3l-1.4-1.4c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.4 1.4c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3zM3 13H1c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM23 13h-2c-.6 0-1-.4-1-1s.4-1 1-1h2c.6 0 1 .4 1 1s-.4 1-1 1zM4.2 20.8c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.4.3-.7.3zM18.4 6.6c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.4-1.4c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-1.4 1.4c-.2.2-.5.3-.7.3z"></path>'}}n(Xt,"baseName","sun-icon");class Zt extends x{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12.1 22h-.9c-5.5-.5-9.5-5.4-9-10.9.4-4.8 4.2-8.6 9-9 .4 0 .8.2 1 .5.2.3.2.8-.1 1.1-2 2.7-1.4 6.4 1.3 8.4 2.1 1.6 5 1.6 7.1 0 .3-.2.7-.3 1.1-.1.3.2.5.6.5 1-.2 2.7-1.5 5.1-3.6 6.8-1.9 1.4-4.1 2.2-6.4 2.2zM9.3 4.4c-2.9 1-5 3.6-5.2 6.8-.4 4.4 2.8 8.3 7.2 8.7 2.1.2 4.2-.4 5.8-1.8 1.1-.9 1.9-2.1 2.4-3.4-2.5.9-5.3.5-7.5-1.1-2.8-2.2-3.9-5.9-2.7-9.2z"></path>'}}n(Zt,"baseName","moon-icon");class Qt extends x{constructor(){super()}renderChildren(){return'<path d="M1039.92888889 967.11111111L1039.92888889 56.88888889c0-40.15900445-32.65877333-72.81777778-72.81777778-72.81777778l-910.22222222 0c-40.15900445 0-72.81777778 32.65877333-72.81777778 72.81777778l0 910.22222222c0 40.15900445 32.65877333 72.81777778 72.81777778 72.81777778L967.11111111 1039.92888889c40.15900445 0 72.81777778-32.65877333 72.81777778-72.81777778zM56.88888889 56.88888889L967.11111111 56.88888889l0 910.22222222-910.22222221 0.07281778L56.88888889 56.88888889z"></path><path d="M876.08888889 349.17944888a36.40888889 36.40888889 0 0 0-36.40888889-36.40888889l-120.47701333 1e-8L719.20298668 184.32a36.40888889 36.40888889 0 0 0-72.81777779 0l0 164.85944889a36.40888889 36.40888889 0 0 0 36.40888889 36.40888889L839.68 385.58833778a36.40888889 36.40888889 0 0 0 36.40888889-36.4088889z m-156.88590221 473.27914667L719.20298667 694.04444445 839.68 694.04444445a36.40888889 36.40888889 0 1 0 0-72.81777778l-156.88590222 0a36.40888889 36.40888889 0 0 0-36.40888889 36.40888888l0 164.82304a36.40888889 36.40888889 0 1 0 72.81777779 0zM366.36444445 349.17944888L366.36444445 184.32a36.40888889 36.40888889 0 1 0-72.81777778 0l0 128.45055999-120.51342222 1e-8a36.40888889 36.40888889 0 1 0 0 72.81777778L329.95555555 385.58833778a36.40888889 36.40888889 0 0 0 36.4088889-36.4088889z m0 473.27914667L366.36444445 657.63555555a36.40888889 36.40888889 0 0 0-36.4088889-36.40888888l-156.9223111-1e-8a36.40888889 36.40888889 0 1 0 0 72.81777779L293.54666667 694.04444445l0 128.4141511a36.40888889 36.40888889 0 1 0 72.81777778 0z"></path>'}}n(Qt,"baseName","reduction-icon");class te extends x{constructor(){super()}renderChildren(){return'<path d="M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"></path>'}}n(te,"baseName","refresh-left-icon");class ee extends x{renderChildren(){return'<path d="M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"></path>'}}n(ee,"baseName","refresh-right-icon");class re extends x{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10m0-1.5v-17a8.5 8.5 0 0 1 0 17"/>'}}n(re,"baseName","theme-default-icon");class ie extends x{renderChildren(){return'<path d="M384 96a32 32 0 0 1 64 0v786.752a32 32 0 0 1-54.592 22.656L95.936 608a32 32 0 0 1 0-45.312h.128a32 32 0 0 1 45.184 0L384 805.632zm192 45.248a32 32 0 0 1 54.592-22.592L928.064 416a32 32 0 0 1 0 45.312h-.128a32 32 0 0 1-45.184 0L640 218.496V928a32 32 0 1 1-64 0V141.248z"></path>'}}n(ie,"baseName","sort-icon");class oe extends x{constructor(){super(),this.viewBox="0 0 24 24"}renderChildren(){return'<path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"></path>'}}n(oe,"baseName","mask-close-icon");class se extends x{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 0C228.693333 0 0 228.693333 0 512s228.693333 512 512 512 512-228.693333 512-512S795.306667 0 512 0z m307.2 368.64L467.626667 730.453333c0 3.413333-3.413333 3.413333-3.413334 6.826667-13.653333 13.653333-37.546667 13.653333-51.2 0l-177.493333-177.493333c-13.653333-13.653333-13.653333-37.546667 0-51.2 13.653333-13.653333 37.546667-13.653333 51.2 0l150.186667 153.6 334.506666-341.333334c13.653333-13.653333 37.546667-13.653333 51.2 0 10.24 10.24 10.24 34.133333-3.413333 47.786667z m0 0"></path>'}}n(se,"baseName","success-icon");class le extends x{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 1024C229.234 1024 0 794.766 0 512S229.234 0 512 0s512 229.234 512 512-229.234 512-512 512z m-64.853-734.52l19.484 244.906 1.309 16.156c1.251 15.93 15.018 28.644 30.72 28.644h25.571c15.56 0 29.298-12.601 30.663-28.132l1.422-16.668 21.334-244.907c3.214-36.978-24.434-66.844-61.725-66.844h-6.627c-37.462 0-65.138 29.923-62.18 66.844zM512 801.393a66.788 66.788 0 1 0 0-133.575 66.788 66.788 0 0 0 0 133.575z"></path>'}}n(le,"baseName","warn-icon");class ne extends x{connectedCallback(){super.connectedCallback()}renderChildren(){return'<path fill="currentColor" d="M512 64a448 448 0 110 896.064A448 448 0 01512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 01-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 017.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path>'}}n(ne,"baseName","info-icon");const J=[],ae=[["opacity","0","0.3s"],["transform","translate3d(-50%, -100%, 0)","0.3s"]];let ce=!0;function de(r){const o=J.findIndex(s=>s.id===r);if(o===-1)return;const t=J.splice(o,1)[0];if(t==null)return;zt(t,ae,"leave",()=>{t.remove()});const e=15+t.offsetHeight,i=J.length;if(i!==0)for(let s=o;s<i;s++){const l=J[s],a=parseInt(l.style.top,10)-e;l.style.setProperty("top",`${a}px`)}}function cr(r){const o=document.createElement("div");o.id=r.id;const t=r.type||"info";let e=`l-message l-message-${t}`;r.customClass&&(e+=" "+r.customClass),o.className=e,o.style.setProperty("top",`${r.offset}px`),o.style.setProperty("z-index",`${r.zindex||1e3}`),r.width&&o.style.setProperty("width",r.width);let i=t;return i==="error"&&(i="mask-close"),o.innerHTML=['<div class="l-message-container">',`<l-${i}-icon class="l-message-icon"></l-${i}-icon>`,`<span class="l-message-content">${r.message}</span>`,"</div>"].join(""),o}const j=r=>{ce&&(f([oe,se,le,ne]),ce=!1);const o=J.reduce((l,a)=>l+a.offsetHeight+15,15),t=Ht(),e=typeof r=="string"?{message:r}:r;e.id=t,e.offset=o;const i=cr(e);J.push(i),document.body.appendChild(i),zt(i,ae,"enter");let s=e.duration;return s==null&&(s=3e3),s!==0&&setTimeout(()=>{de(t)},s),t};function et(r,o="info"){const t=typeof r=="string"?{message:r}:r;return t.type||(t.type=o),j(t)}j.info=r=>et(r,"info"),j.success=r=>et(r,"success"),j.error=r=>et(r,"error"),j.warn=r=>et(r,"warn"),j.show=r=>et(r),j.close=de;const yt={mobile:"请输入正确的手机号",same:"两次输入不一致",required:"%s为必填字段"},xt="请输入正确的数据",D={same:/^same:(.+)$/i,mobile:/^1[345678]\d{9}$/,required:/^\S{1}.*/},kt={same(r,o){return o===r},pattern(r,o){return o==null?!1:r.test(String(o))}};class he extends Error{constructor(o,t,e){super(e),this.name="ValidateError",this.key=t,this.detail=o}}class dr{constructor(o){this.rules={},this.addSchemas(o)}addSchemas(o){for(let t of o)this.rules[t.key]=this._parseSchemaRules(t)}addSchema(o){this.rules[o.key]=this._parseSchemaRules(o)}async validate(o,t=!1){return new Promise((e,i)=>{const s={};let l,a;for(let c in this.rules){let h=this._validateRule(this.rules[c],o[c],o);if(h!==""&&(h=h.replace("%s",c),s[c]=h,l=c,a=h,t))break}l==null?e(!0):i(new he(s,l,a))})}async validateKey(o,t,e){return new Promise((i,s)=>{let l=this.rules[o];if(l==null){i({key:o,value:t});return}let a=this._validateRule(l,t,e);a!==""?(a=a.replace("%s",o),s(new he({[o]:a},o,a))):i({key:o,value:t})})}_validateRule(o,t,e){let i="";for(let s of o)if(s.rule==="required"?(t==null||!kt.pattern(D.required,t))&&(i=s.message):typeof s.rule=="function"?s.rule(t)||(i=s.message):s.sameKey!=null?e!=null&&(kt.same(t,e[s.sameKey])||(i=s.message)):kt.pattern(s.rule,t)||(i=s.message),i!=="")break;return i}_parseSchemaRules(o){let t=[],e=o.rules;if(o.required===!0&&t.push(...this._parseStringRule("required",o.message)),e!=null)if(typeof e=="string")t=t.concat(this._parseStringRule(e,o.message));else if(e instanceof Array)for(let i of e)typeof i=="string"?t.push(...this._parseStringRule(i,o.message)):i instanceof RegExp||typeof i=="function"?t.push({rule:i,message:o.message||xt}):typeof i.rule=="string"?t.push(...this._parseStringRule(i.rule,i.message)):t.push({rule:i.rule,message:i.message||xt});else t.push({rule:e,message:xt});return t}_parseStringRule(o,t){let e=[],i=o.split("|");for(let s of i){let l=t,a=null,c;if(o==="required")a="required",l=l||t||yt.required;else if(D.same.test(s)){if(s.match(D.same)!=null){a=D.same;let d=s.match(D.same);d!=null&&(c=d[1]),l=l||yt.same}}else Object.hasOwn(D,s)&&(a=D[s],l=l||yt[s]);e.push({rule:a,message:l,sameKey:c})}return e}}const hr=":host{display:block}.l-form{grid-template-columns:var(--l-form-label-width,auto)1fr;row-gap:20px;display:grid}.l-form-inline{flex-flow:wrap;gap:20px;display:flex}.l-form.l-form-inline{--l-form-item-display:flex}.l-form.l-form--left{--l-form-label-align:left}.l-form.l-form--top{--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}";class pe extends S{constructor(){super();n(this,"inline",!1);n(this,"labelPosition","right");n(this,"labelWidth");n(this,"id");n(this,"disabled",!1);n(this,"sharedAttrs",["disabled","id","innerBlock"]);n(this,"validator");n(this,"innerBlock",!1);n(this,"novalidate",!1);n(this,"_data");n(this,"emit");n(this,"ruleChange",t=>{this.validator.addSchema(t)});n(this,"_valueChange",(t,e,i=!0)=>{this._data==null&&(this._data={});const s=Object.hasOwn(this._data,t);this._data[t]=e,!this.novalidate&&s&&i&&this.validator.validateKey(t,e,this._data).then(()=>{M(this.id,"validateChange",!0,t)}).catch(l=>{M(this.id,"validateChange",l.detail,t)})});A(this),this.id==null&&(this.id=`l-f${B(3)}-${B(6)}`),this.validator=new dr([]),this.emit=new CustomEvent("submit")}static get observedAttributes(){return["disabled","label-position"]}attributeChangedCallback(t,e,i){if(t==="disabled"){const s=T(i,!1,t);s!==this.disabled&&(M(this.id,"attributeChanged",t,s,this.id),this.disabled=s)}else if(t==="label-position"){const s=p("form",this.root);s&&(s.className=F(["l-form",this.inline?"l-form-inline":void 0,`l-form--${i}`]))}}connectedCallback(){this.loadStyleText([hr]),super.connectedCallback(),q(this.id,"ruleChange",this.ruleChange),q(this.id,"valueChange",this._valueChange)}disconnectedCallback(){Pt(this.id),this.validator=void 0}render(){const t=F(["l-form",this.inline?"l-form-inline":void 0,`l-form--${this.labelPosition}`]),e=U({"--l-form-label-width":this.labelWidth?this.labelWidth:""});return`<form class="${t}" style="${e}"><slot></slot></form>`}validateField(t){const e=[];if(this._data!=null){if(Array.isArray(t))for(let i=0,s=t.length;i<s;i++){const l=t[i];e.push(this.validator.validateKey(l,this._data[l],this._data))}else e.push(this.validator.validateKey(t,this._data[t],this._data));Promise.allSettled(e).then(i=>{for(let s=0,l=i.length;s<l;s++){const a=i[s];a.status==="rejected"?M(this.id,"validateChange",a.reason.detail,a.reason.key):M(this.id,"validateChange",!0,a.value.key)}})}}clearValidate(){M(this.id,"validateChange",!0)}reset(){this.clearValidate(),M(this.id,"reset")}submit(){this.novalidate?this.dispatchEvent(this.emit):this.validate().then(t=>{t&&this.dispatchEvent(this.emit)})}async validate(){if(this._data!=null)try{return await this.validator.validate(this._data),M(this.id,"validateChange",!0),Promise.resolve(!0)}catch(t){return M(this.id,"validateChange",t.detail),Promise.resolve(!1)}return Promise.resolve(!0)}getData(){return{...this._data}}}n(pe,"baseName","form");const pr=':host{display:contents}.l-form-item{display:var(--l-form-item-display,contents);grid-template-columns:1fr;font-size:14px}.l-form-item__label{text-align:var(--l-form-label-align,right);width:var(--l-form-label-width,auto);height:var(--l-form-edit-height,32px);line-height:var(--l-form-edit-height,32px);color:#606266;padding:0 10px 0 0;display:inline-block}.l-form-item__label:empty{display:var(--l-form-label-empty-display,inline-block)}.l-form-item.is-required .l-form-item__label:before{content:"*";color:var(--l-warn-color,#f56c6c);vertical-align:middle;margin-right:4px}.l-form-item__content{flex:1;align-items:center;display:flex;position:relative}.l-form-item__error{color:var(--nt-error-color,#ed3f13);padding-top:3px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}.l-form-item.l-form-item--left{--l-form-label-align:left}.l-form-item.l-form-item--top{--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}';class ue extends S{constructor(){super();n(this,"disabled",!1);n(this,"sharedAttrs",["disabled","id","name","innerBlock"]);n(this,"required",!1);n(this,"error");n(this,"label");n(this,"id");n(this,"verify");n(this,"validity");n(this,"pattern");n(this,"name");n(this,"innerBlock",!1);n(this,"labelPosition","right");n(this,"formId");n(this,"_validateChange",(t,e)=>{const i=t===!0?void 0:t[this.name];(e==null||e===this.name&&this.error!=i)&&(this.error=i,this._updateError())});A(this),this.id==null&&(this.id=`l-fi${B(3)}-${B(6)}`)}static get observedAttributes(){return["error","label","disabled"]}attributeChangedCallback(t,e,i){if(t==="error")i!=this.error&&(this.error=i,this._updateError());else if(t==="label")this.label=i,this._updateLabel();else if(t==="disabled"){const s=T(i,!1,t);s!==this.disabled&&(M(this.id,"attributeChanged",t,s,this.id),this.disabled=s)}}connectedCallback(){var t;if(super.connectedCallback(),this.loadStyleText([pr]),this.formId=this._getFormId(),this.name&&this.formId){let e=((t=this.verify)==null?void 0:t.split("|"))||[];this.pattern&&e.push(new RegExp(this.pattern));const i={key:this.name,required:this.required,message:this.validity,rules:e};M(this.formId,"ruleChange",i),q(this.formId,"validateChange",this._validateChange)}}disconnectedCallback(){Pt(this.id),this.formId&&Q(this.formId,"validateChange",this._validateChange)}setRules(t){const e={...t,key:this.name};e.required!=null&&this.required&&(e.required=!0),this.formId&&M(this.formId,"ruleChange",e)}setError(t){this.error=t}render(){const t=["l-form-item",this.required?"is-required":void 0,this.error?"is-error":void 0,`l-form-item--${this.labelPosition}`],e=this.label!=null?`<label class="l-form-item__label">${this.label}</label>`:"",i=this.error?`<div class="l-form-item__error">${this.error}</div>`:"";return[`<div class="${F(t)}">${e}`,'<div class="l-form-item__content">',`<slot></slot>${i}</div></div>`].join("")}_updateError(){if(!this.rendered)return;let t=p(".l-form-item__error",this.root);if(t)this.error?t.textContent=this.error:t.remove();else if(this.error){t=document.createElement("div"),t.className="l-form-item__error",t.textContent=this.error;const i=p(".l-form-item__content",this.root);i&&i.appendChild(t)}const e=p(".l-form-item",this.root);e&&(this.error?L(e,"is-error"):I(e,"is-error"))}_updateLabel(){if(!this.rendered)return;let t=p(".l-form-item__label",this.root);if(t==null){if(this.label!=null){t=document.createElement("div"),t.className="l-form-item__label",t.textContent=this.label;const e=p(".l-form-item",this.root);e&&e.appendChild(t)}}else this.label!=null?t.textContent=this.label:t.remove()}_getFormId(){let t=this.parentElement,e;for(;t!=null;){const i=t.tagName;if(i==="L-FORM"){e=t.id;break}if(i==="BODY")break;t=t.parentElement}return t=null,e}}n(ue,"baseName","form-item");const ur=':host{align-items:center;display:flex}.l-radio{--l-radio-size:16px;--l-radio-label-color:#333;--l-radio-disabled-color:#e6e6e6;--l-radio-disabled-label-color:var(--l-disabled-color,#c0c4cc);--l-radio-checked-color:var(--l-primary-color,#722ed1);--l-radio-item-margin:10px;cursor:pointer;align-items:center;display:inline-flex;position:relative}.l-radio__label{margin-left:5px;transition:color .3s ease-in-out}.l-radio__input{z-index:-1;opacity:0;width:0;height:0;position:absolute}.l-radio__inner{width:var(--l-radio-size);height:var(--l-radio-size);box-sizing:border-box;border:1px solid #dcddd9;border-radius:50%;justify-content:center;align-items:center;transition:border-color .3s ease-in-out;display:flex}.l-radio__inner:before{content:"";background-color:#0000;border-radius:50%;width:60%;height:60%;transition:background-color .3s ease-in-out;display:block}.l-radio.is-checked .l-radio__inner{border-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__inner:before{background-color:var(--l-primary-color,#722ed1)}.l-radio.is-checked .l-radio__label{color:var(--l-primary-color,#722ed1)}.l-radio--disabled{cursor:not-allowed}.l-radio--disabledd .l-radio__inner{border-color:var(--l-radio-disabled-color)}.l-radio--disabled .l-radio__label{color:var(--l-radio-disabled-label-color)}.l-radio:not(:first-child){margin-left:var(--l-radio-item-margin)}.l-radio--button .l-radio__label{height:var(--l-form-edit-height,32px);border:1px solid #c0c4cc;border-left-width:0;justify-content:center;align-items:center;margin-left:0;padding:0 15px;display:inline-flex}.l-radio--button:not(:first-of-type){margin-left:0}.l-radio--button:first-of-type .l-radio__label{border-left-width:1px;border-top-left-radius:3px;border-bottom-left-radius:3px}.l-radio--button:last-of-type .l-radio__label{border-top-right-radius:3px;border-bottom-right-radius:3px}.is-checked.l-radio--button .l-radio__label{background-color:var(--l-radio-checked-color);color:#fff;border-color:var(--l-radio-checked-color)}';class fe extends tt{constructor(){super(!1);n(this,"type");n(this,"label");n(this,"checked",!1);n(this,"_ignoreInitAttrs",[]);n(this,"_radioChange",t=>{const e=t.target;let i=e.parentElement;for(;i!=null&&!Nt(i,"l-radio");)i=i.parentElement;const s=p(".is-checked",this.root);s&&I(s,"is-checked"),this.value=e.value,i&&L(i,"is-checked"),this.dispatchEvent(new CustomEvent("change"))});console.log(),A(this)}setItems(t){this._removeEvents(),this.root.innerHTML=this._renderItems(t),this._initEvents()}connectedCallback(){super.connectedCallback(),this.loadStyleText(ur),this._initEvents()}disconnectedCallback(){super.disconnectedCallback(),this._removeEvents()}attributeChange(t,e,i){if(t==="checked"){const s=T(i,!1,t);this.checked=s,this.value=s;const l=p(".l-radio",this.root);if(l&&!Nt(l,"is-checked")){L(l,"is-checked");const a=p("input",l);a&&(a.checked=!0)}}}render(){this.getName()||(this.name=`la${B(3)}_${B(6)}`);const t=[],e=p('[slot="label"]',this),i=Z("[radio-value]",this);return e!=null||this.label?(this.value=this._isChecked(),e?t.push(this._renderItem("slot",void 0,this._isChecked(),"label")):t.push(this._renderItem(this.label,void 0,this._isChecked(),"label"))):i.length>0&&(lt(i,s=>{const l=s.cloneNode(!0),a=ft(s,"radio-value");t.push(this._renderItem(l.outerHTML,a,this.value===a))}),this.pushValueChange()),t.join("")}setValue(t){super.setValue(t);let e="";typeof t!="boolean"&&(e=`[l-value="${t}"]`);const i=p(".is-checked",this.root);i&&I(i,"is-checked");const s=p(`label${e}`,this.root);if(s){const l=p("input",s);typeof t=="boolean"?(t?L(s,"is-checked"):I(s,"is-checked"),l.checked=t):(L(s,"is-checked"),l.checked=!0)}}_renderItems(t){const e=[];for(let i=0,s=t.length;i<s;i++){const l=t[i];e.push(this._renderItem(l.label,l.value,this.value===l.value,l.labelPart))}return e.join("")}_renderItem(t,e,i=!1,s=void 0){const l=F({"l-radio":!0,"l-radio--disabled":this.isDisabled(),"l-radio--button":this.type==="button","is-checked":i}),a=H("disabled",this.isDisabled()),c=H("checked",i),h=H("value",e),y=`${H("name",this.getName())}${h}${a}${c}`,R=H("part",s),pt=H("l-value",e),z=[`<label class="${l}"${pt}>`,`<input type="radio" class="l-radio__input"${y} />`];this.type!=="button"&&z.push('<span class="l-radio__inner"></span>');let ot=t==="slot"?'<slot name="label"></slot>':t;return z.push(`<div class="l-radio__label"${R}>${ot}</div>`),z.push("</label>"),z.join("")}_isChecked(){return this.checked}_initEvents(){lt(Z("input",this.root),t=>{C(t,"change",this._radioChange)})}_removeEvents(){lt(Z("input",this.root),t=>{$(t,"change",this._radioChange)})}}n(fe,"baseName","radio");const fr=":host{-webkit-overflow-scrolling:touch;height:100%;display:block;position:relative;overflow:auto}.l-list-loadmore{color:#999;justify-content:center;align-items:center;padding:10px;display:flex}.l-list-icon{margin-right:10px;font-size:24px;transform:rotate(80deg)}";class be extends S{constructor(){super();n(this,"finish",!1);n(this,"infinite",!0);n(this,"observer");n(this,"loadMoreEmit");n(this,"$more");A(this),this.loadMoreEmit=new CustomEvent("load-more")}static get observedAttributes(){return["finish"]}attributeChangedCallback(t,e,i){if(t==="finish"){const s=T(i,!1,t);this.finish!==s&&(this.finish=s,this._finishChange())}}connectedCallback(){this.loadStyleText([fr,Bt]),super.connectedCallback(),this.infinite&&(this.observer=new IntersectionObserver(t=>{t[0].isIntersecting&&!this.finish&&this.dispatchEvent(this.loadMoreEmit)}),this.$more=p(".l-list-loadmore",this.root),!this.finish&&this.$more&&this.observer.observe(this.$more))}disconnectedCallback(){super.disconnectedCallback(),this.observer&&(this.$more&&(this.observer.unobserve(this.$more),this.$more=void 0),this.observer.disconnect(),this.observer=void 0),this.loadMoreEmit=void 0}render(){const t=["<slot></slot>"];return this.infinite&&(t.push('<div class="l-list-loadmore">'),this.finish||t.push('<l-loading-icon class="l-list-icon l-rotate-anim"></l-loading-icon>'),t.push(`<span class="l-list-loadmore-text">${this._loadingText()}</span></div>`)),t.join("")}_loadingText(){return this.finish?"已经到底啦!":"加载中……"}_finishChange(){if(this.$more){this.observer&&(this.finish?this.observer.unobserve(this.$more):this.observer.observe(this.$more));const t=p(".l-list-loadmore-text",this.$more);t&&(t.textContent=this._loadingText());let e=p(".l-list-icon",this.$more);this.finish?e&&e.remove():e==null&&(e=document.createElement("l-loading-icon"),e.className="l-list-icon l-rotate-anim",this.$more.prepend(e))}}}n(be,"baseName","list");const br=".l-polygon{--l-polygen-size:10px;--l-polygen-width:var(--l-polygen-size);--l-polygen-height:var(--l-polygen-size);--l-polygen-background:#666;width:var(--l-polygen-width);height:var(--l-polygen-height);background:var(--l-polygen-background);transition:background .3s ease-in-out;display:inline-block}.l-polygon-triangle-top{clip-path:polygon(calc(var(--l-polygen-width)/2)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}.l-polygon-triangle-top-left{clip-path:polygon(0 0,var(--l-polygen-width)0,0 var(--l-polygen-height))}.l-polygon-triangle-top-right{clip-path:polygon(0 0,var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-right{clip-path:polygon(0 0,var(--l-polygen-width)calc(var(--l-polygen-height)/2),0 var(--l-polygen-height))}.l-polygon-triangle-left{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 calc(var(--l-polygen-height)/2))}.l-polygon-triangle-bottom{clip-path:polygon(0 0,var(--l-polygen-width)0,calc(var(--l-polygen-width)/2)var(--l-polygen-height))}.l-polygon-triangle-bottom-left{clip-path:polygon(0 0,0 var(--l-polygen-height),var(--l-polygen-width)var(--l-polygen-height))}.l-polygon-triangle-bottom-right{clip-path:polygon(var(--l-polygen-width)0,var(--l-polygen-width)var(--l-polygen-height),0 var(--l-polygen-height))}";class me extends S{constructor(){super();n(this,"shape","triangle-top");n(this,"background");A(this)}connectedCallback(){this.loadStyleText(br),super.connectedCallback()}render(){const t=F(["l-polygon",this.shape?`l-polygon-${this.shape}`:""]),e=U([this.background?`--l-polygen-background: ${this.background}`:""]);return`<div part="default" class="${t}" style="${e}"></div>`}}n(me,"baseName","polygon");class ge extends tt{constructor(){super();n(this,"$select");n(this,"changeEmit");n(this,"_handleChange",t=>{const e=t.target.value;super.setValue(e),this.dispatchEvent(this.changeEmit)});A(this),this.changeEmit=new CustomEvent("change")}connectedCallback(){this.loadStyleText(vt),super.connectedCallback(),this.$select=p("select",this.root),this.value&&(this.$select.value=this.value),C(this.$select,"change",this._handleChange)}disconnectedCallback(){super.disconnectedCallback(),this.$select&&$(this.$select,"change",this._handleChange),this.changeEmit=void 0,this.$select=void 0}render(){let t=this.innerHTML.trim();return`<select class="l-input"${De([["name",this.getName()],["disabled",this.isDisabled()]])}>${t}</select>`}_changeDisabled(){this.$select&&(this.$select.disabled=this.isDisabled())}setOptions(t){if(!this.$select)return;const e=t.map(i=>`<option value="${i.value}">${i.label}</option>`);this.$select.innerHTML=e.join("")}appendOptions(t){if(!this.$select)return;const e=document.createDocumentFragment();for(let i=0,s=t.length;i<s;i++){const l=t[i],a=document.createElement("option");a.value=l.value,a.innerHTML=l.label,e.appendChild(a)}this.$select.appendChild(e)}reset(){super.reset(),this.$select&&(this.$select.value=this.value)}setValue(t){super.setValue(t),this.$select&&(this.$select.value=this.value)}}n(ge,"baseName","select-ori");const mr=":host{--l-switch-height:22px;--l-switch-width:40px;box-sizing:border-box;width:var(--l-switch-width);height:var(--l-switch-height);border-radius:calc(var(--l-switch-height)/2);cursor:pointer;vertical-align:middle;background-color:#dcdfe6;border:1px solid #c2c2c2;justify-content:flex-start;align-items:center;padding:2px;transition:all .3s ease-in-out;display:inline-flex;position:relative}:host(:hover),:host(.l-switch--checked):hover{border-color:var(--l-primary-color,#722ed1)}:host(.l-switch--checked){background-color:var(--l-primary-color,#722ed1);border-color:var(--l-primary-color,#722ed1)}.l-switch-action{width:calc(var(--l-switch-height) - 6px);box-sizing:border-box;background-color:#fff;border-radius:50%;justify-content:center;align-items:center;padding:2px;font-size:12px;transition:all .3s ease-in-out;display:flex;position:absolute;top:2px;bottom:2px;left:2px}.l-switch-text{color:#fff;padding-left:calc(var(--l-switch-width) - 20px);transition:padding-left .3s ease-in-out}:host(.l-switch--checked) .l-switch-action{left:calc(var(--l-switch-width) - var(--l-switch-height) + 3px)}:host(.l-switch--checked) .l-switch-text{padding-left:5px}";class ve extends tt{constructor(){super(!1);_(this,X);n(this,"actionRender");n(this,"checkedText");n(this,"uncheckedText");_(this,rt,t=>{this.isDisabled()||(this.setValue(!this.value),this.dispatchEvent(new CustomEvent("change")))});A(this);const t=this.value?T(this.value,!1,"value"):!1;this._resetValue=t,this.value=t}connectedCallback(){this.loadStyleText(mr),super.connectedCallback(),this.pushValueChange(),k(this,X,ut).call(this),C(this,"click",m(this,rt))}disconnectedCallback(){super.disconnectedCallback(),$(this,"click",m(this,rt)),this.actionRender=void 0}render(){this.isDisabled()&&this.classList.add("l-switch--disabled"),this.value&&this.classList.add("l-switch--checked");const t=['<div class="l-switch-action" part="action"></div>'];if(this.checkedText||this.uncheckedText){const e=this.value?this.checkedText||"":this.uncheckedText||"";t.push(`<span class="l-switch-text">${e}</span>`)}return t.join("")}setValue(t){super.setValue(t),t?L(this,"l-switch--checked"):I(this,"l-switch--checked");const e=p(".l-switch-text",this.root);e&&(e.textContent=this.value?this.checkedText||"":this.uncheckedText||""),k(this,X,ut).call(this)}setActionRender(t){this.actionRender=t,k(this,X,ut).call(this)}}rt=new WeakMap,X=new WeakSet,ut=function(){const t=p(".l-switch-action",this.root);if(t)if(this.actionRender){const e=this.actionRender({checked:this.value});typeof e=="string"?t.innerHTML=e:t.innerHTML=e.outerHTML}else{const e=p('[slot="checked-action"]',this),i=p('[slot="unchecked-action"]',this);this.value&&e?t.innerHTML='<slot name="checked-action"></slot>':!this.value&&i&&(t.innerHTML='<slot name="unchecked-action"></slot>')}},n(ve,"baseName","switch");const gr=":host{--l-input-width:60px}";class ye extends tt{constructor(){super();n(this,"$picker");n(this,"_value","#000000");n(this,"_handleChange",t=>{const e=t.target.value;super.setValue(e),this.dispatchEvent(new CustomEvent("change",{detail:e}))});A(this)}setValue(t){super.setValue(t),this.$picker&&(this.$picker.value=t)}connectedCallback(){this.loadStyleText([vt,gr]),super.connectedCallback(),this.$picker=p("input",this.root),C(this.$picker,"change",this._handleChange)}disconnectedCallback(){super.disconnectedCallback(),this.$picker&&($(this.$picker,"change",this._handleChange),this.$picker=void 0)}render(){const t=document.createElement("input");return Oe(t,[["value",this.value],["disabled",this.isDisabled()],["name",this.getName()],["type","color"],["class","l-input l-color-picker"]]),t}_changeDisabled(){this.$picker&&(this.$picker.disabled=this.isDisabled())}}n(ye,"baseName","color-picker");const vr=":host{--l-tabbar-hover-color:var(--l-primary-color-light1,#9254de);--l-tabbar-active-color:var(--l-primary-color,#722ed1);--l-tabbar-item-gap:0;--l-tabbar-height:38px;height:var(--l-tabbar-height);background-color:#fff;display:block;position:relative;overflow:hidden}.l-tabbar-wrapper{align-items:stretch;gap:var(--l-tabbar-item-gap);flex-wrap:nowrap;height:100%;display:flex}.l-tabbar-item{color:#666;cursor:pointer;justify-content:center;align-items:center;transition:all .3s ease-in-out;display:inline-flex}.l-tabbar-item:hover{color:var(--l-tabbar-hover-color)}.l-tabbar-item.active{color:var(--l-tabbar-active-color)}.l-tabbar-item-icon{justify-content:center;align-items:center;margin-bottom:5px;font-size:18px;display:flex}.l-tabbar-item-icon.only{margin-bottom:0;font-size:24px}:host(.l-tabbar--nav){--l-tabbar-height:50px;width:100%}:host(.l-tabbar--nav) .l-tabbar-item{flex-direction:column;flex-grow:1;justify-content:center;align-items:center;font-size:12px;line-height:1;display:inline-flex}:host(.l-tabbar--bar){--l-tabbar-bar-vertical-padding:10px;--l-tabbar-item-gap:30px;--l-tabbar-line-color:var(--l-primary-color,#722ed1);white-space:nowrap;overflow:auto}.l-tabbar--bar-line{background-color:var(--l-tabbar-line-color);border-radius:1px;width:32px;height:2px;transition:all .3s ease-in-out;position:absolute;bottom:0;left:0}:host(.l-tabbar--card){--l-tabbar-card-border-color:#f5f7fa;--l-tabbar-line-color:#fff;--l-tabbar-item-gap:0;--l-tabbar-card-border-radius:5px}.l-tabbar-card-border{background-color:var(--l-tabbar-card-border-color);height:1px;position:absolute;bottom:0;left:0;right:0}:host(.l-tabbar--card) .l-tabbar-item{background:#f5f7fa;border:1px solid #f0f0f0;padding:0 15px}:host(.l-tabbar--card) .l-tabbar-item:first-child{border-top-left-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item:last-child{border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar-gap) .l-tabbar-item{border-top-left-radius:var(--l-tabbar-card-border-radius);border-top-right-radius:var(--l-tabbar-card-border-radius)}:host(.l-tabbar--card) .l-tabbar-item.active{background:#fff}";function yr(r,o,t){let e=r.target,i="";do if(t&&t.isSameNode(e)||e.tagName==="BODY"||(e.getAttribute&&(i=e.getAttribute(o)||""),i===""&&(e=e.parentNode),!e))break;while(i==="");return[i!=="__stop__"&&i!=="",i,e]}class xe extends S{constructor(){super();_(this,P);n(this,"type","nav");n(this,"name");n(this,"gap");n(this,"$line");n(this,"_handleClick",t=>{const[e,i]=yr(t,"l-name",this.root);e&&i!==this.name&&(this.name=i,this.dispatchEvent(new CustomEvent("change",{detail:{name:i}})),this._updateActive(),this._updateLine())});A(this)}connectedCallback(){this.loadStyleText(vr),L(this,`l-tabbar--${this.type}`),!v(this.gap)&&!this.gap.startsWith("0")&&L(this,"l-tabbar-gap"),super.connectedCallback(),this._init()}static get observedAttributes(){return["name","type","justify-content","gap"]}attributeChangedCallback(t,e,i){if(t==="name"){const s=T(i,void 0);this.name=s,this._updateActive(),this._updateLine()}else if(t==="type"){const s=T(i,"nav");if(s!==this.type&&(I(this,`l-tabbar--${this.type}`),this.type=s,I(this,`l-tabbar--${s}`),s==="card")){let l=p(".l-tabbar-card-border",this.root);l||(l=E("div",{class:"l-tabbar-card-border"}),this.root.appendChild(l))}}else{const s=T(i,void 0);this[t]=s;const l=p(".l-tabbar-wrapper",this.root);l&&(l.style.cssText=k(this,P,Mt).call(this)),t==="gap"&&(!v(this.gap)&&!this.gap.startsWith("0")?L(this,"l-tabbar-gap"):I(this,"l-tabbar-gap"))}}disconnectedCallback(){super.disconnectedCallback(),this._destroy()}render(){const t=document.createDocumentFragment(),e=document.createElement("div");if(e.className="l-tabbar-wrapper",e.style.cssText=k(this,P,Mt).call(this),e.setAttribute("part","default"),this.getAttr("custom-content",!1)){const s=document.createElement("slot");e.appendChild(s)}else{const s=Z("[l-name]",this);s.length>0&<(s,l=>{const a=l.getAttribute("l-name");if(a){const c=l.cloneNode(!0);c.classList.add("l-tabbar-item"),c.setAttribute("part","item"),a===this.name&&c.classList.add("active");const h=p("[l-icon]",c),d=Z(":not([l-icon])",c);if(h){const y=E("div",{class:["l-tabbar-item-icon",d.length===0?"only":void 0]});y.appendChild(h.cloneNode(!0)),h.replaceWith(y)}e.appendChild(c)}})}if(t.appendChild(e),this.type==="card"){const s=E("div",{class:"l-tabbar-card-border"});t.appendChild(s)}return t}setItems(t){const e=p(".l-tabbar-wrapper",this.root);e&&(e.innerHTML="",e.appendChild(k(this,P,Et).call(this,t)))}addItems(t){const e=p(".l-tabbar-wrapper",this.root);e&&e.appendChild(k(this,P,Et).call(this,t))}_init(){C(this.root,"click",this._handleClick),setTimeout(()=>{this._updateLine()},300)}_destroy(){$(this.root,"click",this._handleClick),this.$line=void 0}_updateActive(){const e=this.getAttr("custom-content",!1)?this:this.root,i=p(".active",e);i&&I(i,"active");const s=p(`[l-name="${this.name}"]`,e);s&&L(s,"active")}_updateLine(){queueMicrotask(()=>{if(!this.name||this.type==="nav"||!this.rendered)return;const t=this.getAttr("custom-content",!1),e=p(".active",t?this:this.root);if(!e)return;const i=e.offsetLeft;if(!this.$line){const s=E("div",{class:"l-tabbar--bar-line"});s.part="line",this.root.appendChild(s),this.$line=p(".l-tabbar--bar-line",this.root)}this.$line.style.cssText=`width:${e.offsetWidth}px;left:${i}px`,Pe(e,this)||this.scrollTo({left:i,behavior:"smooth"})})}}P=new WeakSet,Mt=function(){const t={},e=this.getAttr("justify-content");if(v(e)||(t["justify-content"]=e),!v(this.gap)){let i=this.gap;st(i,{isPositive:!0})&&(i=`${i}px`),t["--l-tabbar-item-gap"]=i}return U(t)},Et=function(t){const e=document.createDocumentFragment();for(let i=0,s=t.length;i<s;i++){const l=t[i],a=E("div",{class:F(["l-tabbar-item",this.name===l.name?"active":void 0]),"l-name":l.name,part:"item"}),c=l.icon;if(c){const d=E("div",{class:"l-tabbar-item-icon"});let y=typeof c=="string"?c:c();typeof y=="string"?d.innerHTML=y:d.appendChild(y),a.appendChild(d)}const h=l.text;if(h){let d=typeof h=="string"?h:h();typeof d=="string"?a.appendChild(E(d)):a.appendChild(d)}e.appendChild(a)}return e},n(xe,"baseName","tabbar");function ke(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":window.matchMedia("(prefers-color-scheme: light)").matches?"light":"auto"}async function xr(r,o=!0){return new Promise(t=>{const e=document.documentElement.classList;r==null&&(r=ke());function i(){r==="light"?(e.add("light"),e.remove("dark")):r==="dark"?(e.add("dark"),e.remove("light")):e.remove("light","dark")}o&&document.startViewTransition?document.startViewTransition(()=>{i(),t(r)}):(i(),t(r))})}function kr(){let r=document.documentElement.className.match(/light|dark/);return r!=null&&(r=r[0]),r==null&&(r=localStorage.getItem("web-theme-appearance")),r==null&&(r=ke()),r}async function wr(r,o=!0,t=!0){return o===!0&&localStorage.setItem("web-theme-appearance",r??"auto"),xr(r,t)}function Cr(r){const o=document.documentElement,t=o.className.match(/color-([0-9a-fA-F]{6})/);if(t==null){let e=getComputedStyle(o).getPropertyValue("--nt-primary-color");return e===""&&(e=localStorage.getItem("web-theme-color")),e||r}return`#${t[1]}`}async function $r(r){const o=[`--nt-primary-color: ${r};`,`--l-primary-color: ${r};`,`--nt-primary-color-dark1: ${G(r,1,!1)};`,`--l-primary-color-dark1: ${G(r,1,!1)};`];for(let e=1;e<=5;e++)o.push(`--nt-primary-color-light${e}: ${G(r,e)};`),o.push(`--l-primary-color-light${e}: ${G(r,e)};`);let t=document.getElementById("color-theme-style");return t==null&&(t=document.createElement("style"),t.id="color-theme-style",document.head.appendChild(t)),t.innerHTML=`:root{${o.join("")}}`,r}function _r(r,o=!0){return o===!0&&localStorage.setItem("web-theme-color",r),$r(r)}const Ar=":host{display:inline-flex}.l-theme-btn::part(default){--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-text-color:#9ca3af;--l-btn-hover-text-color:#666;width:var(--l-form-edit-height,32px);padding:0;font-size:18px}.l-theme-switch.l-switch--checked{background-color:#65757129;border-color:#3c3f44}.l-theme-switch.l-switch--checked::part(action){color:#fff;background-color:#000}html.dark .l-theme-btn{--l-btn-hover-text-color:#fff}",Mr=[{value:"auto",text:"跟随系统",icon:"l-theme-default-icon"},{value:"light",text:"浅色模式",icon:"l-sun-icon"},{value:"dark",text:"深色模式",icon:"l-moon-icon"}];class we extends S{constructor(){super();_(this,w);n(this,"type","button");n(this,"label","text");n(this,"theme");_(this,V);_(this,W,async t=>{let e;if(this.type==="button")e=this.theme==="dark"?"auto":"dark";else{const i=t.target.value;this.type!=="switch"?e=i:e=i?"dark":"light"}await wr(e),this.theme=e,this.type==="button"&&k(this,w,Lt).call(this,m(this,V)),this.dispatchEvent(new CustomEvent("change",{detail:e}))});A(this),this.theme=kr()}connectedCallback(){this.loadStyleText(Ar),super.connectedCallback(),k(this,w,Ne).call(this)}disconnectedCallback(){super.disconnectedCallback(),k(this,w,ze).call(this)}render(){switch(this.type){case"select":return k(this,w,Le).call(this);case"radio":return k(this,w,Se).call(this);case"switch":return k(this,w,Te).call(this);default:return k(this,w,Ee).call(this)}}}V=new WeakMap,w=new WeakSet,Ee=function(){const t=E("l-button",{class:"l-theme-btn l-theme-inner"});return k(this,w,Lt).call(this,t),t},Lt=function(t){const e=this.theme==="auto"?"sun":"moon";t.innerHTML=`<l-${e}-icon></l-${e}-icon>`},Le=function(){const t=E("l-select-ori",{class:"l-theme-inner"});t.value=this.theme;const e=['<option value="auto">跟随系统</option>','<option value="light">浅色模式</option>','<option value="dark">深色模式</option>'];return t.innerHTML=e.join(""),t},Te=function(){const t=E("l-switch",{class:"l-theme-switch l-theme-inner"});return t.value=this.theme==="dark",t.innerHTML='<l-sun-icon slot="unchecked-action"></l-sun-icon><l-moon-icon slot="checked-action"></l-moon-icon>',t},Se=function(){const t=E("l-radio",{class:"l-theme-inner"});t.value=this.theme,t.type="button";const e=Mr.map(i=>this.label==="icon"?`<${i.icon} radio-value="${i.value}"></${i.icon}>`:`<span radio-value="${i.value}">${i.text}</span>`);return t.innerHTML=e.join(""),t},W=new WeakMap,Ne=function(){At(this,V,p(".l-theme-inner",this.root)),this.type==="button"?C(m(this,V),"click",m(this,W)):C(m(this,V),"change",m(this,W))},ze=function(){m(this,V)&&(this.type==="button"?$(m(this,V),"click",m(this,W)):$(m(this,V),"change",m(this,W)),At(this,V,void 0))},n(we,"baseName","theme");class Ce extends S{constructor(){super();_(this,ct);n(this,"color");_(this,dt,async t=>{const e=t.detail;this.color=e,await _r(e),this.dispatchEvent(new CustomEvent("change",{detail:e}))});this.color=Cr()||"#722ed1"}connectedCallback(){super.connectedCallback(),k(this,ct,Ie).call(this)}render(){const t=document.createElement("l-color-picker");return t.value=this.color,t}}ct=new WeakSet,Ie=function(){const t=p("l-color-picker",this.root);t&&C(t,"change",m(this,dt))},dt=new WeakMap,n(Ce,"baseName","theme-color");const O=new Map;function $e(r){for(const o of O.values())for(const t of o)Er(r,t)}function Er(r,o){const t=r.target,e=!t,i=o.el.contains(t),s=o.el===t;e||i||s||o.handler(r)}function Lr(r,o){O.has(r)||O.set(r,[]);const t=O.get(r);t&&t.push({el:r,handler:o}),O.size===1&&document.addEventListener("click",$e,!0)}function Tr(r){O.delete(r),O.size===0&&document.removeEventListener("click",$e,!0)}const Sr=':host{width:max-content;position:relative}.l-popover--content{--l-popover-border-color:#e4e4e4;--l-popover-color:#666;--l-popover-box-shadow:0 4px 8px #0000001f;--l-popover-background:#fff;--l-popover-arrow-size:8px;--l-popover-offset:10px;width:max-content;box-shadow:var(--l-popover-box-shadow);background:var(--l-popover-background);border:1px solid var(--l-popover-border-color);z-index:30;color:var(--l-popover-color);box-sizing:border-box;border-radius:4px;padding:10px;position:absolute}.l-popover-tooltip{--l-popover-color:#fff;--l-popover-box-shadow:4px 4px 8px #0000004d;--l-popover-background:#383838;--l-popover-arrow-size:6px;border-radius:5px;padding:8px;font-size:12px;line-height:1}.l-popover--arrow{width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);z-index:-1;position:absolute}.l-popover--arrow:before{content:"";width:var(--l-popover-arrow-size,8px);height:var(--l-popover-arrow-size,8px);background-color:var(--l-popover-background);border-style:solid;border-width:1px;position:absolute;transform:rotate(45deg)}.l-popover-top,.l-popover-top-start,.l-popover-top-end{bottom:calc(100% + var(--l-popover-offset,10px))}.l-popover-bottom,.l-popover-bottom-start,.l-popover-bottom-end{top:calc(100% + var(--l-popover-offset,10px))}.l-popover-top-start,.l-popover-bottom-start{left:0}.l-popover-top-end,.l-popover-bottom-end{right:0}.l-popover-bottom,.l-popover-top{left:50%;transform:translate(-50%)}.l-popover-left-start,.l-popover-left,.l-popover-left-end{right:calc(100% + var(--l-popover-offset,10px))}.l-popover-left-start,.l-popover-right-start{top:0}.l-popover-left-end,.l-popover-right-end{bottom:0}.l-popover-left,.l-popover-right{top:50%;transform:translateY(-50%)}.l-popover-right-start,.l-popover-right,.l-popover-right-end{left:calc(100% + var(--l-popover-offset,10px))}.l-popover-top .l-popover--arrow,.l-popover-bottom .l-popover--arrow{margin-left:-4px;left:50%}.l-popover-top .l-popover--arrow:before,.l-popover-top-start .l-popover--arrow:before,.l-popover-top-end .l-popover--arrow:before{border-color:transparent var(--l-popover-border-color)var(--l-popover-border-color)transparent}.l-popover-bottom .l-popover--arrow:before,.l-popover-bottom-start .l-popover--arrow:before,.l-popover-bottom-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)transparent transparent var(--l-popover-border-color)}.l-popover-top .l-popover--arrow,.l-popover-top-start .l-popover--arrow,.l-popover-top-end .l-popover--arrow{bottom:calc((var(--l-popover-arrow-size,8px)/-2) + 1px)}.l-popover-top-start .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow{left:10px}.l-popover-top-end .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{right:10px}.l-popover-bottom .l-popover--arrow,.l-popover-bottom-start .l-popover--arrow,.l-popover-bottom-end .l-popover--arrow{top:calc((var(--l-popover-arrow-size,8px)/-2) - 1px)}.l-popover-left .l-popover--arrow,.l-popover-left-start .l-popover--arrow,.l-popover-left-end .l-popover--arrow{margin-top:-4px;right:-4px}.l-popover-left-start .l-popover--arrow:before,.l-popover-left .l-popover--arrow:before,.l-popover-left-end .l-popover--arrow:before{border-color:var(--l-popover-border-color)var(--l-popover-border-color)transparent transparent}.l-popover-right .l-popover--arrow,.l-popover-right-start .l-popover--arrow,.l-popover-right-end .l-popover--arrow{margin-top:-4px;left:-4px}.l-popover-right-start .l-popover--arrow:before,.l-popover-right .l-popover--arrow:before,.l-popover-right-end .l-popover--arrow:before{border-color:transparent transparent var(--l-popover-border-color)var(--l-popover-border-color)}.l-popover-left .l-popover--arrow,.l-popover-right .l-popover--arrow{top:50%}.l-popover-left-start .l-popover--arrow,.l-popover-right-start .l-popover--arrow{top:10px}.l-popover-left-end .l-popover--arrow,.l-popover-right-end .l-popover--arrow{bottom:10px}';class wt extends S{constructor(){super();_(this,N);n(this,"placement","top");n(this,"content");n(this,"showArrow",!0);n(this,"trigger","hover");n(this,"disabled",!1);n(this,"isShow",!1);n(this,"width");n(this,"destroyOnHide",!1);n(this,"offset");n(this,"position","absolute");n(this,"theme","default");n(this,"_t");_(this,ht,t=>{t.target.id!==this.id&&this.hide()});_(this,K,t=>{this.show(t.target)});_(this,Y,()=>{this.hide()});_(this,it,t=>{this.trigger==="click"?this.toggle(t.target):this.trigger==="focus"&&this.show(t.target)});A(this)}connectedCallback(){this.loadStyleText(Sr),k(this,N,He).call(this),super.connectedCallback(),this.renderContent(),k(this,N,Ve).call(this)}disconnectedCallback(){super.disconnectedCallback(),k(this,N,Fe).call(this)}render(){const t=document.createElement("slot");return t.setAttribute("name","trigger"),t}renderContent(){if(!this.isShow)return;let t=p(".l-popover--content",this.root);if(t){t.style.removeProperty("display");return}if(t=St("div",{class:["l-popover--content",`l-popover-${this.placement}`,this.theme==="default"?void 0:`l-popover-${this.theme}`]}),this.offset&&(t.style.cssText="--l-popover-offset: ${this.offset}px;"),t.part="content",t.innerHTML=this.contentHTML(),this.showArrow){const e=St("div",{class:"l-popover--arrow"});t.appendChild(e)}this.trigger==="hover"&&(C(t,"mouseenter",m(this,K)),C(t,"mouseleave",m(this,Y))),this.root.appendChild(t)}contentHTML(){return this.content?`<span>${this.content}</span>`:"<slot></slot>"}hideContent(){const t=p(".l-popover--content",this.root);t&&(this.destroyOnHide?(this.trigger==="hover"&&($(t,"mouseenter",m(this,K)),$(t,"mouseleave",m(this,Y))),this.root.removeChild(t)):t.style.display="none")}show(t){if(!this.disabled){if(this.isShow){k(this,N,Re).call(this);return}this.isShow=!0,this.renderContent(),k(this,N,Be).call(this,t)}}hide(){this._t=setTimeout(()=>{this.isShow=!1,this.hideContent()},50)}toggle(t){this.isShow?this.hide():this.show(t)}}N=new WeakSet,He=function(){const t=this.getAttr("inline",!1);this.style.display=t?"inline-block":"block",this.id||(this.id=`${Ht()}-popover`)},Ve=function(){const t=p('[slot="trigger"]',this);t&&(this.trigger==="hover"?(C(t,"mouseenter",m(this,K)),C(t,"mouseleave",m(this,Y))):(this.trigger==="click"||this.trigger==="focus")&&(C(t,"click",m(this,it)),Lr(t,m(this,ht))))},Fe=function(){const t=p('[slot="trigger"]',this);t&&(this.trigger==="hover"?($(t,"mouseenter",m(this,K)),$(t,"mouseleave",m(this,Y))):(this.trigger==="click"||this.trigger==="focus")&&($(t,"click",m(this,it)),Tr(t)))},ht=new WeakMap,K=new WeakMap,Y=new WeakMap,it=new WeakMap,Re=function(){this._t&&(clearTimeout(this._t),this._t=void 0)},Be=function(t){let e="bottom",i="";const s=this.placement.split("-");s!=null&&(e=s[0],i=s[1]||"");let l;t==null&&(t=p('[slot="trigger"]',this));const a=p(".l-popover--content",this.root);if(a){let c=a.getBoundingClientRect();const h=t.getBoundingClientRect();let d=document.documentElement;const y=d.scrollLeft,R=d.scrollTop;this.width!=null&&(this.width==="trigger"?l=h.width:l=this.width),l!=null&&(c.width=l);const pt=bt(h,c,e,i,this.offset),z=mt(h,c,e,i,this.offset),ot=We(h,c,e,i,y,R,z,pt,this.offset);e=ot.mainAlign,i=ot.crossAlign,l!=null&&a.style.setProperty("width",`${l}px`);const Ae=`l-popover-${e}${i===""?"":"-"+i}`,$t=a.className.split(" ");$t[1]!==Ae&&($t[1]=`${Ae}`,a.className=$t.join(" "))}},n(wt,"baseName","popover");const Nr=".l-popover-popconfirm{min-width:200px}.l-popconfirm-container{align-items:center;display:flex}.l-popconfirm-icon-wrapper{color:var(--nt-warn-color,#f90);margin-right:10px;display:inline-flex}.l-popconfirm-footer{justify-content:flex-end;align-items:center;gap:5px;margin-top:7px;display:flex}.l-popconfirm-footer l-button::part(default){height:24px;padding:0 6px;font-size:13px}";class _e extends wt{constructor(){super()}connectedCallback(){this.loadStyleText(Nr),this.trigger="click",this.theme="popconfirm",super.connectedCallback(),C(this.root,"click",o=>{const[t,e]=je(o,"l-action",this);t&&(this.dispatchEvent(new CustomEvent(e,{detail:{action:e}})),this.hide())})}contentHTML(){const o=p('[slot="icon"]',this),t=[];return t.push('<div class="l-popconfirm-container">'),t.push('<div class="l-popconfirm-icon-wrapper">'),t.push(o?'<slot name="icon"></slot>':"<l-warn-icon></l-warn-icon>"),t.push(`</div>${super.contentHTML()}</div>`),t.push('<div class="l-popconfirm-footer">'),t.push('<l-button l-action="cancel">取消</l-button>'),t.push('<l-button type="primary" l-action="ok">确定</l-button>'),t.push("</div>"),t.join("")}}n(_e,"baseName","popconfirm"),f(_e),f(wt),f(re),f(Ce),f(we),f(xe),f(ye),f(ve),f(ge),f(me),f(be),f(fe),f(pe),f(ue),f(jt),f(qt),f(x),f(Dt),f(Yt),f(Ut),f(Gt),f(ar),f(Jt),f(Xt),f(Zt),f(Qt),f(te),f(ee),f(ie),f([Ot,Wt,Kt]),globalThis.LMessage=j;function zr(){const r=document.currentScript.src,o=r.lastIndexOf("/"),e=`${r.slice(0,o+1)}litos-ui.css`,i=document.createElement("link");i.rel="stylesheet",i.href=e,i.id="litos-ui-style",document.head.appendChild(i)}zr()})();
|