@gkd-kit/inspect 0.0.1708874237544 → 0.0.1708919550570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +4 -4
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-sTa2f3Sm.js → ActionCard.vue_vue_type_script_setup_true_lang-RSsRStYS.js} +2 -2
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-sTa2f3Sm.js.map → ActionCard.vue_vue_type_script_setup_true_lang-RSsRStYS.js.map} +1 -1
- package/dist/assets/DevicePage-IY_yZmOB.js +49 -0
- package/dist/assets/{DevicePage-BXKzGO2A.js.map → DevicePage-IY_yZmOB.js.map} +1 -1
- package/dist/assets/HomePage-M2HOTAEU.js +17 -0
- package/dist/assets/{HomePage-425GxBPa.js.map → HomePage-M2HOTAEU.js.map} +1 -1
- package/dist/assets/ImportPage-wkYT-97S.js +2 -0
- package/dist/assets/{ImportPage-jZhRLXDz.js.map → ImportPage-wkYT-97S.js.map} +1 -1
- package/dist/assets/{PreviewSharePage-fIYLI2Uf.js → PreviewSharePage-2JQrfTI7.js} +2 -2
- package/dist/assets/{PreviewSharePage-fIYLI2Uf.js.map → PreviewSharePage-2JQrfTI7.js.map} +1 -1
- package/dist/assets/{SnapshotPage-uyWm1JgS.js → SnapshotPage-Dq1xNb_M.js} +3 -3
- package/dist/assets/SnapshotPage-Dq1xNb_M.js.map +1 -0
- package/dist/assets/{_404Page-ta0q-RMO.js → _404Page-SB0ya6gK.js} +2 -2
- package/dist/assets/{_404Page-ta0q-RMO.js.map → _404Page-SB0ya6gK.js.map} +1 -1
- package/dist/assets/{fetch-ToIAzror.js → fetch-MBm2U2F_.js} +6 -6
- package/dist/assets/{fetch-ToIAzror.js.map → fetch-MBm2U2F_.js.map} +1 -1
- package/dist/assets/{import-_Lzrqu8r.js → import-UQLsOcAp.js} +2 -2
- package/dist/assets/{import-_Lzrqu8r.js.map → import-UQLsOcAp.js.map} +1 -1
- package/dist/assets/{index-gwQ3kzQ4.js → index-3DTTI4XP.js} +5 -5
- package/dist/assets/{index-gwQ3kzQ4.js.map → index-3DTTI4XP.js.map} +1 -1
- package/dist/assets/index-PfbVDA8u.js +2 -0
- package/dist/assets/{index-BgRTCKl1.js.map → index-PfbVDA8u.js.map} +1 -1
- package/dist/assets/{index-tnfuRnUU.js → index-l288urgW.js} +31 -31
- package/dist/assets/{index-tnfuRnUU.js.map → index-l288urgW.js.map} +1 -1
- package/dist/assets/{jszip.min-bypfk5bm.js → jszip.min-gVLalmbv.js} +2 -2
- package/dist/assets/{jszip.min-bypfk5bm.js.map → jszip.min-gVLalmbv.js.map} +1 -1
- package/dist/assets/{node--_6qQQXe.js → node-bYxGiaSg.js} +8 -8
- package/dist/assets/{node--_6qQQXe.js.map → node-bYxGiaSg.js.map} +1 -1
- package/dist/assets/{selector-f0gaPt4f.js → selector-Gg-sdF-c.js} +2 -2
- package/dist/assets/{selector-f0gaPt4f.js.map → selector-Gg-sdF-c.js.map} +1 -1
- package/dist/assets/{storage-tyX5Eyiv.js → storage-WTLW1scY.js} +2 -2
- package/dist/assets/{storage-tyX5Eyiv.js.map → storage-WTLW1scY.js.map} +1 -1
- package/dist/assets/{table-9CTG7696.js → table-nLKMtWVG.js} +2 -2
- package/dist/assets/{table-9CTG7696.js.map → table-nLKMtWVG.js.map} +1 -1
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/DevicePage-BXKzGO2A.js +0 -49
- package/dist/assets/HomePage-425GxBPa.js +0 -17
- package/dist/assets/ImportPage-jZhRLXDz.js +0 -2
- package/dist/assets/SnapshotPage-uyWm1JgS.js.map +0 -1
- package/dist/assets/index-BgRTCKl1.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as c,c as e,e as a,t as p,g as d,ar as l,as as _,o as t}from"./index-
|
|
2
|
-
//# sourceMappingURL=_404Page-
|
|
1
|
+
import{d as c,c as e,e as a,t as p,g as d,ar as l,as as _,o as t}from"./index-3DTTI4XP.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},u={key:0},m={key:1},k=c({__name:"_404Page",setup(h){var s;const n=_(),{fullPath:o}=(s=n.redirectedFrom)!=null?s:{};return(i,r)=>(t(),e("div",f,[a(o)?(t(),e("div",u,p("访问的地址 "+a(o)+" 不存在"),1)):(t(),e("div",m,"欢迎来到404页面")),d("a",{href:"/",onClick:r[0]||(r[0]=l(v=>i.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{k as default};
|
|
2
|
+
//# sourceMappingURL=_404Page-SB0ya6gK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_404Page-
|
|
1
|
+
{"version":3,"file":"_404Page-SB0ya6gK.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\n\nconst route = useRoute();\n\nconst { fullPath } = route.redirectedFrom ?? {};\n</script>\n<template>\n <div flex flex-col flex-items-center w-100vw pt-50px gap-20px>\n <div v-if=\"fullPath\">{{ `访问的地址 ` + fullPath + ` 不存在` }}</div>\n <div v-else>欢迎来到404页面</div>\n <a href=\"/\" @click.prevent=\"$router.replace({ path: `/` })\"> 回到首页 </a>\n </div>\n</template>\n"],"names":["route","useRoute","fullPath","_a"],"mappings":"oPAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,GAAAC,EAAAH,EAAM,iBAAN,KAAAG,EAAwB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{y,bT as Ne,bU as Fe,d as z,
|
|
1
|
+
import{z as y,bT as Ne,bU as Fe,d as z,J as S,v as u,bV as Te,aM as me,bW as We,N as Ke,E as P,bX as be,bY as qe,bZ as De,b_ as Ve,b$ as Ue,F as V,V as se,r as ae,X as E,Y as U,a2 as Xe,I as le,a3 as Ge,M as N,x as m,c0 as Ye,A as b,C as F,m as B,K as T,L as ce,S as Ze,T as Je,aE as xe,aj as _,aO as Qe,ap as de,B as L,ae as eo,H as ye,a8 as oo,aa as M,aI as Ce,a7 as A,a9 as no,$ as we,c1 as Se,c2 as ke,c3 as $e,c4 as Oe,k as fe,U as to,w as io,aH as ro,aL as so,af as ao,c5 as lo,ab as co,e as ge,c6 as fo,aW as uo,c7 as ve,ak as ho,at as go}from"./index-3DTTI4XP.js";function ue(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(s=>{e.includes(s)||(n[s]=o[s])}),Object.assign(n,t)}const{cubicBezierEaseInOut:j,cubicBezierEaseOut:vo,cubicBezierEaseIn:po}=Ne;function mo({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:s=void 0,leaveToProps:a=void 0,reverse:f=!1}={}){const r=f?"leave":"enter",l=f?"enter":"leave";return[y(`&.fade-in-height-expand-transition-${l}-from,
|
|
2
2
|
&.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},s),{opacity:1})),y(`&.fade-in-height-expand-transition-${l}-to,
|
|
3
3
|
&.fade-in-height-expand-transition-${r}-from`,Object.assign(Object.assign({},a),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:i?"0 !important":void 0,paddingBottom:i?"0 !important":void 0})),y(`&.fade-in-height-expand-transition-${l}-active`,`
|
|
4
4
|
overflow: ${o};
|
|
@@ -27,7 +27,7 @@ import{y,bT as Ne,bU as Fe,d as z,I as S,q as u,bV as Te,aM as me,bW as We,N as
|
|
|
27
27
|
left: 0;
|
|
28
28
|
right: 0;
|
|
29
29
|
height: 2px;
|
|
30
|
-
`,[
|
|
30
|
+
`,[Ye({enterDuration:"0.3s",leaveDuration:"0.8s"}),m("loading-bar",`
|
|
31
31
|
width: 100%;
|
|
32
32
|
transition:
|
|
33
33
|
max-width 4s linear,
|
|
@@ -45,7 +45,7 @@ import{y,bT as Ne,bU as Fe,d as z,I as S,q as u,bV as Te,aM as me,bW as We,N as
|
|
|
45
45
|
transition:
|
|
46
46
|
max-width .2s linear,
|
|
47
47
|
background .2s linear;
|
|
48
|
-
`)])]);var K=function(o,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function f(c){try{l(n.next(c))}catch(h){a(h)}}function r(c){try{l(n.throw(c))}catch(h){a(h)}}function l(c){c.done?s(c.value):i(c.value).then(f,r)}l((n=n.apply(o,e||[])).next())})};function q(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const Ho=z({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=E(ze),n=S(null),i=S(!1),s=S(!1),a=S(!1),f=S(!1);let r=!1;const l=S(!1),c=B(()=>{const{loadingBarStyle:C}=e;return C?C[l.value?"error":"loading"]:""});function h(){return K(this,void 0,void 0,function*(){i.value=!1,a.value=!1,r=!1,l.value=!1,f.value=!0,yield _(),f.value=!1})}function g(C=0,R=80,H="starting"){return K(this,void 0,void 0,function*(){if(s.value=!0,yield h(),r)return;a.value=!0,yield _();const I=n.value;I&&(I.style.maxWidth=`${C}%`,I.style.transition="none",I.offsetWidth,I.className=q(H,t.value),I.style.transition="",I.style.maxWidth=`${R}%`)})}function v(){return K(this,void 0,void 0,function*(){if(r||l.value)return;s.value&&(yield _()),r=!0;const C=n.value;C&&(C.className=q("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,a.value=!1)})}function d(){if(!(r||l.value))if(!a.value)g(100,100,"error").then(()=>{l.value=!0;const C=n.value;C&&(C.className=q("error",t.value),C.offsetWidth,a.value=!1)});else{l.value=!0;const C=n.value;if(!C)return;C.className=q("error",t.value),C.style.maxWidth="100%",C.offsetWidth,a.value=!1}}function p(){i.value=!0}function x(){i.value=!1}function w(){return K(this,void 0,void 0,function*(){yield h()})}const $=T("LoadingBar","-loading-bar",Ro,Eo,e,t),O=B(()=>{const{self:{height:C,colorError:R,colorLoading:H}}=$.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":R}}),k=o?ce("loading-bar",void 0,O,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:s,loading:a,entering:i,transitionDisabled:f,start:g,error:d,finish:v,handleEnter:p,handleAfterEnter:x,handleAfterLeave:w,mergedLoadingBarStyle:c,cssVars:o?void 0:O,themeClass:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return u(xe,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),
|
|
48
|
+
`)])]);var K=function(o,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function f(c){try{l(n.next(c))}catch(h){a(h)}}function r(c){try{l(n.throw(c))}catch(h){a(h)}}function l(c){c.done?s(c.value):i(c.value).then(f,r)}l((n=n.apply(o,e||[])).next())})};function q(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const Ho=z({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=E(ze),n=S(null),i=S(!1),s=S(!1),a=S(!1),f=S(!1);let r=!1;const l=S(!1),c=B(()=>{const{loadingBarStyle:C}=e;return C?C[l.value?"error":"loading"]:""});function h(){return K(this,void 0,void 0,function*(){i.value=!1,a.value=!1,r=!1,l.value=!1,f.value=!0,yield _(),f.value=!1})}function g(C=0,R=80,H="starting"){return K(this,void 0,void 0,function*(){if(s.value=!0,yield h(),r)return;a.value=!0,yield _();const I=n.value;I&&(I.style.maxWidth=`${C}%`,I.style.transition="none",I.offsetWidth,I.className=q(H,t.value),I.style.transition="",I.style.maxWidth=`${R}%`)})}function v(){return K(this,void 0,void 0,function*(){if(r||l.value)return;s.value&&(yield _()),r=!0;const C=n.value;C&&(C.className=q("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,a.value=!1)})}function d(){if(!(r||l.value))if(!a.value)g(100,100,"error").then(()=>{l.value=!0;const C=n.value;C&&(C.className=q("error",t.value),C.offsetWidth,a.value=!1)});else{l.value=!0;const C=n.value;if(!C)return;C.className=q("error",t.value),C.style.maxWidth="100%",C.offsetWidth,a.value=!1}}function p(){i.value=!0}function x(){i.value=!1}function w(){return K(this,void 0,void 0,function*(){yield h()})}const $=T("LoadingBar","-loading-bar",Ro,Eo,e,t),O=B(()=>{const{self:{height:C,colorError:R,colorLoading:H}}=$.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":R}}),k=o?ce("loading-bar",void 0,O,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:s,loading:a,entering:i,transitionDisabled:f,start:g,error:d,finish:v,handleEnter:p,handleAfterEnter:x,handleAfterLeave:w,mergedLoadingBarStyle:c,cssVars:o?void 0:O,themeClass:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return u(xe,{name:"fade-in-transition",appear:!0,onEnter:this.handleEnter,onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave,css:!this.transitionDisabled},{default:()=>{var e;return(e=this.onRender)===null||e===void 0||e.call(this),Ze(u("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},u("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[Je,this.loading||!this.loading&&this.entering]])}})}}),Mo=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),Bo=z({name:"LoadingBarProvider",props:Mo,setup(o){const e=Qe(),t=S(null),n={start(){var s;e.value?(s=t.value)===null||s===void 0||s.start():_(()=>{var a;(a=t.value)===null||a===void 0||a.start()})},error(){var s;e.value?(s=t.value)===null||s===void 0||s.error():_(()=>{var a;(a=t.value)===null||a===void 0||a.error()})},finish(){var s;e.value?(s=t.value)===null||s===void 0||s.finish():_(()=>{var a;(a=t.value)===null||a===void 0||a.finish()})}},{mergedClsPrefixRef:i}=F(o);return P(Ie,n),P(ze,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return u(V,null,u(de,{disabled:this.to===!1,to:this.to||"body"},u(Ho,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function _o(){const o=E(Ie,null);return o===null&&U("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Le={icon:Function,type:{type:String,default:"info"},content:[String,Number,Function],showIcon:{type:Boolean,default:!0},closable:Boolean,keepAliveOnHover:Boolean,onClose:Function,onMouseenter:Function,onMouseleave:Function},je=N("n-message-api"),Ae=N("n-message-provider"),No=y([m("message-wrapper",`
|
|
49
49
|
margin: var(--n-margin);
|
|
50
50
|
z-index: 0;
|
|
51
51
|
transform-origin: top center;
|
|
@@ -138,7 +138,7 @@ import{y,bT as Ne,bU as Fe,d as z,I as S,q as u,bV as Te,aM as me,bW as We,N as
|
|
|
138
138
|
right: 12px;
|
|
139
139
|
justify-content: flex-end;
|
|
140
140
|
align-items: flex-end;
|
|
141
|
-
`)])]),Fo={info:()=>u(Se,null),success:()=>u(ke,null),warning:()=>u($e,null),error:()=>u(Oe,null),default:()=>null},To=z({name:"Message",props:Object.assign(Object.assign({},Le),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=E(Ae),s=ye("Message",t,i),a=T("Message","-message",No,jo,n,i),f=B(()=>{const{type:l}=o,{common:{cubicBezierEaseInOut:c},self:{padding:h,margin:g,maxWidth:v,iconMargin:d,closeMargin:p,closeSize:x,iconSize:w,fontSize:$,lineHeight:O,borderRadius:k,iconColorInfo:C,iconColorSuccess:R,iconColorWarning:H,iconColorError:I,iconColorLoading:G,closeIconSize:Z,closeBorderRadius:Q,[A("textColor",l)]:J,[A("boxShadow",l)]:Y,[A("color",l)]:ee,[A("closeColorHover",l)]:oe,[A("closeColorPressed",l)]:ne,[A("closeIconColor",l)]:te,[A("closeIconColorPressed",l)]:ie,[A("closeIconColorHover",l)]:re}}=a.value;return{"--n-bezier":c,"--n-margin":g,"--n-padding":h,"--n-max-width":v,"--n-font-size":$,"--n-icon-margin":d,"--n-icon-size":w,"--n-close-icon-size":Z,"--n-close-border-radius":Q,"--n-close-size":x,"--n-close-margin":p,"--n-text-color":J,"--n-color":ee,"--n-box-shadow":Y,"--n-icon-color-info":C,"--n-icon-color-success":R,"--n-icon-color-warning":H,"--n-icon-color-error":I,"--n-icon-color-loading":G,"--n-close-color-hover":oe,"--n-close-color-pressed":ne,"--n-close-icon-color":te,"--n-close-icon-color-pressed":ie,"--n-close-icon-color-hover":re,"--n-line-height":O,"--n-border-radius":k}}),r=e?ce("message",B(()=>o.type[0]),f,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:s,messageProviderProps:n,handleClose(){var l;(l=o.onClose)===null||l===void 0||l.call(o)},cssVars:e?void 0:f,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:s,themeClass:a,onRender:f,icon:r,handleClose:l,showIcon:c}=this;f==null||f();let h;return u("div",{class:[`${i}-message-wrapper`,a],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},s]},o?o(this.$props):u("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(h=Wo(r,e,i))&&c?u("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},u(oo,null,{default:()=>h})):null,u("div",{class:`${i}-message__content`},M(n)),t?u(Ce,{clsPrefix:i,class:`${i}-message__close`,onClick:l,absolute:!0}):null))}});function Wo(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?u(no,{clsPrefix:t,strokeWidth:24,scale:.85}):Fo[e]();return n?u(we,{clsPrefix:t,key:e},{default:()=>n}):null}}const Ko=z({name:"MessageEnvironment",props:Object.assign(Object.assign({},Le),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=S(!0);fe(()=>{n()});function n(){const{duration:c}=o;c&&(e=window.setTimeout(a,c))}function i(c){c.currentTarget===c.target&&e!==null&&(window.clearTimeout(e),e=null)}function s(c){c.currentTarget===c.target&&n()}function a(){const{onHide:c}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),c&&c()}function f(){const{onClose:c}=o;c&&c(),a()}function r(){const{onAfterLeave:c,onInternalAfterLeave:h,onAfterHide:g,internalKey:v}=o;c&&c(),h&&h(v),g&&g()}function l(){a()}return{show:t,hide:a,handleClose:f,handleAfterLeave:r,handleMouseleave:s,handleMouseenter:i,deactivate:l}},render(){return u(to,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?u(To,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),qo=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Do=z({name:"MessageProvider",props:qo,setup(o){const{mergedClsPrefixRef:e}=F(o),t=S([]),n=S({}),i={create(r,l){return s(r,Object.assign({type:"default"},l))},info(r,l){return s(r,Object.assign(Object.assign({},l),{type:"info"}))},success(r,l){return s(r,Object.assign(Object.assign({},l),{type:"success"}))},warning(r,l){return s(r,Object.assign(Object.assign({},l),{type:"warning"}))},error(r,l){return s(r,Object.assign(Object.assign({},l),{type:"error"}))},loading(r,l){return s(r,Object.assign(Object.assign({},l),{type:"loading"}))},destroyAll:f};P(Ae,{props:o,mergedClsPrefixRef:e}),P(je,i);function s(r,l){const c=se(),h=ae(Object.assign(Object.assign({},l),{content:r,key:c,destroy:()=>{var v;(v=n.value[c])===null||v===void 0||v.hide()}})),{max:g}=o;return g&&t.value.length>=g&&t.value.shift(),t.value.push(h),h}function a(r){t.value.splice(t.value.findIndex(l=>l.key===r),1),delete n.value[r]}function f(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:a},i)},render(){var o,e,t;return u(V,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?u(de,{to:(t=this.to)!==null&&t!==void 0?t:"body"},u("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>u(Ko,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},ue(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Vo(){const o=E(je,null);return o===null&&U("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const X=N("n-notification-provider"),Uo=z({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=E(X),n=S(null);return io(()=>{var i,s;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(s=n==null?void 0:n.value)===null||s===void 0||s.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return u("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?u(ro,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),Xo={info:()=>u(Se,null),success:()=>u(ke,null),warning:()=>u($e,null),error:()=>u(Oe,null),default:()=>null},he={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},Go=so(he),Zo=z({name:"Notification",props:he,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=E(X),{inlineThemeDisabled:i,mergedRtlRef:s}=F(),a=ye("Notification",s,e),f=B(()=>{const{type:l}=o,{self:{color:c,textColor:h,closeIconColor:g,closeIconColorHover:v,closeIconColorPressed:d,headerTextColor:p,descriptionTextColor:x,actionTextColor:w,borderRadius:$,headerFontWeight:O,boxShadow:k,lineHeight:C,fontSize:R,closeMargin:H,closeSize:I,width:G,padding:Z,closeIconSize:Q,closeBorderRadius:J,closeColorHover:Y,closeColorPressed:ee,titleFontSize:oe,metaFontSize:ne,descriptionFontSize:te,[A("iconColor",l)]:ie},common:{cubicBezierEaseOut:re,cubicBezierEaseIn:Ee,cubicBezierEaseInOut:Re}}=t.value,{left:He,right:Me,top:Be,bottom:_e}=ao(Z);return{"--n-color":c,"--n-font-size":R,"--n-text-color":h,"--n-description-text-color":x,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":O,"--n-bezier":Re,"--n-bezier-ease-out":re,"--n-bezier-ease-in":Ee,"--n-border-radius":$,"--n-box-shadow":k,"--n-close-border-radius":J,"--n-close-color-hover":Y,"--n-close-color-pressed":ee,"--n-close-icon-color":g,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":d,"--n-line-height":C,"--n-icon-color":ie,"--n-close-margin":H,"--n-close-size":I,"--n-close-icon-size":Q,"--n-width":G,"--n-padding-left":He,"--n-padding-right":Me,"--n-padding-top":Be,"--n-padding-bottom":_e,"--n-title-font-size":oe,"--n-meta-font-size":ne,"--n-description-font-size":te}}),r=i?ce("notification",B(()=>o.type[0]),f,n):void 0;return{mergedClsPrefix:e,showAvatar:B(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:a,cssVars:i?void 0:f,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),u("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},u("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?u("div",{class:`${e}-notification__avatar`},this.avatar?M(this.avatar):this.type!=="default"?u(we,{clsPrefix:e},{default:()=>Xo[this.type]()}):null):null,this.closable?u(Ce,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,u("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?u("div",{class:`${e}-notification-main__header`},M(this.title)):null,this.description?u("div",{class:`${e}-notification-main__description`},M(this.description)):null,this.content?u("pre",{class:`${e}-notification-main__content`},M(this.content)):null,this.meta||this.action?u("div",{class:`${e}-notification-main-footer`},this.meta?u("div",{class:`${e}-notification-main-footer__meta`},M(this.meta)):null,this.action?u("div",{class:`${e}-notification-main-footer__action`},M(this.action)):null):null)))}}),Qo=Object.assign(Object.assign({},he),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),Jo=z({name:"NotificationEnvironment",props:Object.assign(Object.assign({},Qo),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=E(X),t=S(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function s(d){e.value++,_(()=>{d.style.height=`${d.offsetHeight}px`,d.style.maxHeight="0",d.style.transition="none",d.offsetHeight,d.style.transition="",d.style.maxHeight=d.style.height})}function a(d){e.value--,d.style.height="",d.style.maxHeight="";const{onAfterEnter:p,onAfterShow:x}=o;p&&p(),x&&x()}function f(d){e.value++,d.style.maxHeight=`${d.offsetHeight}px`,d.style.height=`${d.offsetHeight}px`,d.offsetHeight}function r(d){const{onHide:p}=o;p&&p(),d.style.maxHeight="0",d.offsetHeight}function l(){e.value--;const{onAfterLeave:d,onInternalAfterLeave:p,onAfterHide:x,internalKey:w}=o;d&&d(),p(w),x&&x()}function c(){const{duration:d}=o;d&&(n=window.setTimeout(i,d))}function h(d){d.currentTarget===d.target&&n!==null&&(window.clearTimeout(n),n=null)}function g(d){d.currentTarget===d.target&&c()}function v(){const{onClose:d}=o;d?Promise.resolve(d()).then(p=>{p!==!1&&i()}):i()}return fe(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:v,handleAfterLeave:l,handleLeave:r,handleBeforeLeave:f,handleAfterEnter:a,handleBeforeEnter:s,handleMouseenter:h,handleMouseleave:g}},render(){return u(xe,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?u(Zo,Object.assign({},me(this.$props,Go),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),Yo=y([m("notification-container",`
|
|
141
|
+
`)])]),Fo={info:()=>u(Se,null),success:()=>u(ke,null),warning:()=>u($e,null),error:()=>u(Oe,null),default:()=>null},To=z({name:"Message",props:Object.assign(Object.assign({},Le),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=E(Ae),s=ye("Message",t,i),a=T("Message","-message",No,jo,n,i),f=B(()=>{const{type:l}=o,{common:{cubicBezierEaseInOut:c},self:{padding:h,margin:g,maxWidth:v,iconMargin:d,closeMargin:p,closeSize:x,iconSize:w,fontSize:$,lineHeight:O,borderRadius:k,iconColorInfo:C,iconColorSuccess:R,iconColorWarning:H,iconColorError:I,iconColorLoading:G,closeIconSize:Y,closeBorderRadius:Z,[A("textColor",l)]:J,[A("boxShadow",l)]:Q,[A("color",l)]:ee,[A("closeColorHover",l)]:oe,[A("closeColorPressed",l)]:ne,[A("closeIconColor",l)]:te,[A("closeIconColorPressed",l)]:ie,[A("closeIconColorHover",l)]:re}}=a.value;return{"--n-bezier":c,"--n-margin":g,"--n-padding":h,"--n-max-width":v,"--n-font-size":$,"--n-icon-margin":d,"--n-icon-size":w,"--n-close-icon-size":Y,"--n-close-border-radius":Z,"--n-close-size":x,"--n-close-margin":p,"--n-text-color":J,"--n-color":ee,"--n-box-shadow":Q,"--n-icon-color-info":C,"--n-icon-color-success":R,"--n-icon-color-warning":H,"--n-icon-color-error":I,"--n-icon-color-loading":G,"--n-close-color-hover":oe,"--n-close-color-pressed":ne,"--n-close-icon-color":te,"--n-close-icon-color-pressed":ie,"--n-close-icon-color-hover":re,"--n-line-height":O,"--n-border-radius":k}}),r=e?ce("message",B(()=>o.type[0]),f,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:s,messageProviderProps:n,handleClose(){var l;(l=o.onClose)===null||l===void 0||l.call(o)},cssVars:e?void 0:f,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender,placement:n.placement}},render(){const{render:o,type:e,closable:t,content:n,mergedClsPrefix:i,cssVars:s,themeClass:a,onRender:f,icon:r,handleClose:l,showIcon:c}=this;f==null||f();let h;return u("div",{class:[`${i}-message-wrapper`,a],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},s]},o?o(this.$props):u("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(h=Wo(r,e,i))&&c?u("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},u(oo,null,{default:()=>h})):null,u("div",{class:`${i}-message__content`},M(n)),t?u(Ce,{clsPrefix:i,class:`${i}-message__close`,onClick:l,absolute:!0}):null))}});function Wo(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?u(no,{clsPrefix:t,strokeWidth:24,scale:.85}):Fo[e]();return n?u(we,{clsPrefix:t,key:e},{default:()=>n}):null}}const Ko=z({name:"MessageEnvironment",props:Object.assign(Object.assign({},Le),{duration:{type:Number,default:3e3},onAfterLeave:Function,onLeave:Function,internalKey:{type:String,required:!0},onInternalAfterLeave:Function,onHide:Function,onAfterHide:Function}),setup(o){let e=null;const t=S(!0);fe(()=>{n()});function n(){const{duration:c}=o;c&&(e=window.setTimeout(a,c))}function i(c){c.currentTarget===c.target&&e!==null&&(window.clearTimeout(e),e=null)}function s(c){c.currentTarget===c.target&&n()}function a(){const{onHide:c}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),c&&c()}function f(){const{onClose:c}=o;c&&c(),a()}function r(){const{onAfterLeave:c,onInternalAfterLeave:h,onAfterHide:g,internalKey:v}=o;c&&c(),h&&h(v),g&&g()}function l(){a()}return{show:t,hide:a,handleClose:f,handleAfterLeave:r,handleMouseleave:s,handleMouseenter:i,deactivate:l}},render(){return u(to,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?u(To,{content:this.content,type:this.type,icon:this.icon,showIcon:this.showIcon,closable:this.closable,onClose:this.handleClose,onMouseenter:this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.keepAliveOnHover?this.handleMouseleave:void 0}):null]})}}),qo=Object.assign(Object.assign({},T.props),{to:[String,Object],duration:{type:Number,default:3e3},keepAliveOnHover:Boolean,max:Number,placement:{type:String,default:"top"},closable:Boolean,containerClass:String,containerStyle:[String,Object]}),Do=z({name:"MessageProvider",props:qo,setup(o){const{mergedClsPrefixRef:e}=F(o),t=S([]),n=S({}),i={create(r,l){return s(r,Object.assign({type:"default"},l))},info(r,l){return s(r,Object.assign(Object.assign({},l),{type:"info"}))},success(r,l){return s(r,Object.assign(Object.assign({},l),{type:"success"}))},warning(r,l){return s(r,Object.assign(Object.assign({},l),{type:"warning"}))},error(r,l){return s(r,Object.assign(Object.assign({},l),{type:"error"}))},loading(r,l){return s(r,Object.assign(Object.assign({},l),{type:"loading"}))},destroyAll:f};P(Ae,{props:o,mergedClsPrefixRef:e}),P(je,i);function s(r,l){const c=se(),h=ae(Object.assign(Object.assign({},l),{content:r,key:c,destroy:()=>{var v;(v=n.value[c])===null||v===void 0||v.hide()}})),{max:g}=o;return g&&t.value.length>=g&&t.value.shift(),t.value.push(h),h}function a(r){t.value.splice(t.value.findIndex(l=>l.key===r),1),delete n.value[r]}function f(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:a},i)},render(){var o,e,t;return u(V,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?u(de,{to:(t=this.to)!==null&&t!==void 0?t:"body"},u("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>u(Ko,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},ue(n,["destroy"],void 0),{duration:n.duration===void 0?this.duration:n.duration,keepAliveOnHover:n.keepAliveOnHover===void 0?this.keepAliveOnHover:n.keepAliveOnHover,closable:n.closable===void 0?this.closable:n.closable}))))):null)}});function Vo(){const o=E(je,null);return o===null&&U("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),o}const X=N("n-notification-provider"),Uo=z({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=E(X),n=S(null);return io(()=>{var i,s;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(s=n==null?void 0:n.value)===null||s===void 0||s.classList.remove("transitioning")}),{selfRef:n,mergedTheme:o,mergedClsPrefix:e,transitioning:t}},render(){const{$slots:o,scrollable:e,mergedClsPrefix:t,mergedTheme:n,placement:i}=this;return u("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?u(ro,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),Xo={info:()=>u(Se,null),success:()=>u(ke,null),warning:()=>u($e,null),error:()=>u(Oe,null),default:()=>null},he={closable:{type:Boolean,default:!0},type:{type:String,default:"default"},avatar:Function,title:[String,Function],description:[String,Function],content:[String,Function],meta:[String,Function],action:[String,Function],onClose:{type:Function,required:!0},keepAliveOnHover:Boolean,onMouseenter:Function,onMouseleave:Function},Go=so(he),Yo=z({name:"Notification",props:he,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=E(X),{inlineThemeDisabled:i,mergedRtlRef:s}=F(),a=ye("Notification",s,e),f=B(()=>{const{type:l}=o,{self:{color:c,textColor:h,closeIconColor:g,closeIconColorHover:v,closeIconColorPressed:d,headerTextColor:p,descriptionTextColor:x,actionTextColor:w,borderRadius:$,headerFontWeight:O,boxShadow:k,lineHeight:C,fontSize:R,closeMargin:H,closeSize:I,width:G,padding:Y,closeIconSize:Z,closeBorderRadius:J,closeColorHover:Q,closeColorPressed:ee,titleFontSize:oe,metaFontSize:ne,descriptionFontSize:te,[A("iconColor",l)]:ie},common:{cubicBezierEaseOut:re,cubicBezierEaseIn:Ee,cubicBezierEaseInOut:Re}}=t.value,{left:He,right:Me,top:Be,bottom:_e}=ao(Y);return{"--n-color":c,"--n-font-size":R,"--n-text-color":h,"--n-description-text-color":x,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":O,"--n-bezier":Re,"--n-bezier-ease-out":re,"--n-bezier-ease-in":Ee,"--n-border-radius":$,"--n-box-shadow":k,"--n-close-border-radius":J,"--n-close-color-hover":Q,"--n-close-color-pressed":ee,"--n-close-icon-color":g,"--n-close-icon-color-hover":v,"--n-close-icon-color-pressed":d,"--n-line-height":C,"--n-icon-color":ie,"--n-close-margin":H,"--n-close-size":I,"--n-close-icon-size":Z,"--n-width":G,"--n-padding-left":He,"--n-padding-right":Me,"--n-padding-top":Be,"--n-padding-bottom":_e,"--n-title-font-size":oe,"--n-meta-font-size":ne,"--n-description-font-size":te}}),r=i?ce("notification",B(()=>o.type[0]),f,n):void 0;return{mergedClsPrefix:e,showAvatar:B(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:a,cssVars:i?void 0:f,themeClass:r==null?void 0:r.themeClass,onRender:r==null?void 0:r.onRender}},render(){var o;const{mergedClsPrefix:e}=this;return(o=this.onRender)===null||o===void 0||o.call(this),u("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},u("div",{class:[`${e}-notification`,this.rtlEnabled&&`${e}-notification--rtl`,this.themeClass,{[`${e}-notification--closable`]:this.closable,[`${e}-notification--show-avatar`]:this.showAvatar}],style:this.cssVars},this.showAvatar?u("div",{class:`${e}-notification__avatar`},this.avatar?M(this.avatar):this.type!=="default"?u(we,{clsPrefix:e},{default:()=>Xo[this.type]()}):null):null,this.closable?u(Ce,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,u("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?u("div",{class:`${e}-notification-main__header`},M(this.title)):null,this.description?u("div",{class:`${e}-notification-main__description`},M(this.description)):null,this.content?u("pre",{class:`${e}-notification-main__content`},M(this.content)):null,this.meta||this.action?u("div",{class:`${e}-notification-main-footer`},this.meta?u("div",{class:`${e}-notification-main-footer__meta`},M(this.meta)):null,this.action?u("div",{class:`${e}-notification-main-footer__action`},M(this.action)):null):null)))}}),Zo=Object.assign(Object.assign({},he),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),Jo=z({name:"NotificationEnvironment",props:Object.assign(Object.assign({},Zo),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=E(X),t=S(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function s(d){e.value++,_(()=>{d.style.height=`${d.offsetHeight}px`,d.style.maxHeight="0",d.style.transition="none",d.offsetHeight,d.style.transition="",d.style.maxHeight=d.style.height})}function a(d){e.value--,d.style.height="",d.style.maxHeight="";const{onAfterEnter:p,onAfterShow:x}=o;p&&p(),x&&x()}function f(d){e.value++,d.style.maxHeight=`${d.offsetHeight}px`,d.style.height=`${d.offsetHeight}px`,d.offsetHeight}function r(d){const{onHide:p}=o;p&&p(),d.style.maxHeight="0",d.offsetHeight}function l(){e.value--;const{onAfterLeave:d,onInternalAfterLeave:p,onAfterHide:x,internalKey:w}=o;d&&d(),p(w),x&&x()}function c(){const{duration:d}=o;d&&(n=window.setTimeout(i,d))}function h(d){d.currentTarget===d.target&&n!==null&&(window.clearTimeout(n),n=null)}function g(d){d.currentTarget===d.target&&c()}function v(){const{onClose:d}=o;d?Promise.resolve(d()).then(p=>{p!==!1&&i()}):i()}return fe(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:v,handleAfterLeave:l,handleLeave:r,handleBeforeLeave:f,handleAfterEnter:a,handleBeforeEnter:s,handleMouseenter:h,handleMouseleave:g}},render(){return u(xe,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?u(Yo,Object.assign({},me(this.$props,Go),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),Qo=y([m("notification-container",`
|
|
142
142
|
z-index: 4000;
|
|
143
143
|
position: fixed;
|
|
144
144
|
overflow: visible;
|
|
@@ -327,6 +327,6 @@ import{y,bT as Ne,bU as Fe,d as z,I as S,q as u,bV as Te,aM as me,bW as We,N as
|
|
|
327
327
|
transform: translate(${t}, 0);
|
|
328
328
|
`),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
|
|
329
329
|
transform: translate(0, 0);
|
|
330
|
-
`)])}const Pe=N("n-notification-api"),en=Object.assign(Object.assign({},T.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),on=z({name:"NotificationProvider",props:en,setup(o){const{mergedClsPrefixRef:e}=F(o),t=S([]),n={},i=new Set;function s(v){const d=se(),p=()=>{i.add(d),n[d]&&n[d].hide()},x=ae(Object.assign(Object.assign({},v),{key:d,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,O=0;for(const k of t.value){if(!i.has(k.key)){n[k.key]&&(k.destroy(),$=!0);break}O++}$||t.value.splice(O,1)}return t.value.push(x),x}const a=["info","success","warning","error"].map(v=>d=>s(Object.assign(Object.assign({},d),{type:v})));function f(v){i.delete(v),t.value.splice(t.value.findIndex(d=>d.key===v),1)}const r=T("Notification","-notification",
|
|
330
|
+
`)])}const Pe=N("n-notification-api"),en=Object.assign(Object.assign({},T.props),{containerClass:String,containerStyle:[String,Object],to:[String,Object],scrollable:{type:Boolean,default:!0},max:Number,placement:{type:String,default:"top-right"},keepAliveOnHover:Boolean}),on=z({name:"NotificationProvider",props:en,setup(o){const{mergedClsPrefixRef:e}=F(o),t=S([]),n={},i=new Set;function s(v){const d=se(),p=()=>{i.add(d),n[d]&&n[d].hide()},x=ae(Object.assign(Object.assign({},v),{key:d,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let $=!1,O=0;for(const k of t.value){if(!i.has(k.key)){n[k.key]&&(k.destroy(),$=!0);break}O++}$||t.value.splice(O,1)}return t.value.push(x),x}const a=["info","success","warning","error"].map(v=>d=>s(Object.assign(Object.assign({},d),{type:v})));function f(v){i.delete(v),t.value.splice(t.value.findIndex(d=>d.key===v),1)}const r=T("Notification","-notification",Qo,Oo,o,e),l={create:s,info:a[0],success:a[1],warning:a[2],error:a[3],open:h,destroyAll:g},c=S(0);P(Pe,l),P(X,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:c});function h(v){return s(v)}function g(){Object.values(t.value).forEach(v=>{v.hide()})}return Object.assign({mergedClsPrefix:e,notificationList:t,notificationRefs:n,handleAfterLeave:f},l)},render(){var o,e,t;const{placement:n}=this;return u(V,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.notificationList.length?u(de,{to:(t=this.to)!==null&&t!==void 0?t:"body"},u(Uo,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>u(Jo,Object.assign({ref:s=>{const a=i.key;s===null?delete this.notificationRefs[a]:this.notificationRefs[a]=s}},ue(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function nn(){const o=E(Pe,null);return o===null&&U("use-notification","No outer `n-notification-provider` found."),o}const tn=z({name:"InjectionExtractor",props:{onSetup:Function},setup(o,{slots:e}){var t;return(t=o.onSetup)===null||t===void 0||t.call(o),()=>{var n;return(n=e.default)===null||n===void 0?void 0:n.call(e)}}}),rn={message:Vo,notification:nn,loadingBar:_o,dialog:wo};function sn({providersAndProps:o,configProviderProps:e}){let n=lo(()=>u(fo,ge(e),{default:()=>o.map(({type:f,Provider:r,props:l})=>u(r,ge(l),{default:()=>u(tn,{onSetup:()=>i[f]=rn[f]()})}))}));const i={app:n};let s;return co&&(s=document.createElement("div"),document.body.appendChild(s),n.mount(s)),Object.assign({unmount:()=>{var f;if(n===null||s===null){uo("discrete","unmount call no need because discrete app has been unmounted");return}n.unmount(),(f=s.parentNode)===null||f===void 0||f.removeChild(s),s=null,n=null}},i)}function an(o,{configProviderProps:e,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:i,loadingBarProviderProps:s}={}){const a=[];return o.forEach(r=>{switch(r){case"message":a.push({type:r,Provider:Do,props:t});break;case"notification":a.push({type:r,Provider:on,props:i});break;case"dialog":a.push({type:r,Provider:Co,props:n});break;case"loadingBar":a.push({type:r,Provider:Bo,props:s});break}}),sn({providersAndProps:a,configProviderProps:e})}const{message:pe,dialog:yn,loadingBar:Cn}=an(["message","dialog","loadingBar"]),wn=(...o)=>{const e=new FormData;return o.forEach(t=>{for(const n in t){const i=t[n];i!==void 0&&(i instanceof File?e.append(n,i,i.name):i instanceof Blob?e.append(n,i):e.append(n,String(i)))}}),e},ln=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},W=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),Sn=(()=>{let o;return async(e="")=>{if(o!==e){o=e,W(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),pe.success("复制成功")}catch{pe.error("复制失败")}}}})(),kn=()=>{const o=window.innerHeight>window.innerWidth;fe(()=>{o&&ve.classList.add("mobile")}),ho(()=>{ve.classList.remove("mobile")})},$n=o=>{const e=Math.floor((Date.now()-o)/1e3),t=Math.floor(e/31536e3);if(t>=1)return`${t} 年前`;const n=Math.floor(e/2592e3);if(n>=1)return`${n} 月前`;const i=Math.floor(e/86400);if(i>=1)return`${i} 天前`;const s=Math.floor(e/3600);if(s>=1)return`${s} 小时前`;const a=Math.floor(e/60);return a>=1?`${a} 分钟前`:"刚刚"},cn=o=>(...e)=>o()(...e),dn=cn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),fn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},un=(o="")=>{const e=new Headers;return o.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(n){return n.startsWith(`
|
|
331
331
|
`)?n.substring(1):n}).forEach(function(n){var a;let i=n.split(":"),s=(a=i.shift())==null?void 0:a.trim();if(s){let f=i.join(":").trim();try{e.append(s,f)}catch{}}}),e},hn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},gn=async(o,e={},t={})=>{var l;const n=new Request(o,e).clone();if((l=n.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),s=hn(n.url),a=new Headers(n.headers);new Headers(e.headers).forEach((c,h)=>{a.set(h,c)});let f=!1,r;return i!="GET"&&e.body&&(typeof e.body=="string"||e.body instanceof URLSearchParams?r=e.body:e.body instanceof FormData?(r=e.body,a.delete("content-type")):(f=!0,r=await n.blob())),new Promise((c,h)=>{var p;let g={method:i,url:s,headers:ln(a),data:r,binary:f,responseType:"blob",async onload(x){var O;let w;x.response instanceof Blob&&x.response.size==0||(w=(O=x.response)!=null?O:x.responseText),await W();const $=new Response(w,{status:x.status,statusText:x.statusText,headers:un(x.responseHeaders)});Object.defineProperty($,"url",{value:x.finalUrl}),c($)},async onerror(){await W(),h(new TypeError("Network request onerror failed"))},async ontimeout(){await W(),h(new TypeError("Network request ontimeout failed"))},async onabort(){await W(),h(new DOMException("Aborted","AbortError"))},async onreadystatechange(x){var w;x.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",d))}};typeof t=="function"?g=t(g):g={...g,...t};const v=dn(g);function d(){v.abort()}(p=n.signal)==null||p.addEventListener("abort",d)})},vn=new Set([location.origin,"https://cdn.jsdelivr.net","https://fastly.jsdelivr.net","https://raw.githubusercontent.com","https://gist.githubusercontent.com","https://raw.githubusercontents.com","https://raw.gitmirror.com","https://registry.npmmirror.com"]),pn=o=>(o=new URL(o),o.hostname=="127.0.0.1"||o.hostname=="localhost"||location.protocol=="http:"&&o.protocol=="http:"&&o.hostname.split(".").every(e=>Number.isSafeInteger(parseInt(e)))?!0:vn.has(o.origin)),mn=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,bn=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,On=(o,e)=>{e=e.toString();const{1:t}=e.match(mn)||[],{1:n,2:i}=e.match(bn)||[];if(t)return location.origin+o.resolve({path:`/i/${t}`}).href;if(n&&i)return`https://m.gkd.li/${n}/${i}`;throw new Error(`github url ${e} should come from gkd-kit/inspect files/assets`)},zn=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(pn(i))return fetch(o,{...e,mode:"cors"});if(fn())return gn(o,e);if(t!=null&&t.proxy){const s=new URL("https://proxy-workers.lisonge.workers.dev/");s.searchParams.set("proxyUrl",i.href);const a=new Request(o,e);return fetch(s,{method:a.method,headers:a.headers,body:a.body})}else throw go.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{W as a,fn as b,Sn as c,yn as d,zn as e,mo as f,On as g,mn as h,bn as i,ue as j,Cn as l,pe as m,wn as o,$n as t,kn as u};
|
|
332
|
-
//# sourceMappingURL=fetch-
|
|
332
|
+
//# sourceMappingURL=fetch-MBm2U2F_.js.map
|