@gkd-kit/inspect 0.0.1708919550570 → 0.0.1709361091316
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-RSsRStYS.js → ActionCard.vue_vue_type_script_setup_true_lang-z9oMhdbd.js} +3 -3
- package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-RSsRStYS.js.map → ActionCard.vue_vue_type_script_setup_true_lang-z9oMhdbd.js.map} +1 -1
- package/dist/assets/{DevicePage-IY_yZmOB.js → DevicePage-v5dzptWZ.js} +3 -3
- package/dist/assets/DevicePage-v5dzptWZ.js.map +1 -0
- package/dist/assets/{HomePage-M2HOTAEU.js → HomePage-adADnGrH.js} +2 -2
- package/dist/assets/{HomePage-M2HOTAEU.js.map → HomePage-adADnGrH.js.map} +1 -1
- package/dist/assets/{ImportPage-wkYT-97S.js → ImportPage-0l5XHEKC.js} +2 -2
- package/dist/assets/{ImportPage-wkYT-97S.js.map → ImportPage-0l5XHEKC.js.map} +1 -1
- package/dist/assets/{PreviewSharePage-2JQrfTI7.js → PreviewSharePage-BpYBshe3.js} +2 -2
- package/dist/assets/{PreviewSharePage-2JQrfTI7.js.map → PreviewSharePage-BpYBshe3.js.map} +1 -1
- package/dist/assets/{SnapshotPage-Dq1xNb_M.js → SnapshotPage-TU6XHJbt.js} +36 -36
- package/dist/assets/SnapshotPage-TU6XHJbt.js.map +1 -0
- package/dist/assets/{_404Page-SB0ya6gK.js → _404Page-9HdzjQoU.js} +2 -2
- package/dist/assets/{_404Page-SB0ya6gK.js.map → _404Page-9HdzjQoU.js.map} +1 -1
- package/dist/assets/fetch-n-BwJPZU.js +332 -0
- package/dist/assets/fetch-n-BwJPZU.js.map +1 -0
- package/dist/assets/{import-UQLsOcAp.js → import-f824QhP8.js} +2 -2
- package/dist/assets/{import-UQLsOcAp.js.map → import-f824QhP8.js.map} +1 -1
- package/dist/assets/index-3RgyIMA2.js +481 -0
- package/dist/assets/index-3RgyIMA2.js.map +1 -0
- package/dist/assets/{index-l288urgW.js → index-OO7z9C7Q.js} +4 -4
- package/dist/assets/index-OO7z9C7Q.js.map +1 -0
- package/dist/assets/index-Qq2XrGH3.js +2 -0
- package/dist/assets/index-Qq2XrGH3.js.map +1 -0
- package/dist/assets/{jszip.min-gVLalmbv.js → jszip.min-NHfBzmb7.js} +2 -2
- package/dist/assets/{jszip.min-gVLalmbv.js.map → jszip.min-NHfBzmb7.js.map} +1 -1
- package/dist/assets/{node-bYxGiaSg.js → node-9mGuZSM6.js} +2 -2
- package/dist/assets/{node-bYxGiaSg.js.map → node-9mGuZSM6.js.map} +1 -1
- package/dist/assets/polyfills-bJIXf7Td.js +1 -0
- package/dist/assets/{selector-Gg-sdF-c.js → selector-6KWC_lgw.js} +2 -2
- package/dist/assets/{selector-Gg-sdF-c.js.map → selector-6KWC_lgw.js.map} +1 -1
- package/dist/assets/{storage-WTLW1scY.js → storage-cD3WIS_R.js} +2 -2
- package/dist/assets/{storage-WTLW1scY.js.map → storage-cD3WIS_R.js.map} +1 -1
- package/dist/assets/{table-nLKMtWVG.js → table-uiiXMBg3.js} +21 -21
- package/dist/assets/table-uiiXMBg3.js.map +1 -0
- package/dist/index.html +4 -4
- package/package.json +15 -14
- package/dist/assets/DevicePage-IY_yZmOB.js.map +0 -1
- package/dist/assets/SnapshotPage-Dq1xNb_M.js.map +0 -1
- package/dist/assets/fetch-MBm2U2F_.js +0 -332
- package/dist/assets/fetch-MBm2U2F_.js.map +0 -1
- package/dist/assets/index-3DTTI4XP.js +0 -481
- package/dist/assets/index-3DTTI4XP.js.map +0 -1
- package/dist/assets/index-PfbVDA8u.js +0 -2
- package/dist/assets/index-PfbVDA8u.js.map +0 -1
- package/dist/assets/index-l288urgW.js.map +0 -1
- package/dist/assets/polyfills-DS8jGJZm.js +0 -1
- package/dist/assets/table-nLKMtWVG.js.map +0 -1
|
@@ -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-3RgyIMA2.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-9HdzjQoU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_404Page-
|
|
1
|
+
{"version":3,"file":"_404Page-9HdzjQoU.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"}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import{z as y,bT as qe,bU as De,d as $,J as k,v as h,bV as Ue,aM as ye,bW as Ve,N as Ce,E as I,bX as we,bY as ce,bZ as de,b_ as Xe,b$ as Ge,F as W,V as X,r as G,X as z,Y as q,a2 as Ye,I as fe,a3 as Ze,M as E,x as m,c0 as Je,A as b,C as F,m as _,K as T,L as ue,S as Qe,T as eo,aE as ke,aj as N,aO as oo,ap as he,B as A,ae as no,H as Se,a8 as to,aa as B,aI as $e,a7 as R,a9 as io,$ as Oe,c1 as Ie,c2 as Le,c3 as je,c4 as Ae,k as ve,U as ro,c5 as so,w as ao,aH as lo,aL as co,af as fo,c6 as uo,ab as ho,e as pe,c7 as vo,aW as go,c8 as me,ak as po,at as mo}from"./index-3RgyIMA2.js";function Y(o,e=[],t){const n={};return Object.getOwnPropertyNames(o).forEach(l=>{e.includes(l)||(n[l]=o[l])}),Object.assign(n,t)}const{cubicBezierEaseInOut:P,cubicBezierEaseOut:bo,cubicBezierEaseIn:xo}=qe;function yo({overflow:o="hidden",duration:e=".3s",originalTransition:t="",leavingDelay:n="0s",foldPadding:i=!1,enterToProps:l=void 0,leaveToProps:c=void 0,reverse:d=!1}={}){const r=d?"leave":"enter",a=d?"enter":"leave";return[y(`&.fade-in-height-expand-transition-${a}-from,
|
|
2
|
+
&.fade-in-height-expand-transition-${r}-to`,Object.assign(Object.assign({},l),{opacity:1})),y(`&.fade-in-height-expand-transition-${a}-to,
|
|
3
|
+
&.fade-in-height-expand-transition-${r}-from`,Object.assign(Object.assign({},c),{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-${a}-active`,`
|
|
4
|
+
overflow: ${o};
|
|
5
|
+
transition:
|
|
6
|
+
max-height ${e} ${P} ${n},
|
|
7
|
+
opacity ${e} ${bo} ${n},
|
|
8
|
+
margin-top ${e} ${P} ${n},
|
|
9
|
+
margin-bottom ${e} ${P} ${n},
|
|
10
|
+
padding-top ${e} ${P} ${n},
|
|
11
|
+
padding-bottom ${e} ${P} ${n}
|
|
12
|
+
${t?","+t:""}
|
|
13
|
+
`),y(`&.fade-in-height-expand-transition-${r}-active`,`
|
|
14
|
+
overflow: ${o};
|
|
15
|
+
transition:
|
|
16
|
+
max-height ${e} ${P},
|
|
17
|
+
opacity ${e} ${xo},
|
|
18
|
+
margin-top ${e} ${P},
|
|
19
|
+
margin-bottom ${e} ${P},
|
|
20
|
+
padding-top ${e} ${P},
|
|
21
|
+
padding-bottom ${e} ${P}
|
|
22
|
+
${t?","+t:""}
|
|
23
|
+
`)]}const Co=Object.assign(Object.assign({},De),{onAfterEnter:Function,onAfterLeave:Function,transformOrigin:String,blockScroll:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},internalStyle:[String,Object],maskClosable:{type:Boolean,default:!0},onPositiveClick:Function,onNegativeClick:Function,onClose:Function,onMaskClick:Function}),wo=$({name:"DialogEnvironment",props:Object.assign(Object.assign({},Co),{internalKey:{type:String,required:!0},to:[String,Object],onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(s){const{onPositiveClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function i(s){const{onNegativeClick:u}=o;u?Promise.resolve(u(s)).then(v=>{v!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handlePositiveClick:o,handleUpdateShow:e,handleNegativeClick:t,handleCloseClick:n,handleAfterLeave:i,handleMaskClick:l,handleEsc:c,to:d,maskClosable:r,show:a}=this;return h(Ce,{show:a,onUpdateShow:e,onMaskClick:l,onEsc:c,to:d,maskClosable:r,onAfterEnter:this.onAfterEnter,onAfterLeave:i,closeOnEsc:this.closeOnEsc,blockScroll:this.blockScroll,autoFocus:this.autoFocus,transformOrigin:this.transformOrigin,internalAppear:!0,internalDialog:!0},{default:()=>h(Ue,Object.assign({},ye(this.$props,Ve),{style:this.internalStyle,onClose:n,onNegativeClick:t,onPositiveClick:o}))})}}),ko={injectionKey:String,to:[String,Object]},So=$({name:"DialogProvider",props:ko,setup(){const o=k([]),e={};function t(d={}){const r=X(),a=G(Object.assign(Object.assign({},d),{key:r,destroy:()=>{e[`n-dialog-${r}`].hide()}}));return o.value.push(a),a}const n=["info","success","warning","error"].map(d=>r=>t(Object.assign(Object.assign({},r),{type:d})));function i(d){const{value:r}=o;r.splice(r.findIndex(a=>a.key===d),1)}function l(){Object.values(e).forEach(d=>{d.hide()})}const c={create:t,destroyAll:l,info:n[0],success:n[1],warning:n[2],error:n[3]};return I(we,c),I(Xe,{clickedRef:ce(64),clickedPositionRef:de()}),I(Ge,o),Object.assign(Object.assign({},c),{dialogList:o,dialogInstRefs:e,handleAfterLeave:i})},render(){var o,e;return h(W,null,[this.dialogList.map(t=>h(wo,Y(t,["destroy","style"],{internalStyle:t.style,to:this.to,ref:n=>{n===null?delete this.dialogInstRefs[`n-dialog-${t.key}`]:this.dialogInstRefs[`n-dialog-${t.key}`]=n},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function $o(){const o=z(we,null);return o===null&&q("use-dialog","No outer <n-dialog-provider /> founded."),o}const Oo={closeMargin:"16px 12px",closeSize:"20px",closeIconSize:"16px",width:"365px",padding:"16px",titleFontSize:"16px",metaFontSize:"12px",descriptionFontSize:"12px"},Io=o=>{const{textColor2:e,successColor:t,infoColor:n,warningColor:i,errorColor:l,popoverColor:c,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeColorHover:s,closeColorPressed:u,textColor1:v,textColor3:g,borderRadius:f,fontWeightStrong:p,boxShadow2:x,lineHeight:w,fontSize:O}=o;return Object.assign(Object.assign({},Oo),{borderRadius:f,lineHeight:w,fontSize:O,headerFontWeight:p,iconColor:e,iconColorSuccess:t,iconColorInfo:n,iconColorWarning:i,iconColorError:l,color:c,textColor:e,closeIconColor:d,closeIconColorHover:r,closeIconColorPressed:a,closeBorderRadius:f,closeColorHover:s,closeColorPressed:u,headerTextColor:v,descriptionTextColor:g,actionTextColor:e,boxShadow:x})},Lo=Ye({name:"Notification",common:fe,peers:{Scrollbar:Ze},self:Io}),jo=Lo,Ao={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 10px",closeSize:"20px",closeIconSize:"16px",iconSize:"20px",fontSize:"14px"},Po=o=>{const{textColor2:e,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,infoColor:l,successColor:c,errorColor:d,warningColor:r,popoverColor:a,boxShadow2:s,primaryColor:u,lineHeight:v,borderRadius:g,closeColorHover:f,closeColorPressed:p}=o;return Object.assign(Object.assign({},Ao),{closeBorderRadius:g,textColor:e,textColorInfo:e,textColorSuccess:e,textColorError:e,textColorWarning:e,textColorLoading:e,color:a,colorInfo:a,colorSuccess:a,colorError:a,colorWarning:a,colorLoading:a,boxShadow:s,boxShadowInfo:s,boxShadowSuccess:s,boxShadowError:s,boxShadowWarning:s,boxShadowLoading:s,iconColor:e,iconColorInfo:l,iconColorSuccess:c,iconColorWarning:r,iconColorError:d,iconColorLoading:u,closeColorHover:f,closeColorPressed:p,closeIconColor:t,closeIconColorHover:n,closeIconColorPressed:i,closeColorHoverInfo:f,closeColorPressedInfo:p,closeIconColorInfo:t,closeIconColorHoverInfo:n,closeIconColorPressedInfo:i,closeColorHoverSuccess:f,closeColorPressedSuccess:p,closeIconColorSuccess:t,closeIconColorHoverSuccess:n,closeIconColorPressedSuccess:i,closeColorHoverError:f,closeColorPressedError:p,closeIconColorError:t,closeIconColorHoverError:n,closeIconColorPressedError:i,closeColorHoverWarning:f,closeColorPressedWarning:p,closeIconColorWarning:t,closeIconColorHoverWarning:n,closeIconColorPressedWarning:i,closeColorHoverLoading:f,closeColorPressedLoading:p,closeIconColorLoading:t,closeIconColorHoverLoading:n,closeIconColorPressedLoading:i,loadingColor:u,lineHeight:v,borderRadius:g})},zo={name:"Message",common:fe,self:Po},Ro=zo,Eo=o=>{const{primaryColor:e,errorColor:t}=o;return{colorError:t,colorLoading:e,height:"2px"}},Mo={name:"LoadingBar",common:fe,self:Eo},Ho=Mo,Pe=E("n-loading-bar"),ze=E("n-loading-bar-api"),Bo=m("loading-bar-container",`
|
|
24
|
+
z-index: 5999;
|
|
25
|
+
position: fixed;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
height: 2px;
|
|
30
|
+
`,[Je({enterDuration:"0.3s",leaveDuration:"0.8s"}),m("loading-bar",`
|
|
31
|
+
width: 100%;
|
|
32
|
+
transition:
|
|
33
|
+
max-width 4s linear,
|
|
34
|
+
background .2s linear;
|
|
35
|
+
height: var(--n-height);
|
|
36
|
+
`,[b("starting",`
|
|
37
|
+
background: var(--n-color-loading);
|
|
38
|
+
`),b("finishing",`
|
|
39
|
+
background: var(--n-color-loading);
|
|
40
|
+
transition:
|
|
41
|
+
max-width .2s linear,
|
|
42
|
+
background .2s linear;
|
|
43
|
+
`),b("error",`
|
|
44
|
+
background: var(--n-color-error);
|
|
45
|
+
transition:
|
|
46
|
+
max-width .2s linear,
|
|
47
|
+
background .2s linear;
|
|
48
|
+
`)])]);var D=function(o,e,t,n){function i(l){return l instanceof t?l:new t(function(c){c(l)})}return new(t||(t=Promise))(function(l,c){function d(s){try{a(n.next(s))}catch(u){c(u)}}function r(s){try{a(n.throw(s))}catch(u){c(u)}}function a(s){s.done?l(s.value):i(s.value).then(d,r)}a((n=n.apply(o,e||[])).next())})};function U(o,e){return`${e}-loading-bar ${e}-loading-bar--${o}`}const _o=$({name:"LoadingBar",props:{containerClass:String,containerStyle:[String,Object]},setup(){const{inlineThemeDisabled:o}=F(),{props:e,mergedClsPrefixRef:t}=z(Pe),n=k(null),i=k(!1),l=k(!1),c=k(!1),d=k(!1);let r=!1;const a=k(!1),s=_(()=>{const{loadingBarStyle:C}=e;return C?C[a.value?"error":"loading"]:""});function u(){return D(this,void 0,void 0,function*(){i.value=!1,c.value=!1,r=!1,a.value=!1,d.value=!0,yield N(),d.value=!1})}function v(C=0,M=80,H="starting"){return D(this,void 0,void 0,function*(){if(l.value=!0,yield u(),r)return;c.value=!0,yield N();const j=n.value;j&&(j.style.maxWidth=`${C}%`,j.style.transition="none",j.offsetWidth,j.className=U(H,t.value),j.style.transition="",j.style.maxWidth=`${M}%`)})}function g(){return D(this,void 0,void 0,function*(){if(r||a.value)return;l.value&&(yield N()),r=!0;const C=n.value;C&&(C.className=U("finishing",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1)})}function f(){if(!(r||a.value))if(!c.value)v(100,100,"error").then(()=>{a.value=!0;const C=n.value;C&&(C.className=U("error",t.value),C.offsetWidth,c.value=!1)});else{a.value=!0;const C=n.value;if(!C)return;C.className=U("error",t.value),C.style.maxWidth="100%",C.offsetWidth,c.value=!1}}function p(){i.value=!0}function x(){i.value=!1}function w(){return D(this,void 0,void 0,function*(){yield u()})}const O=T("LoadingBar","-loading-bar",Bo,Ho,e,t),L=_(()=>{const{self:{height:C,colorError:M,colorLoading:H}}=O.value;return{"--n-height":C,"--n-color-loading":H,"--n-color-error":M}}),S=o?ue("loading-bar",void 0,L,e):void 0;return{mergedClsPrefix:t,loadingBarRef:n,started:l,loading:c,entering:i,transitionDisabled:d,start:v,error:f,finish:g,handleEnter:p,handleAfterEnter:x,handleAfterLeave:w,mergedLoadingBarStyle:s,cssVars:o?void 0:L,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){if(!this.started)return null;const{mergedClsPrefix:o}=this;return h(ke,{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),Qe(h("div",{class:[`${o}-loading-bar-container`,this.themeClass,this.containerClass],style:this.containerStyle},h("div",{ref:"loadingBarRef",class:[`${o}-loading-bar`],style:[this.cssVars,this.mergedLoadingBarStyle]})),[[eo,this.loading||!this.loading&&this.entering]])}})}}),No=Object.assign(Object.assign({},T.props),{to:{type:[String,Object,Boolean],default:void 0},containerClass:String,containerStyle:[String,Object],loadingBarStyle:{type:Object}}),Fo=$({name:"LoadingBarProvider",props:No,setup(o){const e=oo(),t=k(null),n={start(){var l;e.value?(l=t.value)===null||l===void 0||l.start():N(()=>{var c;(c=t.value)===null||c===void 0||c.start()})},error(){var l;e.value?(l=t.value)===null||l===void 0||l.error():N(()=>{var c;(c=t.value)===null||c===void 0||c.error()})},finish(){var l;e.value?(l=t.value)===null||l===void 0||l.finish():N(()=>{var c;(c=t.value)===null||c===void 0||c.finish()})}},{mergedClsPrefixRef:i}=F(o);return I(ze,n),I(Pe,{props:o,mergedClsPrefixRef:i}),Object.assign(n,{loadingBarRef:t})},render(){var o,e;return h(W,null,h(he,{disabled:this.to===!1,to:this.to||"body"},h(_o,{ref:"loadingBarRef",containerStyle:this.containerStyle,containerClass:this.containerClass})),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o))}});function To(){const o=z(ze,null);return o===null&&q("use-loading-bar","No outer <n-loading-bar-provider /> founded."),o}const Re={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},Ee=E("n-message-api"),Me=E("n-message-provider"),Ko=y([m("message-wrapper",`
|
|
49
|
+
margin: var(--n-margin);
|
|
50
|
+
z-index: 0;
|
|
51
|
+
transform-origin: top center;
|
|
52
|
+
display: flex;
|
|
53
|
+
`,[yo({overflow:"visible",originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.85)"}})]),m("message",`
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
transition:
|
|
58
|
+
color .3s var(--n-bezier),
|
|
59
|
+
box-shadow .3s var(--n-bezier),
|
|
60
|
+
background-color .3s var(--n-bezier),
|
|
61
|
+
opacity .3s var(--n-bezier),
|
|
62
|
+
transform .3s var(--n-bezier),
|
|
63
|
+
margin-bottom .3s var(--n-bezier);
|
|
64
|
+
padding: var(--n-padding);
|
|
65
|
+
border-radius: var(--n-border-radius);
|
|
66
|
+
flex-wrap: nowrap;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
max-width: var(--n-max-width);
|
|
69
|
+
color: var(--n-text-color);
|
|
70
|
+
background-color: var(--n-color);
|
|
71
|
+
box-shadow: var(--n-box-shadow);
|
|
72
|
+
`,[A("content",`
|
|
73
|
+
display: inline-block;
|
|
74
|
+
line-height: var(--n-line-height);
|
|
75
|
+
font-size: var(--n-font-size);
|
|
76
|
+
`),A("icon",`
|
|
77
|
+
position: relative;
|
|
78
|
+
margin: var(--n-icon-margin);
|
|
79
|
+
height: var(--n-icon-size);
|
|
80
|
+
width: var(--n-icon-size);
|
|
81
|
+
font-size: var(--n-icon-size);
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
`,[["default","info","success","warning","error","loading"].map(o=>b(`${o}-type`,[y("> *",`
|
|
84
|
+
color: var(--n-icon-color-${o});
|
|
85
|
+
transition: color .3s var(--n-bezier);
|
|
86
|
+
`)])),y("> *",`
|
|
87
|
+
position: absolute;
|
|
88
|
+
left: 0;
|
|
89
|
+
top: 0;
|
|
90
|
+
right: 0;
|
|
91
|
+
bottom: 0;
|
|
92
|
+
`,[no()])]),A("close",`
|
|
93
|
+
margin: var(--n-close-margin);
|
|
94
|
+
transition:
|
|
95
|
+
background-color .3s var(--n-bezier),
|
|
96
|
+
color .3s var(--n-bezier);
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
`,[y("&:hover",`
|
|
99
|
+
color: var(--n-close-icon-color-hover);
|
|
100
|
+
`),y("&:active",`
|
|
101
|
+
color: var(--n-close-icon-color-pressed);
|
|
102
|
+
`)])]),m("message-container",`
|
|
103
|
+
z-index: 6000;
|
|
104
|
+
position: fixed;
|
|
105
|
+
height: 0;
|
|
106
|
+
overflow: visible;
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
align-items: center;
|
|
110
|
+
`,[b("top",`
|
|
111
|
+
top: 12px;
|
|
112
|
+
left: 0;
|
|
113
|
+
right: 0;
|
|
114
|
+
`),b("top-left",`
|
|
115
|
+
top: 12px;
|
|
116
|
+
left: 12px;
|
|
117
|
+
right: 0;
|
|
118
|
+
align-items: flex-start;
|
|
119
|
+
`),b("top-right",`
|
|
120
|
+
top: 12px;
|
|
121
|
+
left: 0;
|
|
122
|
+
right: 12px;
|
|
123
|
+
align-items: flex-end;
|
|
124
|
+
`),b("bottom",`
|
|
125
|
+
bottom: 4px;
|
|
126
|
+
left: 0;
|
|
127
|
+
right: 0;
|
|
128
|
+
justify-content: flex-end;
|
|
129
|
+
`),b("bottom-left",`
|
|
130
|
+
bottom: 4px;
|
|
131
|
+
left: 12px;
|
|
132
|
+
right: 0;
|
|
133
|
+
justify-content: flex-end;
|
|
134
|
+
align-items: flex-start;
|
|
135
|
+
`),b("bottom-right",`
|
|
136
|
+
bottom: 4px;
|
|
137
|
+
left: 0;
|
|
138
|
+
right: 12px;
|
|
139
|
+
justify-content: flex-end;
|
|
140
|
+
align-items: flex-end;
|
|
141
|
+
`)])]),Wo={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(je,null),error:()=>h(Ae,null),default:()=>null},qo=$({name:"Message",props:Object.assign(Object.assign({},Re),{render:Function}),setup(o){const{inlineThemeDisabled:e,mergedRtlRef:t}=F(o),{props:n,mergedClsPrefixRef:i}=z(Me),l=Se("Message",t,i),c=T("Message","-message",Ko,Ro,n,i),d=_(()=>{const{type:a}=o,{common:{cubicBezierEaseInOut:s},self:{padding:u,margin:v,maxWidth:g,iconMargin:f,closeMargin:p,closeSize:x,iconSize:w,fontSize:O,lineHeight:L,borderRadius:S,iconColorInfo:C,iconColorSuccess:M,iconColorWarning:H,iconColorError:j,iconColorLoading:J,closeIconSize:Q,closeBorderRadius:ee,[R("textColor",a)]:oe,[R("boxShadow",a)]:ne,[R("color",a)]:te,[R("closeColorHover",a)]:ie,[R("closeColorPressed",a)]:re,[R("closeIconColor",a)]:se,[R("closeIconColorPressed",a)]:ae,[R("closeIconColorHover",a)]:le}}=c.value;return{"--n-bezier":s,"--n-margin":v,"--n-padding":u,"--n-max-width":g,"--n-font-size":O,"--n-icon-margin":f,"--n-icon-size":w,"--n-close-icon-size":Q,"--n-close-border-radius":ee,"--n-close-size":x,"--n-close-margin":p,"--n-text-color":oe,"--n-color":te,"--n-box-shadow":ne,"--n-icon-color-info":C,"--n-icon-color-success":M,"--n-icon-color-warning":H,"--n-icon-color-error":j,"--n-icon-color-loading":J,"--n-close-color-hover":ie,"--n-close-color-pressed":re,"--n-close-icon-color":se,"--n-close-icon-color-pressed":ae,"--n-close-icon-color-hover":le,"--n-line-height":L,"--n-border-radius":S}}),r=e?ue("message",_(()=>o.type[0]),d,{}):void 0;return{mergedClsPrefix:i,rtlEnabled:l,messageProviderProps:n,handleClose(){var a;(a=o.onClose)===null||a===void 0||a.call(o)},cssVars:e?void 0:d,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:l,themeClass:c,onRender:d,icon:r,handleClose:a,showIcon:s}=this;d==null||d();let u;return h("div",{class:[`${i}-message-wrapper`,c],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:[{alignItems:this.placement.startsWith("top")?"flex-start":"flex-end"},l]},o?o(this.$props):h("div",{class:[`${i}-message ${i}-message--${e}-type`,this.rtlEnabled&&`${i}-message--rtl`]},(u=Do(r,e,i))&&s?h("div",{class:`${i}-message__icon ${i}-message__icon--${e}-type`},h(to,null,{default:()=>u})):null,h("div",{class:`${i}-message__content`},B(n)),t?h($e,{clsPrefix:i,class:`${i}-message__close`,onClick:a,absolute:!0}):null))}});function Do(o,e,t){if(typeof o=="function")return o();{const n=e==="loading"?h(io,{clsPrefix:t,strokeWidth:24,scale:.85}):Wo[e]();return n?h(Oe,{clsPrefix:t,key:e},{default:()=>n}):null}}const Uo=$({name:"MessageEnvironment",props:Object.assign(Object.assign({},Re),{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=k(!0);ve(()=>{n()});function n(){const{duration:s}=o;s&&(e=window.setTimeout(c,s))}function i(s){s.currentTarget===s.target&&e!==null&&(window.clearTimeout(e),e=null)}function l(s){s.currentTarget===s.target&&n()}function c(){const{onHide:s}=o;t.value=!1,e&&(window.clearTimeout(e),e=null),s&&s()}function d(){const{onClose:s}=o;s&&s(),c()}function r(){const{onAfterLeave:s,onInternalAfterLeave:u,onAfterHide:v,internalKey:g}=o;s&&s(),u&&u(g),v&&v()}function a(){c()}return{show:t,hide:c,handleClose:d,handleAfterLeave:r,handleMouseleave:l,handleMouseenter:i,deactivate:a}},render(){return h(ro,{appear:!0,onAfterLeave:this.handleAfterLeave,onLeave:this.onLeave},{default:()=>[this.show?h(qo,{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]})}}),Vo=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]}),Xo=$({name:"MessageProvider",props:Vo,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n=k({}),i={create(r,a){return l(r,Object.assign({type:"default"},a))},info(r,a){return l(r,Object.assign(Object.assign({},a),{type:"info"}))},success(r,a){return l(r,Object.assign(Object.assign({},a),{type:"success"}))},warning(r,a){return l(r,Object.assign(Object.assign({},a),{type:"warning"}))},error(r,a){return l(r,Object.assign(Object.assign({},a),{type:"error"}))},loading(r,a){return l(r,Object.assign(Object.assign({},a),{type:"loading"}))},destroyAll:d};I(Me,{props:o,mergedClsPrefixRef:e}),I(Ee,i);function l(r,a){const s=X(),u=G(Object.assign(Object.assign({},a),{content:r,key:s,destroy:()=>{var g;(g=n.value[s])===null||g===void 0||g.hide()}})),{max:v}=o;return v&&t.value.length>=v&&t.value.shift(),t.value.push(u),u}function c(r){t.value.splice(t.value.findIndex(a=>a.key===r),1),delete n.value[r]}function d(){Object.values(n.value).forEach(r=>{r.hide()})}return Object.assign({mergedClsPrefix:e,messageRefs:n,messageList:t,handleAfterLeave:c},i)},render(){var o,e,t;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.messageList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h("div",{class:[`${this.mergedClsPrefix}-message-container`,`${this.mergedClsPrefix}-message-container--${this.placement}`,this.containerClass],key:"message-container",style:this.containerStyle},this.messageList.map(n=>h(Uo,Object.assign({ref:i=>{i&&(this.messageRefs[n.key]=i)},internalKey:n.key,onInternalAfterLeave:this.handleAfterLeave},Y(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 Go(){const o=z(Ee,null);return o===null&&q("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 Yo=$({name:"ModalEnvironment",props:Object.assign(Object.assign({},so),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const e=k(!0);function t(){const{onInternalAfterLeave:s,internalKey:u,onAfterLeave:v}=o;s&&s(u),v&&v()}function n(){const{onPositiveClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function i(){const{onNegativeClick:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function l(){const{onClose:s}=o;s?Promise.resolve(s()).then(u=>{u!==!1&&r()}):r()}function c(s){const{onMaskClick:u,maskClosable:v}=o;u&&(u(s),v&&r())}function d(){const{onEsc:s}=o;s&&s()}function r(){e.value=!1}function a(s){e.value=s}return{show:e,hide:r,handleUpdateShow:a,handleAfterLeave:t,handleCloseClick:l,handleNegativeClick:i,handlePositiveClick:n,handleMaskClick:c,handleEsc:d}},render(){const{handleUpdateShow:o,handleAfterLeave:e,handleMaskClick:t,handleEsc:n,show:i}=this;return h(Ce,Object.assign({},this.$props,{show:i,onUpdateShow:o,onMaskClick:t,onEsc:n,onAfterLeave:e,internalAppear:!0,internalModal:!0}))}}),be=E("n-modal-provider"),He=E("n-modal-api"),Zo=E("n-modal-reactive-list"),Jo={to:[String,Object]},Qo=$({name:"ModalProvider",props:Jo,setup(){const o=ce(64),e=de(),t=k([]),n={};function i(r={}){const a=X(),s=G(Object.assign(Object.assign({},r),{key:a,destroy:()=>{n[`n-modal-${a}`].hide()}}));return t.value.push(s),s}function l(r){const{value:a}=t;a.splice(a.findIndex(s=>s.key===r),1)}function c(){Object.values(n).forEach(r=>{r.hide()})}const d={create:i,destroyAll:c};return I(He,d),I(be,{clickedRef:ce(64),clickedPositionRef:de()}),I(Zo,t),I(be,{clickedRef:o,clickedPositionRef:e}),Object.assign(Object.assign({},d),{modalList:t,modalInstRefs:n,handleAfterLeave:l})},render(){var o,e;return h(W,null,[this.modalList.map(t=>{var n;return h(Yo,Y(t,["destroy","style"],{internalStyle:t.style,to:(n=t.to)!==null&&n!==void 0?n:this.to,ref:i=>{i===null?delete this.modalInstRefs[`n-modal-${t.key}`]:this.modalInstRefs[`n-modal-${t.key}`]=i},internalKey:t.key,onInternalAfterLeave:this.handleAfterLeave}))}),(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o)])}});function en(){const o=z(He,null);return o===null&&q("use-modal","No outer <n-modal-provider /> founded."),o}const Z=E("n-notification-provider"),on=$({name:"NotificationContainer",props:{scrollable:{type:Boolean,required:!0},placement:{type:String,required:!0}},setup(){const{mergedThemeRef:o,mergedClsPrefixRef:e,wipTransitionCountRef:t}=z(Z),n=k(null);return ao(()=>{var i,l;t.value>0?(i=n==null?void 0:n.value)===null||i===void 0||i.classList.add("transitioning"):(l=n==null?void 0:n.value)===null||l===void 0||l.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 h("div",{ref:"selfRef",class:[`${t}-notification-container`,e&&`${t}-notification-container--scrollable`,`${t}-notification-container--${i}`]},e?h(lo,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar,contentStyle:{overflow:"hidden"}},o):o)}}),nn={info:()=>h(Ie,null),success:()=>h(Le,null),warning:()=>h(je,null),error:()=>h(Ae,null),default:()=>null},ge={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},tn=co(ge),rn=$({name:"Notification",props:ge,setup(o){const{mergedClsPrefixRef:e,mergedThemeRef:t,props:n}=z(Z),{inlineThemeDisabled:i,mergedRtlRef:l}=F(),c=Se("Notification",l,e),d=_(()=>{const{type:a}=o,{self:{color:s,textColor:u,closeIconColor:v,closeIconColorHover:g,closeIconColorPressed:f,headerTextColor:p,descriptionTextColor:x,actionTextColor:w,borderRadius:O,headerFontWeight:L,boxShadow:S,lineHeight:C,fontSize:M,closeMargin:H,closeSize:j,width:J,padding:Q,closeIconSize:ee,closeBorderRadius:oe,closeColorHover:ne,closeColorPressed:te,titleFontSize:ie,metaFontSize:re,descriptionFontSize:se,[R("iconColor",a)]:ae},common:{cubicBezierEaseOut:le,cubicBezierEaseIn:_e,cubicBezierEaseInOut:Ne}}=t.value,{left:Fe,right:Te,top:Ke,bottom:We}=fo(Q);return{"--n-color":s,"--n-font-size":M,"--n-text-color":u,"--n-description-text-color":x,"--n-action-text-color":w,"--n-title-text-color":p,"--n-title-font-weight":L,"--n-bezier":Ne,"--n-bezier-ease-out":le,"--n-bezier-ease-in":_e,"--n-border-radius":O,"--n-box-shadow":S,"--n-close-border-radius":oe,"--n-close-color-hover":ne,"--n-close-color-pressed":te,"--n-close-icon-color":v,"--n-close-icon-color-hover":g,"--n-close-icon-color-pressed":f,"--n-line-height":C,"--n-icon-color":ae,"--n-close-margin":H,"--n-close-size":j,"--n-close-icon-size":ee,"--n-width":J,"--n-padding-left":Fe,"--n-padding-right":Te,"--n-padding-top":Ke,"--n-padding-bottom":We,"--n-title-font-size":ie,"--n-meta-font-size":re,"--n-description-font-size":se}}),r=i?ue("notification",_(()=>o.type[0]),d,n):void 0;return{mergedClsPrefix:e,showAvatar:_(()=>o.avatar||o.type!=="default"),handleCloseClick(){o.onClose()},rtlEnabled:c,cssVars:i?void 0:d,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),h("div",{class:[`${e}-notification-wrapper`,this.themeClass],onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave,style:this.cssVars},h("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?h("div",{class:`${e}-notification__avatar`},this.avatar?B(this.avatar):this.type!=="default"?h(Oe,{clsPrefix:e},{default:()=>nn[this.type]()}):null):null,this.closable?h($e,{clsPrefix:e,class:`${e}-notification__close`,onClick:this.handleCloseClick}):null,h("div",{ref:"bodyRef",class:`${e}-notification-main`},this.title?h("div",{class:`${e}-notification-main__header`},B(this.title)):null,this.description?h("div",{class:`${e}-notification-main__description`},B(this.description)):null,this.content?h("pre",{class:`${e}-notification-main__content`},B(this.content)):null,this.meta||this.action?h("div",{class:`${e}-notification-main-footer`},this.meta?h("div",{class:`${e}-notification-main-footer__meta`},B(this.meta)):null,this.action?h("div",{class:`${e}-notification-main-footer__action`},B(this.action)):null):null)))}}),sn=Object.assign(Object.assign({},ge),{duration:Number,onClose:Function,onLeave:Function,onAfterEnter:Function,onAfterLeave:Function,onHide:Function,onAfterShow:Function,onAfterHide:Function}),an=$({name:"NotificationEnvironment",props:Object.assign(Object.assign({},sn),{internalKey:{type:String,required:!0},onInternalAfterLeave:{type:Function,required:!0}}),setup(o){const{wipTransitionCountRef:e}=z(Z),t=k(!0);let n=null;function i(){t.value=!1,n&&window.clearTimeout(n)}function l(f){e.value++,N(()=>{f.style.height=`${f.offsetHeight}px`,f.style.maxHeight="0",f.style.transition="none",f.offsetHeight,f.style.transition="",f.style.maxHeight=f.style.height})}function c(f){e.value--,f.style.height="",f.style.maxHeight="";const{onAfterEnter:p,onAfterShow:x}=o;p&&p(),x&&x()}function d(f){e.value++,f.style.maxHeight=`${f.offsetHeight}px`,f.style.height=`${f.offsetHeight}px`,f.offsetHeight}function r(f){const{onHide:p}=o;p&&p(),f.style.maxHeight="0",f.offsetHeight}function a(){e.value--;const{onAfterLeave:f,onInternalAfterLeave:p,onAfterHide:x,internalKey:w}=o;f&&f(),p(w),x&&x()}function s(){const{duration:f}=o;f&&(n=window.setTimeout(i,f))}function u(f){f.currentTarget===f.target&&n!==null&&(window.clearTimeout(n),n=null)}function v(f){f.currentTarget===f.target&&s()}function g(){const{onClose:f}=o;f?Promise.resolve(f()).then(p=>{p!==!1&&i()}):i()}return ve(()=>{o.duration&&(n=window.setTimeout(i,o.duration))}),{show:t,hide:i,handleClose:g,handleAfterLeave:a,handleLeave:r,handleBeforeLeave:d,handleAfterEnter:c,handleBeforeEnter:l,handleMouseenter:u,handleMouseleave:v}},render(){return h(ke,{name:"notification-transition",appear:!0,onBeforeEnter:this.handleBeforeEnter,onAfterEnter:this.handleAfterEnter,onBeforeLeave:this.handleBeforeLeave,onLeave:this.handleLeave,onAfterLeave:this.handleAfterLeave},{default:()=>this.show?h(rn,Object.assign({},ye(this.$props,tn),{onClose:this.handleClose,onMouseenter:this.duration&&this.keepAliveOnHover?this.handleMouseenter:void 0,onMouseleave:this.duration&&this.keepAliveOnHover?this.handleMouseleave:void 0})):null})}}),ln=y([m("notification-container",`
|
|
142
|
+
z-index: 4000;
|
|
143
|
+
position: fixed;
|
|
144
|
+
overflow: visible;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
align-items: flex-end;
|
|
148
|
+
`,[y(">",[m("scrollbar",`
|
|
149
|
+
width: initial;
|
|
150
|
+
overflow: visible;
|
|
151
|
+
height: -moz-fit-content !important;
|
|
152
|
+
height: fit-content !important;
|
|
153
|
+
max-height: 100vh !important;
|
|
154
|
+
`,[y(">",[m("scrollbar-container",`
|
|
155
|
+
height: -moz-fit-content !important;
|
|
156
|
+
height: fit-content !important;
|
|
157
|
+
max-height: 100vh !important;
|
|
158
|
+
`,[m("scrollbar-content",`
|
|
159
|
+
padding-top: 12px;
|
|
160
|
+
padding-bottom: 33px;
|
|
161
|
+
`)])])])]),b("top, top-right, top-left",`
|
|
162
|
+
top: 12px;
|
|
163
|
+
`,[y("&.transitioning >",[m("scrollbar",[y(">",[m("scrollbar-container",`
|
|
164
|
+
min-height: 100vh !important;
|
|
165
|
+
`)])])])]),b("bottom, bottom-right, bottom-left",`
|
|
166
|
+
bottom: 12px;
|
|
167
|
+
`,[y(">",[m("scrollbar",[y(">",[m("scrollbar-container",[m("scrollbar-content",`
|
|
168
|
+
padding-bottom: 12px;
|
|
169
|
+
`)])])])]),m("notification-wrapper",`
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: flex-end;
|
|
172
|
+
margin-bottom: 0;
|
|
173
|
+
margin-top: 12px;
|
|
174
|
+
`)]),b("top, bottom",`
|
|
175
|
+
left: 50%;
|
|
176
|
+
transform: translateX(-50%);
|
|
177
|
+
`,[m("notification-wrapper",[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
|
|
178
|
+
transform: scale(0.85);
|
|
179
|
+
`),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
|
|
180
|
+
transform: scale(1);
|
|
181
|
+
`)])]),b("top",[m("notification-wrapper",`
|
|
182
|
+
transform-origin: top center;
|
|
183
|
+
`)]),b("bottom",[m("notification-wrapper",`
|
|
184
|
+
transform-origin: bottom center;
|
|
185
|
+
`)]),b("top-right, bottom-right",[m("notification",`
|
|
186
|
+
margin-left: 28px;
|
|
187
|
+
margin-right: 16px;
|
|
188
|
+
`)]),b("top-left, bottom-left",[m("notification",`
|
|
189
|
+
margin-left: 16px;
|
|
190
|
+
margin-right: 28px;
|
|
191
|
+
`)]),b("top-right",`
|
|
192
|
+
right: 0;
|
|
193
|
+
`,[V("top-right")]),b("top-left",`
|
|
194
|
+
left: 0;
|
|
195
|
+
`,[V("top-left")]),b("bottom-right",`
|
|
196
|
+
right: 0;
|
|
197
|
+
`,[V("bottom-right")]),b("bottom-left",`
|
|
198
|
+
left: 0;
|
|
199
|
+
`,[V("bottom-left")]),b("scrollable",[b("top-right",`
|
|
200
|
+
top: 0;
|
|
201
|
+
`),b("top-left",`
|
|
202
|
+
top: 0;
|
|
203
|
+
`),b("bottom-right",`
|
|
204
|
+
bottom: 0;
|
|
205
|
+
`),b("bottom-left",`
|
|
206
|
+
bottom: 0;
|
|
207
|
+
`)]),m("notification-wrapper",`
|
|
208
|
+
margin-bottom: 12px;
|
|
209
|
+
`,[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
|
|
210
|
+
opacity: 0;
|
|
211
|
+
margin-top: 0 !important;
|
|
212
|
+
margin-bottom: 0 !important;
|
|
213
|
+
`),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
|
|
214
|
+
opacity: 1;
|
|
215
|
+
`),y("&.notification-transition-leave-active",`
|
|
216
|
+
transition:
|
|
217
|
+
background-color .3s var(--n-bezier),
|
|
218
|
+
color .3s var(--n-bezier),
|
|
219
|
+
opacity .3s var(--n-bezier),
|
|
220
|
+
transform .3s var(--n-bezier-ease-in),
|
|
221
|
+
max-height .3s var(--n-bezier),
|
|
222
|
+
margin-top .3s linear,
|
|
223
|
+
margin-bottom .3s linear,
|
|
224
|
+
box-shadow .3s var(--n-bezier);
|
|
225
|
+
`),y("&.notification-transition-enter-active",`
|
|
226
|
+
transition:
|
|
227
|
+
background-color .3s var(--n-bezier),
|
|
228
|
+
color .3s var(--n-bezier),
|
|
229
|
+
opacity .3s var(--n-bezier),
|
|
230
|
+
transform .3s var(--n-bezier-ease-out),
|
|
231
|
+
max-height .3s var(--n-bezier),
|
|
232
|
+
margin-top .3s linear,
|
|
233
|
+
margin-bottom .3s linear,
|
|
234
|
+
box-shadow .3s var(--n-bezier);
|
|
235
|
+
`)]),m("notification",`
|
|
236
|
+
background-color: var(--n-color);
|
|
237
|
+
color: var(--n-text-color);
|
|
238
|
+
transition:
|
|
239
|
+
background-color .3s var(--n-bezier),
|
|
240
|
+
color .3s var(--n-bezier),
|
|
241
|
+
opacity .3s var(--n-bezier),
|
|
242
|
+
box-shadow .3s var(--n-bezier);
|
|
243
|
+
font-family: inherit;
|
|
244
|
+
font-size: var(--n-font-size);
|
|
245
|
+
font-weight: 400;
|
|
246
|
+
position: relative;
|
|
247
|
+
display: flex;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
flex-shrink: 0;
|
|
250
|
+
padding-left: var(--n-padding-left);
|
|
251
|
+
padding-right: var(--n-padding-right);
|
|
252
|
+
width: var(--n-width);
|
|
253
|
+
max-width: calc(100vw - 16px - 16px);
|
|
254
|
+
border-radius: var(--n-border-radius);
|
|
255
|
+
box-shadow: var(--n-box-shadow);
|
|
256
|
+
box-sizing: border-box;
|
|
257
|
+
opacity: 1;
|
|
258
|
+
`,[A("avatar",[m("icon",`
|
|
259
|
+
color: var(--n-icon-color);
|
|
260
|
+
`),m("base-icon",`
|
|
261
|
+
color: var(--n-icon-color);
|
|
262
|
+
`)]),b("show-avatar",[m("notification-main",`
|
|
263
|
+
margin-left: 40px;
|
|
264
|
+
width: calc(100% - 40px);
|
|
265
|
+
`)]),b("closable",[m("notification-main",[y("> *:first-child",`
|
|
266
|
+
padding-right: 20px;
|
|
267
|
+
`)]),A("close",`
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 0;
|
|
270
|
+
right: 0;
|
|
271
|
+
margin: var(--n-close-margin);
|
|
272
|
+
transition:
|
|
273
|
+
background-color .3s var(--n-bezier),
|
|
274
|
+
color .3s var(--n-bezier);
|
|
275
|
+
`)]),A("avatar",`
|
|
276
|
+
position: absolute;
|
|
277
|
+
top: var(--n-padding-top);
|
|
278
|
+
left: var(--n-padding-left);
|
|
279
|
+
width: 28px;
|
|
280
|
+
height: 28px;
|
|
281
|
+
font-size: 28px;
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
`,[m("icon","transition: color .3s var(--n-bezier);")]),m("notification-main",`
|
|
286
|
+
padding-top: var(--n-padding-top);
|
|
287
|
+
padding-bottom: var(--n-padding-bottom);
|
|
288
|
+
box-sizing: border-box;
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-direction: column;
|
|
291
|
+
margin-left: 8px;
|
|
292
|
+
width: calc(100% - 8px);
|
|
293
|
+
`,[m("notification-main-footer",`
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
justify-content: space-between;
|
|
297
|
+
margin-top: 12px;
|
|
298
|
+
`,[A("meta",`
|
|
299
|
+
font-size: var(--n-meta-font-size);
|
|
300
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
301
|
+
color: var(--n-description-text-color);
|
|
302
|
+
`),A("action",`
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
305
|
+
color: var(--n-action-text-color);
|
|
306
|
+
`)]),A("header",`
|
|
307
|
+
font-weight: var(--n-title-font-weight);
|
|
308
|
+
font-size: var(--n-title-font-size);
|
|
309
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
310
|
+
color: var(--n-title-text-color);
|
|
311
|
+
`),A("description",`
|
|
312
|
+
margin-top: 8px;
|
|
313
|
+
font-size: var(--n-description-font-size);
|
|
314
|
+
white-space: pre-wrap;
|
|
315
|
+
word-wrap: break-word;
|
|
316
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
317
|
+
color: var(--n-description-text-color);
|
|
318
|
+
`),A("content",`
|
|
319
|
+
line-height: var(--n-line-height);
|
|
320
|
+
margin: 12px 0 0 0;
|
|
321
|
+
font-family: inherit;
|
|
322
|
+
white-space: pre-wrap;
|
|
323
|
+
word-wrap: break-word;
|
|
324
|
+
transition: color .3s var(--n-bezier-ease-out);
|
|
325
|
+
color: var(--n-text-color);
|
|
326
|
+
`,[y("&:first-child","margin: 0;")])])])])]);function V(o){const t=o.split("-")[1]==="left"?"calc(-100%)":"calc(100%)";return m("notification-wrapper",[y("&.notification-transition-enter-from, &.notification-transition-leave-to",`
|
|
327
|
+
transform: translate(${t}, 0);
|
|
328
|
+
`),y("&.notification-transition-leave-from, &.notification-transition-enter-to",`
|
|
329
|
+
transform: translate(0, 0);
|
|
330
|
+
`)])}const Be=E("n-notification-api"),cn=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}),dn=$({name:"NotificationProvider",props:cn,setup(o){const{mergedClsPrefixRef:e}=F(o),t=k([]),n={},i=new Set;function l(g){const f=X(),p=()=>{i.add(f),n[f]&&n[f].hide()},x=G(Object.assign(Object.assign({},g),{key:f,destroy:p,hide:p,deactivate:p})),{max:w}=o;if(w&&t.value.length-i.size>=w){let O=!1,L=0;for(const S of t.value){if(!i.has(S.key)){n[S.key]&&(S.destroy(),O=!0);break}L++}O||t.value.splice(L,1)}return t.value.push(x),x}const c=["info","success","warning","error"].map(g=>f=>l(Object.assign(Object.assign({},f),{type:g})));function d(g){i.delete(g),t.value.splice(t.value.findIndex(f=>f.key===g),1)}const r=T("Notification","-notification",ln,jo,o,e),a={create:l,info:c[0],success:c[1],warning:c[2],error:c[3],open:u,destroyAll:v},s=k(0);I(Be,a),I(Z,{props:o,mergedClsPrefixRef:e,mergedThemeRef:r,wipTransitionCountRef:s});function u(g){return l(g)}function v(){Object.values(t.value).forEach(g=>{g.hide()})}return Object.assign({mergedClsPrefix:e,notificationList:t,notificationRefs:n,handleAfterLeave:d},a)},render(){var o,e,t;const{placement:n}=this;return h(W,null,(e=(o=this.$slots).default)===null||e===void 0?void 0:e.call(o),this.notificationList.length?h(he,{to:(t=this.to)!==null&&t!==void 0?t:"body"},h(on,{class:this.containerClass,style:this.containerStyle,scrollable:this.scrollable&&n!=="top"&&n!=="bottom",placement:n},{default:()=>this.notificationList.map(i=>h(an,Object.assign({ref:l=>{const c=i.key;l===null?delete this.notificationRefs[c]:this.notificationRefs[c]=l}},Y(i,["destroy","hide","deactivate"]),{internalKey:i.key,onInternalAfterLeave:this.handleAfterLeave,keepAliveOnHover:i.keepAliveOnHover===void 0?this.keepAliveOnHover:i.keepAliveOnHover})))})):null)}});function fn(){const o=z(Be,null);return o===null&&q("use-notification","No outer `n-notification-provider` found."),o}const un=$({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)}}}),hn={message:Go,notification:fn,loadingBar:To,dialog:$o,modal:en};function vn({providersAndProps:o,configProviderProps:e}){let n=uo(()=>h(vo,pe(e),{default:()=>o.map(({type:d,Provider:r,props:a})=>h(r,pe(a),{default:()=>h(un,{onSetup:()=>i[d]=hn[d]()})}))}));const i={app:n};let l;return ho&&(l=document.createElement("div"),document.body.appendChild(l),n.mount(l)),Object.assign({unmount:()=>{var d;if(n===null||l===null){go("discrete","unmount call no need because discrete app has been unmounted");return}n.unmount(),(d=l.parentNode)===null||d===void 0||d.removeChild(l),l=null,n=null}},i)}function gn(o,{configProviderProps:e,messageProviderProps:t,dialogProviderProps:n,notificationProviderProps:i,loadingBarProviderProps:l,modalProviderProps:c}={}){const d=[];return o.forEach(a=>{switch(a){case"message":d.push({type:a,Provider:Xo,props:t});break;case"notification":d.push({type:a,Provider:dn,props:i});break;case"dialog":d.push({type:a,Provider:So,props:n});break;case"loadingBar":d.push({type:a,Provider:Fo,props:l});break;case"modal":d.push({type:a,Provider:Qo,props:c})}}),vn({providersAndProps:d,configProviderProps:e})}const{message:xe,dialog:Ln,loadingBar:jn}=gn(["message","dialog","loadingBar"]),An=(...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},pn=o=>{const e={};return o.forEach((t,n)=>{e[n]=t}),e},K=async(o=0)=>new Promise(e=>{setTimeout(e,o)}),Pn=(()=>{let o;return async e=>{if(o!==e){o=e,K(1e4).then(()=>{o=void 0});try{await navigator.clipboard.writeText(e),xe.success("复制成功")}catch{xe.error("复制失败")}}}})(),zn=()=>{const o=window.innerHeight>window.innerWidth;ve(()=>{o&&me.classList.add("mobile")}),po(()=>{me.classList.remove("mobile")})},Rn=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 l=Math.floor(e/3600);if(l>=1)return`${l} 小时前`;const c=Math.floor(e/60);return c>=1?`${c} 分钟前`:"刚刚"},mn=o=>(...e)=>o()(...e),bn=mn(()=>{var o;return(o=window.__NetworkExtension__)==null?void 0:o.GM_xmlhttpRequest}),xn=()=>{var o;return!!((o=window.__NetworkExtension__)!=null&&o.GM_xmlhttpRequest)},yn=(o="")=>{const e=new Headers;return o.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(n){return n.startsWith(`
|
|
331
|
+
`)?n.substring(1):n}).forEach(function(n){var c;let i=n.split(":"),l=(c=i.shift())==null?void 0:c.trim();if(l){let d=i.join(":").trim();try{e.append(l,d)}catch{}}}),e},Cn=(o="")=>{try{return o===""&&location.href?location.href:o}catch{return o}},wn=async(o,e={},t={})=>{var a;const n=new Request(o,e).clone();if((a=n.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");const i=n.method.toUpperCase(),l=Cn(n.url),c=new Headers(n.headers);new Headers(e.headers).forEach((s,u)=>{c.set(u,s)});let d=!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,c.delete("content-type")):(d=!0,r=await n.blob())),new Promise((s,u)=>{var p;let v={method:i,url:l,headers:pn(c),data:r,binary:d,responseType:"blob",async onload(x){var L;let w;x.response instanceof Blob&&x.response.size==0||(w=(L=x.response)!=null?L:x.responseText),await K();const O=new Response(w,{status:x.status,statusText:x.statusText,headers:yn(x.responseHeaders)});Object.defineProperty(O,"url",{value:x.finalUrl}),s(O)},async onerror(){await K(),u(new TypeError("Network request onerror failed"))},async ontimeout(){await K(),u(new TypeError("Network request ontimeout failed"))},async onabort(){await K(),u(new DOMException("Aborted","AbortError"))},async onreadystatechange(x){var w;x.readyState===4&&((w=n.signal)==null||w.removeEventListener("abort",f))}};typeof t=="function"?v=t(v):v={...v,...t};const g=bn(v);function f(){g.abort()}(p=n.signal)==null||p.addEventListener("abort",f)})},kn=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"]),Sn=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:kn.has(o.origin)),$n=/^https:\/\/github\.com\/gkd-kit\/inspect\/files\/([0-9]+)\/file\.zip$/,On=/^https:\/\/github\.com\/gkd-kit\/inspect\/assets\/([0-9]+)\/([0-9a-z-]+)$/,En=(o,e)=>{e=e.toString();const{1:t}=e.match($n)||[],{1:n,2:i}=e.match(On)||[];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`)},Mn=async(o,e,t)=>{const n=new Request(o),i=new URL(n.url);if(Sn(i))return fetch(o,{...e,mode:"cors"});if(xn())return wn(o,e);if(t!=null&&t.proxy){const l=new URL("https://proxy-workers.lisonge.workers.dev/");l.searchParams.set("proxyUrl",i.href);const c=new Request(o,e);return fetch(l,{method:c.method,headers:c.headers,body:c.body})}else throw mo.networkErrorDlgVisible=!0,new Error("gm is not supported")};export{K as a,xn as b,Pn as c,Ln as d,Mn as e,yo as f,En as g,$n as h,On as i,Y as j,jn as l,xe as m,An as o,Rn as t,zn as u};
|
|
332
|
+
//# sourceMappingURL=fetch-n-BwJPZU.js.map
|