import{d as W,f as H,C as M,L as Fe,D as Be,ab as pe,k as _,U as T,aA as ve,T as A,aB as It,Z as U,V as L,X as Rt,aC as it,aD as At,a2 as at,aE as Et,aF as X,a3 as Y,aG as Ot,W as ke,$ as ae,ae as Le,aH as Bt,a5 as N,a1 as Me,aI as st,aJ as lt,ai as ut,aj as Ut,aK as Pt,aL as Ft,aM as Lt,aN as Mt,ag as Dt,aO as qe,aP as Ht,g as ct,aQ as jt,aR as De,aS as qt,aT as Vt,aU as ft,aV as He,aW as Nt,h as Wt,aX as Xt,aY as Yt,aZ as xe,a_ as Gt,a$ as Kt,b0 as Jt,E as Ue,G as Ve,b1 as Zt,b2 as dt,b3 as Qt,b4 as er,b5 as tr,ac as Ne,a4 as We,b6 as rr,b7 as nr,b8 as or,al as J,b9 as ir,ba as ar,an as me,bb as Se,aw as sr,at as lr,bc as ur,o as j,c as fe,a as ee,K as cr,b as fr,r as Ae,A as V,w as E,i as I,j as P,F as Xe,t as dr,m as _e,l as Z,v as Ye,_ as hr,au as pr,q as gr,n as vr,z as mr}from"./index-e497b666.js";import{m as br,n as yr}from"./TaskData-11f744cb.js";import{_ as _r}from"./DatePicker-02d3d64b.js";import{c as wr,d as xr}from"./VerifyTemplateMapData-c79050aa.js";import{_ as Tr,a as Cr}from"./Upload-e16a41ce.js";import{_ as kr}from"./Space-84278c21.js";import{_ as Sr}from"./Popconfirm-7119bd46.js";const Ge=W({name:"SlotMachineNumber",props:{clsPrefix:{type:String,required:!0},value:{type:[Number,String],required:!0},oldOriginalNumber:{type:Number,default:void 0},newOriginalNumber:{type:Number,default:void 0}},setup(t){const r=H(null),e=H(t.value),i=H(t.value),o=H("up"),n=H(!1),f=M(()=>n.value?`${t.clsPrefix}-base-slot-machine-current-number--${o.value}-scroll`:null),h=M(()=>n.value?`${t.clsPrefix}-base-slot-machine-old-number--${o.value}-scroll`:null);Fe(pe(t,"value"),(d,m)=>{e.value=m,i.value=d,Be(g)});function g(){const d=t.newOriginalNumber,m=t.oldOriginalNumber;m===void 0||d===void 0||(d>m?a("up"):m>d&&a("down"))}function a(d){o.value=d,n.value=!1,Be(()=>{var m;(m=r.value)===null||m===void 0||m.offsetWidth,n.value=!0})}return()=>{const{clsPrefix:d}=t;return _("span",{ref:r,class:`${d}-base-slot-machine-number`},e.value!==null?_("span",{class:[`${d}-base-slot-machine-old-number ${d}-base-slot-machine-old-number--top`,h.value]},e.value):null,_("span",{class:[`${d}-base-slot-machine-current-number`,f.value]},_("span",{ref:"numberWrapper",class:[`${d}-base-slot-machine-current-number__inner`,typeof t.value!="number"&&`${d}-base-slot-machine-current-number__inner--not-number`]},i.value)),e.value!==null?_("span",{class:[`${d}-base-slot-machine-old-number ${d}-base-slot-machine-old-number--bottom`,h.value]},e.value):null)}}}),{cubicBezierEaseOut:re}=ve;function zr({duration:t=".2s"}={}){return[T("&.fade-up-width-expand-transition-leave-active",{transition:` opacity ${t} ${re}, max-width ${t} ${re}, transform ${t} ${re} `}),T("&.fade-up-width-expand-transition-enter-active",{transition:` opacity ${t} ${re}, max-width ${t} ${re}, transform ${t} ${re} `}),T("&.fade-up-width-expand-transition-enter-to",{opacity:1,transform:"translateX(0) translateY(0)"}),T("&.fade-up-width-expand-transition-enter-from",{maxWidth:"0 !important",opacity:0,transform:"translateY(60%)"}),T("&.fade-up-width-expand-transition-leave-from",{opacity:1,transform:"translateY(0)"}),T("&.fade-up-width-expand-transition-leave-to",{maxWidth:"0 !important",opacity:0,transform:"translateY(60%)"})]}const $r=T([T("@keyframes n-base-slot-machine-fade-up-in",` from { transform: translateY(60%); opacity: 0; } to { transform: translateY(0); opacity: 1; } `),T("@keyframes n-base-slot-machine-fade-down-in",` from { transform: translateY(-60%); opacity: 0; } to { transform: translateY(0); opacity: 1; } `),T("@keyframes n-base-slot-machine-fade-up-out",` from { transform: translateY(0%); opacity: 1; } to { transform: translateY(-60%); opacity: 0; } `),T("@keyframes n-base-slot-machine-fade-down-out",` from { transform: translateY(0%); opacity: 1; } to { transform: translateY(60%); opacity: 0; } `),A("base-slot-machine",` overflow: hidden; white-space: nowrap; display: inline-block; height: 18px; line-height: 18px; `,[A("base-slot-machine-number",` display: inline-block; position: relative; height: 18px; width: .6em; max-width: .6em; `,[zr({duration:".2s"}),It({duration:".2s",delay:"0s"}),A("base-slot-machine-old-number",` display: inline-block; opacity: 0; position: absolute; left: 0; right: 0; `,[U("top",{transform:"translateY(-100%)"}),U("bottom",{transform:"translateY(100%)"}),U("down-scroll",{animation:"n-base-slot-machine-fade-down-out .2s cubic-bezier(0, 0, .2, 1)",animationIterationCount:1}),U("up-scroll",{animation:"n-base-slot-machine-fade-up-out .2s cubic-bezier(0, 0, .2, 1)",animationIterationCount:1})]),A("base-slot-machine-current-number",` display: inline-block; position: absolute; left: 0; top: 0; bottom: 0; right: 0; opacity: 1; transform: translateY(0); width: .6em; `,[U("down-scroll",{animation:"n-base-slot-machine-fade-down-in .2s cubic-bezier(0, 0, .2, 1)",animationIterationCount:1}),U("up-scroll",{animation:"n-base-slot-machine-fade-up-in .2s cubic-bezier(0, 0, .2, 1)",animationIterationCount:1}),L("inner",` display: inline-block; position: absolute; right: 0; top: 0; width: .6em; `,[U("not-number",` right: unset; left: 0; `)])])])])]),Ir=W({name:"BaseSlotMachine",props:{clsPrefix:{type:String,required:!0},value:{type:[Number,String],default:0},max:{type:Number,default:void 0},appeared:{type:Boolean,required:!0}},setup(t){Rt("-base-slot-machine",$r,pe(t,"clsPrefix"));const r=H(),e=H(),i=M(()=>{if(typeof t.value=="string")return[];if(t.value<1)return[0];const o=[];let n=t.value;for(t.max!==void 0&&(n=Math.min(t.max,n));n>=1;)o.push(n%10),n/=10,n=Math.floor(n);return o.reverse(),o});return Fe(pe(t,"value"),(o,n)=>{typeof o=="string"?(e.value=void 0,r.value=void 0):typeof n=="string"?(e.value=o,r.value=void 0):(e.value=o,r.value=n)}),()=>{const{value:o,clsPrefix:n}=t;return typeof o=="number"?_("span",{class:`${n}-base-slot-machine`},_(At,{name:"fade-up-width-expand-transition",tag:"span"},{default:()=>i.value.map((f,h)=>_(Ge,{clsPrefix:n,key:i.value.length-h-1,oldOriginalNumber:r.value,newOriginalNumber:e.value,value:f}))}),_(it,{key:"+",width:!0},{default:()=>t.max!==void 0&&t.max{const{lineHeight:r,borderRadius:e,fontWeightStrong:i,baseColor:o,dividerColor:n,actionColor:f,textColor1:h,textColor2:g,closeColorHover:a,closeColorPressed:d,closeIconColor:m,closeIconColorHover:w,closeIconColorPressed:k,infoColor:C,successColor:R,warningColor:x,errorColor:v,fontSize:p}=t;return Object.assign(Object.assign({},Et),{fontSize:p,lineHeight:r,titleFontWeight:i,borderRadius:e,border:`1px solid ${n}`,color:f,titleTextColor:h,iconColor:g,contentTextColor:g,closeBorderRadius:e,closeColorHover:a,closeColorPressed:d,closeIconColor:m,closeIconColorHover:w,closeIconColorPressed:k,borderInfo:`1px solid ${X(o,Y(C,{alpha:.25}))}`,colorInfo:X(o,Y(C,{alpha:.08})),titleTextColorInfo:h,iconColorInfo:C,contentTextColorInfo:g,closeColorHoverInfo:a,closeColorPressedInfo:d,closeIconColorInfo:m,closeIconColorHoverInfo:w,closeIconColorPressedInfo:k,borderSuccess:`1px solid ${X(o,Y(R,{alpha:.25}))}`,colorSuccess:X(o,Y(R,{alpha:.08})),titleTextColorSuccess:h,iconColorSuccess:R,contentTextColorSuccess:g,closeColorHoverSuccess:a,closeColorPressedSuccess:d,closeIconColorSuccess:m,closeIconColorHoverSuccess:w,closeIconColorPressedSuccess:k,borderWarning:`1px solid ${X(o,Y(x,{alpha:.33}))}`,colorWarning:X(o,Y(x,{alpha:.08})),titleTextColorWarning:h,iconColorWarning:x,contentTextColorWarning:g,closeColorHoverWarning:a,closeColorPressedWarning:d,closeIconColorWarning:m,closeIconColorHoverWarning:w,closeIconColorPressedWarning:k,borderError:`1px solid ${X(o,Y(v,{alpha:.25}))}`,colorError:X(o,Y(v,{alpha:.08})),titleTextColorError:h,iconColorError:v,contentTextColorError:g,closeColorHoverError:a,closeColorPressedError:d,closeIconColorError:m,closeIconColorHoverError:w,closeIconColorPressedError:k})},Ar={name:"Alert",common:at,self:Rr},Er=Ar,Or=A("alert",` line-height: var(--n-line-height); border-radius: var(--n-border-radius); position: relative; transition: background-color .3s var(--n-bezier); background-color: var(--n-color); text-align: start; word-break: break-word; `,[L("border",` border-radius: inherit; position: absolute; left: 0; right: 0; top: 0; bottom: 0; transition: border-color .3s var(--n-bezier); border: var(--n-border); pointer-events: none; `),U("closable",[A("alert-body",[L("title",` padding-right: 24px; `)])]),L("icon",{color:"var(--n-icon-color)"}),A("alert-body",{padding:"var(--n-padding)"},[L("title",{color:"var(--n-title-text-color)"}),L("content",{color:"var(--n-content-text-color)"})]),Ot({originalTransition:"transform .3s var(--n-bezier)",enterToProps:{transform:"scale(1)"},leaveToProps:{transform:"scale(0.9)"}}),L("icon",` position: absolute; left: 0; top: 0; align-items: center; justify-content: center; display: flex; width: var(--n-icon-size); height: var(--n-icon-size); font-size: var(--n-icon-size); margin: var(--n-icon-margin); `),L("close",` transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier); position: absolute; right: 0; top: 0; margin: var(--n-close-margin); `),U("show-icon",[A("alert-body",{paddingLeft:"calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))"})]),A("alert-body",` border-radius: var(--n-border-radius); transition: border-color .3s var(--n-bezier); `,[L("title",` transition: color .3s var(--n-bezier); font-size: 16px; line-height: 19px; font-weight: var(--n-title-font-weight); `,[T("& +",[L("content",{marginTop:"9px"})])]),L("content",{transition:"color .3s var(--n-bezier)",fontSize:"var(--n-font-size)"})]),L("icon",{transition:"color .3s var(--n-bezier)"})]),Br=Object.assign(Object.assign({},ae.props),{title:String,showIcon:{type:Boolean,default:!0},type:{type:String,default:"default"},bordered:{type:Boolean,default:!0},closable:Boolean,onClose:Function,onAfterLeave:Function,onAfterHide:Function}),Oo=W({name:"Alert",inheritAttrs:!1,props:Br,setup(t){const{mergedClsPrefixRef:r,mergedBorderedRef:e,inlineThemeDisabled:i,mergedRtlRef:o}=ke(t),n=ae("Alert","-alert",Or,Er,t,r),f=Le("Alert",o,r),h=M(()=>{const{common:{cubicBezierEaseInOut:k},self:C}=n.value,{fontSize:R,borderRadius:x,titleFontWeight:v,lineHeight:p,iconSize:l,iconMargin:s,iconMarginRtl:u,closeIconSize:c,closeBorderRadius:b,closeSize:S,closeMargin:z,closeMarginRtl:D,padding:F}=C,{type:q}=t,{left:K,right:se}=Bt(s);return{"--n-bezier":k,"--n-color":C[N("color",q)],"--n-close-icon-size":c,"--n-close-border-radius":b,"--n-close-color-hover":C[N("closeColorHover",q)],"--n-close-color-pressed":C[N("closeColorPressed",q)],"--n-close-icon-color":C[N("closeIconColor",q)],"--n-close-icon-color-hover":C[N("closeIconColorHover",q)],"--n-close-icon-color-pressed":C[N("closeIconColorPressed",q)],"--n-icon-color":C[N("iconColor",q)],"--n-border":C[N("border",q)],"--n-title-text-color":C[N("titleTextColor",q)],"--n-content-text-color":C[N("contentTextColor",q)],"--n-line-height":p,"--n-border-radius":x,"--n-font-size":R,"--n-title-font-weight":v,"--n-icon-size":l,"--n-icon-margin":s,"--n-icon-margin-rtl":u,"--n-close-size":S,"--n-close-margin":z,"--n-close-margin-rtl":D,"--n-padding":F,"--n-icon-margin-left":K,"--n-icon-margin-right":se}}),g=i?Me("alert",M(()=>t.type[0]),h,t):void 0,a=H(!0),d=()=>{const{onAfterLeave:k,onAfterHide:C}=t;k&&k(),C&&C()};return{rtlEnabled:f,mergedClsPrefix:r,mergedBordered:e,visible:a,handleCloseClick:()=>{var k;Promise.resolve((k=t.onClose)===null||k===void 0?void 0:k.call(t)).then(C=>{C!==!1&&(a.value=!1)})},handleAfterLeave:()=>{d()},mergedTheme:n,cssVars:i?void 0:h,themeClass:g==null?void 0:g.themeClass,onRender:g==null?void 0:g.onRender}},render(){var t;return(t=this.onRender)===null||t===void 0||t.call(this),_(it,{onAfterLeave:this.handleAfterLeave},{default:()=>{const{mergedClsPrefix:r,$slots:e}=this,i={class:[`${r}-alert`,this.themeClass,this.closable&&`${r}-alert--closable`,this.showIcon&&`${r}-alert--show-icon`,this.rtlEnabled&&`${r}-alert--rtl`],style:this.cssVars,role:"alert"};return this.visible?_("div",Object.assign({},st(this.$attrs,i)),this.closable&&_(lt,{clsPrefix:r,class:`${r}-alert__close`,onClick:this.handleCloseClick}),this.bordered&&_("div",{class:`${r}-alert__border`}),this.showIcon&&_("div",{class:`${r}-alert__icon`,"aria-hidden":"true"},ut(e.icon,()=>[_(Ut,{clsPrefix:r},{default:()=>{switch(this.type){case"success":return _(Mt,null);case"info":return _(Lt,null);case"warning":return _(Ft,null);case"error":return _(Pt,null);default:return null}}})])),_("div",{class:[`${r}-alert-body`,this.mergedBordered&&`${r}-alert-body--bordered`]},Dt(e.header,o=>{const n=o||this.title;return n?_("div",{class:`${r}-alert-body__title`},n):null}),e.default&&_("div",{class:`${r}-alert-body__content`},e))):null}})}}),Ur=t=>{const{errorColor:r,infoColor:e,successColor:i,warningColor:o,fontFamily:n}=t;return{color:r,colorInfo:e,colorSuccess:i,colorError:r,colorWarning:o,fontSize:"12px",fontFamily:n}},Pr={name:"Badge",common:at,self:Ur},Fr=Pr,Lr=T([T("@keyframes badge-wave-spread",{from:{boxShadow:"0 0 0.5px 0px var(--n-ripple-color)",opacity:.6},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)",opacity:0}}),A("badge",` display: inline-flex; position: relative; vertical-align: middle; color: var(--n-color); font-family: var(--n-font-family); `,[U("as-is",[A("badge-sup",{position:"static",transform:"translateX(0)"},[qe({transformOrigin:"left bottom",originalTransform:"translateX(0)"})])]),U("dot",[A("badge-sup",` height: 8px; width: 8px; padding: 0; min-width: 8px; left: 100%; bottom: calc(100% - 4px); `,[T("::before","border-radius: 4px;")])]),A("badge-sup",` background: var(--n-color); transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); color: #FFF; position: absolute; height: 18px; line-height: 18px; border-radius: 9px; padding: 0 6px; text-align: center; font-size: var(--n-font-size); transform: translateX(-50%); left: 100%; bottom: calc(100% - 9px); font-variant-numeric: tabular-nums; z-index: 1; display: flex; align-items: center; `,[qe({transformOrigin:"left bottom",originalTransform:"translateX(-50%)"}),A("base-wave",{zIndex:1,animationDuration:"2s",animationIterationCount:"infinite",animationDelay:"1s",animationTimingFunction:"var(--n-ripple-bezier)",animationName:"badge-wave-spread"}),T("&::before",` opacity: 0; transform: scale(1); border-radius: 9px; content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; `)])])]),Mr=Object.assign(Object.assign({},ae.props),{value:[String,Number],max:Number,dot:Boolean,type:{type:String,default:"default"},show:{type:Boolean,default:!0},showZero:Boolean,processing:Boolean,color:String,offset:Array}),Bo=W({name:"Badge",props:Mr,setup(t,{slots:r}){const{mergedClsPrefixRef:e,inlineThemeDisabled:i,mergedRtlRef:o}=ke(t),n=ae("Badge","-badge",Lr,Fr,t,e),f=H(!1),h=()=>{f.value=!0},g=()=>{f.value=!1},a=M(()=>t.show&&(t.dot||t.value!==void 0&&!(!t.showZero&&Number(t.value)<=0)||!Ht(r.value)));ct(()=>{a.value&&(f.value=!0)});const d=Le("Badge",o,e),m=M(()=>{const{type:C,color:R}=t,{common:{cubicBezierEaseInOut:x,cubicBezierEaseOut:v},self:{[N("color",C)]:p,fontFamily:l,fontSize:s}}=n.value;return{"--n-font-size":s,"--n-font-family":l,"--n-color":R||p,"--n-ripple-color":R||p,"--n-bezier":x,"--n-ripple-bezier":v}}),w=i?Me("badge",M(()=>{let C="";const{type:R,color:x}=t;return R&&(C+=R[0]),x&&(C+=jt(x)),C}),m,t):void 0,k=M(()=>{const{offset:C}=t;if(!C)return;const[R,x]=C,v=typeof R=="number"?`${R}px`:R,p=typeof x=="number"?`${x}px`:x;return{transform:`translate(calc(${d!=null&&d.value?"50%":"-50%"} + ${v}), ${p})`}});return{rtlEnabled:d,mergedClsPrefix:e,appeared:f,showBadge:a,handleAfterEnter:h,handleAfterLeave:g,cssVars:i?void 0:m,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender,offsetStyle:k}},render(){var t;const{mergedClsPrefix:r,onRender:e,themeClass:i,$slots:o}=this;e==null||e();const n=(t=o.default)===null||t===void 0?void 0:t.call(o);return _("div",{class:[`${r}-badge`,this.rtlEnabled&&`${r}-badge--rtl`,i,{[`${r}-badge--dot`]:this.dot,[`${r}-badge--as-is`]:!n}],style:this.cssVars},n,_(De,{name:"fade-in-scale-up-transition",onAfterEnter:this.handleAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>this.showBadge?_("sup",{class:`${r}-badge-sup`,title:qt(this.value),style:this.offsetStyle},ut(o.value,()=>[this.dot?null:_(Ir,{clsPrefix:r,appeared:this.appeared,max:this.max,value:this.value})]),this.processing?_(Vt,{clsPrefix:r}):null):null}))}}),Dr=W({name:"NDrawerContent",inheritAttrs:!1,props:{blockScroll:Boolean,show:{type:Boolean,default:void 0},displayDirective:{type:String,required:!0},placement:{type:String,required:!0},contentStyle:[Object,String],nativeScrollbar:{type:Boolean,required:!0},scrollbarProps:Object,trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},showMask:{type:[Boolean,String],required:!0},resizable:Boolean,onClickoutside:Function,onAfterLeave:Function,onAfterEnter:Function,onEsc:Function},setup(t){const r=H(!!t.show),e=H(null),i=ft(He);let o=0,n="",f=null;const h=H(!1),g=H(!1),a=M(()=>t.placement==="top"||t.placement==="bottom"),{mergedClsPrefixRef:d,mergedRtlRef:m}=ke(t),w=Le("Drawer",m,d),k=b=>{g.value=!0,o=a.value?b.clientY:b.clientX,n=document.body.style.cursor,document.body.style.cursor=a.value?"ns-resize":"ew-resize",document.body.addEventListener("mousemove",p),document.body.addEventListener("mouseleave",s),document.body.addEventListener("mouseup",l)},C=()=>{f!==null&&(window.clearTimeout(f),f=null),g.value?h.value=!0:f=window.setTimeout(()=>{h.value=!0},300)},R=()=>{f!==null&&(window.clearTimeout(f),f=null),h.value=!1},{doUpdateHeight:x,doUpdateWidth:v}=i,p=b=>{var S,z;if(g.value)if(a.value){let D=((S=e.value)===null||S===void 0?void 0:S.offsetHeight)||0;const F=o-b.clientY;D+=t.placement==="bottom"?F:-F,x(D),o=b.clientY}else{let D=((z=e.value)===null||z===void 0?void 0:z.offsetWidth)||0;const F=o-b.clientX;D+=t.placement==="right"?F:-F,v(D),o=b.clientX}},l=()=>{g.value&&(o=0,g.value=!1,document.body.style.cursor=n,document.body.removeEventListener("mousemove",p),document.body.removeEventListener("mouseup",l),document.body.removeEventListener("mouseleave",s))},s=l;Nt(()=>{t.show&&(r.value=!0)}),Fe(()=>t.show,b=>{b||l()}),Wt(()=>{l()});const u=M(()=>{const{show:b}=t,S=[[Ve,b]];return t.showMask||S.push([Xt,t.onClickoutside,void 0,{capture:!0}]),S});function c(){var b;r.value=!1,(b=t.onAfterLeave)===null||b===void 0||b.call(t)}return Yt(M(()=>t.blockScroll&&r.value)),xe(Gt,e),xe(Kt,null),xe(Jt,null),{bodyRef:e,rtlEnabled:w,mergedClsPrefix:i.mergedClsPrefixRef,isMounted:i.isMountedRef,mergedTheme:i.mergedThemeRef,displayed:r,transitionName:M(()=>({right:"slide-in-from-right-transition",left:"slide-in-from-left-transition",top:"slide-in-from-top-transition",bottom:"slide-in-from-bottom-transition"})[t.placement]),handleAfterLeave:c,bodyDirectives:u,handleMousedownResizeTrigger:k,handleMouseenterResizeTrigger:C,handleMouseleaveResizeTrigger:R,isDragging:g,isHoverOnResizeTrigger:h}},render(){const{$slots:t,mergedClsPrefix:r}=this;return this.displayDirective==="show"||this.displayed||this.show?Ue(_("div",{role:"none"},_(Zt,{disabled:!this.showMask||!this.trapFocus,active:this.show,autoFocus:this.autoFocus,onEsc:this.onEsc},{default:()=>_(De,{name:this.transitionName,appear:this.isMounted,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>Ue(_("div",st(this.$attrs,{role:"dialog",ref:"bodyRef","aria-modal":"true",class:[`${r}-drawer`,this.rtlEnabled&&`${r}-drawer--rtl`,`${r}-drawer--${this.placement}-placement`,this.isDragging&&`${r}-drawer--unselectable`,this.nativeScrollbar&&`${r}-drawer--native-scrollbar`]}),[this.resizable?_("div",{class:[`${r}-drawer__resize-trigger`,(this.isDragging||this.isHoverOnResizeTrigger)&&`${r}-drawer__resize-trigger--hover`],onMouseenter:this.handleMouseenterResizeTrigger,onMouseleave:this.handleMouseleaveResizeTrigger,onMousedown:this.handleMousedownResizeTrigger}):null,this.nativeScrollbar?_("div",{class:`${r}-drawer-content-wrapper`,style:this.contentStyle,role:"none"},t):_(dt,Object.assign({},this.scrollbarProps,{contentStyle:this.contentStyle,contentClass:`${r}-drawer-content-wrapper`,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar}),t)]),this.bodyDirectives)})})),[[Ve,this.displayDirective==="if"||this.displayed||this.show]]):null}}),{cubicBezierEaseIn:Hr,cubicBezierEaseOut:jr}=ve;function qr({duration:t="0.3s",leaveDuration:r="0.2s",name:e="slide-in-from-right"}={}){return[T(`&.${e}-transition-leave-active`,{transition:`transform ${r} ${Hr}`}),T(`&.${e}-transition-enter-active`,{transition:`transform ${t} ${jr}`}),T(`&.${e}-transition-enter-to`,{transform:"translateX(0)"}),T(`&.${e}-transition-enter-from`,{transform:"translateX(100%)"}),T(`&.${e}-transition-leave-from`,{transform:"translateX(0)"}),T(`&.${e}-transition-leave-to`,{transform:"translateX(100%)"})]}const{cubicBezierEaseIn:Vr,cubicBezierEaseOut:Nr}=ve;function Wr({duration:t="0.3s",leaveDuration:r="0.2s",name:e="slide-in-from-left"}={}){return[T(`&.${e}-transition-leave-active`,{transition:`transform ${r} ${Vr}`}),T(`&.${e}-transition-enter-active`,{transition:`transform ${t} ${Nr}`}),T(`&.${e}-transition-enter-to`,{transform:"translateX(0)"}),T(`&.${e}-transition-enter-from`,{transform:"translateX(-100%)"}),T(`&.${e}-transition-leave-from`,{transform:"translateX(0)"}),T(`&.${e}-transition-leave-to`,{transform:"translateX(-100%)"})]}const{cubicBezierEaseIn:Xr,cubicBezierEaseOut:Yr}=ve;function Gr({duration:t="0.3s",leaveDuration:r="0.2s",name:e="slide-in-from-top"}={}){return[T(`&.${e}-transition-leave-active`,{transition:`transform ${r} ${Xr}`}),T(`&.${e}-transition-enter-active`,{transition:`transform ${t} ${Yr}`}),T(`&.${e}-transition-enter-to`,{transform:"translateY(0)"}),T(`&.${e}-transition-enter-from`,{transform:"translateY(-100%)"}),T(`&.${e}-transition-leave-from`,{transform:"translateY(0)"}),T(`&.${e}-transition-leave-to`,{transform:"translateY(-100%)"})]}const{cubicBezierEaseIn:Kr,cubicBezierEaseOut:Jr}=ve;function Zr({duration:t="0.3s",leaveDuration:r="0.2s",name:e="slide-in-from-bottom"}={}){return[T(`&.${e}-transition-leave-active`,{transition:`transform ${r} ${Kr}`}),T(`&.${e}-transition-enter-active`,{transition:`transform ${t} ${Jr}`}),T(`&.${e}-transition-enter-to`,{transform:"translateY(0)"}),T(`&.${e}-transition-enter-from`,{transform:"translateY(100%)"}),T(`&.${e}-transition-leave-from`,{transform:"translateY(0)"}),T(`&.${e}-transition-leave-to`,{transform:"translateY(100%)"})]}const Qr=T([A("drawer",` word-break: break-word; line-height: var(--n-line-height); position: absolute; pointer-events: all; box-shadow: var(--n-box-shadow); transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); background-color: var(--n-color); color: var(--n-text-color); box-sizing: border-box; `,[qr(),Wr(),Gr(),Zr(),U("unselectable",` user-select: none; -webkit-user-select: none; `),U("native-scrollbar",[A("drawer-content-wrapper",` overflow: auto; height: 100%; `)]),L("resize-trigger",` position: absolute; background-color: #0000; transition: background-color .3s var(--n-bezier); `,[U("hover",` background-color: var(--n-resize-trigger-color-hover); `)]),A("drawer-content-wrapper",` box-sizing: border-box; `),A("drawer-content",` height: 100%; display: flex; flex-direction: column; `,[U("native-scrollbar",[A("drawer-body-content-wrapper",` height: 100%; overflow: auto; `)]),A("drawer-body",` flex: 1 0 0; overflow: hidden; `),A("drawer-body-content-wrapper",` box-sizing: border-box; padding: var(--n-body-padding); `),A("drawer-header",` font-weight: var(--n-title-font-weight); line-height: 1; font-size: var(--n-title-font-size); color: var(--n-title-text-color); padding: var(--n-header-padding); transition: border .3s var(--n-bezier); border-bottom: 1px solid var(--n-divider-color); border-bottom: var(--n-header-border-bottom); display: flex; justify-content: space-between; align-items: center; `,[L("close",` margin-left: 6px; transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); `)]),A("drawer-footer",` display: flex; justify-content: flex-end; border-top: var(--n-footer-border-top); transition: border .3s var(--n-bezier); padding: var(--n-footer-padding); `)]),U("right-placement",` top: 0; bottom: 0; right: 0; `,[L("resize-trigger",` width: 3px; height: 100%; top: 0; left: 0; transform: translateX(-1.5px); cursor: ew-resize; `)]),U("left-placement",` top: 0; bottom: 0; left: 0; `,[L("resize-trigger",` width: 3px; height: 100%; top: 0; right: 0; transform: translateX(1.5px); cursor: ew-resize; `)]),U("top-placement",` top: 0; left: 0; right: 0; `,[L("resize-trigger",` width: 100%; height: 3px; bottom: 0; left: 0; transform: translateY(1.5px); cursor: ns-resize; `)]),U("bottom-placement",` left: 0; bottom: 0; right: 0; `,[L("resize-trigger",` width: 100%; height: 3px; top: 0; left: 0; transform: translateY(-1.5px); cursor: ns-resize; `)])]),T("body",[T(">",[A("drawer-container",{position:"fixed"})])]),A("drawer-container",` position: relative; position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; `,[T("> *",{pointerEvents:"all"})]),A("drawer-mask",` background-color: rgba(0, 0, 0, .3); position: absolute; left: 0; right: 0; top: 0; bottom: 0; `,[U("invisible",` background-color: rgba(0, 0, 0, 0) `),Qt({enterDuration:"0.2s",leaveDuration:"0.2s",enterCubicBezier:"var(--n-bezier-in)",leaveCubicBezier:"var(--n-bezier-out)"})])]),en=Object.assign(Object.assign({},ae.props),{show:Boolean,width:[Number,String],height:[Number,String],placement:{type:String,default:"right"},maskClosable:{type:Boolean,default:!0},showMask:{type:[Boolean,String],default:!0},to:[String,Object],displayDirective:{type:String,default:"if"},nativeScrollbar:{type:Boolean,default:!0},zIndex:Number,onMaskClick:Function,scrollbarProps:Object,contentStyle:[Object,String],trapFocus:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0},resizable:Boolean,defaultWidth:{type:[Number,String],default:251},defaultHeight:{type:[Number,String],default:251},onUpdateWidth:[Function,Array],onUpdateHeight:[Function,Array],"onUpdate:width":[Function,Array],"onUpdate:height":[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,drawerStyle:[String,Object],drawerClass:String,target:null,onShow:Function,onHide:Function}),Uo=W({name:"Drawer",inheritAttrs:!1,props:en,setup(t){const{mergedClsPrefixRef:r,namespaceRef:e,inlineThemeDisabled:i}=ke(t),o=er(),n=ae("Drawer","-drawer",Qr,tr,t,r),f=H(t.defaultWidth),h=H(t.defaultHeight),g=Ne(pe(t,"width"),f),a=Ne(pe(t,"height"),h),d=M(()=>{const{placement:u}=t;return u==="top"||u==="bottom"?"":We(g.value)}),m=M(()=>{const{placement:u}=t;return u==="left"||u==="right"?"":We(a.value)}),w=u=>{const{onUpdateWidth:c,"onUpdate:width":b}=t;c&&J(c,u),b&&J(b,u),f.value=u},k=u=>{const{onUpdateHeight:c,"onUpdate:width":b}=t;c&&J(c,u),b&&J(b,u),h.value=u},C=M(()=>[{width:d.value,height:m.value},t.drawerStyle||""]);function R(u){const{onMaskClick:c,maskClosable:b}=t;b&&p(!1),c&&c(u)}const x=rr();function v(u){var c;(c=t.onEsc)===null||c===void 0||c.call(t),t.show&&t.closeOnEsc&&ir(u)&&!x.value&&p(!1)}function p(u){const{onHide:c,onUpdateShow:b,"onUpdate:show":S}=t;b&&J(b,u),S&&J(S,u),c&&!u&&J(c,u)}xe(He,{isMountedRef:o,mergedThemeRef:n,mergedClsPrefixRef:r,doUpdateShow:p,doUpdateHeight:k,doUpdateWidth:w});const l=M(()=>{const{common:{cubicBezierEaseInOut:u,cubicBezierEaseIn:c,cubicBezierEaseOut:b},self:{color:S,textColor:z,boxShadow:D,lineHeight:F,headerPadding:q,footerPadding:K,bodyPadding:se,titleFontSize:$e,titleTextColor:ye,titleFontWeight:Ie,headerBorderBottom:Re,footerBorderTop:y,closeIconColor:te,closeIconColorHover:$,closeIconColorPressed:xt,closeColorHover:Tt,closeColorPressed:Ct,closeIconSize:kt,closeSize:St,closeBorderRadius:zt,resizableTriggerColorHover:$t}}=n.value;return{"--n-line-height":F,"--n-color":S,"--n-text-color":z,"--n-box-shadow":D,"--n-bezier":u,"--n-bezier-out":b,"--n-bezier-in":c,"--n-header-padding":q,"--n-body-padding":se,"--n-footer-padding":K,"--n-title-text-color":ye,"--n-title-font-size":$e,"--n-title-font-weight":Ie,"--n-header-border-bottom":Re,"--n-footer-border-top":y,"--n-close-icon-color":te,"--n-close-icon-color-hover":$,"--n-close-icon-color-pressed":xt,"--n-close-size":St,"--n-close-color-hover":Tt,"--n-close-color-pressed":Ct,"--n-close-icon-size":kt,"--n-close-border-radius":zt,"--n-resize-trigger-color-hover":$t}}),s=i?Me("drawer",void 0,l,t):void 0;return{mergedClsPrefix:r,namespace:e,mergedBodyStyle:C,handleMaskClick:R,handleEsc:v,mergedTheme:n,cssVars:i?void 0:l,themeClass:s==null?void 0:s.themeClass,onRender:s==null?void 0:s.onRender,isMounted:o}},render(){const{mergedClsPrefix:t}=this;return _(or,{to:this.to,show:this.show},{default:()=>{var r;return(r=this.onRender)===null||r===void 0||r.call(this),Ue(_("div",{class:[`${t}-drawer-container`,this.namespace,this.themeClass],style:this.cssVars,role:"none"},this.showMask?_(De,{name:"fade-in-transition",appear:this.isMounted},{default:()=>this.show?_("div",{"aria-hidden":!0,class:[`${t}-drawer-mask`,this.showMask==="transparent"&&`${t}-drawer-mask--invisible`],onClick:this.handleMaskClick}):null}):null,_(Dr,Object.assign({},this.$attrs,{class:[this.drawerClass,this.$attrs.class],style:[this.mergedBodyStyle,this.$attrs.style],blockScroll:this.blockScroll,contentStyle:this.contentStyle,placement:this.placement,scrollbarProps:this.scrollbarProps,show:this.show,displayDirective:this.displayDirective,nativeScrollbar:this.nativeScrollbar,onAfterEnter:this.onAfterEnter,onAfterLeave:this.onAfterLeave,trapFocus:this.trapFocus,autoFocus:this.autoFocus,resizable:this.resizable,showMask:this.showMask,onEsc:this.handleEsc,onClickoutside:this.handleMaskClick}),this.$slots)),[[nr,{zIndex:this.zIndex,enabled:this.show}]])}})}}),tn={title:{type:String},headerStyle:[Object,String],footerStyle:[Object,String],bodyStyle:[Object,String],bodyContentStyle:[Object,String],nativeScrollbar:{type:Boolean,default:!0},scrollbarProps:Object,closable:Boolean},Po=W({name:"DrawerContent",props:tn,setup(){const t=ft(He,null);t||ar("drawer-content","`n-drawer-content` must be placed inside `n-drawer`.");const{doUpdateShow:r}=t;function e(){r(!1)}return{handleCloseClick:e,mergedTheme:t.mergedThemeRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){const{title:t,mergedClsPrefix:r,nativeScrollbar:e,mergedTheme:i,bodyStyle:o,bodyContentStyle:n,headerStyle:f,footerStyle:h,scrollbarProps:g,closable:a,$slots:d}=this;return _("div",{role:"none",class:[`${r}-drawer-content`,e&&`${r}-drawer-content--native-scrollbar`]},d.header||t||a?_("div",{class:`${r}-drawer-header`,style:f,role:"none"},_("div",{class:`${r}-drawer-header__main`,role:"heading","aria-level":"1"},d.header!==void 0?d.header():t),a&&_(lt,{onClick:this.handleCloseClick,clsPrefix:r,class:`${r}-drawer-header__close`,absolute:!0})):null,e?_("div",{class:`${r}-drawer-body`,style:o,role:"none"},_("div",{class:`${r}-drawer-body-content-wrapper`,style:n,role:"none"},d)):_(dt,Object.assign({themeOverrides:i.peerOverrides.Scrollbar,theme:i.peers.Scrollbar},g,{class:`${r}-drawer-body`,contentClass:`${r}-drawer-body-content-wrapper`,contentStyle:n}),d),d.footer?_("div",{class:`${r}-drawer-footer`,style:h,role:"none"},d.footer()):null)}}),Fo=t=>me.request({method:"POST",url:"/GenerateReport/Generate_scheme",data:t,baseURL:Se}),Lo=t=>me.request({method:"POST",url:"/GenerateReport/Generate_report",data:t,baseURL:Se}),Mo=t=>me.request({method:"POST",url:"/GenerateReport/Generate_inspect",data:t,baseURL:Se}),Do=t=>me.request({method:"POST",url:"/GenerateReport/Generate_key",data:t,timeout:5e3,baseURL:Se}),Ho=t=>me.request({method:"POST",url:"/VerifyTemplateMapData/Copy",data:t,baseURL:sr});var ht=globalThis&&globalThis.__extends||function(){var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var n in o)o.hasOwnProperty(n)&&(i[n]=o[n])},t(r,e)};return function(r,e){t(r,e);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),O;(function(t){t.InvalidFile="InvalidFile",t.InvalidToken="InvalidToken",t.InvalidMetadata="InvalidMetadata",t.InvalidChunkSize="InvalidChunkSize",t.InvalidCustomVars="InvalidCustomVars",t.NotAvailableUploadHost="NotAvailableUploadHost",t.ReadCacheFailed="ReadCacheFailed",t.InvalidCacheData="InvalidCacheData",t.WriteCacheFailed="WriteCacheFailed",t.RemoveCacheFailed="RemoveCacheFailed",t.GetCanvasContextFailed="GetCanvasContextFailed",t.UnsupportedFileType="UnsupportedFileType",t.FileReaderReadFailed="FileReaderReadFailed",t.NotAvailableXMLHttpRequest="NotAvailableXMLHttpRequest",t.InvalidProgressEventTarget="InvalidProgressEventTarget",t.RequestError="RequestError"})(O||(O={}));var B=function(){function t(r,e){this.name=r,this.message=e,this.stack=new Error().stack}return t}(),ge=function(t){ht(r,t);function r(e,i,o,n){var f=t.call(this,O.RequestError,o)||this;return f.code=e,f.reqId=i,f.isRequestError=!0,f.data=n,f}return r}(B),rn=function(t){ht(r,t);function r(e,i){return i===void 0&&(i=""),t.call(this,0,i,e)||this}return r}(ge),nn=function(){function t(r,e){this.runTask=r,this.limit=e,this.aborted=!1,this.queue=[],this.processing=[]}return t.prototype.enqueue=function(r){var e=this;return new Promise(function(i,o){e.queue.push({task:r,resolve:i,reject:o}),e.check()})},t.prototype.run=function(r){var e=this;this.queue=this.queue.filter(function(i){return i!==r}),this.processing.push(r),this.runTask(r.task).then(function(){e.processing=e.processing.filter(function(i){return i!==r}),r.resolve(),e.check()},function(i){return r.reject(i)})},t.prototype.check=function(){var r=this;if(!this.aborted){var e=this.processing.length,i=this.limit-e;this.queue.slice(0,i).forEach(function(o){r.run(o)})}},t.prototype.abort=function(){this.queue=[],this.aborted=!0},t}(),on=globalThis&&globalThis.__extends||function(){var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var n in o)o.hasOwnProperty(n)&&(i[n]=o[n])},t(r,e)};return function(r,e){t(r,e);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),de=globalThis&&globalThis.__assign||function(){return de=Object.assign||function(t){for(var r,e=1,i=arguments.length;e"u")return"";var r=t+"",e="",i,o,n=0;i=o=0,n=r.length;for(var f=0;f127&&h<2048)g=String.fromCharCode(h>>6|192,h&63|128);else if((h&63488^55296)>0)g=String.fromCharCode(h>>12|224,h>>6&63|128,h&63|128);else{if((h&64512^55296)>0)throw new RangeError("Unmatched trail surrogate at "+f);var a=r.charCodeAt(++f);if((a&64512^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(f-1));h=((h&1023)<<10)+(a&1023)+65536,g=String.fromCharCode(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}g!==null&&(o>i&&(e+=r.slice(i,o)),e+=g,i=o=f+1)}return o>i&&(e+=r.slice(i,n)),e}function cn(t){var r=[],e=0,i=0,o=0;for(t+="";e>10&1023)),r.push(String.fromCharCode(56320|i&1023))):r.push(String.fromCharCode(i)),e+=o}return r.join("")}function fn(t){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e,i,o,n,f,h,g,a,d=0,m=0,w="",k=[];if(!t)return t;t=un(t+"");do e=t.charCodeAt(d++),i=t.charCodeAt(d++),o=t.charCodeAt(d++),a=e<<16|i<<8|o,n=a>>18&63,f=a>>12&63,h=a>>6&63,g=a&63,k[m++]=r.charAt(n)+r.charAt(f)+r.charAt(h)+r.charAt(g);while(d>16&255,i=a>>8&255,o=a&255,h===64?k[m++]=String.fromCharCode(e):g===64?k[m++]=String.fromCharCode(e,i):k[m++]=String.fromCharCode(e,i,o);while(d>>25)+s|0,c+=(l&s|~l&u)+p[1]-389564586|0,c=(c<<12|c>>>20)+l|0,u+=(c&l|~c&s)+p[2]+606105819|0,u=(u<<17|u>>>15)+c|0,s+=(u&c|~u&l)+p[3]-1044525330|0,s=(s<<22|s>>>10)+u|0,l+=(s&u|~s&c)+p[4]-176418897|0,l=(l<<7|l>>>25)+s|0,c+=(l&s|~l&u)+p[5]+1200080426|0,c=(c<<12|c>>>20)+l|0,u+=(c&l|~c&s)+p[6]-1473231341|0,u=(u<<17|u>>>15)+c|0,s+=(u&c|~u&l)+p[7]-45705983|0,s=(s<<22|s>>>10)+u|0,l+=(s&u|~s&c)+p[8]+1770035416|0,l=(l<<7|l>>>25)+s|0,c+=(l&s|~l&u)+p[9]-1958414417|0,c=(c<<12|c>>>20)+l|0,u+=(c&l|~c&s)+p[10]-42063|0,u=(u<<17|u>>>15)+c|0,s+=(u&c|~u&l)+p[11]-1990404162|0,s=(s<<22|s>>>10)+u|0,l+=(s&u|~s&c)+p[12]+1804603682|0,l=(l<<7|l>>>25)+s|0,c+=(l&s|~l&u)+p[13]-40341101|0,c=(c<<12|c>>>20)+l|0,u+=(c&l|~c&s)+p[14]-1502002290|0,u=(u<<17|u>>>15)+c|0,s+=(u&c|~u&l)+p[15]+1236535329|0,s=(s<<22|s>>>10)+u|0,l+=(s&c|u&~c)+p[1]-165796510|0,l=(l<<5|l>>>27)+s|0,c+=(l&u|s&~u)+p[6]-1069501632|0,c=(c<<9|c>>>23)+l|0,u+=(c&s|l&~s)+p[11]+643717713|0,u=(u<<14|u>>>18)+c|0,s+=(u&l|c&~l)+p[0]-373897302|0,s=(s<<20|s>>>12)+u|0,l+=(s&c|u&~c)+p[5]-701558691|0,l=(l<<5|l>>>27)+s|0,c+=(l&u|s&~u)+p[10]+38016083|0,c=(c<<9|c>>>23)+l|0,u+=(c&s|l&~s)+p[15]-660478335|0,u=(u<<14|u>>>18)+c|0,s+=(u&l|c&~l)+p[4]-405537848|0,s=(s<<20|s>>>12)+u|0,l+=(s&c|u&~c)+p[9]+568446438|0,l=(l<<5|l>>>27)+s|0,c+=(l&u|s&~u)+p[14]-1019803690|0,c=(c<<9|c>>>23)+l|0,u+=(c&s|l&~s)+p[3]-187363961|0,u=(u<<14|u>>>18)+c|0,s+=(u&l|c&~l)+p[8]+1163531501|0,s=(s<<20|s>>>12)+u|0,l+=(s&c|u&~c)+p[13]-1444681467|0,l=(l<<5|l>>>27)+s|0,c+=(l&u|s&~u)+p[2]-51403784|0,c=(c<<9|c>>>23)+l|0,u+=(c&s|l&~s)+p[7]+1735328473|0,u=(u<<14|u>>>18)+c|0,s+=(u&l|c&~l)+p[12]-1926607734|0,s=(s<<20|s>>>12)+u|0,l+=(s^u^c)+p[5]-378558|0,l=(l<<4|l>>>28)+s|0,c+=(l^s^u)+p[8]-2022574463|0,c=(c<<11|c>>>21)+l|0,u+=(c^l^s)+p[11]+1839030562|0,u=(u<<16|u>>>16)+c|0,s+=(u^c^l)+p[14]-35309556|0,s=(s<<23|s>>>9)+u|0,l+=(s^u^c)+p[1]-1530992060|0,l=(l<<4|l>>>28)+s|0,c+=(l^s^u)+p[4]+1272893353|0,c=(c<<11|c>>>21)+l|0,u+=(c^l^s)+p[7]-155497632|0,u=(u<<16|u>>>16)+c|0,s+=(u^c^l)+p[10]-1094730640|0,s=(s<<23|s>>>9)+u|0,l+=(s^u^c)+p[13]+681279174|0,l=(l<<4|l>>>28)+s|0,c+=(l^s^u)+p[0]-358537222|0,c=(c<<11|c>>>21)+l|0,u+=(c^l^s)+p[3]-722521979|0,u=(u<<16|u>>>16)+c|0,s+=(u^c^l)+p[6]+76029189|0,s=(s<<23|s>>>9)+u|0,l+=(s^u^c)+p[9]-640364487|0,l=(l<<4|l>>>28)+s|0,c+=(l^s^u)+p[12]-421815835|0,c=(c<<11|c>>>21)+l|0,u+=(c^l^s)+p[15]+530742520|0,u=(u<<16|u>>>16)+c|0,s+=(u^c^l)+p[2]-995338651|0,s=(s<<23|s>>>9)+u|0,l+=(u^(s|~c))+p[0]-198630844|0,l=(l<<6|l>>>26)+s|0,c+=(s^(l|~u))+p[7]+1126891415|0,c=(c<<10|c>>>22)+l|0,u+=(l^(c|~s))+p[14]-1416354905|0,u=(u<<15|u>>>17)+c|0,s+=(c^(u|~l))+p[5]-57434055|0,s=(s<<21|s>>>11)+u|0,l+=(u^(s|~c))+p[12]+1700485571|0,l=(l<<6|l>>>26)+s|0,c+=(s^(l|~u))+p[3]-1894986606|0,c=(c<<10|c>>>22)+l|0,u+=(l^(c|~s))+p[10]-1051523|0,u=(u<<15|u>>>17)+c|0,s+=(c^(u|~l))+p[1]-2054922799|0,s=(s<<21|s>>>11)+u|0,l+=(u^(s|~c))+p[8]+1873313359|0,l=(l<<6|l>>>26)+s|0,c+=(s^(l|~u))+p[15]-30611744|0,c=(c<<10|c>>>22)+l|0,u+=(l^(c|~s))+p[6]-1560198380|0,u=(u<<15|u>>>17)+c|0,s+=(c^(u|~l))+p[13]+1309151649|0,s=(s<<21|s>>>11)+u|0,l+=(u^(s|~c))+p[4]-145523070|0,l=(l<<6|l>>>26)+s|0,c+=(s^(l|~u))+p[11]-1120210379|0,c=(c<<10|c>>>22)+l|0,u+=(l^(c|~s))+p[2]+718787259|0,u=(u<<15|u>>>17)+c|0,s+=(c^(u|~l))+p[9]-343485551|0,s=(s<<21|s>>>11)+u|0,v[0]=l+v[0]|0,v[1]=s+v[1]|0,v[2]=u+v[2]|0,v[3]=c+v[3]|0}function n(v){var p=[],l;for(l=0;l<64;l+=4)p[l>>2]=v.charCodeAt(l)+(v.charCodeAt(l+1)<<8)+(v.charCodeAt(l+2)<<16)+(v.charCodeAt(l+3)<<24);return p}function f(v){var p=[],l;for(l=0;l<64;l+=4)p[l>>2]=v[l]+(v[l+1]<<8)+(v[l+2]<<16)+(v[l+3]<<24);return p}function h(v){var p=v.length,l=[1732584193,-271733879,-1732584194,271733878],s,u,c,b,S,z;for(s=64;s<=p;s+=64)o(l,n(v.substring(s-64,s)));for(v=v.substring(s-64),u=v.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=0;s>2]|=v.charCodeAt(s)<<(s%4<<3);if(c[s>>2]|=128<<(s%4<<3),s>55)for(o(l,c),s=0;s<16;s+=1)c[s]=0;return b=p*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(b[2],16),z=parseInt(b[1],16)||0,c[14]=S,c[15]=z,o(l,c),l}function g(v){var p=v.length,l=[1732584193,-271733879,-1732584194,271733878],s,u,c,b,S,z;for(s=64;s<=p;s+=64)o(l,f(v.subarray(s-64,s)));for(v=s-64>2]|=v[s]<<(s%4<<3);if(c[s>>2]|=128<<(s%4<<3),s>55)for(o(l,c),s=0;s<16;s+=1)c[s]=0;return b=p*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(b[2],16),z=parseInt(b[1],16)||0,c[14]=S,c[15]=z,o(l,c),l}function a(v){var p="",l;for(l=0;l<4;l+=1)p+=i[v>>l*8+4&15]+i[v>>l*8&15];return p}function d(v){var p;for(p=0;pc?new ArrayBuffer(0):(b=c-u,S=new ArrayBuffer(b),z=new Uint8Array(S),D=new Uint8Array(this,u,b),z.set(D),S)}}();function m(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function w(v,p){var l=v.length,s=new ArrayBuffer(l),u=new Uint8Array(s),c;for(c=0;c>2]|=p.charCodeAt(s)<<(s%4<<3);return this._finish(u,l),c=d(this._hash),v&&(c=R(c)),this.reset(),c},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(v){return this._buff=v.buff,this._length=v.length,this._hash=v.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(v,p){var l=p,s,u,c;if(v[l>>2]|=128<<(l%4<<3),l>55)for(o(this._hash,v),l=0;l<16;l+=1)v[l]=0;s=this._length*8,s=s.toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(s[2],16),c=parseInt(s[1],16)||0,v[14]=u,v[15]=c,o(this._hash,v)},x.hash=function(v,p){return x.hashBinary(m(v),p)},x.hashBinary=function(v,p){var l=h(v),s=d(l);return p?R(s):s},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(v){var p=C(this._buff.buffer,v,!0),l=p.length,s;for(this._length+=v.byteLength,s=64;s<=l;s+=64)o(this._hash,f(p.subarray(s-64,s)));return this._buff=s-64>2]|=p[u]<<(u%4<<3);return this._finish(s,l),c=d(this._hash),v&&(c=R(c)),this.reset(),c},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var v=x.prototype.getState.call(this);return v.buff=k(v.buff),v},x.ArrayBuffer.prototype.setState=function(v){return v.buff=w(v.buff,!0),x.prototype.setState.call(this,v)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(v,p){var l=g(new Uint8Array(v)),s=d(l);return p?R(s):s},x})})(gt);var pn=gt.exports;const gn=lr(pn);var Te=globalThis&&globalThis.__assign||function(){return Te=Object.assign||function(t){for(var r,e=1,i=arguments.length;e0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]t.size)e=t.size;else for(;t.size>e*1e4;)e*=2;for(var i=[],o=Math.ceil(t.size/e),n=0;n3?r[1]:r[0];if(!e)throw new B(O.InvalidToken,"missing assess key field.");var i=null;try{i=JSON.parse(hn(r[r.length-1]))}catch{throw new B(O.InvalidToken,"token parse failed.")}if(i==null)throw new B(O.InvalidToken,"putPolicy is null.");if(i.scope==null)throw new B(O.InvalidToken,"scope field is null.");var o=i.scope.split(":")[0];if(!o)throw new B(O.InvalidToken,"resolve bucketName failed.");return{assessKey:e,bucketName:o,scope:i.scope}}var G,ne={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},An=(G={},G[ne.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},G[ne.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},G[ne.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},G[ne.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},G[ne.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},G[ne.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},G),le=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},En=function(t,r,e,i){return r=r||"&",e=e||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(o){var n=encodeURIComponent(le(o))+e;return Array.isArray(t[o])?t[o].map(function(f){return n+encodeURIComponent(le(f))}).join(r):n+encodeURIComponent(le(t[o]))}).filter(Boolean).join(r):i?encodeURIComponent(le(i))+e+encodeURIComponent(le(t)):""},mt;mt=En;var Q=globalThis&&globalThis.__assign||function(){return Q=Object.assign||function(t){for(var r,e=1,i=arguments.length;e0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]0)&&!(o=i.next()).done;)n.push(o.value)}catch(h){f={error:h}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(f)throw f.error}}return n},Hn=globalThis&&globalThis.__spread||function(){for(var t=[],r=0;r1e4*Vn)return this.handleError(new B(O.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!_n(this.putExtra.customVars))return this.handleError(new B(O.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!yn(this.putExtra.metadata))return this.handleError(new B(O.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];n.label=1;case 1:return n.trys.push([1,4,,5]),this.uploadAt=new Date().getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return n.sent(),[4,this.run()];case 3:return r=n.sent(),this.onComplete(r.data),this.checkAndUnfreezeHost(),this.sendLog(r.reqId,200),[2];case 4:return e=n.sent(),this.aborted?(this.logger.warn("upload is aborted."),this.sendLog("",-2),[2]):(this.clear(),this.logger.error(e),e instanceof ge&&(this.sendLog(e.reqId,e.code),this.checkAndFreezeHost(e),i=++this.retryCount<=this.config.retryCount,o=qn.includes(e.code),o&&i)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(e),[3,5]));case 5:return[2]}})})},t.prototype.clear=function(){this.xhrList.forEach(function(r){r.onreadystatechange=null,r.abort()}),this.xhrList=[],this.logger.info("cleanup uploading xhr.")},t.prototype.stop=function(){this.logger.info("aborted."),this.clear(),this.aborted=!0},t.prototype.addXhr=function(r){this.xhrList.push(r)},t.prototype.sendLog=function(r,e){var i,o;this.logger.report({code:e,reqId:r,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:In((i=this.uploadHost)===null||i===void 0?void 0:i.getUrl()),host:Rn((o=this.uploadHost)===null||o===void 0?void 0:o.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor((new Date().getTime()-this.uploadAt)/1e3)})},t.prototype.getProgressInfoItem=function(r,e,i){return Ce({size:e,loaded:r,percent:r/e*100},i==null?{}:{fromCache:i})},t}(),Nn=globalThis&&globalThis.__extends||function(){var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var n in o)o.hasOwnProperty(n)&&(i[n]=o[n])},t(r,e)};return function(r,e){t(r,e);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),he=globalThis&&globalThis.__assign||function(){return he=Object.assign||function(t){for(var r,e=1,i=arguments.length;e0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]1024)throw new B(O.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:g.sent(),e=new nn(function(a){return ue(h,void 0,void 0,function(){return ce(this,function(d){switch(d.label){case 0:if(this.aborted)throw e.abort(),new Error("pool is aborted");return[4,this.uploadChunk(a)];case 1:return d.sent(),[2]}})})},this.config.concurrentRequestLimit),i=null,o=this.getLocalKey(),n=this.chunks.map(function(a,d){return e.enqueue({chunk:a,index:d})}),g.label=2;case 2:return g.trys.push([2,5,,6]),[4,Promise.all(n)];case 3:return g.sent(),[4,this.mkFileReq()];case 4:return i=g.sent(),[3,6];case 5:throw f=g.sent(),f instanceof ge&&(f.code===612||f.code===400)&&Pe(o,this.logger),f;case 6:return Pe(o,this.logger),[2,i]}})})},r.prototype.uploadChunk=function(e){return ue(this,void 0,void 0,function(){var i,o,n,f,h,g,a,d,m,w=this;return ce(this,function(k){switch(k.label){case 0:return i=e.index,o=e.chunk,n=this.cachedUploadedList[i],this.logger.info("upload part "+i+", cache:",n),f=this.config.checkByMD5,h=function(){w.usedCacheList[i]=!0,w.updateChunkProgress(o.size,i),w.uploadedList[i]=n,w.updateLocalCache()},n&&!f?(h(),[2]):[4,zn(o)];case 1:return g=k.sent(),this.logger.info("computed part md5.",g),n&&g===n.md5?(h(),[2]):(this.usedCacheList[i]=!1,a=function(C){w.updateChunkProgress(C.loaded,i)},d={body:o,md5:this.config.checkByServer?g:void 0,onProgress:a,onCreate:function(C){return w.addXhr(C)}},this.logger.info("part "+i+" start uploading."),[4,Fn(this.token,this.key,e.index+1,this.getUploadInfo(),d)]);case 2:return m=k.sent(),this.logger.info("part "+i+" upload completed."),a({loaded:o.size,total:o.size}),this.uploadedList[i]={etag:m.data.etag,md5:m.data.md5,size:o.size},this.updateLocalCache(),[2]}})})},r.prototype.mkFileReq=function(){return ue(this,void 0,void 0,function(){var e,i,o=this;return ce(this,function(n){switch(n.label){case 0:return e=he(he(he({parts:this.uploadedList.map(function(f,h){return{etag:f.etag,partNumber:h+1}}),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",e),[4,Ln(this.token,this.key,this.getUploadInfo(),{onCreate:function(f){return o.addXhr(f)},body:JSON.stringify(e)})];case 1:return i=n.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,i]}})})},r.prototype.initBeforeUploadChunks=function(){return ue(this,void 0,void 0,function(){var e,i,o;return ce(this,function(n){switch(n.label){case 0:return this.uploadedList=[],this.usedCacheList=[],e=Cn(this.getLocalKey(),this.logger),e?[3,2]:(this.logger.info("init upload parts from api."),[4,Pn(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return i=n.sent(),this.logger.info("initd upload parts of id: "+i.data.uploadId+"."),this.uploadId=i.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:o=["resume upload parts from local cache,","total "+e.data.length+" part,","id is "+e.id+"."],this.logger.info(o.join(" ")),this.cachedUploadedList=e.data,this.uploadId=e.id,n.label=3;case 3:return this.chunks=bn(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map(function(f){return 0})},this.notifyResumeProgress(),[2]}})})},r.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},r.prototype.getLocalKey=function(){return Tn(this.file.name,this.key,this.file.size)},r.prototype.updateLocalCache=function(){xn(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},r.prototype.updateChunkProgress=function(e,i){this.loaded.chunks[i]=e,this.notifyResumeProgress()},r.prototype.updateMkFileProgress=function(e){this.loaded.mkFileProgress=e,this.notifyResumeProgress()},r.prototype.notifyResumeProgress=function(){var e=this;this.progress={total:this.getProgressInfoItem(wn(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map(function(i,o){var n=e.usedCacheList[o];return e.getProgressInfoItem(e.loaded.chunks[o],i.size,n)}),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)},r}(_t),Ze=globalThis&&globalThis.__awaiter||function(t,r,e,i){function o(n){return n instanceof e?n:new e(function(f){f(n)})}return new(e||(e=Promise))(function(n,f){function h(d){try{a(i.next(d))}catch(m){f(m)}}function g(d){try{a(i.throw(d))}catch(m){f(m)}}function a(d){d.done?n(d.value):o(d.value).then(h,g)}a((i=i.apply(t,r||[])).next())})},Qe=globalThis&&globalThis.__generator||function(t,r){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,o,n,f;return f={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function h(a){return function(d){return g([a,d])}}function g(a){if(i)throw new TypeError("Generator is already executing.");for(;e;)try{if(i=1,o&&(n=a[0]&2?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,o=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(n=e.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]>>1^3988292384:i>>>=1;r[e]=i}return r},t.prototype.append=function(r){for(var e=this.crc,i=0;i>>8^this.table[(e^r[i])&255];this.crc=e},t.prototype.compute=function(){return(this.crc^-1)>>>0},t.prototype.readAsUint8Array=function(r){return Ze(this,void 0,void 0,function(){var e;return Qe(this,function(i){switch(i.label){case 0:return typeof r.arrayBuffer!="function"?[3,2]:(e=Uint8Array.bind,[4,r.arrayBuffer()]);case 1:return[2,new(e.apply(Uint8Array,[void 0,i.sent()]))];case 2:return[2,new Promise(function(o,n){var f=new FileReader;f.onload=function(){if(f.result==null){n();return}if(typeof f.result=="string"){n();return}o(new Uint8Array(f.result))},f.readAsArrayBuffer(r)})]}})})},t.prototype.file=function(r){return Ze(this,void 0,void 0,function(){var e,i,o,n,f,h;return Qe(this,function(g){switch(g.label){case 0:return r.size<=oe?(e=this.append,[4,this.readAsUint8Array(r)]):[3,2];case 1:return e.apply(this,[g.sent()]),[2,this.compute()];case 2:i=Math.ceil(r.size/oe),o=0,g.label=3;case 3:return o0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]0&&wt(t,r,e-1)};var o=[r.code||"",r.reqId||"",r.host||"",r.remoteIp||"",r.port||"",r.duration||"",r.time||"",r.bytesSent||"",r.upType||"",r.size||""].join(",");i.send(o)}var Zn=globalThis&&globalThis.__read||function(t,r){var e=typeof Symbol=="function"&&t[Symbol.iterator];if(!e)return t;var i=e.call(t),o,n=[],f;try{for(;(r===void 0||r-- >0)&&!(o=i.next()).done;)n.push(o.value)}catch(h){f={error:h}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(f)throw f.error}}return n},Ee=globalThis&&globalThis.__spread||function(){for(var t=[],r=0;r0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]0)&&!(o=i.next()).done;)n.push(o.value)}catch(h){f={error:h}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(f)throw f.error}}return n},to=globalThis&&globalThis.__spread||function(){for(var t=[],r=0;r=r},t.prototype.freeze=function(r){r===void 0&&(r=20);var e=new Date().getTime()+r*1e3;we.set(this.host,e)},t.prototype.unfreeze=function(){we.delete(this.host)},t.prototype.getUrl=function(){return this.protocol+"://"+this.host},t.prototype.getUnfreezeTime=function(){return we.get(this.host)},t}(),no=function(){function t(r){r===void 0&&(r=[]),this.initHosts=r,this.cachedHostsMap=new Map}return t.prototype.register=function(r,e,i,o){this.cachedHostsMap.set(r+"@"+e,i.map(function(n){return new ro(n,o)}))},t.prototype.refresh=function(r,e,i){var o,n,f,h;return tt(this,void 0,void 0,function(){var g,a,d;return rt(this,function(m){switch(m.label){case 0:return g=this.cachedHostsMap.get(r+"@"+e)||[],g.length>0?[2]:this.initHosts.length>0?(this.register(r,e,this.initHosts,i),[2]):[4,Un(r,e,i)];case 1:return a=m.sent(),(a==null?void 0:a.data)!=null&&(d=to(((n=(o=a.data.up)===null||o===void 0?void 0:o.acc)===null||n===void 0?void 0:n.main)||[],((h=(f=a.data.up)===null||f===void 0?void 0:f.acc)===null||h===void 0?void 0:h.backup)||[]),this.register(r,e,d,i)),[2]}})})},t.prototype.getUp=function(r,e,i){return tt(this,void 0,void 0,function(){var o,n,f;return rt(this,function(h){switch(h.label){case 0:return[4,this.refresh(r,e,i)];case 1:return h.sent(),o=this.cachedHostsMap.get(r+"@"+e)||[],o.length===0?[2,null]:(n=o.filter(function(g){return!g.isFrozen()}),n.length>0?[2,n[0]]:(f=o.slice().sort(function(g,a){return(g.getUnfreezeTime()||0)-(a.getUnfreezeTime()||0)}),[2,f[0]]))}})})},t}();function oo(t,r,e,i){return t.config&&t.config.forceDirect?(i.info("ues forceDirect mode."),new et(t,r,e,i)):t.file.size>4*oe?(i.info("file size over 4M, use Resume."),new Xn(t,r,e,i)):(i.info("file size less or equal than 4M, use Direct."),new et(t,r,e,i))}function io(t,r,e,i,o){var n=new Qn(e,o==null?void 0:o.disableStatisticsReport,o==null?void 0:o.debugLogLevel,t.name),f={file:t,key:r,token:e,putExtra:i,config:lo(o,n)},h=new no(f.config.uphost);return new ln(function(g){var a=oo(f,{onData:function(d){return g.next(d)},onError:function(d){return g.error(d)},onComplete:function(d){return g.complete(d)}},h,n);return a.putFile(),a.stop.bind(a)})}var ie=globalThis&&globalThis.__assign||function(){return ie=Object.assign||function(t){for(var r,e=1,i=arguments.length;e0)&&!(o=i.next()).done;)n.push(o.value)}catch(h){f={error:h}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(f)throw f.error}}return n},Oe=globalThis&&globalThis.__spread||function(){for(var t=[],r=0;r{const{data:r}=await ur({T_suffix:t});return r.Data},co={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},fo=ee("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),ho=ee("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M320 320L192 192"},null,-1),po=ee("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 320l128-128"},null,-1),go=[fo,ho,po],vo=W({name:"CloseCircleOutline",render:function(r,e){return j(),fe("svg",co,go)}}),mo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},bo=ee("path",{d:"M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184s184-82.39 184-184S349.61 64 248 64z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),yo=ee("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M220 220h32v116"},null,-1),_o=ee("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M208 340h88"},null,-1),wo=ee("path",{d:"M248 130a26 26 0 1 0 26 26a26 26 0 0 0-26-26z",fill:"currentColor"},null,-1),xo=[bo,yo,_o,wo],To=W({name:"InformationCircleOutline",render:function(r,e){return j(),fe("svg",mo,xo)}});const Co={key:5,style:{display:"flex",flex:"1","align-items":"center"}},ko={__name:"FormList",props:{formList:{type:Array,default:()=>[]}},emits:["updatas"],setup(t,{expose:r,emit:e}){const i=t;H("");const o=fr(),n=async u=>{let c={T_task_id:f.T_task_id,T_VerifyTemplate_id:f.T_VerifyTemplate_id,T_VerifyTemplateMap_id:u.T_VerifyTemplateMap_id};const{data:b}=await br(c);b.Code==200&&(o.success("清除成功"),e("updatas",!0)),console.log("清空",b)},f=window.sessionStorage.getItem("task")?JSON.parse(window.sessionStorage.getItem("task")):{},h=Ae({pdf:""}),g=()=>{let{T_VerifyDeviceDataTime:u,T_BindDeviceDataTime:c,T_sn:b,T_CalibrationExpirationTime:S}=f,z=u.every(F=>F===""),D=c.every(F=>F==="");z?a.picker1=null:a.picker1=u,D?a.picker2=null:a.picker2=c,a.T_sn=b,a.T_CalibrationExpirationTime=S?S.slice(0,10):null};ct(()=>g()),h.formList=M(()=>i.formList);const a=Ae({picker1:null,picker2:null,T_task_id:f.T_task_id,T_VerifyDeviceDataStartTime:"",T_VerifyDeviceDataEndTime:"",T_BindDeviceDataStartTime:"",T_BindDeviceDataEndTime:"",T_sn:"",T_CalibrationExpirationTime:null}),d=async u=>{a.T_VerifyDeviceDataStartTime=a.picker1!=null?a.picker1[0]:"",a.T_VerifyDeviceDataEndTime=a.picker1!=null?a.picker1[1]:"",a.T_BindDeviceDataStartTime=a.picker2!=null?a.picker2[0]:"",a.T_BindDeviceDataEndTime=a.picker2!=null?a.picker2[1]:""},m=Ae({T_source:2,T_task_id:f.T_task_id,T_VerifyTemplate_id:f.T_VerifyTemplate_id}),w=H([]),k=u=>{console.log("cad",h.formList),h.formList[u].T_value="",Be(()=>{h.formList[u].T_value=`https://coldverifylocal.coldbaozhida.com/CAD2/download/image/${m.T_task_id}_${m.T_VerifyTemplate_id}_${h.formList[u].T_id}.png`}),console.log(h.formList[u].T_value)},C=u=>{window.open(`http://coldverifylocal.coldbaozhida.com/CAD2/?task_id=${m.T_task_id}&vt_id=${m.T_VerifyTemplate_id}&key_id=${u.T_id}`)},R=u=>{window.open(`http://coldverifylocal.coldbaozhida.com/CAD/?task_id=${m.T_task_id}&vt_id=${m.T_VerifyTemplate_id}&key_id=${u.T_id}`)},x=u=>{},v=async({file:u},c)=>{const b=await uo(u.name.split(".")[1]);io(u.file,u.name,b,{},{useCdnDomain:!0}).subscribe({next:z=>{console.warn(z)},error:()=>{o.error("上传失败")},complete:z=>{h.formList[c].T_value=z.key}})},p=u=>{i.formList[u].T_value.length==w.value.length?i.formList[u].T_value=[]:i.formList[u].T_value=w.value.map(c=>c.T_sn)},l=u=>{let c=w.value.map(b=>b.T_sn);i.formList[u].T_value=i.formList[u].T_value.concat(c).filter((b,S,z)=>z.indexOf(b)===z.lastIndexOf(b))};return(async()=>{try{const{data:u}=await yr({T_class:f.T_class});console.log("******",u),w.value=u.Data.List||[]}catch(u){console.log(u)}})(),r({classList:w,person:a}),(u,c)=>{const b=_r,S=wr,z=hr,D=xr,F=kr,q=pr,K=Tr,se=Cr,$e=Sr,ye=gr,Ie=vr,Re=mr;return j(),V(Re,{"label-width":"auto"},{default:E(()=>[I(D,{cols:12,"x-gap":12,style:{background:"#f1f1f1",padding:"20px 20px 0 20px","margin-bottom":"20px"}},{default:E(()=>[I(S,{span:3,label:"验证设备数据时间范围"},{default:E(()=>[I(b,{"formatted-value":P(a).picker1,"onUpdate:formattedValue":c[0]||(c[0]=y=>P(a).picker1=y),blur:d("1"),type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",learable:"",class:"w-full"},null,8,["formatted-value","blur"])]),_:1}),I(S,{span:3,label:"绑定设备数据时间范围"},{default:E(()=>[I(b,{"formatted-value":P(a).picker2,"onUpdate:formattedValue":c[1]||(c[1]=y=>P(a).picker2=y),blur:d("2"),type:"datetimerange",format:"yyyy-MM-dd HH:mm:ss",learable:"",class:"w-full"},null,8,["formatted-value","blur"])]),_:1}),I(S,{span:3,label:"sn"},{default:E(()=>[I(z,{value:P(a).T_sn,"onUpdate:value":c[2]||(c[2]=y=>P(a).T_sn=y),type:"text",placeholder:"请输入sn"},null,8,["value"])]),_:1}),I(S,{span:3,label:"校准到期时间"},{default:E(()=>[I(b,{"formatted-value":P(a).T_CalibrationExpirationTime,"onUpdate:formattedValue":c[3]||(c[3]=y=>P(a).T_CalibrationExpirationTime=y),"value-format":"yyyy-MM-dd",type:"date",clearable:""},null,8,["formatted-value"])]),_:1})]),_:1}),I(D,{cols:12,"x-gap":60,"y-gap":40},{default:E(()=>[(j(!0),fe(Xe,null,dr(t.formList,(y,te)=>(j(),V(S,{key:y.T_VerifyTemplateMap_id,span:4,label:y.T_name},{default:E(()=>[y.T_label===3?(j(),V(q,{key:0,value:y.T_value,"onUpdate:value":$=>y.T_value=$,multiple:"","label-field":"T_id","value-field":"T_sn","max-tag-count":"responsive",options:P(w)},{action:E(()=>[I(F,null,{default:E(()=>[I(P(_e),{disabled:P(w).length==0,class:"underline",text:"",onClick:$=>p(te)},{default:E(()=>[Z(Ye(y.T_value.length==P(w).length?"取消":"全选"),1)]),_:2},1032,["disabled","onClick"]),I(P(_e),{disabled:P(w).length==0,class:"underline",text:"",onClick:$=>l(te)},{default:E(()=>[Z("反选")]),_:2},1032,["disabled","onClick"])]),_:2},1024)]),_:2},1032,["value","onUpdate:value","options"])):y.T_label===4?(j(),V(q,{key:1,value:y.T_value,"onUpdate:value":$=>y.T_value=$,"label-field":"T_id","value-field":"T_sn",options:P(w)},null,8,["value","onUpdate:value","options"])):y.T_label===7?(j(),V(b,{key:2,"formatted-value":y.T_value,"onUpdate:formattedValue":[$=>y.T_value=$,$=>y.T_value=$],type:"datetime",format:"yyyy-MM-dd HH:mm",datetime:"",clearable:"",class:"w-full"},null,8,["formatted-value","onUpdate:formattedValue"])):y.T_label===9?(j(),V(b,{key:3,"formatted-value":y.T_value,"onUpdate:formattedValue":$=>y.T_value=$,type:"datetimerange",format:"yyyy-MM-dd HH:mm",clearable:"",class:"w-full"},null,8,["formatted-value","onUpdate:formattedValue"])):y.T_label===10?(j(),fe(Xe,{key:4},[I(K,{class:"mr-5",width:"100",src:y.T_value},null,8,["src"]),I(se,{"list-type":"image-card",onChange:$=>v($,te),"default-upload":!1,max:1},{default:E(()=>[Z(" 点击上传 ")]),_:2},1032,["onChange"])],64)):y.T_label===11?(j(),fe("div",Co,[I(K,{class:"mr-5",width:"100",src:y.T_value},null,8,["src"]),I(F,{class:"mr-5"},{default:E(()=>[I($e,{"positive-text":"新版","negative-text":"旧版",onPositiveClick:$=>C(y),onNegativeClick:$=>R(y)},{trigger:E(()=>[I(P(_e),{onClick:()=>x(y)},{default:E(()=>[Z("编辑")]),_:2},1032,["onClick"])]),default:E(()=>[Z(" 请选择CAD新版/旧版 ")]),_:2},1032,["onPositiveClick","onNegativeClick"]),I(P(_e),{onClick:()=>k(te)},{default:E(()=>[Z("刷新")]),_:2},1032,["onClick"])]),_:2},1024)])):y.T_label===12?(j(),V(F,{key:6,vertical:"",class:"w-full"},{default:E(()=>[I(b,{"formatted-value":y.T_value[0],"onUpdate:formattedValue":$=>y.T_value[0]=$,format:"yyyy-MM-dd HH:mm","time-picker-props":{format:"HH:mm"},type:"datetime",clearable:""},null,8,["formatted-value","onUpdate:formattedValue"]),I(z,{value:y.T_value[1],"onUpdate:value":$=>y.T_value[1]=$,type:"text"},null,8,["value","onUpdate:value"])]),_:2},1024)):y.T_label===13?(j(),V(F,{key:7,vertical:"",class:"w-full"},{default:E(()=>[I(b,{"formatted-value":y.T_value[0],"onUpdate:formattedValue":$=>y.T_value[0]=$,format:"yyyy-MM-dd HH:mm",type:"datetimerange",clearable:""},null,8,["formatted-value","onUpdate:formattedValue"]),I(z,{value:y.T_value[1],"onUpdate:value":$=>y.T_value[1]=$,type:"text"},null,8,["value","onUpdate:value"])]),_:2},1024)):(j(),V(z,{key:8,value:y.T_value,"onUpdate:value":$=>y.T_value=$,type:"text"},null,8,["value","onUpdate:value"])),y.T_label===10||y.T_label===11?(j(),V(K,{key:9,width:"100",src:y.T_text,style:{"margin-right":"36px"}},null,8,["src"])):(j(),V(Ie,{key:10,trigger:"hover"},{trigger:E(()=>[I(ye,{size:"24",class:"ml-3"},{default:E(()=>[I(P(To))]),_:1})]),default:E(()=>[Z(" "+Ye(y.T_text),1)]),_:2},1024)),I(ye,{size:"24",class:"ml-3 hoverIcon"},{default:E(()=>[I(P(vo),{onClick:$=>n(y)},null,8,["onClick"])]),_:2},1024)]),_:2},1032,["label"]))),128))]),_:1})]),_:1})}}},jo=cr(ko,[["__scopeId","data-v-493f27cc"]]);export{jo as F,Ho as T,Po as _,Uo as a,Oo as b,Fo as c,Do as d,Bo as e,Lo as f,uo as g,Mo as h,io as u};