szld-libs 0.3.88 → 0.3.89
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.
|
@@ -193,7 +193,7 @@ Check the render method of %s.`,kt(cr)||"Unknown"));var G=Ks(S,F);G.payload={ele
|
|
|
193
193
|
root.render(<App />);`),a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.transitionCallbacks!==void 0&&a.transitionCallbacks);var F=lF(n,dx,null,u,h,y,S);ix(F.current,n);var j=n.nodeType===fr?n.parentNode:n;return cm(j),new M4(F)}function gb(n){this._internalRoot=n}function HW(n){n&&N1(n)}gb.prototype.unstable_scheduleHydration=HW;function VW(n,a,u){if(!yb(n))throw new Error("hydrateRoot(...): Target container is not a DOM element.");AF(n),a===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var h=u??null,y=u!=null&&u.hydratedSources||null,S=!1,F=!1,j="",G=kF;u!=null&&(u.unstable_strictMode===!0&&(S=!0),u.identifierPrefix!==void 0&&(j=u.identifierPrefix),u.onRecoverableError!==void 0&&(G=u.onRecoverableError));var re=sF(a,null,n,dx,h,S,F,j,G);if(ix(re.current,n),cm(n),y)for(var ie=0;ie<y.length;ie++){var pe=y[ie];Zq(re,pe)}return new gb(re)}function yb(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===vs||!ne))}function rg(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===vs||n.nodeType===fr&&n.nodeValue===" react-mount-point-unstable "))}function AF(n){n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Cm(n)&&(n._reactRootContainer?c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):c("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var $W=t.ReactCurrentOwner,OF;OF=function(n){if(n._reactRootContainer&&n.nodeType!==fr){var a=cF(n._reactRootContainer.current);a&&a.parentNode!==n&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var u=!!n._reactRootContainer,h=P4(n),y=!!(h&&ec(h));y&&!u&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function P4(n){return n?n.nodeType===Hi?n.documentElement:n.firstChild:null}function RF(){}function YW(n,a,u,h,y){if(y){if(typeof h=="function"){var S=h;h=function(){var de=mb(F);S.call(de)}}var F=sF(a,h,n,nc,null,!1,!1,"",RF);n._reactRootContainer=F,ix(F.current,n);var j=n.nodeType===fr?n.parentNode:n;return cm(j),Xs(),F}else{for(var G;G=n.lastChild;)n.removeChild(G);if(typeof h=="function"){var re=h;h=function(){var de=mb(ie);re.call(de)}}var ie=lF(n,nc,null,!1,!1,"",RF);n._reactRootContainer=ie,ix(ie.current,n);var pe=n.nodeType===fr?n.parentNode:n;return cm(pe),Xs(function(){ng(a,ie,u,h)}),ie}}function qW(n,a){n!==null&&typeof n!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,n)}function xb(n,a,u,h,y){OF(u),qW(y===void 0?null:y,"render");var S=u._reactRootContainer,F;if(!S)F=YW(u,a,n,y,h);else{if(F=S,typeof y=="function"){var j=y;y=function(){var G=mb(F);j.call(G)}}ng(a,F,n,y)}return mb(F)}function GW(n){{var a=$W.current;if(a!==null&&a.stateNode!==null){var u=a.stateNode._warnedAboutRefsInRender;u||c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",An(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===ka?n:RW(n,"findDOMNode")}function KW(n,a,u){if(c("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(a))throw new Error("Target container is not a DOM element.");{var h=Cm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return xb(null,n,a,!0,u)}function WW(n,a,u){if(c("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(a))throw new Error("Target container is not a DOM element.");{var h=Cm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return xb(null,n,a,!1,u)}function QW(n,a,u,h){if(c("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!rg(u))throw new Error("Target container is not a DOM element.");if(n==null||!ff(n))throw new Error("parentComponent must be a valid React Component");return xb(n,a,u,!1,h)}function ZW(n){if(!rg(n))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var a=Cm(n)&&n._reactRootContainer===void 0;a&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(n._reactRootContainer){{var u=P4(n),h=u&&!ec(u);h&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Xs(function(){xb(null,null,n,!1,function(){n._reactRootContainer=null,TA(n)})}),!0}else{{var y=P4(n),S=!!(y&&ec(y)),F=n.nodeType===ka&&rg(n.parentNode)&&!!n.parentNode._reactRootContainer;S&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",F?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}rt(FW),T1(NW),Df(MW),qv(Ci),A1(_f),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),l1(eY),Kd(d4,VK,Xs);function XW(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!yb(a))throw new Error("Target container is not a DOM element.");return OW(n,a,null,u)}function JW(n,a,u,h){return QW(n,a,u,h)}var B4={usingClientEntryPoint:!1,Events:[ec,Q0,ox,Gd,sf,d4]};function eQ(n,a){return B4.usingClientEntryPoint||c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),IW(n,a)}function tQ(n,a,u){return B4.usingClientEntryPoint||c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),VW(n,a,u)}function nQ(n){return jR()&&c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Xs(n)}var rQ=jW({findFiberByHostInstance:Bf,bundleType:1,version:A4,rendererPackageName:"react-dom"});if(!rQ&&ze&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var aQ=window.location.protocol;/^(https?|file):$/.test(aQ)}ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B4,ii.createPortal=XW,ii.createRoot=eQ,ii.findDOMNode=GW,ii.flushSync=nQ,ii.hydrate=KW,ii.hydrateRoot=tQ,ii.render=WW,ii.unmountComponentAtNode=ZW,ii.unstable_batchedUpdates=d4,ii.unstable_renderSubtreeIntoContainer=JW,ii.version=A4,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ii}(function(e){function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch{}}}process.env.NODE_ENV==="production"?(r(),e.exports=h9()):e.exports=p9()})(tu);const fg=PF(tu.exports),v9=MF({__proto__:null,default:fg},[tu.exports]);var zb=(e=>(e.zip="application/zip",e.png="image/png",e.jpg="image/jpg",e.jpeg="image/jpeg",e.pdf="application/pdf",e.doc="application/msword",e.docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.pptx="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ppt="application/vnd.ms-powerpoint",e.xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.xls="application/vnd.ms-excel",e.txt="text/plain",e.csv="text/csv",e.svg="image/svg+xml",e))(zb||{});const Ub=new Map(Object.entries(zb));var ed=(e=>(e.zip=".zip",e.png=".png",e.jpg=".jpg",e.jpeg=".jpeg",e.pdf=".pdf",e.doc=".doc",e.docx=".docx",e.ppt=".ppt",e.pptx=".pptx",e.xls=".xls",e.xlsx=".xlsx",e.txt=".txt",e.csv=".csv",e.svg=".svg",e.rar=".rar",e))(ed||{});const m9=Object.freeze(Object.defineProperty({__proto__:null,FileType:zb,FileTypeMap:Ub,FileSuffix:ed},Symbol.toStringTag,{value:"Module"})),g9=e=>{if(!il.isObject(e))return e;const r=e;return il.pick(r,il.keys(r).filter(t=>!il.isNil(r[t])))},P8=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),dg=e=>{var r;if(e)return"."+((r=e.split(".").at(-1))==null?void 0:r.toLowerCase())},y9=e=>{if(e){if(e.startsWith("http")){const r=e.split(".").at(-1);if(r&&Ub.has(r))return Ub.get(r)}if(e.startsWith("data:")&&e.includes("base64")){const r=e.indexOf(";base64"),t=e.slice(0,r).split(":");if(t[1])return t[1]}}},B8=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;localStorage.setItem(e,t)},jb=e=>{let t=localStorage.getItem(e);return typeof t=="string"&&(t=Ib(t)),t||null},x9=e=>{localStorage.removeItem(e)},b9=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;sessionStorage.setItem(e,t)},C9=e=>{let t=sessionStorage.getItem(e);return typeof t=="string"&&(t=Ib(t)),t||null},w9=e=>{sessionStorage.removeItem(e)},_9=(e,r)=>{const t=[];for(let i=0;i<r.length;i++)t.findIndex(l=>l[e]===r[i][e])<0&&t.push(r[i]);return t},Ib=e=>{if(!e)return null;if(typeof e=="object")return e;if(typeof e=="string"){let r=e;try{r=JSON.parse(e)}catch{}return r}};function S9(){var e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.substr(r.lastIndexOf("/")+1)}const E9=Object.freeze(Object.defineProperty({__proto__:null,filterObject:g9,getBase64:P8,getFileSuffix:dg,getFileType:y9,setLocalStorage:B8,getLocalStorage:jb,removeLocalStorage:x9,setSessionStorage:b9,getSessionStorage:C9,removeSessionStorage:w9,arrayDeduplication:_9,JSONParse:Ib,uuid:S9,forceReload:()=>{const e="FORCERELOAD";sessionStorage.getItem(e)!=="1"&&(sessionStorage.setItem(e,"1"),window.location.reload())},formatResponse:e=>{if(typeof e=="string"){const r=e.indexOf(",");return JSON.parse(e.slice(r+1))}return e}},Symbol.toStringTag,{value:"Module"}));const D9=4,L8=0,z8=1,T9=2;function td(e){let r=e.length;for(;--r>=0;)e[r]=0}const k9=0,U8=1,A9=2,O9=3,R9=258,Hb=29,Dh=256,Th=Dh+1+Hb,nd=30,Vb=19,j8=2*Th+1,gc=15,$b=16,F9=7,Yb=256,I8=16,H8=17,V8=18,qb=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),hg=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),N9=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),$8=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),M9=512,as=new Array((Th+2)*2);td(as);const kh=new Array(nd*2);td(kh);const Ah=new Array(M9);td(Ah);const Oh=new Array(R9-O9+1);td(Oh);const Gb=new Array(Hb);td(Gb);const pg=new Array(nd);td(pg);function Kb(e,r,t,i,l){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let Y8,q8,G8;function Wb(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const K8=e=>e<256?Ah[e]:Ah[256+(e>>>7)],Rh=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},oi=(e,r,t)=>{e.bi_valid>$b-t?(e.bi_buf|=r<<e.bi_valid&65535,Rh(e,e.bi_buf),e.bi_buf=r>>$b-e.bi_valid,e.bi_valid+=t-$b):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)},ol=(e,r,t)=>{oi(e,t[r*2],t[r*2+1])},W8=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},P9=e=>{e.bi_valid===16?(Rh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},B9=(e,r)=>{const t=r.dyn_tree,i=r.max_code,l=r.stat_desc.static_tree,f=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,g=r.stat_desc.max_length;let d,m,C,b,x,_,T=0;for(b=0;b<=gc;b++)e.bl_count[b]=0;for(t[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<j8;d++)m=e.heap[d],b=t[t[m*2+1]*2+1]+1,b>g&&(b=g,T++),t[m*2+1]=b,!(m>i)&&(e.bl_count[b]++,x=0,m>=p&&(x=c[m-p]),_=t[m*2],e.opt_len+=_*(b+x),f&&(e.static_len+=_*(l[m*2+1]+x)));if(T!==0){do{for(b=g-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[g]--,T-=2}while(T>0);for(b=g;b!==0;b--)for(m=e.bl_count[b];m!==0;)C=e.heap[--d],!(C>i)&&(t[C*2+1]!==b&&(e.opt_len+=(b-t[C*2+1])*t[C*2],t[C*2+1]=b),m--)}},Q8=(e,r,t)=>{const i=new Array(gc+1);let l=0,f,c;for(f=1;f<=gc;f++)l=l+t[f-1]<<1,i[f]=l;for(c=0;c<=r;c++){let p=e[c*2+1];p!==0&&(e[c*2]=W8(i[p]++,p))}},L9=()=>{let e,r,t,i,l;const f=new Array(gc+1);for(t=0,i=0;i<Hb-1;i++)for(Gb[i]=t,e=0;e<1<<qb[i];e++)Oh[t++]=i;for(Oh[t-1]=i,l=0,i=0;i<16;i++)for(pg[i]=l,e=0;e<1<<hg[i];e++)Ah[l++]=i;for(l>>=7;i<nd;i++)for(pg[i]=l<<7,e=0;e<1<<hg[i]-7;e++)Ah[256+l++]=i;for(r=0;r<=gc;r++)f[r]=0;for(e=0;e<=143;)as[e*2+1]=8,e++,f[8]++;for(;e<=255;)as[e*2+1]=9,e++,f[9]++;for(;e<=279;)as[e*2+1]=7,e++,f[7]++;for(;e<=287;)as[e*2+1]=8,e++,f[8]++;for(Q8(as,Th+1,f),e=0;e<nd;e++)kh[e*2+1]=5,kh[e*2]=W8(e,5);Y8=new Kb(as,qb,Dh+1,Th,gc),q8=new Kb(kh,hg,0,nd,gc),G8=new Kb(new Array(0),N9,0,Vb,F9)},Z8=e=>{let r;for(r=0;r<Th;r++)e.dyn_ltree[r*2]=0;for(r=0;r<nd;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Vb;r++)e.bl_tree[r*2]=0;e.dyn_ltree[Yb*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},X8=e=>{e.bi_valid>8?Rh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},J8=(e,r,t,i)=>{const l=r*2,f=t*2;return e[l]<e[f]||e[l]===e[f]&&i[r]<=i[t]},Qb=(e,r,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&J8(r,e.heap[l+1],e.heap[l],e.depth)&&l++,!J8(r,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},e5=(e,r,t)=>{let i,l,f=0,c,p;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+f++]&255,i+=(e.pending_buf[e.sym_buf+f++]&255)<<8,l=e.pending_buf[e.sym_buf+f++],i===0?ol(e,l,r):(c=Oh[l],ol(e,c+Dh+1,r),p=qb[c],p!==0&&(l-=Gb[c],oi(e,l,p)),i--,c=K8(i),ol(e,c,t),p=hg[c],p!==0&&(i-=pg[c],oi(e,i,p)));while(f<e.sym_next);ol(e,Yb,r)},Zb=(e,r)=>{const t=r.dyn_tree,i=r.stat_desc.static_tree,l=r.stat_desc.has_stree,f=r.stat_desc.elems;let c,p,g=-1,d;for(e.heap_len=0,e.heap_max=j8,c=0;c<f;c++)t[c*2]!==0?(e.heap[++e.heap_len]=g=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=g<2?++g:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,l&&(e.static_len-=i[d*2+1]);for(r.max_code=g,c=e.heap_len>>1;c>=1;c--)Qb(e,t,c);d=f;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Qb(e,t,1),p=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=p,t[d*2]=t[c*2]+t[p*2],e.depth[d]=(e.depth[c]>=e.depth[p]?e.depth[c]:e.depth[p])+1,t[c*2+1]=t[p*2+1]=d,e.heap[1]=d++,Qb(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],B9(e,r),Q8(t,g,e.bl_count)},t5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)&&(p<d?e.bl_tree[f*2]+=p:f!==0?(f!==l&&e.bl_tree[f*2]++,e.bl_tree[I8*2]++):p<=10?e.bl_tree[H8*2]++:e.bl_tree[V8*2]++,p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4))},n5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),i=0;i<=t;i++)if(f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)){if(p<d)do ol(e,f,e.bl_tree);while(--p!==0);else f!==0?(f!==l&&(ol(e,f,e.bl_tree),p--),ol(e,I8,e.bl_tree),oi(e,p-3,2)):p<=10?(ol(e,H8,e.bl_tree),oi(e,p-3,3)):(ol(e,V8,e.bl_tree),oi(e,p-11,7));p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4)}},z9=e=>{let r;for(t5(e,e.dyn_ltree,e.l_desc.max_code),t5(e,e.dyn_dtree,e.d_desc.max_code),Zb(e,e.bl_desc),r=Vb-1;r>=3&&e.bl_tree[$8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},U9=(e,r,t,i)=>{let l;for(oi(e,r-257,5),oi(e,t-1,5),oi(e,i-4,4),l=0;l<i;l++)oi(e,e.bl_tree[$8[l]*2+1],3);n5(e,e.dyn_ltree,r-1),n5(e,e.dyn_dtree,t-1)},j9=e=>{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return L8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return z8;for(t=32;t<Dh;t++)if(e.dyn_ltree[t*2]!==0)return z8;return L8};let r5=!1;const I9=e=>{r5||(L9(),r5=!0),e.l_desc=new Wb(e.dyn_ltree,Y8),e.d_desc=new Wb(e.dyn_dtree,q8),e.bl_desc=new Wb(e.bl_tree,G8),e.bi_buf=0,e.bi_valid=0,Z8(e)},a5=(e,r,t,i)=>{oi(e,(k9<<1)+(i?1:0),3),X8(e),Rh(e,t),Rh(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},H9=e=>{oi(e,U8<<1,3),ol(e,Yb,as),P9(e)},V9=(e,r,t,i)=>{let l,f,c=0;e.level>0?(e.strm.data_type===T9&&(e.strm.data_type=j9(e)),Zb(e,e.l_desc),Zb(e,e.d_desc),c=z9(e),l=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=l&&(l=f)):l=f=t+5,t+4<=l&&r!==-1?a5(e,r,t,i):e.strategy===D9||f===l?(oi(e,(U8<<1)+(i?1:0),3),e5(e,as,kh)):(oi(e,(A9<<1)+(i?1:0),3),U9(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),e5(e,e.dyn_ltree,e.dyn_dtree)),Z8(e),i&&X8(e)},$9=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(Oh[t]+Dh+1)*2]++,e.dyn_dtree[K8(r)*2]++),e.sym_next===e.sym_end);var Y9=I9,q9=a5,G9=V9,K9=$9,W9=H9,Q9={_tr_init:Y9,_tr_stored_block:q9,_tr_flush_block:G9,_tr_tally:K9,_tr_align:W9},Fh=(e,r,t,i)=>{let l=e&65535|0,f=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do l=l+r[i++]|0,f=f+l|0;while(--c);l%=65521,f%=65521}return l|f<<16|0};const Z9=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},X9=new Uint32Array(Z9());var Xr=(e,r,t,i)=>{const l=X9,f=i+t;e^=-1;for(let c=i;c<f;c++)e=e>>>8^l[(e^r[c])&255];return e^-1},yc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},xc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:J9,_tr_stored_block:Xb,_tr_flush_block:eN,_tr_tally:nu,_tr_align:tN}=Q9,{Z_NO_FLUSH:ru,Z_PARTIAL_FLUSH:nN,Z_FULL_FLUSH:rN,Z_FINISH:Zi,Z_BLOCK:i5,Z_OK:da,Z_STREAM_END:o5,Z_STREAM_ERROR:ll,Z_DATA_ERROR:aN,Z_BUF_ERROR:Jb,Z_DEFAULT_COMPRESSION:iN,Z_FILTERED:oN,Z_HUFFMAN_ONLY:vg,Z_RLE:lN,Z_FIXED:sN,Z_DEFAULT_STRATEGY:uN,Z_UNKNOWN:cN,Z_DEFLATED:mg}=xc,fN=9,dN=15,hN=8,pN=29,e2=256+1+pN,vN=30,mN=19,gN=2*e2+1,yN=15,Kt=3,au=258,sl=au+Kt+1,xN=32,rd=42,t2=57,n2=69,r2=73,a2=91,i2=103,bc=113,Nh=666,Ha=1,ad=2,Cc=3,id=4,bN=3,wc=(e,r)=>(e.msg=yc[r],r),l5=e=>e*2-(e>4?9:0),iu=e=>{let r=e.length;for(;--r>=0;)e[r]=0},CN=e=>{let r,t,i,l=e.w_size;r=e.hash_size,i=r;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--r);r=l,i=r;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--r)};let ou=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask;const Oi=e=>{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},Ri=(e,r)=>{eN(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Oi(e.strm)},dn=(e,r)=>{e.pending_buf[e.pending++]=r},Mh=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},o2=(e,r,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,r.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=Fh(e.adler,r,l,t):e.state.wrap===2&&(e.adler=Xr(e.adler,r,l,t)),e.next_in+=l,e.total_in+=l,l)},s5=(e,r)=>{let t=e.max_chain_length,i=e.strstart,l,f,c=e.prev_length,p=e.nice_match;const g=e.strstart>e.w_size-sl?e.strstart-(e.w_size-sl):0,d=e.window,m=e.w_mask,C=e.prev,b=e.strstart+au;let x=d[i+c-1],_=d[i+c];e.prev_length>=e.good_match&&(t>>=2),p>e.lookahead&&(p=e.lookahead);do if(l=r,!(d[l+c]!==_||d[l+c-1]!==x||d[l]!==d[i]||d[++l]!==d[i+1])){i+=2,l++;do;while(d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&i<b);if(f=au-(b-i),i=b-au,f>c){if(e.match_start=r,c=f,f>=p)break;x=d[i+c-1],_=d[i+c]}}while((r=C[r&m])>g&&--t!==0);return c<=e.lookahead?c:e.lookahead},od=e=>{const r=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-sl)&&(e.window.set(e.window.subarray(r,r+r-i),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),CN(e),i+=r),e.strm.avail_in===0)break;if(t=o2(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=Kt)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=ou(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=ou(e,e.ins_h,e.window[l+Kt-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<Kt)););}while(e.lookahead<sl&&e.strm.avail_in!==0)},u5=(e,r)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,f,c=0,p=e.strm.avail_in;do{if(i=65535,f=e.bi_valid+42>>3,e.strm.avail_out<f||(f=e.strm.avail_out-f,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>f&&(i=f),i<t&&(i===0&&r!==Zi||r===ru||i!==l+e.strm.avail_in)))break;c=r===Zi&&i===l+e.strm.avail_in?1:0,Xb(e,0,0,c),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Oi(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(o2(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(c===0);return p-=e.strm.avail_in,p&&(p>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=p&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-p,e.strm.next_in),e.strstart),e.strstart+=p,e.insert+=p>e.w_size-e.insert?e.w_size-e.insert:p),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?id:r!==ru&&r!==Zi&&e.strm.avail_in===0&&e.strstart===e.block_start?ad:(f=e.window_size-e.strstart,e.strm.avail_in>f&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,f+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),f>e.strm.avail_in&&(f=e.strm.avail_in),f&&(o2(e.strm,e.window,e.strstart,f),e.strstart+=f,e.insert+=f>e.w_size-e.insert?e.w_size-e.insert:f),e.high_water<e.strstart&&(e.high_water=e.strstart),f=e.bi_valid+42>>3,f=e.pending_buf_size-f>65535?65535:e.pending_buf_size-f,t=f>e.w_size?e.w_size:f,l=e.strstart-e.block_start,(l>=t||(l||r===Zi)&&r!==ru&&e.strm.avail_in===0&&l<=f)&&(i=l>f?f:l,c=r===Zi&&e.strm.avail_in===0&&i===l?1:0,Xb(e,e.block_start,i,c),e.block_start+=i,Oi(e.strm)),c?Cc:Ha)},l2=(e,r)=>{let t,i;for(;;){if(e.lookahead<sl){if(od(e),e.lookahead<sl&&r===ru)return Ha;if(e.lookahead===0)break}if(t=0,e.lookahead>=Kt&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-sl&&(e.match_length=s5(e,t)),e.match_length>=Kt)if(i=nu(e,e.strstart-e.match_start,e.match_length-Kt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Kt){e.match_length--;do e.strstart++,e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ou(e,e.ins_h,e.window[e.strstart+1]);else i=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=e.strstart<Kt-1?e.strstart:Kt-1,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},ld=(e,r)=>{let t,i,l;for(;;){if(e.lookahead<sl){if(od(e),e.lookahead<sl&&r===ru)return Ha;if(e.lookahead===0)break}if(t=0,e.lookahead>=Kt&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Kt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-sl&&(e.match_length=s5(e,t),e.match_length<=5&&(e.strategy===oN||e.match_length===Kt&&e.strstart-e.match_start>4096)&&(e.match_length=Kt-1)),e.prev_length>=Kt&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-Kt,i=nu(e,e.strstart-1-e.prev_match,e.prev_length-Kt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=ou(e,e.ins_h,e.window[e.strstart+Kt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Kt-1,e.strstart++,i&&(Ri(e,!1),e.strm.avail_out===0))return Ha}else if(e.match_available){if(i=nu(e,0,e.window[e.strstart-1]),i&&Ri(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ha}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=nu(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Kt-1?e.strstart:Kt-1,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},wN=(e,r)=>{let t,i,l,f;const c=e.window;for(;;){if(e.lookahead<=au){if(od(e),e.lookahead<=au&&r===ru)return Ha;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Kt&&e.strstart>0&&(l=e.strstart-1,i=c[l],i===c[++l]&&i===c[++l]&&i===c[++l])){f=e.strstart+au;do;while(i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&l<f);e.match_length=au-(f-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Kt?(t=nu(e,1,e.match_length-Kt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=0,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad},_N=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(od(e),e.lookahead===0)){if(r===ru)return Ha;break}if(e.match_length=0,t=nu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Ri(e,!1),e.strm.avail_out===0))return Ha}return e.insert=0,r===Zi?(Ri(e,!0),e.strm.avail_out===0?Cc:id):e.sym_next&&(Ri(e,!1),e.strm.avail_out===0)?Ha:ad};function ul(e,r,t,i,l){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=l}const Ph=[new ul(0,0,0,0,u5),new ul(4,4,8,4,l2),new ul(4,5,16,8,l2),new ul(4,6,32,32,l2),new ul(4,4,16,16,ld),new ul(8,16,32,32,ld),new ul(8,16,128,128,ld),new ul(8,32,128,256,ld),new ul(32,128,258,1024,ld),new ul(32,258,258,4096,ld)],SN=e=>{e.window_size=2*e.w_size,iu(e.head),e.max_lazy_match=Ph[e.level].max_lazy,e.good_match=Ph[e.level].good_length,e.nice_match=Ph[e.level].nice_length,e.max_chain_length=Ph[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Kt-1,e.match_available=0,e.ins_h=0};function EN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=mg,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(gN*2),this.dyn_dtree=new Uint16Array((2*vN+1)*2),this.bl_tree=new Uint16Array((2*mN+1)*2),iu(this.dyn_ltree),iu(this.dyn_dtree),iu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(yN+1),this.heap=new Uint16Array(2*e2+1),iu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*e2+1),iu(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Bh=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==rd&&r.status!==t2&&r.status!==n2&&r.status!==r2&&r.status!==a2&&r.status!==i2&&r.status!==bc&&r.status!==Nh?1:0},c5=e=>{if(Bh(e))return wc(e,ll);e.total_in=e.total_out=0,e.data_type=cN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?t2:r.wrap?rd:bc,e.adler=r.wrap===2?0:1,r.last_flush=-2,J9(r),da},f5=e=>{const r=c5(e);return r===da&&SN(e.state),r},DN=(e,r)=>Bh(e)||e.state.wrap!==2?ll:(e.state.gzhead=r,da),d5=(e,r,t,i,l,f)=>{if(!e)return ll;let c=1;if(r===iN&&(r=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),l<1||l>fN||t!==mg||i<8||i>15||r<0||r>9||f<0||f>sN||i===8&&c!==1)return wc(e,ll);i===8&&(i=9);const p=new EN;return e.state=p,p.strm=e,p.status=rd,p.wrap=c,p.gzhead=null,p.w_bits=i,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=l+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+Kt-1)/Kt),p.window=new Uint8Array(p.w_size*2),p.head=new Uint16Array(p.hash_size),p.prev=new Uint16Array(p.w_size),p.lit_bufsize=1<<l+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new Uint8Array(p.pending_buf_size),p.sym_buf=p.lit_bufsize,p.sym_end=(p.lit_bufsize-1)*3,p.level=r,p.strategy=f,p.method=t,f5(e)},TN=(e,r)=>d5(e,r,mg,dN,hN,uN),kN=(e,r)=>{if(Bh(e)||r>i5||r<0)return e?wc(e,ll):ll;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Nh&&r!==Zi)return wc(e,e.avail_out===0?Jb:ll);const i=t.last_flush;if(t.last_flush=r,t.pending!==0){if(Oi(e),e.avail_out===0)return t.last_flush=-1,da}else if(e.avail_in===0&&l5(r)<=l5(i)&&r!==Zi)return wc(e,Jb);if(t.status===Nh&&e.avail_in!==0)return wc(e,Jb);if(t.status===rd&&t.wrap===0&&(t.status=bc),t.status===rd){let l=mg+(t.w_bits-8<<4)<<8,f=-1;if(t.strategy>=vg||t.level<2?f=0:t.level<6?f=1:t.level===6?f=2:f=3,l|=f<<6,t.strstart!==0&&(l|=xN),l+=31-l%31,Mh(t,l),t.strstart!==0&&(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),e.adler=1,t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(t.status===t2){if(e.adler=0,dn(t,31),dn(t,139),dn(t,8),t.gzhead)dn(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),dn(t,t.gzhead.time&255),dn(t,t.gzhead.time>>8&255),dn(t,t.gzhead.time>>16&255),dn(t,t.gzhead.time>>24&255),dn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),dn(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(dn(t,t.gzhead.extra.length&255),dn(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=Xr(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=n2;else if(dn(t,0),dn(t,0),dn(t,0),dn(t,0),dn(t,0),dn(t,t.level===9?2:t.strategy>=vg||t.level<2?4:0),dn(t,bN),t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(t.status===n2){if(t.gzhead.extra){let l=t.pending,f=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+f>t.pending_buf_size;){let p=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+p),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=p,Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0,f-=p}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+f),t.pending),t.pending+=f,t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=r2}if(t.status===r2){if(t.gzhead.name){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0}t.gzindex<t.gzhead.name.length?f=t.gzhead.name.charCodeAt(t.gzindex++)&255:f=0,dn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=a2}if(t.status===a2){if(t.gzhead.comment){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l)),Oi(e),t.pending!==0)return t.last_flush=-1,da;l=0}t.gzindex<t.gzhead.comment.length?f=t.gzhead.comment.charCodeAt(t.gzindex++)&255:f=0,dn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Xr(e.adler,t.pending_buf,t.pending-l,l))}t.status=i2}if(t.status===i2){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Oi(e),t.pending!==0))return t.last_flush=-1,da;dn(t,e.adler&255),dn(t,e.adler>>8&255),e.adler=0}if(t.status=bc,Oi(e),t.pending!==0)return t.last_flush=-1,da}if(e.avail_in!==0||t.lookahead!==0||r!==ru&&t.status!==Nh){let l=t.level===0?u5(t,r):t.strategy===vg?_N(t,r):t.strategy===lN?wN(t,r):Ph[t.level].func(t,r);if((l===Cc||l===id)&&(t.status=Nh),l===Ha||l===Cc)return e.avail_out===0&&(t.last_flush=-1),da;if(l===ad&&(r===nN?tN(t):r!==i5&&(Xb(t,0,0,!1),r===rN&&(iu(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Oi(e),e.avail_out===0))return t.last_flush=-1,da}return r!==Zi?da:t.wrap<=0?o5:(t.wrap===2?(dn(t,e.adler&255),dn(t,e.adler>>8&255),dn(t,e.adler>>16&255),dn(t,e.adler>>24&255),dn(t,e.total_in&255),dn(t,e.total_in>>8&255),dn(t,e.total_in>>16&255),dn(t,e.total_in>>24&255)):(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),Oi(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?da:o5)},AN=e=>{if(Bh(e))return ll;const r=e.state.status;return e.state=null,r===bc?wc(e,aN):da},ON=(e,r)=>{let t=r.length;if(Bh(e))return ll;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==rd||i.lookahead)return ll;if(l===1&&(e.adler=Fh(e.adler,r,t,0)),i.wrap=0,t>=i.w_size){l===0&&(iu(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(r.subarray(t-i.w_size,t),0),r=g,t=i.w_size}const f=e.avail_in,c=e.next_in,p=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,od(i);i.lookahead>=Kt;){let g=i.strstart,d=i.lookahead-(Kt-1);do i.ins_h=ou(i,i.ins_h,i.window[g+Kt-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--d);i.strstart=g,i.lookahead=Kt-1,od(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Kt-1,i.match_available=0,e.next_in=c,e.input=p,e.avail_in=f,i.wrap=l,da};var RN=TN,FN=d5,NN=f5,MN=c5,PN=DN,BN=kN,LN=AN,zN=ON,UN="pako deflate (from Nodeca project)",Lh={deflateInit:RN,deflateInit2:FN,deflateReset:NN,deflateResetKeep:MN,deflateSetHeader:PN,deflate:BN,deflateEnd:LN,deflateSetDictionary:zN,deflateInfo:UN};const jN=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var IN=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)jN(t,i)&&(e[i]=t[i])}}return e},HN=e=>{let r=0;for(let i=0,l=e.length;i<l;i++)r+=e[i].length;const t=new Uint8Array(r);for(let i=0,l=0,f=e.length;i<f;i++){let c=e[i];t.set(c,l),l+=c.length}return t},gg={assign:IN,flattenChunks:HN};let h5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{h5=!1}const zh=new Uint8Array(256);for(let e=0;e<256;e++)zh[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;zh[254]=zh[254]=1;var VN=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,i,l,f,c=e.length,p=0;for(l=0;l<c;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),p+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(p),f=0,l=0;f<p;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?r[f++]=t:t<2048?(r[f++]=192|t>>>6,r[f++]=128|t&63):t<65536?(r[f++]=224|t>>>12,r[f++]=128|t>>>6&63,r[f++]=128|t&63):(r[f++]=240|t>>>18,r[f++]=128|t>>>12&63,r[f++]=128|t>>>6&63,r[f++]=128|t&63);return r};const $N=(e,r)=>{if(r<65534&&e.subarray&&h5)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t};var YN=(e,r)=>{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let i,l;const f=new Array(t*2);for(l=0,i=0;i<t;){let c=e[i++];if(c<128){f[l++]=c;continue}let p=zh[c];if(p>4){f[l++]=65533,i+=p-1;continue}for(c&=p===2?31:p===3?15:7;p>1&&i<t;)c=c<<6|e[i++]&63,p--;if(p>1){f[l++]=65533;continue}c<65536?f[l++]=c:(c-=65536,f[l++]=55296|c>>10&1023,f[l++]=56320|c&1023)}return $N(f,l)},qN=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+zh[e[t]]>r?t:r},Uh={string2buf:VN,buf2string:YN,utf8border:qN};function GN(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var p5=GN;const v5=Object.prototype.toString,{Z_NO_FLUSH:KN,Z_SYNC_FLUSH:WN,Z_FULL_FLUSH:QN,Z_FINISH:ZN,Z_OK:yg,Z_STREAM_END:XN,Z_DEFAULT_COMPRESSION:JN,Z_DEFAULT_STRATEGY:eM,Z_DEFLATED:tM}=xc;function jh(e){this.options=gg.assign({level:JN,method:tM,chunkSize:16384,windowBits:15,memLevel:8,strategy:eM},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p5,this.strm.avail_out=0;let t=Lh.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==yg)throw new Error(yc[t]);if(r.header&&Lh.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=Uh.string2buf(r.dictionary):v5.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=Lh.deflateSetDictionary(this.strm,i),t!==yg)throw new Error(yc[t]);this._dict_set=!0}}jh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize;let l,f;if(this.ended)return!1;for(r===~~r?f=r:f=r===!0?ZN:KN,typeof e=="string"?t.input=Uh.string2buf(e):v5.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(f===WN||f===QN)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=Lh.deflate(t,f),l===XN)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=Lh.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===yg;if(t.avail_out===0){this.onData(t.output);continue}if(f>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},jh.prototype.onData=function(e){this.chunks.push(e)},jh.prototype.onEnd=function(e){e===yg&&(this.result=gg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function s2(e,r){const t=new jh(r);if(t.push(e,!0),t.err)throw t.msg||yc[t.err];return t.result}function nM(e,r){return r=r||{},r.raw=!0,s2(e,r)}function rM(e,r){return r=r||{},r.gzip=!0,s2(e,r)}var aM=jh,iM=s2,oM=nM,lM=rM,sM=xc,uM={Deflate:aM,deflate:iM,deflateRaw:oM,gzip:lM,constants:sM};const xg=16209,cM=16191;var fM=function(r,t){let i,l,f,c,p,g,d,m,C,b,x,_,T,E,A,k,D,R,N,z,M,I,Y,B;const P=r.state;i=r.next_in,Y=r.input,l=i+(r.avail_in-5),f=r.next_out,B=r.output,c=f-(t-r.avail_out),p=f+(r.avail_out-257),g=P.dmax,d=P.wsize,m=P.whave,C=P.wnext,b=P.window,x=P.hold,_=P.bits,T=P.lencode,E=P.distcode,A=(1<<P.lenbits)-1,k=(1<<P.distbits)-1;e:do{_<15&&(x+=Y[i++]<<_,_+=8,x+=Y[i++]<<_,_+=8),D=T[x&A];t:for(;;){if(R=D>>>24,x>>>=R,_-=R,R=D>>>16&255,R===0)B[f++]=D&65535;else if(R&16){N=D&65535,R&=15,R&&(_<R&&(x+=Y[i++]<<_,_+=8),N+=x&(1<<R)-1,x>>>=R,_-=R),_<15&&(x+=Y[i++]<<_,_+=8,x+=Y[i++]<<_,_+=8),D=E[x&k];n:for(;;){if(R=D>>>24,x>>>=R,_-=R,R=D>>>16&255,R&16){if(z=D&65535,R&=15,_<R&&(x+=Y[i++]<<_,_+=8,_<R&&(x+=Y[i++]<<_,_+=8)),z+=x&(1<<R)-1,z>g){r.msg="invalid distance too far back",P.mode=xg;break e}if(x>>>=R,_-=R,R=f-c,z>R){if(R=z-R,R>m&&P.sane){r.msg="invalid distance too far back",P.mode=xg;break e}if(M=0,I=b,C===0){if(M+=d-R,R<N){N-=R;do B[f++]=b[M++];while(--R);M=f-z,I=B}}else if(C<R){if(M+=d+C-R,R-=C,R<N){N-=R;do B[f++]=b[M++];while(--R);if(M=0,C<N){R=C,N-=R;do B[f++]=b[M++];while(--R);M=f-z,I=B}}}else if(M+=C-R,R<N){N-=R;do B[f++]=b[M++];while(--R);M=f-z,I=B}for(;N>2;)B[f++]=I[M++],B[f++]=I[M++],B[f++]=I[M++],N-=3;N&&(B[f++]=I[M++],N>1&&(B[f++]=I[M++]))}else{M=f-z;do B[f++]=B[M++],B[f++]=B[M++],B[f++]=B[M++],N-=3;while(N>2);N&&(B[f++]=B[M++],N>1&&(B[f++]=B[M++]))}}else if(R&64){r.msg="invalid distance code",P.mode=xg;break e}else{D=E[(D&65535)+(x&(1<<R)-1)];continue n}break}}else if(R&64)if(R&32){P.mode=cM;break e}else{r.msg="invalid literal/length code",P.mode=xg;break e}else{D=T[(D&65535)+(x&(1<<R)-1)];continue t}break}}while(i<l&&f<p);N=_>>3,i-=N,_-=N<<3,x&=(1<<_)-1,r.next_in=i,r.next_out=f,r.avail_in=i<l?5+(l-i):5-(i-l),r.avail_out=f<p?257+(p-f):257-(f-p),P.hold=x,P.bits=_};const sd=15,m5=852,g5=592,y5=0,u2=1,x5=2,dM=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),hM=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),pM=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),vM=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Ih=(e,r,t,i,l,f,c,p)=>{const g=p.bits;let d=0,m=0,C=0,b=0,x=0,_=0,T=0,E=0,A=0,k=0,D,R,N,z,M,I=null,Y;const B=new Uint16Array(sd+1),P=new Uint16Array(sd+1);let U=null,H,V,K;for(d=0;d<=sd;d++)B[d]=0;for(m=0;m<i;m++)B[r[t+m]]++;for(x=g,b=sd;b>=1&&B[b]===0;b--);if(x>b&&(x=b),b===0)return l[f++]=1<<24|64<<16|0,l[f++]=1<<24|64<<16|0,p.bits=1,0;for(C=1;C<b&&B[C]===0;C++);for(x<C&&(x=C),E=1,d=1;d<=sd;d++)if(E<<=1,E-=B[d],E<0)return-1;if(E>0&&(e===y5||b!==1))return-1;for(P[1]=0,d=1;d<sd;d++)P[d+1]=P[d]+B[d];for(m=0;m<i;m++)r[t+m]!==0&&(c[P[r[t+m]]++]=m);if(e===y5?(I=U=c,Y=20):e===u2?(I=dM,U=hM,Y=257):(I=pM,U=vM,Y=0),k=0,m=0,d=C,M=f,_=x,T=0,N=-1,A=1<<x,z=A-1,e===u2&&A>m5||e===x5&&A>g5)return 1;for(;;){H=d-T,c[m]+1<Y?(V=0,K=c[m]):c[m]>=Y?(V=U[c[m]-Y],K=I[c[m]-Y]):(V=32+64,K=0),D=1<<d-T,R=1<<_,C=R;do R-=D,l[M+(k>>T)+R]=H<<24|V<<16|K|0;while(R!==0);for(D=1<<d-1;k&D;)D>>=1;if(D!==0?(k&=D-1,k+=D):k=0,m++,--B[d]===0){if(d===b)break;d=r[t+c[m]]}if(d>x&&(k&z)!==N){for(T===0&&(T=x),M+=C,_=d-T,E=1<<_;_+T<b&&(E-=B[_+T],!(E<=0));)_++,E<<=1;if(A+=1<<_,e===u2&&A>m5||e===x5&&A>g5)return 1;N=k&z,l[N]=x<<24|_<<16|M-f|0}}return k!==0&&(l[M+k]=d-T<<24|64<<16|0),p.bits=x,0};const mM=0,b5=1,C5=2,{Z_FINISH:w5,Z_BLOCK:gM,Z_TREES:bg,Z_OK:_c,Z_STREAM_END:yM,Z_NEED_DICT:xM,Z_STREAM_ERROR:Xi,Z_DATA_ERROR:_5,Z_MEM_ERROR:S5,Z_BUF_ERROR:bM,Z_DEFLATED:E5}=xc,Cg=16180,D5=16181,T5=16182,k5=16183,A5=16184,O5=16185,R5=16186,F5=16187,N5=16188,M5=16189,wg=16190,is=16191,c2=16192,P5=16193,f2=16194,B5=16195,L5=16196,z5=16197,U5=16198,_g=16199,Sg=16200,j5=16201,I5=16202,H5=16203,V5=16204,$5=16205,d2=16206,Y5=16207,q5=16208,er=16209,G5=16210,K5=16211,CM=852,wM=592,_M=15,W5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function SM(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Sc=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<Cg||r.mode>K5?1:0},Q5=e=>{if(Sc(e))return Xi;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Cg,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(CM),r.distcode=r.distdyn=new Int32Array(wM),r.sane=1,r.back=-1,_c},Z5=e=>{if(Sc(e))return Xi;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,Q5(e)},X5=(e,r)=>{let t;if(Sc(e))return Xi;const i=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Xi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,Z5(e))},J5=(e,r)=>{if(!e)return Xi;const t=new SM;e.state=t,t.strm=e,t.window=null,t.mode=Cg;const i=X5(e,r);return i!==_c&&(e.state=null),i},EM=e=>J5(e,_M);let e6=!0,h2,p2;const DM=e=>{if(e6){h2=new Int32Array(512),p2=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Ih(b5,e.lens,0,288,h2,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Ih(C5,e.lens,0,32,p2,0,e.work,{bits:5}),e6=!1}e.lencode=h2,e.lenbits=9,e.distcode=p2,e.distbits=5},t6=(e,r,t,i)=>{let l;const f=e.state;return f.window===null&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new Uint8Array(f.wsize)),i>=f.wsize?(f.window.set(r.subarray(t-f.wsize,t),0),f.wnext=0,f.whave=f.wsize):(l=f.wsize-f.wnext,l>i&&(l=i),f.window.set(r.subarray(t-i,t-i+l),f.wnext),i-=l,i?(f.window.set(r.subarray(t-i,t),0),f.wnext=i,f.whave=f.wsize):(f.wnext+=l,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=l))),0},TM=(e,r)=>{let t,i,l,f,c,p,g,d,m,C,b,x,_,T,E=0,A,k,D,R,N,z,M,I;const Y=new Uint8Array(4);let B,P;const U=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Sc(e)||!e.output||!e.input&&e.avail_in!==0)return Xi;t=e.state,t.mode===is&&(t.mode=c2),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,C=p,b=g,I=_c;e:for(;;)switch(t.mode){case Cg:if(t.wrap===0){t.mode=c2;break}for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,Y[0]=d&255,Y[1]=d>>>8&255,t.check=Xr(t.check,Y,2,0),d=0,m=0,t.mode=D5;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",t.mode=er;break}if((d&15)!==E5){e.msg="unknown compression method",t.mode=er;break}if(d>>>=4,m-=4,M=(d&15)+8,t.wbits===0&&(t.wbits=M),M>15||M>t.wbits){e.msg="invalid window size",t.mode=er;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=d&512?M5:is,d=0,m=0;break;case D5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==E5){e.msg="unknown compression method",t.mode=er;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=er;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(Y[0]=d&255,Y[1]=d>>>8&255,t.check=Xr(t.check,Y,2,0)),d=0,m=0,t.mode=T5;case T5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(Y[0]=d&255,Y[1]=d>>>8&255,Y[2]=d>>>16&255,Y[3]=d>>>24&255,t.check=Xr(t.check,Y,4,0)),d=0,m=0,t.mode=k5;case k5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(Y[0]=d&255,Y[1]=d>>>8&255,t.check=Xr(t.check,Y,2,0)),d=0,m=0,t.mode=A5;case A5:if(t.flags&1024){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(Y[0]=d&255,Y[1]=d>>>8&255,t.check=Xr(t.check,Y,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=O5;case O5:if(t.flags&1024&&(x=t.length,x>p&&(x=p),x&&(t.head&&(M=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(f,f+x),M)),t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),p-=x,f+=x,t.length-=x),t.length))break e;t.length=0,t.mode=R5;case R5:if(t.flags&2048){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.name+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=F5;case F5:if(t.flags&4096){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.comment+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Xr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.comment=null);t.mode=N5;case N5:if(t.flags&512){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=er;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=is;break;case M5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}e.adler=t.check=W5(d),d=0,m=0,t.mode=wg;case wg:if(t.havedict===0)return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,xM;e.adler=t.check=1,t.mode=is;case is:if(r===gM||r===bg)break e;case c2:if(t.last){d>>>=m&7,m-=m&7,t.mode=d2;break}for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=P5;break;case 1:if(DM(t),t.mode=_g,r===bg){d>>>=2,m-=2;break e}break;case 2:t.mode=L5;break;case 3:e.msg="invalid block type",t.mode=er}d>>>=2,m-=2;break;case P5:for(d>>>=m&7,m-=m&7;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=er;break}if(t.length=d&65535,d=0,m=0,t.mode=f2,r===bg)break e;case f2:t.mode=B5;case B5:if(x=t.length,x){if(x>p&&(x=p),x>g&&(x=g),x===0)break e;l.set(i.subarray(f,f+x),c),p-=x,f+=x,g-=x,c+=x,t.length-=x;break}t.mode=is;break;case L5:for(;m<14;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=er;break}t.have=0,t.mode=z5;case z5:for(;t.have<t.ncode;){for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.lens[U[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[U[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,B={bits:t.lenbits},I=Ih(mM,t.lens,0,19,t.lencode,0,t.work,B),t.lenbits=B.bits,I){e.msg="invalid code lengths set",t.mode=er;break}t.have=0,t.mode=U5;case U5:for(;t.have<t.nlen+t.ndist;){for(;E=t.lencode[d&(1<<t.lenbits)-1],A=E>>>24,k=E>>>16&255,D=E&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(D<16)d>>>=A,m-=A,t.lens[t.have++]=D;else{if(D===16){for(P=A+2;m<P;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(d>>>=A,m-=A,t.have===0){e.msg="invalid bit length repeat",t.mode=er;break}M=t.lens[t.have-1],x=3+(d&3),d>>>=2,m-=2}else if(D===17){for(P=A+3;m<P;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=3+(d&7),d>>>=3,m-=3}else{for(P=A+7;m<P;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=11+(d&127),d>>>=7,m-=7}if(t.have+x>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=er;break}for(;x--;)t.lens[t.have++]=M}}if(t.mode===er)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=er;break}if(t.lenbits=9,B={bits:t.lenbits},I=Ih(b5,t.lens,0,t.nlen,t.lencode,0,t.work,B),t.lenbits=B.bits,I){e.msg="invalid literal/lengths set",t.mode=er;break}if(t.distbits=6,t.distcode=t.distdyn,B={bits:t.distbits},I=Ih(C5,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,B),t.distbits=B.bits,I){e.msg="invalid distances set",t.mode=er;break}if(t.mode=_g,r===bg)break e;case _g:t.mode=Sg;case Sg:if(p>=6&&g>=258){e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,fM(e,b),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,t.mode===is&&(t.back=-1);break}for(t.back=0;E=t.lencode[d&(1<<t.lenbits)-1],A=E>>>24,k=E>>>16&255,D=E&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(k&&!(k&240)){for(R=A,N=k,z=D;E=t.lencode[z+((d&(1<<R+N)-1)>>R)],A=E>>>24,k=E>>>16&255,D=E&65535,!(R+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=R,m-=R,t.back+=R}if(d>>>=A,m-=A,t.back+=A,t.length=D,k===0){t.mode=$5;break}if(k&32){t.back=-1,t.mode=is;break}if(k&64){e.msg="invalid literal/length code",t.mode=er;break}t.extra=k&15,t.mode=j5;case j5:if(t.extra){for(P=t.extra;m<P;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=I5;case I5:for(;E=t.distcode[d&(1<<t.distbits)-1],A=E>>>24,k=E>>>16&255,D=E&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(!(k&240)){for(R=A,N=k,z=D;E=t.distcode[z+((d&(1<<R+N)-1)>>R)],A=E>>>24,k=E>>>16&255,D=E&65535,!(R+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=R,m-=R,t.back+=R}if(d>>>=A,m-=A,t.back+=A,k&64){e.msg="invalid distance code",t.mode=er;break}t.offset=D,t.extra=k&15,t.mode=H5;case H5:if(t.extra){for(P=t.extra;m<P;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=er;break}t.mode=V5;case V5:if(g===0)break e;if(x=b-g,t.offset>x){if(x=t.offset-x,x>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=er;break}x>t.wnext?(x-=t.wnext,_=t.wsize-x):_=t.wnext-x,x>t.length&&(x=t.length),T=t.window}else T=l,_=c-t.offset,x=t.length;x>g&&(x=g),g-=x,t.length-=x;do l[c++]=T[_++];while(--x);t.length===0&&(t.mode=Sg);break;case $5:if(g===0)break e;l[c++]=t.length,g--,t.mode=Sg;break;case d2:if(t.wrap){for(;m<32;){if(p===0)break e;p--,d|=i[f++]<<m,m+=8}if(b-=g,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Xr(t.check,l,b,c-b):Fh(t.check,l,b,c-b)),b=g,t.wrap&4&&(t.flags?d:W5(d))!==t.check){e.msg="incorrect data check",t.mode=er;break}d=0,m=0}t.mode=Y5;case Y5:if(t.wrap&&t.flags){for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=er;break}d=0,m=0}t.mode=q5;case q5:I=yM;break e;case er:I=_5;break e;case G5:return S5;case K5:default:return Xi}return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,(t.wsize||b!==e.avail_out&&t.mode<er&&(t.mode<d2||r!==w5))&&t6(e,e.output,e.next_out,b-e.avail_out),C-=e.avail_in,b-=e.avail_out,e.total_in+=C,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Xr(t.check,l,b,e.next_out-b):Fh(t.check,l,b,e.next_out-b)),e.data_type=t.bits+(t.last?64:0)+(t.mode===is?128:0)+(t.mode===_g||t.mode===f2?256:0),(C===0&&b===0||r===w5)&&I===_c&&(I=bM),I},kM=e=>{if(Sc(e))return Xi;let r=e.state;return r.window&&(r.window=null),e.state=null,_c},AM=(e,r)=>{if(Sc(e))return Xi;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,_c):Xi},OM=(e,r)=>{const t=r.length;let i,l,f;return Sc(e)||(i=e.state,i.wrap!==0&&i.mode!==wg)?Xi:i.mode===wg&&(l=1,l=Fh(l,r,t,0),l!==i.check)?_5:(f=t6(e,r,t,t),f?(i.mode=G5,S5):(i.havedict=1,_c))};var RM=Z5,FM=X5,NM=Q5,MM=EM,PM=J5,BM=TM,LM=kM,zM=AM,UM=OM,jM="pako inflate (from Nodeca project)",os={inflateReset:RM,inflateReset2:FM,inflateResetKeep:NM,inflateInit:MM,inflateInit2:PM,inflate:BM,inflateEnd:LM,inflateGetHeader:zM,inflateSetDictionary:UM,inflateInfo:jM};function IM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var HM=IM;const n6=Object.prototype.toString,{Z_NO_FLUSH:VM,Z_FINISH:$M,Z_OK:Hh,Z_STREAM_END:v2,Z_NEED_DICT:m2,Z_STREAM_ERROR:YM,Z_DATA_ERROR:r6,Z_MEM_ERROR:qM}=xc;function Vh(e){this.options=gg.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p5,this.strm.avail_out=0;let t=os.inflateInit2(this.strm,r.windowBits);if(t!==Hh)throw new Error(yc[t]);if(this.header=new HM,os.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Uh.string2buf(r.dictionary):n6.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=os.inflateSetDictionary(this.strm,r.dictionary),t!==Hh)))throw new Error(yc[t])}Vh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let f,c,p;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?$M:VM,n6.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),f=os.inflate(t,c),f===m2&&l&&(f=os.inflateSetDictionary(t,l),f===Hh?f=os.inflate(t,c):f===r6&&(f=m2));t.avail_in>0&&f===v2&&t.state.wrap>0&&e[t.next_in]!==0;)os.inflateReset(t),f=os.inflate(t,c);switch(f){case YM:case r6:case m2:case qM:return this.onEnd(f),this.ended=!0,!1}if(p=t.avail_out,t.next_out&&(t.avail_out===0||f===v2))if(this.options.to==="string"){let g=Uh.utf8border(t.output,t.next_out),d=t.next_out-g,m=Uh.buf2string(t.output,g);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(g,g+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(f===Hh&&p===0)){if(f===v2)return f=os.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},Vh.prototype.onData=function(e){this.chunks.push(e)},Vh.prototype.onEnd=function(e){e===Hh&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=gg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function g2(e,r){const t=new Vh(r);if(t.push(e),t.err)throw t.msg||yc[t.err];return t.result}function GM(e,r){return r=r||{},r.raw=!0,g2(e,r)}var KM=Vh,WM=g2,QM=GM,ZM=g2,XM=xc,JM={Inflate:KM,inflate:WM,inflateRaw:QM,ungzip:ZM,constants:XM};const{Deflate:eP,deflate:tP,deflateRaw:nP,gzip:rP}=uM,{Inflate:aP,inflate:iP,inflateRaw:oP,ungzip:lP}=JM;var sP=eP,uP=tP,cP=nP,fP=rP,dP=aP,hP=iP,pP=oP,vP=lP,mP=xc,gP={Deflate:sP,deflate:uP,deflateRaw:cP,gzip:fP,Inflate:dP,inflate:hP,inflateRaw:pP,ungzip:vP,constants:mP},Ue={};Ue.toRGBA8=function(e){var r=e.width,t=e.height;if(e.tabs.acTL==null)return[Ue.toRGBA8.decodeImage(e.data,r,t,e).buffer];var i=[];e.frames[0].data==null&&(e.frames[0].data=e.data);for(var l=r*t*4,f=new Uint8Array(l),c=new Uint8Array(l),p=new Uint8Array(l),g=0;g<e.frames.length;g++){var d=e.frames[g],m=d.rect.x,C=d.rect.y,b=d.rect.width,x=d.rect.height,_=Ue.toRGBA8.decodeImage(d.data,b,x,e);if(g!=0)for(var T=0;T<l;T++)p[T]=f[T];if(d.blend==0?Ue._copyTile(_,b,x,f,r,t,m,C,0):d.blend==1&&Ue._copyTile(_,b,x,f,r,t,m,C,1),i.push(f.buffer.slice(0)),d.dispose!=0){if(d.dispose==1)Ue._copyTile(c,b,x,f,r,t,m,C,0);else if(d.dispose==2)for(var T=0;T<l;T++)f[T]=p[T]}}return i},Ue.toRGBA8.decodeImage=function(e,r,t,i){var l=r*t,f=Ue.decode._getBPP(i),c=Math.ceil(r*f/8),p=new Uint8Array(l*4),g=new Uint32Array(p.buffer),d=i.ctype,m=i.depth,C=Ue._bin.readUshort;if(d==6){var b=l<<2;if(m==8)for(var x=0;x<b;x+=4)p[x]=e[x],p[x+1]=e[x+1],p[x+2]=e[x+2],p[x+3]=e[x+3];if(m==16)for(var x=0;x<b;x++)p[x]=e[x<<1]}else if(d==2){var _=i.tabs.tRNS;if(_==null){if(m==8)for(var x=0;x<l;x++){var T=x*3;g[x]=255<<24|e[T+2]<<16|e[T+1]<<8|e[T]}if(m==16)for(var x=0;x<l;x++){var T=x*6;g[x]=255<<24|e[T+4]<<16|e[T+2]<<8|e[T]}}else{var E=_[0],A=_[1],k=_[2];if(m==8)for(var x=0;x<l;x++){var D=x<<2,T=x*3;g[x]=255<<24|e[T+2]<<16|e[T+1]<<8|e[T],e[T]==E&&e[T+1]==A&&e[T+2]==k&&(p[D+3]=0)}if(m==16)for(var x=0;x<l;x++){var D=x<<2,T=x*6;g[x]=255<<24|e[T+4]<<16|e[T+2]<<8|e[T],C(e,T)==E&&C(e,T+2)==A&&C(e,T+4)==k&&(p[D+3]=0)}}}else if(d==3){var R=i.tabs.PLTE,N=i.tabs.tRNS,z=N?N.length:0;if(m==1)for(var M=0;M<t;M++)for(var I=M*c,Y=M*r,x=0;x<r;x++){var D=Y+x<<2,B=e[I+(x>>3)]>>7-((x&7)<<0)&1,P=3*B;p[D]=R[P],p[D+1]=R[P+1],p[D+2]=R[P+2],p[D+3]=B<z?N[B]:255}if(m==2)for(var M=0;M<t;M++)for(var I=M*c,Y=M*r,x=0;x<r;x++){var D=Y+x<<2,B=e[I+(x>>2)]>>6-((x&3)<<1)&3,P=3*B;p[D]=R[P],p[D+1]=R[P+1],p[D+2]=R[P+2],p[D+3]=B<z?N[B]:255}if(m==4)for(var M=0;M<t;M++)for(var I=M*c,Y=M*r,x=0;x<r;x++){var D=Y+x<<2,B=e[I+(x>>1)]>>4-((x&1)<<2)&15,P=3*B;p[D]=R[P],p[D+1]=R[P+1],p[D+2]=R[P+2],p[D+3]=B<z?N[B]:255}if(m==8)for(var x=0;x<l;x++){var D=x<<2,B=e[x],P=3*B;p[D]=R[P],p[D+1]=R[P+1],p[D+2]=R[P+2],p[D+3]=B<z?N[B]:255}}else if(d==4){if(m==8)for(var x=0;x<l;x++){var D=x<<2,U=x<<1,H=e[U];p[D]=H,p[D+1]=H,p[D+2]=H,p[D+3]=e[U+1]}if(m==16)for(var x=0;x<l;x++){var D=x<<2,U=x<<2,H=e[U];p[D]=H,p[D+1]=H,p[D+2]=H,p[D+3]=e[U+2]}}else if(d==0)for(var E=i.tabs.tRNS?i.tabs.tRNS:-1,M=0;M<t;M++){var V=M*c,K=M*r;if(m==1)for(var ee=0;ee<r;ee++){var H=255*(e[V+(ee>>>3)]>>>7-(ee&7)&1),J=H==E*255?0:255;g[K+ee]=J<<24|H<<16|H<<8|H}else if(m==2)for(var ee=0;ee<r;ee++){var H=85*(e[V+(ee>>>2)]>>>6-((ee&3)<<1)&3),J=H==E*85?0:255;g[K+ee]=J<<24|H<<16|H<<8|H}else if(m==4)for(var ee=0;ee<r;ee++){var H=17*(e[V+(ee>>>1)]>>>4-((ee&1)<<2)&15),J=H==E*17?0:255;g[K+ee]=J<<24|H<<16|H<<8|H}else if(m==8)for(var ee=0;ee<r;ee++){var H=e[V+ee],J=H==E?0:255;g[K+ee]=J<<24|H<<16|H<<8|H}else if(m==16)for(var ee=0;ee<r;ee++){var H=e[V+(ee<<1)],J=C(e,V+(ee<<x))==E?0:255;g[K+ee]=J<<24|H<<16|H<<8|H}}return p},Ue.decode=function(e){for(var r=new Uint8Array(e),t=8,i=Ue._bin,l=i.readUshort,f=i.readUint,c={tabs:{},frames:[]},p=new Uint8Array(r.length),g=0,d,m=0,C=[137,80,78,71,13,10,26,10],b=0;b<8;b++)if(r[b]!=C[b])throw"The input is not a PNG file!";for(;t<r.length;){var x=i.readUint(r,t);t+=4;var _=i.readASCII(r,t,4);if(t+=4,_=="IHDR")Ue.decode._IHDR(r,t,c);else if(_=="CgBI")c.tabs[_]=r.slice(t,t+4);else if(_=="IDAT"){for(var b=0;b<x;b++)p[g+b]=r[t+b];g+=x}else if(_=="acTL")c.tabs[_]={num_frames:f(r,t),num_plays:f(r,t+4)},d=new Uint8Array(r.length);else if(_=="fcTL"){if(m!=0){var T=c.frames[c.frames.length-1];T.data=Ue.decode._decompress(c,d.slice(0,m),T.rect.width,T.rect.height),m=0}var E={x:f(r,t+12),y:f(r,t+16),width:f(r,t+4),height:f(r,t+8)},A=l(r,t+22);A=l(r,t+20)/(A==0?100:A);var k={rect:E,delay:Math.round(A*1e3),dispose:r[t+24],blend:r[t+25]};c.frames.push(k)}else if(_=="fdAT"){for(var b=0;b<x-4;b++)d[m+b]=r[t+b+4];m+=x-4}else if(_=="pHYs")c.tabs[_]=[i.readUint(r,t),i.readUint(r,t+4),r[t+8]];else if(_=="cHRM"){c.tabs[_]=[];for(var b=0;b<8;b++)c.tabs[_].push(i.readUint(r,t+b*4))}else if(_=="tEXt"||_=="zTXt"){c.tabs[_]==null&&(c.tabs[_]={});var D=i.nextZero(r,t),R=i.readASCII(r,t,D-t),N,z=t+x-D-1;if(_=="tEXt")N=i.readASCII(r,D+1,z);else{var M=Ue.decode._inflate(r.slice(D+2,D+2+z));N=i.readUTF8(M,0,M.length)}c.tabs[_][R]=N}else if(_=="iTXt"){c.tabs[_]==null&&(c.tabs[_]={});var D=0,I=t;D=i.nextZero(r,I);var R=i.readASCII(r,I,D-I);I=D+1;var Y=r[I];r[I+1],I+=2,D=i.nextZero(r,I),i.readASCII(r,I,D-I),I=D+1,D=i.nextZero(r,I),i.readUTF8(r,I,D-I),I=D+1;var N,z=x-(I-t);if(Y==0)N=i.readUTF8(r,I,z);else{var M=Ue.decode._inflate(r.slice(I,I+z));N=i.readUTF8(M,0,M.length)}c.tabs[_][R]=N}else if(_=="PLTE")c.tabs[_]=i.readBytes(r,t,x);else if(_=="hIST"){var B=c.tabs.PLTE.length/3;c.tabs[_]=[];for(var b=0;b<B;b++)c.tabs[_].push(l(r,t+b*2))}else if(_=="tRNS")c.ctype==3?c.tabs[_]=i.readBytes(r,t,x):c.ctype==0?c.tabs[_]=l(r,t):c.ctype==2&&(c.tabs[_]=[l(r,t),l(r,t+2),l(r,t+4)]);else if(_=="gAMA")c.tabs[_]=i.readUint(r,t)/1e5;else if(_=="sRGB")c.tabs[_]=r[t];else if(_=="bKGD")c.ctype==0||c.ctype==4?c.tabs[_]=[l(r,t)]:c.ctype==2||c.ctype==6?c.tabs[_]=[l(r,t),l(r,t+2),l(r,t+4)]:c.ctype==3&&(c.tabs[_]=r[t]);else if(_=="IEND")break;t+=x,i.readUint(r,t),t+=4}if(m!=0){var T=c.frames[c.frames.length-1];T.data=Ue.decode._decompress(c,d.slice(0,m),T.rect.width,T.rect.height),m=0}return c.data=Ue.decode._decompress(c,p,c.width,c.height),delete c.compress,delete c.interlace,delete c.filter,c},Ue.decode._decompress=function(e,r,t,i){var l=Ue.decode._getBPP(e),f=Math.ceil(t*l/8),c=new Uint8Array((f+1+e.interlace)*i);return e.tabs.CgBI?r=Ue.inflateRaw(r,c):r=Ue.decode._inflate(r,c),e.interlace==0?r=Ue.decode._filterZero(r,e,0,t,i):e.interlace==1&&(r=Ue.decode._readInterlace(r,e)),r},Ue.decode._inflate=function(e,r){var t=Ue.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),r);return t},Ue.inflateRaw=function(){var e={};return e.H={},e.H.N=function(r,t){var i=Uint8Array,l=0,f=0,c=0,p=0,g=0,d=0,m=0,C=0,b=0,x,_;if(r[0]==3&&r[1]==0)return t||new i(0);var T=e.H,E=T.b,A=T.e,k=T.R,D=T.n,R=T.A,N=T.Z,z=T.m,M=t==null;for(M&&(t=new i(r.length>>>2<<3));l==0;){if(l=E(r,b,1),f=E(r,b+1,2),b+=3,f==0){b&7&&(b+=8-(b&7));var I=(b>>>3)+4,Y=r[I-4]|r[I-3]<<8;M&&(t=e.H.W(t,C+Y)),t.set(new i(r.buffer,r.byteOffset+I,Y),C),b=I+Y<<3,C+=Y;continue}if(M&&(t=e.H.W(t,C+(1<<17))),f==1&&(x=z.J,_=z.h,d=(1<<9)-1,m=(1<<5)-1),f==2){c=A(r,b,5)+257,p=A(r,b+5,5)+1,g=A(r,b+10,4)+4,b+=14;for(var B=1,P=0;P<38;P+=2)z.Q[P]=0,z.Q[P+1]=0;for(var P=0;P<g;P++){var U=A(r,b+P*3,3);z.Q[(z.X[P]<<1)+1]=U,U>B&&(B=U)}b+=3*g,D(z.Q,B),R(z.Q,B,z.u),x=z.w,_=z.d,b=k(z.u,(1<<B)-1,c+p,r,b,z.v);var H=T.V(z.v,0,c,z.C);d=(1<<H)-1;var V=T.V(z.v,c,p,z.D);m=(1<<V)-1,D(z.C,H),R(z.C,H,x),D(z.D,V),R(z.D,V,_)}for(;;){var K=x[N(r,b)&d];b+=K&15;var ee=K>>>4;if(!(ee>>>8))t[C++]=ee;else{if(ee==256)break;var J=C+ee-254;if(ee>264){var q=z.q[ee-257];J=C+(q>>>3)+A(r,b,q&7),b+=q&7}var te=_[N(r,b)&m];b+=te&15;var Z=te>>>4,$=z.c[Z],ne=($>>>4)+E(r,b,$&15);for(b+=$&15;C<J;)t[C]=t[C++-ne],t[C]=t[C++-ne],t[C]=t[C++-ne],t[C]=t[C++-ne];C=J}}}return t.length==C?t:t.slice(0,C)},e.H.W=function(r,t){var i=r.length;if(t<=i)return r;var l=new Uint8Array(i<<1);return l.set(r,0),l},e.H.R=function(r,t,i,l,f,c){for(var p=e.H.e,g=e.H.Z,d=0;d<i;){var m=r[g(l,f)&t];f+=m&15;var C=m>>>4;if(C<=15)c[d]=C,d++;else{var b=0,x=0;C==16?(x=3+p(l,f,2),f+=2,b=c[d-1]):C==17?(x=3+p(l,f,3),f+=3):C==18&&(x=11+p(l,f,7),f+=7);for(var _=d+x;d<_;)c[d]=b,d++}}return f},e.H.V=function(r,t,i,l){for(var f=0,c=0,p=l.length>>>1;c<i;){var g=r[c+t];l[c<<1]=0,l[(c<<1)+1]=g,g>f&&(f=g),c++}for(;c<p;)l[c<<1]=0,l[(c<<1)+1]=0,c++;return f},e.H.n=function(r,t){for(var i=e.H.m,l=r.length,f,c,p,g,d,m=i.j,g=0;g<=t;g++)m[g]=0;for(g=1;g<l;g+=2)m[r[g]]++;var C=i.K;for(f=0,m[0]=0,c=1;c<=t;c++)f=f+m[c-1]<<1,C[c]=f;for(p=0;p<l;p+=2)d=r[p+1],d!=0&&(r[p]=C[d],C[d]++)},e.H.A=function(r,t,i){for(var l=r.length,f=e.H.m,c=f.r,p=0;p<l;p+=2)if(r[p+1]!=0)for(var g=p>>1,d=r[p+1],m=g<<4|d,C=t-d,b=r[p]<<C,x=b+(1<<C);b!=x;){var _=c[b]>>>15-t;i[_]=m,b++}},e.H.l=function(r,t){for(var i=e.H.m.r,l=15-t,f=0;f<r.length;f+=2){var c=r[f]<<t-r[f+1];r[f]=i[c]>>>l}},e.H.M=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8},e.H.I=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8,r[l+2]|=i>>>16},e.H.e=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},e.H.b=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},e.H.Z=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)},e.H.i=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16|r[(t>>>3)+3]<<24)>>>(t&7)},e.H.m=function(){var r=Uint16Array,t=Uint32Array;return{K:new r(16),j:new r(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new r(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new r(512),_:[],h:new r(32),$:[],w:new r(32768),C:[],v:[],d:new r(32768),D:[],u:new r(512),Q:[],r:new r(1<<15),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new r(1<<16),g:new r(1<<15)}}(),function(){for(var r=e.H.m,t=1<<15,i=0;i<t;i++){var l=i;l=(l&2863311530)>>>1|(l&1431655765)<<1,l=(l&3435973836)>>>2|(l&858993459)<<2,l=(l&4042322160)>>>4|(l&252645135)<<4,l=(l&4278255360)>>>8|(l&16711935)<<8,r.r[i]=(l>>>16|l<<16)>>>17}function f(c,p,g){for(;p--!=0;)c.push(0,g)}for(var i=0;i<32;i++)r.q[i]=r.S[i]<<3|r.T[i],r.c[i]=r.p[i]<<4|r.z[i];f(r._,144,8),f(r._,255-143,9),f(r._,279-255,7),f(r._,287-279,8),e.H.n(r._,9),e.H.A(r._,9,r.J),e.H.l(r._,9),f(r.$,32,5),e.H.n(r.$,5),e.H.A(r.$,5,r.h),e.H.l(r.$,5),f(r.Q,19,0),f(r.C,286,0),f(r.D,30,0),f(r.v,320,0)}(),e.H.N}(),Ue.decode._readInterlace=function(e,r){for(var t=r.width,i=r.height,l=Ue.decode._getBPP(r),f=l>>3,c=Math.ceil(t*l/8),p=new Uint8Array(i*c),g=0,d=[0,0,4,0,2,0,1],m=[0,4,0,2,0,1,0],C=[8,8,8,4,4,2,2],b=[8,8,4,4,2,2,1],x=0;x<7;){for(var _=C[x],T=b[x],E=0,A=0,k=d[x];k<i;)k+=_,A++;for(var D=m[x];D<t;)D+=T,E++;var R=Math.ceil(E*l/8);Ue.decode._filterZero(e,r,g,E,A);for(var N=0,z=d[x];z<i;){for(var M=m[x],I=g+N*R<<3;M<t;){if(l==1){var Y=e[I>>3];Y=Y>>7-(I&7)&1,p[z*c+(M>>3)]|=Y<<7-((M&7)<<0)}if(l==2){var Y=e[I>>3];Y=Y>>6-(I&7)&3,p[z*c+(M>>2)]|=Y<<6-((M&3)<<1)}if(l==4){var Y=e[I>>3];Y=Y>>4-(I&7)&15,p[z*c+(M>>1)]|=Y<<4-((M&1)<<2)}if(l>=8)for(var B=z*c+M*f,P=0;P<f;P++)p[B+P]=e[(I>>3)+P];I+=l,M+=T}N++,z+=_}E*A!=0&&(g+=A*(1+R)),x=x+1}return p},Ue.decode._getBPP=function(e){var r=[1,null,3,1,2,null,4][e.ctype];return r*e.depth},Ue.decode._filterZero=function(e,r,t,i,l){var f=Ue.decode._getBPP(r),c=Math.ceil(i*f/8),p=Ue.decode._paeth;f=Math.ceil(f/8);var g=0,d=1,m=e[t],C=0;if(m>1&&(e[t]=[0,0,1][m-2]),m==3)for(C=f;C<c;C++)e[C+1]=e[C+1]+(e[C+1-f]>>>1)&255;for(var b=0;b<l;b++)if(g=t+b*c,d=g+b+1,m=e[d-1],C=0,m==0)for(;C<c;C++)e[g+C]=e[d+C];else if(m==1){for(;C<f;C++)e[g+C]=e[d+C];for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-f]}else if(m==2)for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-c];else if(m==3){for(;C<f;C++)e[g+C]=e[d+C]+(e[g+C-c]>>>1);for(;C<c;C++)e[g+C]=e[d+C]+(e[g+C-c]+e[g+C-f]>>>1)}else{for(;C<f;C++)e[g+C]=e[d+C]+p(0,e[g+C-c],0);for(;C<c;C++)e[g+C]=e[d+C]+p(e[g+C-f],e[g+C-c],e[g+C-f-c])}return e},Ue.decode._paeth=function(e,r,t){var i=e+r-t,l=i-e,f=i-r,c=i-t;return l*l<=f*f&&l*l<=c*c?e:f*f<=c*c?r:t},Ue.decode._IHDR=function(e,r,t){var i=Ue._bin;t.width=i.readUint(e,r),r+=4,t.height=i.readUint(e,r),r+=4,t.depth=e[r],r++,t.ctype=e[r],r++,t.compress=e[r],r++,t.filter=e[r],r++,t.interlace=e[r],r++},Ue._bin={nextZero:function(e,r){for(;e[r]!=0;)r++;return r},readUshort:function(e,r){return e[r]<<8|e[r+1]},writeUshort:function(e,r,t){e[r]=t>>8&255,e[r+1]=t&255},readUint:function(e,r){return e[r]*(256*256*256)+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=t&255},readASCII:function(e,r,t){for(var i="",l=0;l<t;l++)i+=String.fromCharCode(e[r+l]);return i},writeASCII:function(e,r,t){for(var i=0;i<t.length;i++)e[r+i]=t.charCodeAt(i)},readBytes:function(e,r,t){for(var i=[],l=0;l<t;l++)i.push(e[r+l]);return i},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,t){for(var i="",l,f=0;f<t;f++)i+="%"+Ue._bin.pad(e[r+f].toString(16));try{l=decodeURIComponent(i)}catch{return Ue._bin.readASCII(e,r,t)}return l}},Ue._copyTile=function(e,r,t,i,l,f,c,p,g){for(var d=Math.min(r,l),m=Math.min(t,f),C=0,b=0,x=0;x<m;x++)for(var _=0;_<d;_++)if(c>=0&&p>=0?(C=x*r+_<<2,b=(p+x)*l+c+_<<2):(C=(-p+x)*r-c+_<<2,b=x*l+_<<2),g==0)i[b]=e[C],i[b+1]=e[C+1],i[b+2]=e[C+2],i[b+3]=e[C+3];else if(g==1){var T=e[C+3]*.00392156862745098,E=e[C]*T,A=e[C+1]*T,k=e[C+2]*T,D=i[b+3]*(1/255),R=i[b]*D,N=i[b+1]*D,z=i[b+2]*D,M=1-T,I=T+D*M,Y=I==0?0:1/I;i[b+3]=255*I,i[b+0]=(E+R*M)*Y,i[b+1]=(A+N*M)*Y,i[b+2]=(k+z*M)*Y}else if(g==2){var T=e[C+3],E=e[C],A=e[C+1],k=e[C+2],D=i[b+3],R=i[b],N=i[b+1],z=i[b+2];T==D&&E==R&&A==N&&k==z?(i[b]=0,i[b+1]=0,i[b+2]=0,i[b+3]=0):(i[b]=E,i[b+1]=A,i[b+2]=k,i[b+3]=T)}else if(g==3){var T=e[C+3],E=e[C],A=e[C+1],k=e[C+2],D=i[b+3],R=i[b],N=i[b+1],z=i[b+2];if(T==D&&E==R&&A==N&&k==z)continue;if(T<220&&D>20)return!1}return!0},Ue.encode=function(e,r,t,i,l,f,c){i==null&&(i=0),c==null&&(c=!1);var p=Ue.encode.compress(e,r,t,i,[!1,!1,!1,0,c]);return Ue.encode.compressPNG(p,-1),Ue.encode._main(p,r,t,l,f)},Ue.encodeLL=function(e,r,t,i,l,f,c,p){for(var g={ctype:0+(i==1?0:2)+(l==0?0:4),depth:f,frames:[]},d=(i+l)*f,m=d*r,C=0;C<e.length;C++)g.frames.push({rect:{x:0,y:0,width:r,height:t},img:new Uint8Array(e[C]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(m/8)});Ue.encode.compressPNG(g,0,!0);var b=Ue.encode._main(g,r,t,c,p);return b},Ue.encode._main=function(e,r,t,i,l){l==null&&(l={});var f=Ue.crc.crc,c=Ue._bin.writeUint,p=Ue._bin.writeUshort,g=Ue._bin.writeASCII,d=8,m=e.frames.length>1,C=!1,b=8+(16+5+4)+(m?20:0);if(l.sRGB!=null&&(b+=8+1+4),l.pHYs!=null&&(b+=8+9+4),e.ctype==3){for(var x=e.plte.length,_=0;_<x;_++)e.plte[_]>>>24!=255&&(C=!0);b+=8+x*3+4+(C?8+x*1+4:0)}for(var T=0;T<e.frames.length;T++){var E=e.frames[T];m&&(b+=38),b+=E.cimg.length+12,T!=0&&(b+=4)}b+=12;for(var A=new Uint8Array(b),k=[137,80,78,71,13,10,26,10],_=0;_<8;_++)A[_]=k[_];if(c(A,d,13),d+=4,g(A,d,"IHDR"),d+=4,c(A,d,r),d+=4,c(A,d,t),d+=4,A[d]=e.depth,d++,A[d]=e.ctype,d++,A[d]=0,d++,A[d]=0,d++,A[d]=0,d++,c(A,d,f(A,d-17,17)),d+=4,l.sRGB!=null&&(c(A,d,1),d+=4,g(A,d,"sRGB"),d+=4,A[d]=l.sRGB,d++,c(A,d,f(A,d-5,5)),d+=4),l.pHYs!=null&&(c(A,d,9),d+=4,g(A,d,"pHYs"),d+=4,c(A,d,l.pHYs[0]),d+=4,c(A,d,l.pHYs[1]),d+=4,A[d]=l.pHYs[2],d++,c(A,d,f(A,d-13,13)),d+=4),m&&(c(A,d,8),d+=4,g(A,d,"acTL"),d+=4,c(A,d,e.frames.length),d+=4,c(A,d,l.loop!=null?l.loop:0),d+=4,c(A,d,f(A,d-12,12)),d+=4),e.ctype==3){var x=e.plte.length;c(A,d,x*3),d+=4,g(A,d,"PLTE"),d+=4;for(var _=0;_<x;_++){var D=_*3,R=e.plte[_],N=R&255,z=R>>>8&255,M=R>>>16&255;A[d+D+0]=N,A[d+D+1]=z,A[d+D+2]=M}if(d+=x*3,c(A,d,f(A,d-x*3-4,x*3+4)),d+=4,C){c(A,d,x),d+=4,g(A,d,"tRNS"),d+=4;for(var _=0;_<x;_++)A[d+_]=e.plte[_]>>>24&255;d+=x,c(A,d,f(A,d-x-4,x+4)),d+=4}}for(var I=0,T=0;T<e.frames.length;T++){var E=e.frames[T];m&&(c(A,d,26),d+=4,g(A,d,"fcTL"),d+=4,c(A,d,I++),d+=4,c(A,d,E.rect.width),d+=4,c(A,d,E.rect.height),d+=4,c(A,d,E.rect.x),d+=4,c(A,d,E.rect.y),d+=4,p(A,d,i[T]),d+=2,p(A,d,1e3),d+=2,A[d]=E.dispose,d++,A[d]=E.blend,d++,c(A,d,f(A,d-30,30)),d+=4);var Y=E.cimg,x=Y.length;c(A,d,x+(T==0?0:4)),d+=4;var B=d;g(A,d,T==0?"IDAT":"fdAT"),d+=4,T!=0&&(c(A,d,I++),d+=4),A.set(Y,d),d+=x,c(A,d,f(A,B,d-B)),d+=4}return c(A,d,0),d+=4,g(A,d,"IEND"),d+=4,c(A,d,f(A,d-4,4)),d+=4,A.buffer},Ue.encode.compressPNG=function(e,r,t){for(var i=0;i<e.frames.length;i++){var l=e.frames[i];l.rect.width;var f=l.rect.height,c=new Uint8Array(f*l.bpl+f);l.cimg=Ue.encode._filterZero(l.img,f,l.bpp,l.bpl,c,r,t)}},Ue.encode.compress=function(e,r,t,i,l){for(var f=l[0],c=l[1],p=l[2],g=l[3],d=l[4],m=6,C=8,b=255,x=0;x<e.length;x++)for(var _=new Uint8Array(e[x]),T=_.length,E=0;E<T;E+=4)b&=_[E+3];var A=b!=255,k=Ue.encode.framize(e,r,t,f,c,p),D={},R=[],N=[];if(i!=0){for(var z=[],E=0;E<k.length;E++)z.push(k[E].img.buffer);for(var M=Ue.encode.concatRGBA(z),I=Ue.quantize(M,i),Y=0,B=new Uint8Array(I.abuf),E=0;E<k.length;E++){var P=k[E].img,U=P.length;N.push(new Uint8Array(I.inds.buffer,Y>>2,U>>2));for(var x=0;x<U;x+=4)P[x]=B[Y+x],P[x+1]=B[Y+x+1],P[x+2]=B[Y+x+2],P[x+3]=B[Y+x+3];Y+=U}for(var E=0;E<I.plte.length;E++)R.push(I.plte[E].est.rgba)}else for(var x=0;x<k.length;x++){var H=k[x],V=new Uint32Array(H.img.buffer),K=H.rect.width,T=V.length,ee=new Uint8Array(T);N.push(ee);for(var E=0;E<T;E++){var J=V[E];if(E!=0&&J==V[E-1])ee[E]=ee[E-1];else if(E>K&&J==V[E-K])ee[E]=ee[E-K];else{var q=D[J];if(q==null&&(D[J]=q=R.length,R.push(J),R.length>=300))break;ee[E]=q}}}var te=R.length;te<=256&&d==!1&&(te<=2?C=1:te<=4?C=2:te<=16?C=4:C=8,C=Math.max(C,g));for(var x=0;x<k.length;x++){var H=k[x];H.rect.x,H.rect.y;var K=H.rect.width,Z=H.rect.height,$=H.img;new Uint32Array($.buffer);var ne=4*K,oe=4;if(te<=256&&d==!1){ne=Math.ceil(C*K/8);for(var ae=new Uint8Array(ne*Z),se=N[x],ve=0;ve<Z;ve++){var E=ve*ne,we=ve*K;if(C==8)for(var ce=0;ce<K;ce++)ae[E+ce]=se[we+ce];else if(C==4)for(var ce=0;ce<K;ce++)ae[E+(ce>>1)]|=se[we+ce]<<4-(ce&1)*4;else if(C==2)for(var ce=0;ce<K;ce++)ae[E+(ce>>2)]|=se[we+ce]<<6-(ce&3)*2;else if(C==1)for(var ce=0;ce<K;ce++)ae[E+(ce>>3)]|=se[we+ce]<<7-(ce&7)*1}$=ae,m=3,oe=1}else if(A==!1&&k.length==1){for(var ae=new Uint8Array(K*Z*3),ye=K*Z,E=0;E<ye;E++){var P=E*3,De=E*4;ae[P]=$[De],ae[P+1]=$[De+1],ae[P+2]=$[De+2]}$=ae,m=2,oe=3,ne=3*K}H.img=$,H.bpl=ne,H.bpp=oe}return{ctype:m,depth:C,plte:R,frames:k}},Ue.encode.framize=function(e,r,t,i,l,f){for(var c=[],p=0;p<e.length;p++){var g=new Uint8Array(e[p]),d=new Uint32Array(g.buffer),m,C=0,b=0,x=r,_=t,T=i?1:0;if(p!=0){for(var E=f||i||p==1||c[p-2].dispose!=0?1:2,A=0,k=1e9,D=0;D<E;D++){for(var H=new Uint8Array(e[p-1-D]),R=new Uint32Array(e[p-1-D]),N=r,z=t,M=-1,I=-1,Y=0;Y<t;Y++)for(var B=0;B<r;B++){var P=Y*r+B;d[P]!=R[P]&&(B<N&&(N=B),B>M&&(M=B),Y<z&&(z=Y),Y>I&&(I=Y))}M==-1&&(N=z=M=I=0),l&&((N&1)==1&&N--,(z&1)==1&&z--);var U=(M-N+1)*(I-z+1);U<k&&(k=U,A=D,C=N,b=z,x=M-N+1,_=I-z+1)}var H=new Uint8Array(e[p-1-A]);A==1&&(c[p-1].dispose=2),m=new Uint8Array(x*_*4),Ue._copyTile(H,r,t,m,x,_,-C,-b,0),T=Ue._copyTile(g,r,t,m,x,_,-C,-b,3)?1:0,T==1?Ue.encode._prepareDiff(g,r,t,m,{x:C,y:b,width:x,height:_}):Ue._copyTile(g,r,t,m,x,_,-C,-b,0)}else m=g.slice(0);c.push({rect:{x:C,y:b,width:x,height:_},img:m,blend:T,dispose:0})}if(i)for(var p=0;p<c.length;p++){var V=c[p];if(V.blend!=1){var K=V.rect,ee=c[p-1].rect,J=Math.min(K.x,ee.x),q=Math.min(K.y,ee.y),te=Math.max(K.x+K.width,ee.x+ee.width),Z=Math.max(K.y+K.height,ee.y+ee.height),$={x:J,y:q,width:te-J,height:Z-q};c[p-1].dispose=1,p-1!=0&&Ue.encode._updateFrame(e,r,t,c,p-1,$,l),Ue.encode._updateFrame(e,r,t,c,p,$,l)}}var ne=0;if(e.length!=1)for(var P=0;P<c.length;P++){var V=c[P];ne+=V.rect.width*V.rect.height}return c},Ue.encode._updateFrame=function(e,r,t,i,l,f,c){for(var p=Uint8Array,g=Uint32Array,d=new p(e[l-1]),m=new g(e[l-1]),C=l+1<e.length?new p(e[l+1]):null,b=new p(e[l]),x=new g(b.buffer),_=r,T=t,E=-1,A=-1,k=0;k<f.height;k++)for(var D=0;D<f.width;D++){var R=f.x+D,N=f.y+k,z=N*r+R,M=x[z];M==0||i[l-1].dispose==0&&m[z]==M&&(C==null||C[z*4+3]!=0)||(R<_&&(_=R),R>E&&(E=R),N<T&&(T=N),N>A&&(A=N))}E==-1&&(_=T=E=A=0),c&&((_&1)==1&&_--,(T&1)==1&&T--),f={x:_,y:T,width:E-_+1,height:A-T+1};var I=i[l];I.rect=f,I.blend=1,I.img=new Uint8Array(f.width*f.height*4),i[l-1].dispose==0?(Ue._copyTile(d,r,t,I.img,f.width,f.height,-f.x,-f.y,0),Ue.encode._prepareDiff(b,r,t,I.img,f)):Ue._copyTile(b,r,t,I.img,f.width,f.height,-f.x,-f.y,0)},Ue.encode._prepareDiff=function(e,r,t,i,l){Ue._copyTile(e,r,t,i,l.width,l.height,-l.x,-l.y,2)},Ue.encode._filterZero=function(e,r,t,i,l,f,c){var p=[],g=[0,1,2,3,4];f!=-1?g=[f]:(r*i>5e5||t==1)&&(g=[0]);var d;c&&(d={level:0});for(var m=l.length>1e7&&UZIP!=null?UZIP:gP,C=0;C<g.length;C++){for(var b=0;b<r;b++)Ue.encode._filterLine(l,e,b,i,t,g[C]);p.push(m.deflate(l,d))}for(var x,_=1e9,C=0;C<p.length;C++)p[C].length<_&&(x=C,_=p[C].length);return p[x]},Ue.encode._filterLine=function(e,r,t,i,l,f){var c=t*i,p=c+t,g=Ue.decode._paeth;if(e[p]=f,p++,f==0)if(i<500)for(var d=0;d<i;d++)e[p+d]=r[c+d];else e.set(new Uint8Array(r.buffer,c,i),p);else if(f==1){for(var d=0;d<l;d++)e[p+d]=r[c+d];for(var d=l;d<i;d++)e[p+d]=r[c+d]-r[c+d-l]+256&255}else if(t==0){for(var d=0;d<l;d++)e[p+d]=r[c+d];if(f==2)for(var d=l;d<i;d++)e[p+d]=r[c+d];if(f==3)for(var d=l;d<i;d++)e[p+d]=r[c+d]-(r[c+d-l]>>1)+256&255;if(f==4)for(var d=l;d<i;d++)e[p+d]=r[c+d]-g(r[c+d-l],0,0)+256&255}else{if(f==2)for(var d=0;d<i;d++)e[p+d]=r[c+d]+256-r[c+d-i]&255;if(f==3){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-(r[c+d-i]>>1)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-(r[c+d-i]+r[c+d-l]>>1)&255}if(f==4){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-g(0,r[c+d-i],0)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-g(r[c+d-l],r[c+d-i],r[c+d-l-i])&255}}},Ue.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;e[r]=t}return e}(),update:function(e,r,t,i){for(var l=0;l<i;l++)e=Ue.crc.table[(e^r[t+l])&255]^e>>>8;return e},crc:function(e,r,t){return Ue.crc.update(4294967295,e,r,t)^4294967295}},Ue.quantize=function(e,r){var t=new Uint8Array(e),i=t.slice(0),l=new Uint32Array(i.buffer),f=Ue.quantize.getKDtree(i,r),c=f[0],p=f[1],g=Ue.quantize.planeDst,d=t,m=l,C=d.length,b=new Uint8Array(t.length>>2),x;if(t.length<2e7)for(var _=0;_<C;_+=4){var T=d[_]*.00392156862745098,E=d[_+1]*(1/255),A=d[_+2]*(1/255),k=d[_+3]*(1/255);x=Ue.quantize.getNearest(c,T,E,A,k),b[_>>2]=x.ind,m[_>>2]=x.est.rgba}else for(var _=0;_<C;_+=4){var T=d[_]*.00392156862745098,E=d[_+1]*(1/255),A=d[_+2]*(1/255),k=d[_+3]*(1/255);for(x=c;x.left;)x=g(x.est,T,E,A,k)<=0?x.left:x.right;b[_>>2]=x.ind,m[_>>2]=x.est.rgba}return{abuf:i.buffer,inds:b,plte:p}},Ue.quantize.getKDtree=function(e,r,t){t==null&&(t=1e-4);var i=new Uint32Array(e.buffer),l={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};l.bst=Ue.quantize.stats(e,l.i0,l.i1),l.est=Ue.quantize.estats(l.bst);for(var f=[l];f.length<r;){for(var c=0,p=0,g=0;g<f.length;g++)f[g].est.L>c&&(c=f[g].est.L,p=g);if(c<t)break;var d=f[p],m=Ue.quantize.splitPixels(e,i,d.i0,d.i1,d.est.e,d.est.eMq255),C=d.i0>=m||d.i1<=m;if(C){d.est.L=0;continue}var b={i0:d.i0,i1:m,bst:null,est:null,tdst:0,left:null,right:null};b.bst=Ue.quantize.stats(e,b.i0,b.i1),b.est=Ue.quantize.estats(b.bst);var x={i0:m,i1:d.i1,bst:null,est:null,tdst:0,left:null,right:null};x.bst={R:[],m:[],N:d.bst.N-b.bst.N};for(var g=0;g<16;g++)x.bst.R[g]=d.bst.R[g]-b.bst.R[g];for(var g=0;g<4;g++)x.bst.m[g]=d.bst.m[g]-b.bst.m[g];x.est=Ue.quantize.estats(x.bst),d.left=b,d.right=x,f[p]=b,f.push(x)}f.sort(function(_,T){return T.bst.N-_.bst.N});for(var g=0;g<f.length;g++)f[g].ind=g;return[l,f]},Ue.quantize.getNearest=function(e,r,t,i,l){if(e.left==null)return e.tdst=Ue.quantize.dist(e.est.q,r,t,i,l),e;var f=Ue.quantize.planeDst(e.est,r,t,i,l),c=e.left,p=e.right;f>0&&(c=e.right,p=e.left);var g=Ue.quantize.getNearest(c,r,t,i,l);if(g.tdst<=f*f)return g;var d=Ue.quantize.getNearest(p,r,t,i,l);return d.tdst<g.tdst?d:g},Ue.quantize.planeDst=function(e,r,t,i,l){var f=e.e;return f[0]*r+f[1]*t+f[2]*i+f[3]*l-e.eMq},Ue.quantize.dist=function(e,r,t,i,l){var f=r-e[0],c=t-e[1],p=i-e[2],g=l-e[3];return f*f+c*c+p*p+g*g},Ue.quantize.splitPixels=function(e,r,t,i,l,f){var c=Ue.quantize.vecDot;for(i-=4;t<i;){for(;c(e,t,l)<=f;)t+=4;for(;c(e,i,l)>f;)i-=4;if(t>=i)break;var p=r[t>>2];r[t>>2]=r[i>>2],r[i>>2]=p,t+=4,i-=4}for(;c(e,t,l)>f;)t-=4;return t+4},Ue.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},Ue.quantize.stats=function(e,r,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=[0,0,0,0],f=t-r>>2,c=r;c<t;c+=4){var p=e[c]*.00392156862745098,g=e[c+1]*(1/255),d=e[c+2]*(1/255),m=e[c+3]*(1/255);l[0]+=p,l[1]+=g,l[2]+=d,l[3]+=m,i[0]+=p*p,i[1]+=p*g,i[2]+=p*d,i[3]+=p*m,i[5]+=g*g,i[6]+=g*d,i[7]+=g*m,i[10]+=d*d,i[11]+=d*m,i[15]+=m*m}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:l,N:f}},Ue.quantize.estats=function(e){var r=e.R,t=e.m,i=e.N,l=t[0],f=t[1],c=t[2],p=t[3],g=i==0?0:1/i,d=[r[0]-l*l*g,r[1]-l*f*g,r[2]-l*c*g,r[3]-l*p*g,r[4]-f*l*g,r[5]-f*f*g,r[6]-f*c*g,r[7]-f*p*g,r[8]-c*l*g,r[9]-c*f*g,r[10]-c*c*g,r[11]-c*p*g,r[12]-p*l*g,r[13]-p*f*g,r[14]-p*c*g,r[15]-p*p*g],m=d,C=Ue.M4,b=[Math.random(),Math.random(),Math.random(),Math.random()],x=0,_=0;if(i!=0)for(var T=0;T<16&&(b=C.multVec(m,b),_=Math.sqrt(C.dot(b,b)),b=C.sml(1/_,b),!(T!=0&&Math.abs(_-x)<1e-9));T++)x=_;var E=[l*g,f*g,c*g,p*g],A=C.dot(C.sml(255,E),b);return{Cov:d,q:E,e:b,L:x,eMq255:A,eMq:C.dot(b,E),rgba:(Math.round(255*E[3])<<24|Math.round(255*E[2])<<16|Math.round(255*E[1])<<8|Math.round(255*E[0])<<0)>>>0}},Ue.M4={multVec:function(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},Ue.encode.concatRGBA=function(e){for(var r=0,t=0;t<e.length;t++)r+=e[t].byteLength;for(var i=new Uint8Array(r),l=0,t=0;t<e.length;t++){for(var f=new Uint8Array(e[t]),c=f.length,p=0;p<c;p+=4){var g=f[p],d=f[p+1],m=f[p+2],C=f[p+3];C==0&&(g=d=m=0),i[l+p]=g,i[l+p+1]=d,i[l+p+2]=m,i[l+p+3]=C}l+=c}return i.buffer};const yP=e=>new Promise((r,t)=>{const i=new FileReader;i.onloadend=l=>r(l.target.result),i.onerror=l=>t(l),i.readAsDataURL(e)}),xP=e=>new Promise((r,t)=>{const i=new Image;i.onload=()=>r(i),i.onerror=l=>t(l),i.src=e}),bP=(e,r,t)=>new Promise(i=>e.toBlob(l=>i(l),r,t)),CP=e=>{const i=e.width,l=e.height;let f=e.width,c=e.height;return(i>2e3||l>2e3)&&(i/l>2e3/2e3?(f=2e3,c=Math.round(2e3*(l/i))):(c=2e3,f=Math.round(2e3*(i/l)))),{width:f,height:c}},wP=e=>{let r=0;return e>1||e<0?r=0:r=e?e*256:0,r},a6=async(e,r=.5,t=5)=>{const i=e.name;if(e.size/1024/1024<t)return e;try{const l=document.createElement("canvas"),f=l.getContext("2d"),c=await yP(e),p=await xP(c),g=CP(p);if(l.width=g.width,l.height=g.height,f.clearRect(0,0,g.width,g.height),f.drawImage(p,0,0,g.width,g.height),["image/jpeg","image/jpg"].includes(e.type)){const d=await bP(l,e.type,r);return new File([d],i,{type:e.type})}else{const d=f.getImageData(0,0,g.width,g.height).data,m=wP(r),C=Ue.encode([d.buffer],g.width,g.height,m);return new File([C],e.name,{type:e.type})}}catch{return e}},i6=[ed.jpeg,ed.jpg,ed.png],o6=e=>{const{maxCount:r=1,listType:t="picture-card",fileList:i=[],maxSize:l=2,accept:f=i6.join(","),uploadBtnName:c="上传",uploadHint:p=null,compression:g}=e,[d,m]=W.useState(!1),[C,b]=W.useState(""),x=()=>t!=="text"?Be("div",{style:{position:"relative"},children:[Be("div",{children:[Q(Nb,{}),Q("div",{style:{marginTop:8},children:c})]}),p]}):Be(en,{children:[Q(me.Button,{icon:Q(Mb,{}),children:c}),p]}),_=k=>new Promise(async(R,N)=>{const z=f.split(","),M=dg(k.name)||"";if(f&&!z.includes(M)&&(me.message.error(`只允许上传 ${f} 文件`),N(!1)),!(k.size/1024/1024<l)&&!g&&(me.message.error(`文件必须小于${l}MB`),N(!1)),g){let Y=0;async function B(U){if(!g)return;const H=await a6(U,g.quality,g.limit);if(Y++,Y>=5)return H;if(H.size/1024/1024>l)await B(H);else return H}const P=await B(k);R(P)}R(k)}).catch(R=>me.Upload.LIST_IGNORE),T=k=>{e.onChange&&e.onChange(k)},E=k=>{e.onPreview?e.onPreview(k):A(k)},A=async k=>{let D=dg(k.name)||"";if(D||(D=dg(k.name||k.url)||""),D===ed.pdf)return me.Modal.info({title:"PDF",width:"60%",content:Q("iframe",{title:"PDF预览",src:k.url||k.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});i6.includes(D)&&(!k.url&&!k.thumbUrl&&!k.preview&&(k.preview=await P8(k.originFileObj)),b(k.url||k.thumbUrl||k.preview),m(!0))};return Be(en,{children:[Q(me.Upload,{beforeUpload:_,onChange:T,listType:t,...e,onPreview:E,children:i.length>=r?null:x()}),Q(me.Image,{style:{display:"none"},preview:{visible:d,src:C,onVisibleChange:()=>{m(!1),b("")}}})]})},Eg={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},_P={labelCol:{span:4},wrapperCol:{span:20}},l6=e=>{switch(e){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},y2=e=>{const{items:r,rowProps:t,formProps:i,readonly:l=!1,hiddenTitle:f=!1,langId:c="10001"}=e,p=(m,C)=>{var b,x;if(C.btnType==="submit"){(b=i==null?void 0:i.form)==null||b.validateFields().then(_=>{C.onClick&&C.onClick(_)});return}if(C.btnType==="reset"){(x=i==null?void 0:i.form)==null||x.resetFields(),C.onClick&&C.onClick(m);return}C.btnType==="cancel"&&C.onClick&&C.onClick(m)},g=m=>Array.isArray(m)?m:m&&m.fileList,d=m=>{var b;const C=i==null?void 0:i.initialValues;return m.dataIndex?((b=m.render)==null?void 0:b.call(m,C==null?void 0:C[m.dataIndex],C))||m.value||(C==null?void 0:C[m.dataIndex]):""};return Q(me.Form,{layout:"horizontal",form:i==null?void 0:i.form,..._P,...i||{},children:Q(me.Row,{gutter:16,...t,children:r.filter(m=>!m.hidden).map((m,C)=>Q(me.Col,{...m.colProps||{span:24},children:Q(me.Form.Item,{...m.valueType==="upload"?{getValueFromEvent:g}:{},label:f?"":m.title,name:m.valueType==="btns"?void 0:m.dataIndex,...m.formItemProps,children:m.readonly?Q("div",{children:d(m)}):m.readonly===void 0&&l?Q("div",{children:d(m)}):Q(s6,{onChange:b=>{var x;return(x=m==null?void 0:m.onChange)==null?void 0:x.call(m,b)},valueType:m.valueType,onBtnClick:p,valueProps:m.valueProps,formItemProps:m.formItemProps,langId:c})})},m.dataIndex||C))})})},s6=e=>{const{valueType:r,valueProps:t,value:i,onChange:l,onBtnClick:f,inputRef:c,formItemProps:p,langId:g}=e,d=W.useMemo(()=>{let m=Q(me.Input,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});switch(r){case"rate":m=Q(me.Rate,{...t});break;case"password":m=Q(me.Input.Password,{...t});break;case"modal":m=Q(SP,{...t});break;case"checkbox":m=Q(me.Checkbox.Group,{...t});break;case"select":m=Q(me.Select,{placeholder:g==="10001"?"请选择":"Please select",allowClear:!0,...t});break;case"inputNumber":m=Q(me.InputNumber,{style:{width:"100%"},placeholder:g==="10001"?"请输入":"Please input",...t});break;case"textarea":m=Q(me.Input.TextArea,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});break;case"radio":m=Q(me.Radio.Group,{...t});break;case"switch":m=Q(me.Switch,{...t});break;case"datePicker":m=Q(me.DatePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"rangePicker":m=Q(me.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"timePicker":m=Q(me.TimePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"cascader":m=Q(me.Cascader,{allowClear:!0,...t});break;case"upload":m=Q(o6,{...t});break;case"btns":m=Q(me.Space,{children:t==null?void 0:t.map(C=>W.createElement(me.Button,{type:C.btnType==="submit"?"primary":"default",...il.omit(C,["btnType"]),key:C.key||C.btnType,onClick:b=>{f==null||f(b,C)}},C.title||C.children))});break}return m},[r,t,l,i]);if(r==="custom"){const m=t;return W.cloneElement(m.children,{[(p==null?void 0:p.valuePropName)||l6(r||"input")]:i,onChange:l,ref:c})}return W.cloneElement(d,{[l6(r||"input")]:i,onChange:l,ref:c})},SP=e=>{const{placeholder:r,labelKey:t,onToggle:i,value:l,onClear:f,className:c,style:p}=e;return Be("div",{className:[Eg.fieldModal,c].filter(g=>g).join(" "),style:p,children:[Q("div",{className:Eg.content,onClick:()=>i(!0),children:l?Q("span",{children:l[t]}):Q("span",{className:Eg.placeholder,children:r})}),Q("span",{className:Eg.suffix,onClick:f,children:l&&Q(E7,{})})]})};var x2={exports:{}},$h={},Dg={exports:{}},u6={},wt={exports:{}},b2={exports:{}},bn={};var c6;function EP(){if(c6)return bn;c6=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function D(N){if(typeof N=="object"&&N!==null){var z=N.$$typeof;switch(z){case r:switch(N=N.type,N){case g:case d:case i:case f:case l:case C:return N;default:switch(N=N&&N.$$typeof,N){case p:case m:case _:case x:case c:return N;default:return z}}case t:return z}}}function R(N){return D(N)===d}return bn.AsyncMode=g,bn.ConcurrentMode=d,bn.ContextConsumer=p,bn.ContextProvider=c,bn.Element=r,bn.ForwardRef=m,bn.Fragment=i,bn.Lazy=_,bn.Memo=x,bn.Portal=t,bn.Profiler=f,bn.StrictMode=l,bn.Suspense=C,bn.isAsyncMode=function(N){return R(N)||D(N)===g},bn.isConcurrentMode=R,bn.isContextConsumer=function(N){return D(N)===p},bn.isContextProvider=function(N){return D(N)===c},bn.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===r},bn.isForwardRef=function(N){return D(N)===m},bn.isFragment=function(N){return D(N)===i},bn.isLazy=function(N){return D(N)===_},bn.isMemo=function(N){return D(N)===x},bn.isPortal=function(N){return D(N)===t},bn.isProfiler=function(N){return D(N)===f},bn.isStrictMode=function(N){return D(N)===l},bn.isSuspense=function(N){return D(N)===C},bn.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===i||N===d||N===f||N===l||N===C||N===b||typeof N=="object"&&N!==null&&(N.$$typeof===_||N.$$typeof===x||N.$$typeof===c||N.$$typeof===p||N.$$typeof===m||N.$$typeof===E||N.$$typeof===A||N.$$typeof===k||N.$$typeof===T)},bn.typeOf=D,bn}var Cn={};var f6;function DP(){return f6||(f6=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function D(Te){return typeof Te=="string"||typeof Te=="function"||Te===i||Te===d||Te===f||Te===l||Te===C||Te===b||typeof Te=="object"&&Te!==null&&(Te.$$typeof===_||Te.$$typeof===x||Te.$$typeof===c||Te.$$typeof===p||Te.$$typeof===m||Te.$$typeof===E||Te.$$typeof===A||Te.$$typeof===k||Te.$$typeof===T)}function R(Te){if(typeof Te=="object"&&Te!==null){var ze=Te.$$typeof;switch(ze){case r:var Ne=Te.type;switch(Ne){case g:case d:case i:case f:case l:case C:return Ne;default:var dt=Ne&&Ne.$$typeof;switch(dt){case p:case m:case _:case x:case c:return dt;default:return ze}}case t:return ze}}}var N=g,z=d,M=p,I=c,Y=r,B=m,P=i,U=_,H=x,V=t,K=f,ee=l,J=C,q=!1;function te(Te){return q||(q=!0),Z(Te)||R(Te)===g}function Z(Te){return R(Te)===d}function $(Te){return R(Te)===p}function ne(Te){return R(Te)===c}function oe(Te){return typeof Te=="object"&&Te!==null&&Te.$$typeof===r}function ae(Te){return R(Te)===m}function se(Te){return R(Te)===i}function ve(Te){return R(Te)===_}function we(Te){return R(Te)===x}function ce(Te){return R(Te)===t}function ye(Te){return R(Te)===f}function De(Te){return R(Te)===l}function Pe(Te){return R(Te)===C}Cn.AsyncMode=N,Cn.ConcurrentMode=z,Cn.ContextConsumer=M,Cn.ContextProvider=I,Cn.Element=Y,Cn.ForwardRef=B,Cn.Fragment=P,Cn.Lazy=U,Cn.Memo=H,Cn.Portal=V,Cn.Profiler=K,Cn.StrictMode=ee,Cn.Suspense=J,Cn.isAsyncMode=te,Cn.isConcurrentMode=Z,Cn.isContextConsumer=$,Cn.isContextProvider=ne,Cn.isElement=oe,Cn.isForwardRef=ae,Cn.isFragment=se,Cn.isLazy=ve,Cn.isMemo=we,Cn.isPortal=ce,Cn.isProfiler=ye,Cn.isStrictMode=De,Cn.isSuspense=Pe,Cn.isValidElementType=D,Cn.typeOf=R}()),Cn}var d6;function h6(){return d6||(d6=1,function(e){process.env.NODE_ENV==="production"?e.exports=EP():e.exports=DP()}(b2)),b2.exports}var C2,p6;function TP(){if(p6)return C2;p6=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(f){if(f==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(f)}function l(){try{if(!Object.assign)return!1;var f=new String("abc");if(f[5]="de",Object.getOwnPropertyNames(f)[0]==="5")return!1;for(var c={},p=0;p<10;p++)c["_"+String.fromCharCode(p)]=p;var g=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(g.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return C2=l()?Object.assign:function(f,c){for(var p,g=i(f),d,m=1;m<arguments.length;m++){p=Object(arguments[m]);for(var C in p)r.call(p,C)&&(g[C]=p[C]);if(e){d=e(p);for(var b=0;b<d.length;b++)t.call(p,d[b])&&(g[d[b]]=p[d[b]])}}return g},C2}var w2,v6;function _2(){if(v6)return w2;v6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return w2=e,w2}var S2,m6;function g6(){return m6||(m6=1,S2=Function.call.bind(Object.prototype.hasOwnProperty)),S2}var E2,y6;function kP(){if(y6)return E2;y6=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=_2(),t={},i=g6();e=function(f){var c="Warning: "+f;try{throw new Error(c)}catch{}}}function l(f,c,p,g,d){if(process.env.NODE_ENV!=="production"){for(var m in f)if(i(f,m)){var C;try{if(typeof f[m]!="function"){var b=Error((g||"React class")+": "+p+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}C=f[m](c,m,g,p,null,r)}catch(_){C=_}if(C&&!(C instanceof Error)&&e((g||"React class")+": type specification of "+p+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in t)){t[C.message]=!0;var x=d?d():"";e("Failed "+p+" type: "+C.message+(x??""))}}}}return l.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},E2=l,E2}var D2,x6;function AP(){if(x6)return D2;x6=1;var e=h6(),r=TP(),t=_2(),i=g6(),l=kP(),f=function(){};process.env.NODE_ENV!=="production"&&(f=function(p){var g="Warning: "+p;try{throw new Error(g)}catch{}});function c(){return null}return D2=function(p,g){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function C(Z){var $=Z&&(d&&Z[d]||Z[m]);if(typeof $=="function")return $}var b="<<anonymous>>",x={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:k(),arrayOf:D,element:R(),elementType:N(),instanceOf:z,node:B(),objectOf:I,oneOf:M,oneOfType:Y,shape:U,exact:H};function _(Z,$){return Z===$?Z!==0||1/Z===1/$:Z!==Z&&$!==$}function T(Z,$){this.message=Z,this.data=$&&typeof $=="object"?$:{},this.stack=""}T.prototype=Error.prototype;function E(Z){if(process.env.NODE_ENV!=="production")var $={},ne=0;function oe(se,ve,we,ce,ye,De,Pe){if(ce=ce||b,De=De||we,Pe!==t){if(g){var Te=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Te.name="Invariant Violation",Te}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ze=ce+":"+we;!$[ze]&&ne<3&&(f("You are manually calling a React.PropTypes validation function for the `"+De+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),$[ze]=!0,ne++)}}return ve[we]==null?se?ve[we]===null?new T("The "+ye+" `"+De+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new T("The "+ye+" `"+De+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:Z(ve,we,ce,ye,De)}var ae=oe.bind(null,!1);return ae.isRequired=oe.bind(null,!0),ae}function A(Z){function $(ne,oe,ae,se,ve,we){var ce=ne[oe],ye=ee(ce);if(ye!==Z){var De=J(ce);return new T("Invalid "+se+" `"+ve+"` of type "+("`"+De+"` supplied to `"+ae+"`, expected ")+("`"+Z+"`."),{expectedType:Z})}return null}return E($)}function k(){return E(c)}function D(Z){function $(ne,oe,ae,se,ve){if(typeof Z!="function")return new T("Property `"+ve+"` of component `"+ae+"` has invalid PropType notation inside arrayOf.");var we=ne[oe];if(!Array.isArray(we)){var ce=ee(we);return new T("Invalid "+se+" `"+ve+"` of type "+("`"+ce+"` supplied to `"+ae+"`, expected an array."))}for(var ye=0;ye<we.length;ye++){var De=Z(we,ye,ae,se,ve+"["+ye+"]",t);if(De instanceof Error)return De}return null}return E($)}function R(){function Z($,ne,oe,ae,se){var ve=$[ne];if(!p(ve)){var we=ee(ve);return new T("Invalid "+ae+" `"+se+"` of type "+("`"+we+"` supplied to `"+oe+"`, expected a single ReactElement."))}return null}return E(Z)}function N(){function Z($,ne,oe,ae,se){var ve=$[ne];if(!e.isValidElementType(ve)){var we=ee(ve);return new T("Invalid "+ae+" `"+se+"` of type "+("`"+we+"` supplied to `"+oe+"`, expected a single ReactElement type."))}return null}return E(Z)}function z(Z){function $(ne,oe,ae,se,ve){if(!(ne[oe]instanceof Z)){var we=Z.name||b,ce=te(ne[oe]);return new T("Invalid "+se+" `"+ve+"` of type "+("`"+ce+"` supplied to `"+ae+"`, expected ")+("instance of `"+we+"`."))}return null}return E($)}function M(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?f("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):f("Invalid argument supplied to oneOf, expected an array.")),c;function $(ne,oe,ae,se,ve){for(var we=ne[oe],ce=0;ce<Z.length;ce++)if(_(we,Z[ce]))return null;var ye=JSON.stringify(Z,function(Pe,Te){var ze=J(Te);return ze==="symbol"?String(Te):Te});return new T("Invalid "+se+" `"+ve+"` of value `"+String(we)+"` "+("supplied to `"+ae+"`, expected one of "+ye+"."))}return E($)}function I(Z){function $(ne,oe,ae,se,ve){if(typeof Z!="function")return new T("Property `"+ve+"` of component `"+ae+"` has invalid PropType notation inside objectOf.");var we=ne[oe],ce=ee(we);if(ce!=="object")return new T("Invalid "+se+" `"+ve+"` of type "+("`"+ce+"` supplied to `"+ae+"`, expected an object."));for(var ye in we)if(i(we,ye)){var De=Z(we,ye,ae,se,ve+"."+ye,t);if(De instanceof Error)return De}return null}return E($)}function Y(Z){if(!Array.isArray(Z))return process.env.NODE_ENV!=="production"&&f("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var $=0;$<Z.length;$++){var ne=Z[$];if(typeof ne!="function")return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(ne)+" at index "+$+"."),c}function oe(ae,se,ve,we,ce){for(var ye=[],De=0;De<Z.length;De++){var Pe=Z[De],Te=Pe(ae,se,ve,we,ce,t);if(Te==null)return null;Te.data&&i(Te.data,"expectedType")&&ye.push(Te.data.expectedType)}var ze=ye.length>0?", expected one of type ["+ye.join(", ")+"]":"";return new T("Invalid "+we+" `"+ce+"` supplied to "+("`"+ve+"`"+ze+"."))}return E(oe)}function B(){function Z($,ne,oe,ae,se){return V($[ne])?null:new T("Invalid "+ae+" `"+se+"` supplied to "+("`"+oe+"`, expected a ReactNode."))}return E(Z)}function P(Z,$,ne,oe,ae){return new T((Z||"React class")+": "+$+" type `"+ne+"."+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ae+"`.")}function U(Z){function $(ne,oe,ae,se,ve){var we=ne[oe],ce=ee(we);if(ce!=="object")return new T("Invalid "+se+" `"+ve+"` of type `"+ce+"` "+("supplied to `"+ae+"`, expected `object`."));for(var ye in Z){var De=Z[ye];if(typeof De!="function")return P(ae,se,ve,ye,J(De));var Pe=De(we,ye,ae,se,ve+"."+ye,t);if(Pe)return Pe}return null}return E($)}function H(Z){function $(ne,oe,ae,se,ve){var we=ne[oe],ce=ee(we);if(ce!=="object")return new T("Invalid "+se+" `"+ve+"` of type `"+ce+"` "+("supplied to `"+ae+"`, expected `object`."));var ye=r({},ne[oe],Z);for(var De in ye){var Pe=Z[De];if(i(Z,De)&&typeof Pe!="function")return P(ae,se,ve,De,J(Pe));if(!Pe)return new T("Invalid "+se+" `"+ve+"` key `"+De+"` supplied to `"+ae+"`.\nBad object: "+JSON.stringify(ne[oe],null," ")+`
|
|
194
194
|
Valid keys: `+JSON.stringify(Object.keys(Z),null," "));var Te=Pe(we,De,ae,se,ve+"."+De,t);if(Te)return Te}return null}return E($)}function V(Z){switch(typeof Z){case"number":case"string":case"undefined":return!0;case"boolean":return!Z;case"object":if(Array.isArray(Z))return Z.every(V);if(Z===null||p(Z))return!0;var $=C(Z);if($){var ne=$.call(Z),oe;if($!==Z.entries){for(;!(oe=ne.next()).done;)if(!V(oe.value))return!1}else for(;!(oe=ne.next()).done;){var ae=oe.value;if(ae&&!V(ae[1]))return!1}}else return!1;return!0;default:return!1}}function K(Z,$){return Z==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function ee(Z){var $=typeof Z;return Array.isArray(Z)?"array":Z instanceof RegExp?"object":K($,Z)?"symbol":$}function J(Z){if(typeof Z>"u"||Z===null)return""+Z;var $=ee(Z);if($==="object"){if(Z instanceof Date)return"date";if(Z instanceof RegExp)return"regexp"}return $}function q(Z){var $=J(Z);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function te(Z){return!Z.constructor||!Z.constructor.name?b:Z.constructor.name}return x.checkPropTypes=l,x.resetWarningCache=l.resetWarningCache,x.PropTypes=x,x},D2}var T2,b6;function OP(){if(b6)return T2;b6=1;var e=_2();function r(){}function t(){}return t.resetWarningCache=r,T2=function(){function i(c,p,g,d,m,C){if(C!==e){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}i.isRequired=i;function l(){return i}var f={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:l,element:i,elementType:i,instanceOf:l,node:i,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:t,resetWarningCache:r};return f.PropTypes=f,f},T2}if(process.env.NODE_ENV!=="production"){var RP=h6(),FP=!0;wt.exports=AP()(RP.isElement,FP)}else wt.exports=OP()();function C6(e){var r,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(t=C6(e[r]))&&(i&&(i+=" "),i+=t);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Re(){for(var e,r,t=0,i="";t<arguments.length;)(e=arguments[t++])&&(r=C6(e))&&(i&&(i+=" "),i+=r);return i}const NP=L4(Object.freeze(Object.defineProperty({__proto__:null,clsx:Re,default:Re},Symbol.toStringTag,{value:"Module"})));var sr={},cl={};Object.defineProperty(cl,"__esModule",{value:!0}),cl.dontSetMe=zP,cl.findInArray=MP,cl.int=LP,cl.isFunction=PP,cl.isNum=BP;function MP(e,r){for(let t=0,i=e.length;t<i;t++)if(r.apply(r,[e[t],t,e]))return e[t]}function PP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function BP(e){return typeof e=="number"&&!isNaN(e)}function LP(e){return parseInt(e,10)}function zP(e,r,t){if(e[r])return new Error("Invalid prop ".concat(r," passed to ").concat(t," - do not set this, set it on the child."))}var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.browserPrefixToKey=_6,Ec.browserPrefixToStyle=UP,Ec.default=void 0,Ec.getPrefix=w6;const k2=["Moz","Webkit","O","ms"];function w6(){var e;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const t=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!t||r in t)return"";for(let i=0;i<k2.length;i++)if(_6(r,k2[i])in t)return k2[i];return""}function _6(e,r){return r?"".concat(r).concat(jP(e)):e}function UP(e,r){return r?"-".concat(r.toLowerCase(),"-").concat(e):e}function jP(e){let r="",t=!0;for(let i=0;i<e.length;i++)t?(r+=e[i].toUpperCase(),t=!1):e[i]==="-"?t=!0:r+=e[i];return r}Ec.default=w6(),Object.defineProperty(sr,"__esModule",{value:!0}),sr.addClassName=T6,sr.addEvent=VP,sr.addUserSelectStyles=eB,sr.createCSSTransform=QP,sr.createSVGTransform=ZP,sr.getTouch=XP,sr.getTouchIdentifier=JP,sr.getTranslation=A2,sr.innerHeight=GP,sr.innerWidth=KP,sr.matchesSelector=D6,sr.matchesSelectorAndParentsTo=HP,sr.offsetXYFromParent=WP,sr.outerHeight=YP,sr.outerWidth=qP,sr.removeClassName=k6,sr.removeEvent=$P,sr.removeUserSelectStyles=tB;var Fi=cl,S6=IP(Ec);function E6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(E6=function(i){return i?t:r})(e)}function IP(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=E6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}let Tg="";function D6(e,r){return Tg||(Tg=(0,Fi.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Fi.isFunction)(e[t])})),(0,Fi.isFunction)(e[Tg])?e[Tg](r):!1}function HP(e,r,t){let i=e;do{if(D6(i,r))return!0;if(i===t)return!1;i=i.parentNode}while(i);return!1}function VP(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.addEventListener?e.addEventListener(r,t,l):e.attachEvent?e.attachEvent("on"+r,t):e["on"+r]=t}function $P(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.removeEventListener?e.removeEventListener(r,t,l):e.detachEvent?e.detachEvent("on"+r,t):e["on"+r]=null}function YP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Fi.int)(t.borderTopWidth),r+=(0,Fi.int)(t.borderBottomWidth),r}function qP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Fi.int)(t.borderLeftWidth),r+=(0,Fi.int)(t.borderRightWidth),r}function GP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Fi.int)(t.paddingTop),r-=(0,Fi.int)(t.paddingBottom),r}function KP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Fi.int)(t.paddingLeft),r-=(0,Fi.int)(t.paddingRight),r}function WP(e,r,t){const l=r===r.ownerDocument.body?{left:0,top:0}:r.getBoundingClientRect(),f=(e.clientX+r.scrollLeft-l.left)/t,c=(e.clientY+r.scrollTop-l.top)/t;return{x:f,y:c}}function QP(e,r){const t=A2(e,r,"px");return{[(0,S6.browserPrefixToKey)("transform",S6.default)]:t}}function ZP(e,r){return A2(e,r,"")}function A2(e,r,t){let{x:i,y:l}=e,f="translate(".concat(i).concat(t,",").concat(l).concat(t,")");if(r){const c="".concat(typeof r.x=="string"?r.x:r.x+t),p="".concat(typeof r.y=="string"?r.y:r.y+t);f="translate(".concat(c,", ").concat(p,")")+f}return f}function XP(e,r){return e.targetTouches&&(0,Fi.findInArray)(e.targetTouches,t=>r===t.identifier)||e.changedTouches&&(0,Fi.findInArray)(e.changedTouches,t=>r===t.identifier)}function JP(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function eB(e){if(!e)return;let r=e.getElementById("react-draggable-style-el");r||(r=e.createElement("style"),r.type="text/css",r.id="react-draggable-style-el",r.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
195
195
|
`,r.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
196
|
-
`,e.getElementsByTagName("head")[0].appendChild(r)),e.body&&T6(e.body,"react-draggable-transparent-selection")}function tB(e){if(e)try{if(e.body&&k6(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function T6(e,r){e.classList?e.classList.add(r):e.className.match(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)")))||(e.className+=" ".concat(r))}function k6(e,r){e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)"),"g"),"")}var fl={};Object.defineProperty(fl,"__esModule",{value:!0}),fl.canDragX=aB,fl.canDragY=iB,fl.createCoreData=lB,fl.createDraggableData=sB,fl.getBoundPosition=nB,fl.getControlPosition=oB,fl.snapToGrid=rB;var Ni=cl,ud=sr;function nB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:uB(i);const l=O2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let p;if(i==="parent"?p=l.parentNode:p=f.querySelector(i),!(p instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const g=p,d=c.getComputedStyle(l),m=c.getComputedStyle(g);i={left:-l.offsetLeft+(0,Ni.int)(m.paddingLeft)+(0,Ni.int)(d.marginLeft),top:-l.offsetTop+(0,Ni.int)(m.paddingTop)+(0,Ni.int)(d.marginTop),right:(0,ud.innerWidth)(g)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Ni.int)(m.paddingRight)-(0,Ni.int)(d.marginRight),bottom:(0,ud.innerHeight)(g)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Ni.int)(m.paddingBottom)-(0,Ni.int)(d.marginBottom)}}return(0,Ni.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Ni.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Ni.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Ni.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function rB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function aB(e){return e.props.axis==="both"||e.props.axis==="x"}function iB(e){return e.props.axis==="both"||e.props.axis==="y"}function oB(e,r,t){const i=typeof r=="number"?(0,ud.getTouch)(e,r):null;if(typeof r=="number"&&!i)return null;const l=O2(t),f=t.props.offsetParent||l.offsetParent||l.ownerDocument.body;return(0,ud.offsetXYFromParent)(i||e,f,t.props.scale)}function lB(e,r,t){const i=!(0,Ni.isNum)(e.lastX),l=O2(e);return i?{node:l,deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}:{node:l,deltaX:r-e.lastX,deltaY:t-e.lastY,lastX:e.lastX,lastY:e.lastY,x:r,y:t}}function sB(e,r){const t=e.props.scale;return{node:r.node,x:e.state.x+r.deltaX/t,y:e.state.y+r.deltaY/t,deltaX:r.deltaX/t,deltaY:r.deltaY/t,lastX:e.state.x,lastY:e.state.y}}function uB(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function O2(e){const r=e.findDOMNode();if(!r)throw new Error("<DraggableCore>: Unmounted during event!");return r}var kg={},Ag={};Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.default=cB;function cB(){}Object.defineProperty(kg,"__esModule",{value:!0}),kg.default=void 0;var R2=dB(W),li=N2(wt.exports),fB=N2(tu.exports),Sa=sr,lu=fl,F2=cl,Yh=N2(Ag);function N2(e){return e&&e.__esModule?e:{default:e}}function A6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(A6=function(i){return i?t:r})(e)}function dB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=A6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function Va(e,r,t){return r=hB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hB(e){var r=pB(e,"string");return typeof r=="symbol"?r:String(r)}function pB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}const bo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let su=bo.mouse,Og=class extends R2.Component{constructor(){super(...arguments),Va(this,"dragging",!1),Va(this,"lastX",NaN),Va(this,"lastY",NaN),Va(this,"touchIdentifier",null),Va(this,"mounted",!1),Va(this,"handleDragStart",r=>{if(this.props.onMouseDown(r),!this.props.allowAnyClick&&typeof r.button=="number"&&r.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=t;if(this.props.disabled||!(r.target instanceof i.defaultView.Node)||this.props.handle&&!(0,Sa.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,Sa.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,Sa.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,lu.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:p}=f,g=(0,lu.createCoreData)(this,c,p);(0,Yh.default)("DraggableCore: handleDragStart: %j",g),(0,Yh.default)("calling",this.props.onStart),!(this.props.onStart(r,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Sa.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=p,(0,Sa.addEvent)(i,su.move,this.handleDrag),(0,Sa.addEvent)(i,su.stop,this.handleDragStop))}),Va(this,"handleDrag",r=>{const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let p=i-this.lastX,g=l-this.lastY;if([p,g]=(0,lu.snapToGrid)(this.props.grid,p,g),!p&&!g)return;i=this.lastX+p,l=this.lastY+g}const f=(0,lu.createCoreData)(this,i,l);if((0,Yh.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=i,this.lastY=l}),Va(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let g=i-this.lastX||0,d=l-this.lastY||0;[g,d]=(0,lu.snapToGrid)(this.props.grid,g,d),i=this.lastX+g,l=this.lastY+d}const f=(0,lu.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,Sa.removeUserSelectStyles)(p.ownerDocument),(0,Yh.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,Yh.default)("DraggableCore: Removing handlers"),(0,Sa.removeEvent)(p.ownerDocument,su.move,this.handleDrag),(0,Sa.removeEvent)(p.ownerDocument,su.stop,this.handleDragStop))}),Va(this,"onMouseDown",r=>(su=bo.mouse,this.handleDragStart(r))),Va(this,"onMouseUp",r=>(su=bo.mouse,this.handleDragStop(r))),Va(this,"onTouchStart",r=>(su=bo.touch,this.handleDragStart(r))),Va(this,"onTouchEnd",r=>(su=bo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,Sa.addEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,Sa.removeEvent)(t,bo.mouse.move,this.handleDrag),(0,Sa.removeEvent)(t,bo.touch.move,this.handleDrag),(0,Sa.removeEvent)(t,bo.mouse.stop,this.handleDragStop),(0,Sa.removeEvent)(t,bo.touch.stop,this.handleDragStop),(0,Sa.removeEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Sa.removeUserSelectStyles)(t)}}findDOMNode(){var r,t;return(r=this.props)!==null&&r!==void 0&&r.nodeRef?(t=this.props)===null||t===void 0||(t=t.nodeRef)===null||t===void 0?void 0:t.current:fB.default.findDOMNode(this)}render(){return R2.cloneElement(R2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};kg.default=Og,Va(Og,"displayName","DraggableCore"),Va(Og,"propTypes",{allowAnyClick:li.default.bool,children:li.default.node.isRequired,disabled:li.default.bool,enableUserSelectHack:li.default.bool,offsetParent:function(e,r){if(e[r]&&e[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:li.default.arrayOf(li.default.number),handle:li.default.string,cancel:li.default.string,nodeRef:li.default.object,onStart:li.default.func,onDrag:li.default.func,onStop:li.default.func,onMouseDown:li.default.func,scale:li.default.number,className:F2.dontSetMe,style:F2.dontSetMe,transform:F2.dontSetMe}),Va(Og,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return g.default}}),e.default=void 0;var r=b(W),t=m(wt.exports),i=m(tu.exports),l=m(NP),f=sr,c=fl,p=cl,g=m(kg),d=m(Ag);function m(k){return k&&k.__esModule?k:{default:k}}function C(k){if(typeof WeakMap!="function")return null;var D=new WeakMap,R=new WeakMap;return(C=function(N){return N?R:D})(k)}function b(k,D){if(!D&&k&&k.__esModule)return k;if(k===null||typeof k!="object"&&typeof k!="function")return{default:k};var R=C(D);if(R&&R.has(k))return R.get(k);var N={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in k)if(M!=="default"&&Object.prototype.hasOwnProperty.call(k,M)){var I=z?Object.getOwnPropertyDescriptor(k,M):null;I&&(I.get||I.set)?Object.defineProperty(N,M,I):N[M]=k[M]}return N.default=k,R&&R.set(k,N),N}function x(){return x=Object.assign?Object.assign.bind():function(k){for(var D=1;D<arguments.length;D++){var R=arguments[D];for(var N in R)Object.prototype.hasOwnProperty.call(R,N)&&(k[N]=R[N])}return k},x.apply(this,arguments)}function _(k,D,R){return D=T(D),D in k?Object.defineProperty(k,D,{value:R,enumerable:!0,configurable:!0,writable:!0}):k[D]=R,k}function T(k){var D=E(k,"string");return typeof D=="symbol"?D:String(D)}function E(k,D){if(typeof k!="object"||k===null)return k;var R=k[Symbol.toPrimitive];if(R!==void 0){var N=R.call(k,D||"default");if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(k)}class A extends r.Component{static getDerivedStateFromProps(D,R){let{position:N}=D,{prevPropsPosition:z}=R;return N&&(!z||N.x!==z.x||N.y!==z.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:N,prevPropsPosition:z}),{x:N.x,y:N.y,prevPropsPosition:{...N}}):null}constructor(D){super(D),_(this,"onDragStart",(R,N)=>{if((0,d.default)("Draggable: onDragStart: %j",N),this.props.onStart(R,(0,c.createDraggableData)(this,N))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_(this,"onDrag",(R,N)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",N);const z=(0,c.createDraggableData)(this,N),M={x:z.x,y:z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Y,y:B}=M;M.x+=this.state.slackX,M.y+=this.state.slackY;const[P,U]=(0,c.getBoundPosition)(this,M.x,M.y);M.x=P,M.y=U,M.slackX=this.state.slackX+(Y-M.x),M.slackY=this.state.slackY+(B-M.y),z.x=M.x,z.y=M.y,z.deltaX=M.x-this.state.x,z.deltaY=M.y-this.state.y}if(this.props.onDrag(R,z)===!1)return!1;this.setState(M)}),_(this,"onDragStop",(R,N)=>{if(!this.state.dragging||this.props.onStop(R,(0,c.createDraggableData)(this,N))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",N);const M={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:Y,y:B}=this.props.position;M.x=Y,M.y=B}this.setState(M)}),this.state={dragging:!1,dragged:!1,x:D.position?D.position.x:D.defaultPosition.x,y:D.position?D.position.y:D.defaultPosition.y,prevPropsPosition:{...D.position},slackX:0,slackY:0,isElementSVG:!1},D.position&&(D.onDrag||D.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var D,R;return(D=(R=this.props)===null||R===void 0||(R=R.nodeRef)===null||R===void 0?void 0:R.current)!==null&&D!==void 0?D:i.default.findDOMNode(this)}render(){const{axis:D,bounds:R,children:N,defaultPosition:z,defaultClassName:M,defaultClassNameDragging:I,defaultClassNameDragged:Y,position:B,positionOffset:P,scale:U,...H}=this.props;let V={},K=null;const J=!Boolean(B)||this.state.dragging,q=B||z,te={x:(0,c.canDragX)(this)&&J?this.state.x:q.x,y:(0,c.canDragY)(this)&&J?this.state.y:q.y};this.state.isElementSVG?K=(0,f.createSVGTransform)(te,P):V=(0,f.createCSSTransform)(te,P);const Z=(0,l.default)(N.props.className||"",M,{[I]:this.state.dragging,[Y]:this.state.dragged});return r.createElement(g.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(N),{className:Z,style:{...N.props.style,...V},transform:K}))}}e.default=A,_(A,"displayName","Draggable"),_(A,"propTypes",{...g.default.propTypes,axis:t.default.oneOf(["both","x","y","none"]),bounds:t.default.oneOfType([t.default.shape({left:t.default.number,right:t.default.number,top:t.default.number,bottom:t.default.number}),t.default.string,t.default.oneOf([!1])]),defaultClassName:t.default.string,defaultClassNameDragging:t.default.string,defaultClassNameDragged:t.default.string,defaultPosition:t.default.shape({x:t.default.number,y:t.default.number}),positionOffset:t.default.shape({x:t.default.oneOfType([t.default.number,t.default.string]),y:t.default.oneOfType([t.default.number,t.default.string])}),position:t.default.shape({x:t.default.number,y:t.default.number}),className:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),_(A,"defaultProps",{...g.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(u6);const{default:O6,DraggableCore:vB}=u6;Dg.exports=O6,Dg.exports.default=O6,Dg.exports.DraggableCore=vB;var M2={};M2.__esModule=!0,M2.cloneElement=CB;var mB=gB(W);function gB(e){return e&&e.__esModule?e:{default:e}}function R6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function F6(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R6(Object(t),!0).forEach(function(i){yB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function yB(e,r,t){return r=xB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xB(e){var r=bB(e,"string");return typeof r=="symbol"?r:String(r)}function bB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CB(e,r){return r.style&&e.props.style&&(r.style=F6(F6({},e.props.style),r.style)),r.className&&e.props.className&&(r.className=e.props.className+" "+r.className),mB.default.cloneElement(e,r)}var qh={};qh.__esModule=!0,qh.resizableProps=void 0;var Bt=wB(wt.exports);function wB(e){return e&&e.__esModule?e:{default:e}}var _B={axis:Bt.default.oneOf(["both","x","y","none"]),className:Bt.default.string,children:Bt.default.element.isRequired,draggableOpts:Bt.default.shape({allowAnyClick:Bt.default.bool,cancel:Bt.default.string,children:Bt.default.node,disabled:Bt.default.bool,enableUserSelectHack:Bt.default.bool,offsetParent:Bt.default.node,grid:Bt.default.arrayOf(Bt.default.number),handle:Bt.default.string,nodeRef:Bt.default.object,onStart:Bt.default.func,onDrag:Bt.default.func,onStop:Bt.default.func,onMouseDown:Bt.default.func,scale:Bt.default.number}),height:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="y"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)},handle:Bt.default.oneOfType([Bt.default.node,Bt.default.func]),handleSize:Bt.default.arrayOf(Bt.default.number),lockAspectRatio:Bt.default.bool,maxConstraints:Bt.default.arrayOf(Bt.default.number),minConstraints:Bt.default.arrayOf(Bt.default.number),onResizeStop:Bt.default.func,onResizeStart:Bt.default.func,onResize:Bt.default.func,resizeHandles:Bt.default.arrayOf(Bt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Bt.default.number,width:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="x"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)}};qh.resizableProps=_B,$h.__esModule=!0,$h.default=void 0;var Gh=kB(W),SB=Dg.exports,EB=M2,DB=qh,TB=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function N6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(N6=function(l){return l?t:r})(e)}function kB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=N6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},P2.apply(this,arguments)}function AB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function M6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function B2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?M6(Object(t),!0).forEach(function(i){OB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function OB(e,r,t){return r=RB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RB(e){var r=FB(e,"string");return typeof r=="symbol"?r:String(r)}function FB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function NB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,L2(e,r)}function L2(e,r){return L2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},L2(e,r)}var z2=function(e){NB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.handleRefs={},i.lastHandleRect=null,i.slack=null,i}var t=r.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(l,f){var c=this.props,p=c.minConstraints,g=c.maxConstraints,d=c.lockAspectRatio;if(!p&&!g&&!d)return[l,f];if(d){var m=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*m)?f=l/m:l=f*m}var x=l,_=f,T=this.slack||[0,0],E=T[0],A=T[1];return l+=E,f+=A,p&&(l=Math.max(p[0],l),f=Math.max(p[1],f)),g&&(l=Math.min(g[0],l),f=Math.min(g[1],f)),this.slack=[E+(x-l),A+(_-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(p,g){var d=g.node,m=g.deltaX,C=g.deltaY;l==="onResizeStart"&&c.resetData();var b=(c.props.axis==="both"||c.props.axis==="x")&&f!=="n"&&f!=="s",x=(c.props.axis==="both"||c.props.axis==="y")&&f!=="e"&&f!=="w";if(!(!b&&!x)){var _=f[0],T=f[f.length-1],E=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(T==="w"){var A=E.left-c.lastHandleRect.left;m+=A}if(_==="n"){var k=E.top-c.lastHandleRect.top;C+=k}}c.lastHandleRect=E,T==="w"&&(m=-m),_==="n"&&(C=-C);var D=c.props.width+(b?m/c.props.transformScale:0),R=c.props.height+(x?C/c.props.transformScale:0),N=c.runConstraints(D,R);D=N[0],R=N[1];var z=D!==c.props.width||R!==c.props.height,M=typeof c.props[l]=="function"?c.props[l]:null,I=l==="onResize"&&!z;M&&!I&&(p.persist==null||p.persist(),M(p,{node:d,size:{width:D,height:R},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Gh.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var p=typeof c.type=="string",g=B2({ref:f},p?{}:{handleAxis:l});return Gh.cloneElement(c,g)},t.render=function(){var l=this,f=this.props,c=f.children,p=f.className,g=f.draggableOpts;f.width,f.height,f.handle,f.handleSize,f.lockAspectRatio,f.axis,f.minConstraints,f.maxConstraints,f.onResize,f.onResizeStop,f.onResizeStart;var d=f.resizeHandles;f.transformScale;var m=AB(f,TB);return(0,EB.cloneElement)(c,B2(B2({},m),{},{className:(p?p+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Gh.createRef();return Gh.createElement(SB.DraggableCore,P2({},g,{nodeRef:x,key:"resizableHandle-"+C,onStop:l.resizeHandler("onResizeStop",C),onStart:l.resizeHandler("onResizeStart",C),onDrag:l.resizeHandler("onResize",C)}),l.renderResizeHandle(C,x))}))}))},r}(Gh.Component);$h.default=z2,z2.propTypes=DB.resizableProps,z2.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Rg={};Rg.__esModule=!0,Rg.default=void 0;var U2=zB(W),MB=P6(wt.exports),PB=P6($h),BB=qh,LB=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function P6(e){return e&&e.__esModule?e:{default:e}}function B6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(B6=function(l){return l?t:r})(e)}function zB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=B6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},j2.apply(this,arguments)}function L6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function Fg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?L6(Object(t),!0).forEach(function(i){UB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function UB(e,r,t){return r=jB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jB(e){var r=IB(e,"string");return typeof r=="symbol"?r:String(r)}function IB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function HB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function VB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,I2(e,r)}function I2(e,r){return I2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},I2(e,r)}var z6=function(e){VB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.state={width:i.props.width,height:i.props.height,propsWidth:i.props.width,propsHeight:i.props.height},i.onResize=function(p,g){var d=g.size;i.props.onResize?(p.persist==null||p.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(p,g)})):i.setState(d)},i}r.getDerivedStateFromProps=function(l,f){return f.propsWidth!==l.width||f.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null};var t=r.prototype;return t.render=function(){var l=this.props,f=l.handle,c=l.handleSize;l.onResize;var p=l.onResizeStart,g=l.onResizeStop,d=l.draggableOpts,m=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var _=l.resizeHandles,T=l.style,E=l.transformScale,A=HB(l,LB);return U2.createElement(PB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:m,onResizeStart:p,onResize:this.onResize,onResizeStop:g,resizeHandles:_,transformScale:E,width:this.state.width},U2.createElement("div",j2({},A,{style:Fg(Fg({},T),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(U2.Component);Rg.default=z6,z6.propTypes=Fg(Fg({},BB.resizableProps),{},{children:MB.default.element}),x2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var $B=x2.exports.Resizable=$h.default;x2.exports.ResizableBox=Rg.default;const YB={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},qB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q($B,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function GB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:p="szld_table_cell_width",emptyText:g,...d}=r,[m,C]=W.useState(r.columns||[]),b=E=>{var k,D;let A=E.width||l;if(E.dataIndex&&c){const R=Array.isArray(E.dataIndex)?E.dataIndex.join("-"):String(E.dataIndex),N=(D=(k=jb(p))==null?void 0:k[c])==null?void 0:D[R];N&&(A=N)}return A};W.useEffect(()=>{const E=r.columns||[];if(E.length===0||!f){C(E);return}const A=E==null?void 0:E.filter(k=>!k.hidden).map(k=>k.dataIndex?{...k,width:b(k),onHeaderCell:D=>({width:D.width,resizeable:f,onResize:(R,{size:N})=>x(D,N)})}:k);A.length>0&&(A[A.length-1].minWidth=A[A.length-1].width,A[A.length-1].width=void 0),C(A)},[r.columns,c,l,f]);const x=(E,A)=>{C(k=>{const D=k==null?void 0:k.map(R=>R.dataIndex===E.dataIndex?{...R,width:A.width}:R);if(c){const R=jb(p)||{};R[c]=R[c]||{},D==null||D.forEach(N=>{if(N.dataIndex){const z=Array.isArray(N.dataIndex)?N.dataIndex.join("-"):String(N.dataIndex);R[c][z]=N.width}}),localStorage.setItem(p,JSON.stringify(R))}return D})},_={header:{cell:qB},...d==null?void 0:d.components},T=W.useMemo(()=>{var A;const E=k=>{let D=k.width||k.minWidth;return(!D||typeof D=="string")&&(D=l),D};return(A=m==null?void 0:m.map(k=>E(k)))==null?void 0:A.reduce((k,D)=>k+D,0)},[m,l]);return Be(en,{children:[t&&Q(y2,{hiddenTitle:!0,...t,items:t.items}),Q(me.Table,{scroll:{x:T},...d,components:_,columns:m,className:rs(YB.table,r==null?void 0:r.className),locale:{emptyText:Q(me.Empty,{image:me.Empty.PRESENTED_IMAGE_SIMPLE,description:g})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:E=>i==="10001"?`共 ${E} 条`:`Total ${E} items`,...r==null?void 0:r.pagination}})]})}const KB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},U6=W.createContext(null),WB=({index:e,...r})=>{const[t]=me.Form.useForm();return Q(me.Form,{form:t,component:!1,children:Q(U6.Provider,{value:t,children:Q("tr",{...r})})})};function QB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:p,type:g="input",valueProps:d,initialValue:m,...C}=e,b=W.useRef(null),x=W.useContext(U6),_=async()=>{try{const A=await x.validateFields();p({...f,...A})}catch{}},T=()=>Q(s6,{valueType:g,valueProps:{...d,onBlur:_,onPressEnter:_},inputRef:b});let E=i;return t&&(E=Q(me.Form.Item,{style:{margin:0},initialValue:m||il.get(f,l),name:l,rules:c,children:T()})),Q("td",{...C,children:E})}function ZB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:WB,cell:QB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:p=>({...c,record:p,onChange:t})}:c);return Q(me.Table,{...i,components:l,rowClassName:()=>KB.editableRow,columns:f})}const j6=e=>{const{auth:r=!0,...t}=e;return r?Q(me.Button,{...t}):null},XB=e=>{const{PId:r,auths:t,...i}=e,l=W.useMemo(()=>t?!!(typeof r=="number"&&t.find(f=>f.PId===r)||Array.isArray(r)&&t.filter(f=>r.includes(f.PId)).length>0):!1,[r,t]);return Q(j6,{...i,auth:l})},Kh={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},JB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:p=!1,classes:g})=>{const d=W.useRef(null),m=W.useRef(null),C=W.useRef(null),b=W.useRef(null),x=W.useRef(0),_=W.useRef(),T=W.useRef(0),E=W.useMemo(()=>{if(!m.current||!C.current)return;const M=m.current,I=C.current,Y=parseFloat(I.scrollHeight.toString());return Y*2-M.clientHeight<Y},[]),A=()=>{if(!m.current||!C.current)return;const M=m.current,I=C.current,Y=parseFloat(I.scrollHeight.toString());if(Y*2<=M.clientHeight){M.style.animation="none";return}const B=Y/M.clientHeight;M.style.setProperty("--content-height",`${Y}px`),M.style.animationDuration=`${e*B}s`,M.style.animationDelay=`${r}s`,M.style.animationTimingFunction=t};W.useEffect(()=>(A(),m.current&&(b.current=new ResizeObserver(A),b.current.observe(m.current)),()=>{b.current&&m.current&&b.current.unobserve(m.current)}),[e,r]);const k=()=>{p&&m.current&&(m.current.style.animationPlayState="paused")},D=()=>{p&&m.current&&(z(),m.current.style.animationPlayState="running")},R=()=>{if(!m.current||!p)return;const I=m.current.getAnimations()[0];if(I)if(Math.abs(x.current)>.1){const Y=performance.now(),B=Y-T.current;T.current=Y;const P=.95;x.current*=Math.pow(P,B/16);const U=I.currentTime||0;I.currentTime=U+x.current,_.current=requestAnimationFrame(R)}else x.current=0,z()},N=M=>{if(!p||!m.current)return;M.preventDefault();const I=M.deltaY,Y=.25;x.current+=I*Y;const B=50;x.current=Math.max(-B,Math.min(B,x.current)),_.current||(T.current=performance.now(),_.current=requestAnimationFrame(R))},z=()=>{_.current&&(cancelAnimationFrame(_.current),_.current=void 0)};return W.useEffect(()=>()=>{z()},[]),W.useEffect(()=>{const M=d.current;if(M)return p&&M.addEventListener("wheel",N,{passive:!1}),()=>{M.removeEventListener("wheel",N)}},[p]),Q("div",{ref:d,className:`${Kh.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:k,onMouseLeave:D,children:Be("div",{ref:m,className:rs(Kh.container,g==null?void 0:g.container),children:[Q("div",{ref:C,className:rs(Kh.content,g==null?void 0:g.content),children:f}),Q("div",{className:rs(Kh.content,g==null?void 0:g.content),children:f}),E&&Q("div",{className:rs(Kh.content,g==null?void 0:g.content),children:f})]})})},Pr={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},I6=e=>{const{data:r,current:t,rowKey:i,renderContent:l}=e,[f,c]=W.useState(!1),p=W.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),g=W.useMemo(()=>p>1?f?0:p-1:0,[p,f]),d=()=>{c(!0)};return Be("ul",{className:Pr.main,children:[p>1&&!f&&Be("li",{className:rs(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Be("div",{className:Pr.collpase,children:[Be("div",{children:["已收起",Q("span",{children:p-1}),"个节点"]}),Be("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(F7,{})]})]})})]}),r.slice(g).map((m,C)=>Be("li",{className:rs(Pr.item,p===C+g?Pr.itemActive:p>C+g?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Be("div",{className:Pr.content,children:[l?l(m,C,f?p:p-g):Be(en,{children:[Q("div",{className:Pr.title,children:m.PNName}),Be("div",{className:Pr.dateWrapper,children:[m.PlanFinishDate&&Be("span",{children:["预计完成时间: ",m.PlanFinishDate]}),m.UpdateTime&&Be("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",m.UpdateTime]})]}),m.Remark&&Q("div",{className:Pr.remark,children:m.Remark})]}),f&&p-1===C&&Be("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(X7,{})]})]})]},typeof i=="string"?m[i]:i(m)))]})},eL=e=>{const{current:r,data:t,rowKey:i,renderContent:l,currentIndex:f,...c}=e;return(()=>{me.Modal.info({icon:null,title:"流程节点",width:700,content:Q(I6,{rowKey:i,renderContent:l,current:r,currentIndex:f,data:t}),closable:!0,footer:null,maskClosable:!0,...c})})(),null},H6={customPagination:"custom-pagination-module_customPagination_bb6f7",jumpBtns:"custom-pagination-module_jumpBtns_a6c0b"};function tL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,p]=W.useState(""),g=(f==null?void 0:f.pageSize)||10,d=b=>{p(b.target.value)},m=b=>{var x;p(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),g))},C=b=>{var x;if(b.key==="Enter"){if(p(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),g)}};return Be("div",{className:H6.customPagination,children:[Q(me.Pagination,{showTotal:b=>`${r} ${b} ${t}`,showSizeChanger:{options:[{label:`10 ${t}/${l}`,value:10},{label:`20 ${t}/${l}`,value:20},{label:`50 ${t}/${l}`,value:50},{label:`100 ${t}/${l}`,value:100}]},...f}),Be("div",{className:H6.jumpBtns,children:[i,Q(me.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>m(b),onKeyDown:b=>C(b)}),l]})]})}var V6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",p="minute",g="hour",d="day",m="week",C="month",b="quarter",x="year",_="date",T="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var K=["th","st","nd","rd"],ee=V%100;return"["+V+(K[(ee-20)%10]||K[ee]||K[0])+"]"}},D=function(V,K,ee){var J=String(V);return!J||J.length>=K?V:""+Array(K+1-J.length).join(ee)+V},R={s:D,z:function(V){var K=-V.utcOffset(),ee=Math.abs(K),J=Math.floor(ee/60),q=ee%60;return(K<=0?"+":"-")+D(J,2,"0")+":"+D(q,2,"0")},m:function V(K,ee){if(K.date()<ee.date())return-V(ee,K);var J=12*(ee.year()-K.year())+(ee.month()-K.month()),q=K.clone().add(J,C),te=ee-q<0,Z=K.clone().add(J+(te?-1:1),C);return+(-(J+(ee-q)/(te?q-Z:Z-q))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:C,y:x,w:m,d,D:_,h:g,m:p,s:c,ms:f,Q:b}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},N="en",z={};z[N]=k;var M="$isDayjsObject",I=function(V){return V instanceof U||!(!V||!V[M])},Y=function V(K,ee,J){var q;if(!K)return N;if(typeof K=="string"){var te=K.toLowerCase();z[te]&&(q=te),ee&&(z[te]=ee,q=te);var Z=K.split("-");if(!q&&Z.length>1)return V(Z[0])}else{var $=K.name;z[$]=K,q=$}return!J&&q&&(N=q),q||!J&&N},B=function(V,K){if(I(V))return V.clone();var ee=typeof K=="object"?K:{};return ee.date=V,ee.args=arguments,new U(ee)},P=R;P.l=Y,P.i=I,P.w=function(V,K){return B(V,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var U=function(){function V(ee){this.$L=Y(ee.locale,null,!0),this.parse(ee),this.$x=this.$x||ee.x||{},this[M]=!0}var K=V.prototype;return K.parse=function(ee){this.$d=function(J){var q=J.date,te=J.utc;if(q===null)return new Date(NaN);if(P.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var Z=q.match(E);if(Z){var $=Z[2]-1||0,ne=(Z[7]||"0").substring(0,3);return te?new Date(Date.UTC(Z[1],$,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ne)):new Date(Z[1],$,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ne)}}return new Date(q)}(ee),this.init()},K.init=function(){var ee=this.$d;this.$y=ee.getFullYear(),this.$M=ee.getMonth(),this.$D=ee.getDate(),this.$W=ee.getDay(),this.$H=ee.getHours(),this.$m=ee.getMinutes(),this.$s=ee.getSeconds(),this.$ms=ee.getMilliseconds()},K.$utils=function(){return P},K.isValid=function(){return this.$d.toString()!==T},K.isSame=function(ee,J){var q=B(ee);return this.startOf(J)<=q&&q<=this.endOf(J)},K.isAfter=function(ee,J){return B(ee)<this.startOf(J)},K.isBefore=function(ee,J){return this.endOf(J)<B(ee)},K.$g=function(ee,J,q){return P.u(ee)?this[J]:this.set(q,ee)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(ee,J){var q=this,te=!!P.u(J)||J,Z=P.p(ee),$=function(ye,De){var Pe=P.w(q.$u?Date.UTC(q.$y,De,ye):new Date(q.$y,De,ye),q);return te?Pe:Pe.endOf(d)},ne=function(ye,De){return P.w(q.toDate()[ye].apply(q.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(De)),q)},oe=this.$W,ae=this.$M,se=this.$D,ve="set"+(this.$u?"UTC":"");switch(Z){case x:return te?$(1,0):$(31,11);case C:return te?$(1,ae):$(0,ae+1);case m:var we=this.$locale().weekStart||0,ce=(oe<we?oe+7:oe)-we;return $(te?se-ce:se+(6-ce),ae);case d:case _:return ne(ve+"Hours",0);case g:return ne(ve+"Minutes",1);case p:return ne(ve+"Seconds",2);case c:return ne(ve+"Milliseconds",3);default:return this.clone()}},K.endOf=function(ee){return this.startOf(ee,!1)},K.$set=function(ee,J){var q,te=P.p(ee),Z="set"+(this.$u?"UTC":""),$=(q={},q[d]=Z+"Date",q[_]=Z+"Date",q[C]=Z+"Month",q[x]=Z+"FullYear",q[g]=Z+"Hours",q[p]=Z+"Minutes",q[c]=Z+"Seconds",q[f]=Z+"Milliseconds",q)[te],ne=te===d?this.$D+(J-this.$W):J;if(te===C||te===x){var oe=this.clone().set(_,1);oe.$d[$](ne),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else $&&this.$d[$](ne);return this.init(),this},K.set=function(ee,J){return this.clone().$set(ee,J)},K.get=function(ee){return this[P.p(ee)]()},K.add=function(ee,J){var q,te=this;ee=Number(ee);var Z=P.p(J),$=function(ae){var se=B(te);return P.w(se.date(se.date()+Math.round(ae*ee)),te)};if(Z===C)return this.set(C,this.$M+ee);if(Z===x)return this.set(x,this.$y+ee);if(Z===d)return $(1);if(Z===m)return $(7);var ne=(q={},q[p]=i,q[g]=l,q[c]=t,q)[Z]||1,oe=this.$d.getTime()+ee*ne;return P.w(oe,this)},K.subtract=function(ee,J){return this.add(-1*ee,J)},K.format=function(ee){var J=this,q=this.$locale();if(!this.isValid())return q.invalidDate||T;var te=ee||"YYYY-MM-DDTHH:mm:ssZ",Z=P.z(this),$=this.$H,ne=this.$m,oe=this.$M,ae=q.weekdays,se=q.months,ve=q.meridiem,we=function(De,Pe,Te,ze){return De&&(De[Pe]||De(J,te))||Te[Pe].slice(0,ze)},ce=function(De){return P.s($%12||12,De,"0")},ye=ve||function(De,Pe,Te){var ze=De<12?"AM":"PM";return Te?ze.toLowerCase():ze};return te.replace(A,function(De,Pe){return Pe||function(Te){switch(Te){case"YY":return String(J.$y).slice(-2);case"YYYY":return P.s(J.$y,4,"0");case"M":return oe+1;case"MM":return P.s(oe+1,2,"0");case"MMM":return we(q.monthsShort,oe,se,3);case"MMMM":return we(se,oe);case"D":return J.$D;case"DD":return P.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return we(q.weekdaysMin,J.$W,ae,2);case"ddd":return we(q.weekdaysShort,J.$W,ae,3);case"dddd":return ae[J.$W];case"H":return String($);case"HH":return P.s($,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return ye($,ne,!0);case"A":return ye($,ne,!1);case"m":return String(ne);case"mm":return P.s(ne,2,"0");case"s":return String(J.$s);case"ss":return P.s(J.$s,2,"0");case"SSS":return P.s(J.$ms,3,"0");case"Z":return Z}return null}(De)||Z.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(ee,J,q){var te,Z=this,$=P.p(J),ne=B(ee),oe=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,se=function(){return P.m(Z,ne)};switch($){case x:te=se()/12;break;case C:te=se();break;case b:te=se()/3;break;case m:te=(ae-oe)/6048e5;break;case d:te=(ae-oe)/864e5;break;case g:te=ae/l;break;case p:te=ae/i;break;case c:te=ae/t;break;default:te=ae}return q?te:P.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return z[this.$L]},K.locale=function(ee,J){if(!ee)return this.$L;var q=this.clone(),te=Y(ee,J,!0);return te&&(q.$L=te),q},K.clone=function(){return P.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},V}(),H=U.prototype;return B.prototype=H,[["$ms",f],["$s",c],["$m",p],["$H",g],["$W",d],["$M",C],["$y",x],["$D",_]].forEach(function(V){H[V[1]]=function(K){return this.$g(K,V[0],V[1])}}),B.extend=function(V,K){return V.$i||(V(K,U,B),V.$i=!0),B},B.locale=Y,B.isDayjs=I,B.unix=function(V){return B(1e3*V)},B.en=z[N],B.Ls=z,B.p={},B})})(V6);const hn=V6.exports,Wh=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Dc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default);if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>hn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=nL(e.children||[])),t||null},$6=e=>e&&e<hn().startOf("day"),Y6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},nL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},Qh=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var m;let p=[];const g=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(T=>({label:`${T.dicid||""}-${T.info||""}`,value:`${T.dicid||""}-${T.info||""}`})))}catch{me.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",T=c==null?void 0:c["field-names"];if(!x.length){me.message.error("请配置key-field");return}const E=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(E!=null&&E.data){const A=E==null?void 0:E.data,k=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(k)&&(D=k),T?p=D:p=D.map(R=>({label:Y6(R,_,x),value:Y6(R,_,x)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(p=((m=c.data)==null?void 0:m.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(p=c.options)):c.inputType==="dictionary"?p=await g(t):c.inputType==="system-dictionary"&&(p=await g(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),p};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zh(e){if(!q6(e))return e;const r=atob(e),t=new Uint8Array(r.length);for(let i=0;i<r.length;i++)t[i]=r.charCodeAt(i);return new TextDecoder().decode(t)}function q6(e){return e?e.length%4!==0?!1:/^[A-Za-z0-9+/]+(?:=?=?)$/.test(e):!0}const rL=(e,r)=>{var b;let t=il.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:p=!0,onlyNumber:g=""}=e;let d=[];p&&((b=t==null?void 0:t.attr_list)==null||b.forEach(x=>{var _,T,E,A,k,D;(_=x==null?void 0:x.json)!=null&&_["auto-generate"]&&((T=x==null?void 0:x.json)!=null&&T["auto-generate-type"])&&(((E=x==null?void 0:x.json)==null?void 0:E["auto-generate-type"])==="currenttime"&&(x.attrvalue=hn().format("YYYY-MM-DD HH:mm:ss")),((A=x==null?void 0:x.json)==null?void 0:A["auto-generate-type"])==="guid"&&(x.attrvalue=g||f||"")),(k=x==null?void 0:x.json)!=null&&k.default&&(x.attrvalue=(D=x==null?void 0:x.json)==null?void 0:D.default)}));const m=(x,_)=>{try{const T=new Map(x.map((E,A)=>[E.attrid,A]));for(const[E,A]of Object.entries(_)){const k=T.get(E);if(k===void 0)continue;let D=x[k];if(!A&&A!==0){D.attrvalue="";continue}D=C(D,A,l)}x.forEach(E=>{E.children&&Array.isArray(E.children)&&E.children.length>0&&!Array.isArray(E.children[0])&&_[E.attrid]&&m(E.children,_[E.attrid]),E.children&&Array.isArray(E.children)&&E.children.length>0&&Array.isArray(E.children[0])&&E.children.forEach((A,k)=>{var D,R;A&&Array.isArray(A)&&((D=_==null?void 0:_[E.attrid])!=null&&D[k])&&m(A,(R=_==null?void 0:_[E.attrid])==null?void 0:R[k])})})}catch{}},C=(x,_,T)=>{var k,D,R,N;const E=(k=x.json)==null?void 0:k.input,A=(D=x.json)==null?void 0:D.format;switch(E){case"image":case"file":case"video":case"audio":const z=typeof _=="string"?JSON.parse(_):_;if(!Array.isArray(z)){x.attrvalue=JSON.stringify([]);return}const M=z.filter(B=>B.FileId),I=z.filter(B=>{var P;return B.status==="done"&&((P=B.response)==null?void 0:P.data)}).map(B=>B.response.data),Y=[...M,...I];d=[...d,...I],x.attrvalue=JSON.stringify(Y);break;case"cascader":if(Array.isArray(_)&&_.length>0){const B=((R=x.json)==null?void 0:R["cascader-delimiter"])||"/";x.attrvalue=_.join(B)}else x.attrvalue="";break;case"range-picker":T?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(B=>hn(B).format(A||"YYYY-MM-DD")).join("~"):x.attrvalue="":Array.isArray(_)&&_.length>0?x.attrvalue=_.join("~"):x.attrvalue="";break;case"multiple-date-picker":T?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(B=>hn(B).format(A||"YYYY-MM-DD")).join(","):x.attrvalue=_:Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"checkbox":case"mult-select":Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"date-picker":_?x.attrvalue=hn(_).format(A||"YYYY-MM-DD"):x.attrvalue="";break;case"time-picker":_?x.attrvalue=hn(_).format(A||"YYYY-MM-DD HH:mm:ss"):x.attrvalue="";break;default:(N=x==null?void 0:x.json)!=null&&N["properties-multiple"]||(x.attrvalue=_);break}return x};return t.attr_list&&Array.isArray(t.attr_list)&&m(i,r),{updatedData:c?Q6(t.attr_list||[]):t,uploadedFiles:d}},H2=(e,r)=>e.map(t=>{var f,c,p;const i=G6(t,r),{children:l}=i;if(l&&!Array.isArray(l==null?void 0:l[0])&&(l!=null&&l.length)&&(i.children=[H2(l)]),i!=null&&i.children&&Array.isArray((f=i==null?void 0:i.children)==null?void 0:f[0])&&((c=i==null?void 0:i.children)!=null&&c.length)){const g=(p=i==null?void 0:i.children)==null?void 0:p.map(d=>d==null?void 0:d.map(m=>G6(m,r)));i.children=g}return i}),G6=(e,r)=>{var t,i;if(!e.json&&e.info)try{const l=e.info_base64===1?Zh(e.info):e.info,f=uu(l),c=il.cloneDeep(r)||{},{langConfig:p=[],attrLangConfig:g=[]}=c||{};return c==null||delete c.langConfig,p!=null&&p.length&&((t=f==null?void 0:f.data)!=null&&t.length)&&(f==null?void 0:f.inputType)==="local"&&(f.options=(i=f.data)==null?void 0:i.map(d=>({label:Ji(p,d),value:d})),f==null||delete f.data),p!=null&&p.length&&(f!=null&&f["combination-name"])&&(f["combination-name"]=Ji(g,f["combination-name"])||Ji(p,f["combination-name"])),p!=null&&p.length&&(f!=null&&f["default-prompt"])&&(f["default-prompt"]=Ji(g,f["default-prompt"])),p!=null&&p.length&&(f!=null&&f.instruction)&&(f.instruction=Ji(g,f.instruction)),p!=null&&p.length&&(f!=null&&f["regexp-message"])&&(f["regexp-message"]=Ji(g,f["regexp-message"])),{...e,json:f,...c,info:JSON.stringify(f)}}catch{return{...e,json:{},...r}}return{...e,...r}},K6=(e,r)=>H2(e,r),W6=(e,r)=>{const t=H2(e,r),i=t.filter(c=>{var p;return(p=c.json)==null?void 0:p.combination}).reduce((c,p)=>{const g=p.json["combination-id"];return g&&(c[g]||(c[g]=[]),c[g].push(p)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(p=>l.add(p.attrid))});const f=c=>c.filter(p=>!l.has(p.attrid)).map(p=>{var m;const g=(m=p.json)==null?void 0:m["combination-id"];if(g&&i[g]){const C={...p,json:{...p.json,combinations:i[g]}},{children:b}=C;return b&&Array.isArray(b==null?void 0:b[0])&&(b!=null&&b.length)&&(C.children=b==null?void 0:b.map(x=>f(x))),C}const{children:d}=p;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(p.children=d==null?void 0:d.map(C=>f(C))),p});return f(t)},aL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:p,commonRequest:g,guidParams:d,pcParam:m,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,_)=>{var N,z,M,I;let T="",E=[],A={},k={};const D=await g(i||"FWDXGLCreateGUID",d||{"source-number":t});(D==null?void 0:D.ReturnValue)===1&&((N=D==null?void 0:D.data)!=null&&N.GUID)?T=D.data.GUID:_("获取GUID失败");const R=await g(l||"FWDXGLSelPCParam",m||{"source-number":t});if((R==null?void 0:R.ReturnValue)===1){const Y=(z=R.data[e])==null?void 0:z[r],B=(M=R.data[e])==null?void 0:M["properties-type"],P={server:f||"",accepter:c||""};k=R.data;const U=await g(P[B]||p,{[C]:Y,"source-number":t,...b});if((U==null?void 0:U.ReturnValue)===1&&U.data){const H=((I=U.data)==null?void 0:I.attr_list)||[];E=W6(H),A={...U.data,attr_list:E},x({baseData:A,newGUID:T,attrListConfigs:E,selPCParam:k})}else _("请配置属性集")}else _("获取配置失败")}),iL=async(e,r,t)=>await t(e,r);function oL(e){return e.replace(/-([a-z])/g,function(r,t){return t.toUpperCase()})}const Q6=e=>{var l;function r(f){const c={};return f.forEach(p=>{var d,m,C,b,x,_,T;const g=`${p.attrid}_${p.attrtype}`;if(p.attrtype===1&&p.children.length>0&&!Array.isArray(p.children))c[g]={asid:((m=(d=p.children)==null?void 0:d[0])==null?void 0:m.asid)||"",data_list:[r(p.children)]};else if(p.attrtype===1&&p.children.length>0&&Array.isArray(p.children)){let{children:E=[],attrvalue:A}=p||{};A&&(A!=null&&A.length)&&Array.isArray(A)?E=A.map(k=>{var N,z,M,I;const D=(N=Object.values(k))==null?void 0:N.findIndex(Y=>Array.isArray(Y)),R=((z=Object.keys(k))==null?void 0:z[D])||"";if(R){const Y=((M=E==null?void 0:E[0])==null?void 0:M.find(P=>P.attrid===R))||{},{input:B}=(Y==null?void 0:Y.json)||{};if(["file","image","video","audio"].includes(B)){const P=((I=Object.values(k))==null?void 0:I[D])||[],U=P.filter(K=>K.FileId),H=P.filter(K=>{var ee;return K.status==="done"&&((ee=K.response)==null?void 0:ee.data)}).map(K=>K.response.data),V=[...U,...H];k[R]=V}}return J6((E==null?void 0:E[0])||[],k)}):(p.childAsid=((b=(C=E==null?void 0:E[0])==null?void 0:C[0])==null?void 0:b.asid)||"",E=[[]]),E!=null&&E.length&&Array.isArray(E==null?void 0:E[0])&&(c[g]={asid:((_=(x=E==null?void 0:E[0])==null?void 0:x[0])==null?void 0:_.asid)||p.childAsid||"",data_list:(E==null?void 0:E.length)&&((T=E==null?void 0:E[0])==null?void 0:T.length)&&E.map(k=>r(k))||[]})}else c[g]=p.attrvalue}),c}const t=((l=e[0])==null?void 0:l.asid)||"",i=[r(e)];return{data:{asid:t,data_list:i}}},Z6=async({attrList:e,params:r,extra:t={},commonRequest:i})=>{var p;const l=await i("YLFWLRDataDetails",r),f=((p=l==null?void 0:l.data)==null?void 0:p.list)||[];return f.length?await Promise.all(f.map(async g=>await Promise.all((e==null?void 0:e.map(async m=>{const C={...m,...t};if(C.attrvalue=(g==null?void 0:g[m.attrid])||"",m.attrtype===1&&Array.isArray(m.children)&&m.children.length>0){const b=(g==null?void 0:g[m.attrid])||{};C.children=await Z6({attrList:m.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(g=>({...g,...t,attrvalue:"",children:[]}))},Tc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},Ji=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},X6=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p=[]})=>{var C;let g=[];const d=async b=>{var _;let x=[];if(c.classify)try{const T=await r(b,{asctypeid:c.classify});(_=T==null?void 0:T.data)!=null&&_.list&&Array.isArray(T.data.list)&&(x=T.data.list.map(E=>({label:`${E.dicid||""}-${E.info||""}`,value:`${E.dicid||""}-${E.info||""}`})))}catch{me.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],T=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",E=c==null?void 0:c["field-names"];if(!_.length){me.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const k=A==null?void 0:A.data,D=(k==null?void 0:k.list)||[];let R=[];Array.isArray(k)&&(R=k),Array.isArray(D)&&(R=D),E?g=R:g=R.map(N=>({label:Tc(N,T,_),value:Tc(N,T,_)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:Ji(p,b),value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g},J6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zh,isBase64:q6,handleSubmitForm:rL,handleBaseAttrList:K6,handleAttrList:W6,handleFormConfig:aL,handleOperationFile:iL,handleKebabToCamel:oL,handleAttrListToObj:Q6,handleAttrListToObjDetail:Z6,handleUrlOptions:Tc,getTitle:Ji,handleSelectOptions:X6,handleObjDetailToSignleAttrList:J6},Symbol.toStringTag,{value:"Module"})),eD=async(e,r,t)=>{var i;try{const l=await r(t||"SERATTALLList",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.attr_list)||[]:[]}catch{}},sL=async(e,r,t)=>{var i;try{const l=await r(t||"YLFWLRDataDetails",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.list)||[]:[]}catch{}},uL=async(e,r,t)=>{var l;const i={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"};try{const f=await r(t||i,e);return(f==null?void 0:f.ReturnValue)===1?((l=f==null?void 0:f.data)==null?void 0:l.list)||[]:[]}catch{}},cL=async({params:e,commonRequestWidthParams:r,requestParams:t})=>{const i={PageName:"PCInstanceData",Controlname:"DataProcess"};try{return await r(t||i||{},e)}catch{}},fL=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),tD=(e,r,t)=>({style:{backgroundColor:r!==void 0&&r%2===1?(t==null?void 0:t[0])||"var(--bg-color-2)":(t==null?void 0:t[1])||"var(--bg-color-3)"}}),dL=Object.freeze(Object.defineProperty({__proto__:null,handleGetAttrList:eD,handleGetAttrDetail:sL,handleGetList:uL,handleCallSupportCode:cL,handleObjDetailToSignleAttrList:fL,handleSetTableRowColor:tD,handleFormatMobileDate:(e,r="YYYY-MM-DD")=>(Object.entries(il.cloneDeep(e)).forEach(([t,i])=>{Array.isArray(i)&&i.length>0&&i[0]instanceof Date&&(e[t]=i.map(l=>hn(l).format(r))),i instanceof Date&&(e[t]=hn(i).format(r))}),e)},Symbol.toStringTag,{value:"Module"})),hL=(e,r)=>{const t=new URL(e),i=new URL(r);return t.protocol===i.protocol&&t.host===i.host&&t.port===i.port},pL=e=>{const r=String(e).split("/");return r[r.length-1]},vL=e=>{var t;return(t=e.headers.get("content-disposition"))==null?void 0:t.split(";")[1].split("=")[1]},nD=(e,r)=>{const t=r||pL(e);if(hL(e,window.location.href)){V2(e,t);return}let i=r;fetch(e,{method:"get"}).then(l=>(i||(i=vL(l)),l.blob())).then(l=>{rD(l,i||t)}).catch(()=>{V2(e,"")})},mL=e=>{for(var r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=window.atob(r[1]),l=i.length,f=new Uint8Array(l);l--;)f[l]=i.charCodeAt(l);return new Blob([f],{type:t})},rD=(e,r)=>{let t="";e instanceof Blob?t=window.URL.createObjectURL(e):t=window.URL.createObjectURL(mL(e));const i=window.navigator;if(i.msSaveOrOpenBlob){i.msSaveOrOpenBlob(e,r);return}V2(t,r),window.URL.revokeObjectURL(t)},V2=(e,r)=>{let t=document.createElement("a");t.style.display="none",t.href=e,t.target="_blank",t.download=r,document.body.appendChild(t),t.click(),document.body.removeChild(t)},gL=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:nD,downloadBlob:rD},Symbol.toStringTag,{value:"Module"}));function $2(){const{message:e,modal:r}=me.App.useApp(),t={},i=async({selListData:C,handleSearch:b,handleReset:x,detail:_,styles:T,attributeSetId:E,commonRequest:A,commonRequestWidthParams:k,getTitle:D,searchText:R="搜索",resetText:N="重置",langConfig:z=[]})=>{var M;try{C!=null&&C.length&&_&&C.forEach(V=>{var ee;const K=((ee=V["default-render-data"])==null?void 0:ee.key)||"";K&&(V.attrvalue=(_==null?void 0:_[K])||"")});const I=C.filter(V=>{var K;return((K=V.renderdata)==null?void 0:K.input)!=="tab"&&!(V!=null&&V["default-render-data"])}),Y=I.filter(V=>{var K;return["select","checkbox","radio","mult-select","cascader"].includes((K=V.renderdata)==null?void 0:K.input)});let B=[];if(Y!=null&&Y.length)if((M=t[E])!=null&&M.length)B=t[E];else{const V=await eD({asid:E},A);B=K6(V)||[],t[E]=B||[]}const P=await Promise.all(I.map(async V=>{var ne;const K=V.renderdata||{},{input:ee,width:J}=K||{},q=(K==null?void 0:K["label-col"])||6,te=()=>{const oe=K["default-prompt"];if(D){if(typeof oe=="string"){const ae=D(E||"",oe),se=m(ae);return ee==="range-picker"&&oe&&se?JSON.parse(ae):ae}}else return oe||""};let Z="input";switch(ee){case"range-picker":Z="rangePicker";break;case"number":Z="inputNumber";break;case"select":case"checkbox":case"radio":case"textarea":Z=ee;break;case"mult-select":Z="select";break;case"time-picker":Z="timePicker";break;case"date-picker":Z="datePicker";break;case"cascader":Z="cascader";break;default:Z="input";break}const $={dataIndex:V.attrid,title:V.attrname||"",valueType:Z,valueProps:{placeholder:te()},colProps:{},formItemProps:{style:{marginBottom:10,width:typeof J=="string"?`${J}px`:J||240},labelCol:{span:q}}};if(["select","checkbox","radio","mult-select","cascader"].includes(ee)){const oe=V.attrid||"",ae=B.find(we=>we.attrid===oe);let se=(ae==null?void 0:ae.json)||{};!(se!=null&&se.inputType)&&(K!=null&&K["input-type"])&&(se={...se,inputType:K==null?void 0:K["input-type"],"action-url":K==null?void 0:K["action-url"],"field-names":K==null?void 0:K["field-names"],"key-field":{...K==null?void 0:K["key-field"]}});let ve=await X6({item:se||{},commonRequest:A,commonRequestWidthParams:k,langConfig:z||[]});if(!(ve!=null&&ve.length)){const{data:we=[]}=K||{};we!=null&&we.length&&(ve=we==null?void 0:we.map(ce=>({label:ce||"",value:ce||""}))),(ne=K==null?void 0:K.options)!=null&&ne.length&&(ve=(K==null?void 0:K.options)||[])}if(ee==="cascader"){const we=d(ve,K==null?void 0:K["field-names"]);$.valueProps.options=we||[]}else $.valueProps.options=ve||[]}return $}));let U={color:"#ffffff",borderRadius:4,fontSize:14,height:32},H={color:"#333333",borderRadius:4,fontSize:14,height:32,borderColor:"#D9D9D9"};return C!=null&&C.length&&P.push({dataIndex:"btns",valueType:"btns",valueProps:[{btnType:"submit",title:R,type:"primary",shape:"default",style:{...U,...T==null?void 0:T.searchStyle},onClick:V=>b(V,C)},{btnType:"reset",title:N,style:{...H,...T==null?void 0:T.resetStyle},onClick:()=>x(C)}],colProps:{flex:"none"},formItemProps:{style:{marginBottom:10,minWidth:127}}}),{formItems:P,selList:C}}catch{return{formItems:[],selList:[]}}},l=({universalHeader:C,extraBtn:b,operationColumnConfig:x,attributeSetId:_,getTitle:T,downloadText:E="下载",isDefaultWidth:A=!0,otherLangPageId:k,objDefaultLangPageId:D="5000000"})=>{if(!(C!=null&&C.length))return e.error("请配置 universalHeader表头数据");const R=f(C),N=R==null?void 0:R.map(z=>{const M={title:_?(T==null?void 0:T(_,z==null?void 0:z["header-attribute-id"]))||"":(z==null?void 0:z["header-name"])||"",dataIndex:(z==null?void 0:z["header-attribute-id"])||"",width:A?(z==null?void 0:z["header-width"])||180:void 0,render:(B,P)=>{var U,H;if(B&&B&&typeof B=="string"&&(B!=null&&B.includes("FileName"))&&(B!=null&&B.includes("FilePath"))){try{const V=JSON.parse(B);return V!=null&&V.length?Q(me.Flex,{vertical:!0,children:V==null?void 0:V.map(K=>{const{FileName:ee,FilePath:J}=K||{};return Be(me.Space,{children:[Q("span",{children:ee}),Q(me.Button,{type:"link",size:"small",onClick:()=>nD(J),children:E})]})})}):"-"}catch{}return Q(me.Space,{})}if(z!=null&&z["show-lang-data-id"]&&k){if(B&&B&&typeof B=="object"&&((U=Object.keys(B))!=null&&U.includes("delimiter"))){const{list:V,delimiter:K=","}=B||{},ee=V==null?void 0:V.map(J=>{const q=(J==null?void 0:J.split("|"))||[],te=(q==null?void 0:q.length)>1?q[0]:D,Z=(q==null?void 0:q.length)>1?q[1]:q[0];return T==null?void 0:T(te,Z)});return Q("span",{dangerouslySetInnerHTML:{__html:((H=ee==null?void 0:ee.join(K))==null?void 0:H.replace(/br/g,"<br>"))||"-"}})}return Q(me.Tooltip,{title:B,children:Q("span",{style:{cursor:"pointer"},children:T==null?void 0:T(k,B??"-")})})}return B??"-"}},I=z==null?void 0:z["header-mul-attribute-id"],Y=z==null?void 0:z["show-btn"];return I&&I.list&&Array.isArray(I.list)?M.render=(B,P)=>{const{list:U,delimiter:H=","}=I,V=U.map(ee=>ee?P[ee]??"":"").filter(ee=>ee!==""),K=(V==null?void 0:V.join(H))??"-";return Y&&b?Be(en,{children:[K??"-",b==null?void 0:b(P,K,z)]}):K||"-"}:Y&&b&&(M.render=(B,P)=>{const U=P[M.dataIndex]||"";return Be(en,{children:[U||"-",b(P,U,z)]})}),M});return x&&(N!=null&&N.length)&&N.push(x),N},f=C=>C.slice().sort((b,x)=>{const _=typeof b["header-number"]=="number"?b["header-number"]:1/0,T=typeof x["header-number"]=="number"?x["header-number"]:1/0;return _-T}),c=async({commonRequest:C,refresh:b,interfaceType:x="YLFWLRInstanceDelete",record:_,configData:T,title:E,okText:A,cancelText:k,getTitle:D,pageID:R,deleteItem:N,okType:z="primary",cancelType:M="default"})=>{var I,Y;try{let B=(T==null?void 0:T["must-attrid"])||[];const P=(N==null?void 0:N["source-number"])||(N==null?void 0:N.sourceNumber)||"";if(!(B!=null&&B.length)&&P){const V=await C("YLKHDSelPCParam",{"source-number":Number(P)});V&&V.ReturnValue===1&&V.data&&(B=((Y=(I=V.data)==null?void 0:I[P])==null?void 0:Y["must-attrid"])||[])}if(!(B!=null&&B.length)){e.error("请先配置must-attrid");return}const U={};for(const[V,K]of Object.entries(_))B.includes(V)&&(U[V]=K);const H={instanceid:_==null?void 0:_.instanceid,asid:_==null?void 0:_.asid,...U};r.confirm({title:E||(N==null?void 0:N.title)||"",icon:null,okButtonProps:{type:z},cancelButtonProps:{type:M},okText:A||"",cancelText:k||"",onOk:()=>new Promise(async(V,K)=>{const ee=await C(x,H),J=D&&D(R||"",ee==null?void 0:ee["msg-code"],ee==null?void 0:ee.msg)||"删除失败";(ee==null?void 0:ee.ReturnValue)===1?(e.success(J),b(),V(ee)):(e.error(J||"删除失败"),K(ee))})})}catch{}},p=({values:C,currentSelList:b,currentActive:x,onSearch:_,tabItems:T})=>{const A={"sel-list":b.map(k=>{var M,I;const{input:D,inputType:R}=(k==null?void 0:k.renderdata)||{};if(D==="tab"&&(R!=null&&R.startsWith("local-"))&&(T!=null&&T.length)&&(x||x===0)){const Y=b.find(V=>D==="tab"&&(R==null?void 0:R.startsWith("local-"))),B=T[x],P=((M=Y==null?void 0:Y.renderdata["key-field"])==null?void 0:M.list)||[],U=((I=Y==null?void 0:Y.renderdata["key-field"])==null?void 0:I.delimiter)||"-",H=P==null?void 0:P.map(V=>B[V]||"").join(U);return{...k,attrvalue:H}}const N=C[k.attrid];let z;return N!=null&&(D==="cascader"&&Array.isArray(N)?z=N.join("|"):Array.isArray(N)&&["range-picker"].includes(D)?z=N.map(Y=>{var B;return((B=Y==null?void 0:Y.format)==null?void 0:B.call(Y,"YYYY-MM-DD"))||Y}).join("~"):Array.isArray(N)?z=N:z=String(N)),{...k,attrvalue:z}}),...C};_(A)},g=({currentSelList:C,tabItems:b,currentActive:x,onSearch:_,setSelList:T})=>{const E=C.map(A=>{var k,D,R,N,z;if(((k=A.renderdata)==null?void 0:k.input)==="tab"&&(b!=null&&b.length)&&(x||x===0)){if((R=(D=A.renderdata)==null?void 0:D.inputType)!=null&&R.startsWith("local-")){const M=C.find(U=>{var H,V,K;return((H=U.renderdata)==null?void 0:H.input)==="tab"&&((K=(V=U.renderdata)==null?void 0:V.inputType)==null?void 0:K.startsWith("local-"))}),I=b[x],Y=((N=M==null?void 0:M.renderdata["key-field"])==null?void 0:N.list)||[],B=((z=M==null?void 0:M.renderdata["key-field"])==null?void 0:z.delimiter)||"-",P=Y==null?void 0:Y.map(U=>(I==null?void 0:I[U])||"").join(B);return{...A,attrvalue:P}}return A}return{...A,attrvalue:""}});T(E),_({"sel-list":E})},d=(C,b)=>{const{label:x,value:_,children:T}=b,E=A=>A.map(k=>{const D={label:k[x],value:k[_],children:[]};return Array.isArray(k[T])&&k[T].length>0&&(D.children=E(k[T])),D});return E(C)},m=C=>{if(typeof C!="string")return!1;try{const b=JSON.parse(C);return Array.isArray(b)}catch{return!1}};return{handleUniversalHeaderToColumns:l,handleSelListToFormItems:i,handleUniversalDelete:c,handleUniversalSearch:p,handleUniversalReset:g,isArrayString:m}}function yL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:p,form:g,langId:d,getTitle:m}=e,C=me.Form.useWatch(p,g),{message:b}=me.App.useApp(),x=r.input,[_,T]=W.useState(e.value),[E,A]=W.useState(!1),[k,D]=W.useState([]),[R,N]=W.useState([]),[z,M]=W.useState(!1),[I,Y]=W.useState({PageNum:1,PageSize:6}),[B,P]=W.useState([]),[U,H]=W.useState(0),[V,K]=W.useState(ne()),{handleUniversalHeaderToColumns:ee}=$2();W.useEffect(()=>{E&&q()},[E,I]);const J=(ae,se)=>{D(ae),N(se)},q=async()=>{var ae,se,ve,we,ce;if(r.inputType==="url"&&(r!=null&&r["action-url"])){M(!0);try{const ye=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...I,...(r==null?void 0:r["action-url-extra-params"])||{}});if((ye==null?void 0:ye.ReturnValue)===0){b.error(ye.msg),M(!1);return}const De=ye==null?void 0:ye.data,Pe=(ae=De==null?void 0:De.list)==null?void 0:ae.map((ze,Ne)=>{const dt=(I.PageNum-1)*I.PageSize+Ne;return{...ze,_rowKey:dt}}),Te=(Pe==null?void 0:Pe.filter(ze=>k.includes(ze._rowKey)))||[];N(Te),P([...Pe||[]]),H((De==null?void 0:De.number)||0),M(!1)}catch{M(!1)}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const ye={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...I};try{const Pe=await l(ye,De);if((Pe==null?void 0:Pe.ReturnValue)===1){const ze=(ve=((se=Pe==null?void 0:Pe.data)==null?void 0:se.list)||[])==null?void 0:ve.map((Ne,dt)=>{const Xe=(I.PageNum-1)*I.PageSize+dt;return{...Ne,_rowKey:Xe}});H(((we=Pe==null?void 0:Pe.data)==null?void 0:we.number)||0),P([...ze])}const Te=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Te==null?void 0:Te.ReturnValue)===1){const ze=(ce=Te==null?void 0:Te.data)==null?void 0:ce[r==null?void 0:r["instance-source-number"]],Ne=(ze==null?void 0:ze["universal-header"])||[],dt=(ze==null?void 0:ze["attribute-set-id"])||"",Xe=ee({universalHeader:Ne,attributeSetId:dt,getTitle:m,otherLangPageId:"5000000"})||[];K([...Xe])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error")},te=()=>{var ae;if(!t){if(_){const se=r==null?void 0:r["key-field"],ve=se==null?void 0:se[p],{delimiter:we="-",list:ce=[]}=ve||{};if(!se){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const ye=(ae=_==null?void 0:_.split(we))==null?void 0:ae[0],De=B==null?void 0:B.findIndex(ze=>Object.values(ze).includes(ye));D([De]);break;case"modal-mult-select":const Pe=_==null?void 0:_.split(","),Te=Pe==null?void 0:Pe.map(ze=>{var dt;const Ne=(dt=ze.split(we))==null?void 0:dt[0];return B==null?void 0:B.findIndex(Xe=>Ne.includes((Xe==null?void 0:Xe.typeid)||(Xe==null?void 0:Xe.instanceid)))});D(Te);break}}A(!0)}},Z=async()=>{try{const ae=await xL(R,r,d);T((ae==null?void 0:ae[p])||""),e.onSure(ae),A(!1)}catch(ae){b.error(ae.msg||"参数错误")}},$=()=>{Y({...I,PageNum:1}),A(!1)};function ne(){const ae=r["modal-field-list"];if(!ae)return[];let se=[];for(let ve in ae){let we=ae[ve];const ce={dataIndex:ve,title:we};se=[...se,ce]}return se}const oe=ae=>{Y({...I,PageNum:ae})};return Be(en,{children:[Q(me.Select,{placeholder:Wh({json:r},d),onClick:te,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:E,onOk:Z,onCancel:$,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:V,loading:z,dataSource:B,rowKey:ae=>ae._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:k,onChange:J},pagination:{total:U,current:I.PageNum,pageSize:I.PageSize,onChange:oe}})})||Q(me.Modal,{title:r["modal-caption"],open:E,onOk:Z,onCancel:$,width:r["modal-width"]??600,okButtonProps:{disabled:k.length===0},children:Q(me.Table,{columns:V,loading:z,dataSource:B,rowKey:ae=>ae._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:k,onChange:J},pagination:{total:U,current:I.PageNum,pageSize:I.PageSize,onChange:oe}})})]})}function xL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}let c={};e.forEach(p=>{for(let[g,d]of Object.entries(f)){const m=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=m.map(x=>p==null?void 0:p[x]);c[g]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var aD={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},p=l.prototype;p.isoWeekYear=function(){return c(this).year()},p.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var m,C,b,x,_=c(this),T=(m=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(m).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return _.diff(T,"week")+1},p.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var g=p.startOf;p.startOf=function(d,m){var C=this.$utils(),b=!!C.u(m)||m;return C.p(d)==="isoweek"?b?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):g.bind(this)(d,m)}}})})(aD);const iD=aD.exports;function bL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=me.App.useApp(),g=r.input,[d,m]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[T,E]=W.useState([]),[A,k]=W.useState(!1),[D,R]=W.useState({PageNum:1,PageSize:6}),[N,z]=W.useState([]),[M,I]=W.useState(0),Y=K();W.useEffect(()=>{C&&P()},[C,D]);const B=(J,q)=>{_(J),E(q)},P=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){k(!0);try{const q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((q==null?void 0:q.ReturnValue)===0){p.error(q.msg),k(!1);return}const te=q==null?void 0:q.data,Z=(J=te==null?void 0:te.list)==null?void 0:J.map((ne,oe)=>{const ae=(D.PageNum-1)*D.PageSize+oe;return{...ne,_rowKey:ae}}),$=(Z==null?void 0:Z.filter(ne=>x.includes(ne._rowKey)))||[];E($),z([...Z||[]]),I((te==null?void 0:te.number)||0),k(!1)}catch(q){k(!1),p.error(q.msg||"参数错误")}return}p.error("请配置action-url")},U=()=>{var J,q;if(!t){if(d){const te=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],Z=((q=r==null?void 0:r["key-field"])==null?void 0:q.delimiter)??"-";if(!te.length){p.error("请配置key-field");return}switch(g){case"modal-select":const $=d==null?void 0:d.split("-"),ne=N==null?void 0:N.findIndex(se=>$.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)));_([ne]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),ae=oe==null?void 0:oe.map(se=>{var we;const ve=(we=se.split(Z))==null?void 0:we[0];return N==null?void 0:N.findIndex(ce=>ve.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});_(ae);break}}b(!0)}},H=async()=>{try{const J=await CL(T,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(J.msg||"参数错误")}},V=()=>{R({...D,PageNum:1}),b(!1)};function K(){const J=r["modal-field-list"];let q=[];for(let te in J){let Z=J[te];const $={dataIndex:te,title:Z};q=[...q,$]}return q}const ee=J=>{R({...D,PageNum:J})};return Be(en,{children:[Q(me.Select,{placeholder:Wh({json:r},c),onClick:U,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})||Q(me.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})]})}function CL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const wL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x}=e,[_,T]=W.useState([]),[E,A]=W.useState(d||[]);W.useEffect(()=>{k()},[r.inputType,r.classify,r.data,r.options]);const k=async()=>{const D=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});T(D)};return Q(me.Checkbox.Group,{...l,options:_,value:E,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:D=>{A(D),t==null||t(D)},disabled:i})},_L=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C="10001"})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1),{message:E}=me.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await k(g);else if(e.inputType==="system-dictionary")k(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await R();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},k=async M=>{var I;if(e.classify){T(!0);try{const Y=await c(M,{asctypeid:e.classify});if((I=Y==null?void 0:Y.data)!=null&&I.list&&Array.isArray(Y.data.list)){const B=Y.data.list.map(P=>({label:`${P.dicid||""}-${P.info||""}`,value:`${P.dicid||""}-${P.info||""}`}));x(B)}}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{T(!1)}}},D=(M,I)=>{i&&i(M)},R=async M=>new Promise(async(I,Y)=>{var V,K,ee;const B=((V=e==null?void 0:e["key-field"])==null?void 0:V.list)||[],P=(e==null?void 0:e["search-field"])||[],U=((K=e==null?void 0:e["key-field"])==null?void 0:K.delimiter)||"-";if(!B.length){E.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};M&&(P.forEach(J=>{H[J]=M[J]||""}),H.level=Number(M.level||0)+1||""),T(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((ee=J==null?void 0:J.data)!=null&&ee.list&&Array.isArray(J.data.list)){const q=J.data.list.map(te=>({...te,label:`${te[B[0]]||""}${U}${te[B[1]]||""}`,value:`${te[B[0]]||""}${U}${te[B[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));I(q)}Y([])}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options"),Y([])}finally{Y([]),T(!1)}}),N=async M=>{const I=M[M.length-1],Y=await R(I)||[];return I.children=Y,x([...b]),Y},z=(M,I)=>I.some(Y=>Y.label.toLowerCase().includes(M.toLowerCase()));return Q(me.Cascader,{showSearch:{filter:z},loading:_,placeholder:"请选择",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async M=>{var I;if(M&&(t!=null&&t.length)){const Y=((I=e==null?void 0:e["key-field"])==null?void 0:I.list)||[],B=(e==null?void 0:e["search-field"])||[];if(!Y.length||!B.length){E.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const P=Y.findIndex(V=>V===B[0]);if(P===-1){E.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const U=t.map(V=>V.split("-")[P]||"").filter(Boolean);let H=b;for(const[V,K]of U.entries()){if(V===U.length-1)break;const ee=H.filter(te=>te[B[0]]===K);if(ee.length===0)break;const J=ee[0];if(J.children&&J.children.length>0){H=J.children;continue}H=await N(ee)}}}})},SL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[p,g]=W.useState([]),[d,m]=W.useState(!1);W.useEffect(()=>{(async()=>{var D;if(e.inputType==="url"&&e["action-url"]){m(!0);try{const R=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(D=R==null?void 0:R.data)!=null&&D.list&&Array.isArray(R.data.list)?g(R.data.list):R!=null&&R.data&&Array.isArray(R.data)?g(R.data):Array.isArray(R==null?void 0:R.list)?g(R.list):(R==null?void 0:R.ReturnValue)===1&&(R!=null&&R.data)&&(Array.isArray(R.data)?g(R.data):g([R.data]))}catch{}finally{m(!1)}}else e.data&&Array.isArray(e.data)&&g(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=k=>JSON.stringify(k),b=k=>{const D=C(k);return t===D},x=k=>{if(r)return;const D=C(k);i&&i(D)},_=e["card-image-width"]||200,T=e["card-image-height"]||100,E=e["card-image-field"],A=e["card-info-field"];return Q("div",{style:{...l},children:d?Q("div",{style:{textAlign:"center",padding:"20px"},children:"loading..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"50px"},children:p.map((k,D)=>{const R=b(k);return Be("div",{onClick:()=>x(k),style:{flex:"1 1 auto",width:`${_}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[k[E]&&Q("img",{src:k.picurl,alt:k[A]||"",style:{width:`${_}px`,height:`${T}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:N=>{N.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Be(me.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:R?"none":"1px solid #d9d9d9",backgroundColor:R?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:R&&Q(d8,{style:{fontSize:"12px",color:"#fff"}})}),k[A]||""]})})]},D)})})})},EL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1);W.useEffect(()=>{E()},[e.inputType,e.classify,e.data,e.options]);const E=async()=>{T(!0);const A=await Qh({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,item:e});x(A),T(!1)};return Q(me.Select,{placeholder:Wh({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:_,showSearch:!0,value:f,filterOption:(A,k)=>{var D;return((D=k==null?void 0:k.label)==null?void 0:D.toLowerCase().indexOf(A.toLowerCase()))>=0},options:b,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},DL={customUpload:"myUpload-module_customUpload_7c7d3"},TL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),kL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:p=r==="10001"?"上传文件":"Upload File",onRemove:g,list:d=[],uploadType:m,relatedidKey:C}=e,{message:b}=me.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",_=i==null?void 0:i.input,T=i==null?void 0:i["upload-size"],E=(i==null?void 0:i["upload-max-count"])||1,[A,k]=W.useState(_==="image"?"picture-card":"text"),[D,R]=W.useState([]),[N,z]=W.useState(!1),[M,I]=W.useState("");W.useEffect(()=>{d&&d.length&&R(d)},[d]);const Y=async H=>{m==="image"&&(!H.url&&!H.preview&&(H.preview=await TL(H.originFileObj)),I(H.url||H.preview),z(!0))},B=({fileList:H})=>{R(H),l&&l(H)},P=H=>{if(!T)return!0;const V=H.size/1024/1024<Number(T);return V||b.error(r==="10001"?`请上传不超过${T}MB的文件`:`Please upload files smaller than ${T}MB`),V},U=_==="image"?Be("button",{style:{border:0,background:"none"},type:"button",children:[Q(Nb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(en,{children:Q(me.Button,{style:{fontSize:14},icon:Q(Mb,{}),children:p})});return Be(en,{children:[Q(me.Upload,{action:t,beforeUpload:P,listType:A,accept:x,fileList:D,onPreview:Y,data:{[C]:c},maxCount:E,onChange:B,onRemove:g,disabled:f,className:DL.customUpload,children:D.length>=E?null:U}),M&&Q(me.Image,{wrapperStyle:{display:"none"},preview:{visible:N,onVisibleChange:H=>z(H),afterOpenChange:H=>!H&&I("")},src:M})]})},AL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,value:g,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b}=e,[x,_]=W.useState([]);W.useEffect(()=>{T()},[r.inputType,r.classify,r.data,r.options]);const T=async()=>{const E=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,item:r});_(E)};return Q(me.Radio.Group,{...l,options:x,onChange:t,disabled:i,value:g,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};hn.extend(iD);function OL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:p,relatedidKey:g,actionUrlKey:d,actionUrlExtraParams:m,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:_,getTitle:T}=e,E=W.useRef([]),{message:A}=me.App.useApp();W.useEffect(()=>{l&&(E.current=l)},[l]);const k=W.useCallback(U=>Array.isArray(U)?U:(U==null?void 0:U.fileList)??[],[]),D=U=>{f(U)},R=W.useCallback(U=>{var ee,J;const H=(ee=U.json)==null?void 0:ee.input,V=(J=U.json)==null?void 0:J.format,K={};switch(H){case"image":case"file":case"video":case"audio":K.getValueFromEvent=k;break;case"date-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM-DD"),K.getValueProps=q=>({value:q?hn(q):null});break;case"time-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM-DD HH:mm:ss"),K.getValueProps=q=>({value:q?hn(q):null});break;case"week-picker":K.getValueFromEvent=q=>`${q==null?void 0:q.year()}-${hn(q).isoWeek()}周`,K.getValueProps=q=>{if(!q)return{value:null};const[te,Z]=q.split("-"),$=Number(te),ne=Number(Z.replace("周",""));return{value:hn().year($).isoWeek(ne)}};break;case"month-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM"),K.getValueProps=q=>({value:q?hn(q):null});break;case"quarter-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY年第Q季度"),K.getValueProps=q=>({value:q?hn(q,V||"YYYY年第Q季度"):null});break;case"year-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY"),K.getValueProps=q=>({value:q?hn(q):null});break;case"second-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"HH:mm:ss"),K.getValueProps=q=>({value:q?hn(q,V||"HH:mm:ss"):null});break;case"range-picker":K.getValueFromEvent=q=>q==null?void 0:q.map(te=>te==null?void 0:te.format(V||"YYYY-MM-DD")),K.getValueProps=q=>!(q!=null&&q.length)&&!Array.isArray(q)?{value:null}:{value:(q==null?void 0:q.map(te=>hn(te)))||null};break;case"multiple-date-picker":K.getValueFromEvent=q=>q==null?void 0:q.map(te=>te==null?void 0:te.format(V||"YYYY-MM-DD")),K.getValueProps=q=>({value:(q==null?void 0:q.map(te=>hn(te)))||null});break}return K},[k]),N=W.useCallback(({isActive:U})=>U?Q(b8,{style:{fontSize:18,color:"#999"}}):Q(_8,{style:{fontSize:18,color:"#999"}}),[]),z=(U,H)=>{var V,K,ee,J,q;return Be(me.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:U.attrname}),((V=U==null?void 0:U.json)==null?void 0:V.instruction)&&H==="icon"&&Q(me.Tooltip,{title:(K=U==null?void 0:U.json)==null?void 0:K.instruction,children:Q(y8,{style:{color:((ee=U==null?void 0:U.json)==null?void 0:ee["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((J=U==null?void 0:U.json)==null?void 0:J["instruction-color"])??"red"},children:(q=U==null?void 0:U.json)==null?void 0:q.instruction})]})},M=W.useCallback(({itemWithJson:U,colNum:H=1,readonly:V=!1,instructionShowMode:K="icon",radioAlign:ee="horizontal",formItemStyle:J,relatedid:q,form:te,defaultWidth:Z=358,parentFormListField:$,isShowLabel:ne=!0})=>{const oe=Dc(U);let ae=U.children||[];Array.isArray(ae==null?void 0:ae[0])&&ae.length&&(ae=ae[0]);const se=ve=>{const we=($==null?void 0:$.parentName)||($==null?void 0:$.name);return we?Array.isArray(we)?[...we,U.attrid,ve.name]:[we,U.attrid,ve.name]:[U.attrid,ve.name]};return Q(me.Col,{span:24/H,children:Q(me.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:ve})=>N({isActive:ve}),items:[{key:U.attrid,label:U.attrname,styles:{header:{paddingLeft:0}},children:Q(me.Form.List,{name:$?Array.isArray($.name)?[...$.name,U.attrid]:[$.name,U.attrid]:U.attrid,initialValue:oe,children:(ve,{add:we,remove:ce})=>Be("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[ve.map(ye=>{const De={...ye,parentName:se(ye)};return Q(me.Card,{style:{width:Z+100},size:"small",title:`${U.attrname} ${ye.name+1}`,extra:!b&&Q(v8,{onClick:()=>{ve.length>1?ce(ye.name):A.warning("至少需要保留一个!")}}),children:(ae||[]).map((Pe,Te)=>Q(W.Fragment,{children:P({item:Pe,readonly:V,colNum:H,instructionShowMode:K,relatedid:q,form:te,defaultWidth:Z,formItemStyle:J,radioAlign:ee,isFormListItem:!0,formListField:De,isShowLabel:!0})},Pe.attrid||`child-${Te}`))},ye.key)}),!b&&Q(me.Flex,{style:{width:200},children:Be(me.Button,{type:"dashed",onClick:()=>we(),block:!0,children:["+ ",_==="10001"?"新增":"Add"]})})]})})}]},U.attrid)})},[N,Dc]),I=W.useCallback(({itemWithJson:U,colNum:H=1,readonly:V=!1,instructionShowMode:K="icon",radioAlign:ee="horizontal",formItemStyle:J,relatedid:q,form:te,defaultWidth:Z=358,isFormListItem:$=!1,formListField:ne,isShowLabel:oe=!0})=>{var ae,se,ve,we,ce,ye,De;if(((ae=U.json)==null?void 0:ae.hide)===!0)return Q(en,{});if(U.attrtype===1)return M({itemWithJson:U,colNum:H,readonly:V,instructionShowMode:K,radioAlign:ee,formItemStyle:J,relatedid:q,form:te,defaultWidth:Z,parentFormListField:ne,isShowLabel:oe});if(U.attrtype===2)return Q(en,{children:"实例信息"});if(U.attrtype===0){const Pe=Dc(U),Te=(se=U.json)==null?void 0:se["default-prompt"],ze=Wh(U,_),{combinations:Ne=[]}=U.json||{};if(Ne!=null&&Ne.length)return Q(me.Col,{span:24/H,children:Q(me.Form.Item,{label:(ve=U==null?void 0:U.json)==null?void 0:ve["combination-name"],required:(we=U.json)==null?void 0:we.must,children:Q(me.Space.Compact,{children:Ne.map((Xe,Zt)=>{var In,Mn,kn,Gt;let sn=Dc(Xe),Tn=Z;const jn={},un=Xe.json.input||"text",It=J==null?void 0:J.find(Kn=>Kn.type===un);if(It){const{width:Kn}=(It==null?void 0:It.style)||{};Kn&&(jn.width=Kn)}const on=(In=Xe==null?void 0:Xe.json)==null?void 0:In["combination-width-ratio"];return on&&(Tn=Z*on),Q(me.Form.Item,{name:ne?Array.isArray(ne.name)?[...ne.name,Xe.attrid]:[ne.name,Xe.attrid]:Xe.attrid,noStyle:!0,initialValue:sn,rules:[...(Mn=Xe.json)!=null&&Mn.must?[{required:!0,message:Te||`${ze}${Xe.attrname}`}]:[],...(kn=U.json)!=null&&kn.regexp?[{pattern:new RegExp(U.json.regexp.replace(/^\/|\/$/g,"")),message:((Gt=U.json)==null?void 0:Gt["regexp-message"])||`${U.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...R(Xe),children:B({item:Xe,readonly:V,formItemStyle:J,radioAlign:ee,relatedid:q,form:te,defaultWidth:Tn,customWidth:jn})},Zt)})})},`${U.attrid}+1`)});const dt=$&&ne?Array.isArray(ne.name)?[...ne.name,U.attrid]:[ne.name,U.attrid]:U.attrid;return Q(me.Col,{span:24/H,children:Q(me.Form.Item,{name:dt,label:oe&&z(U,K)||null,initialValue:Pe,rules:[...(ce=U.json)!=null&&ce.must?[{required:!0,message:`${ze}${U.attrname}`}]:[],...(ye=U.json)!=null&&ye.regexp?[{pattern:new RegExp(U.json.regexp.replace(/^\/|\/$/g,"")),message:((De=U.json)==null?void 0:De["regexp-message"])||`${U.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...R(U),children:B({item:U,readonly:V,formItemStyle:J,radioAlign:ee,relatedid:q,form:te,defaultWidth:Z})},U.attrid)})}return null},[z,Dc,R,M]),Y=async U=>{var H;try{const V=(H=U==null?void 0:U.response)==null?void 0:H.data;if(V){if(!r)return;const K=await r({Controlname:"DelFile",PageName:"initializationfile"},V);if((K==null?void 0:K.ReturnValue)!==1)return A.error(K==null?void 0:K.msg),!1}else D(U);return!0}catch{return!1}},B=({item:U,readonly:H=!1,formItemStyle:V=[],radioAlign:K="horizontal",relatedid:ee,form:J,defaultWidth:q=358,customWidth:te={}})=>{var Pe,Te,ze,Ne,dt,Xe,Zt,sn,Tn,jn,un,It,on,In,Mn,kn,Gt,Kn,Ta,Lr,qe,at;const Z=U.json.input||"text",$=((Pe=U.json)==null?void 0:Pe.format)||"",ne=U.attrid,oe=Dc(U),ae=((Te=U.json)==null?void 0:Te["default-prompt"])||"",se=((ze=U.json)==null?void 0:ze["disable-date-goover"])||!1,ve=Wh(U,_),we=U.json.length&&{maxLength:U.json.length}||{},ce=V.find(ct=>ct.type===Z);let ye=(Ne=U.json)==null?void 0:Ne["input-width"];ye&&(ye=x==="table"?Number(ye)-32:ye);const De=ye||q;switch(Z){case"label":return Q(me.Input,{disabled:!0,value:((dt=U.json)==null?void 0:dt["label-value"])||U.attrvalue||((Xe=U.json)==null?void 0:Xe.default)||"-",style:{width:De,...ce==null?void 0:ce.style,...te}});case"text":return Q(me.Input,{placeholder:ae||ve,...we,disabled:H||((Zt=U.json)==null?void 0:Zt.readonly),allowClear:!0,style:{width:De,...ce==null?void 0:ce.style,...te}});case"password":return Q(me.Input.Password,{placeholder:ae||ve,...we,disabled:H||((sn=U.json)==null?void 0:sn.readonly),allowClear:!0,style:{width:De,...ce==null?void 0:ce.style,...te}});case"textarea":return Q(me.Input.TextArea,{allowClear:!0,placeholder:ae||ve,rows:5,...we,disabled:H||((Tn=U.json)==null?void 0:Tn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"number":return Q(me.InputNumber,{controls:!1,placeholder:ae||ve,...we,disabled:H||((jn=U.json)==null?void 0:jn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"select":case"mult-select":return Q(EL,{item:U.json,readonly:H||((un=U.json)==null?void 0:un.readonly),style:{width:De,...ce==null?void 0:ce.style,...te},commonRequestWidthParams:r,commonRequest:i,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:_,onChange:ct=>{J.setFieldValue(U.attrid,ct)}});case"modal-mult-select":case"modal-select":return Q(bL,{style:{width:De,...ce==null?void 0:ce.style,...te},item:U.json,value:U.attrvalue||U.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ct=>{J.setFieldValue(U.attrid,ct)},disabled:H||((It=U.json)==null?void 0:It.readonly),langId:_,CustomModalComponent:C});case"mul-field-modal-select":return Q(yL,{style:{width:De,...ce==null?void 0:ce.style,...te},item:U.json,form:J,attrid:ne,getTitle:T,value:U.attrvalue||U.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ct=>{J.setFieldsValue(ct)},disabled:H||((on=U.json)==null?void 0:on.readonly),CustomModalComponent:C,langId:_});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const ct={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let Ht;return Z==="date-picker"&&(Ht=se?$6:void 0),Q(me.DatePicker,{showTime:Z==="time-picker",format:$||void 0,picker:ct[Z]||"date",disabled:H||((In=U.json)==null?void 0:In.readonly),disabledDate:Ht,placement:"bottomLeft",style:{width:De,...ce==null?void 0:ce.style,...te}})}case"range-picker":return Q(me.DatePicker.RangePicker,{disabledDate:se?$6:void 0,disabled:H||((Mn=U.json)==null?void 0:Mn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"multiple-date-picker":return Q(me.DatePicker,{multiple:!0,maxTagCount:((kn=U==null?void 0:U.json)==null?void 0:kn["max-tag-count"])||2,disabled:H||((Gt=U.json)==null?void 0:Gt.readonly)||!1,style:{width:De,...ce==null?void 0:ce.style,...te}});case"radio":return Q(AL,{radioAlign:K,commonRequest:i,commonRequestWidthParams:r,item:U.json,readonly:H||((Kn=U.json)==null?void 0:Kn.readonly),options:we,handleUrlOptions:Tc,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:ct=>{J.setFieldValue(U.attrid,ct.target.value)}});case"checkbox":return Q(wL,{radioAlign:K,commonRequest:i,commonRequestWidthParams:r,item:U.json,readonly:H||((Ta=U.json)==null?void 0:Ta.readonly),options:we,value:oe,handleUrlOptions:Tc,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:ct=>{J.setFieldValue(U.attrid,ct.join(","))}});case"audio":case"file":case"image":case"video":return Q(kL,{action:t&&t("initializationfile"),item:U.json,uploadType:Z,langId:_,list:oe,readonly:H||((Lr=U.json)==null?void 0:Lr.readonly),relatedid:ee,relatedidKey:g,onRemove:ct=>Y(ct)});case"cascader":return Q(_L,{commonRequestWidthParams:r,commonRequest:i,item:U.json,value:U.attrvalue,style:{width:De,...ce==null?void 0:ce.style,...te},interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:_});case"radio-card":return Q(SL,{item:U.json,readonly:H||((qe=U.json)==null?void 0:qe.readonly),onChange:ct=>{J.setFieldValue(U.attrid,ct)},langId:_,commonRequestWidthParams:r});default:return Q(me.Input,{placeholder:ae||ve,...we,showCount:!0,disabled:H||((at=U.json)==null?void 0:at.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}})}},P=({item:U,readonly:H=!1,colNum:V=1,instructionShowMode:K="icon",relatedid:ee,form:J,defaultWidth:q=358,formItemStyle:te,radioAlign:Z="horizontal",isFormListItem:$=!1,formListField:ne,isShowLabel:oe=!0})=>{var ve;const ae=U.info_base64===1?uu(Zh(U.info)):uu(U.info),se={...U,json:{...U==null?void 0:U.json,...ae}};return((ve=se.json)==null?void 0:ve.hide)===!0?null:Q(W.Fragment,{children:I({itemWithJson:se,readonly:H,colNum:V,instructionShowMode:K,relatedid:ee,form:J,defaultWidth:q,formItemStyle:te,radioAlign:Z,isFormListItem:$,formListField:ne,isShowLabel:oe})},se.attrid)};return{handleRenderItem:P,handleSetFormItemInitialValue:Dc}}const RL=W.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:p=[0,0],instructionShowMode:g="flex",defaultWidth:d=358,commonRequestWidthParams:m,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:_="horizontal",interfaceTypeChildren:T="YLLRDetailAttrlist",interfaceTypeDict:E="YLZDDictList",interfaceTypeSysDict:A="YLZDSysConfigList",relatedidKey:k="relatedid",actionUrlKey:D="action-url",actionUrlExtraParams:R={},CustomModalComponent:N,formShowType:z="form",formListItemWidth:M,formListItemName:I,isEdit:Y=!1,langId:B="10001",getTitle:P}=e,U=W.useRef([]),H=K=>{U.current.push(K)},{handleRenderItem:V}=OL({commonRequestWidthParams:m,uploadAction:C,commonRequest:b,updateDelFileList:H,formConfig:t,interfaceTypeChildren:T,interfaceTypeDict:E,interfaceTypeSysDict:A,relatedidKey:k,actionUrlKey:D,actionUrlExtraParams:R,CustomModalComponent:N,isEdit:Y,formShowType:z,langId:B,getTitle:P});return W.useImperativeHandle(r,()=>({getDelFileList:()=>U.current})),Q(en,{children:z==="table"?Q(me.Form.List,{name:I||"customFormList",initialValue:[{}],children:(K,{add:ee,remove:J})=>Q(me.Flex,{className:"custom-form-body",children:Be("div",{className:"custom-form-list",children:[Be(me.Flex,{align:"center",style:{position:"relative",backgroundColor:"#004d32"},children:[Q(me.Flex,{className:"custom-form-list-header",align:"center",children:t==null?void 0:t.map((q,te)=>{var $,ne;const Z=(($=q==null?void 0:q.json)==null?void 0:$["input-width"])&&Number((ne=q==null?void 0:q.json)==null?void 0:ne["input-width"])||d;return Be(me.Flex,{style:{width:Z,flexShrink:0},align:"center",children:[te!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:q.attrname})]},te)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>ee(),children:B==="10001"?"新增":"Add"})]}),K.map(q=>Be(me.Flex,{align:"center",className:"custom-form-list-item-container",children:[Q(me.Flex,{className:"custom-form-list-item",align:"center",children:t==null?void 0:t.map((te,Z)=>{var ne,oe;const $=((ne=te==null?void 0:te.json)==null?void 0:ne["input-width"])&&Number((oe=te==null?void 0:te.json)==null?void 0:oe["input-width"])||d;return Q(me.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:$,flexShrink:0},children:V({item:te,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:(M==null?void 0:M[Z])||d,formItemStyle:x,isFormListItem:!0,formListField:q,isShowLabel:!1})},te.attrid||`child-${Z}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>J(q.key),children:B==="10001"?"删除":"Delete"})]},q.key))]})})}):Q(me.Row,{gutter:p,children:t.map((K,ee)=>Q(W.Fragment,{children:V({item:K,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:_})},K.attrid||`form-item-${ee}`))})})}),oD=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},kc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default)||"";if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t.map(p=>new Date(p))}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>new Date(p))}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=FL(e.children||[])),t||void 0},lD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},FL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},NL=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var m;let p=[];const g=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(T=>({label:`${T.dicid||""}-${T.info||""}`,value:`${T.dicid||""}-${T.info||""}`})))}catch{me.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",T=c==null?void 0:c["field-names"];if(!x.length){me.message.error("请配置key-field");return}const E=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(E!=null&&E.data){const A=E==null?void 0:E.data,k=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(k)&&(D=k),T?p=D:p=D.map(R=>({label:lD(R,_,x),value:lD(R,_,x)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(p=((m=c.data)==null?void 0:m.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(p=c.options)):c.inputType==="dictionary"?p=await g(t):c.inputType==="system-dictionary"&&(p=await g(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),p};function ML(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:p,form:g,langId:d,getTitle:m}=e,C=me.Form.useWatch(p,g),{message:b}=me.App.useApp(),x=r.input,{handleUniversalHeaderToColumns:_}=$2(),[T,E]=W.useState(e.value),[A,k]=W.useState(!1),[D,R]=W.useState([]),[N,z]=W.useState([]),[M,I]=W.useState(!1),[Y,B]=W.useState({PageNum:1,PageSize:6}),[P,U]=W.useState([]),[H,V]=W.useState(0),[K,ee]=W.useState(ne());W.useEffect(()=>{A&&q()},[A,Y]);const J=(ae,se)=>{R(ae),z(se)},q=async()=>{var ae,se,ve,we,ce;if(r.inputType==="url"&&(r!=null&&r["action-url"])){I(!0);try{const ye=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...Y,...(r==null?void 0:r["action-url-extra-params"])||{}});if((ye==null?void 0:ye.ReturnValue)===0){b.error(ye.msg),I(!1);return}const De=ye==null?void 0:ye.data,Pe=(ae=De==null?void 0:De.list)==null?void 0:ae.map((ze,Ne)=>{const dt=(Y.PageNum-1)*Y.PageSize+Ne;return{...ze,_rowKey:dt}}),Te=(Pe==null?void 0:Pe.filter(ze=>D.includes(ze._rowKey)))||[];z(Te),U([...Pe||[]]),V((De==null?void 0:De.number)||0),I(!1)}catch(ye){I(!1),b.error(d==="10001"?ye.msg||"参数错误":"Failed to load data")}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const ye={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...Y};try{const Pe=await l(ye,De);if((Pe==null?void 0:Pe.ReturnValue)===1){const ze=(ve=((se=Pe==null?void 0:Pe.data)==null?void 0:se.list)||[])==null?void 0:ve.map((Ne,dt)=>{const Xe=(Y.PageNum-1)*Y.PageSize+dt;return{...Ne,_rowKey:Xe}});V(((we=Pe==null?void 0:Pe.data)==null?void 0:we.number)||0),U([...ze])}const Te=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Te==null?void 0:Te.ReturnValue)===1){const ze=(ce=Te==null?void 0:Te.data)==null?void 0:ce[r==null?void 0:r["instance-source-number"]],Ne=(ze==null?void 0:ze["universal-header"])||[],dt=(ze==null?void 0:ze["attribute-set-id"])||"",Xe=_({universalHeader:Ne,attributeSetId:dt,getTitle:m,otherLangPageId:"5000000"})||[];ee([...Xe])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error"),b.error(d==="10001"?"请配置action-url":"Please configure action-url")},te=()=>{var ae;if(!t){if(T){const se=r==null?void 0:r["key-field"],ve=se==null?void 0:se[p],{delimiter:we="-",list:ce=[]}=ve||{};if(!se){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const ye=(ae=T==null?void 0:T.split(we))==null?void 0:ae[0],De=P==null?void 0:P.findIndex(ze=>Object.values(ze).includes(ye));R([De]);break;case"modal-mult-select":const Pe=T==null?void 0:T.split(","),Te=Pe==null?void 0:Pe.map(ze=>{var dt;const Ne=(dt=ze.split(we))==null?void 0:dt[0];return P==null?void 0:P.findIndex(Xe=>Ne.includes((Xe==null?void 0:Xe.typeid)||(Xe==null?void 0:Xe.instanceid)))});R(Te);break}}k(!0)}},Z=async()=>{try{const ae=await PL(N,r);E((ae==null?void 0:ae[p])||""),e.onSure(ae),k(!1)}catch(ae){b.error(d==="10001"?ae.msg||"参数错误":"Failed to load data")}},$=()=>{B({...Y,PageNum:1}),k(!1)};function ne(){const ae=r["modal-field-list"];let se=[];for(let ve in ae){let we=ae[ve];const ce={dataIndex:ve,title:we};se=[...se,ce]}return se}const oe=ae=>{B({...Y,PageNum:ae})};return Be(en,{children:[Q(me.Select,{placeholder:d==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:te,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:A,onOk:Z,onCancel:$,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:K,loading:M,dataSource:P,rowKey:ae=>ae._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:J},pagination:{total:H,current:Y.PageNum,pageSize:Y.PageSize,onChange:oe}})})||Q(me.Modal,{title:r["modal-caption"],open:A,onOk:Z,onCancel:$,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(me.Table,{columns:K,loading:M,dataSource:P,rowKey:ae=>ae._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:J},pagination:{total:H,current:Y.PageNum,pageSize:Y.PageSize,onChange:oe}})})]})}function PL(e,r){return new Promise((t,i)=>{try{var l=r["key-field"];if(!l){i({msg:"请配置key-field"});return}let f={};e.forEach(c=>{for(let[p,g]of Object.entries(l)){const d=(g==null?void 0:g.list)??[],m=(g==null?void 0:g.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[p]=C.join(m)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function BL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=me.App.useApp(),g=r.input,[d,m]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[T,E]=W.useState([]),[A,k]=W.useState(!1),[D,R]=W.useState({PageNum:1,PageSize:6}),[N,z]=W.useState([]),[M,I]=W.useState(0),Y=K();W.useEffect(()=>{C&&P()},[C,D]);const B=(J,q)=>{_(J),E(q)},P=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){k(!0);try{const q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((q==null?void 0:q.ReturnValue)===0){p.error(q.msg),k(!1);return}const te=q==null?void 0:q.data,Z=(J=te==null?void 0:te.list)==null?void 0:J.map((ne,oe)=>{const ae=(D.PageNum-1)*D.PageSize+oe;return{...ne,_rowKey:ae}}),$=(Z==null?void 0:Z.filter(ne=>x.includes(ne._rowKey)))||[];E($),z([...Z||[]]),I((te==null?void 0:te.number)||0),k(!1)}catch(q){k(!1),p.error(c==="10001"?q.msg||"参数错误":"Failed to load data")}return}p.error(c==="10001"?"请配置action-url":"Please configure action-url")},U=()=>{var J,q;if(!t){if(d){const te=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],Z=((q=r==null?void 0:r["key-field"])==null?void 0:q.delimiter)??"-";if(!te.length){p.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(g){case"modal-select":const $=d==null?void 0:d.split("-"),ne=N==null?void 0:N.findIndex(se=>$.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)));_([ne]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),ae=oe==null?void 0:oe.map(se=>{var we;const ve=(we=se.split(Z))==null?void 0:we[0];return N==null?void 0:N.findIndex(ce=>ve.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});_(ae);break}}b(!0)}},H=async()=>{try{const J=await LL(T,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(c==="10001"?J.msg||"参数错误":"Failed to build value")}},V=()=>{R({...D,PageNum:1}),b(!1)};function K(){const J=r["modal-field-list"];let q=[];for(let te in J){let Z=J[te];const $={dataIndex:te,title:Z};q=[...q,$]}return q}const ee=J=>{R({...D,PageNum:J})};return Be(en,{children:[Q(me.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:U,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})||Q(me.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})]})}function LL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const zL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:_}=e;me.App.useApp();const[T,E]=W.useState([]),[A,k]=W.useState(d||[]);W.useEffect(()=>{D()},[r.inputType,r.classify,r.data,r.options]);const D=async()=>{const R=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});E(R)};return Q(me.Checkbox.Group,{...l,options:T,value:A,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:R=>{k(R),t==null||t(R)},disabled:i})},UL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1),{message:E}=me.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await k(g);else if(e.inputType==="system-dictionary")k(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await R();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},k=async M=>{var I;if(e.classify){T(!0);try{const Y=await c(M,{asctypeid:e.classify});if((I=Y==null?void 0:Y.data)!=null&&I.list&&Array.isArray(Y.data.list)){const B=Y.data.list.map(P=>({label:`${P.dicid||""}-${P.info||""}`,value:`${P.dicid||""}-${P.info||""}`}));x(B)}}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{T(!1)}}},D=(M,I)=>{i&&i(M)},R=async M=>new Promise(async(I,Y)=>{var V,K,ee;const B=((V=e==null?void 0:e["key-field"])==null?void 0:V.list)||[],P=(e==null?void 0:e["search-field"])||[],U=((K=e==null?void 0:e["key-field"])==null?void 0:K.delimiter)||"-";if(!B.length){E.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};M&&(P.forEach(J=>{H[J]=M[J]||""}),H.level=Number(M.level||0)+1||""),T(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((ee=J==null?void 0:J.data)!=null&&ee.list&&Array.isArray(J.data.list)){const q=J.data.list.map(te=>({...te,label:`${te[B[0]]||""}${U}${te[B[1]]||""}`,value:`${te[B[0]]||""}${U}${te[B[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));I(q)}Y([])}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options"),Y([])}finally{Y([]),T(!1)}}),N=async M=>{const I=M[M.length-1],Y=await R(I)||[];return I.children=Y,x([...b]),Y},z=(M,I)=>I.some(Y=>Y.label.toLowerCase().includes(M.toLowerCase()));return Q(me.Cascader,{showSearch:{filter:z},loading:_,placeholder:C==="10001"?"请选择":"Please select",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async M=>{var I;if(M&&(t!=null&&t.length)){const Y=((I=e==null?void 0:e["key-field"])==null?void 0:I.list)||[],B=(e==null?void 0:e["search-field"])||[];if(!Y.length||!B.length){E.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const P=Y.findIndex(V=>V===B[0]);if(P===-1){E.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const U=t.map(V=>V.split("-")[P]||"").filter(Boolean);let H=b;for(const[V,K]of U.entries()){if(V===U.length-1)break;const ee=H.filter(te=>te[B[0]]===K);if(ee.length===0)break;const J=ee[0];if(J.children&&J.children.length>0){H=J.children;continue}H=await N(ee)}}}})},jL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,p]=W.useState([]),[g,d]=W.useState(!1);W.useEffect(()=>{(async()=>{var k;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const D=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(k=D==null?void 0:D.data)!=null&&k.list&&Array.isArray(D.data.list)?p(D.data.list):D!=null&&D.data&&Array.isArray(D.data)?p(D.data):Array.isArray(D==null?void 0:D.list)?p(D.list):(D==null?void 0:D.ReturnValue)===1&&(D!=null&&D.data)&&(Array.isArray(D.data)?p(D.data):p([D.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&p(e.data)})()},[e.inputType,e["action-url"],e.data]);const m=A=>JSON.stringify(A),C=A=>{const k=m(A);return t===k},b=A=>{if(r)return;const k=m(A);i&&i(k)},x=e["card-image-width"]||200,_=e["card-image-height"]||100,T=e["card-image-field"],E=e["card-info-field"];return Q("div",{style:{...l},children:g?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((A,k)=>{const D=C(A);return Be("div",{onClick:()=>b(A),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[T]&&Q("img",{src:A.picurl,alt:A[E]||"",style:{width:`${x}px`,height:`${_}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:R=>{R.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Be(me.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:D?"none":"1px solid #d9d9d9",backgroundColor:D?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:D&&Q(d8,{style:{fontSize:"12px",color:"#fff"}})}),A[E]||""]})})]},k)})})})},QQ="";function Xh(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Mi(){}const Jh=Object.assign,Ac=typeof window<"u";function Jr(e){return e!=null}function Oc(e){return typeof e=="function"}function IL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function sD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function Y2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+Y2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?Y2(e,i):""),""):""}function HL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${Y2(r,t)}`)}function wn(e,r){return e=`${r||"rv"}-${e}`,[HL(e),e]}function VL(e){e.stopPropagation()}function q2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&VL(e)}const $L={click:"onClick"};function uD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=$L[i];t[l]=function(f){var c,p;f.stopPropagation(),(p=(c=r.props)[l])===null||p===void 0||p.call(c,f)}}return W.cloneElement(r,t)}const fd=Ac?window:global;let cD=Date.now();function YL(e){const r=Date.now(),t=Math.max(0,16-(r-cD)),i=setTimeout(e,t);return cD=r+t,i}function G2(e){return(fd.requestAnimationFrame||YL).call(fd,e)}function qL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function GL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function KL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function WL(e){fD(window,e)}function fD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const QL=qL();function dD(){QL&&WL(KL())}function hD(e){return/^\d+(\.\d+)?$/.test(e)}function pD(e){return Number.isNaN?Number.isNaN(e):e!==e}function dl(e){if(Jr(e))return e=String(e),hD(e)?`${e}px`:e}function ZL(e){if(Jr(e)){const r=dl(e);return{width:r,height:r}}return{}}let K2;function XL(){if(!K2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;K2=parseFloat(r)}return K2}function JL(e){return e=e.replace(/rem/g,""),+e*XL()}function ez(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function tz(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function vD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return JL(e);if(e.indexOf("vw")!==-1)return ez(e);if(e.indexOf("vh")!==-1)return tz(e)}return parseFloat(e)}function ep(e,r,t){return Math.min(Math.max(e,r),t)}function mD(e,r,t){const i=e.indexOf(r);return i===-1?e:r==="-"&&i!==0?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(t,"")}function nz(e,r=!0,t=!0){r?e=mD(e,".",/\./g):e=e.split(".")[0],t?e=mD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function hl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let gD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){gD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function W2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let p;const g=()=>{const m=Xh(i);m&&!p&&(m.addEventListener(e,r,gD?{capture:f,passive:l}:f),p=!0)},d=()=>{const m=Xh(i);m&&p&&(m.removeEventListener(e,r,f),p=!1)};W.useEffect(()=>(g(),()=>d()),[i,...c])}function Q2(e){const[r,t]=W.useState(e),i=W.useRef(r),l=W.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const rz=()=>{const e=W.useRef(!1);return W.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},yD=(e={})=>{const r=rz(),[t,i,l]=Q2(e),f=W.useCallback(c=>{r.current||i(p=>Object.assign(Object.assign({},p),Oc(c)?c(p):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=W.useRef(!1);W.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function xD(e){const r=W.useRef(e);return r.current=e,r}const az=process.env.NODE_ENV==="development";function eZ(e,r){}const bD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=xD(e);W.useEffect(()=>()=>{r.current()},[])};function CD(e,r){if(e===r)return!0;for(let t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}const iz=(e=>(t,i,l)=>{const f=W.useRef(!1),c=W.useRef([]),p=W.useRef([]),g=W.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xh(b));if(!f.current){f.current=!0,c.current=C,p.current=i,g.current=t();return}(C.length!==c.current.length||!CD(C,c.current)||!CD(i,p.current))&&((d=g.current)===null||d===void 0||d.call(g),c.current=C,p.current=i,g.current=t())}),bD(()=>{var d;(d=g.current)===null||d===void 0||d.call(g),f.current=!1})})(W.useEffect);function oz(e,r){const[t,i]=W.useState(),[l,f]=W.useState();return iz(()=>{const c=Xh(e);if(!c)return;const p=new IntersectionObserver(g=>{for(const d of g)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xh(r==null?void 0:r.root)}));return p.observe(c),()=>{p.disconnect()}},[],e),[t,l]}const wD=10;function lz(e,r){return e>r&&e>wD?"horizontal":r>e&&r>wD?"vertical":""}function _D(){const e=W.useRef(0),r=W.useRef(0),t=W.useRef(0),i=W.useRef(0),l=W.useRef(0),f=W.useRef(0),c=W.useRef(""),p=W.useRef(null),g=()=>c.current==="vertical",d=()=>c.current==="horizontal",m=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",p.current=null};return{move:x=>{const _=x.touches[0];t.current=_.clientX<0?0:_.clientX-e.current,i.current=_.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),p.current===null?p.current=!0:p.current=!1,c.current||(c.current=lz(l.current,f.current))},start:x=>{m(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:m,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:g,isHorizontal:d,firstMove:p}}const SD=/scroll|auto/i,sz=Ac?window:void 0;function uz(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function cz(e,r=sz){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&uz(t);){const{overflowY:i}=window.getComputedStyle(t);if(SD.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(SD.test(l))return t}t=t.parentNode}return r}const fz=e=>(r,t)=>{const i=W.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},tp=Ac?W.useLayoutEffect:W.useEffect,dz=fz(tp),ED=()=>{const[,e]=W.useState({});return W.useCallback(()=>e({}),[])};function DD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=W.useRef(e);r.current=W.useMemo(()=>e,[e]);const t=W.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function np(e){const{value:r,defaultValue:t,onChange:i}=e,l=ED(),f=W.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=DD((p,g)=>{const d=typeof p=="function"?p(f.current):p;!g&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const iZ="";function $a(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t}function Z2(e,r,t,i){function l(f){return f instanceof t?f:new t(function(c){c(f)})}return new(t||(t=Promise))(function(f,c){function p(m){try{d(i.next(m))}catch(C){c(C)}}function g(m){try{d(i.throw(m))}catch(C){c(C)}}function d(m){m.done?f(m.value):l(m.value).then(p,g)}d((i=i.apply(e,r||[])).next())})}const oZ="",hz=({bem:e})=>Q(en,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Re(e("line",String(t+1)))},t))}),pz=({bem:e})=>Q("svg",Object.assign({className:Re(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),vz=({bem:e})=>Be("div",Object.assign({className:Re(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),mz=e=>({spinner:Q(hz,{bem:e}),circular:Q(pz,{bem:e}),ball:Q(vz,{bem:e})}),[Ng]=wn("loading"),X2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:p,textSize:g}=e,d=W.useMemo(()=>Object.assign({color:l},ZL(f)),[l,f]),m=()=>p?Q("span",Object.assign({className:Re(Ng("text")),style:{fontSize:dl(g),color:c??l}},{children:p})):null;return Be("div",Object.assign({className:Re(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Re(Ng("spinner",t)),style:d},{children:mz(Ng)[t]})),m()]}))},gz="#fff",rp="rv-hairline",yz=`${rp}--top`,xz=`${rp}--left`,bz=`${rp}--surround`,Cz=`${rp}--top-bottom`,wz=`${rp}-unset--top-bottom`,TD="rv-shadow",_z="__REACT_VANT_COMPONENT",kD=W.createContext({}),[ap]=wn("button"),Sz=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:p,plain:g,block:d,loadingType:m,nativeType:C,iconPosition:b}=e,x=$a(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:_}=W.useContext(kD),T=W.useMemo(()=>e.size||(_==null?void 0:_.size)||"normal",[_==null?void 0:_.size,e.size]),E=W.useMemo(()=>e.type||(_==null?void 0:_.type)||"default",[_==null?void 0:_.type,e.type]),A=W.useMemo(()=>g??(_==null?void 0:_.plain),[_==null?void 0:_.plain,g]),k=W.useMemo(()=>d??(_==null?void 0:_.block),[_==null?void 0:_.block,d]),D=W.useMemo(()=>b||(_==null?void 0:_.iconPosition)||"left",[_==null?void 0:_.iconPosition,b]),R=W.useMemo(()=>{var K;return(K=e.disabled)!==null&&K!==void 0?K:_==null?void 0:_.disabled},[_==null?void 0:_.disabled,e.disabled]),N=W.useMemo(()=>C||(_==null?void 0:_.nativeType)||"button",[_==null?void 0:_.nativeType,C]),M=W.useMemo(()=>e.tag||(_==null?void 0:_.tag)||"button",[_==null?void 0:_.tag,e.tag]),I=Re(i,ap([E,T,{plain:A,loading:t,disabled:R,hairline:l,block:k,round:c,square:p}]),{[bz]:l},e.shadow&&`${TD}--${+e.shadow}`),Y=Object.assign({},e.style);r&&(Y.color=A?r:gz,A||(Y.background=r),r.indexOf("gradient")!==-1?Y.border=0:Y.borderColor=r);const B=K=>{!t&&!R&&e.onClick&&e.onClick(K)},P=()=>{if(t){const{loadingSize:K="20px"}=e;return Q(X2,{className:Re(ap("loading")),size:K,type:m,color:E==="default"?void 0:""})}return null},U=()=>e.loading?P():e.icon?W.cloneElement(e.icon,{className:Re(ap("icon"))}):null,H=()=>{let K;return t?K=f:K=e.children||e.text,K?Q("span",Object.assign({className:Re(ap("text"))},{children:K}),"text"):null};return Q(M,Object.assign({},x,{disabled:R,className:I,style:Y,type:N,onClick:B},{children:(()=>Be("div",Object.assign({className:Re(ap("content"))},{children:[D==="left"&&U(),H(),D==="right"&&U()]})))()}))},[Ez]=wn("button-group"),ip=Object.assign(Sz,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=$a(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:p=>{f.disabled||l==null||l(p)},style:t,className:Re(r,Ez([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${TD}--${+f.shadow}`)},{children:Q(kD.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),dZ="";function ea(...e){const r=Object.assign({},e[0]);return e.forEach(t=>{for(const i in t){const l=t[i];r[i]=r.hasOwnProperty(i)?r[i]:l}}),r}const[AD]=wn("badge"),Dz=e=>{const r=ea(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,p=c,g=()=>r.content?!0:Jr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&g()?Jr(i)&&hD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,m=()=>{if(g()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=dl(x),C.right=dl(b)):(C.marginTop=dl(x),C.marginLeft=dl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Re({[r.className]:r.className&&!r.children},AD({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Be(p,Object.assign({className:Re(AD("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,m()]})):m()},pZ="";var Tz=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};function kz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const ls=W.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:p,onClick:g,children:d}=e,m=Tz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?kz(t):void 0;let x=p;x===void 0&&g&&(x=-1);const _=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:g,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},m);return W.cloneElement(d,_)}),Az=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M494.094 733.426a41.472 41.472 0 01-20.023-11.126L140.16 388.388c-16.272-16.271-16.272-42.653 0-58.925 16.271-16.272 42.653-16.272 58.925 0L503.66 634.037 808.186 329.51c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L533.2 722.347c-10.607 10.607-25.508 14.3-39.106 11.08z",fillRule:"evenodd"})),Oz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Me.createElement(Az,null))),Rz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 01-11.127-20.023z",fillRule:"evenodd"})),Fz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Me.createElement(Rz,null))),Nz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M513.176 285.05a41.472 41.472 0 0120.024 11.127L867.11 630.089c16.272 16.271 16.272 42.653 0 58.925s-42.654 16.272-58.925 0L503.612 384.44 199.085 688.967c-16.272 16.271-42.654 16.271-58.925 0-16.272-16.272-16.272-42.654 0-58.926L474.07 296.129c10.606-10.606 25.508-14.299 39.105-11.078z",fillRule:"evenodd"})),Mz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Me.createElement(Nz,null))),Pz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M711.156 508.035a41.472 41.472 0 01-11.126 20.023L366.12 861.97c-16.272 16.272-42.654 16.272-58.926 0s-16.272-42.654 0-58.926L611.767 498.47 307.241 193.944c-16.272-16.272-16.272-42.654 0-58.926 16.271-16.272 42.653-16.272 58.925 0L700.078 468.93c10.606 10.606 14.299 25.508 11.078 39.105z",fillRule:"evenodd"})),Bz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrow"},e,{ref:r}),Me.createElement(Pz,null))),Lz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M500 55.556c245.46 0 444.444 198.984 444.444 444.444S745.46 944.444 500 944.444 55.556 745.46 55.556 500 254.54 55.556 500 55.556zm176.441 267.887c-10.848-10.848-28.436-10.848-39.284 0L499.665 460.936 362.172 323.443c-10.848-10.848-28.436-10.848-39.284 0-10.848 10.848-10.848 28.436 0 39.284L460.38 500.22 322.888 637.713c-10.848 10.848-10.848 28.436 0 39.284 10.848 10.848 28.436 10.848 39.284 0l137.493-137.493 137.492 137.493c10.848 10.848 28.436 10.848 39.284 0 10.848-10.848 10.848-28.436 0-39.284L538.948 500.22l137.493-137.493c10.848-10.848 10.848-28.436 0-39.284z",fillRule:"evenodd"})),Mg=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgClear"},e,{ref:r}),Me.createElement(Lz,null))),zz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M560.149 501.223l255.344 255.344c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L501.223 560.149 245.88 815.493c-16.272 16.272-42.654 16.272-58.925 0-16.272-16.272-16.272-42.654 0-58.926l255.344-255.344L186.954 245.88c-16.272-16.272-16.272-42.654 0-58.925 16.271-16.272 42.653-16.272 58.925 0l255.344 255.344 255.344-255.344c16.272-16.272 42.654-16.272 58.926 0 16.272 16.271 16.272 42.653 0 58.925L560.149 501.223z",fillRule:"nonzero"})),J2=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgCross"},e,{ref:r}),Me.createElement(zz,null))),Uz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M537.5 537.5v325c0 20.71-16.79 37.5-37.5 37.5s-37.5-16.79-37.5-37.5v-325h-325c-20.71 0-37.5-16.79-37.5-37.5s16.79-37.5 37.5-37.5h325v-325c0-20.71 16.79-37.5 37.5-37.5s37.5 16.79 37.5 37.5v325h325c20.71 0 37.5 16.79 37.5 37.5s-16.79 37.5-37.5 37.5h-325z",fillRule:"nonzero"})),jz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgPlus"},e,{ref:r}),Me.createElement(Uz,null))),Iz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M500 888.889c-214.389 0-388.889-174.5-388.889-388.889S285.611 111.111 500 111.111 888.889 285.611 888.889 500 714.389 888.889 500 888.889m0-833.333c-245.444 0-444.444 199-444.444 444.444 0 245.444 199 444.444 444.444 444.444 245.444 0 444.444-199 444.444-444.444 0-245.444-199-444.444-444.444-444.444m6.456 222.222c-44.612 0-80 12.778-105.612 39.055-26.277 25.667-39.055 60.445-39.055 105.056v1c0 17.944 14.444 32.444 32.389 32.444 17.889 0 32.389-14.5 32.389-32.444 0-.389-.111-1-.111-1 0-26.945 5.444-48.222 16.444-62.889 12.222-17.111 32.333-25.667 59.889-25.667 21.944 0 39.055 6.111 51.222 18.334 11.611 12.222 17.778 28.722 17.778 50.055 0 15.89-5.556 30.5-16.556 44.556l-10.389 11.61c-37.777 33.556-60.333 59-69.61 75.668-13.834 24.944-11.334 48-11.334 48 0 17.888 14.556 32.388 32.444 32.388 17.945 0 29.778-12.333 32.39-32.388 0 0 3.333-18.667 10.055-30.89 5.5-10.944 14.055-21.388 25-31.11 29.389-25.056 46.444-40.945 51.889-47.667 14.666-19.5 22.555-44.556 22.555-74.445 0-36.61-12.166-65.944-35.944-87.333-24.445-21.944-56.167-32.333-95.833-32.333m-10.417 357.15c-12.778 0-23.222 3.666-31.111 12.222-9.222 7.889-13.5 18.333-13.5 31.111 0 12.222 4.278 22.611 13.5 31.167 7.889 8.5 18.333 12.778 31.11 12.778 12.279 0 23.223-4.278 32.39-12.167 8.5-8.611 12.778-18.945 12.778-31.778 0-12.778-4.278-23.222-12.778-31.111-8.556-8.556-19.556-12.222-32.39-12.222",fillRule:"evenodd"})),Hz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Me.createElement(Iz,null))),Vz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M119.415 524.046c-9.708-9.693-11.278-24.766-2.72-35.554l20.007-25.223c8.201-10.34 23.543-12.936 34.386-5.699l173.175 115.585c9.134 6.097 24.856 5.303 33.384-1.616l457.6-371.25c10.286-8.345 26.397-7.634 35.412 1.368l11.272 11.255c9.81 9.795 9.096 25.343-1.187 35.611l-491.14 490.414c-15.28 15.258-40.369 14.59-56.099-1.116l-214.09-213.775z",fillRule:"nonzero"})),OD=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgSuccess"},e,{ref:r}),Me.createElement(Vz,null))),EZ="",[RD]=wn("cell-group"),$z=e=>{const r=ea(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,p=()=>Q("div",Object.assign({className:Re(RD({inset:c}),{[Cz]:!c&&i})},{children:r.children})),g=()=>t?Q("div",Object.assign({className:Re(RD("title"))},{children:t})):null;return Be("div",Object.assign({className:r.className,style:r.style},{children:[g(),p()]}))},[dd]=wn("cell"),eC=Object.assign(e=>{const r=()=>Jr(e.label)?Q("div",Object.assign({className:Re(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Jr(e.title)?Be("div",Object.assign({className:Re(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const E=Jr(e.title);return Jr(e.children)||Jr(e.value)?Q("div",Object.assign({className:Re(dd("value",{alone:!E}),e.valueClass)},{children:Jr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?W.cloneElement(e.icon,{className:Re(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const E=Re(dd("right-icon"));return e.arrowDirection==="left"?Q(Fz,{className:E}):e.arrowDirection==="up"?Q(Mz,{className:E}):e.arrowDirection==="down"?Q(Oz,{className:E}):Q(Bz,{className:E})}return null},{className:c,style:p,size:g,center:d,border:m=!0,isLink:C,required:b,onClick:x}=e,_=C||e.clickable,T={center:d,required:b,clickable:_,borderless:!m};return g&&(T[g]=!!g),Be("div",Object.assign({style:p,className:Re(dd(T),c),role:_?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:$z}),AZ="",OZ="";function Pg(e,r){return Pg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Pg(e,r)}function FD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Yz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function qz(e,r){e.classList?e.classList.add(r):Yz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function ND(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Gz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=ND(e.className,r):e.setAttribute("class",ND(e.className&&e.className.baseVal||"",r))}const MD={disabled:!1};var Kz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.number,wt.exports.shape({enter:wt.exports.number,exit:wt.exports.number,appear:wt.exports.number}).isRequired]):null,Wz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.string,wt.exports.shape({enter:wt.exports.string,exit:wt.exports.string,active:wt.exports.string}),wt.exports.shape({enter:wt.exports.string,enterDone:wt.exports.string,enterActive:wt.exports.string,exit:wt.exports.string,exitDone:wt.exports.string,exitActive:wt.exports.string})]):null;const PD=W.createContext(null);var op="unmounted",Fc="exited",Nc="entering",hd="entered",tC="exiting",ss=function(e){FD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,p=c&&!c.isMounting?i.enter:i.appear,g;return f.appearStatus=null,i.in?p?(g=Fc,f.appearStatus=Nc):g=hd:i.unmountOnExit||i.mountOnEnter?g=op:g=Fc,f.state={status:g},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===op?{status:Fc}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(l){var f=null;if(l!==this.props){var c=this.state.status;this.props.in?c!==Nc&&c!==hd&&(f=Nc):(c===Nc||c===hd)&&(f=tC)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,p;return f=c=p=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,p=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:p}},t.updateStatus=function(l,f){l===void 0&&(l=!1),f!==null?(this.cancelNextCallback(),f===Nc?this.performEnter(l):this.performExit()):this.props.unmountOnExit&&this.state.status===Fc&&this.setState({status:op})},t.performEnter=function(l){var f=this,c=this.props.enter,p=this.context?this.context.isMounting:l,g=this.props.nodeRef?[p]:[fg.findDOMNode(this),p],d=g[0],m=g[1],C=this.getTimeouts(),b=p?C.appear:C.enter;if(!l&&!c||MD.disabled){this.safeSetState({status:hd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:Nc},function(){f.props.onEntering(d,m),f.onTransitionEnd(b,function(){f.safeSetState({status:hd},function(){f.props.onEntered(d,m)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),p=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||MD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:tC},function(){l.props.onExiting(p),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(p)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(l,f){f=this.setNextCallback(f),this.setState(l,f)},t.setNextCallback=function(l){var f=this,c=!0;return this.nextCallback=function(p){c&&(c=!1,f.nextCallback=null,l(p))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},t.onTransitionEnd=function(l,f){this.setNextCallback(f);var c=this.props.nodeRef?this.props.nodeRef.current:fg.findDOMNode(this),p=l==null&&!this.props.addEndListener;if(!c||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=g[0],m=g[1];this.props.addEndListener(d,m)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===op)return null;var f=this.props,c=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var p=_b(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(PD.Provider,{value:null},typeof c=="function"?c(l,p):W.cloneElement(W.Children.only(c),p))},r}(W.Component);ss.contextType=PD,ss.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:wt.exports.shape({current:typeof Element>"u"?wt.exports.any:function(e,r,t,i,l,f){var c=e[r];return wt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:wt.exports.oneOfType([wt.exports.func.isRequired,wt.exports.element.isRequired]).isRequired,in:wt.exports.bool,mountOnEnter:wt.exports.bool,unmountOnExit:wt.exports.bool,appear:wt.exports.bool,enter:wt.exports.bool,exit:wt.exports.bool,timeout:function(r){var t=Kz;r.addEndListener||(t=t.isRequired);for(var i=arguments.length,l=new Array(i>1?i-1:0),f=1;f<i;f++)l[f-1]=arguments[f];return t.apply(void 0,[r].concat(l))},addEndListener:wt.exports.func,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}:{};function pd(){}ss.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd},ss.UNMOUNTED=op,ss.EXITED=Fc,ss.ENTERING=Nc,ss.ENTERED=hd,ss.EXITING=tC;const BD=ss;var Qz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return qz(r,i)})},nC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Gz(r,i)})},rC=function(e){FD(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.appliedClasses={appear:{},enter:{},exit:{}},i.onEnter=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1];i.removeClasses(m,"exit"),i.addClass(m,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(p,g)},i.onEntering=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.addClass(m,b,"active"),i.props.onEntering&&i.props.onEntering(p,g)},i.onEntered=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(m,b),i.addClass(m,b,"done"),i.props.onEntered&&i.props.onEntered(p,g)},i.onExit=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(p)},i.onExiting=function(p){var g=i.resolveArguments(p),d=g[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(p)},i.onExited=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(p)},i.resolveArguments=function(p,g){return i.props.nodeRef?[i.props.nodeRef.current,p]:[p,g]},i.getClassNames=function(p){var g=i.props.classNames,d=typeof g=="string",m=d&&g?g+"-":"",C=d?""+m+p:g[p],b=d?C+"-active":g[p+"Active"],x=d?C+"-done":g[p+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var p=this.getClassNames(f)[c+"ClassName"],g=this.getClassNames("enter"),d=g.doneClassName;f==="appear"&&c==="done"&&d&&(p+=" "+d),c==="active"&&l&&l.scrollTop,p&&(this.appliedClasses[f][c]=p,Qz(l,p))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],p=c.base,g=c.active,d=c.done;this.appliedClasses[f]={},p&&nC(l,p),g&&nC(l,g),d&&nC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=_b(l,["classNames"]);return W.createElement(BD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(W.Component);rC.defaultProps={classNames:""},rC.propTypes=process.env.NODE_ENV!=="production"?Nr({},BD.propTypes,{classNames:Wz,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}):{};const LD=rC;function pn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const RZ="",[Zz]=wn("overlay"),Xz=e=>{const r=W.useRef(null),t=ea(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=p=>{t.lockScroll&&q2(p,!0)},c=()=>{const p=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Jr(l)&&(p.animationDuration=`${l}ms`),uD(t.stopPropagation,Q("div",Object.assign({ref:r,style:p,onClick:g=>{var d;g.target===g.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,g))},className:Re(Zz(),t.className)},{children:t.children})))};return W2("touchmove",f,{target:r}),Q(LD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Jz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);IL(f)?f.then(c=>{c?i():l&&l()}).catch(Mi):f?i():l&&l()}else i()}function aC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function eU(e,r){if(Bg()&&e){const t=aC(e);return tu.exports.createPortal(r,t)}return r}const tU=W.createContext({});let zD=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){zD=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lp=0;const UD="rv-overflow-hidden";function nU(e,r){const t=_D(),i=c=>{t.move(c);const p=t.deltaY.current>0?"10":"01",g=cz(c.target,e.current);if(!g)return;const{scrollHeight:d,offsetHeight:m,scrollTop:C}=g;let b="11";C===0?b=m>=d?"00":"01":C+m>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(p,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,zD?{passive:!1}:!1),lp||document.body.classList.add(UD),lp++},f=()=>{lp&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lp--,lp||document.body.classList.remove(UD))};W.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let jD=2e3;const[Lg]=wn("popup"),sp=W.forwardRef((e,r)=>{var t;const i=ea(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(J2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:p,children:g,duration:d,closeIcon:m,position:C}=i,b=W.useRef(!1),x=W.useRef((t=i.zIndex)!==null&&t!==void 0?t:jD),_=W.useRef(),[T,E]=W.useState(i.visible),[A,k]=W.useState(T),D=W.useMemo(()=>{const V=Object.assign({zIndex:x.current},i.style);if(Jr(i.duration)){const K=i.position==="center"?"animationDuration":"transitionDuration";V[K]=`${i.duration}ms`}return V},[x.current,i.position,i.style,i.duration]),R=()=>{var V;i.zIndex!==void 0?x.current=+i.zIndex:x.current=jD++,b.current=!0,(V=i.onOpen)===null||V===void 0||V.call(i)},N=()=>{Jz({interceptor:i.beforeClose,args:["close"],done:()=>{var V;b.current=!1,(V=i.onClose)===null||V===void 0||V.call(i)}})},z=V=>{var K;(K=i.onClickOverlay)===null||K===void 0||K.call(i,V),i.closeOnClickOverlay&&N()},M=()=>i.overlay?Q(Xz,{visible:T,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:z}):null,I=V=>{i.onClickCloseIcon&&i.onClickCloseIcon(V),N()},Y=()=>{if(f){const{closeIconPosition:V}=i;return m?Q("div",Object.assign({className:Re(Lg("close-icon",V)),onClick:I},{children:m})):null}return null},B=()=>c?Q("div",Object.assign({className:Re(Lg("title"))},{children:c})):null,P=()=>p?Q("div",Object.assign({className:Re(Lg("description"))},{children:p})):null,U=()=>{const{safeAreaInsetBottom:V}=i;return uD(i.stopPropagation,Be("div",Object.assign({ref:_,style:Object.assign(Object.assign({},D),{display:!T&&!A?"none":void 0}),className:Re(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":V},i.className),onClick:i.onClick},{children:[B(),P(),g,Y()]})))},H=()=>{const{transition:V,destroyOnClose:K,forceRender:ee}=i,J=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(LD,Object.assign({in:T,nodeRef:_,timeout:d,classNames:V||J,mountOnEnter:!ee,unmountOnExit:K,onEnter:R,onEntered:i.onOpened,onExited:()=>{var q;k(!1),(q=i.onClosed)===null||q===void 0||q.call(i)}},{children:U()}))};return W2("popstate",()=>{i.closeOnPopstate&&N()}),tp(()=>{T&&k(!0)},[T]),tp(()=>{E(i.visible)},[i.visible]),nU(_,T&&i.lockScroll),W.useImperativeHandle(r,()=>({popupRef:_})),eU(i.teleport,Be(tU.Provider,Object.assign({value:{visible:T}},{children:[M(),H()]})))}),PZ="",ID=W.createContext({}),[rU]=wn("action-bar"),aU=e=>{const r=ea(e,{safeAreaInsetBottom:!0}),t=W.useMemo(()=>W.Children.toArray(r.children),[r.children]);return Q(ID.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Re(r.className,rU(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:W.Children.toArray(r.children).filter(Boolean).map((i,l)=>W.cloneElement(i,{index:l}))}))}))},[HD]=wn("action-bar-icon"),iU=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(Dz,Object.assign({},t,{className:Re(HD("icon"))},{children:i})):null};return Be("div",Object.assign({role:"button",className:Re(e.className,HD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[oU]=wn("action-bar-button"),lU=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:p}=e,{parent:g}=W.useContext(ID),d=W.useMemo(()=>{if(g){const C=g.children[p-1];return!(C&&"isButton"in C.type)}return!1},[p,g]),m=W.useMemo(()=>{if(g){const C=g.children[p+1];return!(C&&"isButton"in C.type)}return!1},[p,g]);return Q(ip,Object.assign({className:Re(e.className,oU([r,{last:m,first:d}])),style:e.style,size:"large",type:r,icon:t,color:l,loading:f,disabled:c,onClick:e.onClick},{children:e.children?e.children:i}))},{isButton:!0}),iC=Object.assign(aU,{Icon:iU,Button:lU});function sU(e,r,t){const i=r[t];Jr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=VD(Object(e[t]),r[t]))}function VD(e,r){return Object.keys(r).forEach(t=>{sU(e,r,t)}),e}const uU={locale:VD({name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,r)=>`${e}年${r}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanPicker:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新...",loading:"加载中..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",defaultAddress:"设为默认收货地址"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌信息"},vanAddressList:{add:"新增地址"}},{})},vd=W.createContext(uU),[Co]=wn("dialog"),$D=e=>{const{locale:r}=W.useContext(vd),t=ea(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:p,className:g,messageAlign:d,closeOnClickOverlay:m,onClickCloseIcon:C}=t,b=$a(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Re(Co("header",{isolated:!t.message&&!t.children}))},{children:l})):null,_=()=>t.children?Q("div",Object.assign({className:Re(Co("content"))},{children:t.children})):p?Q("div",Object.assign({className:Re(Co("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Re(Co("message",{"has-title":l,[d]:d}))},{children:p}))})):null,T=()=>{var k,D,R,N,z,M;return Be("div",Object.assign({className:Re(yz,Co("footer"))},{children:[t.showCancelButton&&Q(ip,{size:"large",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),style:{color:t.cancelButtonColor},loading:(k=t.cancelProps)===null||k===void 0?void 0:k.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((R=t.cancelProps)===null||R===void 0)&&R.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(ip,{size:"large",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm"),{[xz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Mi:t.onConfirm})]}))},E=()=>{var k,D,R,N,z,M;return Be(iC,Object.assign({className:Re(Co("footer"))},{children:[t.showCancelButton&&Q(iC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),color:t.cancelButtonColor,loading:(k=t.cancelProps)===null||k===void 0?void 0:k.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((R=t.cancelProps)===null||R===void 0)&&R.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(iC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm")),color:t.confirmButtonColor,loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Mi:t.onConfirm})]}))},A=()=>t.footer?t.footer:t.theme==="round-button"?E():T();return Be(sp,Object.assign({},b,{visible:c,className:Re(Co([f]),g),style:{width:dl(i)},"aria-labelledby":l||p,closeOnClickOverlay:m,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),_(),A()]}))};Number((W.version||"").split(".")[0]);const cU=Number((tu.exports.version||"").split(".")[0]),zg=Object.assign({},v9),{render:fU,unmountComponentAtNode:dU}=zg;let Ug;try{cU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function YD(e){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=zg;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}const jg="__react_vant_root__";function hU(e,r){fU(e,r)}function pU(e,r){YD(!0);const t=r[jg]||Ug(r);YD(!1),t.render(e),r[jg]=t}function qD(e,r){if(Ug){pU(e,r);return}hU(e,r)}function vU(e){return dU(e)}function mU(e){return Z2(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=e[jg])===null||r===void 0||r.unmount(),delete e[jg]})})}function GD(e){return Ug?mU(e):vU(e)}const md=$D;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(J2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Mi,onConfirm:l=Mi,onClose:f=Mi,cancelProps:c,confirmProps:p}=e,g=$a(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=aC(e.teleport),m=document.createElement("div");d.appendChild(m);let C=Mi;return qD(Q(()=>{const[x,_]=W.useState(!1),[T,E]=W.useState(!1),[A,k]=W.useState(!1);W.useEffect(()=>{_(!0)},[]),C=()=>{_(!1),f&&f()};const D=()=>{t&&t(),GD(m)&&m.parentNode&&m.parentNode.removeChild(m)},R=z=>Z2(void 0,void 0,void 0,function*(){const M=setTimeout(()=>k(!0));(yield l(z))!==!1?(clearTimeout(M),C()):(clearTimeout(M),k(!1))}),N=(z,M)=>Z2(void 0,void 0,void 0,function*(){if(M){C();return}const I=setTimeout(()=>E(!0));(yield i(z))!==!1?(clearTimeout(I),C()):(clearTimeout(I),E(!1))});return Q($D,Object.assign({},r,g,{visible:x,teleport:()=>m,cancelProps:Object.assign({loading:T},c),confirmProps:Object.assign({loading:A},p),onClose:C,onCancel:N,onConfirm:R,onClosed:D}))},{}),m),C},md.alert=e=>{const{onConfirm:r=Mi}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Mi,onConfirm:t=Mi}=e;return new Promise((i,l)=>{md.show(Object.assign(Object.assign({showCancelButton:!0},e),{onCancel:f=>{r(f),l()},onConfirm:f=>{t(f),i(!0)}}))})};const gU=md,[up]=wn("input"),yU=W.forwardRef((e,r)=>{const t=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=W.useRef(),[l,f]=W.useState(!1),c=W.useRef(!1),[p,g]=np(t),{className:d,style:m,align:C,type:b,name:x,placeholder:_,disabled:T,readOnly:E,maxLength:A,autoFocus:k}=t,D=()=>{i!=null&&i.current&&i.current.focus()},R=()=>{i!=null&&i.current&&i.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:D,blur:R,get nativeElement(){return i.current}}));const N=W.useMemo(()=>{if(t.clearable&&!E){const U=p!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return U&&H}return!1},[p,t.clearTrigger,l]),z=U=>{var H;let V=U;if(!c.current&&(Jr(A)&&V.length>+A&&(V=V.slice(0,A),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const K=b==="number";V=nz(V,K,K)}g(V)},M=U=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,U),E&&R()},I=U=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,U),dD()},Y=U=>{var H;(U.key==="Enter"||+U.charCode==13)&&(q2(U),t.type==="search"&&R()),(H=t.onKeyPress)===null||H===void 0||H.call(t,U)},B=()=>{let U=b,H;return b==="number"&&(U="text",H="decimal"),b==="digit"&&(U="tel",H="numeric"),Q("input",{value:p,type:U,inputMode:H,ref:i,name:x,className:Re(up("control")),disabled:T,autoFocus:k,readOnly:E,placeholder:_||"",onBlur:I,onFocus:M,onChange:V=>{var K;return z((K=V==null?void 0:V.currentTarget)===null||K===void 0?void 0:K.value)},onKeyPress:Y,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:V=>{var K;c.current=!0,(K=t.onCompositionStart)===null||K===void 0||K.call(t,V)},onCompositionEnd:V=>{var K,ee;c.current=!1,(K=t.onCompositionEnd)===null||K===void 0||K.call(t,V),z((ee=V==null?void 0:V.currentTarget)===null||ee===void 0?void 0:ee.value)},onClick:t.onClick})},P=U=>{var H;g(""),(H=t.onClear)===null||H===void 0||H.call(t,U)};return Be("div",Object.assign({className:Re(up([C]),d),style:m},{children:[t.prefix&&Q("div",Object.assign({className:Re(up("prefix"))},{children:t.prefix})),B(),N&&W.cloneElement(t.clearIcon||Q(Mg,{}),{className:Re(up("clear")),onTouchStart:P}),t.suffix&&Q("div",Object.assign({className:Re(up("suffix"))},{children:t.suffix}))]}))}),[cp]=wn("textarea"),xU=W.forwardRef((e,r)=>{const t=ea(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=W.useState(!1),f=W.useRef(),c=W.useRef(!1),[p,g]=np(t),{className:d,style:m,name:C,rows:b,placeholder:x,disabled:_,readOnly:T,maxLength:E,showWordLimit:A,autoFocus:k}=t,D=()=>{f!=null&&f.current&&f.current.focus()},R=()=>{f!=null&&f.current&&f.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:D,blur:R,get nativeElement(){return f.current}}));const N=()=>{const H=f.current;if(!H)return;H.style.height="auto";let V=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:K,minHeight:ee}=t.autoSize;K&&(V=Math.min(V,K)),ee&&(V=Math.max(V,ee))}V&&(H.style.height=`${V}px`)};W.useEffect(()=>{N()},[p]);const z=W.useMemo(()=>cp("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),M=H=>{var V;let K=H;c.current||Jr(E)&&K.length>+E&&(K=K.slice(0,E),(V=t.onOverlimit)===null||V===void 0||V.call(t)),g(K)},I=H=>{var V;l(!0),(V=t.onFocus)===null||V===void 0||V.call(t,H),T&&R()},Y=H=>{var V;l(!1),(V=t.onBlur)===null||V===void 0||V.call(t,H),dD()},B=()=>{if(A){const H=(p?`${p}`:"").length;return Q("div",Object.assign({className:Re(cp("word-limit"))},{children:typeof A=="function"?A({currentCount:H,maxLength:E}):Be(en,{children:[Q("span",Object.assign({className:Re(cp("word-num"))},{children:H})),E?`/${E}`:!1]})}))}return null},P=H=>{var V;g(""),(V=t.onClear)===null||V===void 0||V.call(t,H)},U=W.useMemo(()=>{if(t.clearable&&!T){const H=p!=="",V=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&V}return!1},[p,t.clearTrigger,i]);return Be("div",Object.assign({className:Re(cp(),d),style:m},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Re(z),value:p,disabled:_,autoFocus:k,readOnly:T,placeholder:x||"",onBlur:Y,onFocus:I,onChange:H=>{var V;return M((V=H==null?void 0:H.currentTarget)===null||V===void 0?void 0:V.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var V;c.current=!0,(V=t.onCompositionStart)===null||V===void 0||V.call(t,H)},onCompositionEnd:H=>{var V,K;c.current=!1,(V=t.onCompositionEnd)===null||V===void 0||V.call(t,H),M((K=H==null?void 0:H.currentTarget)===null||K===void 0?void 0:K.value)},onClick:t.onClick}),U&&W.cloneElement(t.clearIcon,{className:Re(cp("clear")),onTouchStart:P}),B()]}))}),WZ="",QZ="",cu=Object.assign(yU,{TextArea:xU}),[Pi]=wn("field"),bU=W.forwardRef((e,r)=>{var t;const i=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=W.useRef(null),f=W.useRef(null),c=i.type==="textarea"?f:l,p=()=>{c.current&&c.current.focus()},g=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};W.useImperativeHandle(r,()=>({focus:p,blur:g,clear:d,get nativeElement(){return c.current.nativeElement}}));const m=$=>Jr(i[$])?i[$]:null,C=()=>{const $=m("labelWidth");return $?{width:dl($)}:{}},b=($,ne="onChange")=>{const{formatTrigger:oe,formatter:ae}=i;return ae&&ne===oe?ae($):$},x=$=>{var ne;(ne=i.onChange)===null||ne===void 0||ne.call(i,b($))},_=()=>{const{value:$,defaultValue:ne,align:oe,type:ae,placeholder:se,name:ve,maxLength:we,disabled:ce,readOnly:ye,clearable:De,clearIcon:Pe,clearTrigger:Te,autoFocus:ze,onClear:Ne,onBlur:dt,onFocus:Xe,onKeyPress:Zt,onOverlimit:sn}=i;if(Jr(i.children))return Q("div",Object.assign({className:Re(Pi("children"))},{children:i.children}));const Tn={value:$,onChange:x,placeholder:se,name:ve,defaultValue:ne,disabled:ce,clearable:De,clearIcon:Pe,clearTrigger:Te,onClear:Ne,onBlur:dt,onFocus:Xe,onKeyPress:Zt,onOverlimit:sn,autoFocus:ze,readOnly:ye,maxLength:we,onClick:i.onClickInput};return ae==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},Tn)):Q(cu,Object.assign({ref:l,type:ae,align:oe},Tn))},T=()=>{const{leftIcon:$,onClickLeftIcon:ne}=i;return $?Q("div",Object.assign({className:Re(Pi("left-icon")),onClick:ne},{children:$})):null},E=()=>{const{rightIcon:$,onClickRightIcon:ne}=i;return $?Q("div",Object.assign({className:Re(Pi("right-icon")),onClick:ne},{children:$})):null},A=()=>{const $=i.errorMessage;return $?Q("div",Object.assign({className:Re(Pi("error-message"))},{children:$})):null},k=()=>i.intro?Q("div",Object.assign({className:Re(Pi("intro"))},{children:i.intro})):null,D=()=>{const{tooltip:$}=i;if($){let ne=Q(Hz,{}),oe={message:$};if(!(W.isValidElement($)||typeof $=="string")){const ae=$,{icon:se}=ae,ve=$a(ae,["icon"]);ne=se||ne,oe=ve}return Q("div",Object.assign({className:Re(Pi("tooltip")),onClick:()=>gU.show(oe)},{children:ne}))}return null},R=()=>{const{label:$,colon:ne}=i;return $?Be(en,{children:[$,!!ne&&":",D()]}):null},{size:N,center:z,border:M,isLink:I,required:Y,clickable:B,labelAlign:P,className:U,labelClass:H,valueClass:V,controlAlign:K,arrowDirection:ee,disabled:J,titleStyle:q,error:te}=i,Z=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Be(eC,Object.assign({title:R(),size:N,icon:T(),center:z,border:M,isLink:I,required:Y,clickable:B,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),q),valueClass:Re(Pi("value",[K]),V),titleClass:Re(Pi("label",P),H),arrowDirection:ee,onClick:i.onClick,style:i.style,className:Re(Pi({error:te,disabled:J,[`label-${P}`]:P}),U)},{children:[Be("div",Object.assign({className:Re(Pi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Re(Pi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Re(Pi("control-wrapper"))},{children:_()})),E(),Z&&Q("div",Object.assign({className:Re(Pi("suffix"))},{children:Z}))]})),A(),k()]}))}),CU=Symbol("field"),oC=Object.assign(bU,{[_z]:CU});function wU(e,r,t){return Math.max(r,Math.min(e,t))}const Ea={toVector(e,r){return e===void 0&&(e=r),Array.isArray(e)?e:[e,e]},add(e,r){return[e[0]+r[0],e[1]+r[1]]},sub(e,r){return[e[0]-r[0],e[1]-r[1]]},addTo(e,r){e[0]+=r[0],e[1]+=r[1]},subTo(e,r){e[0]-=r[0],e[1]-=r[1]}};function KD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function WD(e,r,t,i=.15){return i===0?wU(e,r,t):e<r?-KD(r-e,t-r,i)+r:e>t?+KD(e-t,t-r,i)+t:e}function _U(e,[r,t],[i,l]){const[[f,c],[p,g]]=e;return[WD(r,f,c,i),WD(t,p,g,l)]}function si(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function QD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function ar(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?QD(Object(t),!0).forEach(function(i){si(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const ZD={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function XD(e){return e?e[0].toUpperCase()+e.slice(1):""}const SU=["enter","leave"];function EU(e=!1,r){return e&&!SU.includes(r)}function DU(e,r="",t=!1){const i=ZD[e],l=i&&i[r]||r;return"on"+XD(e)+XD(l)+(EU(t,l)?"Capture":"")}const TU=["gotpointercapture","lostpointercapture"];function kU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=TU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function AU(e,r=""){const t=ZD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function JD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function OU(e){return Array.from(e.touches).filter(r=>{var t,i;return r.target===e.currentTarget||((t=e.currentTarget)===null||t===void 0||(i=t.contains)===null||i===void 0?void 0:i.call(t,r.target))})}function RU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function eT(e){return Ig(e)?RU(e)[0]:e}function FU(e){return OU(e).map(r=>r.identifier)}function lC(e){const r=eT(e);return Ig(e)?r.identifier:r.pointerId}function tT(e){const r=eT(e);return[r.clientX,r.clientY]}function NU(e){const r={};if("buttons"in e&&(r.buttons=e.buttons),"shiftKey"in e){const{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f}=e;Object.assign(r,{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f})}return r}function Hg(e,...r){return typeof e=="function"?e(...r):e}function MU(){}function PU(...e){return e.length===0?MU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function nT(e,r){return Object.assign({},r,e||{})}const BU=32;class LU{constructor(r,t,i){this.ctrl=r,this.args=t,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:t,ingKey:i,args:l}=this;t[i]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=l,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const t=this.state,i=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=r.target,t.currentTarget=r.currentTarget,t.lastOffset=i.from?Hg(i.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=r.timeStamp}computeValues(r){const t=this.state;t._values=r,t.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:t,config:i,shared:l}=this;t.args=this.args;let f=0;if(r&&(t.event=r,i.preventDefault&&r.cancelable&&t.event.preventDefault(),t.type=r.type,l.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,l.locked=!!document.pointerLockElement,Object.assign(l,NU(r)),l.down=l.pressed=l.buttons%2===1||l.touches>0,f=r.timeStamp-t.timeStamp,t.timeStamp=r.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const z=t._delta.map(Math.abs);Ea.addTo(t._distance,z)}this.axisIntent&&this.axisIntent(r);const[c,p]=t._movement,[g,d]=i.threshold,{_step:m,values:C}=t;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(c)>=g&&C[0]),m[1]===!1&&(m[1]=Math.abs(p)>=d&&C[1])):(m[0]===!1&&(m[0]=Math.abs(c)>=g&&Math.sign(c)*g),m[1]===!1&&(m[1]=Math.abs(p)>=d&&Math.sign(p)*d)),t.intentional=m[0]!==!1||m[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[z,M]=C;b[0]=m[0]!==!1?z-m[0]:0,b[1]=m[1]!==!1?M-m[1]:0}else b[0]=m[0]!==!1?c-m[0]:0,b[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,_=t._active&&!t._blocked||t.active;_&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=l[this.ingKey]=t._active,r&&(t.first&&("bounds"in i&&(t._bounds=Hg(i.bounds,t)),this.setup&&this.setup()),t.movement=b,this.computeOffset()));const[T,E]=t.offset,[[A,k],[D,R]]=t._bounds;t.overflow=[T<A?-1:T>k?1:0,E<D?-1:E>R?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const N=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=_U(t._bounds,t.offset,N),t.delta=Ea.sub(t.offset,x),this.computeMovement(),_&&(!t.last||f>BU)){t.delta=Ea.sub(t.offset,x);const z=t.delta.map(Math.abs);Ea.addTo(t.distance,z),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[z[0]/f,z[1]/f])}}emit(){const r=this.state,t=this.shared,i=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!i.triggerAllEvents)return;const l=this.handler(ar(ar(ar({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zU([e,r],t){const i=Math.abs(e),l=Math.abs(r);if(i>l&&i>t)return"x";if(l>i&&l>t)return"y"}class UU extends LU{constructor(...r){super(...r),si(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ea.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const t=this.state,i=this.config;if(!t.axis&&r){const l=typeof i.axisThreshold=="object"?i.axisThreshold[JD(r)]:i.axisThreshold;t.axis=zU(t._movement,l)}t._blocked=(i.lockDirection||!!i.axis)&&!t.axis||!!i.axis&&i.axis!==t.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const rT=e=>e,aT=.15,sC={enabled(e=!0){return e},eventOptions(e,r,t){return ar(ar({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[aT,aT];case!1:return[0,0];default:return Ea.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Ea.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||rT;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||rT},threshold(e){return Ea.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(sC,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const jU=0,fp=ar(ar({},sC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=jU){return e},bounds(e={}){if(typeof e=="function")return f=>fp.bounds(e(f));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:r=-1/0,right:t=1/0,top:i=-1/0,bottom:l=1/0}=e;return[[r,t],[i,l]]}}),Vg=10,iT={ArrowRight:(e=1)=>[Vg*e,0],ArrowLeft:(e=1)=>[-Vg*e,0],ArrowUp:(e=1)=>[0,-Vg*e],ArrowDown:(e=1)=>[0,Vg*e]};class IU extends UU{constructor(...r){super(...r),si(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const t=r._bounds.getBoundingClientRect(),i=r.currentTarget.getBoundingClientRect(),l={left:t.left-i.left+r.offset[0],right:t.right-i.right+r.offset[0],top:t.top-i.top+r.offset[1],bottom:t.bottom-i.bottom+r.offset[1]};r._bounds=fp.bounds(l)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const t=this.config,i=this.state;if(r.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(r.buttons):t.pointerButtons!==-1&&t.pointerButtons!==r.buttons))return;const l=this.ctrl.setEventIds(r);t.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(l&&l.size>1&&i._pointerActive)&&(this.start(r),this.setupPointer(r),i._pointerId=lC(r),i._pointerActive=!0,this.computeValues(tT(r)),this.computeInitial(),t.preventScrollAxis&&JD(r)!=="mouse"?(i._active=!1,this.setupScrollPrevention(r)):t.delay>0?(this.setupDelayTrigger(r),t.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const t=this.state,i=this.config;if(!t._pointerActive||t.type===r.type&&r.timeStamp===t.timeStamp)return;const l=lC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=tT(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Ea.sub(f,t._values),this.computeValues(f)),Ea.addTo(t._movement,t._delta),this.compute(r),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(r);return}if(i.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{process.env.NODE_ENV}const t=this.state,i=this.config;if(!t._active||!t._pointerActive)return;const l=lC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[f,c]=t._distance;if(t.tap=f<=i.tapsThreshold&&c<=i.tapsThreshold,t.tap&&i.filterTaps)t._force=!0;else{const[p,g]=t.direction,[d,m]=t.velocity,[C,b]=t.movement,[x,_]=i.swipe.velocity,[T,E]=i.swipe.distance,A=i.swipe.duration;t.elapsedTime<A&&(Math.abs(d)>x&&Math.abs(C)>T&&(t.swipe[0]=p),Math.abs(m)>_&&Math.abs(b)>E&&(t.swipe[1]=g))}this.emit()}pointerClick(r){this.state.tap||(r.preventDefault(),r.stopPropagation())}setupPointer(r){const t=this.config,i=t.device;if(process.env.NODE_ENV==="development")try{if(i==="pointer"&&t.preventScrollDelay===void 0){const l="uv"in r?r.sourceEvent.currentTarget:r.currentTarget;window.getComputedStyle(l).touchAction}}catch{}t.pointerLock&&r.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,HU(r);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const t=iT[r.key];if(t){const i=this.state,l=r.shiftKey?10:r.altKey?.1:1;this.start(r),i._delta=t(l),i._keyboardActive=!0,Ea.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in iT&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const t=this.config.device;r(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(t,"change",this.pointerMove.bind(this)),r(t,"end",this.pointerUp.bind(this)),r(t,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function HU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dp=typeof window<"u"&&window.document&&window.document.createElement;function VU(){return dp&&"ontouchstart"in window}function oT(){return VU()||dp&&window.navigator.maxTouchPoints>1}function $U(){return dp&&"onpointerdown"in window}function YU(){return dp&&"exitPointerLock"in window.document}function qU(){try{return"constructor"in GestureEvent}catch{return!1}}const eo={isBrowser:dp,gesture:qU(),touch:oT(),touchscreen:oT(),pointer:$U(),pointerLock:YU()},GU=250,KU=180,WU=.5,QU=50,ZU=250,lT={mouse:0,touch:0,pen:8},sT=ar(ar({},fp),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&eo.pointerLock,eo.touch&&t?"touch":this.pointerLock?"mouse":eo.pointer&&!l?"pointer":eo.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?GU:void 0,!(!eo.touchscreen||t===!1))return e||(t!==void 0?"y":void 0)},pointerCapture(e,r,{pointer:{capture:t=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&t},keys(e=!0){return e},threshold(e,r,{filterTaps:t=!1,tapsThreshold:i=3,axis:l=void 0}){const f=Ea.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=WU,distance:r=QU,duration:t=ZU}={}){return{velocity:this.transform(Ea.toVector(e)),distance:this.transform(Ea.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return KU;case!1:return 0;default:return e}},axisThreshold(e){return e?ar(ar({},lT),e):lT}});process.env.NODE_ENV==="development"&&Object.assign(sT,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}}),ar(ar({},sC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!eo.touch&&eo.gesture)return"gesture";if(eo.touch&&i)return"touch";if(eo.touchscreen){if(eo.pointer)return"pointer";if(eo.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const p=nT(Hg(t,c),{min:-1/0,max:1/0});return[p.min,p.max]},f=c=>{const p=nT(Hg(i,c),{min:-1/0,max:1/0});return[p.min,p.max]};return typeof t!="function"&&typeof i!="function"?[l(),f()]:c=>[l(c),f(c)]},threshold(e,r,t){return this.lockDirection=t.axis==="lock",Ea.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),ar(ar({},fp),{},{mouseOnly:(e=!0)=>e}),ar(ar({},fp),{},{mouseOnly:(e=!0)=>e});const uT=new Map,uC=new Map;function XU(e){uT.set(e.key,e.engine),uC.set(e.key,e.resolver)}const JU={key:"drag",engine:IU,resolver:sT};function ej(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function tj(e,r){if(e==null)return{};var t=ej(e,r),i,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)i=f[l],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}const nj={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=eo.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},rj=["target","eventOptions","window","enabled","transform"];function $g(e={},r){const t={};for(const[i,l]of Object.entries(r))switch(typeof l){case"function":if(process.env.NODE_ENV==="development"){const f=l.call(t,e[i],i,e);Number.isNaN(f)||(t[i]=f)}else t[i]=l.call(t,e[i],i,e);break;case"object":t[i]=$g(e[i],l);break;case"boolean":l&&(t[i]=e[i]);break}return t}function aj(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:p}=t,g=tj(t,rj),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:p},nj)};if(r){const m=uC.get(r);d[r]=$g(ar({shared:d.shared},g),m)}else for(const m in g){const C=uC.get(m);if(C)d[m]=$g(ar({shared:d.shared},g[m]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(m)&&m==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class cT{constructor(r,t){si(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,p=AU(t,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=ar(ar({},g),f);r.addEventListener(p,l,d);const m=()=>{r.removeEventListener(p,l,d),c.delete(m)};return c.add(m),m}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class ij{constructor(){si(this,"_timeouts",new Map)}add(r,t,i=140,...l){this.remove(r),this._timeouts.set(r,window.setTimeout(t,i,...l))}remove(r){const t=this._timeouts.get(r);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}let oj=class{constructor(r){si(this,"gestures",new Set),si(this,"_targetEventStore",new cT(this)),si(this,"gestureEventStores",{}),si(this,"gestureTimeoutStores",{}),si(this,"handlers",{}),si(this,"config",{}),si(this,"pointerIds",new Set),si(this,"touchIds",new Set),si(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),lj(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(FU(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,t){this.handlers=r,this.nativeHandlers=t}applyConfig(r,t){this.config=aj(r,t)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const t=this.config.shared,i={};let l;if(!(t.target&&(l=t.target(),!l))){if(t.enabled){for(const c of this.gestures){const p=this.config[c],g=fT(i,p.eventOptions,!!l);if(p.enabled){const d=uT.get(c);new d(this,r,c).bind(g)}}const f=fT(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",p=>this.nativeHandlers[c](ar(ar({},this.state.shared),{},{event:p,args:r})),void 0,!0)}for(const f in i)i[f]=PU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:p,passive:g}=kU(f);this._targetEventStore.add(l,c,"",i[f],{capture:p,passive:g})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new cT(e,r),e.gestureTimeoutStores[r]=new ij}function lj(e,r){r.drag&&gd(e,"drag"),r.wheel&&gd(e,"wheel"),r.scroll&&gd(e,"scroll"),r.move&&gd(e,"move"),r.pinch&&gd(e,"pinch"),r.hover&&gd(e,"hover")}const fT=(e,r,t)=>(i,l,f,c={},p=!1)=>{var g,d;const m=(g=c.capture)!==null&&g!==void 0?g:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=p?i:DU(i,l,m);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function sj(e,r={},t,i){const l=W.useMemo(()=>new oj(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),W.useEffect(l.effect.bind(l)),W.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function uj(e,r){return XU(JU),sj({drag:e},r||{},"drag")}var cC=pp(),Nt=e=>hp(e,cC),fC=pp();Nt.write=e=>hp(e,fC);var Yg=pp();Nt.onStart=e=>hp(e,Yg);var dC=pp();Nt.onFrame=e=>hp(e,dC);var hC=pp();Nt.onFinish=e=>hp(e,hC);var yd=[];Nt.setTimeout=(e,r)=>{const t=Nt.now()+r,i=()=>{const f=yd.findIndex(c=>c.cancel==i);~f&&yd.splice(f,1),du-=~f?1:0},l={time:t,handler:e,cancel:i};return yd.splice(dT(t),0,l),du+=1,hT(),l};var dT=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Nt.cancel=e=>{Yg.delete(e),dC.delete(e),hC.delete(e),cC.delete(e),fC.delete(e)},Nt.sync=e=>{vC=!0,Nt.batchedUpdates(e),vC=!1},Nt.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Nt.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var pC=typeof window<"u"?window.requestAnimationFrame:()=>{};Nt.use=e=>pC=e,Nt.now=typeof performance<"u"?()=>performance.now():Date.now,Nt.batchedUpdates=e=>e(),Nt.catch=console.error,Nt.frameLoop="always",Nt.advance=()=>{Nt.frameLoop!=="demand"||vT()};var fu=-1,du=0,vC=!1;function hp(e,r){vC?(r.delete(e),e(0)):(r.add(e),hT())}function hT(){fu<0&&(fu=0,Nt.frameLoop!=="demand"&&pC(pT))}function cj(){fu=-1}function pT(){~fu&&(pC(pT),Nt.batchedUpdates(vT))}function vT(){const e=fu;fu=Nt.now();const r=dT(fu);if(r&&(mT(yd.splice(0,r),t=>t.handler()),du-=r),!du){cj();return}Yg.flush(),cC.flush(e?Math.min(64,fu-e):16.667),dC.flush(),fC.flush(),hC.flush()}function pp(){let e=new Set,r=e;return{add(t){du+=r==e&&!e.has(t)?1:0,e.add(t)},delete(t){return du-=r==e&&e.has(t)?1:0,e.delete(t)},flush(t){r.size&&(e=new Set,du-=r.size,mT(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function mT(e,r){e.forEach(t=>{try{r(t)}catch(i){Nt.catch(i)}})}var fj=Object.defineProperty,dj=(e,r)=>{for(var t in r)fj(e,t,{get:r[t],enumerable:!0})},wo={};dj(wo,{assign:()=>pj,colors:()=>hu,createStringInterpolator:()=>yC,skipAnimation:()=>yT,to:()=>gT,willAdvance:()=>xC});function mC(){}var hj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),Ge={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function us(e,r){if(Ge.arr(e)){if(!Ge.arr(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}return e===r}var Wt=(e,r)=>e.forEach(r);function pl(e,r,t){if(Ge.arr(e)){for(let i=0;i<e.length;i++)r.call(t,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&r.call(t,e[i],i)}var Bi=e=>Ge.und(e)?[]:Ge.arr(e)?e:[e];function vp(e,r){if(e.size){const t=Array.from(e);e.clear(),Wt(t,r)}}var mp=(e,...r)=>vp(e,t=>t(...r)),gC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),yC,gT,hu=null,yT=!1,xC=mC,pj=e=>{e.to&&(gT=e.to),e.now&&(Nt.now=e.now),e.colors!==void 0&&(hu=e.colors),e.skipAnimation!=null&&(yT=e.skipAnimation),e.createStringInterpolator&&(yC=e.createStringInterpolator),e.requestAnimationFrame&&Nt.use(e.requestAnimationFrame),e.batchedUpdates&&(Nt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(xC=e.willAdvance),e.frameLoop&&(Nt.frameLoop=e.frameLoop)},gp=new Set,to=[],bC=[],qg=0,Gg={get idle(){return!gp.size&&!to.length},start(e){qg>e.priority?(gp.add(e),Nt.onStart(vj)):(xT(e),Nt(CC))},advance:CC,sort(e){if(qg)Nt.onFrame(()=>Gg.sort(e));else{const r=to.indexOf(e);~r&&(to.splice(r,1),bT(e))}},clear(){to=[],gp.clear()}};function vj(){gp.forEach(xT),gp.clear(),Nt(CC)}function xT(e){to.includes(e)||bT(e)}function bT(e){to.splice(mj(to,r=>r.priority>e.priority),0,e)}function CC(e){const r=bC;for(let t=0;t<to.length;t++){const i=to[t];qg=i.priority,i.idle||(xC(i),i.advance(e),i.idle||r.push(i))}return qg=0,bC=to,bC.length=0,to=r,to.length>0}function mj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var gj=(e,r,t)=>Math.min(Math.max(t,e),r),yj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},_o="[-+]?\\d*\\.?\\d+",Kg=_o+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var xj=new RegExp("rgb"+Wg(_o,_o,_o)),bj=new RegExp("rgba"+Wg(_o,_o,_o,_o)),Cj=new RegExp("hsl"+Wg(_o,Kg,Kg)),wj=new RegExp("hsla"+Wg(_o,Kg,Kg,_o)),_j=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Sj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ej=/^#([0-9a-fA-F]{6})$/,Dj=/^#([0-9a-fA-F]{8})$/;function Tj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=Ej.exec(e))?parseInt(r[1]+"ff",16)>>>0:hu&&hu[e]!==void 0?hu[e]:(r=xj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=bj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|_T(r[4]))>>>0:(r=_j.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=Dj.exec(e))?parseInt(r[1],16)>>>0:(r=Sj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=Cj.exec(e))?(CT(wT(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=wj.exec(e))?(CT(wT(r[1]),Qg(r[2]),Qg(r[3]))|_T(r[4]))>>>0:null}function wC(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function CT(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=wC(l,i,e+1/3),c=wC(l,i,e),p=wC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(p*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function wT(e){return(parseFloat(e)%360+360)%360/360}function _T(e){const r=parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function Qg(e){const r=parseFloat(e);return r<0?0:r>100?1:r/100}function ST(e){let r=Tj(e);if(r===null)return e;r=r||0;const t=(r&4278190080)>>>24,i=(r&16711680)>>>16,l=(r&65280)>>>8,f=(r&255)/255;return`rgba(${t}, ${i}, ${l}, ${f})`}var yp=(e,r,t)=>{if(Ge.fun(e))return e;if(Ge.arr(e))return yp({range:e,output:r,extrapolate:t});if(Ge.str(e.output[0]))return yC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",p=i.extrapolateRight||i.extrapolate||"extend",g=i.easing||(d=>d);return d=>{const m=Aj(d,f);return kj(d,f[m],f[m+1],l[m],l[m+1],g,c,p,i.map)}};function kj(e,r,t,i,l,f,c,p,g){let d=g?g(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(p==="identity")return d;p==="clamp"&&(d=t)}return i===l?i:r===t?e<=r?i:l:(r===-1/0?d=-d:t===1/0?d=d-r:d=(d-r)/(t-r),d=f(d),i===-1/0?d=-d:l===1/0?d=d+i:d=d*(l-i)+i,d)}function Aj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var Oj=(e,r="end")=>t=>{t=r==="end"?Math.min(t,.999):Math.max(t,.001);const i=t*e,l=r==="end"?Math.floor(i):Math.ceil(i);return gj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,ET=Zg+1,DT=2*Math.PI/3,TT=2*Math.PI/4.5,Jg=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Rj={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ET*e*e*e-Zg*e*e,easeOutBack:e=>1+ET*Math.pow(e-1,3)+Zg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Xg+1)*2*e-Xg)/2:(Math.pow(2*e-2,2)*((Xg+1)*(e*2-2)+Xg)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*DT),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*DT)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*TT))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*TT)/2+1,easeInBounce:e=>1-Jg(1-e),easeOutBounce:Jg,easeInOutBounce:e=>e<.5?(1-Jg(1-2*e))/2:(1+Jg(2*e-1))/2,steps:Oj},xp=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),no=e=>Boolean(e&&e[xp]),ui=e=>e&&e[xp]?e[xp]():e,kT=e=>e[bd]||null;function Fj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bp(e,r){const t=e[bd];t&&t.forEach(i=>{Fj(i,r)})}var AT=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Nj(this,e)}},Nj=(e,r)=>OT(e,xp,r);function Cd(e,r){if(e[xp]){let t=e[bd];t||OT(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Cp(e,r){const t=e[bd];if(t&&t.has(r)){const i=t.size-1;i?t.delete(r):e[bd]=null,e.observerRemoved&&e.observerRemoved(i,r)}}var OT=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,RT=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Pj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,FT=e=>{const[r,t]=Bj(e);if(!r||gC())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(i)return i.trim();if(t&&t.startsWith("--")){const l=window.getComputedStyle(document.documentElement).getPropertyValue(t);return l||e}else{if(t&&ty.test(t))return FT(t);if(t)return t}return e},Bj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},_C,Lj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,NT=e=>{_C||(_C=hu?new RegExp(`(${Object.keys(hu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>ui(f).replace(ty,FT).replace(Mj,ST).replace(_C,ST)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(p=>{if(!(c in p))throw Error('The arity of each "output" value must be equal');return p[c]})).map(f=>yp({...e,output:f}));return f=>{var g;const c=!RT.test(r[0])&&((g=r.find(d=>RT.test(d)))==null?void 0:g.replace(ey,""));let p=0;return r[0].replace(ey,()=>`${l[p++](f)}${c||""}`).replace(Pj,Lj)}},SC="react-spring: ",MT=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${SC}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},zj=MT(console.warn);function Uj(){zj(`${SC}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var jj=MT(console.warn);function Ij(){jj(`${SC}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ny(e){return Ge.str(e)&&(e[0]=="#"||/\d/.test(e)||!gC()&&ty.test(e)||e in(hu||{}))}var EC=gC()?W.useEffect:W.useLayoutEffect,Hj=()=>{const e=W.useRef(!1);return EC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function PT(){const e=W.useState()[1],r=Hj();return()=>{r.current&&e(Math.random())}}function Vj(e,r){const[t]=W.useState(()=>({inputs:r,result:e()})),i=W.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&$j(r,f.inputs))||(f={inputs:r,result:e()}):f=t,W.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function $j(e,r){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}var BT=e=>W.useEffect(e,Yj),Yj=[];function LT(e){const r=W.useRef();return W.useEffect(()=>{r.current=e}),r.current}var wp=Symbol.for("Animated:node"),qj=e=>!!e&&e[wp]===e,vl=e=>e&&e[wp],DC=(e,r)=>hj(e,wp,r),ry=e=>e&&e[wp]&&e[wp].getPayload(),zT=class{constructor(){DC(this,this)}getPayload(){return this.payload||[]}},_p=class extends zT{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ge.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _p(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return Ge.num(e)&&(this.lastPosition=e,r&&(e=Math.round(e/r)*r,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ge.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Sp=class extends _p{constructor(e){super(0),this._string=null,this._toString=yp({output:[e,e]})}static create(e){return new Sp(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ge.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=yp({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends zT{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return pl(this.source,(t,i)=>{qj(t)?r[i]=t.getValue(e):no(t)?r[i]=ui(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return pl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&no(e)&&ay.dependencies.add(e);const r=ry(e);r&&Wt(r,t=>this.add(t))}},UT=class extends iy{constructor(e){super(e)}static create(e){return new UT(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const r=this.getPayload();return e.length==r.length?r.map((t,i)=>t.setValue(e[i])).some(Boolean):(super.setValue(e.map(Gj)),!0)}};function Gj(e){return(ny(e)?Sp:_p).create(e)}function TC(e){const r=vl(e);return r?r.constructor:Ge.arr(e)?UT:ny(e)?Sp:_p}var jT=(e,r)=>{const t=!Ge.fun(e)||e.prototype&&e.prototype.isReactComponent;return W.forwardRef((i,l)=>{const f=W.useRef(null),c=t&&W.useCallback(_=>{f.current=Qj(l,_)},[l]),[p,g]=Wj(i,r),d=PT(),m=()=>{const _=f.current;if(t&&!_)return;(_?r.applyAnimatedValues(_,p.getValue(!0)):!1)===!1&&d()},C=new Kj(m,g),b=W.useRef();EC(()=>(b.current=C,Wt(g,_=>Cd(_,C)),()=>{b.current&&(Wt(b.current.deps,_=>Cp(_,b.current)),Nt.cancel(b.current.update))})),W.useEffect(m,[]),BT(()=>()=>{const _=b.current;Wt(_.deps,T=>Cp(T,_))});const x=r.getComponentProps(p.getValue());return Me.createElement(e,{...x,ref:c})})},Kj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Nt.write(this.update)}};function Wj(e,r){const t=new Set;return ay.dependencies=t,e.style&&(e={...e,style:r.createAnimatedStyle(e.style)}),e=new iy(e),ay.dependencies=null,[e,t]}function Qj(e,r){return e&&(Ge.fun(e)?e(r):e.current=r),r}var IT=Symbol.for("AnimatedComponent"),Zj=(e,{applyAnimatedValues:r=()=>!1,createAnimatedStyle:t=l=>new iy(l),getComponentProps:i=l=>l}={})=>{const l={applyAnimatedValues:r,createAnimatedStyle:t,getComponentProps:i},f=c=>{const p=HT(c)||"Anonymous";return Ge.str(c)?c=f[c]||(f[c]=jT(c,l)):c=c[IT]||(c[IT]=jT(c,l)),c.displayName=`Animated(${p})`,c};return pl(e,(c,p)=>{Ge.arr(e)&&(p=HT(c)),f[p]=f(c)}),{animated:f}},HT=e=>Ge.str(e)?e:e&&Ge.str(e.displayName)?e.displayName:Ge.fun(e)&&e.name||null;function Mc(e,...r){return Ge.fun(e)?e(...r):e}var Ep=(e,r)=>e===!0||!!(r&&e&&(Ge.fun(e)?e(r):Bi(e).includes(r))),VT=(e,r)=>Ge.obj(e)?r&&e[r]:e,$T=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Xj=e=>e,kC=(e,r=Xj)=>{let t=Jj;e.default&&e.default!==!0&&(e=e.default,t=Object.keys(e));const i={};for(const l of t){const f=r(e[l],l);Ge.und(f)||(i[l]=f)}return i},Jj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eI={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tI(e){const r={};let t=0;if(pl(e,(i,l)=>{eI[l]||(r[l]=i,t++)}),t)return r}function YT(e){const r=tI(e);if(r){const t={to:r};return pl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dp(e){return e=ui(e),Ge.arr(e)?e.map(Dp):ny(e)?wo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nI(e){for(const r in e)return!0;return!1}function AC(e){return Ge.fun(e)||Ge.arr(e)&&Ge.obj(e[0])}function rI(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function aI(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var iI={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},OC={...iI.default,mass:1,damping:1,easing:Rj.linear,clamp:!1},oI=class{constructor(){this.velocity=0,Object.assign(this,OC)}};function lI(e,r,t){t&&(t={...t},qT(t,r),r={...t,...r}),qT(e,r),Object.assign(e,r);for(const c in OC)e[c]==null&&(e[c]=OC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return Ge.und(i)||(i<.01&&(i=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/i,2)*f,e.friction=4*Math.PI*l*f/i),e}function qT(e,r){if(!Ge.und(r.decay))e.duration=void 0;else{const t=!Ge.und(r.tension)||!Ge.und(r.friction);(t||!Ge.und(r.frequency)||!Ge.und(r.damping)||!Ge.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var GT=[],sI=class{constructor(){this.changed=!1,this.values=GT,this.toValues=null,this.fromValues=GT,this.config=new oI,this.immediate=!1}};function KT(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,p)=>{let g,d,m=Ep(t.cancel??(i==null?void 0:i.cancel),r);if(m)x();else{Ge.und(t.pause)||(l.paused=Ep(t.pause,r));let _=i==null?void 0:i.pause;_!==!0&&(_=l.paused||Ep(_,r)),g=Mc(t.delay||0,r),_?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),g=d.time-Nt.now()}function b(){g>0&&!wo.skipAnimation?(l.delayed=!0,d=Nt.setTimeout(x,g),l.pauseQueue.add(C),l.timeouts.add(d)):x()}function x(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(C),l.timeouts.delete(d),e<=(l.cancelId||0)&&(m=!0);try{f.start({...t,callId:e,cancel:m},c)}catch(_){p(_)}}})}var RC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?WT(e.get()):So(e.get(),r.every(t=>t.finished)),WT=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),So=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function QT(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:p,promise:g}=t;return!f&&e===p&&!r.reset?g:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=kC(r,(E,A)=>A==="onRest"?void 0:E);let m,C;const b=new Promise((E,A)=>(m=E,C=A)),x=E=>{const A=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&So(i,!1);if(A)throw E.result=A,C(E),E},_=(E,A)=>{const k=new ZT,D=new XT;return(async()=>{if(wo.skipAnimation)throw Tp(t),D.result=So(i,!1),C(D),D;x(k);const R=Ge.obj(E)?{...E}:{...A,to:E};R.parentId=l,pl(d,(z,M)=>{Ge.und(R[M])&&(R[M]=z)});const N=await i.start(R);return x(k),t.paused&&await new Promise(z=>{t.resumeQueue.add(z)}),N})()};let T;if(wo.skipAnimation)return Tp(t),So(i,!1);try{let E;Ge.arr(e)?E=(async A=>{for(const k of A)await _(k)})(e):E=Promise.resolve(e(_,i.stop.bind(i))),await Promise.all([E.then(m),b]),T=So(i.get(),!0,!1)}catch(E){if(E instanceof ZT)T=E.result;else if(E instanceof XT)T=E.result;else throw E}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?p:void 0,t.promise=f?g:void 0)}return Ge.fun(c)&&Nt.batchedUpdates(()=>{c(T,i,i.item)}),T})()}function Tp(e,r){vp(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var ZT=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},XT=class extends Error{constructor(){super("SkipAnimationSignal")}},FC=e=>e instanceof NC,uI=1,NC=class extends AT{constructor(){super(...arguments),this.id=uI++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=vl(this);return e&&e.getValue()}to(...e){return wo.to(this,e)}interpolate(...e){return Uj(),wo.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,r=!1){bp(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bp(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),JT=1,MC=2,PC=4,BC=e=>(e[Pc]&JT)>0,pu=e=>(e[Pc]&MC)>0,kp=e=>(e[Pc]&PC)>0,ek=(e,r)=>r?e[Pc]|=MC|JT:e[Pc]&=~MC,tk=(e,r)=>r?e[Pc]|=PC:e[Pc]&=~PC,cI=class extends NC{constructor(e,r){if(super(),this.animation=new sI,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ge.und(e)||!Ge.und(r)){const t=Ge.obj(e)?{...e}:{...r,from:e};Ge.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(pu(this)||this._state.asyncTo)||kp(this)}get goal(){return ui(this.animation.to)}get velocity(){const e=vl(this);return e instanceof _p?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return BC(this)}get isAnimating(){return pu(this)}get isPaused(){return kp(this)}get isDelayed(){return this._state.delayed}advance(e){let r=!0,t=!1;const i=this.animation;let{toValues:l}=i;const{config:f}=i,c=ry(i.to);!c&&no(i.to)&&(l=Bi(ui(i.to))),i.values.forEach((d,m)=>{if(d.done)return;const C=d.constructor==Sp?1:c?c[m].lastPosition:l[m];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let _=d.elapsedTime+=e;const T=i.fromValues[m],E=d.v0!=null?d.v0:d.v0=Ge.arr(f.velocity)?f.velocity[m]:f.velocity;let A;const k=f.precision||(T==C?.005:Math.min(1,Math.abs(C-T)*.001));if(Ge.und(f.duration))if(f.decay){const D=f.decay===!0?.998:f.decay,R=Math.exp(-(1-D)*_);x=T+E/(1-D)*(1-R),b=Math.abs(d.lastPosition-x)<=k,A=E*R}else{A=d.lastVelocity==null?E:d.lastVelocity;const D=f.restVelocity||k/10,R=f.clamp?0:f.bounce,N=!Ge.und(R),z=T==C?d.v0>0:T<C;let M,I=!1;const Y=1,B=Math.ceil(e/Y);for(let P=0;P<B&&(M=Math.abs(A)>D,!(!M&&(b=Math.abs(C-x)<=k,b)));++P){N&&(I=x==C||x>C==z,I&&(A=-A*R,x=C));const U=-f.tension*1e-6*(x-C),H=-f.friction*.001*A,V=(U+H)/f.mass;A=A+V*Y,x=x+A*Y}}else{let D=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,_=d.elapsedTime+=e)),D=(f.progress||0)+_/this._memoizedDuration,D=D>1?1:D<0?0:D,d.durationProgress=D),x=T+f.easing(D)*(C-T),A=(x-d.lastPosition)/e,b=D==1}d.lastVelocity=A,Number.isNaN(x)&&(b=!0)}c&&!c[m].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const p=vl(this),g=p.getValue();if(r){const d=ui(i.to);(g!==d||t)&&!f.decay?(p.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(g),this._stop()}else t&&this._onChange(g)}set(e){return Nt.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(pu(this)){const{to:e,config:r}=this.animation;Nt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,r){let t;return Ge.und(e)?(t=this.queue||[],this.queue=[]):t=[Ge.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>RC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),Tp(this._state,e&&this._lastCallId),Nt.batchedUpdates(()=>this._stop(r,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const r=this.key||"";let{to:t,from:i}=e;t=Ge.obj(t)?t[r]:t,(t==null||AC(t))&&(t=void 0),i=Ge.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return BC(this)||(e.reverse&&([t,i]=[i,t]),i=ui(i),Ge.und(i)?vl(this)||this._set(t):this._set(i)),l}_update({...e},r){const{key:t,defaultProps:i}=this;e.default&&Object.assign(i,kC(e,(c,p)=>/^on/.test(p)?VT(c,t):c)),ak(this,e,"onProps"),Rp(this,"onProps",e,this);const l=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const f=this._state;return KT(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{kp(this)||(tk(this,!0),mp(f.pauseQueue),Rp(this,"onPause",So(this,Ap(this,this.animation.to)),this))},resume:()=>{kp(this)&&(tk(this,!1),pu(this)&&this._resume(),mp(f.resumeQueue),Rp(this,"onResume",So(this,Ap(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const p=nk(e);if(p)return this._update(p,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!Ge.und(e.to),l=!Ge.und(e.from);if(i||l)if(r.callId>this._lastToId)this._lastToId=r.callId;else return t(wd(this));const{key:f,defaultProps:c,animation:p}=this,{to:g,from:d}=p;let{to:m=g,from:C=d}=e;l&&!i&&(!r.default||Ge.und(m))&&(m=C),r.reverse&&([m,C]=[C,m]);const b=!us(C,d);b&&(p.from=C),C=ui(C);const x=!us(m,g);x&&this._focus(m);const _=AC(r.to),{config:T}=p,{decay:E,velocity:A}=T;(i||l)&&(T.velocity=0),r.config&&!_&&lI(T,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let k=vl(this);if(!k||Ge.und(m))return t(So(this,!0));const D=Ge.und(r.reset)?l&&!r.default:!Ge.und(C)&&Ep(r.reset,f),R=D?C:this.get(),N=Dp(m),z=Ge.num(N)||Ge.arr(N)||ny(N),M=!_&&(!z||Ep(c.immediate||r.immediate,f));if(x){const P=TC(m);if(P!==k.constructor)if(M)k=this._set(N);else throw Error(`Cannot animate between ${k.constructor.name} and ${P.name}, as the "to" prop suggests`)}const I=k.constructor;let Y=no(m),B=!1;if(!Y){const P=D||!BC(this)&&b;(x||P)&&(B=us(Dp(R),N),Y=!B),(!us(p.immediate,M)&&!M||!us(T.decay,E)||!us(T.velocity,A))&&(Y=!0)}if(B&&pu(this)&&(p.changed&&!D?Y=!0:Y||this._stop(g)),!_&&((Y||no(g))&&(p.values=k.getPayload(),p.toValues=no(m)?null:I==Sp?[1]:Bi(N)),p.immediate!=M&&(p.immediate=M,!M&&!D&&this._set(g)),Y)){const{onRest:P}=p;Wt(dI,H=>ak(this,r,H));const U=So(this,Ap(this,g));mp(this._pendingCalls,U),this._pendingCalls.add(t),p.changed&&Nt.batchedUpdates(()=>{var H;p.changed=!D,P==null||P(U,this),D?Mc(c.onRest,U):(H=p.onStart)==null||H.call(p,U,this)})}D&&this._set(R),_?t(QT(r.to,r,this._state,this)):Y?this._start():pu(this)&&!x?this._pendingCalls.add(t):t(WT(R))}_focus(e){const r=this.animation;e!==r.to&&(kT(this)&&this._detach(),r.to=e,kT(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;no(r)&&(Cd(r,this),FC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;no(e)&&Cp(e,this)}_set(e,r=!0){const t=ui(e);if(!Ge.und(t)){const i=vl(this);if(!i||!us(t,i.getValue())){const l=TC(t);!i||i.constructor!=l?DC(this,l.create(t)):i.setValue(t),i&&Nt.batchedUpdates(()=>{this._onChange(t,r)})}}return vl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rp(this,"onStart",So(this,Ap(this,e.to)),this))}_onChange(e,r){r||(this._onStart(),Mc(this.animation.onChange,e,this)),Mc(this.defaultProps.onChange,e,this),super._onChange(e,r)}_start(){const e=this.animation;vl(this).reset(ui(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),pu(this)||(ek(this,!0),kp(this)||this._resume())}_resume(){wo.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(pu(this)){ek(this,!1);const t=this.animation;Wt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bp(this,{type:"idle",parent:this});const i=r?wd(this.get()):So(this.get(),Ap(this,e??t.to));mp(this._pendingCalls,i),t.changed&&(t.changed=!1,Rp(this,"onRest",i,this))}}};function Ap(e,r){const t=Dp(r),i=Dp(e.get());return us(i,t)}function nk(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&YT(i),f=(l||e).reverse,c=!l||l.reset;return Op({...e,loop:r,default:!1,pause:void 0,to:!f||AC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Op(e){const{to:r,from:t}=e=YT(e),i=new Set;return Ge.obj(r)&&rk(r,i),Ge.obj(t)&&rk(t,i),e.keys=i.size?Array.from(i):null,e}function fI(e){const r=Op(e);return Ge.und(r.default)&&(r.default=kC(r)),r}function rk(e,r){pl(e,(t,i)=>t!=null&&r.add(i))}var dI=["onStart","onRest","onChange","onPause","onResume"];function ak(e,r,t){e.animation[t]=r[t]!==$T(r,t)?VT(r[t],e.key):void 0}function Rp(e,r,...t){var i,l,f,c;(l=(i=e.animation)[r])==null||l.call(i,...t),(c=(f=e.defaultProps)[r])==null||c.call(f,...t)}var hI=["onStart","onChange","onRest"],pI=1,vI=class{constructor(e,r){this.id=pI++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((r,t)=>e[t]=r.get()),e}set(e){for(const r in e){const t=e[r];Ge.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Op(e)),this}start(e){let{queue:r}=this;return e?r=Bi(e).map(Op):this.queue=[],this._flush?this._flush(this,r):(ck(this,r),LC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Wt(Bi(r),i=>t[i].stop(!!e))}else Tp(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Ge.und(e))this.start({pause:!0});else{const r=this.springs;Wt(Bi(e),t=>r[t].pause())}return this}resume(e){if(Ge.und(e))this.start({pause:!1});else{const r=this.springs;Wt(Bi(e),t=>r[t].resume())}return this}each(e){pl(this.springs,e)}_onFrame(){const{onStart:e,onChange:r,onRest:t}=this._events,i=this._active.size>0,l=this._changed.size>0;(i&&!this._started||l&&!this._started)&&(this._started=!0,vp(e,([p,g])=>{g.value=this.get(),p(g,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vp(r,([p,g])=>{g.value=c,p(g,this,this._item)}),f&&(this._started=!1,vp(t,([p,g])=>{g.value=c,p(g,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Nt.onFrame(this._onFrame)}};function LC(e,r){return Promise.all(r.map(t=>ik(e,t))).then(t=>RC(e,t))}async function ik(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:p,onResolve:g}=r,d=Ge.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const m=Ge.arr(l)||Ge.fun(l)?l:void 0;m?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Wt(hI,T=>{const E=r[T];if(Ge.fun(E)){const A=e._events[T];r[T]=({finished:k,cancelled:D})=>{const R=A.get(E);R?(k||(R.finished=!1),D&&(R.cancelled=!0)):A.set(E,{value:null,finished:k||!1,cancelled:D||!1})},d&&(d[T]=r[T])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mp(r.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(r.pause=!0);const b=(i||Object.keys(e.springs)).map(T=>e.springs[T].start(r)),x=r.cancel===!0||$T(r,"cancel")===!0;(m||x&&C.asyncId)&&b.push(KT(++e._lastAsyncId,{props:r,state:C,actions:{pause:mC,resume:mC,start(T,E){x?(Tp(C,e._lastAsyncId),E(wd(e))):(T.onRest=p,E(QT(m,T,C,e)))}}})),C.paused&&await new Promise(T=>{C.resumeQueue.add(T)});const _=RC(e,await Promise.all(b));if(c&&_.finished&&!(t&&_.noop)){const T=nk(r,c,l);if(T)return ck(e,[T]),ik(e,T,!0)}return g&&Nt.batchedUpdates(()=>g(_,e,e.item)),_}function ok(e,r){const t={...e.springs};return r&&Wt(Bi(r),i=>{Ge.und(i.keys)&&(i=Op(i)),Ge.obj(i.to)||(i={...i,to:void 0}),uk(t,i,l=>sk(l))}),lk(e,t),t}function lk(e,r){pl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function sk(e,r){const t=new cI;return t.key=e,r&&Cd(t,r),t}function uk(e,r,t){r.keys&&Wt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function ck(e,r){Wt(r,t=>{uk(e.springs,t,i=>sk(i,e))})}var oy=({children:e,...r})=>{const t=W.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Vj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Me.createElement(f,{value:r},e)},ly=mI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function mI(e,r){return Object.assign(e,Me.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var gI=()=>{const e=[],r=function(i){Ij();const l=[];return Wt(e,(f,c)=>{if(Ge.und(i))l.push(f.start());else{const p=t(i,f,c);p&&l.push(f.start(p))}}),l};r.current=e,r.add=function(i){e.includes(i)||e.push(i)},r.delete=function(i){const l=e.indexOf(i);~l&&e.splice(l,1)},r.pause=function(){return Wt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Wt(e,i=>i.resume(...arguments)),this},r.set=function(i){Wt(e,(l,f)=>{const c=Ge.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Wt(e,(f,c)=>{if(Ge.und(i))l.push(f.start());else{const p=this._getProps(i,f,c);p&&l.push(f.start(p))}}),l},r.stop=function(){return Wt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Wt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return Ge.fun(i)?i(f,l):i};return r._getProps=t,r};function yI(e,r,t){const i=Ge.fun(r)&&r;i&&!t&&(t=[]);const l=W.useMemo(()=>i||arguments.length==3?gI():void 0,[]),f=W.useRef(0),c=PT(),p=W.useMemo(()=>({ctrls:[],queue:[],flush(A,k){const D=ok(A,k);return f.current>0&&!p.queue.length&&!Object.keys(D).some(N=>!A.springs[N])?LC(A,k):new Promise(N=>{lk(A,D),p.queue.push(()=>{N(LC(A,k))}),c()})}}),[]),g=W.useRef([...p.ctrls]),d=[],m=LT(e)||0;W.useMemo(()=>{Wt(g.current.slice(e,m),A=>{rI(A,l),A.stop(!0)}),g.current.length=e,C(m,e)},[e]),W.useMemo(()=>{C(0,Math.min(m,e))},t);function C(A,k){for(let D=A;D<k;D++){const R=g.current[D]||(g.current[D]=new vI(null,p.flush)),N=i?i(D,R):r[D];N&&(d[D]=fI(N))}}const b=g.current.map((A,k)=>ok(A,d[k])),x=W.useContext(oy),_=LT(x),T=x!==_&&nI(x);EC(()=>{f.current++,p.ctrls=g.current;const{queue:A}=p;A.length&&(p.queue=[],Wt(A,k=>k())),Wt(g.current,(k,D)=>{l==null||l.add(k),T&&k.start({default:x});const R=d[D];R&&(aI(k,R.ref),k.ref?k.queue.push(R):k.start(R))})}),BT(()=>()=>{Wt(p.ctrls,A=>A.stop(!0))});const E=b.map(A=>({...A}));return l?[E,l]:E}function xI(e,r){const t=Ge.fun(e),[[i],l]=yI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var bI=class extends NC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yp(...r);const t=this._get(),i=TC(t);DC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();us(r,t)||(vl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&fk(this._active)&&zC(this)}_get(){const e=Ge.arr(this.source)?this.source.map(ui):Bi(ui(this.source));return this.calc(...e)}_start(){this.idle&&!fk(this._active)&&(this.idle=!1,Wt(ry(this),e=>{e.done=!1}),wo.skipAnimation?(Nt.batchedUpdates(()=>this.advance()),zC(this)):Gg.start(this))}_attach(){let e=1;Wt(Bi(this.source),r=>{no(r)&&Cd(r,this),FC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Wt(Bi(this.source),e=>{no(e)&&Cp(e,this)}),this._active.clear(),zC(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Bi(this.source).reduce((r,t)=>Math.max(r,(FC(t)?t.priority:0)+1),0))}};function CI(e){return e.idle!==!1}function fk(e){return!e.size||Array.from(e).every(CI)}function zC(e){e.idle||(e.idle=!0,Wt(ry(e),r=>{r.done=!0}),bp(e,{type:"idle",parent:e}))}wo.assign({createStringInterpolator:NT,to:(e,r)=>new bI(e,r)});var dk=/^--/;function wI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!dk.test(e)&&!(Fp.hasOwnProperty(e)&&Fp[e])?r+"px":(""+r).trim()}var hk={};function _I(e,r){if(!e.nodeType||!e.setAttribute)return!1;const t=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:l,children:f,scrollTop:c,scrollLeft:p,viewBox:g,...d}=r,m=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:hk[b]||(hk[b]=b.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));f!==void 0&&(e.textContent=f);for(const b in l)if(l.hasOwnProperty(b)){const x=wI(b,l[b]);dk.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,m[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),p!==void 0&&(e.scrollLeft=p),g!==void 0&&e.setAttribute("viewBox",g)}var Fp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},SI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),EI=["Webkit","Ms","Moz","O"];Fp=Object.keys(Fp).reduce((e,r)=>(EI.forEach(t=>e[SI(t,r)]=e[r]),e),Fp);var DI=/^(matrix|translate|scale|rotate|skew)/,TI=/^(translate)/,kI=/^(rotate|skew)/,UC=(e,r)=>Ge.num(e)&&e!==0?e+r:e,sy=(e,r)=>Ge.arr(e)?e.every(t=>sy(t,r)):Ge.num(e)?e===r:parseFloat(e)===r,AI=class extends iy{constructor({x:e,y:r,z:t,...i}){const l=[],f=[];(e||r||t)&&(l.push([e||0,r||0,t||0]),f.push(c=>[`translate3d(${c.map(p=>UC(p,"px")).join(",")})`,sy(c,0)])),pl(i,(c,p)=>{if(p==="transform")l.push([c||""]),f.push(g=>[g,g===""]);else if(DI.test(p)){if(delete i[p],Ge.und(c))return;const g=TI.test(p)?"px":kI.test(p)?"deg":"";l.push(Bi(c)),f.push(p==="rotate3d"?([d,m,C,b])=>[`rotate3d(${d},${m},${C},${UC(b,g)})`,sy(b,0)]:d=>[`${p}(${d.map(m=>UC(m,g)).join(",")})`,sy(d,p.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new OI(l,f)),super(i)}},OI=class extends AT{constructor(e,r){super(),this.inputs=e,this.transforms=r,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",r=!0;return Wt(this.inputs,(t,i)=>{const l=ui(t[0]),[f,c]=this.transforms[i](Ge.arr(l)?l:t.map(ui));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cp(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bp(this,e)}},RI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];wo.assign({batchedUpdates:tu.exports.unstable_batchedUpdates,createStringInterpolator:NT,colors:yj});var FI=Zj(RI,{applyAnimatedValues:_I,createAnimatedStyle:e=>new AI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),pk=FI.animated;function vk(e,r,t){let i=e;return r!==void 0&&(i=Math.max(e,r)),t!==void 0&&(i=Math.min(i,t)),i}const[mk]=wn("indicator"),NI=W.memo(e=>{var{vertical:r}=e,t=$a(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Re(mk("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Re(t.className,mk({vertical:r})),style:t.style},{children:i}))});let Np=0;function jC(e){e?(Np||document.body.classList.add("rv-toast--unclickable"),Np+=1):Np&&(Np-=1,Np||document.body.classList.remove("rv-toast--unclickable"))}function MI(e){return e===window}const gk=e=>{const r=e;if(MI(r)){const t=r.innerWidth,i=r.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}return r&&r.getBoundingClientRect?r.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};function PI(e,r,t){let i,l,f,c,p,g,d=0,m=!1,C=!1,b=!0;const x=!r&&r!==0&&typeof fd.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");r=+r||0,cd(t)&&(m=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function _(B){const P=i,U=l;return i=l=void 0,d=B,c=e.apply(U,P),c}function T(B,P){return x?(fd.cancelAnimationFrame(p),fd.requestAnimationFrame(B)):setTimeout(()=>B(),P)}function E(B){if(x)return fd.cancelAnimationFrame(B);clearTimeout(B)}function A(B){return d=B,p=T(R,r),m?_(B):c}function k(B){const P=B-g,U=B-d,H=r-P;return C?Math.min(H,f-U):H}function D(B){const P=B-g,U=B-d;return g===void 0||P>=r||P<0||C&&U>=f}function R(){const B=Date.now();if(D(B))return N(B);p=T(R,k(B))}function N(B){return p=void 0,b&&i?_(B):(i=l=void 0,c)}function z(){p!==void 0&&E(p),d=0,i=g=l=p=void 0}function M(){return p===void 0?c:N(Date.now())}function I(){return p!==void 0}function Y(...B){const P=Date.now(),U=D(P);if(i=B,l=this,g=P,U){if(p===void 0)return A(g);if(C)return p=T(R,r),_(g)}return p===void 0&&(p=T(R,r)),c}return Y.cancel=z,Y.flush=M,Y.pending=I,Y}const JZ="",[uy]=wn("toast"),BI=e=>{const r=ea(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};W.useEffect(()=>{if(!r.visible){jC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,jC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:p,loadingType:g}=r;if(f||c==="success"||c==="fail"){const m=c==="fail"?Q(J2,{}):Q(OD,{});return W.cloneElement(f||m,{className:Re(uy("icon")),fontSize:p})}return c==="loading"?Q(X2,{className:Re(uy("loading")),type:g}):null},l=()=>{const{message:f}=r;return Jr(f)&&f!==""?Q("div",Object.assign({className:Re(uy("info"))},{children:f})):null};return Be(sp,Object.assign({className:Re([uy([r.position,{[r.type]:!r.icon}]),r.className]),visible:r.visible,overlay:r.overlay,transition:r.transition,overlayClass:r.overlayClass,overlayStyle:r.overlayStyle,closeOnClickOverlay:r.closeOnClickOverlay,lockScroll:!1,onClick:t,onClose:r.onClose,onClosed:r.onClosed,onOpened:r.onOpened,teleport:r.teleport},{children:[i(),l()]}))},IC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},HC=[];let yk=!1,VC=Jh({},IC);const cy=new Map;function xk(){let e=HC.pop();for(;e;)e(),e=HC.pop()}function LI(){setTimeout(xk)}const Bc=e=>{if(!Bg())return null;const r=bk(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return aC(f).appendChild(c),qD(Q(()=>{const d=Object.assign({duration:2e3},r),[m,C]=W.useState(!1),[b,x]=W.useState(Object.assign({},d)),_=W.useCallback(()=>{b.forbidClick&&jC(!1),C(!1),window.setTimeout(()=>{GD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+IC.duration)},[c]),T=W.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=_,t.config=W.useCallback(E=>{x(A=>typeof E=="function"?Object.assign(Object.assign({},A),E(A)):Object.assign(Object.assign({},A),E))},[x]),W.useEffect(()=>(C(!0),yk||xk(),HC.push(_),b.duration!==0&&"duration"in b&&(i=window.setTimeout(T,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(BI,Object.assign({},b,{visible:m,teleport:()=>c,onClose:T,onClosed:_}))},{}),c),t};function bk(e){return cd(e)?e:{message:e}}const zI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},VC),cy.get(e)),bk(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=zI(e)}),Bc.allowMultiple=(e=!0)=>{yk=e},Bc.clear=LI;function UI(e,r){typeof e=="string"?cy.set(e,r):Jh(VC,e)}Bc.setDefaultOptions=UI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(VC=Jh({},IC),cy.clear())};const Ck=Bc;function fy(){const e=W.useRef([]),r=W.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=W.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const wk=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=W.useState(()=>{if(t!==void 0)return t;if(r!==void 0)return typeof r=="function"?r():r}),f=t!==void 0?t:i;function c(p){l(p)}return[f,c]},rX="",[jI]=wn("swiper-item"),_k=W.forwardRef((e,r)=>{const t=W.useRef(null);W.useImperativeHandle(r,()=>({self:t.current}));const[i]=oz(t,{rootMargin:"-0.1px",threshold:0,root:()=>{var l;return(l=e.trackRef)===null||l===void 0?void 0:l.current}});return Q("div",Object.assign({ref:t,className:Re(e.className,jI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=wn("swiper"),II=W.forwardRef((e,r)=>{const t=ea(e,{initialSwipe:0,loop:!0,touchable:!0,enabled:!0,rubberband:!0,autoplay:!1,slideSize:100,trackOffset:0,stuckAtBoundary:!1,preventScroll:!0}),{loop:i,autoplay:l,vertical:f,duration:c,autoHeight:p}=t,g=f?"y":"x",d=t.slideSize/100,m=t.trackOffset/100,{validChildren:C,count:b}=W.useMemo(()=>{let te=0;return{validChildren:W.Children.map(t.children,$=>W.isValidElement($)?$.type!==_k?null:(te++,$):null),count:te}},[t.children]),x=W.useRef(null),[_,T]=fy(),[E,A]=W.useState(()=>t.enabled),[k,D]=W.useState(t.initialSwipe),[R,N,z]=Q2(!1),M=W.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),I=W.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),Y=()=>{const te=x.current;return te?(f?te.offsetHeight:te.offsetWidth)*t.slideSize/100:0},B=te=>{let Z=0,$=b-1;return t.stuckAtBoundary&&(Z+=(1-d-m)/d,$-=(1-d-m)/d),vk(te,Z,$)},[{position:P},U]=xI(()=>({position:B(k)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(z.current||!I)return;const te=P.get(),Z=100*b,$=$C(te,Z);$!==te&&U.start({position:$,immediate:!0})}}),[b]),H=uj(te=>{var Z;const $=Y();if(!$||!t.preventScroll&&Sk(te.target,(Z=_[k])===null||Z===void 0?void 0:Z.self))return;const ne=f?1:0,oe=te.offset[ne],ae=te.direction[ne],se=te.velocity[ne];if(N(!0),!te.last)U.start({position:oe*100/$,immediate:!0});else{const ve=Math.round((oe+Math.min(se*2e3,$)*ae)/$);K(ve),window.setTimeout(()=>{N(!1)})}},{enabled:E,transform:([te,Z])=>[-te,-Z],from:()=>{const te=Y();return[P.get()/100*te,P.get()/100*te]},bounds:()=>{if(I)return{};const te=Y(),Z=B(0)*te,$=B(b-1)*te;return f?{top:Z,bottom:$}:{left:Z,right:$}},rubberband:t.rubberband,axis:g,preventScroll:g==="x"?t.preventScroll:!1,pointer:{touch:!0}}),V=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Re(Lc("indicator",{vertical:f}))},{children:Q(NI,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:k}))})):typeof t.indicator=="function"?t.indicator(b,k):null;function K(te,Z=!1){const $=Math.round(te),ne=I?$C($,b):vk($,0,b-1);D(ne),U.start({position:(I?$:B($))*100,immediate:Z})}const ee=()=>{K(Math.round(P.get()/100)+1)},J=()=>{K(Math.round(P.get()/100)-1)};W.useImperativeHandle(r,()=>({activeIndex:k,swipeTo:K,swipeNext:ee,swipePrev:J,enable:()=>{A(!0)},disable:()=>{A(!1)}})),tp(()=>{const te=C.length-1;k>te&&K(te,!0)}),Rc(()=>{var te;(te=t.onChange)===null||te===void 0||te.call(t,k)},[k]),W.useEffect(()=>{if(!l||R)return Mi;const te=typeof l=="boolean"?5e3:l,Z=window.setInterval(()=>{ee()},te);return()=>{window.clearInterval(Z)}},[l,R]);const q=()=>I?Q("div",Object.assign({className:Re(Lc("track-inner",{vertical:f}))},{children:W.Children.map(C,(te,Z)=>Q(pk.div,Object.assign({className:Re(Lc("slide")),style:{[g]:P.to($=>{let ne=-$+Z*100;const oe=b*100,ae=oe/2;return ne=$C(ne+ae,oe)-ae,`${ne}%`}),[f?"top":"left"]:`-${Z*100}%`}},{children:W.cloneElement(te,{ref:T(Z),autoHeight:p,trackRef:x})})))})):Q(pk.div,Object.assign({className:Re(Lc("track-inner")),style:{[g]:P.to(te=>`${-te}%`)}},{children:W.Children.map(C,(te,Z)=>Q("div",Object.assign({className:Re(Lc("slide"))},{children:W.cloneElement(te,{ref:T(Z),autoHeight:p})})))}));return b===0&&void 0,Be("div",Object.assign({className:Re(t.className,Lc({vertical:f})),style:M},{children:[Q("div",Object.assign({ref:x,className:Re(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:te=>{z.current&&te.stopPropagation()}},t.touchable?H():{},{children:q()})),V()]}))});function $C(e,r){const t=e%r;return t<0?t+r:t}function Sk(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?Sk(e.parentElement,r):!1:!1}const Ek=Object.assign(II,{Item:_k}),HI=e=>{const r=ea(e,{shape:"round",bindGroup:!0}),t=W.useRef(null),i=m=>r.parent&&r.bindGroup?r.parent.props[m]:null,l=W.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=W.useMemo(()=>i("direction")||null,[r.parent]),c=W.useMemo(()=>{const m=r.checkedColor||i("checkedColor");return m&&r.checked&&!l?{borderColor:m,backgroundColor:m}:{}},[r.checkedColor,r.checked,l]),p=m=>{const{target:C}=m,b=t.current,x=b===C||(b==null?void 0:b.contains(C));!l&&(x||!r.labelDisabled)&&r.onToggle&&r.onToggle(),r.onClick&&r.onClick(m)},g=()=>{const{bem:m,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Re(m("icon",[C,{disabled:l,checked:b}])),style:{fontSize:dl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(OD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Be("div",Object.assign({role:r.role,className:Re(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:p},{children:[r.labelPosition==="left"&&d(),g(),r.labelPosition!=="left"&&d()]}))},sX="";function VI(e){return[e.getFullYear(),e.getMonth()+1]}function YC(e,r){const t=e.getFullYear(),i=r.getFullYear();if(t===i){const l=e.getMonth(),f=r.getMonth();return l===f?0:l>f?1:-1}return t>i?1:-1}function ml(e,r){const t=YC(e,r);if(t===0){const i=e.getDate(),l=r.getDate();return i===l?0:i>l?1:-1}return t}const dy=e=>new Date(e),Dk=e=>Array.isArray(e)?e.map(dy):dy(e);function qC(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const Tk=e=>qC(e,-1),kk=e=>qC(e,1),GC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function $I(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function Ak(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function YI(e){if(!e)return 0;for(;pD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function KC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mp]=wn("calendar"),qI=e=>{const r=ea(e,{offset:0}),t=W.useMemo(()=>{const{item:d,index:m,color:C,offset:b,rowHeight:x}=r,_={height:x};if(d.type==="placeholder")return _.width="100%",_;if(m===0&&(_.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":_.background=C;break;case"middle":_.color=C;break}return _},[r.item,r.index,r.color,r.offset,r.rowHeight]),i=()=>{var d;r.item.type!=="disabled"&&((d=r.onClick)===null||d===void 0||d.call(r,r.item))},l=()=>{const{topInfo:d}=r.item;return d||r.topInfoRender?Q("div",Object.assign({className:Re(Mp("top-info"))},{children:r.topInfoRender?r.topInfoRender(r.item):d})):null},f=()=>{const{bottomInfo:d}=r.item;return d||r.bottomInfoRender?Q("div",Object.assign({className:Re(Mp("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:m,rowHeight:C}=r,{type:b,text:x}=d,_=Be(en,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Re(Mp("selected-day")),style:{width:C,height:C,background:m}},{children:_})):_},{type:p,className:g}=r.item;return p==="placeholder"?Q("div",{className:Re(Mp("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Re(Mp("day",p),g),tabIndex:p==="disabled"?void 0:-1,onClick:i},{children:c()}))},[hy]=wn("calendar"),GI=W.forwardRef((e,r)=>{const[t,i]=W.useState(),l=W.useRef(),[f,c]=W.useState(),p=W.useRef(0),{locale:g}=W.useContext(vd);W.useEffect(()=>{f&&(p.current=gk(f).height)},[f]);const d=W.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):g.vanCalendar.monthTitle(...VI(e.date)),[e.date,e.formatMonthTitle]),m=W.useMemo(()=>dl(e.rowHeight),[e.rowHeight]),C=W.useMemo(()=>{const B=e.date.getDay();return e.firstDayOfWeek?(B+7-e.firstDayOfWeek)%7:B},[e.date,e.firstDayOfWeek]),b=W.useMemo(()=>KC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=W.useMemo(()=>t||!e.lazyRender,[t]),_=()=>d,T=B=>{const P=e.showSubtitle?l.current:f,U=(P==null?void 0:P.getBoundingClientRect().top)-B.getBoundingClientRect().top+B.scrollTop;fD(B,U)},E=B=>{const P=U=>e.currentDate.some(H=>ml(H,U)===0);if(P(B)){const U=Tk(B),H=kk(B),V=P(U),K=P(H);return V&&K?"multiple-middle":V?"end":K?"start":"multiple-selected"}return""},A=B=>{const[P,U]=e.currentDate;if(!P)return"";const H=ml(B,P);if(!U)return H===0?"start":"";const V=ml(B,U);return e.allowSameDay&&H===0&&V===0?"start-end":H===0?"start":V===0?"end":H>0&&V<0?"middle":""},k=B=>{const{type:P,minDate:U,maxDate:H,currentDate:V}=e;if(ml(B,U)<0||ml(B,H)>0)return"disabled";if(V===null)return"";if(Array.isArray(V)){if(P==="multiple")return E(B);if(P==="range")return A(B)}else if(P==="single")return ml(B,V)===0?"selected":"";return""},D=B=>{if(e.type==="range"){if(B==="start")return g.vanCalendar.start;if(B==="end")return g.vanCalendar.end;if(B==="start-end")return g.vanCalendar.startEnd}return null},R=()=>e.showMonthTitle?Q("div",Object.assign({className:Re(hy("month-title"))},{children:d})):null,N=()=>e.showMark&&x?Q("div",Object.assign({className:Re(hy("month-mark"))},{children:e.date.getMonth()+1})):null,z=W.useMemo(()=>{const B=Math.ceil((b+C)/7);return Array(B).fill({type:"placeholder"})},[b,C]),M=W.useMemo(()=>{const B=[],P=e.date.getFullYear(),U=e.date.getMonth();for(let H=1;H<=b;H++){const V=new Date(P,U,H),K=k(V);let ee={date:V,type:K,text:H,bottomInfo:D(K)};e.formatter&&(ee=e.formatter(ee)),B.push(ee)}return B},[k,e.date,e.formatter]),I=(B,P)=>Q(qI,{item:B,index:P,color:e.color,offset:C,rowHeight:m,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},P),Y=()=>Be("div",Object.assign({ref:l,role:"grid",className:Re(hy("days"))},{children:[N(),(x?M:z).map(I)]}));return W.useImperativeHandle(r,()=>({getTitle:_,getHeight:()=>p.current,setVisible:i,scrollIntoView:T})),Be("div",Object.assign({className:Re(hy("month")),ref:c},{children:[R(),Y()]}))}),[Pp]=wn("calendar"),KI=e=>{const{locale:r}=W.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Re(Pp("header-title"))},{children:c}))}return null},i=c=>{var p;(p=e.onClickSubtitle)===null||p===void 0||p.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Re(Pp("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:p}=e,g=r.vanCalendar.weekdays,d=c?g.map((C,b)=>c[b]||C):g,m=[...d.slice(p,7),...d.slice(0,p)];return Q("div",Object.assign({className:Re(Pp("weekdays"))},{children:m.map((C,b)=>Q("span",Object.assign({className:Re(Pp("weekday"))},{children:C}),b))}))};return Be("div",Object.assign({className:Re(Pp("header"))},{children:[t(),l(),f()]}))},[_d]=wn("calendar"),WI=GC(),QI=(()=>{const e=GC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),Ok=W.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=$a(e,["className","style"]);const c=ea(f,{round:!0,poppable:!0,showMark:!0,showTitle:!0,showConfirm:!0,showSubtitle:!0,closeOnPopstate:!0,closeOnClickOverlay:!0,safeAreaInsetBottom:!0,defaultValue:null,type:"single",position:"bottom",maxRange:null,minDate:WI,maxDate:QI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:p}=W.useContext(vd),[g,d]=np({value:c.visible,defaultValue:!1,onChange:$=>{var ne;$===!1&&((ne=c.onClose)===null||ne===void 0||ne.call(c))}}),m=($,ne=c.minDate,oe=c.maxDate)=>ml($,ne)===-1?ne:ml($,oe)===1?oe:$,C=($=c.defaultValue)=>{const{type:ne,minDate:oe,maxDate:ae}=c;if($===null)return $;const se=GC();if(ne==="range"){Array.isArray($)||($=[]);const ve=m($[0]||se,oe,Tk(ae)),we=m($[1]||se,kk(oe));return[ve,we]}return ne==="multiple"?Array.isArray($)?$.map(ve=>m(ve)):[m(se)]:((!$||Array.isArray($))&&($=se),m($))},b=W.useRef(),x=W.useRef(0),[_,T]=W.useState(C(c.value===void 0?c.defaultValue:c.value)),[E,A]=yD({subtitle:"",currentDate:_});Rc(()=>{c.value!==void 0&&JSON.stringify(_)!==JSON.stringify(c.value)&&T(c.value)},[c.value]),W.useEffect(()=>{JSON.stringify(E.currentDate)!==JSON.stringify(_)&&A({currentDate:_})},[_]);const[k,D]=fy(),R=W.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),N=W.useMemo(()=>{const $=[],ne=new Date(c.minDate);ne.setDate(1);do $.push(new Date(ne)),ne.setMonth(ne.getMonth()+1);while(YC(ne,c.maxDate)!==1);return $},[c.minDate,c.maxDate]),z=W.useMemo(()=>{const{currentDate:$}=E;if($){if(c.type==="range")return!$[0]||!$[1];if(c.type==="multiple")return!$.length}return!$},[c.type,E.currentDate]),M=()=>{var $;const ne=GL(b.current),oe=ne+x.current,ae=N.map((ye,De)=>k[De].getHeight()),se=ae.reduce((ye,De)=>ye+De,0);if(oe>se&&ne>0)return;let ve=0,we;const ce=[-1,-1];for(let ye=0;ye<N.length;ye++){const De=k[ye];ve<=oe&&ve+ae[ye]>=ne&&(ce[1]=ye,we||(we=De,ce[0]=ye),k[ye].showed||(k[ye].showed=!0,($=c.onMonthShow)===null||$===void 0||$.call(c,{date:De.date,title:De.getTitle()}))),ve+=ae[ye]}N.forEach((ye,De)=>{const Pe=De>=ce[0]-1&&De<=ce[1]+1;k[De].setVisible(Pe)}),we&&we.getTitle()!==E.subtitle&&!c.horizontal&&A({subtitle:we.getTitle()})},I=$=>{G2(()=>{N.some((ne,oe)=>YC(ne,$)===0?(b.current&&k[oe].scrollIntoView(b.current),!0):!1),M()})},Y=()=>{if(c.poppable&&!g)return;const{currentDate:$}=E;if($){const ne=c.type==="single"?$:$[0];I(ne)}else G2(M)},B=()=>{G2(()=>{x.current=Math.floor(gk(b.current).height),Y()})},P=($=C())=>{A({currentDate:$}),Y()},U=$=>{var ne;const{maxRange:oe,rangePrompt:ae,showRangePrompt:se}=c;return oe&&$I($)>oe?(se&&Ck.info(ae||p.vanCalendar.rangePrompt(+oe)),(ne=c.onOverRange)===null||ne===void 0||ne.call(c),!1):!0},H=()=>{var $;const ne=Dk(E.currentDate);c.poppable&&T(ne),($=c.onConfirm)===null||$===void 0||$.call(c,ne),Z.close()},V=($,ne)=>{const oe=ae=>{var se;E.currentDate=ae,A({currentDate:ae}),(se=c.onSelect)===null||se===void 0||se.call(c,Dk(E.currentDate))};if(ne&&c.type==="range"&&!U($)){c.showConfirm?oe([$[0],qC($[0],+c.maxRange-1)]):oe($);return}oe($),ne&&!c.showConfirm&&H()},K=$=>{var ne;if(c.readOnly||!$.date)return;const{date:oe}=$,{type:ae}=c,{currentDate:se}=E;if(ae==="range"){if(!se){V([oe]);return}const[ve,we]=se;if(ve&&!we){const ce=ml(oe,ve);ce===1?V([ve,oe],!0):ce===-1?V([oe]):c.allowSameDay&&V([oe,oe],!0)}else V([oe])}else if(ae==="multiple"){if(!se){V([oe]);return}let ve;if(E.currentDate.some((ce,ye)=>{const De=ml(ce,oe)===0;return De&&(ve=ye),De})){const[ce]=se.splice(ve,1);(ne=c.onUnselect)===null||ne===void 0||ne.call(c,dy(ce)),V([...se])}else c.maxRange&&se.length>=c.maxRange?Ck(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):V([...se,oe])}else V(oe,!0)},ee=($,ne)=>{const oe=!c.horizontal&&(ne!==0||!c.showSubtitle);return Q(GI,Object.assign({ref:D(ne),date:$,currentDate:E.currentDate,showMonthTitle:oe,firstDayOfWeek:R},sD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:K}),ne)},J=()=>{if(c.footer)return c.footer;if(c.showConfirm){const $=z?c.confirmDisabledText:c.confirmText;return Q(ip,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Re(_d("confirm")),disabled:z,nativeType:"button",onClick:H},{children:$||p.vanCalendar.confirm}))}return null},q=()=>Q("div",Object.assign({className:Re(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:J()})),te=()=>Be("div",Object.assign({className:Re(i,_d()),style:l},{children:[Q(KI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||E.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:R,onClickSubtitle:$=>{var ne;(ne=c.onClickSubtitle)===null||ne===void 0||ne.call(c,$)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Re(_d("horizontal-body"))},{children:Q(Ek,Object.assign({indicator:()=>null,onChange:$=>{A({subtitle:k[$].getTitle()})}},{children:N.map(($,ne)=>Q(Ek.Item,{children:ee($,ne)},$))}))})):Q("div",Object.assign({ref:b,className:Re(_d("body")),onScroll:M},{children:N.map(ee)})),q()]})),Z={toggle:()=>{c.poppable&&d($=>!$)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return W.useEffect(()=>{c.poppable||B()},[]),W.useEffect(()=>{c.poppable&&g&&B()},[g]),Rc(()=>{P(C(E.currentDate))},[c.type,c.minDate,c.maxDate]),W.useImperativeHandle(r,()=>Object.assign({reset:P,scrollToDate:I},Z)),c.poppable?Be(en,{children:[Q(sp,Object.assign({visible:g,className:Re(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:Z.close,onClosed:()=>{var $;c.poppable&&JSON.stringify(E.currentDate)!==JSON.stringify(_)&&A({currentDate:_}),($=c.onClosed)===null||$===void 0||$.call(c)}},{children:te()})),(t=c.children)===null||t===void 0?void 0:t.call(c,_,Z)]}):te()});function ZI(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=xD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=W.useMemo(()=>PI((...c)=>i.current(...c),l,r),[]);return bD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function XI(e,r,t){const[i,l]=W.useState({}),{run:f}=ZI(()=>{l({})},t);W.useEffect(()=>f(),r),Rc(e,[i])}const hX="",Rk=W.createContext({}),[JI]=wn("checkbox-group"),eH=W.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=wk({value:e.value,defaultValue:e.defaultValue}),c=(g={})=>{typeof g=="boolean"&&(g={checked:g});const{checked:d,skipDisabled:m}=g,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&m?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},p=g=>{var d;f(g),(d=e.onChange)===null||d===void 0||d.call(e,g)};return W.useImperativeHandle(r,()=>({toggleAll:c})),Q(Rk.Provider,Object.assign({value:{parent:{props:e},toggle:p,checked:l||[]}},{children:Q("div",Object.assign({className:Re(e.className,JI([e.direction]))},{children:W.Children.toArray(e.children).filter(Boolean).map((g,d)=>{var m;return((m=g.type)===null||m===void 0?void 0:m.displayName)!=="Checkbox"?g:W.cloneElement(g,{ref:i(d)})})}))}))}),[tH]=wn("checkbox"),Fk=W.forwardRef((e,r)=>{const t=ea(e,{bindGroup:!0}),i=W.useContext(Rk),{parent:l}=i,f=$a(i,["parent"]),[c,p]=wk({value:t.checked,defaultValue:t.defaultChecked}),g=C=>{const{name:b}=t,{max:x}=l.props,_=f.checked.slice();if(C)!(x&&_.length>=x)&&_.indexOf(b)===-1&&(_.push(b),t.bindGroup&&f.toggle(_));else{const T=_.indexOf(b);T!==-1&&(_.splice(T,1),t.bindGroup&&f.toggle(_))}},d=W.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),m=(C=!d)=>{var b;l&&t.bindGroup?g(C):(p(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return W.useImperativeHandle(r,()=>({toggle:m,checked:d,props:t})),Q(HI,Object.assign({},t,{bem:tH,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:m}))});Fk.displayName="Checkbox";const Nk=Object.assign(Fk,{Group:eH}),gX="",Mk=200,Pk=300,nH=15;function rH(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[WC]=wn("picker-column"),aH=W.memo(W.forwardRef((e,r)=>{const{locale:t}=W.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:p,value:g}=e,d=W.useMemo(()=>vD(f),[f]),m=W.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:p?[{[i]:void 0,[l]:p===!0?t.vanPicker.select:p},...e.options]:e.options,[e.options]),C=W.useRef(null),b=W.useRef(!1),x=W.useRef(0),_=W.useRef(null),T=W.useRef(0),E=W.useRef(0),[A,k,D]=yD({offset:0,duration:0}),R=_D(),N=W.useMemo(()=>d*(+c-1)/2,[d,c]),z=q=>{var te,Z;q=ep(q,0,m.length);for(let $=q;$<m.length;$+=1)if(!(!((te=m[$])===null||te===void 0)&&te.disabled))return $;for(let $=q-1;$>=0;$-=1)if(!(!((Z=m[$])===null||Z===void 0)&&Z.disabled))return $;return null},M=q=>{e.onSelect(q,e.index)},I=q=>{q=z(q)||0;const te=-q*d,Z=()=>{var $;(($=m[q])===null||$===void 0?void 0:$[i])!==g&&M(m[q])};b.current&&te!==D.current.offset?_.current=Z:Z(),k({offset:te})},Y=q=>{q=z(q)||0;const te=-q*d;k({offset:te})};tp(()=>{if(m.length===0)g!==void 0&&M(void 0);else{let q=m.findIndex(te=>te[i]===g);q<0&&(q=0,M(m[0])),Y(q)}},[g,JSON.stringify(m)]);const B=q=>{b.current||e.readOnly||(_.current=null,k({duration:Mk}),I(q))},P=q=>ep(Math.round(-q/d),0,m.length-1),U=(q,te)=>{const Z=Math.abs(q/te);q=D.current.offset+Z/.003*(q<0?-1:1);const $=P(q);k({duration:+e.swipeDuration}),I($)},H=()=>{b.current=!1,k({duration:0}),_.current&&(_.current(),_.current=null)},V=q=>{if(e.readOnly)return;R.start(q);let{offset:te}=A;if(b.current){const Z=rH(C.current);te=Math.min(0,Z-N),x.current=te}else x.current=te;k({duration:0,offset:te}),T.current=Date.now(),E.current=x.current,_.current=null},K=q=>{if(e.readOnly)return;R.move(q),R.isVertical()&&(b.current=!0);const te=ep(x.current+R.deltaY.current,-(m.length*d),d);k({offset:te});const Z=Date.now();Z-T.current>Pk&&(T.current=Z,E.current=te)},ee=()=>{if(e.readOnly||!b.current)return;const q=D.current.offset-E.current,te=Date.now()-T.current;if(te<Pk&&Math.abs(q)>nH){U(q,te);return}const $=P(D.current.offset);k({duration:Mk}),I($),setTimeout(()=>{b.current=!1},0)},J=()=>{const q={height:`${e.itemHeight}px`};return m.map((te,Z)=>{const{disabled:$}=te,ne={role:"button",style:q,tabIndex:$?-1:0,className:Re(WC("item",{disabled:$,selected:te[i]===g})),onClick:()=>{B(Z)}},oe={className:"rv-ellipsis",children:te[l]};return W.createElement("li",Object.assign({},ne,{key:Z}),e.optionRender?e.optionRender(te):Q("div",Object.assign({},oe)))})};return W.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Re(WC(),e.className),onTouchStart:V,onTouchMove:K,onTouchEnd:ee,onTouchCancel:ee},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${A.offset+N}px, 0)`,transitionDuration:`${A.duration}ms`,transitionProperty:A.duration?"all":"none"},className:Re(WC("wrapper")),onTransitionEnd:H},{children:J()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function iH(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=W.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const g=e[0]||{};return typeof g=="object"?l in g?"cascade":"object":"plain"},[e,l]),c=W.useMemo(()=>{let p=0;function g(d,m){m>p&&(p=m);const C=m+1;d.forEach(b=>{b[l]&&g(b[l],C)})}return g(e,1),p},[e,l]);return f!=="cascade"?e:p=>{const g=[];let d=e,m=0;for(;;){g.push(d.map(x=>{var _;return{[t]:x[t],[i]:(_=x[i])!==null&&_!==void 0?_:x[t]}}));const C=p[m],b=d.find(x=>{var _;return((_=x[i])!==null&&_!==void 0?_:x[t])===C});if(!b||!b[l])break;d=b[l],m++}for(;m<c-1;)g.push([]),m++;return g}}function QC(e){let r=null;return()=>(r===null&&(r=e()),r)}function oH(e,r,t){const{textKey:i,valueKey:l}=r,f=QC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(m=>m.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=QC(()=>t.map((d,m)=>{var C;const b=f()[m];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),p=QC(()=>t.map((d,m)=>{var C;const b=f()[m];return b&&(C=b.findIndex(x=>x[l]===d))!==null&&C!==void 0?C:null}));return{get columns(){return f()},get items(){return c()},get indexes(){return p()}}}function Bk(e,r,t){const i=iH(e,r);return W.useMemo(()=>oH(i,r,t),[e,r,t])}const[cs]=wn("picker");function lH(e){const{locale:r}=W.useContext(vd),t=W.useRef(null),[i,l]=fy(),{text:f,value:c,children:p}=Jh({text:"text",value:"value",children:"children"},e.columnsFieldNames),[g,d]=W.useState(e.value);W.useEffect(()=>{e.value!==void 0&&JSON.stringify(g)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const m=Bk(e.columns,{textKey:f,valueKey:c,childrenKey:p},g),{columns:C,items:b,indexes:x}=m;XI(()=>{var I;JSON.stringify(e.value)!==JSON.stringify(g)&&((I=e.onChange)===null||I===void 0||I.call(e,g,b,x))},[g],{wait:100,leading:!1,trailing:!0});const _=W.useMemo(()=>vD(e.itemHeight),[e.itemHeight]),T=(I,Y)=>{d(B=>{const P=[...B];return P[Y]=I==null?void 0:I[c],P})},E=()=>{var I;i.forEach(Y=>Y.stopMomentum()),(I=e.onConfirm)===null||I===void 0||I.call(e,g,b,x)},A=()=>{var I;(I=e.onCancel)===null||I===void 0||I.call(e)},k=()=>e.title?Q("div",Object.assign({className:Re(cs("title"),"rv-ellipsis")},{children:e.title})):null,D=()=>{const I=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Re(cs("cancel")),onClick:A},{children:I}))},R=()=>{const I=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Re(cs("confirm")),onClick:E},{children:I}))},N=()=>e.showToolbar?Q("div",Object.assign({className:Re(cs("toolbar"))},{children:e.toolbar||Be(en,{children:[D(),k(),R()]})})):null,z=()=>C.map((I,Y)=>{const B=Array.isArray(e.placeholder)?e.placeholder[Y]:e.placeholder;return Q(aH,{textKey:f,valueKey:c,ref:l(Y),placeholder:B,optionRender:e.optionRender,readOnly:e.readOnly,value:g[Y],itemHeight:_,index:Y,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:I,onSelect:T},Y)}),M=()=>{const I=_*e.visibleItemCount,Y={height:`${_}px`},B={height:`${I}px`},P={backgroundSize:`100% ${(I-_)/2}px`};return Be("div",Object.assign({ref:t,className:Re(cs("columns")),style:B},{children:[z(),Q("div",{className:Re(cs("mask")),style:P}),Q("div",{className:Re(wz,cs("frame")),style:Y})]}))};return W2("touchmove",q2,{target:t.current}),Be("div",Object.assign({className:Re(cs(),e.className)},{children:[e.toolbarPosition==="top"?N():null,e.loading?Q(X2,{className:Re(cs("loading"))}):null,e.columnsTop,M(),e.columnsBottom,e.toolbarPosition==="bottom"?N():null]}))}function sH(e,r){const t=ea(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,p=$a(t,["visible","popup","children","defaultValue"]),[g,d]=np({value:i,defaultValue:!1,onChange:U=>{var H;U===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),m={toggle:()=>{l&&d(U=>!U)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};W.useImperativeHandle(r,()=>m);const C=Array.isArray(t.value)?t.value:t.value!==void 0?[t.value]:void 0,b=Array.isArray(c)?c:c!==void 0?[c]:[],{text:x,value:_,children:T}=Jh({text:"text",value:"value",children:"children"},t.columnsFieldNames),E=W.useMemo(()=>{const U=t.columns[0]||{};return!(Array.isArray(U)||typeof U=="object"&&T in U)},[t.columns,T]),A=U=>E?U==null?void 0:U[0]:U,[k,D]=np({value:C,defaultValue:b}),R=Bk(t.columns,{textKey:x,valueKey:_,childrenKey:T},k),[N,z]=W.useState(k);W.useEffect(()=>{l&&JSON.stringify(N)!==JSON.stringify(k)&&z(k)},[g]),W.useEffect(()=>{!l&&JSON.stringify(N)!==JSON.stringify(k)&&z(k)},[k]);const M=(U,H,V)=>{var K;D(N,!0),(K=t.onConfirm)===null||K===void 0||K.call(t,A(U),A(H),A(V)),l&&m.close()},I=()=>{var U;(U=t.onCancel)===null||U===void 0||U.call(t),l&&m.close()},Y=DD((U,H,V)=>{var K,ee;z(U),l?g&&((K=t.onChange)===null||K===void 0||K.call(t,A(U),A(H),A(V))):(ee=t.onChange)===null||ee===void 0||ee.call(t,A(U),A(H),A(V))}),B=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},P=Q(lH,Object.assign({},p,{value:N,onCancel:I,onConfirm:M,onChange:Y}));return l?Be(en,{children:[Q(sp,Object.assign({round:!0,position:"bottom",visible:g,closeOnClickOverlay:!0,onClickOverlay:()=>{B!=null&&B.closeOnClickOverlay&&d(!1)}},B,{children:P})),f==null?void 0:f(A(k),A(R.items),m)]}):P}const ZC=W.forwardRef(sH);function uH(e){return Object.prototype.toString.call(e)==="[object Date]"&&!pD(e.getTime())}const cH=W.forwardRef((e,r)=>{const t=ea(e,{type:"datetime",placeholder:!1,minDate:fH,maxDate:dH,formatter:(M,I)=>I}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:p,filter:g,minDate:d,maxDate:m}=t,C=$a(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=M=>(uH(M)||(M=new Date),M=Math.max(M,d.getTime()),M=Math.min(M,m.getTime()),new Date(M)),[x,_,T]=Q2(()=>b(i||l)),E=(M,I)=>{const Y=t[`${M}Date`],B=Y.getFullYear();let P=1,U=1,H=0,V=0;return M==="max"&&(P=12,U=KC(I.getFullYear(),I.getMonth()+1),H=23,V=59),I.getFullYear()===B&&(P=Y.getMonth()+1,I.getMonth()+1===P&&(U=Y.getDate(),I.getDate()===U&&(H=Y.getHours(),I.getHours()===H&&(V=Y.getMinutes())))),{[`${M}Year`]:B,[`${M}Month`]:P,[`${M}Date`]:U,[`${M}Hour`]:H,[`${M}Minute`]:V}},A=W.useMemo(()=>{const{maxYear:M,maxDate:I,maxMonth:Y,maxHour:B,maxMinute:P}=E("max",T.current),{minYear:U,minDate:H,minMonth:V,minHour:K,minMinute:ee}=E("min",T.current);let J=[{type:"year",range:[U,M]},{type:"month",range:[V,Y]},{type:"day",range:[H,I]},{type:"hour",range:[K,B]},{type:"minute",range:[ee,P]}];switch(p){case"date":J=J.slice(0,3);break;case"year-month":J=J.slice(0,2);break;case"month-day":J=J.slice(1,3);break;case"datehour":J=J.slice(0,4);break}if(c){const q=c.concat(J.map(te=>te.type));J.sort((te,Z)=>q.indexOf(te.type)-q.indexOf(Z.type))}return J.map(({type:q,range:te})=>{let Z=Ak(te[1]-te[0]+1,$=>hl(te[0]+$));return g&&(Z=g(q,Z)),{type:q,values:Z}})},[c,T.current,d,m]),k=W.useMemo(()=>A.map(M=>M.values.map(I=>f(M.type,I))),[A,f]),D=W.useMemo(()=>{const M=t.popup?b(T.current):T.current;return A.map(Y=>{switch(Y.type){case"year":return f("year",`${M.getFullYear()}`);case"month":return f("month",hl(M.getMonth()+1));case"day":return f("day",hl(M.getDate()));case"hour":return f("hour",hl(M.getHours()));case"minute":return f("minute",hl(M.getMinutes()));default:return""}})},[t.value,T.current,b]),R=M=>{const{type:I}=t,Y=ee=>{let J=0;A.forEach((te,Z)=>{ee===te.type&&(J=Z)});const{values:q}=A[J];return YI(q[M[J]])};let B=null,P=null,U=null;I==="month-day"?(B=(x||d).getFullYear(),P=Y("month"),U=Y("day")):(B=Y("year"),P=Y("month"),U=I==="year-month"?1:Y("day"));const H=KC(B,P);U=U>H?H:U;let V=0,K=0;return I==="datehour"&&(V=+Y("hour")),I==="datetime"&&(V=+Y("hour"),K=+Y("minute")),b(new Date(B,P-1,U,V,K))},N=(M,I,Y)=>{var B;const P=R(Y);_(P),(B=t.onChange)===null||B===void 0||B.call(t,P)},z=()=>{var M;(M=t.onConfirm)===null||M===void 0||M.call(t,x)};return Rc(()=>{const M=b(i);M&&M.valueOf()!==(x==null?void 0:x.valueOf())&&_(M)},[i,g,d,m]),Q(ZC,Object.assign({},C,{value:D,ref:r,columns:k,onChange:N,onConfirm:z,onCancel:t.onCancel},{children:(M,I,Y)=>{var B;return(B=t.children)===null||B===void 0?void 0:B.call(t,i||l,I,Y)}}))}),Lk=new Date().getFullYear(),fH=new Date(Lk-10,0,1),dH=new Date(Lk+10,11,31),hH=cH,pH=W.forwardRef((e,r)=>{const t=ea(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(z,M)=>M}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:p,maxHour:g,minMinute:d,maxMinute:m}=t,C=$a(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=z=>{z||(z=`${hl(p)}:${hl(d)}`);let[M,I]=z.split(":");return M=hl(ep(M,+p,+g)),I=hl(ep(I,+d,+m)),`${M}:${I}`},[x,_]=W.useState(()=>b(i===void 0?l:i)),T=W.useMemo(()=>[{type:"hour",range:[+p,+g]},{type:"minute",range:[+d,+m]}],[p,g,d,m]),E=W.useMemo(()=>T.map(({type:z,range:M})=>{let I=Ak(M[1]-M[0]+1,Y=>hl(M[0]+Y));return c&&(I=c(z,I)),{type:z,values:I}}),[T]),A=W.useMemo(()=>E.map(z=>z.values.map(M=>f(z.type,M))),[E]),k=W.useMemo(()=>{const z=(t.popup?b(t.value):x).split(":");return[f("hour",z[0]),f("minute",z[1])]},[t.value,x,b]),D=()=>{var z;(z=t.onConfirm)===null||z===void 0||z.call(t,x)},R=()=>{var z;(z=t.onCancel)===null||z===void 0||z.call(t)},N=z=>{var M;const I=b(z.join(":"));_(I),(M=t.onChange)===null||M===void 0||M.call(t,I)};return Rc(()=>{const z=b(x);_(z)},[c,p,g,d,m]),Rc(()=>{const z=b(i);z!==x&&_(z)},[i]),Q(ZC,Object.assign({},C,{ref:r,columns:A,value:k,onChange:N,onConfirm:D,onCancel:R},{children:(z,M,I)=>{var Y;return(Y=t.children)===null||Y===void 0?void 0:Y.call(t,i,M,I)}}))}),[zk]=wn("datetime-picker"),XC=W.forwardRef((e,r)=>e.type==="time"?Q(pH,Object.assign({ref:r,className:Re(zk())},e)):Q(hH,Object.assign({ref:r,className:Re(zk())},e)));function JC(e){return Array.isArray(e)?e:[e]}const wX="";function Uk(e,r){this.v=e,this.k=r}function Da(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Da=function(c,p,g,d){function m(C,b){Da(c,C,function(x){return this._invoke(C,b,x)})}p?l?l(c,p,{value:g,enumerable:!d,configurable:!d,writable:!d}):c[p]=g:(m("next",0),m("throw",1),m("return",2))},Da(e,r,t,i)}function ew(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,_,T,E){var A=_&&_.prototype instanceof p?_:p,k=Object.create(A.prototype);return Da(k,"_invoke",function(D,R,N){var z,M,I,Y=0,B=N||[],P=!1,U={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(K,ee){return z=K,M=0,I=e,U.n=ee,c}};function H(V,K){for(M=V,I=K,r=0;!P&&Y&&!ee&&r<B.length;r++){var ee,J=B[r],q=U.p,te=J[2];V>3?(ee=te===K)&&(I=J[(M=J[4])?5:(M=3,3)],J[4]=J[5]=e):J[0]<=q&&((ee=V<2&&q<J[1])?(M=0,U.v=K,U.n=J[1]):q<te&&(ee=V<3||J[0]>K||K>te)&&(J[4]=V,J[5]=K,U.n=te,M=0))}if(ee||V>1)return c;throw P=!0,K}return function(V,K,ee){if(Y>1)throw TypeError("Generator is already running");for(P&&K===1&&H(K,ee),M=K,I=ee;(r=M<2?e:I)||!P;){z||(M?M<3?(M>1&&(U.n=-1),H(M,I)):U.n=I:U.v=I);try{if(Y=2,z){if(M||(V="next"),r=z[V]){if(!(r=r.call(z,I)))throw TypeError("iterator result is not an object");if(!r.done)return r;I=r.value,M<2&&(M=0)}else M===1&&(r=z.return)&&r.call(z),M<2&&(I=TypeError("The iterator does not provide a '"+V+"' method"),M=1);z=e}else if((r=(P=U.n<0)?I:D.call(R,U))!==c)break}catch(J){z=e,M=1,I=J}finally{Y=1}}return{value:r,done:P}}}(x,T,E),!0),k}var c={};function p(){}function g(){}function d(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(Da(r={},i,function(){return this}),r),C=d.prototype=p.prototype=Object.create(m);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Da(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return g.prototype=d,Da(C,"constructor",d),Da(d,"constructor",g),g.displayName="GeneratorFunction",Da(d,l,"GeneratorFunction"),Da(C),Da(C,l,"Generator"),Da(C,i,function(){return this}),Da(C,"toString",function(){return"[object Generator]"}),(ew=function(){return{w:f,m:b}})()}function py(e,r){function t(l,f,c,p){try{var g=e[l](f),d=g.value;return d instanceof Uk?r.resolve(d.v).then(function(m){t("next",m,c,p)},function(m){t("throw",m,c,p)}):r.resolve(d).then(function(m){g.value=m,c(g)},function(m){return t("throw",m,c,p)})}catch(m){p(m)}}var i;this.next||(Da(py.prototype),Da(py.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Da(this,"_invoke",function(l,f,c){function p(){return new r(function(g,d){t(l,c,g,d)})}return i=i?i.then(p,p):p()},!0)}function jk(e,r,t,i,l){return new py(ew().w(e,r,t,i),l||Promise)}function vH(e,r,t,i,l){var f=jk(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function mH(e){var r=Object(e),t=[];for(var i in r)t.unshift(i);return function l(){for(;t.length;)if((i=t.pop())in r)return l.value=i,l.done=!1,l;return l.done=!0,l}}function Ik(e){if(e!=null){var r=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw new TypeError(Mr(e)+" is not iterable")}function ro(){var e=ew(),r=e.m(ro),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var p=typeof c=="function"&&c.constructor;return!!p&&(p===t||(p.displayName||p.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var p,g;return function(d){p||(p={stop:function(){return g(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return g(d.a,l[C],b)},delegateYield:function(C,b,x){return p.resultName=b,g(d.d,Ik(C),x)},finish:function(C){return g(d.f,C)}},g=function(C,b,x){d.p=p.prev,d.n=p.next;try{return C(b,x)}finally{p.next=d.n}}),p.resultName&&(p[p.resultName]=d.v,p.resultName=void 0),p.sent=d.v,p.next=d.n;try{return c.call(this,p)}finally{d.p=p.prev,d.n=p.next}}}return(ro=function(){return{wrap:function(g,d,m,C){return e.w(f(g),d,m,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(g,d){return new Uk(g,d)},AsyncIterator:py,async:function(g,d,m,C,b){return(i(d)?jk:vH)(f(g),d,m,C,b)},keys:mH,values:Ik}})()}function Hk(e,r,t,i,l,f,c){try{var p=e[f](c),g=p.value}catch(d){return void t(d)}p.done?r(g):Promise.resolve(g).then(i,l)}function Bp(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(g){Hk(f,i,l,c,p,"next",g)}function p(g){Hk(f,i,l,c,p,"throw",g)}c(void 0)})}}function gH(e){if(Array.isArray(e))return Cb(e)}function Vk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
196
|
+
`,e.getElementsByTagName("head")[0].appendChild(r)),e.body&&T6(e.body,"react-draggable-transparent-selection")}function tB(e){if(e)try{if(e.body&&k6(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function T6(e,r){e.classList?e.classList.add(r):e.className.match(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)")))||(e.className+=" ".concat(r))}function k6(e,r){e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)"),"g"),"")}var fl={};Object.defineProperty(fl,"__esModule",{value:!0}),fl.canDragX=aB,fl.canDragY=iB,fl.createCoreData=lB,fl.createDraggableData=sB,fl.getBoundPosition=nB,fl.getControlPosition=oB,fl.snapToGrid=rB;var Ni=cl,ud=sr;function nB(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:uB(i);const l=O2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let p;if(i==="parent"?p=l.parentNode:p=f.querySelector(i),!(p instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const g=p,d=c.getComputedStyle(l),m=c.getComputedStyle(g);i={left:-l.offsetLeft+(0,Ni.int)(m.paddingLeft)+(0,Ni.int)(d.marginLeft),top:-l.offsetTop+(0,Ni.int)(m.paddingTop)+(0,Ni.int)(d.marginTop),right:(0,ud.innerWidth)(g)-(0,ud.outerWidth)(l)-l.offsetLeft+(0,Ni.int)(m.paddingRight)-(0,Ni.int)(d.marginRight),bottom:(0,ud.innerHeight)(g)-(0,ud.outerHeight)(l)-l.offsetTop+(0,Ni.int)(m.paddingBottom)-(0,Ni.int)(d.marginBottom)}}return(0,Ni.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Ni.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Ni.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Ni.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function rB(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function aB(e){return e.props.axis==="both"||e.props.axis==="x"}function iB(e){return e.props.axis==="both"||e.props.axis==="y"}function oB(e,r,t){const i=typeof r=="number"?(0,ud.getTouch)(e,r):null;if(typeof r=="number"&&!i)return null;const l=O2(t),f=t.props.offsetParent||l.offsetParent||l.ownerDocument.body;return(0,ud.offsetXYFromParent)(i||e,f,t.props.scale)}function lB(e,r,t){const i=!(0,Ni.isNum)(e.lastX),l=O2(e);return i?{node:l,deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}:{node:l,deltaX:r-e.lastX,deltaY:t-e.lastY,lastX:e.lastX,lastY:e.lastY,x:r,y:t}}function sB(e,r){const t=e.props.scale;return{node:r.node,x:e.state.x+r.deltaX/t,y:e.state.y+r.deltaY/t,deltaX:r.deltaX/t,deltaY:r.deltaY/t,lastX:e.state.x,lastY:e.state.y}}function uB(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function O2(e){const r=e.findDOMNode();if(!r)throw new Error("<DraggableCore>: Unmounted during event!");return r}var kg={},Ag={};Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.default=cB;function cB(){}Object.defineProperty(kg,"__esModule",{value:!0}),kg.default=void 0;var R2=dB(W),li=N2(wt.exports),fB=N2(tu.exports),Sa=sr,lu=fl,F2=cl,Yh=N2(Ag);function N2(e){return e&&e.__esModule?e:{default:e}}function A6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(A6=function(i){return i?t:r})(e)}function dB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=A6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function Va(e,r,t){return r=hB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function hB(e){var r=pB(e,"string");return typeof r=="symbol"?r:String(r)}function pB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}const bo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let su=bo.mouse,Og=class extends R2.Component{constructor(){super(...arguments),Va(this,"dragging",!1),Va(this,"lastX",NaN),Va(this,"lastY",NaN),Va(this,"touchIdentifier",null),Va(this,"mounted",!1),Va(this,"handleDragStart",r=>{if(this.props.onMouseDown(r),!this.props.allowAnyClick&&typeof r.button=="number"&&r.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=t;if(this.props.disabled||!(r.target instanceof i.defaultView.Node)||this.props.handle&&!(0,Sa.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,Sa.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,Sa.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,lu.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:p}=f,g=(0,lu.createCoreData)(this,c,p);(0,Yh.default)("DraggableCore: handleDragStart: %j",g),(0,Yh.default)("calling",this.props.onStart),!(this.props.onStart(r,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Sa.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=p,(0,Sa.addEvent)(i,su.move,this.handleDrag),(0,Sa.addEvent)(i,su.stop,this.handleDragStop))}),Va(this,"handleDrag",r=>{const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let p=i-this.lastX,g=l-this.lastY;if([p,g]=(0,lu.snapToGrid)(this.props.grid,p,g),!p&&!g)return;i=this.lastX+p,l=this.lastY+g}const f=(0,lu.createCoreData)(this,i,l);if((0,Yh.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=i,this.lastY=l}),Va(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,lu.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let g=i-this.lastX||0,d=l-this.lastY||0;[g,d]=(0,lu.snapToGrid)(this.props.grid,g,d),i=this.lastX+g,l=this.lastY+d}const f=(0,lu.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,Sa.removeUserSelectStyles)(p.ownerDocument),(0,Yh.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,Yh.default)("DraggableCore: Removing handlers"),(0,Sa.removeEvent)(p.ownerDocument,su.move,this.handleDrag),(0,Sa.removeEvent)(p.ownerDocument,su.stop,this.handleDragStop))}),Va(this,"onMouseDown",r=>(su=bo.mouse,this.handleDragStart(r))),Va(this,"onMouseUp",r=>(su=bo.mouse,this.handleDragStop(r))),Va(this,"onTouchStart",r=>(su=bo.touch,this.handleDragStart(r))),Va(this,"onTouchEnd",r=>(su=bo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,Sa.addEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,Sa.removeEvent)(t,bo.mouse.move,this.handleDrag),(0,Sa.removeEvent)(t,bo.touch.move,this.handleDrag),(0,Sa.removeEvent)(t,bo.mouse.stop,this.handleDragStop),(0,Sa.removeEvent)(t,bo.touch.stop,this.handleDragStop),(0,Sa.removeEvent)(r,bo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Sa.removeUserSelectStyles)(t)}}findDOMNode(){var r,t;return(r=this.props)!==null&&r!==void 0&&r.nodeRef?(t=this.props)===null||t===void 0||(t=t.nodeRef)===null||t===void 0?void 0:t.current:fB.default.findDOMNode(this)}render(){return R2.cloneElement(R2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};kg.default=Og,Va(Og,"displayName","DraggableCore"),Va(Og,"propTypes",{allowAnyClick:li.default.bool,children:li.default.node.isRequired,disabled:li.default.bool,enableUserSelectHack:li.default.bool,offsetParent:function(e,r){if(e[r]&&e[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:li.default.arrayOf(li.default.number),handle:li.default.string,cancel:li.default.string,nodeRef:li.default.object,onStart:li.default.func,onDrag:li.default.func,onStop:li.default.func,onMouseDown:li.default.func,scale:li.default.number,className:F2.dontSetMe,style:F2.dontSetMe,transform:F2.dontSetMe}),Va(Og,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return g.default}}),e.default=void 0;var r=b(W),t=m(wt.exports),i=m(tu.exports),l=m(NP),f=sr,c=fl,p=cl,g=m(kg),d=m(Ag);function m(k){return k&&k.__esModule?k:{default:k}}function C(k){if(typeof WeakMap!="function")return null;var D=new WeakMap,R=new WeakMap;return(C=function(N){return N?R:D})(k)}function b(k,D){if(!D&&k&&k.__esModule)return k;if(k===null||typeof k!="object"&&typeof k!="function")return{default:k};var R=C(D);if(R&&R.has(k))return R.get(k);var N={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in k)if(M!=="default"&&Object.prototype.hasOwnProperty.call(k,M)){var I=z?Object.getOwnPropertyDescriptor(k,M):null;I&&(I.get||I.set)?Object.defineProperty(N,M,I):N[M]=k[M]}return N.default=k,R&&R.set(k,N),N}function x(){return x=Object.assign?Object.assign.bind():function(k){for(var D=1;D<arguments.length;D++){var R=arguments[D];for(var N in R)Object.prototype.hasOwnProperty.call(R,N)&&(k[N]=R[N])}return k},x.apply(this,arguments)}function _(k,D,R){return D=T(D),D in k?Object.defineProperty(k,D,{value:R,enumerable:!0,configurable:!0,writable:!0}):k[D]=R,k}function T(k){var D=E(k,"string");return typeof D=="symbol"?D:String(D)}function E(k,D){if(typeof k!="object"||k===null)return k;var R=k[Symbol.toPrimitive];if(R!==void 0){var N=R.call(k,D||"default");if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(k)}class A extends r.Component{static getDerivedStateFromProps(D,R){let{position:N}=D,{prevPropsPosition:z}=R;return N&&(!z||N.x!==z.x||N.y!==z.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:N,prevPropsPosition:z}),{x:N.x,y:N.y,prevPropsPosition:{...N}}):null}constructor(D){super(D),_(this,"onDragStart",(R,N)=>{if((0,d.default)("Draggable: onDragStart: %j",N),this.props.onStart(R,(0,c.createDraggableData)(this,N))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_(this,"onDrag",(R,N)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",N);const z=(0,c.createDraggableData)(this,N),M={x:z.x,y:z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Y,y:B}=M;M.x+=this.state.slackX,M.y+=this.state.slackY;const[P,U]=(0,c.getBoundPosition)(this,M.x,M.y);M.x=P,M.y=U,M.slackX=this.state.slackX+(Y-M.x),M.slackY=this.state.slackY+(B-M.y),z.x=M.x,z.y=M.y,z.deltaX=M.x-this.state.x,z.deltaY=M.y-this.state.y}if(this.props.onDrag(R,z)===!1)return!1;this.setState(M)}),_(this,"onDragStop",(R,N)=>{if(!this.state.dragging||this.props.onStop(R,(0,c.createDraggableData)(this,N))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",N);const M={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:Y,y:B}=this.props.position;M.x=Y,M.y=B}this.setState(M)}),this.state={dragging:!1,dragged:!1,x:D.position?D.position.x:D.defaultPosition.x,y:D.position?D.position.y:D.defaultPosition.y,prevPropsPosition:{...D.position},slackX:0,slackY:0,isElementSVG:!1},D.position&&(D.onDrag||D.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var D,R;return(D=(R=this.props)===null||R===void 0||(R=R.nodeRef)===null||R===void 0?void 0:R.current)!==null&&D!==void 0?D:i.default.findDOMNode(this)}render(){const{axis:D,bounds:R,children:N,defaultPosition:z,defaultClassName:M,defaultClassNameDragging:I,defaultClassNameDragged:Y,position:B,positionOffset:P,scale:U,...H}=this.props;let V={},K=null;const J=!Boolean(B)||this.state.dragging,q=B||z,te={x:(0,c.canDragX)(this)&&J?this.state.x:q.x,y:(0,c.canDragY)(this)&&J?this.state.y:q.y};this.state.isElementSVG?K=(0,f.createSVGTransform)(te,P):V=(0,f.createCSSTransform)(te,P);const Z=(0,l.default)(N.props.className||"",M,{[I]:this.state.dragging,[Y]:this.state.dragged});return r.createElement(g.default,x({},H,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(N),{className:Z,style:{...N.props.style,...V},transform:K}))}}e.default=A,_(A,"displayName","Draggable"),_(A,"propTypes",{...g.default.propTypes,axis:t.default.oneOf(["both","x","y","none"]),bounds:t.default.oneOfType([t.default.shape({left:t.default.number,right:t.default.number,top:t.default.number,bottom:t.default.number}),t.default.string,t.default.oneOf([!1])]),defaultClassName:t.default.string,defaultClassNameDragging:t.default.string,defaultClassNameDragged:t.default.string,defaultPosition:t.default.shape({x:t.default.number,y:t.default.number}),positionOffset:t.default.shape({x:t.default.oneOfType([t.default.number,t.default.string]),y:t.default.oneOfType([t.default.number,t.default.string])}),position:t.default.shape({x:t.default.number,y:t.default.number}),className:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),_(A,"defaultProps",{...g.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(u6);const{default:O6,DraggableCore:vB}=u6;Dg.exports=O6,Dg.exports.default=O6,Dg.exports.DraggableCore=vB;var M2={};M2.__esModule=!0,M2.cloneElement=CB;var mB=gB(W);function gB(e){return e&&e.__esModule?e:{default:e}}function R6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function F6(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?R6(Object(t),!0).forEach(function(i){yB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function yB(e,r,t){return r=xB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xB(e){var r=bB(e,"string");return typeof r=="symbol"?r:String(r)}function bB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CB(e,r){return r.style&&e.props.style&&(r.style=F6(F6({},e.props.style),r.style)),r.className&&e.props.className&&(r.className=e.props.className+" "+r.className),mB.default.cloneElement(e,r)}var qh={};qh.__esModule=!0,qh.resizableProps=void 0;var Bt=wB(wt.exports);function wB(e){return e&&e.__esModule?e:{default:e}}var _B={axis:Bt.default.oneOf(["both","x","y","none"]),className:Bt.default.string,children:Bt.default.element.isRequired,draggableOpts:Bt.default.shape({allowAnyClick:Bt.default.bool,cancel:Bt.default.string,children:Bt.default.node,disabled:Bt.default.bool,enableUserSelectHack:Bt.default.bool,offsetParent:Bt.default.node,grid:Bt.default.arrayOf(Bt.default.number),handle:Bt.default.string,nodeRef:Bt.default.object,onStart:Bt.default.func,onDrag:Bt.default.func,onStop:Bt.default.func,onMouseDown:Bt.default.func,scale:Bt.default.number}),height:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="y"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)},handle:Bt.default.oneOfType([Bt.default.node,Bt.default.func]),handleSize:Bt.default.arrayOf(Bt.default.number),lockAspectRatio:Bt.default.bool,maxConstraints:Bt.default.arrayOf(Bt.default.number),minConstraints:Bt.default.arrayOf(Bt.default.number),onResizeStop:Bt.default.func,onResizeStart:Bt.default.func,onResize:Bt.default.func,resizeHandles:Bt.default.arrayOf(Bt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Bt.default.number,width:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="x"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)}};qh.resizableProps=_B,$h.__esModule=!0,$h.default=void 0;var Gh=kB(W),SB=Dg.exports,EB=M2,DB=qh,TB=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function N6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(N6=function(l){return l?t:r})(e)}function kB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=N6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function P2(){return P2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},P2.apply(this,arguments)}function AB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function M6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function B2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?M6(Object(t),!0).forEach(function(i){OB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function OB(e,r,t){return r=RB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function RB(e){var r=FB(e,"string");return typeof r=="symbol"?r:String(r)}function FB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function NB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,L2(e,r)}function L2(e,r){return L2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},L2(e,r)}var z2=function(e){NB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.handleRefs={},i.lastHandleRect=null,i.slack=null,i}var t=r.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(l,f){var c=this.props,p=c.minConstraints,g=c.maxConstraints,d=c.lockAspectRatio;if(!p&&!g&&!d)return[l,f];if(d){var m=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*m)?f=l/m:l=f*m}var x=l,_=f,T=this.slack||[0,0],E=T[0],A=T[1];return l+=E,f+=A,p&&(l=Math.max(p[0],l),f=Math.max(p[1],f)),g&&(l=Math.min(g[0],l),f=Math.min(g[1],f)),this.slack=[E+(x-l),A+(_-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(p,g){var d=g.node,m=g.deltaX,C=g.deltaY;l==="onResizeStart"&&c.resetData();var b=(c.props.axis==="both"||c.props.axis==="x")&&f!=="n"&&f!=="s",x=(c.props.axis==="both"||c.props.axis==="y")&&f!=="e"&&f!=="w";if(!(!b&&!x)){var _=f[0],T=f[f.length-1],E=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(T==="w"){var A=E.left-c.lastHandleRect.left;m+=A}if(_==="n"){var k=E.top-c.lastHandleRect.top;C+=k}}c.lastHandleRect=E,T==="w"&&(m=-m),_==="n"&&(C=-C);var D=c.props.width+(b?m/c.props.transformScale:0),R=c.props.height+(x?C/c.props.transformScale:0),N=c.runConstraints(D,R);D=N[0],R=N[1];var z=D!==c.props.width||R!==c.props.height,M=typeof c.props[l]=="function"?c.props[l]:null,I=l==="onResize"&&!z;M&&!I&&(p.persist==null||p.persist(),M(p,{node:d,size:{width:D,height:R},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Gh.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var p=typeof c.type=="string",g=B2({ref:f},p?{}:{handleAxis:l});return Gh.cloneElement(c,g)},t.render=function(){var l=this,f=this.props,c=f.children,p=f.className,g=f.draggableOpts;f.width,f.height,f.handle,f.handleSize,f.lockAspectRatio,f.axis,f.minConstraints,f.maxConstraints,f.onResize,f.onResizeStop,f.onResizeStart;var d=f.resizeHandles;f.transformScale;var m=AB(f,TB);return(0,EB.cloneElement)(c,B2(B2({},m),{},{className:(p?p+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Gh.createRef();return Gh.createElement(SB.DraggableCore,P2({},g,{nodeRef:x,key:"resizableHandle-"+C,onStop:l.resizeHandler("onResizeStop",C),onStart:l.resizeHandler("onResizeStart",C),onDrag:l.resizeHandler("onResize",C)}),l.renderResizeHandle(C,x))}))}))},r}(Gh.Component);$h.default=z2,z2.propTypes=DB.resizableProps,z2.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Rg={};Rg.__esModule=!0,Rg.default=void 0;var U2=zB(W),MB=P6(wt.exports),PB=P6($h),BB=qh,LB=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function P6(e){return e&&e.__esModule?e:{default:e}}function B6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(B6=function(l){return l?t:r})(e)}function zB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=B6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function j2(){return j2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},j2.apply(this,arguments)}function L6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function Fg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?L6(Object(t),!0).forEach(function(i){UB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function UB(e,r,t){return r=jB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function jB(e){var r=IB(e,"string");return typeof r=="symbol"?r:String(r)}function IB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function HB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function VB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,I2(e,r)}function I2(e,r){return I2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},I2(e,r)}var z6=function(e){VB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.state={width:i.props.width,height:i.props.height,propsWidth:i.props.width,propsHeight:i.props.height},i.onResize=function(p,g){var d=g.size;i.props.onResize?(p.persist==null||p.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(p,g)})):i.setState(d)},i}r.getDerivedStateFromProps=function(l,f){return f.propsWidth!==l.width||f.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null};var t=r.prototype;return t.render=function(){var l=this.props,f=l.handle,c=l.handleSize;l.onResize;var p=l.onResizeStart,g=l.onResizeStop,d=l.draggableOpts,m=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var _=l.resizeHandles,T=l.style,E=l.transformScale,A=HB(l,LB);return U2.createElement(PB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:m,onResizeStart:p,onResize:this.onResize,onResizeStop:g,resizeHandles:_,transformScale:E,width:this.state.width},U2.createElement("div",j2({},A,{style:Fg(Fg({},T),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(U2.Component);Rg.default=z6,z6.propTypes=Fg(Fg({},BB.resizableProps),{},{children:MB.default.element}),x2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var $B=x2.exports.Resizable=$h.default;x2.exports.ResizableBox=Rg.default;const YB={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},qB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?Q("th",{...l}):Q($B,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:Q("th",{...l})})};function GB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:p="szld_table_cell_width",emptyText:g,...d}=r,[m,C]=W.useState(r.columns||[]),b=E=>{var k,D;let A=E.width||l;if(E.dataIndex&&c){const R=Array.isArray(E.dataIndex)?E.dataIndex.join("-"):String(E.dataIndex),N=(D=(k=jb(p))==null?void 0:k[c])==null?void 0:D[R];N&&(A=N)}return A};W.useEffect(()=>{const E=r.columns||[];if(E.length===0||!f){C(E);return}const A=E==null?void 0:E.filter(k=>!k.hidden).map(k=>k.dataIndex?{...k,width:b(k),onHeaderCell:D=>({width:D.width,resizeable:f,onResize:(R,{size:N})=>x(D,N)})}:k);A.length>0&&(A[A.length-1].minWidth=A[A.length-1].width,A[A.length-1].width=void 0),C(A)},[r.columns,c,l,f]);const x=(E,A)=>{C(k=>{const D=k==null?void 0:k.map(R=>R.dataIndex===E.dataIndex?{...R,width:A.width}:R);if(c){const R=jb(p)||{};R[c]=R[c]||{},D==null||D.forEach(N=>{if(N.dataIndex){const z=Array.isArray(N.dataIndex)?N.dataIndex.join("-"):String(N.dataIndex);R[c][z]=N.width}}),localStorage.setItem(p,JSON.stringify(R))}return D})},_={header:{cell:qB},...d==null?void 0:d.components},T=W.useMemo(()=>{var A;const E=k=>{let D=k.width||k.minWidth;return(!D||typeof D=="string")&&(D=l),D};return(A=m==null?void 0:m.map(k=>E(k)))==null?void 0:A.reduce((k,D)=>k+D,0)},[m,l]);return Be(en,{children:[t&&Q(y2,{hiddenTitle:!0,...t,items:t.items}),Q(me.Table,{scroll:{x:T},...d,components:_,columns:m,className:rs(YB.table,r==null?void 0:r.className),locale:{emptyText:Q(me.Empty,{image:me.Empty.PRESENTED_IMAGE_SIMPLE,description:g})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:E=>i==="10001"?`共 ${E} 条`:`Total ${E} items`,...r==null?void 0:r.pagination}})]})}const KB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},U6=W.createContext(null),WB=({index:e,...r})=>{const[t]=me.Form.useForm();return Q(me.Form,{form:t,component:!1,children:Q(U6.Provider,{value:t,children:Q("tr",{...r})})})};function QB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:p,type:g="input",valueProps:d,initialValue:m,...C}=e,b=W.useRef(null),x=W.useContext(U6),_=async()=>{try{const A=await x.validateFields();p({...f,...A})}catch{}},T=()=>Q(s6,{valueType:g,valueProps:{...d,onBlur:_,onPressEnter:_},inputRef:b});let E=i;return t&&(E=Q(me.Form.Item,{style:{margin:0},initialValue:m||il.get(f,l),name:l,rules:c,children:T()})),Q("td",{...C,children:E})}function ZB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:WB,cell:QB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:p=>({...c,record:p,onChange:t})}:c);return Q(me.Table,{...i,components:l,rowClassName:()=>KB.editableRow,columns:f})}const j6=e=>{const{auth:r=!0,...t}=e;return r?Q(me.Button,{...t}):null},XB=e=>{const{PId:r,auths:t,...i}=e,l=W.useMemo(()=>t?!!(typeof r=="number"&&t.find(f=>f.PId===r)||Array.isArray(r)&&t.filter(f=>r.includes(f.PId)).length>0):!1,[r,t]);return Q(j6,{...i,auth:l})},Kh={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},JB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:p=!1,classes:g})=>{const d=W.useRef(null),m=W.useRef(null),C=W.useRef(null),b=W.useRef(null),x=W.useRef(0),_=W.useRef(),T=W.useRef(0),E=W.useMemo(()=>{if(!m.current||!C.current)return;const M=m.current,I=C.current,Y=parseFloat(I.scrollHeight.toString());return Y*2-M.clientHeight<Y},[]),A=()=>{if(!m.current||!C.current)return;const M=m.current,I=C.current,Y=parseFloat(I.scrollHeight.toString());if(Y*2<=M.clientHeight){M.style.animation="none";return}const B=Y/M.clientHeight;M.style.setProperty("--content-height",`${Y}px`),M.style.animationDuration=`${e*B}s`,M.style.animationDelay=`${r}s`,M.style.animationTimingFunction=t};W.useEffect(()=>(A(),m.current&&(b.current=new ResizeObserver(A),b.current.observe(m.current)),()=>{b.current&&m.current&&b.current.unobserve(m.current)}),[e,r]);const k=()=>{p&&m.current&&(m.current.style.animationPlayState="paused")},D=()=>{p&&m.current&&(z(),m.current.style.animationPlayState="running")},R=()=>{if(!m.current||!p)return;const I=m.current.getAnimations()[0];if(I)if(Math.abs(x.current)>.1){const Y=performance.now(),B=Y-T.current;T.current=Y;const P=.95;x.current*=Math.pow(P,B/16);const U=I.currentTime||0;I.currentTime=U+x.current,_.current=requestAnimationFrame(R)}else x.current=0,z()},N=M=>{if(!p||!m.current)return;M.preventDefault();const I=M.deltaY,Y=.25;x.current+=I*Y;const B=50;x.current=Math.max(-B,Math.min(B,x.current)),_.current||(T.current=performance.now(),_.current=requestAnimationFrame(R))},z=()=>{_.current&&(cancelAnimationFrame(_.current),_.current=void 0)};return W.useEffect(()=>()=>{z()},[]),W.useEffect(()=>{const M=d.current;if(M)return p&&M.addEventListener("wheel",N,{passive:!1}),()=>{M.removeEventListener("wheel",N)}},[p]),Q("div",{ref:d,className:`${Kh.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:k,onMouseLeave:D,children:Be("div",{ref:m,className:rs(Kh.container,g==null?void 0:g.container),children:[Q("div",{ref:C,className:rs(Kh.content,g==null?void 0:g.content),children:f}),Q("div",{className:rs(Kh.content,g==null?void 0:g.content),children:f}),E&&Q("div",{className:rs(Kh.content,g==null?void 0:g.content),children:f})]})})},Pr={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},I6=e=>{const{data:r,current:t,rowKey:i,renderContent:l}=e,[f,c]=W.useState(!1),p=W.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),g=W.useMemo(()=>p>1?f?0:p-1:0,[p,f]),d=()=>{c(!0)};return Be("ul",{className:Pr.main,children:[p>1&&!f&&Be("li",{className:rs(Pr.item,Pr.itemDone),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Q("div",{className:Pr.content,children:Be("div",{className:Pr.collpase,children:[Be("div",{children:["已收起",Q("span",{children:p-1}),"个节点"]}),Be("a",{className:Pr.btn,onClick:d,children:["展开节点",Q(F7,{})]})]})})]}),r.slice(g).map((m,C)=>Be("li",{className:rs(Pr.item,p===C+g?Pr.itemActive:p>C+g?Pr.itemDone:Pr.itemUnDo),children:[Q("div",{className:Pr.tail}),Q("div",{className:Pr.node}),Be("div",{className:Pr.content,children:[l?l(m,C,f?p:p-g):Be(en,{children:[Q("div",{className:Pr.title,children:m.PNName}),Be("div",{className:Pr.dateWrapper,children:[m.PlanFinishDate&&Be("span",{children:["预计完成时间: ",m.PlanFinishDate]}),m.UpdateTime&&Be("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",m.UpdateTime]})]}),m.Remark&&Q("div",{className:Pr.remark,children:m.Remark})]}),f&&p-1===C&&Be("a",{className:Pr.btn,onClick:()=>c(!1),children:["收起节点 ",Q(X7,{})]})]})]},typeof i=="string"?m[i]:i(m)))]})},eL=e=>{const{current:r,data:t,rowKey:i,renderContent:l,currentIndex:f,...c}=e;return(()=>{me.Modal.info({icon:null,title:"流程节点",width:700,content:Q(I6,{rowKey:i,renderContent:l,current:r,currentIndex:f,data:t}),closable:!0,footer:null,maskClosable:!0,...c})})(),null},H6={customPagination:"custom-pagination-module_customPagination_bb6f7",jumpBtns:"custom-pagination-module_jumpBtns_a6c0b"};function tL(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,p]=W.useState(""),g=(f==null?void 0:f.pageSize)||10,d=b=>{p(b.target.value)},m=b=>{var x;p(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),g))},C=b=>{var x;if(b.key==="Enter"){if(p(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),g)}};return Be("div",{className:H6.customPagination,children:[Q(me.Pagination,{showTotal:b=>`${r} ${b} ${t}`,showSizeChanger:{options:[{label:`10 ${t}/${l}`,value:10},{label:`20 ${t}/${l}`,value:20},{label:`50 ${t}/${l}`,value:50},{label:`100 ${t}/${l}`,value:100}]},...f}),Be("div",{className:H6.jumpBtns,children:[i,Q(me.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>m(b),onKeyDown:b=>C(b)}),l]})]})}var V6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",p="minute",g="hour",d="day",m="week",C="month",b="quarter",x="year",_="date",T="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var K=["th","st","nd","rd"],ee=V%100;return"["+V+(K[(ee-20)%10]||K[ee]||K[0])+"]"}},D=function(V,K,ee){var J=String(V);return!J||J.length>=K?V:""+Array(K+1-J.length).join(ee)+V},R={s:D,z:function(V){var K=-V.utcOffset(),ee=Math.abs(K),J=Math.floor(ee/60),q=ee%60;return(K<=0?"+":"-")+D(J,2,"0")+":"+D(q,2,"0")},m:function V(K,ee){if(K.date()<ee.date())return-V(ee,K);var J=12*(ee.year()-K.year())+(ee.month()-K.month()),q=K.clone().add(J,C),te=ee-q<0,Z=K.clone().add(J+(te?-1:1),C);return+(-(J+(ee-q)/(te?q-Z:Z-q))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:C,y:x,w:m,d,D:_,h:g,m:p,s:c,ms:f,Q:b}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},N="en",z={};z[N]=k;var M="$isDayjsObject",I=function(V){return V instanceof U||!(!V||!V[M])},Y=function V(K,ee,J){var q;if(!K)return N;if(typeof K=="string"){var te=K.toLowerCase();z[te]&&(q=te),ee&&(z[te]=ee,q=te);var Z=K.split("-");if(!q&&Z.length>1)return V(Z[0])}else{var $=K.name;z[$]=K,q=$}return!J&&q&&(N=q),q||!J&&N},B=function(V,K){if(I(V))return V.clone();var ee=typeof K=="object"?K:{};return ee.date=V,ee.args=arguments,new U(ee)},P=R;P.l=Y,P.i=I,P.w=function(V,K){return B(V,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var U=function(){function V(ee){this.$L=Y(ee.locale,null,!0),this.parse(ee),this.$x=this.$x||ee.x||{},this[M]=!0}var K=V.prototype;return K.parse=function(ee){this.$d=function(J){var q=J.date,te=J.utc;if(q===null)return new Date(NaN);if(P.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var Z=q.match(E);if(Z){var $=Z[2]-1||0,ne=(Z[7]||"0").substring(0,3);return te?new Date(Date.UTC(Z[1],$,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ne)):new Date(Z[1],$,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ne)}}return new Date(q)}(ee),this.init()},K.init=function(){var ee=this.$d;this.$y=ee.getFullYear(),this.$M=ee.getMonth(),this.$D=ee.getDate(),this.$W=ee.getDay(),this.$H=ee.getHours(),this.$m=ee.getMinutes(),this.$s=ee.getSeconds(),this.$ms=ee.getMilliseconds()},K.$utils=function(){return P},K.isValid=function(){return this.$d.toString()!==T},K.isSame=function(ee,J){var q=B(ee);return this.startOf(J)<=q&&q<=this.endOf(J)},K.isAfter=function(ee,J){return B(ee)<this.startOf(J)},K.isBefore=function(ee,J){return this.endOf(J)<B(ee)},K.$g=function(ee,J,q){return P.u(ee)?this[J]:this.set(q,ee)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(ee,J){var q=this,te=!!P.u(J)||J,Z=P.p(ee),$=function(ye,De){var Pe=P.w(q.$u?Date.UTC(q.$y,De,ye):new Date(q.$y,De,ye),q);return te?Pe:Pe.endOf(d)},ne=function(ye,De){return P.w(q.toDate()[ye].apply(q.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(De)),q)},oe=this.$W,ae=this.$M,se=this.$D,ve="set"+(this.$u?"UTC":"");switch(Z){case x:return te?$(1,0):$(31,11);case C:return te?$(1,ae):$(0,ae+1);case m:var we=this.$locale().weekStart||0,ce=(oe<we?oe+7:oe)-we;return $(te?se-ce:se+(6-ce),ae);case d:case _:return ne(ve+"Hours",0);case g:return ne(ve+"Minutes",1);case p:return ne(ve+"Seconds",2);case c:return ne(ve+"Milliseconds",3);default:return this.clone()}},K.endOf=function(ee){return this.startOf(ee,!1)},K.$set=function(ee,J){var q,te=P.p(ee),Z="set"+(this.$u?"UTC":""),$=(q={},q[d]=Z+"Date",q[_]=Z+"Date",q[C]=Z+"Month",q[x]=Z+"FullYear",q[g]=Z+"Hours",q[p]=Z+"Minutes",q[c]=Z+"Seconds",q[f]=Z+"Milliseconds",q)[te],ne=te===d?this.$D+(J-this.$W):J;if(te===C||te===x){var oe=this.clone().set(_,1);oe.$d[$](ne),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else $&&this.$d[$](ne);return this.init(),this},K.set=function(ee,J){return this.clone().$set(ee,J)},K.get=function(ee){return this[P.p(ee)]()},K.add=function(ee,J){var q,te=this;ee=Number(ee);var Z=P.p(J),$=function(ae){var se=B(te);return P.w(se.date(se.date()+Math.round(ae*ee)),te)};if(Z===C)return this.set(C,this.$M+ee);if(Z===x)return this.set(x,this.$y+ee);if(Z===d)return $(1);if(Z===m)return $(7);var ne=(q={},q[p]=i,q[g]=l,q[c]=t,q)[Z]||1,oe=this.$d.getTime()+ee*ne;return P.w(oe,this)},K.subtract=function(ee,J){return this.add(-1*ee,J)},K.format=function(ee){var J=this,q=this.$locale();if(!this.isValid())return q.invalidDate||T;var te=ee||"YYYY-MM-DDTHH:mm:ssZ",Z=P.z(this),$=this.$H,ne=this.$m,oe=this.$M,ae=q.weekdays,se=q.months,ve=q.meridiem,we=function(De,Pe,Te,ze){return De&&(De[Pe]||De(J,te))||Te[Pe].slice(0,ze)},ce=function(De){return P.s($%12||12,De,"0")},ye=ve||function(De,Pe,Te){var ze=De<12?"AM":"PM";return Te?ze.toLowerCase():ze};return te.replace(A,function(De,Pe){return Pe||function(Te){switch(Te){case"YY":return String(J.$y).slice(-2);case"YYYY":return P.s(J.$y,4,"0");case"M":return oe+1;case"MM":return P.s(oe+1,2,"0");case"MMM":return we(q.monthsShort,oe,se,3);case"MMMM":return we(se,oe);case"D":return J.$D;case"DD":return P.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return we(q.weekdaysMin,J.$W,ae,2);case"ddd":return we(q.weekdaysShort,J.$W,ae,3);case"dddd":return ae[J.$W];case"H":return String($);case"HH":return P.s($,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return ye($,ne,!0);case"A":return ye($,ne,!1);case"m":return String(ne);case"mm":return P.s(ne,2,"0");case"s":return String(J.$s);case"ss":return P.s(J.$s,2,"0");case"SSS":return P.s(J.$ms,3,"0");case"Z":return Z}return null}(De)||Z.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(ee,J,q){var te,Z=this,$=P.p(J),ne=B(ee),oe=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,se=function(){return P.m(Z,ne)};switch($){case x:te=se()/12;break;case C:te=se();break;case b:te=se()/3;break;case m:te=(ae-oe)/6048e5;break;case d:te=(ae-oe)/864e5;break;case g:te=ae/l;break;case p:te=ae/i;break;case c:te=ae/t;break;default:te=ae}return q?te:P.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return z[this.$L]},K.locale=function(ee,J){if(!ee)return this.$L;var q=this.clone(),te=Y(ee,J,!0);return te&&(q.$L=te),q},K.clone=function(){return P.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},V}(),H=U.prototype;return B.prototype=H,[["$ms",f],["$s",c],["$m",p],["$H",g],["$W",d],["$M",C],["$y",x],["$D",_]].forEach(function(V){H[V[1]]=function(K){return this.$g(K,V[0],V[1])}}),B.extend=function(V,K){return V.$i||(V(K,U,B),V.$i=!0),B},B.locale=Y,B.isDayjs=I,B.unix=function(V){return B(1e3*V)},B.en=z[N],B.Ls=z,B.p={},B})})(V6);const hn=V6.exports,Wh=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Dc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default);if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>hn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=nL(e.children||[])),t||null},$6=e=>e&&e<hn().startOf("day"),Y6=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},nL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},Qh=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var m;let p=[];const g=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(T=>({label:`${T.dicid||""}-${T.info||""}`,value:`${T.dicid||""}-${T.info||""}`})))}catch{me.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",T=c==null?void 0:c["field-names"];if(!x.length){me.message.error("请配置key-field");return}const E=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(E!=null&&E.data){const A=E==null?void 0:E.data,k=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(k)&&(D=k),T?p=D:p=D.map(R=>({label:Y6(R,_,x),value:Y6(R,_,x)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(p=((m=c.data)==null?void 0:m.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(p=c.options)):c.inputType==="dictionary"?p=await g(t):c.inputType==="system-dictionary"&&(p=await g(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),p};function uu(e){try{return JSON.parse(e)}catch{return{}}}function Zh(e){if(!q6(e))return e;const r=atob(e),t=new Uint8Array(r.length);for(let i=0;i<r.length;i++)t[i]=r.charCodeAt(i);return new TextDecoder().decode(t)}function q6(e){return e?e.length%4!==0?!1:/^[A-Za-z0-9+/]+(?:=?=?)$/.test(e):!0}const rL=(e,r)=>{var b;let t=il.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:p=!0,onlyNumber:g=""}=e;let d=[];p&&((b=t==null?void 0:t.attr_list)==null||b.forEach(x=>{var _,T,E,A,k,D;(_=x==null?void 0:x.json)!=null&&_["auto-generate"]&&((T=x==null?void 0:x.json)!=null&&T["auto-generate-type"])&&(((E=x==null?void 0:x.json)==null?void 0:E["auto-generate-type"])==="currenttime"&&(x.attrvalue=hn().format("YYYY-MM-DD HH:mm:ss")),((A=x==null?void 0:x.json)==null?void 0:A["auto-generate-type"])==="guid"&&(x.attrvalue=g||f||"")),(k=x==null?void 0:x.json)!=null&&k.default&&(x.attrvalue=(D=x==null?void 0:x.json)==null?void 0:D.default)}));const m=(x,_)=>{try{const T=new Map(x.map((E,A)=>[E.attrid,A]));for(const[E,A]of Object.entries(_)){const k=T.get(E);if(k===void 0)continue;let D=x[k];if(!A&&A!==0){D.attrvalue="";continue}D=C(D,A,l)}x.forEach(E=>{E.children&&Array.isArray(E.children)&&E.children.length>0&&!Array.isArray(E.children[0])&&_[E.attrid]&&m(E.children,_[E.attrid]),E.children&&Array.isArray(E.children)&&E.children.length>0&&Array.isArray(E.children[0])&&E.children.forEach((A,k)=>{var D,R;A&&Array.isArray(A)&&((D=_==null?void 0:_[E.attrid])!=null&&D[k])&&m(A,(R=_==null?void 0:_[E.attrid])==null?void 0:R[k])})})}catch{}},C=(x,_,T)=>{var k,D,R,N;const E=(k=x.json)==null?void 0:k.input,A=(D=x.json)==null?void 0:D.format;switch(E){case"image":case"file":case"video":case"audio":const z=typeof _=="string"?JSON.parse(_):_;if(!Array.isArray(z)){x.attrvalue=JSON.stringify([]);return}const M=z.filter(B=>B.FileId),I=z.filter(B=>{var P;return B.status==="done"&&((P=B.response)==null?void 0:P.data)}).map(B=>B.response.data),Y=[...M,...I];d=[...d,...I],x.attrvalue=JSON.stringify(Y);break;case"cascader":if(Array.isArray(_)&&_.length>0){const B=((R=x.json)==null?void 0:R["cascader-delimiter"])||"/";x.attrvalue=_.join(B)}else x.attrvalue="";break;case"range-picker":T?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(B=>hn(B).format(A||"YYYY-MM-DD")).join("~"):x.attrvalue="":Array.isArray(_)&&_.length>0?x.attrvalue=_.join("~"):x.attrvalue="";break;case"multiple-date-picker":T?Array.isArray(_)&&_.length>0?x.attrvalue=_==null?void 0:_.map(B=>hn(B).format(A||"YYYY-MM-DD")).join(","):x.attrvalue=_:Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"checkbox":case"mult-select":Array.isArray(_)&&_.length>0?x.attrvalue=_.join(","):x.attrvalue=_;break;case"date-picker":_?x.attrvalue=hn(_).format(A||"YYYY-MM-DD"):x.attrvalue="";break;case"time-picker":_?x.attrvalue=hn(_).format(A||"YYYY-MM-DD HH:mm:ss"):x.attrvalue="";break;default:(N=x==null?void 0:x.json)!=null&&N["properties-multiple"]||(x.attrvalue=_);break}return x};return t.attr_list&&Array.isArray(t.attr_list)&&m(i,r),{updatedData:c?Q6(t.attr_list||[]):t,uploadedFiles:d}},H2=(e,r)=>e.map(t=>{var f,c,p;const i=G6(t,r),{children:l}=i;if(l&&!Array.isArray(l==null?void 0:l[0])&&(l!=null&&l.length)&&(i.children=[H2(l)]),i!=null&&i.children&&Array.isArray((f=i==null?void 0:i.children)==null?void 0:f[0])&&((c=i==null?void 0:i.children)!=null&&c.length)){const g=(p=i==null?void 0:i.children)==null?void 0:p.map(d=>d==null?void 0:d.map(m=>G6(m,r)));i.children=g}return i}),G6=(e,r)=>{var t,i;if(!e.json&&e.info)try{const l=e.info_base64===1?Zh(e.info):e.info,f=uu(l),c=il.cloneDeep(r)||{},{langConfig:p=[],attrLangConfig:g=[]}=c||{};return c==null||delete c.langConfig,p!=null&&p.length&&((t=f==null?void 0:f.data)!=null&&t.length)&&(f==null?void 0:f.inputType)==="local"&&(f.options=(i=f.data)==null?void 0:i.map(d=>({label:Ji(p,d),value:d})),f==null||delete f.data),p!=null&&p.length&&(f!=null&&f["combination-name"])&&(f["combination-name"]=Ji(g,f["combination-name"])||Ji(p,f["combination-name"])),p!=null&&p.length&&(f!=null&&f["default-prompt"])&&(f["default-prompt"]=Ji(g,f["default-prompt"])),p!=null&&p.length&&(f!=null&&f.instruction)&&(f.instruction=Ji(g,f.instruction)),p!=null&&p.length&&(f!=null&&f["regexp-message"])&&(f["regexp-message"]=Ji(g,f["regexp-message"])),{...e,json:f,...c,info:JSON.stringify(f)}}catch{return{...e,json:{},...r}}return{...e,...r}},K6=(e,r)=>H2(e,r),W6=(e,r)=>{const t=H2(e,r),i=t.filter(c=>{var p;return(p=c.json)==null?void 0:p.combination}).reduce((c,p)=>{const g=p.json["combination-id"];return g&&(c[g]||(c[g]=[]),c[g].push(p)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(p=>l.add(p.attrid))});const f=c=>c.filter(p=>!l.has(p.attrid)).map(p=>{var m;const g=(m=p.json)==null?void 0:m["combination-id"];if(g&&i[g]){const C={...p,json:{...p.json,combinations:i[g]}},{children:b}=C;return b&&Array.isArray(b==null?void 0:b[0])&&(b!=null&&b.length)&&(C.children=b==null?void 0:b.map(x=>f(x))),C}const{children:d}=p;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(p.children=d==null?void 0:d.map(C=>f(C))),p});return f(t)},aL=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:p,commonRequest:g,guidParams:d,pcParam:m,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,_)=>{var N,z,M,I;let T="",E=[],A={},k={};const D=await g(i||"FWDXGLCreateGUID",d||{"source-number":t});(D==null?void 0:D.ReturnValue)===1&&((N=D==null?void 0:D.data)!=null&&N.GUID)?T=D.data.GUID:_("获取GUID失败");const R=await g(l||"FWDXGLSelPCParam",m||{"source-number":t});if((R==null?void 0:R.ReturnValue)===1){const Y=(z=R.data[e])==null?void 0:z[r],B=(M=R.data[e])==null?void 0:M["properties-type"],P={server:f||"",accepter:c||""};k=R.data;const U=await g(P[B]||p,{[C]:Y,"source-number":t,...b});if((U==null?void 0:U.ReturnValue)===1&&U.data){const H=((I=U.data)==null?void 0:I.attr_list)||[];E=W6(H),A={...U.data,attr_list:E},x({baseData:A,newGUID:T,attrListConfigs:E,selPCParam:k})}else _("请配置属性集")}else _("获取配置失败")}),iL=async(e,r,t)=>await t(e,r);function oL(e){return e.replace(/-([a-z])/g,function(r,t){return t.toUpperCase()})}const Q6=e=>{var l;function r(f){const c={};return f.forEach(p=>{var d,m,C,b,x,_,T;const g=`${p.attrid}_${p.attrtype}`;if(p.attrtype===1&&p.children.length>0&&!Array.isArray(p.children))c[g]={asid:((m=(d=p.children)==null?void 0:d[0])==null?void 0:m.asid)||"",data_list:[r(p.children)]};else if(p.attrtype===1&&p.children.length>0&&Array.isArray(p.children)){let{children:E=[],attrvalue:A}=p||{};A&&(A!=null&&A.length)&&Array.isArray(A)?E=A.map(k=>{var N,z,M,I;const D=(N=Object.values(k))==null?void 0:N.findIndex(Y=>Array.isArray(Y)),R=((z=Object.keys(k))==null?void 0:z[D])||"";if(R){const Y=((M=E==null?void 0:E[0])==null?void 0:M.find(P=>P.attrid===R))||{},{input:B}=(Y==null?void 0:Y.json)||{};if(["file","image","video","audio"].includes(B)){const P=((I=Object.values(k))==null?void 0:I[D])||[],U=P.filter(K=>K.FileId),H=P.filter(K=>{var ee;return K.status==="done"&&((ee=K.response)==null?void 0:ee.data)}).map(K=>K.response.data),V=[...U,...H];k[R]=V}}return J6((E==null?void 0:E[0])||[],k)}):(p.childAsid=((b=(C=E==null?void 0:E[0])==null?void 0:C[0])==null?void 0:b.asid)||"",E=[[]]),E!=null&&E.length&&Array.isArray(E==null?void 0:E[0])&&(c[g]={asid:((_=(x=E==null?void 0:E[0])==null?void 0:x[0])==null?void 0:_.asid)||p.childAsid||"",data_list:(E==null?void 0:E.length)&&((T=E==null?void 0:E[0])==null?void 0:T.length)&&E.map(k=>r(k))||[]})}else c[g]=p.attrvalue}),c}const t=((l=e[0])==null?void 0:l.asid)||"",i=[r(e)];return{data:{asid:t,data_list:i}}},Z6=async({attrList:e,params:r,extra:t={},commonRequest:i})=>{var p;const l=await i("YLFWLRDataDetails",r),f=((p=l==null?void 0:l.data)==null?void 0:p.list)||[];return f.length?await Promise.all(f.map(async g=>await Promise.all((e==null?void 0:e.map(async m=>{const C={...m,...t};if(C.attrvalue=(g==null?void 0:g[m.attrid])||"",m.attrtype===1&&Array.isArray(m.children)&&m.children.length>0){const b=(g==null?void 0:g[m.attrid])||{};C.children=await Z6({attrList:m.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(g=>({...g,...t,attrvalue:"",children:[]}))},Tc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},Ji=(e,r)=>{const t=e.find(i=>(i==null?void 0:i.dataid)===r);return(t==null?void 0:t.content)??r},X6=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c,langConfig:p=[]})=>{var C;let g=[];const d=async b=>{var _;let x=[];if(c.classify)try{const T=await r(b,{asctypeid:c.classify});(_=T==null?void 0:T.data)!=null&&_.list&&Array.isArray(T.data.list)&&(x=T.data.list.map(E=>({label:`${E.dicid||""}-${E.info||""}`,value:`${E.dicid||""}-${E.info||""}`})))}catch{me.message.error("加载选项失败")}return x},m=async()=>{var b,x;try{const _=((b=c==null?void 0:c["key-field"])==null?void 0:b.list)||[],T=((x=c==null?void 0:c["key-field"])==null?void 0:x.delimiter)||"",E=c==null?void 0:c["field-names"];if(!_.length){me.message.error("请配置key-field");return}const A=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(A!=null&&A.data){const k=A==null?void 0:A.data,D=(k==null?void 0:k.list)||[];let R=[];Array.isArray(k)&&(R=k),Array.isArray(D)&&(R=D),E?g=R:g=R.map(N=>({label:Tc(N,T,_),value:Tc(N,T,_)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(g=((C=c.data)==null?void 0:C.map(b=>({label:Ji(p,b),value:b})))||[],c.options&&Array.isArray(c.options)&&(g=c.options)):c.inputType==="dictionary"?g=await d(t):c.inputType==="system-dictionary"&&(g=await d(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await m(),g},J6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),lL=Object.freeze(Object.defineProperty({__proto__:null,getJson:uu,base64ToString:Zh,isBase64:q6,handleSubmitForm:rL,handleBaseAttrList:K6,handleAttrList:W6,handleFormConfig:aL,handleOperationFile:iL,handleKebabToCamel:oL,handleAttrListToObj:Q6,handleAttrListToObjDetail:Z6,handleUrlOptions:Tc,getTitle:Ji,handleSelectOptions:X6,handleObjDetailToSignleAttrList:J6},Symbol.toStringTag,{value:"Module"})),eD=async(e,r,t)=>{var i;try{const l=await r(t||"SERATTALLList",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.attr_list)||[]:[]}catch{}},sL=async(e,r,t)=>{var i;try{const l=await r(t||"YLFWLRDataDetails",e);return(l==null?void 0:l.ReturnValue)===1?((i=l==null?void 0:l.data)==null?void 0:i.list)||[]:[]}catch{}},uL=async(e,r,t)=>{var l;const i={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"};try{const f=await r(t||i,e);return(f==null?void 0:f.ReturnValue)===1?((l=f==null?void 0:f.data)==null?void 0:l.list)||[]:[]}catch{}},cL=async({params:e,commonRequestWidthParams:r,requestParams:t})=>{const i={PageName:"PCInstanceData",Controlname:"DataProcess"};try{return await r(t||i||{},e)}catch{}},fL=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),tD=(e,r,t)=>({style:{backgroundColor:r!==void 0&&r%2===1?(t==null?void 0:t[0])||"var(--bg-color-2)":(t==null?void 0:t[1])||"var(--bg-color-3)"}}),dL=Object.freeze(Object.defineProperty({__proto__:null,handleGetAttrList:eD,handleGetAttrDetail:sL,handleGetList:uL,handleCallSupportCode:cL,handleObjDetailToSignleAttrList:fL,handleSetTableRowColor:tD,handleFormatMobileDate:(e,r="YYYY-MM-DD")=>(Object.entries(il.cloneDeep(e)).forEach(([t,i])=>{Array.isArray(i)&&i.length>0&&i[0]instanceof Date&&(e[t]=i.map(l=>hn(l).format(r))),i instanceof Date&&(e[t]=hn(i).format(r))}),e)},Symbol.toStringTag,{value:"Module"})),hL=(e,r)=>{const t=new URL(e),i=new URL(r);return t.protocol===i.protocol&&t.host===i.host&&t.port===i.port},pL=e=>{const r=String(e).split("/");return r[r.length-1]},vL=e=>{var t;return(t=e.headers.get("content-disposition"))==null?void 0:t.split(";")[1].split("=")[1]},nD=(e,r)=>{const t=r||pL(e);if(hL(e,window.location.href)){V2(e,t);return}let i=r;fetch(e,{method:"get"}).then(l=>(i||(i=vL(l)),l.blob())).then(l=>{rD(l,i||t)}).catch(()=>{V2(e,"")})},mL=e=>{for(var r=e.split(","),t=r[0].match(/:(.*?);/)[1],i=window.atob(r[1]),l=i.length,f=new Uint8Array(l);l--;)f[l]=i.charCodeAt(l);return new Blob([f],{type:t})},rD=(e,r)=>{let t="";e instanceof Blob?t=window.URL.createObjectURL(e):t=window.URL.createObjectURL(mL(e));const i=window.navigator;if(i.msSaveOrOpenBlob){i.msSaveOrOpenBlob(e,r);return}V2(t,r),window.URL.revokeObjectURL(t)},V2=(e,r)=>{let t=document.createElement("a");t.style.display="none",t.href=e,t.target="_blank",t.download=r,document.body.appendChild(t),t.click(),document.body.removeChild(t)},gL=Object.freeze(Object.defineProperty({__proto__:null,downloadUrl:nD,downloadBlob:rD},Symbol.toStringTag,{value:"Module"}));function $2(){const{message:e,modal:r}=me.App.useApp(),t={},i=async({selListData:C,handleSearch:b,handleReset:x,detail:_,styles:T,attributeSetId:E,commonRequest:A,commonRequestWidthParams:k,getTitle:D,searchText:R="搜索",resetText:N="重置",langConfig:z=[]})=>{var M;try{C!=null&&C.length&&_&&C.forEach(V=>{var ee;const K=((ee=V["default-render-data"])==null?void 0:ee.key)||"";K&&(V.attrvalue=(_==null?void 0:_[K])||"")});const I=C.filter(V=>{var K;return((K=V.renderdata)==null?void 0:K.input)!=="tab"&&!(V!=null&&V["default-render-data"])}),Y=I.filter(V=>{var K;return["select","checkbox","radio","mult-select","cascader"].includes((K=V.renderdata)==null?void 0:K.input)});let B=[];if(Y!=null&&Y.length)if((M=t[E])!=null&&M.length)B=t[E];else{const V=await eD({asid:E},A);B=K6(V)||[],t[E]=B||[]}const P=await Promise.all(I.map(async V=>{var ne;const K=V.renderdata||{},{input:ee,width:J}=K||{},q=(K==null?void 0:K["label-col"])||6,te=()=>{const oe=K["default-prompt"];if(D){if(typeof oe=="string"){const ae=D(E||"",oe),se=m(ae);return ee==="range-picker"&&oe&&se?JSON.parse(ae):ae}}else return oe||""};let Z="input";switch(ee){case"range-picker":Z="rangePicker";break;case"number":Z="inputNumber";break;case"select":case"checkbox":case"radio":case"textarea":Z=ee;break;case"mult-select":Z="select";break;case"time-picker":Z="timePicker";break;case"date-picker":Z="datePicker";break;case"cascader":Z="cascader";break;default:Z="input";break}const $={dataIndex:V.attrid,title:V.attrname||"",valueType:Z,valueProps:{placeholder:te()},colProps:{},formItemProps:{style:{marginBottom:10,width:typeof J=="string"?`${J}px`:J||240},labelCol:{span:q}}};if(["select","checkbox","radio","mult-select","cascader"].includes(ee)){const oe=V.attrid||"",ae=B.find(we=>we.attrid===oe);let se=(ae==null?void 0:ae.json)||{};!(se!=null&&se.inputType)&&(K!=null&&K["input-type"])&&(se={...se,inputType:K==null?void 0:K["input-type"],"action-url":K==null?void 0:K["action-url"],"field-names":K==null?void 0:K["field-names"],"key-field":{...K==null?void 0:K["key-field"]}});let ve=await X6({item:se||{},commonRequest:A,commonRequestWidthParams:k,langConfig:z||[]});if(!(ve!=null&&ve.length)){const{data:we=[]}=K||{};we!=null&&we.length&&(ve=we==null?void 0:we.map(ce=>({label:ce||"",value:ce||""}))),(ne=K==null?void 0:K.options)!=null&&ne.length&&(ve=(K==null?void 0:K.options)||[])}if(ee==="cascader"){const we=d(ve,K==null?void 0:K["field-names"]);$.valueProps.options=we||[]}else $.valueProps.options=ve||[]}return $}));let U={color:"#ffffff",borderRadius:4,fontSize:14,height:32},H={color:"#333333",borderRadius:4,fontSize:14,height:32,borderColor:"#D9D9D9"};return C!=null&&C.length&&P.push({dataIndex:"btns",valueType:"btns",valueProps:[{btnType:"submit",title:R,type:"primary",shape:"default",style:{...U,...T==null?void 0:T.searchStyle},onClick:V=>b(V,C)},{btnType:"reset",title:N,style:{...H,...T==null?void 0:T.resetStyle},onClick:()=>x(C)}],colProps:{flex:"none"},formItemProps:{style:{marginBottom:10,minWidth:127}}}),{formItems:P,selList:C}}catch{return{formItems:[],selList:[]}}},l=({universalHeader:C,extraBtn:b,operationColumnConfig:x,attributeSetId:_,getTitle:T,downloadText:E="下载",isDefaultWidth:A=!0,otherLangPageId:k,objDefaultLangPageId:D="5000000"})=>{if(!(C!=null&&C.length))return e.error("请配置 universalHeader表头数据");const R=f(C),N=R==null?void 0:R.map(z=>{const M={title:_?(T==null?void 0:T(_,z==null?void 0:z["header-attribute-id"]))||"":(z==null?void 0:z["header-name"])||"",dataIndex:(z==null?void 0:z["header-attribute-id"])||"",width:A?(z==null?void 0:z["header-width"])||180:void 0,render:(B,P)=>{var U,H;if(B&&B&&typeof B=="string"&&(B!=null&&B.includes("FileName"))&&(B!=null&&B.includes("FilePath"))){try{const V=JSON.parse(B);return V!=null&&V.length?Q(me.Flex,{vertical:!0,children:V==null?void 0:V.map(K=>{const{FileName:ee,FilePath:J}=K||{};return Be(me.Space,{children:[Q("span",{children:ee}),Q(me.Button,{type:"link",size:"small",onClick:()=>nD(J),children:E})]})})}):"-"}catch{}return Q(me.Space,{})}if(z!=null&&z["show-lang-data-id"]&&k){if(B&&B&&typeof B=="object"&&((U=Object.keys(B))!=null&&U.includes("delimiter"))){const{list:V,delimiter:K=","}=B||{},ee=V==null?void 0:V.map(J=>{const q=(J==null?void 0:J.split("|"))||[],te=(q==null?void 0:q.length)>1?q[0]:D,Z=(q==null?void 0:q.length)>1?q[1]:q[0];return T==null?void 0:T(te,Z)});return Q("span",{dangerouslySetInnerHTML:{__html:((H=ee==null?void 0:ee.join(K))==null?void 0:H.replace(/br/g,"<br>"))||"-"}})}return Q(me.Tooltip,{title:B,children:Q("span",{style:{cursor:"pointer"},children:T==null?void 0:T(k,B??"-")})})}return B??"-"}},I=z==null?void 0:z["header-mul-attribute-id"],Y=z==null?void 0:z["show-btn"];return I&&I.list&&Array.isArray(I.list)?M.render=(B,P)=>{const{list:U,delimiter:H=","}=I,V=U.map(ee=>ee?P[ee]??"":"").filter(ee=>ee!==""),K=(V==null?void 0:V.join(H))??"-";return Y&&b?Be(en,{children:[K??"-",b==null?void 0:b(P,K,z)]}):K||"-"}:Y&&b&&(M.render=(B,P)=>{const U=P[M.dataIndex]||"";return Be(en,{children:[U||"-",b(P,U,z)]})}),M});return x&&(N!=null&&N.length)&&N.push(x),N},f=C=>C.slice().sort((b,x)=>{const _=typeof b["header-number"]=="number"?b["header-number"]:1/0,T=typeof x["header-number"]=="number"?x["header-number"]:1/0;return _-T}),c=async({commonRequest:C,refresh:b,interfaceType:x="YLFWLRInstanceDelete",record:_,configData:T,title:E,okText:A,cancelText:k,getTitle:D,pageID:R,deleteItem:N,okType:z="primary",cancelType:M="default"})=>{var I,Y;try{let B=(T==null?void 0:T["must-attrid"])||[];const P=(N==null?void 0:N["source-number"])||(N==null?void 0:N.sourceNumber)||"";if(!(B!=null&&B.length)&&P){const V=await C("YLKHDSelPCParam",{"source-number":Number(P)});V&&V.ReturnValue===1&&V.data&&(B=((Y=(I=V.data)==null?void 0:I[P])==null?void 0:Y["must-attrid"])||[])}if(!(B!=null&&B.length)){e.error("请先配置must-attrid");return}const U={};for(const[V,K]of Object.entries(_))B.includes(V)&&(U[V]=K);const H={instanceid:_==null?void 0:_.instanceid,asid:_==null?void 0:_.asid,...U};r.confirm({title:E||(N==null?void 0:N.title)||"",icon:null,okButtonProps:{type:z},cancelButtonProps:{type:M},okText:A||"",cancelText:k||"",onOk:()=>new Promise(async(V,K)=>{const ee=await C(x,H),J=D&&D(R||"",ee==null?void 0:ee["msg-code"])||(ee==null?void 0:ee.msg);(ee==null?void 0:ee.ReturnValue)===1?(e.success(J),b(),V(ee)):(e.error(J||"删除失败"),K(ee))})})}catch{}},p=({values:C,currentSelList:b,currentActive:x,onSearch:_,tabItems:T})=>{const A={"sel-list":b.map(k=>{var M,I;const{input:D,inputType:R}=(k==null?void 0:k.renderdata)||{};if(D==="tab"&&(R!=null&&R.startsWith("local-"))&&(T!=null&&T.length)&&(x||x===0)){const Y=b.find(V=>D==="tab"&&(R==null?void 0:R.startsWith("local-"))),B=T[x],P=((M=Y==null?void 0:Y.renderdata["key-field"])==null?void 0:M.list)||[],U=((I=Y==null?void 0:Y.renderdata["key-field"])==null?void 0:I.delimiter)||"-",H=P==null?void 0:P.map(V=>B[V]||"").join(U);return{...k,attrvalue:H}}const N=C[k.attrid];let z;return N!=null&&(D==="cascader"&&Array.isArray(N)?z=N.join("|"):Array.isArray(N)&&["range-picker"].includes(D)?z=N.map(Y=>{var B;return((B=Y==null?void 0:Y.format)==null?void 0:B.call(Y,"YYYY-MM-DD"))||Y}).join("~"):Array.isArray(N)?z=N:z=String(N)),{...k,attrvalue:z}}),...C};_(A)},g=({currentSelList:C,tabItems:b,currentActive:x,onSearch:_,setSelList:T})=>{const E=C.map(A=>{var k,D,R,N,z;if(((k=A.renderdata)==null?void 0:k.input)==="tab"&&(b!=null&&b.length)&&(x||x===0)){if((R=(D=A.renderdata)==null?void 0:D.inputType)!=null&&R.startsWith("local-")){const M=C.find(U=>{var H,V,K;return((H=U.renderdata)==null?void 0:H.input)==="tab"&&((K=(V=U.renderdata)==null?void 0:V.inputType)==null?void 0:K.startsWith("local-"))}),I=b[x],Y=((N=M==null?void 0:M.renderdata["key-field"])==null?void 0:N.list)||[],B=((z=M==null?void 0:M.renderdata["key-field"])==null?void 0:z.delimiter)||"-",P=Y==null?void 0:Y.map(U=>(I==null?void 0:I[U])||"").join(B);return{...A,attrvalue:P}}return A}return{...A,attrvalue:""}});T(E),_({"sel-list":E})},d=(C,b)=>{const{label:x,value:_,children:T}=b,E=A=>A.map(k=>{const D={label:k[x],value:k[_],children:[]};return Array.isArray(k[T])&&k[T].length>0&&(D.children=E(k[T])),D});return E(C)},m=C=>{if(typeof C!="string")return!1;try{const b=JSON.parse(C);return Array.isArray(b)}catch{return!1}};return{handleUniversalHeaderToColumns:l,handleSelListToFormItems:i,handleUniversalDelete:c,handleUniversalSearch:p,handleUniversalReset:g,isArrayString:m}}function yL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:p,form:g,langId:d,getTitle:m}=e,C=me.Form.useWatch(p,g),{message:b}=me.App.useApp(),x=r.input,[_,T]=W.useState(e.value),[E,A]=W.useState(!1),[k,D]=W.useState([]),[R,N]=W.useState([]),[z,M]=W.useState(!1),[I,Y]=W.useState({PageNum:1,PageSize:6}),[B,P]=W.useState([]),[U,H]=W.useState(0),[V,K]=W.useState(ne()),{handleUniversalHeaderToColumns:ee}=$2();W.useEffect(()=>{E&&q()},[E,I]);const J=(ae,se)=>{D(ae),N(se)},q=async()=>{var ae,se,ve,we,ce;if(r.inputType==="url"&&(r!=null&&r["action-url"])){M(!0);try{const ye=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...I,...(r==null?void 0:r["action-url-extra-params"])||{}});if((ye==null?void 0:ye.ReturnValue)===0){b.error(ye.msg),M(!1);return}const De=ye==null?void 0:ye.data,Pe=(ae=De==null?void 0:De.list)==null?void 0:ae.map((ze,Ne)=>{const dt=(I.PageNum-1)*I.PageSize+Ne;return{...ze,_rowKey:dt}}),Te=(Pe==null?void 0:Pe.filter(ze=>k.includes(ze._rowKey)))||[];N(Te),P([...Pe||[]]),H((De==null?void 0:De.number)||0),M(!1)}catch{M(!1)}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const ye={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...I};try{const Pe=await l(ye,De);if((Pe==null?void 0:Pe.ReturnValue)===1){const ze=(ve=((se=Pe==null?void 0:Pe.data)==null?void 0:se.list)||[])==null?void 0:ve.map((Ne,dt)=>{const Xe=(I.PageNum-1)*I.PageSize+dt;return{...Ne,_rowKey:Xe}});H(((we=Pe==null?void 0:Pe.data)==null?void 0:we.number)||0),P([...ze])}const Te=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Te==null?void 0:Te.ReturnValue)===1){const ze=(ce=Te==null?void 0:Te.data)==null?void 0:ce[r==null?void 0:r["instance-source-number"]],Ne=(ze==null?void 0:ze["universal-header"])||[],dt=(ze==null?void 0:ze["attribute-set-id"])||"",Xe=ee({universalHeader:Ne,attributeSetId:dt,getTitle:m,otherLangPageId:"5000000"})||[];K([...Xe])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error")},te=()=>{var ae;if(!t){if(_){const se=r==null?void 0:r["key-field"],ve=se==null?void 0:se[p],{delimiter:we="-",list:ce=[]}=ve||{};if(!se){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const ye=(ae=_==null?void 0:_.split(we))==null?void 0:ae[0],De=B==null?void 0:B.findIndex(ze=>Object.values(ze).includes(ye));D([De]);break;case"modal-mult-select":const Pe=_==null?void 0:_.split(","),Te=Pe==null?void 0:Pe.map(ze=>{var dt;const Ne=(dt=ze.split(we))==null?void 0:dt[0];return B==null?void 0:B.findIndex(Xe=>Ne.includes((Xe==null?void 0:Xe.typeid)||(Xe==null?void 0:Xe.instanceid)))});D(Te);break}}A(!0)}},Z=async()=>{try{const ae=await xL(R,r,d);T((ae==null?void 0:ae[p])||""),e.onSure(ae),A(!1)}catch(ae){b.error(ae.msg||"参数错误")}},$=()=>{Y({...I,PageNum:1}),A(!1)};function ne(){const ae=r["modal-field-list"];if(!ae)return[];let se=[];for(let ve in ae){let we=ae[ve];const ce={dataIndex:ve,title:we};se=[...se,ce]}return se}const oe=ae=>{Y({...I,PageNum:ae})};return Be(en,{children:[Q(me.Select,{placeholder:Wh({json:r},d),onClick:te,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:E,onOk:Z,onCancel:$,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:V,loading:z,dataSource:B,rowKey:ae=>ae._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:k,onChange:J},pagination:{total:U,current:I.PageNum,pageSize:I.PageSize,onChange:oe}})})||Q(me.Modal,{title:r["modal-caption"],open:E,onOk:Z,onCancel:$,width:r["modal-width"]??600,okButtonProps:{disabled:k.length===0},children:Q(me.Table,{columns:V,loading:z,dataSource:B,rowKey:ae=>ae._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:k,onChange:J},pagination:{total:U,current:I.PageNum,pageSize:I.PageSize,onChange:oe}})})]})}function xL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}let c={};e.forEach(p=>{for(let[g,d]of Object.entries(f)){const m=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=m.map(x=>p==null?void 0:p[x]);c[g]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var aD={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},p=l.prototype;p.isoWeekYear=function(){return c(this).year()},p.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var m,C,b,x,_=c(this),T=(m=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(m).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return _.diff(T,"week")+1},p.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var g=p.startOf;p.startOf=function(d,m){var C=this.$utils(),b=!!C.u(m)||m;return C.p(d)==="isoweek"?b?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):g.bind(this)(d,m)}}})})(aD);const iD=aD.exports;function bL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=me.App.useApp(),g=r.input,[d,m]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[T,E]=W.useState([]),[A,k]=W.useState(!1),[D,R]=W.useState({PageNum:1,PageSize:6}),[N,z]=W.useState([]),[M,I]=W.useState(0),Y=K();W.useEffect(()=>{C&&P()},[C,D]);const B=(J,q)=>{_(J),E(q)},P=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){k(!0);try{const q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((q==null?void 0:q.ReturnValue)===0){p.error(q.msg),k(!1);return}const te=q==null?void 0:q.data,Z=(J=te==null?void 0:te.list)==null?void 0:J.map((ne,oe)=>{const ae=(D.PageNum-1)*D.PageSize+oe;return{...ne,_rowKey:ae}}),$=(Z==null?void 0:Z.filter(ne=>x.includes(ne._rowKey)))||[];E($),z([...Z||[]]),I((te==null?void 0:te.number)||0),k(!1)}catch(q){k(!1),p.error(q.msg||"参数错误")}return}p.error("请配置action-url")},U=()=>{var J,q;if(!t){if(d){const te=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],Z=((q=r==null?void 0:r["key-field"])==null?void 0:q.delimiter)??"-";if(!te.length){p.error("请配置key-field");return}switch(g){case"modal-select":const $=d==null?void 0:d.split("-"),ne=N==null?void 0:N.findIndex(se=>$.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)));_([ne]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),ae=oe==null?void 0:oe.map(se=>{var we;const ve=(we=se.split(Z))==null?void 0:we[0];return N==null?void 0:N.findIndex(ce=>ve.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});_(ae);break}}b(!0)}},H=async()=>{try{const J=await CL(T,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(J.msg||"参数错误")}},V=()=>{R({...D,PageNum:1}),b(!1)};function K(){const J=r["modal-field-list"];let q=[];for(let te in J){let Z=J[te];const $={dataIndex:te,title:Z};q=[...q,$]}return q}const ee=J=>{R({...D,PageNum:J})};return Be(en,{children:[Q(me.Select,{placeholder:Wh({json:r},c),onClick:U,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})||Q(me.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})]})}function CL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const wL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x}=e,[_,T]=W.useState([]),[E,A]=W.useState(d||[]);W.useEffect(()=>{k()},[r.inputType,r.classify,r.data,r.options]);const k=async()=>{const D=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});T(D)};return Q(me.Checkbox.Group,{...l,options:_,value:E,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:D=>{A(D),t==null||t(D)},disabled:i})},_L=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C="10001"})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1),{message:E}=me.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await k(g);else if(e.inputType==="system-dictionary")k(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await R();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},k=async M=>{var I;if(e.classify){T(!0);try{const Y=await c(M,{asctypeid:e.classify});if((I=Y==null?void 0:Y.data)!=null&&I.list&&Array.isArray(Y.data.list)){const B=Y.data.list.map(P=>({label:`${P.dicid||""}-${P.info||""}`,value:`${P.dicid||""}-${P.info||""}`}));x(B)}}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{T(!1)}}},D=(M,I)=>{i&&i(M)},R=async M=>new Promise(async(I,Y)=>{var V,K,ee;const B=((V=e==null?void 0:e["key-field"])==null?void 0:V.list)||[],P=(e==null?void 0:e["search-field"])||[],U=((K=e==null?void 0:e["key-field"])==null?void 0:K.delimiter)||"-";if(!B.length){E.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};M&&(P.forEach(J=>{H[J]=M[J]||""}),H.level=Number(M.level||0)+1||""),T(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((ee=J==null?void 0:J.data)!=null&&ee.list&&Array.isArray(J.data.list)){const q=J.data.list.map(te=>({...te,label:`${te[B[0]]||""}${U}${te[B[1]]||""}`,value:`${te[B[0]]||""}${U}${te[B[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));I(q)}Y([])}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options"),Y([])}finally{Y([]),T(!1)}}),N=async M=>{const I=M[M.length-1],Y=await R(I)||[];return I.children=Y,x([...b]),Y},z=(M,I)=>I.some(Y=>Y.label.toLowerCase().includes(M.toLowerCase()));return Q(me.Cascader,{showSearch:{filter:z},loading:_,placeholder:"请选择",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async M=>{var I;if(M&&(t!=null&&t.length)){const Y=((I=e==null?void 0:e["key-field"])==null?void 0:I.list)||[],B=(e==null?void 0:e["search-field"])||[];if(!Y.length||!B.length){E.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const P=Y.findIndex(V=>V===B[0]);if(P===-1){E.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const U=t.map(V=>V.split("-")[P]||"").filter(Boolean);let H=b;for(const[V,K]of U.entries()){if(V===U.length-1)break;const ee=H.filter(te=>te[B[0]]===K);if(ee.length===0)break;const J=ee[0];if(J.children&&J.children.length>0){H=J.children;continue}H=await N(ee)}}}})},SL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[p,g]=W.useState([]),[d,m]=W.useState(!1);W.useEffect(()=>{(async()=>{var D;if(e.inputType==="url"&&e["action-url"]){m(!0);try{const R=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(D=R==null?void 0:R.data)!=null&&D.list&&Array.isArray(R.data.list)?g(R.data.list):R!=null&&R.data&&Array.isArray(R.data)?g(R.data):Array.isArray(R==null?void 0:R.list)?g(R.list):(R==null?void 0:R.ReturnValue)===1&&(R!=null&&R.data)&&(Array.isArray(R.data)?g(R.data):g([R.data]))}catch{}finally{m(!1)}}else e.data&&Array.isArray(e.data)&&g(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=k=>JSON.stringify(k),b=k=>{const D=C(k);return t===D},x=k=>{if(r)return;const D=C(k);i&&i(D)},_=e["card-image-width"]||200,T=e["card-image-height"]||100,E=e["card-image-field"],A=e["card-info-field"];return Q("div",{style:{...l},children:d?Q("div",{style:{textAlign:"center",padding:"20px"},children:"loading..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"50px"},children:p.map((k,D)=>{const R=b(k);return Be("div",{onClick:()=>x(k),style:{flex:"1 1 auto",width:`${_}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[k[E]&&Q("img",{src:k.picurl,alt:k[A]||"",style:{width:`${_}px`,height:`${T}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:N=>{N.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Be(me.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:R?"none":"1px solid #d9d9d9",backgroundColor:R?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:R&&Q(d8,{style:{fontSize:"12px",color:"#fff"}})}),k[A]||""]})})]},D)})})})},EL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1);W.useEffect(()=>{E()},[e.inputType,e.classify,e.data,e.options]);const E=async()=>{T(!0);const A=await Qh({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,item:e});x(A),T(!1)};return Q(me.Select,{placeholder:Wh({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:_,showSearch:!0,value:f,filterOption:(A,k)=>{var D;return((D=k==null?void 0:k.label)==null?void 0:D.toLowerCase().indexOf(A.toLowerCase()))>=0},options:b,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},DL={customUpload:"myUpload-module_customUpload_7c7d3"},TL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),kL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:p=r==="10001"?"上传文件":"Upload File",onRemove:g,list:d=[],uploadType:m,relatedidKey:C}=e,{message:b}=me.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",_=i==null?void 0:i.input,T=i==null?void 0:i["upload-size"],E=(i==null?void 0:i["upload-max-count"])||1,[A,k]=W.useState(_==="image"?"picture-card":"text"),[D,R]=W.useState([]),[N,z]=W.useState(!1),[M,I]=W.useState("");W.useEffect(()=>{d&&d.length&&R(d)},[d]);const Y=async H=>{m==="image"&&(!H.url&&!H.preview&&(H.preview=await TL(H.originFileObj)),I(H.url||H.preview),z(!0))},B=({fileList:H})=>{R(H),l&&l(H)},P=H=>{if(!T)return!0;const V=H.size/1024/1024<Number(T);return V||b.error(r==="10001"?`请上传不超过${T}MB的文件`:`Please upload files smaller than ${T}MB`),V},U=_==="image"?Be("button",{style:{border:0,background:"none"},type:"button",children:[Q(Nb,{}),Q("div",{style:{marginTop:8},children:"Upload"})]}):Q(en,{children:Q(me.Button,{style:{fontSize:14},icon:Q(Mb,{}),children:p})});return Be(en,{children:[Q(me.Upload,{action:t,beforeUpload:P,listType:A,accept:x,fileList:D,onPreview:Y,data:{[C]:c},maxCount:E,onChange:B,onRemove:g,disabled:f,className:DL.customUpload,children:D.length>=E?null:U}),M&&Q(me.Image,{wrapperStyle:{display:"none"},preview:{visible:N,onVisibleChange:H=>z(H),afterOpenChange:H=>!H&&I("")},src:M})]})},AL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,value:g,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b}=e,[x,_]=W.useState([]);W.useEffect(()=>{T()},[r.inputType,r.classify,r.data,r.options]);const T=async()=>{const E=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:d,interfaceTypeSysDict:m,actionUrlKey:C,actionUrlExtraParams:b,item:r});_(E)};return Q(me.Radio.Group,{...l,options:x,onChange:t,disabled:i,value:g,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};hn.extend(iD);function OL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:p,relatedidKey:g,actionUrlKey:d,actionUrlExtraParams:m,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:_,getTitle:T}=e,E=W.useRef([]),{message:A}=me.App.useApp();W.useEffect(()=>{l&&(E.current=l)},[l]);const k=W.useCallback(U=>Array.isArray(U)?U:(U==null?void 0:U.fileList)??[],[]),D=U=>{f(U)},R=W.useCallback(U=>{var ee,J;const H=(ee=U.json)==null?void 0:ee.input,V=(J=U.json)==null?void 0:J.format,K={};switch(H){case"image":case"file":case"video":case"audio":K.getValueFromEvent=k;break;case"date-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM-DD"),K.getValueProps=q=>({value:q?hn(q):null});break;case"time-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM-DD HH:mm:ss"),K.getValueProps=q=>({value:q?hn(q):null});break;case"week-picker":K.getValueFromEvent=q=>`${q==null?void 0:q.year()}-${hn(q).isoWeek()}周`,K.getValueProps=q=>{if(!q)return{value:null};const[te,Z]=q.split("-"),$=Number(te),ne=Number(Z.replace("周",""));return{value:hn().year($).isoWeek(ne)}};break;case"month-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY-MM"),K.getValueProps=q=>({value:q?hn(q):null});break;case"quarter-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY年第Q季度"),K.getValueProps=q=>({value:q?hn(q,V||"YYYY年第Q季度"):null});break;case"year-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"YYYY"),K.getValueProps=q=>({value:q?hn(q):null});break;case"second-picker":K.getValueFromEvent=q=>q==null?void 0:q.format(V||"HH:mm:ss"),K.getValueProps=q=>({value:q?hn(q,V||"HH:mm:ss"):null});break;case"range-picker":K.getValueFromEvent=q=>q==null?void 0:q.map(te=>te==null?void 0:te.format(V||"YYYY-MM-DD")),K.getValueProps=q=>!(q!=null&&q.length)&&!Array.isArray(q)?{value:null}:{value:(q==null?void 0:q.map(te=>hn(te)))||null};break;case"multiple-date-picker":K.getValueFromEvent=q=>q==null?void 0:q.map(te=>te==null?void 0:te.format(V||"YYYY-MM-DD")),K.getValueProps=q=>({value:(q==null?void 0:q.map(te=>hn(te)))||null});break}return K},[k]),N=W.useCallback(({isActive:U})=>U?Q(b8,{style:{fontSize:18,color:"#999"}}):Q(_8,{style:{fontSize:18,color:"#999"}}),[]),z=(U,H)=>{var V,K,ee,J,q;return Be(me.Flex,{gap:10,vertical:H==="flex",align:"center",children:[Q("span",{children:U.attrname}),((V=U==null?void 0:U.json)==null?void 0:V.instruction)&&H==="icon"&&Q(me.Tooltip,{title:(K=U==null?void 0:U.json)==null?void 0:K.instruction,children:Q(y8,{style:{color:((ee=U==null?void 0:U.json)==null?void 0:ee["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||Q("span",{style:{color:((J=U==null?void 0:U.json)==null?void 0:J["instruction-color"])??"red"},children:(q=U==null?void 0:U.json)==null?void 0:q.instruction})]})},M=W.useCallback(({itemWithJson:U,colNum:H=1,readonly:V=!1,instructionShowMode:K="icon",radioAlign:ee="horizontal",formItemStyle:J,relatedid:q,form:te,defaultWidth:Z=358,parentFormListField:$,isShowLabel:ne=!0})=>{const oe=Dc(U);let ae=U.children||[];Array.isArray(ae==null?void 0:ae[0])&&ae.length&&(ae=ae[0]);const se=ve=>{const we=($==null?void 0:$.parentName)||($==null?void 0:$.name);return we?Array.isArray(we)?[...we,U.attrid,ve.name]:[we,U.attrid,ve.name]:[U.attrid,ve.name]};return Q(me.Col,{span:24/H,children:Q(me.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:ve})=>N({isActive:ve}),items:[{key:U.attrid,label:U.attrname,styles:{header:{paddingLeft:0}},children:Q(me.Form.List,{name:$?Array.isArray($.name)?[...$.name,U.attrid]:[$.name,U.attrid]:U.attrid,initialValue:oe,children:(ve,{add:we,remove:ce})=>Be("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[ve.map(ye=>{const De={...ye,parentName:se(ye)};return Q(me.Card,{style:{width:Z+100},size:"small",title:`${U.attrname} ${ye.name+1}`,extra:!b&&Q(v8,{onClick:()=>{ve.length>1?ce(ye.name):A.warning("至少需要保留一个!")}}),children:(ae||[]).map((Pe,Te)=>Q(W.Fragment,{children:P({item:Pe,readonly:V,colNum:H,instructionShowMode:K,relatedid:q,form:te,defaultWidth:Z,formItemStyle:J,radioAlign:ee,isFormListItem:!0,formListField:De,isShowLabel:!0})},Pe.attrid||`child-${Te}`))},ye.key)}),!b&&Q(me.Flex,{style:{width:200},children:Be(me.Button,{type:"dashed",onClick:()=>we(),block:!0,children:["+ ",_==="10001"?"新增":"Add"]})})]})})}]},U.attrid)})},[N,Dc]),I=W.useCallback(({itemWithJson:U,colNum:H=1,readonly:V=!1,instructionShowMode:K="icon",radioAlign:ee="horizontal",formItemStyle:J,relatedid:q,form:te,defaultWidth:Z=358,isFormListItem:$=!1,formListField:ne,isShowLabel:oe=!0})=>{var ae,se,ve,we,ce,ye,De;if(((ae=U.json)==null?void 0:ae.hide)===!0)return Q(en,{});if(U.attrtype===1)return M({itemWithJson:U,colNum:H,readonly:V,instructionShowMode:K,radioAlign:ee,formItemStyle:J,relatedid:q,form:te,defaultWidth:Z,parentFormListField:ne,isShowLabel:oe});if(U.attrtype===2)return Q(en,{children:"实例信息"});if(U.attrtype===0){const Pe=Dc(U),Te=(se=U.json)==null?void 0:se["default-prompt"],ze=Wh(U,_),{combinations:Ne=[]}=U.json||{};if(Ne!=null&&Ne.length)return Q(me.Col,{span:24/H,children:Q(me.Form.Item,{label:(ve=U==null?void 0:U.json)==null?void 0:ve["combination-name"],required:(we=U.json)==null?void 0:we.must,children:Q(me.Space.Compact,{children:Ne.map((Xe,Zt)=>{var In,Mn,kn,Gt;let sn=Dc(Xe),Tn=Z;const jn={},un=Xe.json.input||"text",It=J==null?void 0:J.find(Kn=>Kn.type===un);if(It){const{width:Kn}=(It==null?void 0:It.style)||{};Kn&&(jn.width=Kn)}const on=(In=Xe==null?void 0:Xe.json)==null?void 0:In["combination-width-ratio"];return on&&(Tn=Z*on),Q(me.Form.Item,{name:ne?Array.isArray(ne.name)?[...ne.name,Xe.attrid]:[ne.name,Xe.attrid]:Xe.attrid,noStyle:!0,initialValue:sn,rules:[...(Mn=Xe.json)!=null&&Mn.must?[{required:!0,message:Te||`${ze}${Xe.attrname}`}]:[],...(kn=U.json)!=null&&kn.regexp?[{pattern:new RegExp(U.json.regexp.replace(/^\/|\/$/g,"")),message:((Gt=U.json)==null?void 0:Gt["regexp-message"])||`${U.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...R(Xe),children:B({item:Xe,readonly:V,formItemStyle:J,radioAlign:ee,relatedid:q,form:te,defaultWidth:Tn,customWidth:jn})},Zt)})})},`${U.attrid}+1`)});const dt=$&&ne?Array.isArray(ne.name)?[...ne.name,U.attrid]:[ne.name,U.attrid]:U.attrid;return Q(me.Col,{span:24/H,children:Q(me.Form.Item,{name:dt,label:oe&&z(U,K)||null,initialValue:Pe,rules:[...(ce=U.json)!=null&&ce.must?[{required:!0,message:`${ze}${U.attrname}`}]:[],...(ye=U.json)!=null&&ye.regexp?[{pattern:new RegExp(U.json.regexp.replace(/^\/|\/$/g,"")),message:((De=U.json)==null?void 0:De["regexp-message"])||`${U.attrname}${_==="10001"?"格式不正确":"Format is incorrect"}`}]:[]],...R(U),children:B({item:U,readonly:V,formItemStyle:J,radioAlign:ee,relatedid:q,form:te,defaultWidth:Z})},U.attrid)})}return null},[z,Dc,R,M]),Y=async U=>{var H;try{const V=(H=U==null?void 0:U.response)==null?void 0:H.data;if(V){if(!r)return;const K=await r({Controlname:"DelFile",PageName:"initializationfile"},V);if((K==null?void 0:K.ReturnValue)!==1)return A.error(K==null?void 0:K.msg),!1}else D(U);return!0}catch{return!1}},B=({item:U,readonly:H=!1,formItemStyle:V=[],radioAlign:K="horizontal",relatedid:ee,form:J,defaultWidth:q=358,customWidth:te={}})=>{var Pe,Te,ze,Ne,dt,Xe,Zt,sn,Tn,jn,un,It,on,In,Mn,kn,Gt,Kn,Ta,Lr,qe,at;const Z=U.json.input||"text",$=((Pe=U.json)==null?void 0:Pe.format)||"",ne=U.attrid,oe=Dc(U),ae=((Te=U.json)==null?void 0:Te["default-prompt"])||"",se=((ze=U.json)==null?void 0:ze["disable-date-goover"])||!1,ve=Wh(U,_),we=U.json.length&&{maxLength:U.json.length}||{},ce=V.find(ct=>ct.type===Z);let ye=(Ne=U.json)==null?void 0:Ne["input-width"];ye&&(ye=x==="table"?Number(ye)-32:ye);const De=ye||q;switch(Z){case"label":return Q(me.Input,{disabled:!0,value:((dt=U.json)==null?void 0:dt["label-value"])||U.attrvalue||((Xe=U.json)==null?void 0:Xe.default)||"-",style:{width:De,...ce==null?void 0:ce.style,...te}});case"text":return Q(me.Input,{placeholder:ae||ve,...we,disabled:H||((Zt=U.json)==null?void 0:Zt.readonly),allowClear:!0,style:{width:De,...ce==null?void 0:ce.style,...te}});case"password":return Q(me.Input.Password,{placeholder:ae||ve,...we,disabled:H||((sn=U.json)==null?void 0:sn.readonly),allowClear:!0,style:{width:De,...ce==null?void 0:ce.style,...te}});case"textarea":return Q(me.Input.TextArea,{allowClear:!0,placeholder:ae||ve,rows:5,...we,disabled:H||((Tn=U.json)==null?void 0:Tn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"number":return Q(me.InputNumber,{controls:!1,placeholder:ae||ve,...we,disabled:H||((jn=U.json)==null?void 0:jn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"select":case"mult-select":return Q(EL,{item:U.json,readonly:H||((un=U.json)==null?void 0:un.readonly),style:{width:De,...ce==null?void 0:ce.style,...te},commonRequestWidthParams:r,commonRequest:i,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:_,onChange:ct=>{J.setFieldValue(U.attrid,ct)}});case"modal-mult-select":case"modal-select":return Q(bL,{style:{width:De,...ce==null?void 0:ce.style,...te},item:U.json,value:U.attrvalue||U.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ct=>{J.setFieldValue(U.attrid,ct)},disabled:H||((It=U.json)==null?void 0:It.readonly),langId:_,CustomModalComponent:C});case"mul-field-modal-select":return Q(yL,{style:{width:De,...ce==null?void 0:ce.style,...te},item:U.json,form:J,attrid:ne,getTitle:T,value:U.attrvalue||U.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async ct=>{J.setFieldsValue(ct)},disabled:H||((on=U.json)==null?void 0:on.readonly),CustomModalComponent:C,langId:_});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const ct={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let Ht;return Z==="date-picker"&&(Ht=se?$6:void 0),Q(me.DatePicker,{showTime:Z==="time-picker",format:$||void 0,picker:ct[Z]||"date",disabled:H||((In=U.json)==null?void 0:In.readonly),disabledDate:Ht,placement:"bottomLeft",style:{width:De,...ce==null?void 0:ce.style,...te}})}case"range-picker":return Q(me.DatePicker.RangePicker,{disabledDate:se?$6:void 0,disabled:H||((Mn=U.json)==null?void 0:Mn.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}});case"multiple-date-picker":return Q(me.DatePicker,{multiple:!0,maxTagCount:((kn=U==null?void 0:U.json)==null?void 0:kn["max-tag-count"])||2,disabled:H||((Gt=U.json)==null?void 0:Gt.readonly)||!1,style:{width:De,...ce==null?void 0:ce.style,...te}});case"radio":return Q(AL,{radioAlign:K,commonRequest:i,commonRequestWidthParams:r,item:U.json,readonly:H||((Kn=U.json)==null?void 0:Kn.readonly),options:we,handleUrlOptions:Tc,value:oe,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:ct=>{J.setFieldValue(U.attrid,ct.target.value)}});case"checkbox":return Q(wL,{radioAlign:K,commonRequest:i,commonRequestWidthParams:r,item:U.json,readonly:H||((Ta=U.json)==null?void 0:Ta.readonly),options:we,value:oe,handleUrlOptions:Tc,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,onChange:ct=>{J.setFieldValue(U.attrid,ct.join(","))}});case"audio":case"file":case"image":case"video":return Q(kL,{action:t&&t("initializationfile"),item:U.json,uploadType:Z,langId:_,list:oe,readonly:H||((Lr=U.json)==null?void 0:Lr.readonly),relatedid:ee,relatedidKey:g,onRemove:ct=>Y(ct)});case"cascader":return Q(_L,{commonRequestWidthParams:r,commonRequest:i,item:U.json,value:U.attrvalue,style:{width:De,...ce==null?void 0:ce.style,...te},interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:_});case"radio-card":return Q(SL,{item:U.json,readonly:H||((qe=U.json)==null?void 0:qe.readonly),onChange:ct=>{J.setFieldValue(U.attrid,ct)},langId:_,commonRequestWidthParams:r});default:return Q(me.Input,{placeholder:ae||ve,...we,showCount:!0,disabled:H||((at=U.json)==null?void 0:at.readonly),style:{width:De,...ce==null?void 0:ce.style,...te}})}},P=({item:U,readonly:H=!1,colNum:V=1,instructionShowMode:K="icon",relatedid:ee,form:J,defaultWidth:q=358,formItemStyle:te,radioAlign:Z="horizontal",isFormListItem:$=!1,formListField:ne,isShowLabel:oe=!0})=>{var ve;const ae=U.info_base64===1?uu(Zh(U.info)):uu(U.info),se={...U,json:{...U==null?void 0:U.json,...ae}};return((ve=se.json)==null?void 0:ve.hide)===!0?null:Q(W.Fragment,{children:I({itemWithJson:se,readonly:H,colNum:V,instructionShowMode:K,relatedid:ee,form:J,defaultWidth:q,formItemStyle:te,radioAlign:Z,isFormListItem:$,formListField:ne,isShowLabel:oe})},se.attrid)};return{handleRenderItem:P,handleSetFormItemInitialValue:Dc}}const RL=W.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:p=[0,0],instructionShowMode:g="flex",defaultWidth:d=358,commonRequestWidthParams:m,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:_="horizontal",interfaceTypeChildren:T="YLLRDetailAttrlist",interfaceTypeDict:E="YLZDDictList",interfaceTypeSysDict:A="YLZDSysConfigList",relatedidKey:k="relatedid",actionUrlKey:D="action-url",actionUrlExtraParams:R={},CustomModalComponent:N,formShowType:z="form",formListItemWidth:M,formListItemName:I,isEdit:Y=!1,langId:B="10001",getTitle:P}=e,U=W.useRef([]),H=K=>{U.current.push(K)},{handleRenderItem:V}=OL({commonRequestWidthParams:m,uploadAction:C,commonRequest:b,updateDelFileList:H,formConfig:t,interfaceTypeChildren:T,interfaceTypeDict:E,interfaceTypeSysDict:A,relatedidKey:k,actionUrlKey:D,actionUrlExtraParams:R,CustomModalComponent:N,isEdit:Y,formShowType:z,langId:B,getTitle:P});return W.useImperativeHandle(r,()=>({getDelFileList:()=>U.current})),Q(en,{children:z==="table"?Q(me.Form.List,{name:I||"customFormList",initialValue:[{}],children:(K,{add:ee,remove:J})=>Q(me.Flex,{className:"custom-form-body",children:Be("div",{className:"custom-form-list",children:[Be(me.Flex,{align:"center",style:{position:"relative",backgroundColor:"#004d32"},children:[Q(me.Flex,{className:"custom-form-list-header",align:"center",children:t==null?void 0:t.map((q,te)=>{var $,ne;const Z=(($=q==null?void 0:q.json)==null?void 0:$["input-width"])&&Number((ne=q==null?void 0:q.json)==null?void 0:ne["input-width"])||d;return Be(me.Flex,{style:{width:Z,flexShrink:0},align:"center",children:[te!==0&&Q("div",{className:"line"}),Q("div",{className:"custom-form-list-header-item",children:q.attrname})]},te)})}),Q("a",{className:"custom-form-list-add-btn",onClick:()=>ee(),children:B==="10001"?"新增":"Add"})]}),K.map(q=>Be(me.Flex,{align:"center",className:"custom-form-list-item-container",children:[Q(me.Flex,{className:"custom-form-list-item",align:"center",children:t==null?void 0:t.map((te,Z)=>{var ne,oe;const $=((ne=te==null?void 0:te.json)==null?void 0:ne["input-width"])&&Number((oe=te==null?void 0:te.json)==null?void 0:oe["input-width"])||d;return Q(me.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:$,flexShrink:0},children:V({item:te,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:(M==null?void 0:M[Z])||d,formItemStyle:x,isFormListItem:!0,formListField:q,isShowLabel:!1})},te.attrid||`child-${Z}`)})}),Q("a",{className:"custom-form-list-del-btn",onClick:()=>J(q.key),children:B==="10001"?"删除":"Delete"})]},q.key))]})})}):Q(me.Row,{gutter:p,children:t.map((K,ee)=>Q(W.Fragment,{children:V({item:K,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:_})},K.attrid||`form-item-${ee}`))})})}),oD=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},kc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default)||"";if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t.map(p=>new Date(p))}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>new Date(p))}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=FL(e.children||[])),t||void 0},lD=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},FL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)},NL=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var m;let p=[];const g=async C=>{var x;let b=[];if(c.classify)try{const _=await r(C,{asctypeid:c.classify});(x=_==null?void 0:_.data)!=null&&x.list&&Array.isArray(_.data.list)&&(b=_.data.list.map(T=>({label:`${T.dicid||""}-${T.info||""}`,value:`${T.dicid||""}-${T.info||""}`})))}catch{me.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],_=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",T=c==null?void 0:c["field-names"];if(!x.length){me.message.error("请配置key-field");return}const E=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(E!=null&&E.data){const A=E==null?void 0:E.data,k=(A==null?void 0:A.list)||[];let D=[];Array.isArray(A)&&(D=A),Array.isArray(k)&&(D=k),T?p=D:p=D.map(R=>({label:lD(R,_,x),value:lD(R,_,x)}))}}catch{me.message.error("加载选项失败")}};return c.inputType==="local"?(p=((m=c.data)==null?void 0:m.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(p=c.options)):c.inputType==="dictionary"?p=await g(t):c.inputType==="system-dictionary"&&(p=await g(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),p};function ML(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,commonRequest:f,CustomModalComponent:c,attrid:p,form:g,langId:d,getTitle:m}=e,C=me.Form.useWatch(p,g),{message:b}=me.App.useApp(),x=r.input,{handleUniversalHeaderToColumns:_}=$2(),[T,E]=W.useState(e.value),[A,k]=W.useState(!1),[D,R]=W.useState([]),[N,z]=W.useState([]),[M,I]=W.useState(!1),[Y,B]=W.useState({PageNum:1,PageSize:6}),[P,U]=W.useState([]),[H,V]=W.useState(0),[K,ee]=W.useState(ne());W.useEffect(()=>{A&&q()},[A,Y]);const J=(ae,se)=>{R(ae),z(se)},q=async()=>{var ae,se,ve,we,ce;if(r.inputType==="url"&&(r!=null&&r["action-url"])){I(!0);try{const ye=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...Y,...(r==null?void 0:r["action-url-extra-params"])||{}});if((ye==null?void 0:ye.ReturnValue)===0){b.error(ye.msg),I(!1);return}const De=ye==null?void 0:ye.data,Pe=(ae=De==null?void 0:De.list)==null?void 0:ae.map((ze,Ne)=>{const dt=(Y.PageNum-1)*Y.PageSize+Ne;return{...ze,_rowKey:dt}}),Te=(Pe==null?void 0:Pe.filter(ze=>D.includes(ze._rowKey)))||[];z(Te),U([...Pe||[]]),V((De==null?void 0:De.number)||0),I(!1)}catch(ye){I(!1),b.error(d==="10001"?ye.msg||"参数错误":"Failed to load data")}return}if(r.inputType==="instance-url"&&(r!=null&&r["instance-source-number"])){const ye={PageName:"PCInstanceData",Controlname:"List",InterfaceType:"YLFWLRDataList"},De={"source-number":r==null?void 0:r["instance-source-number"],...Y};try{const Pe=await l(ye,De);if((Pe==null?void 0:Pe.ReturnValue)===1){const ze=(ve=((se=Pe==null?void 0:Pe.data)==null?void 0:se.list)||[])==null?void 0:ve.map((Ne,dt)=>{const Xe=(Y.PageNum-1)*Y.PageSize+dt;return{...Ne,_rowKey:Xe}});V(((we=Pe==null?void 0:Pe.data)==null?void 0:we.number)||0),U([...ze])}const Te=await f("YLKHDSelPCParam",{"source-number":r==null?void 0:r["instance-source-number"]});if((Te==null?void 0:Te.ReturnValue)===1){const ze=(ce=Te==null?void 0:Te.data)==null?void 0:ce[r==null?void 0:r["instance-source-number"]],Ne=(ze==null?void 0:ze["universal-header"])||[],dt=(ze==null?void 0:ze["attribute-set-id"])||"",Xe=_({universalHeader:Ne,attributeSetId:dt,getTitle:m,otherLangPageId:"5000000"})||[];ee([...Xe])}}catch{}return}b.error(d==="10001"?"参数配置错误":"Parameter configuration error"),b.error(d==="10001"?"请配置action-url":"Please configure action-url")},te=()=>{var ae;if(!t){if(T){const se=r==null?void 0:r["key-field"],ve=se==null?void 0:se[p],{delimiter:we="-",list:ce=[]}=ve||{};if(!se){b.error(d==="10001"?"请配置key-field":"Please configure key-field");return}switch(x){case"mul-field-modal-select":const ye=(ae=T==null?void 0:T.split(we))==null?void 0:ae[0],De=P==null?void 0:P.findIndex(ze=>Object.values(ze).includes(ye));R([De]);break;case"modal-mult-select":const Pe=T==null?void 0:T.split(","),Te=Pe==null?void 0:Pe.map(ze=>{var dt;const Ne=(dt=ze.split(we))==null?void 0:dt[0];return P==null?void 0:P.findIndex(Xe=>Ne.includes((Xe==null?void 0:Xe.typeid)||(Xe==null?void 0:Xe.instanceid)))});R(Te);break}}k(!0)}},Z=async()=>{try{const ae=await PL(N,r);E((ae==null?void 0:ae[p])||""),e.onSure(ae),k(!1)}catch(ae){b.error(d==="10001"?ae.msg||"参数错误":"Failed to load data")}},$=()=>{B({...Y,PageNum:1}),k(!1)};function ne(){const ae=r["modal-field-list"];let se=[];for(let ve in ae){let we=ae[ve];const ce={dataIndex:ve,title:we};se=[...se,ce]}return se}const oe=ae=>{B({...Y,PageNum:ae})};return Be(en,{children:[Q(me.Select,{placeholder:d==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:te,open:!1,value:C,disabled:t,style:i}),c&&Q(c,{title:r["modal-caption"]||"",open:A,onOk:Z,onCancel:$,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:K,loading:M,dataSource:P,rowKey:ae=>ae._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:J},pagination:{total:H,current:Y.PageNum,pageSize:Y.PageSize,onChange:oe}})})||Q(me.Modal,{title:r["modal-caption"],open:A,onOk:Z,onCancel:$,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:Q(me.Table,{columns:K,loading:M,dataSource:P,rowKey:ae=>ae._rowKey,rowSelection:{type:x==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:J},pagination:{total:H,current:Y.PageNum,pageSize:Y.PageSize,onChange:oe}})})]})}function PL(e,r){return new Promise((t,i)=>{try{var l=r["key-field"];if(!l){i({msg:"请配置key-field"});return}let f={};e.forEach(c=>{for(let[p,g]of Object.entries(l)){const d=(g==null?void 0:g.list)??[],m=(g==null?void 0:g.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[p]=C.join(m)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function BL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=me.App.useApp(),g=r.input,[d,m]=W.useState(e.value),[C,b]=W.useState(!1),[x,_]=W.useState([]),[T,E]=W.useState([]),[A,k]=W.useState(!1),[D,R]=W.useState({PageNum:1,PageSize:6}),[N,z]=W.useState([]),[M,I]=W.useState(0),Y=K();W.useEffect(()=>{C&&P()},[C,D]);const B=(J,q)=>{_(J),E(q)},P=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){k(!0);try{const q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...D});if((q==null?void 0:q.ReturnValue)===0){p.error(q.msg),k(!1);return}const te=q==null?void 0:q.data,Z=(J=te==null?void 0:te.list)==null?void 0:J.map((ne,oe)=>{const ae=(D.PageNum-1)*D.PageSize+oe;return{...ne,_rowKey:ae}}),$=(Z==null?void 0:Z.filter(ne=>x.includes(ne._rowKey)))||[];E($),z([...Z||[]]),I((te==null?void 0:te.number)||0),k(!1)}catch(q){k(!1),p.error(c==="10001"?q.msg||"参数错误":"Failed to load data")}return}p.error(c==="10001"?"请配置action-url":"Please configure action-url")},U=()=>{var J,q;if(!t){if(d){const te=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],Z=((q=r==null?void 0:r["key-field"])==null?void 0:q.delimiter)??"-";if(!te.length){p.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(g){case"modal-select":const $=d==null?void 0:d.split("-"),ne=N==null?void 0:N.findIndex(se=>$.includes((se==null?void 0:se.typeid)||(se==null?void 0:se.instanceid)));_([ne]);break;case"modal-mult-select":const oe=d==null?void 0:d.split(","),ae=oe==null?void 0:oe.map(se=>{var we;const ve=(we=se.split(Z))==null?void 0:we[0];return N==null?void 0:N.findIndex(ce=>ve.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});_(ae);break}}b(!0)}},H=async()=>{try{const J=await LL(T,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(c==="10001"?J.msg||"参数错误":"Failed to build value")}},V=()=>{R({...D,PageNum:1}),b(!1)};function K(){const J=r["modal-field-list"];let q=[];for(let te in J){let Z=J[te];const $={dataIndex:te,title:Z};q=[...q,$]}return q}const ee=J=>{R({...D,PageNum:J})};return Be(en,{children:[Q(me.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:U,value:d,open:!1,disabled:t,style:i}),f&&Q(f,{title:r["modal-caption"]||"",open:C,onOk:H,onCancel:V,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})||Q(me.Modal,{title:r["modal-caption"],open:C,onOk:H,onCancel:V,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:Q(me.Table,{columns:Y,loading:A,dataSource:N,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:B},pagination:{total:M,current:D.PageNum,pageSize:D.PageSize,onChange:ee}})})]})}function LL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const zL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:_}=e;me.App.useApp();const[T,E]=W.useState([]),[A,k]=W.useState(d||[]);W.useEffect(()=>{D()},[r.inputType,r.classify,r.data,r.options]);const D=async()=>{const R=await Qh({commonRequestWidthParams:c,commonRequest:p,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,item:r});E(R)};return Q(me.Checkbox.Group,{...l,options:T,value:A,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:R=>{k(R),t==null||t(R)},disabled:i})},UL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=W.useState([]),[_,T]=W.useState(!1),{message:E}=me.App.useApp();W.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await k(g);else if(e.inputType==="system-dictionary")k(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await R();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(I=>({label:I,value:I})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},k=async M=>{var I;if(e.classify){T(!0);try{const Y=await c(M,{asctypeid:e.classify});if((I=Y==null?void 0:Y.data)!=null&&I.list&&Array.isArray(Y.data.list)){const B=Y.data.list.map(P=>({label:`${P.dicid||""}-${P.info||""}`,value:`${P.dicid||""}-${P.info||""}`}));x(B)}}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{T(!1)}}},D=(M,I)=>{i&&i(M)},R=async M=>new Promise(async(I,Y)=>{var V,K,ee;const B=((V=e==null?void 0:e["key-field"])==null?void 0:V.list)||[],P=(e==null?void 0:e["search-field"])||[],U=((K=e==null?void 0:e["key-field"])==null?void 0:K.delimiter)||"-";if(!B.length){E.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const H={[d]:e==null?void 0:e["action-url"],...m};M&&(P.forEach(J=>{H[J]=M[J]||""}),H.level=Number(M.level||0)+1||""),T(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},H);if((ee=J==null?void 0:J.data)!=null&&ee.list&&Array.isArray(J.data.list)){const q=J.data.list.map(te=>({...te,label:`${te[B[0]]||""}${U}${te[B[1]]||""}`,value:`${te[B[0]]||""}${U}${te[B[1]]||""}`,children:[],isLeaf:(te==null?void 0:te.subcount)===0}));I(q)}Y([])}catch{E.error(C==="10001"?"加载选项失败":"Failed to load options"),Y([])}finally{Y([]),T(!1)}}),N=async M=>{const I=M[M.length-1],Y=await R(I)||[];return I.children=Y,x([...b]),Y},z=(M,I)=>I.some(Y=>Y.label.toLowerCase().includes(M.toLowerCase()));return Q(me.Cascader,{showSearch:{filter:z},loading:_,placeholder:C==="10001"?"请选择":"Please select",loadData:N,disabled:r,onChange:D,style:{...l},options:b,value:t,onOpenChange:async M=>{var I;if(M&&(t!=null&&t.length)){const Y=((I=e==null?void 0:e["key-field"])==null?void 0:I.list)||[],B=(e==null?void 0:e["search-field"])||[];if(!Y.length||!B.length){E.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const P=Y.findIndex(V=>V===B[0]);if(P===-1){E.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const U=t.map(V=>V.split("-")[P]||"").filter(Boolean);let H=b;for(const[V,K]of U.entries()){if(V===U.length-1)break;const ee=H.filter(te=>te[B[0]]===K);if(ee.length===0)break;const J=ee[0];if(J.children&&J.children.length>0){H=J.children;continue}H=await N(ee)}}}})},jL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,p]=W.useState([]),[g,d]=W.useState(!1);W.useEffect(()=>{(async()=>{var k;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const D=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(k=D==null?void 0:D.data)!=null&&k.list&&Array.isArray(D.data.list)?p(D.data.list):D!=null&&D.data&&Array.isArray(D.data)?p(D.data):Array.isArray(D==null?void 0:D.list)?p(D.list):(D==null?void 0:D.ReturnValue)===1&&(D!=null&&D.data)&&(Array.isArray(D.data)?p(D.data):p([D.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&p(e.data)})()},[e.inputType,e["action-url"],e.data]);const m=A=>JSON.stringify(A),C=A=>{const k=m(A);return t===k},b=A=>{if(r)return;const k=m(A);i&&i(k)},x=e["card-image-width"]||200,_=e["card-image-height"]||100,T=e["card-image-field"],E=e["card-info-field"];return Q("div",{style:{...l},children:g?Q("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):Q("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((A,k)=>{const D=C(A);return Be("div",{onClick:()=>b(A),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[T]&&Q("img",{src:A.picurl,alt:A[E]||"",style:{width:`${x}px`,height:`${_}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:R=>{R.currentTarget.style.display="none"}}),Q("div",{style:{fontSize:"14px",color:"#333333"},children:Be(me.Space,{size:6,children:[Q("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:D?"none":"1px solid #d9d9d9",backgroundColor:D?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:D&&Q(d8,{style:{fontSize:"12px",color:"#fff"}})}),A[E]||""]})})]},k)})})})},QQ="";function Xh(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Mi(){}const Jh=Object.assign,Ac=typeof window<"u";function Jr(e){return e!=null}function Oc(e){return typeof e=="function"}function IL(e){return cd(e)&&Oc(e.then)&&Oc(e.catch)}function cd(e){return e!==null&&typeof e=="object"}function sD(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function Y2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+Y2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?Y2(e,i):""),""):""}function HL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${Y2(r,t)}`)}function wn(e,r){return e=`${r||"rv"}-${e}`,[HL(e),e]}function VL(e){e.stopPropagation()}function q2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&VL(e)}const $L={click:"onClick"};function uD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=$L[i];t[l]=function(f){var c,p;f.stopPropagation(),(p=(c=r.props)[l])===null||p===void 0||p.call(c,f)}}return W.cloneElement(r,t)}const fd=Ac?window:global;let cD=Date.now();function YL(e){const r=Date.now(),t=Math.max(0,16-(r-cD)),i=setTimeout(e,t);return cD=r+t,i}function G2(e){return(fd.requestAnimationFrame||YL).call(fd,e)}function qL(){return Ac?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function GL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function KL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function WL(e){fD(window,e)}function fD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const QL=qL();function dD(){QL&&WL(KL())}function hD(e){return/^\d+(\.\d+)?$/.test(e)}function pD(e){return Number.isNaN?Number.isNaN(e):e!==e}function dl(e){if(Jr(e))return e=String(e),hD(e)?`${e}px`:e}function ZL(e){if(Jr(e)){const r=dl(e);return{width:r,height:r}}return{}}let K2;function XL(){if(!K2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;K2=parseFloat(r)}return K2}function JL(e){return e=e.replace(/rem/g,""),+e*XL()}function ez(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function tz(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function vD(e){if(typeof e=="number")return e;if(Ac){if(e.indexOf("rem")!==-1)return JL(e);if(e.indexOf("vw")!==-1)return ez(e);if(e.indexOf("vh")!==-1)return tz(e)}return parseFloat(e)}function ep(e,r,t){return Math.min(Math.max(e,r),t)}function mD(e,r,t){const i=e.indexOf(r);return i===-1?e:r==="-"&&i!==0?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(t,"")}function nz(e,r=!0,t=!0){r?e=mD(e,".",/\./g):e=e.split(".")[0],t?e=mD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function hl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let gD=!1;if(Ac)try{const e={};Object.defineProperty(e,"passive",{get(){gD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function W2(e,r,t={}){if(!Ac)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let p;const g=()=>{const m=Xh(i);m&&!p&&(m.addEventListener(e,r,gD?{capture:f,passive:l}:f),p=!0)},d=()=>{const m=Xh(i);m&&p&&(m.removeEventListener(e,r,f),p=!1)};W.useEffect(()=>(g(),()=>d()),[i,...c])}function Q2(e){const[r,t]=W.useState(e),i=W.useRef(r),l=W.useCallback(f=>{t(c=>i.current=Oc(f)?f(c):f)},[r]);return[r,l,i]}const rz=()=>{const e=W.useRef(!1);return W.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},yD=(e={})=>{const r=rz(),[t,i,l]=Q2(e),f=W.useCallback(c=>{r.current||i(p=>Object.assign(Object.assign({},p),Oc(c)?c(p):c))},[]);return[t,f,l]},Rc=(e,r)=>{const t=W.useRef(!1);W.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function xD(e){const r=W.useRef(e);return r.current=e,r}const az=process.env.NODE_ENV==="development";function eZ(e,r){}const bD=e=>{process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=xD(e);W.useEffect(()=>()=>{r.current()},[])};function CD(e,r){if(e===r)return!0;for(let t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}const iz=(e=>(t,i,l)=>{const f=W.useRef(!1),c=W.useRef([]),p=W.useRef([]),g=W.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Xh(b));if(!f.current){f.current=!0,c.current=C,p.current=i,g.current=t();return}(C.length!==c.current.length||!CD(C,c.current)||!CD(i,p.current))&&((d=g.current)===null||d===void 0||d.call(g),c.current=C,p.current=i,g.current=t())}),bD(()=>{var d;(d=g.current)===null||d===void 0||d.call(g),f.current=!1})})(W.useEffect);function oz(e,r){const[t,i]=W.useState(),[l,f]=W.useState();return iz(()=>{const c=Xh(e);if(!c)return;const p=new IntersectionObserver(g=>{for(const d of g)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Xh(r==null?void 0:r.root)}));return p.observe(c),()=>{p.disconnect()}},[],e),[t,l]}const wD=10;function lz(e,r){return e>r&&e>wD?"horizontal":r>e&&r>wD?"vertical":""}function _D(){const e=W.useRef(0),r=W.useRef(0),t=W.useRef(0),i=W.useRef(0),l=W.useRef(0),f=W.useRef(0),c=W.useRef(""),p=W.useRef(null),g=()=>c.current==="vertical",d=()=>c.current==="horizontal",m=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",p.current=null};return{move:x=>{const _=x.touches[0];t.current=_.clientX<0?0:_.clientX-e.current,i.current=_.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),p.current===null?p.current=!0:p.current=!1,c.current||(c.current=lz(l.current,f.current))},start:x=>{m(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:m,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:g,isHorizontal:d,firstMove:p}}const SD=/scroll|auto/i,sz=Ac?window:void 0;function uz(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function cz(e,r=sz){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&uz(t);){const{overflowY:i}=window.getComputedStyle(t);if(SD.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(SD.test(l))return t}t=t.parentNode}return r}const fz=e=>(r,t)=>{const i=W.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},tp=Ac?W.useLayoutEffect:W.useEffect,dz=fz(tp),ED=()=>{const[,e]=W.useState({});return W.useCallback(()=>e({}),[])};function DD(e){process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const r=W.useRef(e);r.current=W.useMemo(()=>e,[e]);const t=W.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function np(e){const{value:r,defaultValue:t,onChange:i}=e,l=ED(),f=W.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=DD((p,g)=>{const d=typeof p=="function"?p(f.current):p;!g&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const iZ="";function $a(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t}function Z2(e,r,t,i){function l(f){return f instanceof t?f:new t(function(c){c(f)})}return new(t||(t=Promise))(function(f,c){function p(m){try{d(i.next(m))}catch(C){c(C)}}function g(m){try{d(i.throw(m))}catch(C){c(C)}}function d(m){m.done?f(m.value):l(m.value).then(p,g)}d((i=i.apply(e,r||[])).next())})}const oZ="",hz=({bem:e})=>Q(en,{children:Array(12).fill(null).map((r,t)=>Q("i",{className:Re(e("line",String(t+1)))},t))}),pz=({bem:e})=>Q("svg",Object.assign({className:Re(e("circular")),viewBox:"25 25 50 50"},{children:Q("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),vz=({bem:e})=>Be("div",Object.assign({className:Re(e("ball"))},{children:[Q("div",{}),Q("div",{}),Q("div",{})]})),mz=e=>({spinner:Q(hz,{bem:e}),circular:Q(pz,{bem:e}),ball:Q(vz,{bem:e})}),[Ng]=wn("loading"),X2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:p,textSize:g}=e,d=W.useMemo(()=>Object.assign({color:l},ZL(f)),[l,f]),m=()=>p?Q("span",Object.assign({className:Re(Ng("text")),style:{fontSize:dl(g),color:c??l}},{children:p})):null;return Be("div",Object.assign({className:Re(r,Ng([t,{vertical:i}])),style:e.style},{children:[Q("span",Object.assign({className:Re(Ng("spinner",t)),style:d},{children:mz(Ng)[t]})),m()]}))},gz="#fff",rp="rv-hairline",yz=`${rp}--top`,xz=`${rp}--left`,bz=`${rp}--surround`,Cz=`${rp}--top-bottom`,wz=`${rp}-unset--top-bottom`,TD="rv-shadow",_z="__REACT_VANT_COMPONENT",kD=W.createContext({}),[ap]=wn("button"),Sz=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:p,plain:g,block:d,loadingType:m,nativeType:C,iconPosition:b}=e,x=$a(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:_}=W.useContext(kD),T=W.useMemo(()=>e.size||(_==null?void 0:_.size)||"normal",[_==null?void 0:_.size,e.size]),E=W.useMemo(()=>e.type||(_==null?void 0:_.type)||"default",[_==null?void 0:_.type,e.type]),A=W.useMemo(()=>g??(_==null?void 0:_.plain),[_==null?void 0:_.plain,g]),k=W.useMemo(()=>d??(_==null?void 0:_.block),[_==null?void 0:_.block,d]),D=W.useMemo(()=>b||(_==null?void 0:_.iconPosition)||"left",[_==null?void 0:_.iconPosition,b]),R=W.useMemo(()=>{var K;return(K=e.disabled)!==null&&K!==void 0?K:_==null?void 0:_.disabled},[_==null?void 0:_.disabled,e.disabled]),N=W.useMemo(()=>C||(_==null?void 0:_.nativeType)||"button",[_==null?void 0:_.nativeType,C]),M=W.useMemo(()=>e.tag||(_==null?void 0:_.tag)||"button",[_==null?void 0:_.tag,e.tag]),I=Re(i,ap([E,T,{plain:A,loading:t,disabled:R,hairline:l,block:k,round:c,square:p}]),{[bz]:l},e.shadow&&`${TD}--${+e.shadow}`),Y=Object.assign({},e.style);r&&(Y.color=A?r:gz,A||(Y.background=r),r.indexOf("gradient")!==-1?Y.border=0:Y.borderColor=r);const B=K=>{!t&&!R&&e.onClick&&e.onClick(K)},P=()=>{if(t){const{loadingSize:K="20px"}=e;return Q(X2,{className:Re(ap("loading")),size:K,type:m,color:E==="default"?void 0:""})}return null},U=()=>e.loading?P():e.icon?W.cloneElement(e.icon,{className:Re(ap("icon"))}):null,H=()=>{let K;return t?K=f:K=e.children||e.text,K?Q("span",Object.assign({className:Re(ap("text"))},{children:K}),"text"):null};return Q(M,Object.assign({},x,{disabled:R,className:I,style:Y,type:N,onClick:B},{children:(()=>Be("div",Object.assign({className:Re(ap("content"))},{children:[D==="left"&&U(),H(),D==="right"&&U()]})))()}))},[Ez]=wn("button-group"),ip=Object.assign(Sz,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=$a(e,["className","style","children","onClick"]);return Q("div",Object.assign({onClick:p=>{f.disabled||l==null||l(p)},style:t,className:Re(r,Ez([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${TD}--${+f.shadow}`)},{children:Q(kD.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),dZ="";function ea(...e){const r=Object.assign({},e[0]);return e.forEach(t=>{for(const i in t){const l=t[i];r[i]=r.hasOwnProperty(i)?r[i]:l}}),r}const[AD]=wn("badge"),Dz=e=>{const r=ea(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,p=c,g=()=>r.content?!0:Jr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&g()?Jr(i)&&hD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,m=()=>{if(g()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=dl(x),C.right=dl(b)):(C.marginTop=dl(x),C.marginLeft=dl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),Q("div",Object.assign({className:Re({[r.className]:r.className&&!r.children},AD({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Be(p,Object.assign({className:Re(AD("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,m()]})):m()},pZ="";var Tz=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};function kz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const ls=W.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:p,onClick:g,children:d}=e,m=Tz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?kz(t):void 0;let x=p;x===void 0&&g&&(x=-1);const _=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:g,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},m);return W.cloneElement(d,_)}),Az=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M494.094 733.426a41.472 41.472 0 01-20.023-11.126L140.16 388.388c-16.272-16.271-16.272-42.653 0-58.925 16.271-16.272 42.653-16.272 58.925 0L503.66 634.037 808.186 329.51c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L533.2 722.347c-10.607 10.607-25.508 14.3-39.106 11.08z",fillRule:"evenodd"})),Oz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Me.createElement(Az,null))),Rz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 01-11.127-20.023z",fillRule:"evenodd"})),Fz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Me.createElement(Rz,null))),Nz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M513.176 285.05a41.472 41.472 0 0120.024 11.127L867.11 630.089c16.272 16.271 16.272 42.653 0 58.925s-42.654 16.272-58.925 0L503.612 384.44 199.085 688.967c-16.272 16.271-42.654 16.271-58.925 0-16.272-16.272-16.272-42.654 0-58.926L474.07 296.129c10.606-10.606 25.508-14.299 39.105-11.078z",fillRule:"evenodd"})),Mz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Me.createElement(Nz,null))),Pz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M711.156 508.035a41.472 41.472 0 01-11.126 20.023L366.12 861.97c-16.272 16.272-42.654 16.272-58.926 0s-16.272-42.654 0-58.926L611.767 498.47 307.241 193.944c-16.272-16.272-16.272-42.654 0-58.926 16.271-16.272 42.653-16.272 58.925 0L700.078 468.93c10.606 10.606 14.299 25.508 11.078 39.105z",fillRule:"evenodd"})),Bz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgArrow"},e,{ref:r}),Me.createElement(Pz,null))),Lz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M500 55.556c245.46 0 444.444 198.984 444.444 444.444S745.46 944.444 500 944.444 55.556 745.46 55.556 500 254.54 55.556 500 55.556zm176.441 267.887c-10.848-10.848-28.436-10.848-39.284 0L499.665 460.936 362.172 323.443c-10.848-10.848-28.436-10.848-39.284 0-10.848 10.848-10.848 28.436 0 39.284L460.38 500.22 322.888 637.713c-10.848 10.848-10.848 28.436 0 39.284 10.848 10.848 28.436 10.848 39.284 0l137.493-137.493 137.492 137.493c10.848 10.848 28.436 10.848 39.284 0 10.848-10.848 10.848-28.436 0-39.284L538.948 500.22l137.493-137.493c10.848-10.848 10.848-28.436 0-39.284z",fillRule:"evenodd"})),Mg=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgClear"},e,{ref:r}),Me.createElement(Lz,null))),zz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M560.149 501.223l255.344 255.344c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L501.223 560.149 245.88 815.493c-16.272 16.272-42.654 16.272-58.925 0-16.272-16.272-16.272-42.654 0-58.926l255.344-255.344L186.954 245.88c-16.272-16.272-16.272-42.654 0-58.925 16.271-16.272 42.653-16.272 58.925 0l255.344 255.344 255.344-255.344c16.272-16.272 42.654-16.272 58.926 0 16.272 16.271 16.272 42.653 0 58.925L560.149 501.223z",fillRule:"nonzero"})),J2=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgCross"},e,{ref:r}),Me.createElement(zz,null))),Uz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M537.5 537.5v325c0 20.71-16.79 37.5-37.5 37.5s-37.5-16.79-37.5-37.5v-325h-325c-20.71 0-37.5-16.79-37.5-37.5s16.79-37.5 37.5-37.5h325v-325c0-20.71 16.79-37.5 37.5-37.5s37.5 16.79 37.5 37.5v325h325c20.71 0 37.5 16.79 37.5 37.5s-16.79 37.5-37.5 37.5h-325z",fillRule:"nonzero"})),jz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgPlus"},e,{ref:r}),Me.createElement(Uz,null))),Iz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M500 888.889c-214.389 0-388.889-174.5-388.889-388.889S285.611 111.111 500 111.111 888.889 285.611 888.889 500 714.389 888.889 500 888.889m0-833.333c-245.444 0-444.444 199-444.444 444.444 0 245.444 199 444.444 444.444 444.444 245.444 0 444.444-199 444.444-444.444 0-245.444-199-444.444-444.444-444.444m6.456 222.222c-44.612 0-80 12.778-105.612 39.055-26.277 25.667-39.055 60.445-39.055 105.056v1c0 17.944 14.444 32.444 32.389 32.444 17.889 0 32.389-14.5 32.389-32.444 0-.389-.111-1-.111-1 0-26.945 5.444-48.222 16.444-62.889 12.222-17.111 32.333-25.667 59.889-25.667 21.944 0 39.055 6.111 51.222 18.334 11.611 12.222 17.778 28.722 17.778 50.055 0 15.89-5.556 30.5-16.556 44.556l-10.389 11.61c-37.777 33.556-60.333 59-69.61 75.668-13.834 24.944-11.334 48-11.334 48 0 17.888 14.556 32.388 32.444 32.388 17.945 0 29.778-12.333 32.39-32.388 0 0 3.333-18.667 10.055-30.89 5.5-10.944 14.055-21.388 25-31.11 29.389-25.056 46.444-40.945 51.889-47.667 14.666-19.5 22.555-44.556 22.555-74.445 0-36.61-12.166-65.944-35.944-87.333-24.445-21.944-56.167-32.333-95.833-32.333m-10.417 357.15c-12.778 0-23.222 3.666-31.111 12.222-9.222 7.889-13.5 18.333-13.5 31.111 0 12.222 4.278 22.611 13.5 31.167 7.889 8.5 18.333 12.778 31.11 12.778 12.279 0 23.223-4.278 32.39-12.167 8.5-8.611 12.778-18.945 12.778-31.778 0-12.778-4.278-23.222-12.778-31.111-8.556-8.556-19.556-12.222-32.39-12.222",fillRule:"evenodd"})),Hz=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Me.createElement(Iz,null))),Vz=e=>Me.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Me.createElement("path",{d:"M119.415 524.046c-9.708-9.693-11.278-24.766-2.72-35.554l20.007-25.223c8.201-10.34 23.543-12.936 34.386-5.699l173.175 115.585c9.134 6.097 24.856 5.303 33.384-1.616l457.6-371.25c10.286-8.345 26.397-7.634 35.412 1.368l11.272 11.255c9.81 9.795 9.096 25.343-1.187 35.611l-491.14 490.414c-15.28 15.258-40.369 14.59-56.099-1.116l-214.09-213.775z",fillRule:"nonzero"})),OD=Me.forwardRef((e,r)=>Me.createElement(ls,Object.assign({name:"SvgSuccess"},e,{ref:r}),Me.createElement(Vz,null))),EZ="",[RD]=wn("cell-group"),$z=e=>{const r=ea(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,p=()=>Q("div",Object.assign({className:Re(RD({inset:c}),{[Cz]:!c&&i})},{children:r.children})),g=()=>t?Q("div",Object.assign({className:Re(RD("title"))},{children:t})):null;return Be("div",Object.assign({className:r.className,style:r.style},{children:[g(),p()]}))},[dd]=wn("cell"),eC=Object.assign(e=>{const r=()=>Jr(e.label)?Q("div",Object.assign({className:Re(dd("label"),e.labelClass)},{children:e.label})):null,t=()=>Jr(e.title)?Be("div",Object.assign({className:Re(dd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const E=Jr(e.title);return Jr(e.children)||Jr(e.value)?Q("div",Object.assign({className:Re(dd("value",{alone:!E}),e.valueClass)},{children:Jr(e.children)?e.children:Q("span",{children:e.value})})):null},l=()=>e.icon?W.cloneElement(e.icon,{className:Re(dd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const E=Re(dd("right-icon"));return e.arrowDirection==="left"?Q(Fz,{className:E}):e.arrowDirection==="up"?Q(Mz,{className:E}):e.arrowDirection==="down"?Q(Oz,{className:E}):Q(Bz,{className:E})}return null},{className:c,style:p,size:g,center:d,border:m=!0,isLink:C,required:b,onClick:x}=e,_=C||e.clickable,T={center:d,required:b,clickable:_,borderless:!m};return g&&(T[g]=!!g),Be("div",Object.assign({style:p,className:Re(dd(T),c),role:_?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:$z}),AZ="",OZ="";function Pg(e,r){return Pg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Pg(e,r)}function FD(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Yz(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function qz(e,r){e.classList?e.classList.add(r):Yz(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function ND(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Gz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=ND(e.className,r):e.setAttribute("class",ND(e.className&&e.className.baseVal||"",r))}const MD={disabled:!1};var Kz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.number,wt.exports.shape({enter:wt.exports.number,exit:wt.exports.number,appear:wt.exports.number}).isRequired]):null,Wz=process.env.NODE_ENV!=="production"?wt.exports.oneOfType([wt.exports.string,wt.exports.shape({enter:wt.exports.string,exit:wt.exports.string,active:wt.exports.string}),wt.exports.shape({enter:wt.exports.string,enterDone:wt.exports.string,enterActive:wt.exports.string,exit:wt.exports.string,exitDone:wt.exports.string,exitActive:wt.exports.string})]):null;const PD=W.createContext(null);var op="unmounted",Fc="exited",Nc="entering",hd="entered",tC="exiting",ss=function(e){FD(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,p=c&&!c.isMounting?i.enter:i.appear,g;return f.appearStatus=null,i.in?p?(g=Fc,f.appearStatus=Nc):g=hd:i.unmountOnExit||i.mountOnEnter?g=op:g=Fc,f.state={status:g},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===op?{status:Fc}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(l){var f=null;if(l!==this.props){var c=this.state.status;this.props.in?c!==Nc&&c!==hd&&(f=Nc):(c===Nc||c===hd)&&(f=tC)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,p;return f=c=p=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,p=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:p}},t.updateStatus=function(l,f){l===void 0&&(l=!1),f!==null?(this.cancelNextCallback(),f===Nc?this.performEnter(l):this.performExit()):this.props.unmountOnExit&&this.state.status===Fc&&this.setState({status:op})},t.performEnter=function(l){var f=this,c=this.props.enter,p=this.context?this.context.isMounting:l,g=this.props.nodeRef?[p]:[fg.findDOMNode(this),p],d=g[0],m=g[1],C=this.getTimeouts(),b=p?C.appear:C.enter;if(!l&&!c||MD.disabled){this.safeSetState({status:hd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:Nc},function(){f.props.onEntering(d,m),f.onTransitionEnd(b,function(){f.safeSetState({status:hd},function(){f.props.onEntered(d,m)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),p=this.props.nodeRef?void 0:fg.findDOMNode(this);if(!f||MD.disabled){this.safeSetState({status:Fc},function(){l.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:tC},function(){l.props.onExiting(p),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Fc},function(){l.props.onExited(p)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(l,f){f=this.setNextCallback(f),this.setState(l,f)},t.setNextCallback=function(l){var f=this,c=!0;return this.nextCallback=function(p){c&&(c=!1,f.nextCallback=null,l(p))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},t.onTransitionEnd=function(l,f){this.setNextCallback(f);var c=this.props.nodeRef?this.props.nodeRef.current:fg.findDOMNode(this),p=l==null&&!this.props.addEndListener;if(!c||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=g[0],m=g[1];this.props.addEndListener(d,m)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===op)return null;var f=this.props,c=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var p=_b(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return W.createElement(PD.Provider,{value:null},typeof c=="function"?c(l,p):W.cloneElement(W.Children.only(c),p))},r}(W.Component);ss.contextType=PD,ss.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:wt.exports.shape({current:typeof Element>"u"?wt.exports.any:function(e,r,t,i,l,f){var c=e[r];return wt.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:wt.exports.oneOfType([wt.exports.func.isRequired,wt.exports.element.isRequired]).isRequired,in:wt.exports.bool,mountOnEnter:wt.exports.bool,unmountOnExit:wt.exports.bool,appear:wt.exports.bool,enter:wt.exports.bool,exit:wt.exports.bool,timeout:function(r){var t=Kz;r.addEndListener||(t=t.isRequired);for(var i=arguments.length,l=new Array(i>1?i-1:0),f=1;f<i;f++)l[f-1]=arguments[f];return t.apply(void 0,[r].concat(l))},addEndListener:wt.exports.func,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}:{};function pd(){}ss.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pd,onEntering:pd,onEntered:pd,onExit:pd,onExiting:pd,onExited:pd},ss.UNMOUNTED=op,ss.EXITED=Fc,ss.ENTERING=Nc,ss.ENTERED=hd,ss.EXITING=tC;const BD=ss;var Qz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return qz(r,i)})},nC=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Gz(r,i)})},rC=function(e){FD(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.appliedClasses={appear:{},enter:{},exit:{}},i.onEnter=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1];i.removeClasses(m,"exit"),i.addClass(m,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(p,g)},i.onEntering=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.addClass(m,b,"active"),i.props.onEntering&&i.props.onEntering(p,g)},i.onEntered=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(m,b),i.addClass(m,b,"done"),i.props.onEntered&&i.props.onEntered(p,g)},i.onExit=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(p)},i.onExiting=function(p){var g=i.resolveArguments(p),d=g[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(p)},i.onExited=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(p)},i.resolveArguments=function(p,g){return i.props.nodeRef?[i.props.nodeRef.current,p]:[p,g]},i.getClassNames=function(p){var g=i.props.classNames,d=typeof g=="string",m=d&&g?g+"-":"",C=d?""+m+p:g[p],b=d?C+"-active":g[p+"Active"],x=d?C+"-done":g[p+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var p=this.getClassNames(f)[c+"ClassName"],g=this.getClassNames("enter"),d=g.doneClassName;f==="appear"&&c==="done"&&d&&(p+=" "+d),c==="active"&&l&&l.scrollTop,p&&(this.appliedClasses[f][c]=p,Qz(l,p))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],p=c.base,g=c.active,d=c.done;this.appliedClasses[f]={},p&&nC(l,p),g&&nC(l,g),d&&nC(l,d)},t.render=function(){var l=this.props;l.classNames;var f=_b(l,["classNames"]);return W.createElement(BD,Nr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(W.Component);rC.defaultProps={classNames:""},rC.propTypes=process.env.NODE_ENV!=="production"?Nr({},BD.propTypes,{classNames:Wz,onEnter:wt.exports.func,onEntering:wt.exports.func,onEntered:wt.exports.func,onExit:wt.exports.func,onExiting:wt.exports.func,onExited:wt.exports.func}):{};const LD=rC;function pn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const RZ="",[Zz]=wn("overlay"),Xz=e=>{const r=W.useRef(null),t=ea(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=p=>{t.lockScroll&&q2(p,!0)},c=()=>{const p=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Jr(l)&&(p.animationDuration=`${l}ms`),uD(t.stopPropagation,Q("div",Object.assign({ref:r,style:p,onClick:g=>{var d;g.target===g.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,g))},className:Re(Zz(),t.className)},{children:t.children})))};return W2("touchmove",f,{target:r}),Q(LD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Jz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);IL(f)?f.then(c=>{c?i():l&&l()}).catch(Mi):f?i():l&&l()}else i()}function aC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function eU(e,r){if(Bg()&&e){const t=aC(e);return tu.exports.createPortal(r,t)}return r}const tU=W.createContext({});let zD=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){zD=!0}}),window.addEventListener("test-passive",null,e)}catch{}let lp=0;const UD="rv-overflow-hidden";function nU(e,r){const t=_D(),i=c=>{t.move(c);const p=t.deltaY.current>0?"10":"01",g=cz(c.target,e.current);if(!g)return;const{scrollHeight:d,offsetHeight:m,scrollTop:C}=g;let b="11";C===0?b=m>=d?"00":"01":C+m>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(p,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,zD?{passive:!1}:!1),lp||document.body.classList.add(UD),lp++},f=()=>{lp&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),lp--,lp||document.body.classList.remove(UD))};W.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let jD=2e3;const[Lg]=wn("popup"),sp=W.forwardRef((e,r)=>{var t;const i=ea(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:Q(J2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:p,children:g,duration:d,closeIcon:m,position:C}=i,b=W.useRef(!1),x=W.useRef((t=i.zIndex)!==null&&t!==void 0?t:jD),_=W.useRef(),[T,E]=W.useState(i.visible),[A,k]=W.useState(T),D=W.useMemo(()=>{const V=Object.assign({zIndex:x.current},i.style);if(Jr(i.duration)){const K=i.position==="center"?"animationDuration":"transitionDuration";V[K]=`${i.duration}ms`}return V},[x.current,i.position,i.style,i.duration]),R=()=>{var V;i.zIndex!==void 0?x.current=+i.zIndex:x.current=jD++,b.current=!0,(V=i.onOpen)===null||V===void 0||V.call(i)},N=()=>{Jz({interceptor:i.beforeClose,args:["close"],done:()=>{var V;b.current=!1,(V=i.onClose)===null||V===void 0||V.call(i)}})},z=V=>{var K;(K=i.onClickOverlay)===null||K===void 0||K.call(i,V),i.closeOnClickOverlay&&N()},M=()=>i.overlay?Q(Xz,{visible:T,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:z}):null,I=V=>{i.onClickCloseIcon&&i.onClickCloseIcon(V),N()},Y=()=>{if(f){const{closeIconPosition:V}=i;return m?Q("div",Object.assign({className:Re(Lg("close-icon",V)),onClick:I},{children:m})):null}return null},B=()=>c?Q("div",Object.assign({className:Re(Lg("title"))},{children:c})):null,P=()=>p?Q("div",Object.assign({className:Re(Lg("description"))},{children:p})):null,U=()=>{const{safeAreaInsetBottom:V}=i;return uD(i.stopPropagation,Be("div",Object.assign({ref:_,style:Object.assign(Object.assign({},D),{display:!T&&!A?"none":void 0}),className:Re(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":V},i.className),onClick:i.onClick},{children:[B(),P(),g,Y()]})))},H=()=>{const{transition:V,destroyOnClose:K,forceRender:ee}=i,J=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return Q(LD,Object.assign({in:T,nodeRef:_,timeout:d,classNames:V||J,mountOnEnter:!ee,unmountOnExit:K,onEnter:R,onEntered:i.onOpened,onExited:()=>{var q;k(!1),(q=i.onClosed)===null||q===void 0||q.call(i)}},{children:U()}))};return W2("popstate",()=>{i.closeOnPopstate&&N()}),tp(()=>{T&&k(!0)},[T]),tp(()=>{E(i.visible)},[i.visible]),nU(_,T&&i.lockScroll),W.useImperativeHandle(r,()=>({popupRef:_})),eU(i.teleport,Be(tU.Provider,Object.assign({value:{visible:T}},{children:[M(),H()]})))}),PZ="",ID=W.createContext({}),[rU]=wn("action-bar"),aU=e=>{const r=ea(e,{safeAreaInsetBottom:!0}),t=W.useMemo(()=>W.Children.toArray(r.children),[r.children]);return Q(ID.Provider,Object.assign({value:{parent:{children:t}}},{children:Q("div",Object.assign({className:Re(r.className,rU(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:W.Children.toArray(r.children).filter(Boolean).map((i,l)=>W.cloneElement(i,{index:l}))}))}))},[HD]=wn("action-bar-icon"),iU=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?Q(Dz,Object.assign({},t,{className:Re(HD("icon"))},{children:i})):null};return Be("div",Object.assign({role:"button",className:Re(e.className,HD()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[oU]=wn("action-bar-button"),lU=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:p}=e,{parent:g}=W.useContext(ID),d=W.useMemo(()=>{if(g){const C=g.children[p-1];return!(C&&"isButton"in C.type)}return!1},[p,g]),m=W.useMemo(()=>{if(g){const C=g.children[p+1];return!(C&&"isButton"in C.type)}return!1},[p,g]);return Q(ip,Object.assign({className:Re(e.className,oU([r,{last:m,first:d}])),style:e.style,size:"large",type:r,icon:t,color:l,loading:f,disabled:c,onClick:e.onClick},{children:e.children?e.children:i}))},{isButton:!0}),iC=Object.assign(aU,{Icon:iU,Button:lU});function sU(e,r,t){const i=r[t];Jr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!cd(i)?e[t]=i:e[t]=VD(Object(e[t]),r[t]))}function VD(e,r){return Object.keys(r).forEach(t=>{sU(e,r,t)}),e}const uU={locale:VD({name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,r)=>`${e}年${r}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanPicker:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新...",loading:"加载中..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",defaultAddress:"设为默认收货地址"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌信息"},vanAddressList:{add:"新增地址"}},{})},vd=W.createContext(uU),[Co]=wn("dialog"),$D=e=>{const{locale:r}=W.useContext(vd),t=ea(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:p,className:g,messageAlign:d,closeOnClickOverlay:m,onClickCloseIcon:C}=t,b=$a(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?Q("div",Object.assign({className:Re(Co("header",{isolated:!t.message&&!t.children}))},{children:l})):null,_=()=>t.children?Q("div",Object.assign({className:Re(Co("content"))},{children:t.children})):p?Q("div",Object.assign({className:Re(Co("content",{isolated:!l}))},{children:Q("div",Object.assign({className:Re(Co("message",{"has-title":l,[d]:d}))},{children:p}))})):null,T=()=>{var k,D,R,N,z,M;return Be("div",Object.assign({className:Re(yz,Co("footer"))},{children:[t.showCancelButton&&Q(ip,{size:"large",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),style:{color:t.cancelButtonColor},loading:(k=t.cancelProps)===null||k===void 0?void 0:k.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((R=t.cancelProps)===null||R===void 0)&&R.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(ip,{size:"large",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm"),{[xz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Mi:t.onConfirm})]}))},E=()=>{var k,D,R,N,z,M;return Be(iC,Object.assign({className:Re(Co("footer"))},{children:[t.showCancelButton&&Q(iC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Re(Co("cancel")),color:t.cancelButtonColor,loading:(k=t.cancelProps)===null||k===void 0?void 0:k.loading,disabled:(D=t.cancelProps)===null||D===void 0?void 0:D.disabled,onClick:!((R=t.cancelProps)===null||R===void 0)&&R.loading?Mi:t.onCancel}),t.showConfirmButton&&Q(iC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Re(Co("confirm")),color:t.confirmButtonColor,loading:(N=t.confirmProps)===null||N===void 0?void 0:N.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Mi:t.onConfirm})]}))},A=()=>t.footer?t.footer:t.theme==="round-button"?E():T();return Be(sp,Object.assign({},b,{visible:c,className:Re(Co([f]),g),style:{width:dl(i)},"aria-labelledby":l||p,closeOnClickOverlay:m,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),_(),A()]}))};Number((W.version||"").split(".")[0]);const cU=Number((tu.exports.version||"").split(".")[0]),zg=Object.assign({},v9),{render:fU,unmountComponentAtNode:dU}=zg;let Ug;try{cU>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function YD(e){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=zg;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}const jg="__react_vant_root__";function hU(e,r){fU(e,r)}function pU(e,r){YD(!0);const t=r[jg]||Ug(r);YD(!1),t.render(e),r[jg]=t}function qD(e,r){if(Ug){pU(e,r);return}hU(e,r)}function vU(e){return dU(e)}function mU(e){return Z2(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=e[jg])===null||r===void 0||r.unmount(),delete e[jg]})})}function GD(e){return Ug?mU(e):vU(e)}const md=$D;md.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:Q(J2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Mi,onConfirm:l=Mi,onClose:f=Mi,cancelProps:c,confirmProps:p}=e,g=$a(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=aC(e.teleport),m=document.createElement("div");d.appendChild(m);let C=Mi;return qD(Q(()=>{const[x,_]=W.useState(!1),[T,E]=W.useState(!1),[A,k]=W.useState(!1);W.useEffect(()=>{_(!0)},[]),C=()=>{_(!1),f&&f()};const D=()=>{t&&t(),GD(m)&&m.parentNode&&m.parentNode.removeChild(m)},R=z=>Z2(void 0,void 0,void 0,function*(){const M=setTimeout(()=>k(!0));(yield l(z))!==!1?(clearTimeout(M),C()):(clearTimeout(M),k(!1))}),N=(z,M)=>Z2(void 0,void 0,void 0,function*(){if(M){C();return}const I=setTimeout(()=>E(!0));(yield i(z))!==!1?(clearTimeout(I),C()):(clearTimeout(I),E(!1))});return Q($D,Object.assign({},r,g,{visible:x,teleport:()=>m,cancelProps:Object.assign({loading:T},c),confirmProps:Object.assign({loading:A},p),onClose:C,onCancel:N,onConfirm:R,onClosed:D}))},{}),m),C},md.alert=e=>{const{onConfirm:r=Mi}=e;return new Promise(t=>{md.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},md.confirm=e=>{const{onCancel:r=Mi,onConfirm:t=Mi}=e;return new Promise((i,l)=>{md.show(Object.assign(Object.assign({showCancelButton:!0},e),{onCancel:f=>{r(f),l()},onConfirm:f=>{t(f),i(!0)}}))})};const gU=md,[up]=wn("input"),yU=W.forwardRef((e,r)=>{const t=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=W.useRef(),[l,f]=W.useState(!1),c=W.useRef(!1),[p,g]=np(t),{className:d,style:m,align:C,type:b,name:x,placeholder:_,disabled:T,readOnly:E,maxLength:A,autoFocus:k}=t,D=()=>{i!=null&&i.current&&i.current.focus()},R=()=>{i!=null&&i.current&&i.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:D,blur:R,get nativeElement(){return i.current}}));const N=W.useMemo(()=>{if(t.clearable&&!E){const U=p!=="",H=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return U&&H}return!1},[p,t.clearTrigger,l]),z=U=>{var H;let V=U;if(!c.current&&(Jr(A)&&V.length>+A&&(V=V.slice(0,A),(H=t.onOverlimit)===null||H===void 0||H.call(t)),b==="number"||b==="digit")){const K=b==="number";V=nz(V,K,K)}g(V)},M=U=>{var H;f(!0),(H=t.onFocus)===null||H===void 0||H.call(t,U),E&&R()},I=U=>{var H;f(!1),(H=t.onBlur)===null||H===void 0||H.call(t,U),dD()},Y=U=>{var H;(U.key==="Enter"||+U.charCode==13)&&(q2(U),t.type==="search"&&R()),(H=t.onKeyPress)===null||H===void 0||H.call(t,U)},B=()=>{let U=b,H;return b==="number"&&(U="text",H="decimal"),b==="digit"&&(U="tel",H="numeric"),Q("input",{value:p,type:U,inputMode:H,ref:i,name:x,className:Re(up("control")),disabled:T,autoFocus:k,readOnly:E,placeholder:_||"",onBlur:I,onFocus:M,onChange:V=>{var K;return z((K=V==null?void 0:V.currentTarget)===null||K===void 0?void 0:K.value)},onKeyPress:Y,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:V=>{var K;c.current=!0,(K=t.onCompositionStart)===null||K===void 0||K.call(t,V)},onCompositionEnd:V=>{var K,ee;c.current=!1,(K=t.onCompositionEnd)===null||K===void 0||K.call(t,V),z((ee=V==null?void 0:V.currentTarget)===null||ee===void 0?void 0:ee.value)},onClick:t.onClick})},P=U=>{var H;g(""),(H=t.onClear)===null||H===void 0||H.call(t,U)};return Be("div",Object.assign({className:Re(up([C]),d),style:m},{children:[t.prefix&&Q("div",Object.assign({className:Re(up("prefix"))},{children:t.prefix})),B(),N&&W.cloneElement(t.clearIcon||Q(Mg,{}),{className:Re(up("clear")),onTouchStart:P}),t.suffix&&Q("div",Object.assign({className:Re(up("suffix"))},{children:t.suffix}))]}))}),[cp]=wn("textarea"),xU=W.forwardRef((e,r)=>{const t=ea(e,{rows:2,clearIcon:Q(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=W.useState(!1),f=W.useRef(),c=W.useRef(!1),[p,g]=np(t),{className:d,style:m,name:C,rows:b,placeholder:x,disabled:_,readOnly:T,maxLength:E,showWordLimit:A,autoFocus:k}=t,D=()=>{f!=null&&f.current&&f.current.focus()},R=()=>{f!=null&&f.current&&f.current.blur()};W.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:D,blur:R,get nativeElement(){return f.current}}));const N=()=>{const H=f.current;if(!H)return;H.style.height="auto";let V=H.scrollHeight;if(cd(t.autoSize)){const{maxHeight:K,minHeight:ee}=t.autoSize;K&&(V=Math.min(V,K)),ee&&(V=Math.max(V,ee))}V&&(H.style.height=`${V}px`)};W.useEffect(()=>{N()},[p]);const z=W.useMemo(()=>cp("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),M=H=>{var V;let K=H;c.current||Jr(E)&&K.length>+E&&(K=K.slice(0,E),(V=t.onOverlimit)===null||V===void 0||V.call(t)),g(K)},I=H=>{var V;l(!0),(V=t.onFocus)===null||V===void 0||V.call(t,H),T&&R()},Y=H=>{var V;l(!1),(V=t.onBlur)===null||V===void 0||V.call(t,H),dD()},B=()=>{if(A){const H=(p?`${p}`:"").length;return Q("div",Object.assign({className:Re(cp("word-limit"))},{children:typeof A=="function"?A({currentCount:H,maxLength:E}):Be(en,{children:[Q("span",Object.assign({className:Re(cp("word-num"))},{children:H})),E?`/${E}`:!1]})}))}return null},P=H=>{var V;g(""),(V=t.onClear)===null||V===void 0||V.call(t,H)},U=W.useMemo(()=>{if(t.clearable&&!T){const H=p!=="",V=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return H&&V}return!1},[p,t.clearTrigger,i]);return Be("div",Object.assign({className:Re(cp(),d),style:m},{children:[Q("textarea",{ref:f,name:C,rows:b,className:Re(z),value:p,disabled:_,autoFocus:k,readOnly:T,placeholder:x||"",onBlur:Y,onFocus:I,onChange:H=>{var V;return M((V=H==null?void 0:H.currentTarget)===null||V===void 0?void 0:V.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:H=>{var V;c.current=!0,(V=t.onCompositionStart)===null||V===void 0||V.call(t,H)},onCompositionEnd:H=>{var V,K;c.current=!1,(V=t.onCompositionEnd)===null||V===void 0||V.call(t,H),M((K=H==null?void 0:H.currentTarget)===null||K===void 0?void 0:K.value)},onClick:t.onClick}),U&&W.cloneElement(t.clearIcon,{className:Re(cp("clear")),onTouchStart:P}),B()]}))}),WZ="",QZ="",cu=Object.assign(yU,{TextArea:xU}),[Pi]=wn("field"),bU=W.forwardRef((e,r)=>{var t;const i=ea(e,{clearIcon:Q(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=W.useRef(null),f=W.useRef(null),c=i.type==="textarea"?f:l,p=()=>{c.current&&c.current.focus()},g=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};W.useImperativeHandle(r,()=>({focus:p,blur:g,clear:d,get nativeElement(){return c.current.nativeElement}}));const m=$=>Jr(i[$])?i[$]:null,C=()=>{const $=m("labelWidth");return $?{width:dl($)}:{}},b=($,ne="onChange")=>{const{formatTrigger:oe,formatter:ae}=i;return ae&&ne===oe?ae($):$},x=$=>{var ne;(ne=i.onChange)===null||ne===void 0||ne.call(i,b($))},_=()=>{const{value:$,defaultValue:ne,align:oe,type:ae,placeholder:se,name:ve,maxLength:we,disabled:ce,readOnly:ye,clearable:De,clearIcon:Pe,clearTrigger:Te,autoFocus:ze,onClear:Ne,onBlur:dt,onFocus:Xe,onKeyPress:Zt,onOverlimit:sn}=i;if(Jr(i.children))return Q("div",Object.assign({className:Re(Pi("children"))},{children:i.children}));const Tn={value:$,onChange:x,placeholder:se,name:ve,defaultValue:ne,disabled:ce,clearable:De,clearIcon:Pe,clearTrigger:Te,onClear:Ne,onBlur:dt,onFocus:Xe,onKeyPress:Zt,onOverlimit:sn,autoFocus:ze,readOnly:ye,maxLength:we,onClick:i.onClickInput};return ae==="textarea"?Q(cu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},Tn)):Q(cu,Object.assign({ref:l,type:ae,align:oe},Tn))},T=()=>{const{leftIcon:$,onClickLeftIcon:ne}=i;return $?Q("div",Object.assign({className:Re(Pi("left-icon")),onClick:ne},{children:$})):null},E=()=>{const{rightIcon:$,onClickRightIcon:ne}=i;return $?Q("div",Object.assign({className:Re(Pi("right-icon")),onClick:ne},{children:$})):null},A=()=>{const $=i.errorMessage;return $?Q("div",Object.assign({className:Re(Pi("error-message"))},{children:$})):null},k=()=>i.intro?Q("div",Object.assign({className:Re(Pi("intro"))},{children:i.intro})):null,D=()=>{const{tooltip:$}=i;if($){let ne=Q(Hz,{}),oe={message:$};if(!(W.isValidElement($)||typeof $=="string")){const ae=$,{icon:se}=ae,ve=$a(ae,["icon"]);ne=se||ne,oe=ve}return Q("div",Object.assign({className:Re(Pi("tooltip")),onClick:()=>gU.show(oe)},{children:ne}))}return null},R=()=>{const{label:$,colon:ne}=i;return $?Be(en,{children:[$,!!ne&&":",D()]}):null},{size:N,center:z,border:M,isLink:I,required:Y,clickable:B,labelAlign:P,className:U,labelClass:H,valueClass:V,controlAlign:K,arrowDirection:ee,disabled:J,titleStyle:q,error:te}=i,Z=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Be(eC,Object.assign({title:R(),size:N,icon:T(),center:z,border:M,isLink:I,required:Y,clickable:B,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),q),valueClass:Re(Pi("value",[K]),V),titleClass:Re(Pi("label",P),H),arrowDirection:ee,onClick:i.onClick,style:i.style,className:Re(Pi({error:te,disabled:J,[`label-${P}`]:P}),U)},{children:[Be("div",Object.assign({className:Re(Pi("body"))},{children:[i.prefix&&Q("div",Object.assign({className:Re(Pi("prefix"))},{children:i.prefix})),Q("div",Object.assign({className:Re(Pi("control-wrapper"))},{children:_()})),E(),Z&&Q("div",Object.assign({className:Re(Pi("suffix"))},{children:Z}))]})),A(),k()]}))}),CU=Symbol("field"),oC=Object.assign(bU,{[_z]:CU});function wU(e,r,t){return Math.max(r,Math.min(e,t))}const Ea={toVector(e,r){return e===void 0&&(e=r),Array.isArray(e)?e:[e,e]},add(e,r){return[e[0]+r[0],e[1]+r[1]]},sub(e,r){return[e[0]-r[0],e[1]-r[1]]},addTo(e,r){e[0]+=r[0],e[1]+=r[1]},subTo(e,r){e[0]-=r[0],e[1]-=r[1]}};function KD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function WD(e,r,t,i=.15){return i===0?wU(e,r,t):e<r?-KD(r-e,t-r,i)+r:e>t?+KD(e-t,t-r,i)+t:e}function _U(e,[r,t],[i,l]){const[[f,c],[p,g]]=e;return[WD(r,f,c,i),WD(t,p,g,l)]}function si(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function QD(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function ar(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?QD(Object(t),!0).forEach(function(i){si(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):QD(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const ZD={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function XD(e){return e?e[0].toUpperCase()+e.slice(1):""}const SU=["enter","leave"];function EU(e=!1,r){return e&&!SU.includes(r)}function DU(e,r="",t=!1){const i=ZD[e],l=i&&i[r]||r;return"on"+XD(e)+XD(l)+(EU(t,l)?"Capture":"")}const TU=["gotpointercapture","lostpointercapture"];function kU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=TU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function AU(e,r=""){const t=ZD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function JD(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function OU(e){return Array.from(e.touches).filter(r=>{var t,i;return r.target===e.currentTarget||((t=e.currentTarget)===null||t===void 0||(i=t.contains)===null||i===void 0?void 0:i.call(t,r.target))})}function RU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function eT(e){return Ig(e)?RU(e)[0]:e}function FU(e){return OU(e).map(r=>r.identifier)}function lC(e){const r=eT(e);return Ig(e)?r.identifier:r.pointerId}function tT(e){const r=eT(e);return[r.clientX,r.clientY]}function NU(e){const r={};if("buttons"in e&&(r.buttons=e.buttons),"shiftKey"in e){const{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f}=e;Object.assign(r,{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f})}return r}function Hg(e,...r){return typeof e=="function"?e(...r):e}function MU(){}function PU(...e){return e.length===0?MU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function nT(e,r){return Object.assign({},r,e||{})}const BU=32;class LU{constructor(r,t,i){this.ctrl=r,this.args=t,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:t,ingKey:i,args:l}=this;t[i]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=l,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const t=this.state,i=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=r.target,t.currentTarget=r.currentTarget,t.lastOffset=i.from?Hg(i.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=r.timeStamp}computeValues(r){const t=this.state;t._values=r,t.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:t,config:i,shared:l}=this;t.args=this.args;let f=0;if(r&&(t.event=r,i.preventDefault&&r.cancelable&&t.event.preventDefault(),t.type=r.type,l.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,l.locked=!!document.pointerLockElement,Object.assign(l,NU(r)),l.down=l.pressed=l.buttons%2===1||l.touches>0,f=r.timeStamp-t.timeStamp,t.timeStamp=r.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const z=t._delta.map(Math.abs);Ea.addTo(t._distance,z)}this.axisIntent&&this.axisIntent(r);const[c,p]=t._movement,[g,d]=i.threshold,{_step:m,values:C}=t;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(c)>=g&&C[0]),m[1]===!1&&(m[1]=Math.abs(p)>=d&&C[1])):(m[0]===!1&&(m[0]=Math.abs(c)>=g&&Math.sign(c)*g),m[1]===!1&&(m[1]=Math.abs(p)>=d&&Math.sign(p)*d)),t.intentional=m[0]!==!1||m[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[z,M]=C;b[0]=m[0]!==!1?z-m[0]:0,b[1]=m[1]!==!1?M-m[1]:0}else b[0]=m[0]!==!1?c-m[0]:0,b[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,_=t._active&&!t._blocked||t.active;_&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=l[this.ingKey]=t._active,r&&(t.first&&("bounds"in i&&(t._bounds=Hg(i.bounds,t)),this.setup&&this.setup()),t.movement=b,this.computeOffset()));const[T,E]=t.offset,[[A,k],[D,R]]=t._bounds;t.overflow=[T<A?-1:T>k?1:0,E<D?-1:E>R?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const N=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=_U(t._bounds,t.offset,N),t.delta=Ea.sub(t.offset,x),this.computeMovement(),_&&(!t.last||f>BU)){t.delta=Ea.sub(t.offset,x);const z=t.delta.map(Math.abs);Ea.addTo(t.distance,z),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[z[0]/f,z[1]/f])}}emit(){const r=this.state,t=this.shared,i=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!i.triggerAllEvents)return;const l=this.handler(ar(ar(ar({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zU([e,r],t){const i=Math.abs(e),l=Math.abs(r);if(i>l&&i>t)return"x";if(l>i&&l>t)return"y"}class UU extends LU{constructor(...r){super(...r),si(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ea.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const t=this.state,i=this.config;if(!t.axis&&r){const l=typeof i.axisThreshold=="object"?i.axisThreshold[JD(r)]:i.axisThreshold;t.axis=zU(t._movement,l)}t._blocked=(i.lockDirection||!!i.axis)&&!t.axis||!!i.axis&&i.axis!==t.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const rT=e=>e,aT=.15,sC={enabled(e=!0){return e},eventOptions(e,r,t){return ar(ar({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[aT,aT];case!1:return[0,0];default:return Ea.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Ea.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||rT;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||rT},threshold(e){return Ea.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(sC,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const jU=0,fp=ar(ar({},sC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=jU){return e},bounds(e={}){if(typeof e=="function")return f=>fp.bounds(e(f));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:r=-1/0,right:t=1/0,top:i=-1/0,bottom:l=1/0}=e;return[[r,t],[i,l]]}}),Vg=10,iT={ArrowRight:(e=1)=>[Vg*e,0],ArrowLeft:(e=1)=>[-Vg*e,0],ArrowUp:(e=1)=>[0,-Vg*e],ArrowDown:(e=1)=>[0,Vg*e]};class IU extends UU{constructor(...r){super(...r),si(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const t=r._bounds.getBoundingClientRect(),i=r.currentTarget.getBoundingClientRect(),l={left:t.left-i.left+r.offset[0],right:t.right-i.right+r.offset[0],top:t.top-i.top+r.offset[1],bottom:t.bottom-i.bottom+r.offset[1]};r._bounds=fp.bounds(l)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const t=this.config,i=this.state;if(r.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(r.buttons):t.pointerButtons!==-1&&t.pointerButtons!==r.buttons))return;const l=this.ctrl.setEventIds(r);t.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(l&&l.size>1&&i._pointerActive)&&(this.start(r),this.setupPointer(r),i._pointerId=lC(r),i._pointerActive=!0,this.computeValues(tT(r)),this.computeInitial(),t.preventScrollAxis&&JD(r)!=="mouse"?(i._active=!1,this.setupScrollPrevention(r)):t.delay>0?(this.setupDelayTrigger(r),t.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const t=this.state,i=this.config;if(!t._pointerActive||t.type===r.type&&r.timeStamp===t.timeStamp)return;const l=lC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=tT(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Ea.sub(f,t._values),this.computeValues(f)),Ea.addTo(t._movement,t._delta),this.compute(r),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(r);return}if(i.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{process.env.NODE_ENV}const t=this.state,i=this.config;if(!t._active||!t._pointerActive)return;const l=lC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[f,c]=t._distance;if(t.tap=f<=i.tapsThreshold&&c<=i.tapsThreshold,t.tap&&i.filterTaps)t._force=!0;else{const[p,g]=t.direction,[d,m]=t.velocity,[C,b]=t.movement,[x,_]=i.swipe.velocity,[T,E]=i.swipe.distance,A=i.swipe.duration;t.elapsedTime<A&&(Math.abs(d)>x&&Math.abs(C)>T&&(t.swipe[0]=p),Math.abs(m)>_&&Math.abs(b)>E&&(t.swipe[1]=g))}this.emit()}pointerClick(r){this.state.tap||(r.preventDefault(),r.stopPropagation())}setupPointer(r){const t=this.config,i=t.device;if(process.env.NODE_ENV==="development")try{if(i==="pointer"&&t.preventScrollDelay===void 0){const l="uv"in r?r.sourceEvent.currentTarget:r.currentTarget;window.getComputedStyle(l).touchAction}}catch{}t.pointerLock&&r.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,HU(r);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const t=iT[r.key];if(t){const i=this.state,l=r.shiftKey?10:r.altKey?.1:1;this.start(r),i._delta=t(l),i._keyboardActive=!0,Ea.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in iT&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const t=this.config.device;r(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(t,"change",this.pointerMove.bind(this)),r(t,"end",this.pointerUp.bind(this)),r(t,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function HU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const dp=typeof window<"u"&&window.document&&window.document.createElement;function VU(){return dp&&"ontouchstart"in window}function oT(){return VU()||dp&&window.navigator.maxTouchPoints>1}function $U(){return dp&&"onpointerdown"in window}function YU(){return dp&&"exitPointerLock"in window.document}function qU(){try{return"constructor"in GestureEvent}catch{return!1}}const eo={isBrowser:dp,gesture:qU(),touch:oT(),touchscreen:oT(),pointer:$U(),pointerLock:YU()},GU=250,KU=180,WU=.5,QU=50,ZU=250,lT={mouse:0,touch:0,pen:8},sT=ar(ar({},fp),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&eo.pointerLock,eo.touch&&t?"touch":this.pointerLock?"mouse":eo.pointer&&!l?"pointer":eo.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?GU:void 0,!(!eo.touchscreen||t===!1))return e||(t!==void 0?"y":void 0)},pointerCapture(e,r,{pointer:{capture:t=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&t},keys(e=!0){return e},threshold(e,r,{filterTaps:t=!1,tapsThreshold:i=3,axis:l=void 0}){const f=Ea.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=WU,distance:r=QU,duration:t=ZU}={}){return{velocity:this.transform(Ea.toVector(e)),distance:this.transform(Ea.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return KU;case!1:return 0;default:return e}},axisThreshold(e){return e?ar(ar({},lT),e):lT}});process.env.NODE_ENV==="development"&&Object.assign(sT,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}}),ar(ar({},sC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!eo.touch&&eo.gesture)return"gesture";if(eo.touch&&i)return"touch";if(eo.touchscreen){if(eo.pointer)return"pointer";if(eo.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const p=nT(Hg(t,c),{min:-1/0,max:1/0});return[p.min,p.max]},f=c=>{const p=nT(Hg(i,c),{min:-1/0,max:1/0});return[p.min,p.max]};return typeof t!="function"&&typeof i!="function"?[l(),f()]:c=>[l(c),f(c)]},threshold(e,r,t){return this.lockDirection=t.axis==="lock",Ea.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),ar(ar({},fp),{},{mouseOnly:(e=!0)=>e}),ar(ar({},fp),{},{mouseOnly:(e=!0)=>e});const uT=new Map,uC=new Map;function XU(e){uT.set(e.key,e.engine),uC.set(e.key,e.resolver)}const JU={key:"drag",engine:IU,resolver:sT};function ej(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function tj(e,r){if(e==null)return{};var t=ej(e,r),i,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)i=f[l],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}const nj={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=eo.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},rj=["target","eventOptions","window","enabled","transform"];function $g(e={},r){const t={};for(const[i,l]of Object.entries(r))switch(typeof l){case"function":if(process.env.NODE_ENV==="development"){const f=l.call(t,e[i],i,e);Number.isNaN(f)||(t[i]=f)}else t[i]=l.call(t,e[i],i,e);break;case"object":t[i]=$g(e[i],l);break;case"boolean":l&&(t[i]=e[i]);break}return t}function aj(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:p}=t,g=tj(t,rj),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:p},nj)};if(r){const m=uC.get(r);d[r]=$g(ar({shared:d.shared},g),m)}else for(const m in g){const C=uC.get(m);if(C)d[m]=$g(ar({shared:d.shared},g[m]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(m)&&m==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class cT{constructor(r,t){si(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,p=AU(t,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=ar(ar({},g),f);r.addEventListener(p,l,d);const m=()=>{r.removeEventListener(p,l,d),c.delete(m)};return c.add(m),m}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class ij{constructor(){si(this,"_timeouts",new Map)}add(r,t,i=140,...l){this.remove(r),this._timeouts.set(r,window.setTimeout(t,i,...l))}remove(r){const t=this._timeouts.get(r);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}let oj=class{constructor(r){si(this,"gestures",new Set),si(this,"_targetEventStore",new cT(this)),si(this,"gestureEventStores",{}),si(this,"gestureTimeoutStores",{}),si(this,"handlers",{}),si(this,"config",{}),si(this,"pointerIds",new Set),si(this,"touchIds",new Set),si(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),lj(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(FU(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,t){this.handlers=r,this.nativeHandlers=t}applyConfig(r,t){this.config=aj(r,t)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const t=this.config.shared,i={};let l;if(!(t.target&&(l=t.target(),!l))){if(t.enabled){for(const c of this.gestures){const p=this.config[c],g=fT(i,p.eventOptions,!!l);if(p.enabled){const d=uT.get(c);new d(this,r,c).bind(g)}}const f=fT(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",p=>this.nativeHandlers[c](ar(ar({},this.state.shared),{},{event:p,args:r})),void 0,!0)}for(const f in i)i[f]=PU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:p,passive:g}=kU(f);this._targetEventStore.add(l,c,"",i[f],{capture:p,passive:g})}}}};function gd(e,r){e.gestures.add(r),e.gestureEventStores[r]=new cT(e,r),e.gestureTimeoutStores[r]=new ij}function lj(e,r){r.drag&&gd(e,"drag"),r.wheel&&gd(e,"wheel"),r.scroll&&gd(e,"scroll"),r.move&&gd(e,"move"),r.pinch&&gd(e,"pinch"),r.hover&&gd(e,"hover")}const fT=(e,r,t)=>(i,l,f,c={},p=!1)=>{var g,d;const m=(g=c.capture)!==null&&g!==void 0?g:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=p?i:DU(i,l,m);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function sj(e,r={},t,i){const l=W.useMemo(()=>new oj(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),W.useEffect(l.effect.bind(l)),W.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function uj(e,r){return XU(JU),sj({drag:e},r||{},"drag")}var cC=pp(),Nt=e=>hp(e,cC),fC=pp();Nt.write=e=>hp(e,fC);var Yg=pp();Nt.onStart=e=>hp(e,Yg);var dC=pp();Nt.onFrame=e=>hp(e,dC);var hC=pp();Nt.onFinish=e=>hp(e,hC);var yd=[];Nt.setTimeout=(e,r)=>{const t=Nt.now()+r,i=()=>{const f=yd.findIndex(c=>c.cancel==i);~f&&yd.splice(f,1),du-=~f?1:0},l={time:t,handler:e,cancel:i};return yd.splice(dT(t),0,l),du+=1,hT(),l};var dT=e=>~(~yd.findIndex(r=>r.time>e)||~yd.length);Nt.cancel=e=>{Yg.delete(e),dC.delete(e),hC.delete(e),cC.delete(e),fC.delete(e)},Nt.sync=e=>{vC=!0,Nt.batchedUpdates(e),vC=!1},Nt.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Nt.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var pC=typeof window<"u"?window.requestAnimationFrame:()=>{};Nt.use=e=>pC=e,Nt.now=typeof performance<"u"?()=>performance.now():Date.now,Nt.batchedUpdates=e=>e(),Nt.catch=console.error,Nt.frameLoop="always",Nt.advance=()=>{Nt.frameLoop!=="demand"||vT()};var fu=-1,du=0,vC=!1;function hp(e,r){vC?(r.delete(e),e(0)):(r.add(e),hT())}function hT(){fu<0&&(fu=0,Nt.frameLoop!=="demand"&&pC(pT))}function cj(){fu=-1}function pT(){~fu&&(pC(pT),Nt.batchedUpdates(vT))}function vT(){const e=fu;fu=Nt.now();const r=dT(fu);if(r&&(mT(yd.splice(0,r),t=>t.handler()),du-=r),!du){cj();return}Yg.flush(),cC.flush(e?Math.min(64,fu-e):16.667),dC.flush(),fC.flush(),hC.flush()}function pp(){let e=new Set,r=e;return{add(t){du+=r==e&&!e.has(t)?1:0,e.add(t)},delete(t){return du-=r==e&&e.has(t)?1:0,e.delete(t)},flush(t){r.size&&(e=new Set,du-=r.size,mT(r,i=>i(t)&&e.add(i)),du+=e.size,r=e)}}}function mT(e,r){e.forEach(t=>{try{r(t)}catch(i){Nt.catch(i)}})}var fj=Object.defineProperty,dj=(e,r)=>{for(var t in r)fj(e,t,{get:r[t],enumerable:!0})},wo={};dj(wo,{assign:()=>pj,colors:()=>hu,createStringInterpolator:()=>yC,skipAnimation:()=>yT,to:()=>gT,willAdvance:()=>xC});function mC(){}var hj=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),Ge={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function us(e,r){if(Ge.arr(e)){if(!Ge.arr(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}return e===r}var Wt=(e,r)=>e.forEach(r);function pl(e,r,t){if(Ge.arr(e)){for(let i=0;i<e.length;i++)r.call(t,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&r.call(t,e[i],i)}var Bi=e=>Ge.und(e)?[]:Ge.arr(e)?e:[e];function vp(e,r){if(e.size){const t=Array.from(e);e.clear(),Wt(t,r)}}var mp=(e,...r)=>vp(e,t=>t(...r)),gC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),yC,gT,hu=null,yT=!1,xC=mC,pj=e=>{e.to&&(gT=e.to),e.now&&(Nt.now=e.now),e.colors!==void 0&&(hu=e.colors),e.skipAnimation!=null&&(yT=e.skipAnimation),e.createStringInterpolator&&(yC=e.createStringInterpolator),e.requestAnimationFrame&&Nt.use(e.requestAnimationFrame),e.batchedUpdates&&(Nt.batchedUpdates=e.batchedUpdates),e.willAdvance&&(xC=e.willAdvance),e.frameLoop&&(Nt.frameLoop=e.frameLoop)},gp=new Set,to=[],bC=[],qg=0,Gg={get idle(){return!gp.size&&!to.length},start(e){qg>e.priority?(gp.add(e),Nt.onStart(vj)):(xT(e),Nt(CC))},advance:CC,sort(e){if(qg)Nt.onFrame(()=>Gg.sort(e));else{const r=to.indexOf(e);~r&&(to.splice(r,1),bT(e))}},clear(){to=[],gp.clear()}};function vj(){gp.forEach(xT),gp.clear(),Nt(CC)}function xT(e){to.includes(e)||bT(e)}function bT(e){to.splice(mj(to,r=>r.priority>e.priority),0,e)}function CC(e){const r=bC;for(let t=0;t<to.length;t++){const i=to[t];qg=i.priority,i.idle||(xC(i),i.advance(e),i.idle||r.push(i))}return qg=0,bC=to,bC.length=0,to=r,to.length>0}function mj(e,r){const t=e.findIndex(r);return t<0?e.length:t}var gj=(e,r,t)=>Math.min(Math.max(t,e),r),yj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},_o="[-+]?\\d*\\.?\\d+",Kg=_o+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var xj=new RegExp("rgb"+Wg(_o,_o,_o)),bj=new RegExp("rgba"+Wg(_o,_o,_o,_o)),Cj=new RegExp("hsl"+Wg(_o,Kg,Kg)),wj=new RegExp("hsla"+Wg(_o,Kg,Kg,_o)),_j=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Sj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ej=/^#([0-9a-fA-F]{6})$/,Dj=/^#([0-9a-fA-F]{8})$/;function Tj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=Ej.exec(e))?parseInt(r[1]+"ff",16)>>>0:hu&&hu[e]!==void 0?hu[e]:(r=xj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|255)>>>0:(r=bj.exec(e))?(xd(r[1])<<24|xd(r[2])<<16|xd(r[3])<<8|_T(r[4]))>>>0:(r=_j.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=Dj.exec(e))?parseInt(r[1],16)>>>0:(r=Sj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=Cj.exec(e))?(CT(wT(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=wj.exec(e))?(CT(wT(r[1]),Qg(r[2]),Qg(r[3]))|_T(r[4]))>>>0:null}function wC(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function CT(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=wC(l,i,e+1/3),c=wC(l,i,e),p=wC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(p*255)<<8}function xd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function wT(e){return(parseFloat(e)%360+360)%360/360}function _T(e){const r=parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function Qg(e){const r=parseFloat(e);return r<0?0:r>100?1:r/100}function ST(e){let r=Tj(e);if(r===null)return e;r=r||0;const t=(r&4278190080)>>>24,i=(r&16711680)>>>16,l=(r&65280)>>>8,f=(r&255)/255;return`rgba(${t}, ${i}, ${l}, ${f})`}var yp=(e,r,t)=>{if(Ge.fun(e))return e;if(Ge.arr(e))return yp({range:e,output:r,extrapolate:t});if(Ge.str(e.output[0]))return yC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",p=i.extrapolateRight||i.extrapolate||"extend",g=i.easing||(d=>d);return d=>{const m=Aj(d,f);return kj(d,f[m],f[m+1],l[m],l[m+1],g,c,p,i.map)}};function kj(e,r,t,i,l,f,c,p,g){let d=g?g(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(p==="identity")return d;p==="clamp"&&(d=t)}return i===l?i:r===t?e<=r?i:l:(r===-1/0?d=-d:t===1/0?d=d-r:d=(d-r)/(t-r),d=f(d),i===-1/0?d=-d:l===1/0?d=d+i:d=d*(l-i)+i,d)}function Aj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var Oj=(e,r="end")=>t=>{t=r==="end"?Math.min(t,.999):Math.max(t,.001);const i=t*e,l=r==="end"?Math.floor(i):Math.ceil(i);return gj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,ET=Zg+1,DT=2*Math.PI/3,TT=2*Math.PI/4.5,Jg=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Rj={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ET*e*e*e-Zg*e*e,easeOutBack:e=>1+ET*Math.pow(e-1,3)+Zg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Xg+1)*2*e-Xg)/2:(Math.pow(2*e-2,2)*((Xg+1)*(e*2-2)+Xg)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*DT),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*DT)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*TT))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*TT)/2+1,easeInBounce:e=>1-Jg(1-e),easeOutBounce:Jg,easeInOutBounce:e=>e<.5?(1-Jg(1-2*e))/2:(1+Jg(2*e-1))/2,steps:Oj},xp=Symbol.for("FluidValue.get"),bd=Symbol.for("FluidValue.observers"),no=e=>Boolean(e&&e[xp]),ui=e=>e&&e[xp]?e[xp]():e,kT=e=>e[bd]||null;function Fj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function bp(e,r){const t=e[bd];t&&t.forEach(i=>{Fj(i,r)})}var AT=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Nj(this,e)}},Nj=(e,r)=>OT(e,xp,r);function Cd(e,r){if(e[xp]){let t=e[bd];t||OT(e,bd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function Cp(e,r){const t=e[bd];if(t&&t.has(r)){const i=t.size-1;i?t.delete(r):e[bd]=null,e.observerRemoved&&e.observerRemoved(i,r)}}var OT=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Mj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,RT=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),Pj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,FT=e=>{const[r,t]=Bj(e);if(!r||gC())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(i)return i.trim();if(t&&t.startsWith("--")){const l=window.getComputedStyle(document.documentElement).getPropertyValue(t);return l||e}else{if(t&&ty.test(t))return FT(t);if(t)return t}return e},Bj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},_C,Lj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,NT=e=>{_C||(_C=hu?new RegExp(`(${Object.keys(hu).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>ui(f).replace(ty,FT).replace(Mj,ST).replace(_C,ST)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(p=>{if(!(c in p))throw Error('The arity of each "output" value must be equal');return p[c]})).map(f=>yp({...e,output:f}));return f=>{var g;const c=!RT.test(r[0])&&((g=r.find(d=>RT.test(d)))==null?void 0:g.replace(ey,""));let p=0;return r[0].replace(ey,()=>`${l[p++](f)}${c||""}`).replace(Pj,Lj)}},SC="react-spring: ",MT=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${SC}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},zj=MT(console.warn);function Uj(){zj(`${SC}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var jj=MT(console.warn);function Ij(){jj(`${SC}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ny(e){return Ge.str(e)&&(e[0]=="#"||/\d/.test(e)||!gC()&&ty.test(e)||e in(hu||{}))}var EC=gC()?W.useEffect:W.useLayoutEffect,Hj=()=>{const e=W.useRef(!1);return EC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function PT(){const e=W.useState()[1],r=Hj();return()=>{r.current&&e(Math.random())}}function Vj(e,r){const[t]=W.useState(()=>({inputs:r,result:e()})),i=W.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&$j(r,f.inputs))||(f={inputs:r,result:e()}):f=t,W.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function $j(e,r){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}var BT=e=>W.useEffect(e,Yj),Yj=[];function LT(e){const r=W.useRef();return W.useEffect(()=>{r.current=e}),r.current}var wp=Symbol.for("Animated:node"),qj=e=>!!e&&e[wp]===e,vl=e=>e&&e[wp],DC=(e,r)=>hj(e,wp,r),ry=e=>e&&e[wp]&&e[wp].getPayload(),zT=class{constructor(){DC(this,this)}getPayload(){return this.payload||[]}},_p=class extends zT{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ge.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _p(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return Ge.num(e)&&(this.lastPosition=e,r&&(e=Math.round(e/r)*r,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ge.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Sp=class extends _p{constructor(e){super(0),this._string=null,this._toString=yp({output:[e,e]})}static create(e){return new Sp(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ge.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=yp({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends zT{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return pl(this.source,(t,i)=>{qj(t)?r[i]=t.getValue(e):no(t)?r[i]=ui(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Wt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return pl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&no(e)&&ay.dependencies.add(e);const r=ry(e);r&&Wt(r,t=>this.add(t))}},UT=class extends iy{constructor(e){super(e)}static create(e){return new UT(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const r=this.getPayload();return e.length==r.length?r.map((t,i)=>t.setValue(e[i])).some(Boolean):(super.setValue(e.map(Gj)),!0)}};function Gj(e){return(ny(e)?Sp:_p).create(e)}function TC(e){const r=vl(e);return r?r.constructor:Ge.arr(e)?UT:ny(e)?Sp:_p}var jT=(e,r)=>{const t=!Ge.fun(e)||e.prototype&&e.prototype.isReactComponent;return W.forwardRef((i,l)=>{const f=W.useRef(null),c=t&&W.useCallback(_=>{f.current=Qj(l,_)},[l]),[p,g]=Wj(i,r),d=PT(),m=()=>{const _=f.current;if(t&&!_)return;(_?r.applyAnimatedValues(_,p.getValue(!0)):!1)===!1&&d()},C=new Kj(m,g),b=W.useRef();EC(()=>(b.current=C,Wt(g,_=>Cd(_,C)),()=>{b.current&&(Wt(b.current.deps,_=>Cp(_,b.current)),Nt.cancel(b.current.update))})),W.useEffect(m,[]),BT(()=>()=>{const _=b.current;Wt(_.deps,T=>Cp(T,_))});const x=r.getComponentProps(p.getValue());return Me.createElement(e,{...x,ref:c})})},Kj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Nt.write(this.update)}};function Wj(e,r){const t=new Set;return ay.dependencies=t,e.style&&(e={...e,style:r.createAnimatedStyle(e.style)}),e=new iy(e),ay.dependencies=null,[e,t]}function Qj(e,r){return e&&(Ge.fun(e)?e(r):e.current=r),r}var IT=Symbol.for("AnimatedComponent"),Zj=(e,{applyAnimatedValues:r=()=>!1,createAnimatedStyle:t=l=>new iy(l),getComponentProps:i=l=>l}={})=>{const l={applyAnimatedValues:r,createAnimatedStyle:t,getComponentProps:i},f=c=>{const p=HT(c)||"Anonymous";return Ge.str(c)?c=f[c]||(f[c]=jT(c,l)):c=c[IT]||(c[IT]=jT(c,l)),c.displayName=`Animated(${p})`,c};return pl(e,(c,p)=>{Ge.arr(e)&&(p=HT(c)),f[p]=f(c)}),{animated:f}},HT=e=>Ge.str(e)?e:e&&Ge.str(e.displayName)?e.displayName:Ge.fun(e)&&e.name||null;function Mc(e,...r){return Ge.fun(e)?e(...r):e}var Ep=(e,r)=>e===!0||!!(r&&e&&(Ge.fun(e)?e(r):Bi(e).includes(r))),VT=(e,r)=>Ge.obj(e)?r&&e[r]:e,$T=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Xj=e=>e,kC=(e,r=Xj)=>{let t=Jj;e.default&&e.default!==!0&&(e=e.default,t=Object.keys(e));const i={};for(const l of t){const f=r(e[l],l);Ge.und(f)||(i[l]=f)}return i},Jj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eI={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tI(e){const r={};let t=0;if(pl(e,(i,l)=>{eI[l]||(r[l]=i,t++)}),t)return r}function YT(e){const r=tI(e);if(r){const t={to:r};return pl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Dp(e){return e=ui(e),Ge.arr(e)?e.map(Dp):ny(e)?wo.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function nI(e){for(const r in e)return!0;return!1}function AC(e){return Ge.fun(e)||Ge.arr(e)&&Ge.obj(e[0])}function rI(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function aI(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var iI={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},OC={...iI.default,mass:1,damping:1,easing:Rj.linear,clamp:!1},oI=class{constructor(){this.velocity=0,Object.assign(this,OC)}};function lI(e,r,t){t&&(t={...t},qT(t,r),r={...t,...r}),qT(e,r),Object.assign(e,r);for(const c in OC)e[c]==null&&(e[c]=OC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return Ge.und(i)||(i<.01&&(i=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/i,2)*f,e.friction=4*Math.PI*l*f/i),e}function qT(e,r){if(!Ge.und(r.decay))e.duration=void 0;else{const t=!Ge.und(r.tension)||!Ge.und(r.friction);(t||!Ge.und(r.frequency)||!Ge.und(r.damping)||!Ge.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var GT=[],sI=class{constructor(){this.changed=!1,this.values=GT,this.toValues=null,this.fromValues=GT,this.config=new oI,this.immediate=!1}};function KT(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,p)=>{let g,d,m=Ep(t.cancel??(i==null?void 0:i.cancel),r);if(m)x();else{Ge.und(t.pause)||(l.paused=Ep(t.pause,r));let _=i==null?void 0:i.pause;_!==!0&&(_=l.paused||Ep(_,r)),g=Mc(t.delay||0,r),_?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),g=d.time-Nt.now()}function b(){g>0&&!wo.skipAnimation?(l.delayed=!0,d=Nt.setTimeout(x,g),l.pauseQueue.add(C),l.timeouts.add(d)):x()}function x(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(C),l.timeouts.delete(d),e<=(l.cancelId||0)&&(m=!0);try{f.start({...t,callId:e,cancel:m},c)}catch(_){p(_)}}})}var RC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?wd(e.get()):r.every(t=>t.noop)?WT(e.get()):So(e.get(),r.every(t=>t.finished)),WT=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),So=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),wd=e=>({value:e,cancelled:!0,finished:!1});function QT(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:p,promise:g}=t;return!f&&e===p&&!r.reset?g:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=kC(r,(E,A)=>A==="onRest"?void 0:E);let m,C;const b=new Promise((E,A)=>(m=E,C=A)),x=E=>{const A=l<=(t.cancelId||0)&&wd(i)||l!==t.asyncId&&So(i,!1);if(A)throw E.result=A,C(E),E},_=(E,A)=>{const k=new ZT,D=new XT;return(async()=>{if(wo.skipAnimation)throw Tp(t),D.result=So(i,!1),C(D),D;x(k);const R=Ge.obj(E)?{...E}:{...A,to:E};R.parentId=l,pl(d,(z,M)=>{Ge.und(R[M])&&(R[M]=z)});const N=await i.start(R);return x(k),t.paused&&await new Promise(z=>{t.resumeQueue.add(z)}),N})()};let T;if(wo.skipAnimation)return Tp(t),So(i,!1);try{let E;Ge.arr(e)?E=(async A=>{for(const k of A)await _(k)})(e):E=Promise.resolve(e(_,i.stop.bind(i))),await Promise.all([E.then(m),b]),T=So(i.get(),!0,!1)}catch(E){if(E instanceof ZT)T=E.result;else if(E instanceof XT)T=E.result;else throw E}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?p:void 0,t.promise=f?g:void 0)}return Ge.fun(c)&&Nt.batchedUpdates(()=>{c(T,i,i.item)}),T})()}function Tp(e,r){vp(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var ZT=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},XT=class extends Error{constructor(){super("SkipAnimationSignal")}},FC=e=>e instanceof NC,uI=1,NC=class extends AT{constructor(){super(...arguments),this.id=uI++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=vl(this);return e&&e.getValue()}to(...e){return wo.to(this,e)}interpolate(...e){return Uj(),wo.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,r=!1){bp(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),bp(this,{type:"priority",parent:this,priority:e})}},Pc=Symbol.for("SpringPhase"),JT=1,MC=2,PC=4,BC=e=>(e[Pc]&JT)>0,pu=e=>(e[Pc]&MC)>0,kp=e=>(e[Pc]&PC)>0,ek=(e,r)=>r?e[Pc]|=MC|JT:e[Pc]&=~MC,tk=(e,r)=>r?e[Pc]|=PC:e[Pc]&=~PC,cI=class extends NC{constructor(e,r){if(super(),this.animation=new sI,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ge.und(e)||!Ge.und(r)){const t=Ge.obj(e)?{...e}:{...r,from:e};Ge.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(pu(this)||this._state.asyncTo)||kp(this)}get goal(){return ui(this.animation.to)}get velocity(){const e=vl(this);return e instanceof _p?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return BC(this)}get isAnimating(){return pu(this)}get isPaused(){return kp(this)}get isDelayed(){return this._state.delayed}advance(e){let r=!0,t=!1;const i=this.animation;let{toValues:l}=i;const{config:f}=i,c=ry(i.to);!c&&no(i.to)&&(l=Bi(ui(i.to))),i.values.forEach((d,m)=>{if(d.done)return;const C=d.constructor==Sp?1:c?c[m].lastPosition:l[m];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let _=d.elapsedTime+=e;const T=i.fromValues[m],E=d.v0!=null?d.v0:d.v0=Ge.arr(f.velocity)?f.velocity[m]:f.velocity;let A;const k=f.precision||(T==C?.005:Math.min(1,Math.abs(C-T)*.001));if(Ge.und(f.duration))if(f.decay){const D=f.decay===!0?.998:f.decay,R=Math.exp(-(1-D)*_);x=T+E/(1-D)*(1-R),b=Math.abs(d.lastPosition-x)<=k,A=E*R}else{A=d.lastVelocity==null?E:d.lastVelocity;const D=f.restVelocity||k/10,R=f.clamp?0:f.bounce,N=!Ge.und(R),z=T==C?d.v0>0:T<C;let M,I=!1;const Y=1,B=Math.ceil(e/Y);for(let P=0;P<B&&(M=Math.abs(A)>D,!(!M&&(b=Math.abs(C-x)<=k,b)));++P){N&&(I=x==C||x>C==z,I&&(A=-A*R,x=C));const U=-f.tension*1e-6*(x-C),H=-f.friction*.001*A,V=(U+H)/f.mass;A=A+V*Y,x=x+A*Y}}else{let D=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,_=d.elapsedTime+=e)),D=(f.progress||0)+_/this._memoizedDuration,D=D>1?1:D<0?0:D,d.durationProgress=D),x=T+f.easing(D)*(C-T),A=(x-d.lastPosition)/e,b=D==1}d.lastVelocity=A,Number.isNaN(x)&&(b=!0)}c&&!c[m].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const p=vl(this),g=p.getValue();if(r){const d=ui(i.to);(g!==d||t)&&!f.decay?(p.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(g),this._stop()}else t&&this._onChange(g)}set(e){return Nt.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(pu(this)){const{to:e,config:r}=this.animation;Nt.batchedUpdates(()=>{this._onStart(),r.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,r){let t;return Ge.und(e)?(t=this.queue||[],this.queue=[]):t=[Ge.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>RC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),Tp(this._state,e&&this._lastCallId),Nt.batchedUpdates(()=>this._stop(r,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const r=this.key||"";let{to:t,from:i}=e;t=Ge.obj(t)?t[r]:t,(t==null||AC(t))&&(t=void 0),i=Ge.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return BC(this)||(e.reverse&&([t,i]=[i,t]),i=ui(i),Ge.und(i)?vl(this)||this._set(t):this._set(i)),l}_update({...e},r){const{key:t,defaultProps:i}=this;e.default&&Object.assign(i,kC(e,(c,p)=>/^on/.test(p)?VT(c,t):c)),ak(this,e,"onProps"),Rp(this,"onProps",e,this);const l=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const f=this._state;return KT(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{kp(this)||(tk(this,!0),mp(f.pauseQueue),Rp(this,"onPause",So(this,Ap(this,this.animation.to)),this))},resume:()=>{kp(this)&&(tk(this,!1),pu(this)&&this._resume(),mp(f.resumeQueue),Rp(this,"onResume",So(this,Ap(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const p=nk(e);if(p)return this._update(p,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(wd(this));const i=!Ge.und(e.to),l=!Ge.und(e.from);if(i||l)if(r.callId>this._lastToId)this._lastToId=r.callId;else return t(wd(this));const{key:f,defaultProps:c,animation:p}=this,{to:g,from:d}=p;let{to:m=g,from:C=d}=e;l&&!i&&(!r.default||Ge.und(m))&&(m=C),r.reverse&&([m,C]=[C,m]);const b=!us(C,d);b&&(p.from=C),C=ui(C);const x=!us(m,g);x&&this._focus(m);const _=AC(r.to),{config:T}=p,{decay:E,velocity:A}=T;(i||l)&&(T.velocity=0),r.config&&!_&&lI(T,Mc(r.config,f),r.config!==c.config?Mc(c.config,f):void 0);let k=vl(this);if(!k||Ge.und(m))return t(So(this,!0));const D=Ge.und(r.reset)?l&&!r.default:!Ge.und(C)&&Ep(r.reset,f),R=D?C:this.get(),N=Dp(m),z=Ge.num(N)||Ge.arr(N)||ny(N),M=!_&&(!z||Ep(c.immediate||r.immediate,f));if(x){const P=TC(m);if(P!==k.constructor)if(M)k=this._set(N);else throw Error(`Cannot animate between ${k.constructor.name} and ${P.name}, as the "to" prop suggests`)}const I=k.constructor;let Y=no(m),B=!1;if(!Y){const P=D||!BC(this)&&b;(x||P)&&(B=us(Dp(R),N),Y=!B),(!us(p.immediate,M)&&!M||!us(T.decay,E)||!us(T.velocity,A))&&(Y=!0)}if(B&&pu(this)&&(p.changed&&!D?Y=!0:Y||this._stop(g)),!_&&((Y||no(g))&&(p.values=k.getPayload(),p.toValues=no(m)?null:I==Sp?[1]:Bi(N)),p.immediate!=M&&(p.immediate=M,!M&&!D&&this._set(g)),Y)){const{onRest:P}=p;Wt(dI,H=>ak(this,r,H));const U=So(this,Ap(this,g));mp(this._pendingCalls,U),this._pendingCalls.add(t),p.changed&&Nt.batchedUpdates(()=>{var H;p.changed=!D,P==null||P(U,this),D?Mc(c.onRest,U):(H=p.onStart)==null||H.call(p,U,this)})}D&&this._set(R),_?t(QT(r.to,r,this._state,this)):Y?this._start():pu(this)&&!x?this._pendingCalls.add(t):t(WT(R))}_focus(e){const r=this.animation;e!==r.to&&(kT(this)&&this._detach(),r.to=e,kT(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;no(r)&&(Cd(r,this),FC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;no(e)&&Cp(e,this)}_set(e,r=!0){const t=ui(e);if(!Ge.und(t)){const i=vl(this);if(!i||!us(t,i.getValue())){const l=TC(t);!i||i.constructor!=l?DC(this,l.create(t)):i.setValue(t),i&&Nt.batchedUpdates(()=>{this._onChange(t,r)})}}return vl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Rp(this,"onStart",So(this,Ap(this,e.to)),this))}_onChange(e,r){r||(this._onStart(),Mc(this.animation.onChange,e,this)),Mc(this.defaultProps.onChange,e,this),super._onChange(e,r)}_start(){const e=this.animation;vl(this).reset(ui(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),pu(this)||(ek(this,!0),kp(this)||this._resume())}_resume(){wo.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(pu(this)){ek(this,!1);const t=this.animation;Wt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),bp(this,{type:"idle",parent:this});const i=r?wd(this.get()):So(this.get(),Ap(this,e??t.to));mp(this._pendingCalls,i),t.changed&&(t.changed=!1,Rp(this,"onRest",i,this))}}};function Ap(e,r){const t=Dp(r),i=Dp(e.get());return us(i,t)}function nk(e,r=e.loop,t=e.to){const i=Mc(r);if(i){const l=i!==!0&&YT(i),f=(l||e).reverse,c=!l||l.reset;return Op({...e,loop:r,default:!1,pause:void 0,to:!f||AC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Op(e){const{to:r,from:t}=e=YT(e),i=new Set;return Ge.obj(r)&&rk(r,i),Ge.obj(t)&&rk(t,i),e.keys=i.size?Array.from(i):null,e}function fI(e){const r=Op(e);return Ge.und(r.default)&&(r.default=kC(r)),r}function rk(e,r){pl(e,(t,i)=>t!=null&&r.add(i))}var dI=["onStart","onRest","onChange","onPause","onResume"];function ak(e,r,t){e.animation[t]=r[t]!==$T(r,t)?VT(r[t],e.key):void 0}function Rp(e,r,...t){var i,l,f,c;(l=(i=e.animation)[r])==null||l.call(i,...t),(c=(f=e.defaultProps)[r])==null||c.call(f,...t)}var hI=["onStart","onChange","onRest"],pI=1,vI=class{constructor(e,r){this.id=pI++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((r,t)=>e[t]=r.get()),e}set(e){for(const r in e){const t=e[r];Ge.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Op(e)),this}start(e){let{queue:r}=this;return e?r=Bi(e).map(Op):this.queue=[],this._flush?this._flush(this,r):(ck(this,r),LC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Wt(Bi(r),i=>t[i].stop(!!e))}else Tp(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Ge.und(e))this.start({pause:!0});else{const r=this.springs;Wt(Bi(e),t=>r[t].pause())}return this}resume(e){if(Ge.und(e))this.start({pause:!1});else{const r=this.springs;Wt(Bi(e),t=>r[t].resume())}return this}each(e){pl(this.springs,e)}_onFrame(){const{onStart:e,onChange:r,onRest:t}=this._events,i=this._active.size>0,l=this._changed.size>0;(i&&!this._started||l&&!this._started)&&(this._started=!0,vp(e,([p,g])=>{g.value=this.get(),p(g,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&vp(r,([p,g])=>{g.value=c,p(g,this,this._item)}),f&&(this._started=!1,vp(t,([p,g])=>{g.value=c,p(g,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Nt.onFrame(this._onFrame)}};function LC(e,r){return Promise.all(r.map(t=>ik(e,t))).then(t=>RC(e,t))}async function ik(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:p,onResolve:g}=r,d=Ge.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const m=Ge.arr(l)||Ge.fun(l)?l:void 0;m?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Wt(hI,T=>{const E=r[T];if(Ge.fun(E)){const A=e._events[T];r[T]=({finished:k,cancelled:D})=>{const R=A.get(E);R?(k||(R.finished=!1),D&&(R.cancelled=!0)):A.set(E,{value:null,finished:k||!1,cancelled:D||!1})},d&&(d[T]=r[T])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,mp(r.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(r.pause=!0);const b=(i||Object.keys(e.springs)).map(T=>e.springs[T].start(r)),x=r.cancel===!0||$T(r,"cancel")===!0;(m||x&&C.asyncId)&&b.push(KT(++e._lastAsyncId,{props:r,state:C,actions:{pause:mC,resume:mC,start(T,E){x?(Tp(C,e._lastAsyncId),E(wd(e))):(T.onRest=p,E(QT(m,T,C,e)))}}})),C.paused&&await new Promise(T=>{C.resumeQueue.add(T)});const _=RC(e,await Promise.all(b));if(c&&_.finished&&!(t&&_.noop)){const T=nk(r,c,l);if(T)return ck(e,[T]),ik(e,T,!0)}return g&&Nt.batchedUpdates(()=>g(_,e,e.item)),_}function ok(e,r){const t={...e.springs};return r&&Wt(Bi(r),i=>{Ge.und(i.keys)&&(i=Op(i)),Ge.obj(i.to)||(i={...i,to:void 0}),uk(t,i,l=>sk(l))}),lk(e,t),t}function lk(e,r){pl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,Cd(t,e))})}function sk(e,r){const t=new cI;return t.key=e,r&&Cd(t,r),t}function uk(e,r,t){r.keys&&Wt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function ck(e,r){Wt(r,t=>{uk(e.springs,t,i=>sk(i,e))})}var oy=({children:e,...r})=>{const t=W.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=Vj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Me.createElement(f,{value:r},e)},ly=mI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function mI(e,r){return Object.assign(e,Me.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var gI=()=>{const e=[],r=function(i){Ij();const l=[];return Wt(e,(f,c)=>{if(Ge.und(i))l.push(f.start());else{const p=t(i,f,c);p&&l.push(f.start(p))}}),l};r.current=e,r.add=function(i){e.includes(i)||e.push(i)},r.delete=function(i){const l=e.indexOf(i);~l&&e.splice(l,1)},r.pause=function(){return Wt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Wt(e,i=>i.resume(...arguments)),this},r.set=function(i){Wt(e,(l,f)=>{const c=Ge.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Wt(e,(f,c)=>{if(Ge.und(i))l.push(f.start());else{const p=this._getProps(i,f,c);p&&l.push(f.start(p))}}),l},r.stop=function(){return Wt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Wt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return Ge.fun(i)?i(f,l):i};return r._getProps=t,r};function yI(e,r,t){const i=Ge.fun(r)&&r;i&&!t&&(t=[]);const l=W.useMemo(()=>i||arguments.length==3?gI():void 0,[]),f=W.useRef(0),c=PT(),p=W.useMemo(()=>({ctrls:[],queue:[],flush(A,k){const D=ok(A,k);return f.current>0&&!p.queue.length&&!Object.keys(D).some(N=>!A.springs[N])?LC(A,k):new Promise(N=>{lk(A,D),p.queue.push(()=>{N(LC(A,k))}),c()})}}),[]),g=W.useRef([...p.ctrls]),d=[],m=LT(e)||0;W.useMemo(()=>{Wt(g.current.slice(e,m),A=>{rI(A,l),A.stop(!0)}),g.current.length=e,C(m,e)},[e]),W.useMemo(()=>{C(0,Math.min(m,e))},t);function C(A,k){for(let D=A;D<k;D++){const R=g.current[D]||(g.current[D]=new vI(null,p.flush)),N=i?i(D,R):r[D];N&&(d[D]=fI(N))}}const b=g.current.map((A,k)=>ok(A,d[k])),x=W.useContext(oy),_=LT(x),T=x!==_&&nI(x);EC(()=>{f.current++,p.ctrls=g.current;const{queue:A}=p;A.length&&(p.queue=[],Wt(A,k=>k())),Wt(g.current,(k,D)=>{l==null||l.add(k),T&&k.start({default:x});const R=d[D];R&&(aI(k,R.ref),k.ref?k.queue.push(R):k.start(R))})}),BT(()=>()=>{Wt(p.ctrls,A=>A.stop(!0))});const E=b.map(A=>({...A}));return l?[E,l]:E}function xI(e,r){const t=Ge.fun(e),[[i],l]=yI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var bI=class extends NC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=yp(...r);const t=this._get(),i=TC(t);DC(this,i.create(t))}advance(e){const r=this._get(),t=this.get();us(r,t)||(vl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&fk(this._active)&&zC(this)}_get(){const e=Ge.arr(this.source)?this.source.map(ui):Bi(ui(this.source));return this.calc(...e)}_start(){this.idle&&!fk(this._active)&&(this.idle=!1,Wt(ry(this),e=>{e.done=!1}),wo.skipAnimation?(Nt.batchedUpdates(()=>this.advance()),zC(this)):Gg.start(this))}_attach(){let e=1;Wt(Bi(this.source),r=>{no(r)&&Cd(r,this),FC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Wt(Bi(this.source),e=>{no(e)&&Cp(e,this)}),this._active.clear(),zC(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Bi(this.source).reduce((r,t)=>Math.max(r,(FC(t)?t.priority:0)+1),0))}};function CI(e){return e.idle!==!1}function fk(e){return!e.size||Array.from(e).every(CI)}function zC(e){e.idle||(e.idle=!0,Wt(ry(e),r=>{r.done=!0}),bp(e,{type:"idle",parent:e}))}wo.assign({createStringInterpolator:NT,to:(e,r)=>new bI(e,r)});var dk=/^--/;function wI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!dk.test(e)&&!(Fp.hasOwnProperty(e)&&Fp[e])?r+"px":(""+r).trim()}var hk={};function _I(e,r){if(!e.nodeType||!e.setAttribute)return!1;const t=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:l,children:f,scrollTop:c,scrollLeft:p,viewBox:g,...d}=r,m=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:hk[b]||(hk[b]=b.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));f!==void 0&&(e.textContent=f);for(const b in l)if(l.hasOwnProperty(b)){const x=wI(b,l[b]);dk.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,m[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),p!==void 0&&(e.scrollLeft=p),g!==void 0&&e.setAttribute("viewBox",g)}var Fp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},SI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),EI=["Webkit","Ms","Moz","O"];Fp=Object.keys(Fp).reduce((e,r)=>(EI.forEach(t=>e[SI(t,r)]=e[r]),e),Fp);var DI=/^(matrix|translate|scale|rotate|skew)/,TI=/^(translate)/,kI=/^(rotate|skew)/,UC=(e,r)=>Ge.num(e)&&e!==0?e+r:e,sy=(e,r)=>Ge.arr(e)?e.every(t=>sy(t,r)):Ge.num(e)?e===r:parseFloat(e)===r,AI=class extends iy{constructor({x:e,y:r,z:t,...i}){const l=[],f=[];(e||r||t)&&(l.push([e||0,r||0,t||0]),f.push(c=>[`translate3d(${c.map(p=>UC(p,"px")).join(",")})`,sy(c,0)])),pl(i,(c,p)=>{if(p==="transform")l.push([c||""]),f.push(g=>[g,g===""]);else if(DI.test(p)){if(delete i[p],Ge.und(c))return;const g=TI.test(p)?"px":kI.test(p)?"deg":"";l.push(Bi(c)),f.push(p==="rotate3d"?([d,m,C,b])=>[`rotate3d(${d},${m},${C},${UC(b,g)})`,sy(b,0)]:d=>[`${p}(${d.map(m=>UC(m,g)).join(",")})`,sy(d,p.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new OI(l,f)),super(i)}},OI=class extends AT{constructor(e,r){super(),this.inputs=e,this.transforms=r,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",r=!0;return Wt(this.inputs,(t,i)=>{const l=ui(t[0]),[f,c]=this.transforms[i](Ge.arr(l)?l:t.map(ui));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cd(t,this)))}observerRemoved(e){e==0&&Wt(this.inputs,r=>Wt(r,t=>no(t)&&Cp(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),bp(this,e)}},RI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];wo.assign({batchedUpdates:tu.exports.unstable_batchedUpdates,createStringInterpolator:NT,colors:yj});var FI=Zj(RI,{applyAnimatedValues:_I,createAnimatedStyle:e=>new AI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),pk=FI.animated;function vk(e,r,t){let i=e;return r!==void 0&&(i=Math.max(e,r)),t!==void 0&&(i=Math.min(i,t)),i}const[mk]=wn("indicator"),NI=W.memo(e=>{var{vertical:r}=e,t=$a(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(Q("div",{className:Re(mk("dot",{active:t.current===l}))},l));return Q("div",Object.assign({className:Re(t.className,mk({vertical:r})),style:t.style},{children:i}))});let Np=0;function jC(e){e?(Np||document.body.classList.add("rv-toast--unclickable"),Np+=1):Np&&(Np-=1,Np||document.body.classList.remove("rv-toast--unclickable"))}function MI(e){return e===window}const gk=e=>{const r=e;if(MI(r)){const t=r.innerWidth,i=r.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}return r&&r.getBoundingClientRect?r.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};function PI(e,r,t){let i,l,f,c,p,g,d=0,m=!1,C=!1,b=!0;const x=!r&&r!==0&&typeof fd.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");r=+r||0,cd(t)&&(m=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function _(B){const P=i,U=l;return i=l=void 0,d=B,c=e.apply(U,P),c}function T(B,P){return x?(fd.cancelAnimationFrame(p),fd.requestAnimationFrame(B)):setTimeout(()=>B(),P)}function E(B){if(x)return fd.cancelAnimationFrame(B);clearTimeout(B)}function A(B){return d=B,p=T(R,r),m?_(B):c}function k(B){const P=B-g,U=B-d,H=r-P;return C?Math.min(H,f-U):H}function D(B){const P=B-g,U=B-d;return g===void 0||P>=r||P<0||C&&U>=f}function R(){const B=Date.now();if(D(B))return N(B);p=T(R,k(B))}function N(B){return p=void 0,b&&i?_(B):(i=l=void 0,c)}function z(){p!==void 0&&E(p),d=0,i=g=l=p=void 0}function M(){return p===void 0?c:N(Date.now())}function I(){return p!==void 0}function Y(...B){const P=Date.now(),U=D(P);if(i=B,l=this,g=P,U){if(p===void 0)return A(g);if(C)return p=T(R,r),_(g)}return p===void 0&&(p=T(R,r)),c}return Y.cancel=z,Y.flush=M,Y.pending=I,Y}const JZ="",[uy]=wn("toast"),BI=e=>{const r=ea(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};W.useEffect(()=>{if(!r.visible){jC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,jC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:p,loadingType:g}=r;if(f||c==="success"||c==="fail"){const m=c==="fail"?Q(J2,{}):Q(OD,{});return W.cloneElement(f||m,{className:Re(uy("icon")),fontSize:p})}return c==="loading"?Q(X2,{className:Re(uy("loading")),type:g}):null},l=()=>{const{message:f}=r;return Jr(f)&&f!==""?Q("div",Object.assign({className:Re(uy("info"))},{children:f})):null};return Be(sp,Object.assign({className:Re([uy([r.position,{[r.type]:!r.icon}]),r.className]),visible:r.visible,overlay:r.overlay,transition:r.transition,overlayClass:r.overlayClass,overlayStyle:r.overlayStyle,closeOnClickOverlay:r.closeOnClickOverlay,lockScroll:!1,onClick:t,onClose:r.onClose,onClosed:r.onClosed,onOpened:r.onOpened,teleport:r.teleport},{children:[i(),l()]}))},IC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},HC=[];let yk=!1,VC=Jh({},IC);const cy=new Map;function xk(){let e=HC.pop();for(;e;)e(),e=HC.pop()}function LI(){setTimeout(xk)}const Bc=e=>{if(!Bg())return null;const r=bk(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return aC(f).appendChild(c),qD(Q(()=>{const d=Object.assign({duration:2e3},r),[m,C]=W.useState(!1),[b,x]=W.useState(Object.assign({},d)),_=W.useCallback(()=>{b.forbidClick&&jC(!1),C(!1),window.setTimeout(()=>{GD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+IC.duration)},[c]),T=W.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=_,t.config=W.useCallback(E=>{x(A=>typeof E=="function"?Object.assign(Object.assign({},A),E(A)):Object.assign(Object.assign({},A),E))},[x]),W.useEffect(()=>(C(!0),yk||xk(),HC.push(_),b.duration!==0&&"duration"in b&&(i=window.setTimeout(T,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),Q(BI,Object.assign({},b,{visible:m,teleport:()=>c,onClose:T,onClosed:_}))},{}),c),t};function bk(e){return cd(e)?e:{message:e}}const zI=e=>r=>Bc(Object.assign(Object.assign(Object.assign(Object.assign({},VC),cy.get(e)),bk(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Bc[e]=zI(e)}),Bc.allowMultiple=(e=!0)=>{yk=e},Bc.clear=LI;function UI(e,r){typeof e=="string"?cy.set(e,r):Jh(VC,e)}Bc.setDefaultOptions=UI,Bc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(VC=Jh({},IC),cy.clear())};const Ck=Bc;function fy(){const e=W.useRef([]),r=W.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=W.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const wk=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=W.useState(()=>{if(t!==void 0)return t;if(r!==void 0)return typeof r=="function"?r():r}),f=t!==void 0?t:i;function c(p){l(p)}return[f,c]},rX="",[jI]=wn("swiper-item"),_k=W.forwardRef((e,r)=>{const t=W.useRef(null);W.useImperativeHandle(r,()=>({self:t.current}));const[i]=oz(t,{rootMargin:"-0.1px",threshold:0,root:()=>{var l;return(l=e.trackRef)===null||l===void 0?void 0:l.current}});return Q("div",Object.assign({ref:t,className:Re(e.className,jI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Lc]=wn("swiper"),II=W.forwardRef((e,r)=>{const t=ea(e,{initialSwipe:0,loop:!0,touchable:!0,enabled:!0,rubberband:!0,autoplay:!1,slideSize:100,trackOffset:0,stuckAtBoundary:!1,preventScroll:!0}),{loop:i,autoplay:l,vertical:f,duration:c,autoHeight:p}=t,g=f?"y":"x",d=t.slideSize/100,m=t.trackOffset/100,{validChildren:C,count:b}=W.useMemo(()=>{let te=0;return{validChildren:W.Children.map(t.children,$=>W.isValidElement($)?$.type!==_k?null:(te++,$):null),count:te}},[t.children]),x=W.useRef(null),[_,T]=fy(),[E,A]=W.useState(()=>t.enabled),[k,D]=W.useState(t.initialSwipe),[R,N,z]=Q2(!1),M=W.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),I=W.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),Y=()=>{const te=x.current;return te?(f?te.offsetHeight:te.offsetWidth)*t.slideSize/100:0},B=te=>{let Z=0,$=b-1;return t.stuckAtBoundary&&(Z+=(1-d-m)/d,$-=(1-d-m)/d),vk(te,Z,$)},[{position:P},U]=xI(()=>({position:B(k)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(z.current||!I)return;const te=P.get(),Z=100*b,$=$C(te,Z);$!==te&&U.start({position:$,immediate:!0})}}),[b]),H=uj(te=>{var Z;const $=Y();if(!$||!t.preventScroll&&Sk(te.target,(Z=_[k])===null||Z===void 0?void 0:Z.self))return;const ne=f?1:0,oe=te.offset[ne],ae=te.direction[ne],se=te.velocity[ne];if(N(!0),!te.last)U.start({position:oe*100/$,immediate:!0});else{const ve=Math.round((oe+Math.min(se*2e3,$)*ae)/$);K(ve),window.setTimeout(()=>{N(!1)})}},{enabled:E,transform:([te,Z])=>[-te,-Z],from:()=>{const te=Y();return[P.get()/100*te,P.get()/100*te]},bounds:()=>{if(I)return{};const te=Y(),Z=B(0)*te,$=B(b-1)*te;return f?{top:Z,bottom:$}:{left:Z,right:$}},rubberband:t.rubberband,axis:g,preventScroll:g==="x"?t.preventScroll:!1,pointer:{touch:!0}}),V=()=>t.indicator===void 0||t.indicator===!0?Q("div",Object.assign({className:Re(Lc("indicator",{vertical:f}))},{children:Q(NI,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:k}))})):typeof t.indicator=="function"?t.indicator(b,k):null;function K(te,Z=!1){const $=Math.round(te),ne=I?$C($,b):vk($,0,b-1);D(ne),U.start({position:(I?$:B($))*100,immediate:Z})}const ee=()=>{K(Math.round(P.get()/100)+1)},J=()=>{K(Math.round(P.get()/100)-1)};W.useImperativeHandle(r,()=>({activeIndex:k,swipeTo:K,swipeNext:ee,swipePrev:J,enable:()=>{A(!0)},disable:()=>{A(!1)}})),tp(()=>{const te=C.length-1;k>te&&K(te,!0)}),Rc(()=>{var te;(te=t.onChange)===null||te===void 0||te.call(t,k)},[k]),W.useEffect(()=>{if(!l||R)return Mi;const te=typeof l=="boolean"?5e3:l,Z=window.setInterval(()=>{ee()},te);return()=>{window.clearInterval(Z)}},[l,R]);const q=()=>I?Q("div",Object.assign({className:Re(Lc("track-inner",{vertical:f}))},{children:W.Children.map(C,(te,Z)=>Q(pk.div,Object.assign({className:Re(Lc("slide")),style:{[g]:P.to($=>{let ne=-$+Z*100;const oe=b*100,ae=oe/2;return ne=$C(ne+ae,oe)-ae,`${ne}%`}),[f?"top":"left"]:`-${Z*100}%`}},{children:W.cloneElement(te,{ref:T(Z),autoHeight:p,trackRef:x})})))})):Q(pk.div,Object.assign({className:Re(Lc("track-inner")),style:{[g]:P.to(te=>`${-te}%`)}},{children:W.Children.map(C,(te,Z)=>Q("div",Object.assign({className:Re(Lc("slide"))},{children:W.cloneElement(te,{ref:T(Z),autoHeight:p})})))}));return b===0&&void 0,Be("div",Object.assign({className:Re(t.className,Lc({vertical:f})),style:M},{children:[Q("div",Object.assign({ref:x,className:Re(Lc("track",{"allow-touch-move":t.touchable})),onClickCapture:te=>{z.current&&te.stopPropagation()}},t.touchable?H():{},{children:q()})),V()]}))});function $C(e,r){const t=e%r;return t<0?t+r:t}function Sk(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?Sk(e.parentElement,r):!1:!1}const Ek=Object.assign(II,{Item:_k}),HI=e=>{const r=ea(e,{shape:"round",bindGroup:!0}),t=W.useRef(null),i=m=>r.parent&&r.bindGroup?r.parent.props[m]:null,l=W.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=W.useMemo(()=>i("direction")||null,[r.parent]),c=W.useMemo(()=>{const m=r.checkedColor||i("checkedColor");return m&&r.checked&&!l?{borderColor:m,backgroundColor:m}:{}},[r.checkedColor,r.checked,l]),p=m=>{const{target:C}=m,b=t.current,x=b===C||(b==null?void 0:b.contains(C));!l&&(x||!r.labelDisabled)&&r.onToggle&&r.onToggle(),r.onClick&&r.onClick(m)},g=()=>{const{bem:m,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return Q("div",Object.assign({ref:t,className:Re(m("icon",[C,{disabled:l,checked:b}])),style:{fontSize:dl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):Q(OD,{style:c})}))},d=()=>r.children?Q("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Be("div",Object.assign({role:r.role,className:Re(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:p},{children:[r.labelPosition==="left"&&d(),g(),r.labelPosition!=="left"&&d()]}))},sX="";function VI(e){return[e.getFullYear(),e.getMonth()+1]}function YC(e,r){const t=e.getFullYear(),i=r.getFullYear();if(t===i){const l=e.getMonth(),f=r.getMonth();return l===f?0:l>f?1:-1}return t>i?1:-1}function ml(e,r){const t=YC(e,r);if(t===0){const i=e.getDate(),l=r.getDate();return i===l?0:i>l?1:-1}return t}const dy=e=>new Date(e),Dk=e=>Array.isArray(e)?e.map(dy):dy(e);function qC(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const Tk=e=>qC(e,-1),kk=e=>qC(e,1),GC=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function $I(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function Ak(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function YI(e){if(!e)return 0;for(;pD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function KC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Mp]=wn("calendar"),qI=e=>{const r=ea(e,{offset:0}),t=W.useMemo(()=>{const{item:d,index:m,color:C,offset:b,rowHeight:x}=r,_={height:x};if(d.type==="placeholder")return _.width="100%",_;if(m===0&&(_.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":_.background=C;break;case"middle":_.color=C;break}return _},[r.item,r.index,r.color,r.offset,r.rowHeight]),i=()=>{var d;r.item.type!=="disabled"&&((d=r.onClick)===null||d===void 0||d.call(r,r.item))},l=()=>{const{topInfo:d}=r.item;return d||r.topInfoRender?Q("div",Object.assign({className:Re(Mp("top-info"))},{children:r.topInfoRender?r.topInfoRender(r.item):d})):null},f=()=>{const{bottomInfo:d}=r.item;return d||r.bottomInfoRender?Q("div",Object.assign({className:Re(Mp("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:m,rowHeight:C}=r,{type:b,text:x}=d,_=Be(en,{children:[l(),x,f()]});return b==="selected"?Q("div",Object.assign({className:Re(Mp("selected-day")),style:{width:C,height:C,background:m}},{children:_})):_},{type:p,className:g}=r.item;return p==="placeholder"?Q("div",{className:Re(Mp("day")),style:t}):Q("div",Object.assign({role:"gridcell",style:t,className:Re(Mp("day",p),g),tabIndex:p==="disabled"?void 0:-1,onClick:i},{children:c()}))},[hy]=wn("calendar"),GI=W.forwardRef((e,r)=>{const[t,i]=W.useState(),l=W.useRef(),[f,c]=W.useState(),p=W.useRef(0),{locale:g}=W.useContext(vd);W.useEffect(()=>{f&&(p.current=gk(f).height)},[f]);const d=W.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):g.vanCalendar.monthTitle(...VI(e.date)),[e.date,e.formatMonthTitle]),m=W.useMemo(()=>dl(e.rowHeight),[e.rowHeight]),C=W.useMemo(()=>{const B=e.date.getDay();return e.firstDayOfWeek?(B+7-e.firstDayOfWeek)%7:B},[e.date,e.firstDayOfWeek]),b=W.useMemo(()=>KC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=W.useMemo(()=>t||!e.lazyRender,[t]),_=()=>d,T=B=>{const P=e.showSubtitle?l.current:f,U=(P==null?void 0:P.getBoundingClientRect().top)-B.getBoundingClientRect().top+B.scrollTop;fD(B,U)},E=B=>{const P=U=>e.currentDate.some(H=>ml(H,U)===0);if(P(B)){const U=Tk(B),H=kk(B),V=P(U),K=P(H);return V&&K?"multiple-middle":V?"end":K?"start":"multiple-selected"}return""},A=B=>{const[P,U]=e.currentDate;if(!P)return"";const H=ml(B,P);if(!U)return H===0?"start":"";const V=ml(B,U);return e.allowSameDay&&H===0&&V===0?"start-end":H===0?"start":V===0?"end":H>0&&V<0?"middle":""},k=B=>{const{type:P,minDate:U,maxDate:H,currentDate:V}=e;if(ml(B,U)<0||ml(B,H)>0)return"disabled";if(V===null)return"";if(Array.isArray(V)){if(P==="multiple")return E(B);if(P==="range")return A(B)}else if(P==="single")return ml(B,V)===0?"selected":"";return""},D=B=>{if(e.type==="range"){if(B==="start")return g.vanCalendar.start;if(B==="end")return g.vanCalendar.end;if(B==="start-end")return g.vanCalendar.startEnd}return null},R=()=>e.showMonthTitle?Q("div",Object.assign({className:Re(hy("month-title"))},{children:d})):null,N=()=>e.showMark&&x?Q("div",Object.assign({className:Re(hy("month-mark"))},{children:e.date.getMonth()+1})):null,z=W.useMemo(()=>{const B=Math.ceil((b+C)/7);return Array(B).fill({type:"placeholder"})},[b,C]),M=W.useMemo(()=>{const B=[],P=e.date.getFullYear(),U=e.date.getMonth();for(let H=1;H<=b;H++){const V=new Date(P,U,H),K=k(V);let ee={date:V,type:K,text:H,bottomInfo:D(K)};e.formatter&&(ee=e.formatter(ee)),B.push(ee)}return B},[k,e.date,e.formatter]),I=(B,P)=>Q(qI,{item:B,index:P,color:e.color,offset:C,rowHeight:m,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},P),Y=()=>Be("div",Object.assign({ref:l,role:"grid",className:Re(hy("days"))},{children:[N(),(x?M:z).map(I)]}));return W.useImperativeHandle(r,()=>({getTitle:_,getHeight:()=>p.current,setVisible:i,scrollIntoView:T})),Be("div",Object.assign({className:Re(hy("month")),ref:c},{children:[R(),Y()]}))}),[Pp]=wn("calendar"),KI=e=>{const{locale:r}=W.useContext(vd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return Q("div",Object.assign({className:Re(Pp("header-title"))},{children:c}))}return null},i=c=>{var p;(p=e.onClickSubtitle)===null||p===void 0||p.call(e,c)},l=()=>e.showSubtitle?Q("div",Object.assign({className:Re(Pp("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:p}=e,g=r.vanCalendar.weekdays,d=c?g.map((C,b)=>c[b]||C):g,m=[...d.slice(p,7),...d.slice(0,p)];return Q("div",Object.assign({className:Re(Pp("weekdays"))},{children:m.map((C,b)=>Q("span",Object.assign({className:Re(Pp("weekday"))},{children:C}),b))}))};return Be("div",Object.assign({className:Re(Pp("header"))},{children:[t(),l(),f()]}))},[_d]=wn("calendar"),WI=GC(),QI=(()=>{const e=GC();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),Ok=W.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=$a(e,["className","style"]);const c=ea(f,{round:!0,poppable:!0,showMark:!0,showTitle:!0,showConfirm:!0,showSubtitle:!0,closeOnPopstate:!0,closeOnClickOverlay:!0,safeAreaInsetBottom:!0,defaultValue:null,type:"single",position:"bottom",maxRange:null,minDate:WI,maxDate:QI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:p}=W.useContext(vd),[g,d]=np({value:c.visible,defaultValue:!1,onChange:$=>{var ne;$===!1&&((ne=c.onClose)===null||ne===void 0||ne.call(c))}}),m=($,ne=c.minDate,oe=c.maxDate)=>ml($,ne)===-1?ne:ml($,oe)===1?oe:$,C=($=c.defaultValue)=>{const{type:ne,minDate:oe,maxDate:ae}=c;if($===null)return $;const se=GC();if(ne==="range"){Array.isArray($)||($=[]);const ve=m($[0]||se,oe,Tk(ae)),we=m($[1]||se,kk(oe));return[ve,we]}return ne==="multiple"?Array.isArray($)?$.map(ve=>m(ve)):[m(se)]:((!$||Array.isArray($))&&($=se),m($))},b=W.useRef(),x=W.useRef(0),[_,T]=W.useState(C(c.value===void 0?c.defaultValue:c.value)),[E,A]=yD({subtitle:"",currentDate:_});Rc(()=>{c.value!==void 0&&JSON.stringify(_)!==JSON.stringify(c.value)&&T(c.value)},[c.value]),W.useEffect(()=>{JSON.stringify(E.currentDate)!==JSON.stringify(_)&&A({currentDate:_})},[_]);const[k,D]=fy(),R=W.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),N=W.useMemo(()=>{const $=[],ne=new Date(c.minDate);ne.setDate(1);do $.push(new Date(ne)),ne.setMonth(ne.getMonth()+1);while(YC(ne,c.maxDate)!==1);return $},[c.minDate,c.maxDate]),z=W.useMemo(()=>{const{currentDate:$}=E;if($){if(c.type==="range")return!$[0]||!$[1];if(c.type==="multiple")return!$.length}return!$},[c.type,E.currentDate]),M=()=>{var $;const ne=GL(b.current),oe=ne+x.current,ae=N.map((ye,De)=>k[De].getHeight()),se=ae.reduce((ye,De)=>ye+De,0);if(oe>se&&ne>0)return;let ve=0,we;const ce=[-1,-1];for(let ye=0;ye<N.length;ye++){const De=k[ye];ve<=oe&&ve+ae[ye]>=ne&&(ce[1]=ye,we||(we=De,ce[0]=ye),k[ye].showed||(k[ye].showed=!0,($=c.onMonthShow)===null||$===void 0||$.call(c,{date:De.date,title:De.getTitle()}))),ve+=ae[ye]}N.forEach((ye,De)=>{const Pe=De>=ce[0]-1&&De<=ce[1]+1;k[De].setVisible(Pe)}),we&&we.getTitle()!==E.subtitle&&!c.horizontal&&A({subtitle:we.getTitle()})},I=$=>{G2(()=>{N.some((ne,oe)=>YC(ne,$)===0?(b.current&&k[oe].scrollIntoView(b.current),!0):!1),M()})},Y=()=>{if(c.poppable&&!g)return;const{currentDate:$}=E;if($){const ne=c.type==="single"?$:$[0];I(ne)}else G2(M)},B=()=>{G2(()=>{x.current=Math.floor(gk(b.current).height),Y()})},P=($=C())=>{A({currentDate:$}),Y()},U=$=>{var ne;const{maxRange:oe,rangePrompt:ae,showRangePrompt:se}=c;return oe&&$I($)>oe?(se&&Ck.info(ae||p.vanCalendar.rangePrompt(+oe)),(ne=c.onOverRange)===null||ne===void 0||ne.call(c),!1):!0},H=()=>{var $;const ne=Dk(E.currentDate);c.poppable&&T(ne),($=c.onConfirm)===null||$===void 0||$.call(c,ne),Z.close()},V=($,ne)=>{const oe=ae=>{var se;E.currentDate=ae,A({currentDate:ae}),(se=c.onSelect)===null||se===void 0||se.call(c,Dk(E.currentDate))};if(ne&&c.type==="range"&&!U($)){c.showConfirm?oe([$[0],qC($[0],+c.maxRange-1)]):oe($);return}oe($),ne&&!c.showConfirm&&H()},K=$=>{var ne;if(c.readOnly||!$.date)return;const{date:oe}=$,{type:ae}=c,{currentDate:se}=E;if(ae==="range"){if(!se){V([oe]);return}const[ve,we]=se;if(ve&&!we){const ce=ml(oe,ve);ce===1?V([ve,oe],!0):ce===-1?V([oe]):c.allowSameDay&&V([oe,oe],!0)}else V([oe])}else if(ae==="multiple"){if(!se){V([oe]);return}let ve;if(E.currentDate.some((ce,ye)=>{const De=ml(ce,oe)===0;return De&&(ve=ye),De})){const[ce]=se.splice(ve,1);(ne=c.onUnselect)===null||ne===void 0||ne.call(c,dy(ce)),V([...se])}else c.maxRange&&se.length>=c.maxRange?Ck(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):V([...se,oe])}else V(oe,!0)},ee=($,ne)=>{const oe=!c.horizontal&&(ne!==0||!c.showSubtitle);return Q(GI,Object.assign({ref:D(ne),date:$,currentDate:E.currentDate,showMonthTitle:oe,firstDayOfWeek:R},sD(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:K}),ne)},J=()=>{if(c.footer)return c.footer;if(c.showConfirm){const $=z?c.confirmDisabledText:c.confirmText;return Q(ip,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Re(_d("confirm")),disabled:z,nativeType:"button",onClick:H},{children:$||p.vanCalendar.confirm}))}return null},q=()=>Q("div",Object.assign({className:Re(_d("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:J()})),te=()=>Be("div",Object.assign({className:Re(i,_d()),style:l},{children:[Q(KI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||E.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:R,onClickSubtitle:$=>{var ne;(ne=c.onClickSubtitle)===null||ne===void 0||ne.call(c,$)}}),c.horizontal?Q("div",Object.assign({ref:b,className:Re(_d("horizontal-body"))},{children:Q(Ek,Object.assign({indicator:()=>null,onChange:$=>{A({subtitle:k[$].getTitle()})}},{children:N.map(($,ne)=>Q(Ek.Item,{children:ee($,ne)},$))}))})):Q("div",Object.assign({ref:b,className:Re(_d("body")),onScroll:M},{children:N.map(ee)})),q()]})),Z={toggle:()=>{c.poppable&&d($=>!$)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return W.useEffect(()=>{c.poppable||B()},[]),W.useEffect(()=>{c.poppable&&g&&B()},[g]),Rc(()=>{P(C(E.currentDate))},[c.type,c.minDate,c.maxDate]),W.useImperativeHandle(r,()=>Object.assign({reset:P,scrollToDate:I},Z)),c.poppable?Be(en,{children:[Q(sp,Object.assign({visible:g,className:Re(_d("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:Z.close,onClosed:()=>{var $;c.poppable&&JSON.stringify(E.currentDate)!==JSON.stringify(_)&&A({currentDate:_}),($=c.onClosed)===null||$===void 0||$.call(c)}},{children:te()})),(t=c.children)===null||t===void 0?void 0:t.call(c,_,Z)]}):te()});function ZI(e,r){var t;process.env.NODE_ENV==="development"&&(Oc(e)||void 0);const i=xD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=W.useMemo(()=>PI((...c)=>i.current(...c),l,r),[]);return bD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function XI(e,r,t){const[i,l]=W.useState({}),{run:f}=ZI(()=>{l({})},t);W.useEffect(()=>f(),r),Rc(e,[i])}const hX="",Rk=W.createContext({}),[JI]=wn("checkbox-group"),eH=W.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=wk({value:e.value,defaultValue:e.defaultValue}),c=(g={})=>{typeof g=="boolean"&&(g={checked:g});const{checked:d,skipDisabled:m}=g,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&m?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},p=g=>{var d;f(g),(d=e.onChange)===null||d===void 0||d.call(e,g)};return W.useImperativeHandle(r,()=>({toggleAll:c})),Q(Rk.Provider,Object.assign({value:{parent:{props:e},toggle:p,checked:l||[]}},{children:Q("div",Object.assign({className:Re(e.className,JI([e.direction]))},{children:W.Children.toArray(e.children).filter(Boolean).map((g,d)=>{var m;return((m=g.type)===null||m===void 0?void 0:m.displayName)!=="Checkbox"?g:W.cloneElement(g,{ref:i(d)})})}))}))}),[tH]=wn("checkbox"),Fk=W.forwardRef((e,r)=>{const t=ea(e,{bindGroup:!0}),i=W.useContext(Rk),{parent:l}=i,f=$a(i,["parent"]),[c,p]=wk({value:t.checked,defaultValue:t.defaultChecked}),g=C=>{const{name:b}=t,{max:x}=l.props,_=f.checked.slice();if(C)!(x&&_.length>=x)&&_.indexOf(b)===-1&&(_.push(b),t.bindGroup&&f.toggle(_));else{const T=_.indexOf(b);T!==-1&&(_.splice(T,1),t.bindGroup&&f.toggle(_))}},d=W.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),m=(C=!d)=>{var b;l&&t.bindGroup?g(C):(p(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return W.useImperativeHandle(r,()=>({toggle:m,checked:d,props:t})),Q(HI,Object.assign({},t,{bem:tH,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:m}))});Fk.displayName="Checkbox";const Nk=Object.assign(Fk,{Group:eH}),gX="",Mk=200,Pk=300,nH=15;function rH(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[WC]=wn("picker-column"),aH=W.memo(W.forwardRef((e,r)=>{const{locale:t}=W.useContext(vd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:p,value:g}=e,d=W.useMemo(()=>vD(f),[f]),m=W.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:p?[{[i]:void 0,[l]:p===!0?t.vanPicker.select:p},...e.options]:e.options,[e.options]),C=W.useRef(null),b=W.useRef(!1),x=W.useRef(0),_=W.useRef(null),T=W.useRef(0),E=W.useRef(0),[A,k,D]=yD({offset:0,duration:0}),R=_D(),N=W.useMemo(()=>d*(+c-1)/2,[d,c]),z=q=>{var te,Z;q=ep(q,0,m.length);for(let $=q;$<m.length;$+=1)if(!(!((te=m[$])===null||te===void 0)&&te.disabled))return $;for(let $=q-1;$>=0;$-=1)if(!(!((Z=m[$])===null||Z===void 0)&&Z.disabled))return $;return null},M=q=>{e.onSelect(q,e.index)},I=q=>{q=z(q)||0;const te=-q*d,Z=()=>{var $;(($=m[q])===null||$===void 0?void 0:$[i])!==g&&M(m[q])};b.current&&te!==D.current.offset?_.current=Z:Z(),k({offset:te})},Y=q=>{q=z(q)||0;const te=-q*d;k({offset:te})};tp(()=>{if(m.length===0)g!==void 0&&M(void 0);else{let q=m.findIndex(te=>te[i]===g);q<0&&(q=0,M(m[0])),Y(q)}},[g,JSON.stringify(m)]);const B=q=>{b.current||e.readOnly||(_.current=null,k({duration:Mk}),I(q))},P=q=>ep(Math.round(-q/d),0,m.length-1),U=(q,te)=>{const Z=Math.abs(q/te);q=D.current.offset+Z/.003*(q<0?-1:1);const $=P(q);k({duration:+e.swipeDuration}),I($)},H=()=>{b.current=!1,k({duration:0}),_.current&&(_.current(),_.current=null)},V=q=>{if(e.readOnly)return;R.start(q);let{offset:te}=A;if(b.current){const Z=rH(C.current);te=Math.min(0,Z-N),x.current=te}else x.current=te;k({duration:0,offset:te}),T.current=Date.now(),E.current=x.current,_.current=null},K=q=>{if(e.readOnly)return;R.move(q),R.isVertical()&&(b.current=!0);const te=ep(x.current+R.deltaY.current,-(m.length*d),d);k({offset:te});const Z=Date.now();Z-T.current>Pk&&(T.current=Z,E.current=te)},ee=()=>{if(e.readOnly||!b.current)return;const q=D.current.offset-E.current,te=Date.now()-T.current;if(te<Pk&&Math.abs(q)>nH){U(q,te);return}const $=P(D.current.offset);k({duration:Mk}),I($),setTimeout(()=>{b.current=!1},0)},J=()=>{const q={height:`${e.itemHeight}px`};return m.map((te,Z)=>{const{disabled:$}=te,ne={role:"button",style:q,tabIndex:$?-1:0,className:Re(WC("item",{disabled:$,selected:te[i]===g})),onClick:()=>{B(Z)}},oe={className:"rv-ellipsis",children:te[l]};return W.createElement("li",Object.assign({},ne,{key:Z}),e.optionRender?e.optionRender(te):Q("div",Object.assign({},oe)))})};return W.useImperativeHandle(r,()=>({stopMomentum:H})),Q("div",Object.assign({className:Re(WC(),e.className),onTouchStart:V,onTouchMove:K,onTouchEnd:ee,onTouchCancel:ee},{children:Q("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${A.offset+N}px, 0)`,transitionDuration:`${A.duration}ms`,transitionProperty:A.duration?"all":"none"},className:Re(WC("wrapper")),onTransitionEnd:H},{children:J()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function iH(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=W.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const g=e[0]||{};return typeof g=="object"?l in g?"cascade":"object":"plain"},[e,l]),c=W.useMemo(()=>{let p=0;function g(d,m){m>p&&(p=m);const C=m+1;d.forEach(b=>{b[l]&&g(b[l],C)})}return g(e,1),p},[e,l]);return f!=="cascade"?e:p=>{const g=[];let d=e,m=0;for(;;){g.push(d.map(x=>{var _;return{[t]:x[t],[i]:(_=x[i])!==null&&_!==void 0?_:x[t]}}));const C=p[m],b=d.find(x=>{var _;return((_=x[i])!==null&&_!==void 0?_:x[t])===C});if(!b||!b[l])break;d=b[l],m++}for(;m<c-1;)g.push([]),m++;return g}}function QC(e){let r=null;return()=>(r===null&&(r=e()),r)}function oH(e,r,t){const{textKey:i,valueKey:l}=r,f=QC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(m=>m.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=QC(()=>t.map((d,m)=>{var C;const b=f()[m];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),p=QC(()=>t.map((d,m)=>{var C;const b=f()[m];return b&&(C=b.findIndex(x=>x[l]===d))!==null&&C!==void 0?C:null}));return{get columns(){return f()},get items(){return c()},get indexes(){return p()}}}function Bk(e,r,t){const i=iH(e,r);return W.useMemo(()=>oH(i,r,t),[e,r,t])}const[cs]=wn("picker");function lH(e){const{locale:r}=W.useContext(vd),t=W.useRef(null),[i,l]=fy(),{text:f,value:c,children:p}=Jh({text:"text",value:"value",children:"children"},e.columnsFieldNames),[g,d]=W.useState(e.value);W.useEffect(()=>{e.value!==void 0&&JSON.stringify(g)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const m=Bk(e.columns,{textKey:f,valueKey:c,childrenKey:p},g),{columns:C,items:b,indexes:x}=m;XI(()=>{var I;JSON.stringify(e.value)!==JSON.stringify(g)&&((I=e.onChange)===null||I===void 0||I.call(e,g,b,x))},[g],{wait:100,leading:!1,trailing:!0});const _=W.useMemo(()=>vD(e.itemHeight),[e.itemHeight]),T=(I,Y)=>{d(B=>{const P=[...B];return P[Y]=I==null?void 0:I[c],P})},E=()=>{var I;i.forEach(Y=>Y.stopMomentum()),(I=e.onConfirm)===null||I===void 0||I.call(e,g,b,x)},A=()=>{var I;(I=e.onCancel)===null||I===void 0||I.call(e)},k=()=>e.title?Q("div",Object.assign({className:Re(cs("title"),"rv-ellipsis")},{children:e.title})):null,D=()=>{const I=e.cancelButtonText||r.cancel;return Q("button",Object.assign({type:"button",className:Re(cs("cancel")),onClick:A},{children:I}))},R=()=>{const I=e.confirmButtonText||r.confirm;return Q("button",Object.assign({type:"button",className:Re(cs("confirm")),onClick:E},{children:I}))},N=()=>e.showToolbar?Q("div",Object.assign({className:Re(cs("toolbar"))},{children:e.toolbar||Be(en,{children:[D(),k(),R()]})})):null,z=()=>C.map((I,Y)=>{const B=Array.isArray(e.placeholder)?e.placeholder[Y]:e.placeholder;return Q(aH,{textKey:f,valueKey:c,ref:l(Y),placeholder:B,optionRender:e.optionRender,readOnly:e.readOnly,value:g[Y],itemHeight:_,index:Y,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:I,onSelect:T},Y)}),M=()=>{const I=_*e.visibleItemCount,Y={height:`${_}px`},B={height:`${I}px`},P={backgroundSize:`100% ${(I-_)/2}px`};return Be("div",Object.assign({ref:t,className:Re(cs("columns")),style:B},{children:[z(),Q("div",{className:Re(cs("mask")),style:P}),Q("div",{className:Re(wz,cs("frame")),style:Y})]}))};return W2("touchmove",q2,{target:t.current}),Be("div",Object.assign({className:Re(cs(),e.className)},{children:[e.toolbarPosition==="top"?N():null,e.loading?Q(X2,{className:Re(cs("loading"))}):null,e.columnsTop,M(),e.columnsBottom,e.toolbarPosition==="bottom"?N():null]}))}function sH(e,r){const t=ea(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,p=$a(t,["visible","popup","children","defaultValue"]),[g,d]=np({value:i,defaultValue:!1,onChange:U=>{var H;U===!1&&((H=t.onClose)===null||H===void 0||H.call(t))}}),m={toggle:()=>{l&&d(U=>!U)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};W.useImperativeHandle(r,()=>m);const C=Array.isArray(t.value)?t.value:t.value!==void 0?[t.value]:void 0,b=Array.isArray(c)?c:c!==void 0?[c]:[],{text:x,value:_,children:T}=Jh({text:"text",value:"value",children:"children"},t.columnsFieldNames),E=W.useMemo(()=>{const U=t.columns[0]||{};return!(Array.isArray(U)||typeof U=="object"&&T in U)},[t.columns,T]),A=U=>E?U==null?void 0:U[0]:U,[k,D]=np({value:C,defaultValue:b}),R=Bk(t.columns,{textKey:x,valueKey:_,childrenKey:T},k),[N,z]=W.useState(k);W.useEffect(()=>{l&&JSON.stringify(N)!==JSON.stringify(k)&&z(k)},[g]),W.useEffect(()=>{!l&&JSON.stringify(N)!==JSON.stringify(k)&&z(k)},[k]);const M=(U,H,V)=>{var K;D(N,!0),(K=t.onConfirm)===null||K===void 0||K.call(t,A(U),A(H),A(V)),l&&m.close()},I=()=>{var U;(U=t.onCancel)===null||U===void 0||U.call(t),l&&m.close()},Y=DD((U,H,V)=>{var K,ee;z(U),l?g&&((K=t.onChange)===null||K===void 0||K.call(t,A(U),A(H),A(V))):(ee=t.onChange)===null||ee===void 0||ee.call(t,A(U),A(H),A(V))}),B=cd(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},P=Q(lH,Object.assign({},p,{value:N,onCancel:I,onConfirm:M,onChange:Y}));return l?Be(en,{children:[Q(sp,Object.assign({round:!0,position:"bottom",visible:g,closeOnClickOverlay:!0,onClickOverlay:()=>{B!=null&&B.closeOnClickOverlay&&d(!1)}},B,{children:P})),f==null?void 0:f(A(k),A(R.items),m)]}):P}const ZC=W.forwardRef(sH);function uH(e){return Object.prototype.toString.call(e)==="[object Date]"&&!pD(e.getTime())}const cH=W.forwardRef((e,r)=>{const t=ea(e,{type:"datetime",placeholder:!1,minDate:fH,maxDate:dH,formatter:(M,I)=>I}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:p,filter:g,minDate:d,maxDate:m}=t,C=$a(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=M=>(uH(M)||(M=new Date),M=Math.max(M,d.getTime()),M=Math.min(M,m.getTime()),new Date(M)),[x,_,T]=Q2(()=>b(i||l)),E=(M,I)=>{const Y=t[`${M}Date`],B=Y.getFullYear();let P=1,U=1,H=0,V=0;return M==="max"&&(P=12,U=KC(I.getFullYear(),I.getMonth()+1),H=23,V=59),I.getFullYear()===B&&(P=Y.getMonth()+1,I.getMonth()+1===P&&(U=Y.getDate(),I.getDate()===U&&(H=Y.getHours(),I.getHours()===H&&(V=Y.getMinutes())))),{[`${M}Year`]:B,[`${M}Month`]:P,[`${M}Date`]:U,[`${M}Hour`]:H,[`${M}Minute`]:V}},A=W.useMemo(()=>{const{maxYear:M,maxDate:I,maxMonth:Y,maxHour:B,maxMinute:P}=E("max",T.current),{minYear:U,minDate:H,minMonth:V,minHour:K,minMinute:ee}=E("min",T.current);let J=[{type:"year",range:[U,M]},{type:"month",range:[V,Y]},{type:"day",range:[H,I]},{type:"hour",range:[K,B]},{type:"minute",range:[ee,P]}];switch(p){case"date":J=J.slice(0,3);break;case"year-month":J=J.slice(0,2);break;case"month-day":J=J.slice(1,3);break;case"datehour":J=J.slice(0,4);break}if(c){const q=c.concat(J.map(te=>te.type));J.sort((te,Z)=>q.indexOf(te.type)-q.indexOf(Z.type))}return J.map(({type:q,range:te})=>{let Z=Ak(te[1]-te[0]+1,$=>hl(te[0]+$));return g&&(Z=g(q,Z)),{type:q,values:Z}})},[c,T.current,d,m]),k=W.useMemo(()=>A.map(M=>M.values.map(I=>f(M.type,I))),[A,f]),D=W.useMemo(()=>{const M=t.popup?b(T.current):T.current;return A.map(Y=>{switch(Y.type){case"year":return f("year",`${M.getFullYear()}`);case"month":return f("month",hl(M.getMonth()+1));case"day":return f("day",hl(M.getDate()));case"hour":return f("hour",hl(M.getHours()));case"minute":return f("minute",hl(M.getMinutes()));default:return""}})},[t.value,T.current,b]),R=M=>{const{type:I}=t,Y=ee=>{let J=0;A.forEach((te,Z)=>{ee===te.type&&(J=Z)});const{values:q}=A[J];return YI(q[M[J]])};let B=null,P=null,U=null;I==="month-day"?(B=(x||d).getFullYear(),P=Y("month"),U=Y("day")):(B=Y("year"),P=Y("month"),U=I==="year-month"?1:Y("day"));const H=KC(B,P);U=U>H?H:U;let V=0,K=0;return I==="datehour"&&(V=+Y("hour")),I==="datetime"&&(V=+Y("hour"),K=+Y("minute")),b(new Date(B,P-1,U,V,K))},N=(M,I,Y)=>{var B;const P=R(Y);_(P),(B=t.onChange)===null||B===void 0||B.call(t,P)},z=()=>{var M;(M=t.onConfirm)===null||M===void 0||M.call(t,x)};return Rc(()=>{const M=b(i);M&&M.valueOf()!==(x==null?void 0:x.valueOf())&&_(M)},[i,g,d,m]),Q(ZC,Object.assign({},C,{value:D,ref:r,columns:k,onChange:N,onConfirm:z,onCancel:t.onCancel},{children:(M,I,Y)=>{var B;return(B=t.children)===null||B===void 0?void 0:B.call(t,i||l,I,Y)}}))}),Lk=new Date().getFullYear(),fH=new Date(Lk-10,0,1),dH=new Date(Lk+10,11,31),hH=cH,pH=W.forwardRef((e,r)=>{const t=ea(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(z,M)=>M}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:p,maxHour:g,minMinute:d,maxMinute:m}=t,C=$a(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=z=>{z||(z=`${hl(p)}:${hl(d)}`);let[M,I]=z.split(":");return M=hl(ep(M,+p,+g)),I=hl(ep(I,+d,+m)),`${M}:${I}`},[x,_]=W.useState(()=>b(i===void 0?l:i)),T=W.useMemo(()=>[{type:"hour",range:[+p,+g]},{type:"minute",range:[+d,+m]}],[p,g,d,m]),E=W.useMemo(()=>T.map(({type:z,range:M})=>{let I=Ak(M[1]-M[0]+1,Y=>hl(M[0]+Y));return c&&(I=c(z,I)),{type:z,values:I}}),[T]),A=W.useMemo(()=>E.map(z=>z.values.map(M=>f(z.type,M))),[E]),k=W.useMemo(()=>{const z=(t.popup?b(t.value):x).split(":");return[f("hour",z[0]),f("minute",z[1])]},[t.value,x,b]),D=()=>{var z;(z=t.onConfirm)===null||z===void 0||z.call(t,x)},R=()=>{var z;(z=t.onCancel)===null||z===void 0||z.call(t)},N=z=>{var M;const I=b(z.join(":"));_(I),(M=t.onChange)===null||M===void 0||M.call(t,I)};return Rc(()=>{const z=b(x);_(z)},[c,p,g,d,m]),Rc(()=>{const z=b(i);z!==x&&_(z)},[i]),Q(ZC,Object.assign({},C,{ref:r,columns:A,value:k,onChange:N,onConfirm:D,onCancel:R},{children:(z,M,I)=>{var Y;return(Y=t.children)===null||Y===void 0?void 0:Y.call(t,i,M,I)}}))}),[zk]=wn("datetime-picker"),XC=W.forwardRef((e,r)=>e.type==="time"?Q(pH,Object.assign({ref:r,className:Re(zk())},e)):Q(hH,Object.assign({ref:r,className:Re(zk())},e)));function JC(e){return Array.isArray(e)?e:[e]}const wX="";function Uk(e,r){this.v=e,this.k=r}function Da(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Da=function(c,p,g,d){function m(C,b){Da(c,C,function(x){return this._invoke(C,b,x)})}p?l?l(c,p,{value:g,enumerable:!d,configurable:!d,writable:!d}):c[p]=g:(m("next",0),m("throw",1),m("return",2))},Da(e,r,t,i)}function ew(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,_,T,E){var A=_&&_.prototype instanceof p?_:p,k=Object.create(A.prototype);return Da(k,"_invoke",function(D,R,N){var z,M,I,Y=0,B=N||[],P=!1,U={p:0,n:0,v:e,a:H,f:H.bind(e,4),d:function(K,ee){return z=K,M=0,I=e,U.n=ee,c}};function H(V,K){for(M=V,I=K,r=0;!P&&Y&&!ee&&r<B.length;r++){var ee,J=B[r],q=U.p,te=J[2];V>3?(ee=te===K)&&(I=J[(M=J[4])?5:(M=3,3)],J[4]=J[5]=e):J[0]<=q&&((ee=V<2&&q<J[1])?(M=0,U.v=K,U.n=J[1]):q<te&&(ee=V<3||J[0]>K||K>te)&&(J[4]=V,J[5]=K,U.n=te,M=0))}if(ee||V>1)return c;throw P=!0,K}return function(V,K,ee){if(Y>1)throw TypeError("Generator is already running");for(P&&K===1&&H(K,ee),M=K,I=ee;(r=M<2?e:I)||!P;){z||(M?M<3?(M>1&&(U.n=-1),H(M,I)):U.n=I:U.v=I);try{if(Y=2,z){if(M||(V="next"),r=z[V]){if(!(r=r.call(z,I)))throw TypeError("iterator result is not an object");if(!r.done)return r;I=r.value,M<2&&(M=0)}else M===1&&(r=z.return)&&r.call(z),M<2&&(I=TypeError("The iterator does not provide a '"+V+"' method"),M=1);z=e}else if((r=(P=U.n<0)?I:D.call(R,U))!==c)break}catch(J){z=e,M=1,I=J}finally{Y=1}}return{value:r,done:P}}}(x,T,E),!0),k}var c={};function p(){}function g(){}function d(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(Da(r={},i,function(){return this}),r),C=d.prototype=p.prototype=Object.create(m);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Da(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return g.prototype=d,Da(C,"constructor",d),Da(d,"constructor",g),g.displayName="GeneratorFunction",Da(d,l,"GeneratorFunction"),Da(C),Da(C,l,"Generator"),Da(C,i,function(){return this}),Da(C,"toString",function(){return"[object Generator]"}),(ew=function(){return{w:f,m:b}})()}function py(e,r){function t(l,f,c,p){try{var g=e[l](f),d=g.value;return d instanceof Uk?r.resolve(d.v).then(function(m){t("next",m,c,p)},function(m){t("throw",m,c,p)}):r.resolve(d).then(function(m){g.value=m,c(g)},function(m){return t("throw",m,c,p)})}catch(m){p(m)}}var i;this.next||(Da(py.prototype),Da(py.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Da(this,"_invoke",function(l,f,c){function p(){return new r(function(g,d){t(l,c,g,d)})}return i=i?i.then(p,p):p()},!0)}function jk(e,r,t,i,l){return new py(ew().w(e,r,t,i),l||Promise)}function vH(e,r,t,i,l){var f=jk(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function mH(e){var r=Object(e),t=[];for(var i in r)t.unshift(i);return function l(){for(;t.length;)if((i=t.pop())in r)return l.value=i,l.done=!1,l;return l.done=!0,l}}function Ik(e){if(e!=null){var r=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw new TypeError(Mr(e)+" is not iterable")}function ro(){var e=ew(),r=e.m(ro),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var p=typeof c=="function"&&c.constructor;return!!p&&(p===t||(p.displayName||p.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var p,g;return function(d){p||(p={stop:function(){return g(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return g(d.a,l[C],b)},delegateYield:function(C,b,x){return p.resultName=b,g(d.d,Ik(C),x)},finish:function(C){return g(d.f,C)}},g=function(C,b,x){d.p=p.prev,d.n=p.next;try{return C(b,x)}finally{p.next=d.n}}),p.resultName&&(p[p.resultName]=d.v,p.resultName=void 0),p.sent=d.v,p.next=d.n;try{return c.call(this,p)}finally{d.p=p.prev,d.n=p.next}}}return(ro=function(){return{wrap:function(g,d,m,C){return e.w(f(g),d,m,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(g,d){return new Uk(g,d)},AsyncIterator:py,async:function(g,d,m,C,b){return(i(d)?jk:vH)(f(g),d,m,C,b)},keys:mH,values:Ik}})()}function Hk(e,r,t,i,l,f,c){try{var p=e[f](c),g=p.value}catch(d){return void t(d)}p.done?r(g):Promise.resolve(g).then(i,l)}function Bp(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(g){Hk(f,i,l,c,p,"next",g)}function p(g){Hk(f,i,l,c,p,"throw",g)}c(void 0)})}}function gH(e){if(Array.isArray(e))return Cb(e)}function Vk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
197
197
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function an(e){return gH(e)||Vk(e)||wb(e)||yH()}function tw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function $k(e,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,V4(i.key),i)}}function nw(e,r,t){return r&&$k(e.prototype,r),t&&$k(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xH(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&Pg(e,r)}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vy(e)}function Yk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yk=function(){return!!e})()}function bH(e,r){if(r&&(Mr(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pn(e)}function CH(e){var r=Yk();return function(){var t,i=vy(e);if(r){var l=vy(this).constructor;t=Reflect.construct(i,arguments,l)}else t=i.apply(this,arguments);return bH(this,t)}}function rw(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[];return W.Children.forEach(e,function(i){i==null&&!r.keepEmpty||(Array.isArray(i)?t=t.concat(rw(i)):l9(i)&&i.props?t=t.concat(rw(i.props.children,r)):t.push(i))}),t}function qk(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=new Set;function l(f,c){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=i.has(f);if(_r(!g,"Warning: There may be circular references"),g)return!1;if(f===c)return!0;if(t&&p>1)return!1;i.add(f);var d=p+1;if(Array.isArray(f)){if(!Array.isArray(c)||f.length!==c.length)return!1;for(var m=0;m<f.length;m++)if(!l(f[m],c[m],d))return!1;return!0}if(f&&c&&Mr(f)==="object"&&Mr(c)==="object"){var C=Object.keys(f);return C.length!==Object.keys(c).length?!1:C.every(function(b){return l(f[b],c[b],d)})}return!1}return l(e,r)}var zc="RC_FORM_INTERNAL_HOOKS",Fn=function(){_r(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},vu=Me.createContext({getFieldValue:Fn,getFieldsValue:Fn,getFieldError:Fn,getFieldWarning:Fn,getFieldsError:Fn,isFieldsTouched:Fn,isFieldTouched:Fn,isFieldValidating:Fn,isFieldsValidating:Fn,resetFields:Fn,setFields:Fn,setFieldValue:Fn,setFieldsValue:Fn,validateFields:Fn,submit:Fn,getInternalHooks:function(){return Fn(),{dispatch:Fn,initEntityValue:Fn,registerField:Fn,useSubscribe:Fn,setInitialValues:Fn,destroyForm:Fn,setCallbacks:Fn,registerWatch:Fn,getFields:Fn,setValidateMessages:Fn,setPreserve:Fn,getInitialValue:Fn}}}),my=Me.createContext(null);function aw(e){return e==null?[]:Array.isArray(e)?e:[e]}function wH(e){return e&&!!e._init}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Uc.apply(this,arguments)}function _H(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Lp(e,r)}function iw(e){return iw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},iw(e)}function Lp(e,r){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},Lp(e,r)}function SH(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gy(e,r,t){return SH()?gy=Reflect.construct.bind():gy=function(l,f,c){var p=[null];p.push.apply(p,f);var g=Function.bind.apply(l,p),d=new g;return c&&Lp(d,c.prototype),d},gy.apply(null,arguments)}function EH(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ow(e){var r=typeof Map=="function"?new Map:void 0;return ow=function(i){if(i===null||!EH(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(i))return r.get(i);r.set(i,l)}function l(){return gy(i,arguments,iw(this).constructor)}return l.prototype=Object.create(i.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),Lp(l,i)},ow(e)}var DH=/%[sdj%]/g,Gk=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Gk=function(r,t){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(function(i){return typeof i=="string"})});function lw(e){if(!e||!e.length)return null;var r={};return e.forEach(function(t){var i=t.field;r[i]=r[i]||[],r[i].push(t)}),r}function Li(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];var l=0,f=t.length;if(typeof e=="function")return e.apply(null,t);if(typeof e=="string"){var c=e.replace(DH,function(p){if(p==="%%")return"%";if(l>=f)return p;switch(p){case"%s":return String(t[l++]);case"%d":return Number(t[l++]);case"%j":try{return JSON.stringify(t[l++])}catch{return"[Circular]"}break;default:return p}});return c}return e}function TH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Br(e,r){return!!(e==null||r==="array"&&Array.isArray(e)&&!e.length||TH(r)&&typeof e=="string"&&!e)}function kH(e,r,t){var i=[],l=0,f=e.length;function c(p){i.push.apply(i,p||[]),l++,l===f&&t(i)}e.forEach(function(p){r(p,c)})}function Kk(e,r,t){var i=0,l=e.length;function f(c){if(c&&c.length){t(c);return}var p=i;i=i+1,p<l?r(e[p],f):t([])}f([])}function AH(e){var r=[];return Object.keys(e).forEach(function(t){r.push.apply(r,e[t]||[])}),r}var Wk=function(e){_H(r,e);function r(t,i){var l;return l=e.call(this,"Async Validation Error")||this,l.errors=t,l.fields=i,l}return r}(ow(Error));function OH(e,r,t,i,l){if(r.first){var f=new Promise(function(b,x){var _=function(A){return i(A),A.length?x(new Wk(A,lw(A))):b(l)},T=AH(e);Kk(T,t,_)});return f.catch(function(b){return b}),f}var c=r.firstFields===!0?Object.keys(e):r.firstFields||[],p=Object.keys(e),g=p.length,d=0,m=[],C=new Promise(function(b,x){var _=function(E){if(m.push.apply(m,E),d++,d===g)return i(m),m.length?x(new Wk(m,lw(m))):b(l)};p.length||(i(m),b(l)),p.forEach(function(T){var E=e[T];c.indexOf(T)!==-1?Kk(E,t,_):kH(E,t,_)})});return C.catch(function(b){return b}),C}function RH(e){return!!(e&&e.message!==void 0)}function FH(e,r){for(var t=e,i=0;i<r.length;i++){if(t==null)return t;t=t[r[i]]}return t}function Qk(e,r){return function(t){var i;return e.fullFields?i=FH(r,e.fullFields):i=r[t.field||e.fullField],RH(t)?(t.field=t.field||e.fullField,t.fieldValue=i,t):{message:typeof t=="function"?t():t,fieldValue:i,field:t.field||e.fullField}}}function Zk(e,r){if(r){for(var t in r)if(r.hasOwnProperty(t)){var i=r[t];typeof i=="object"&&typeof e[t]=="object"?e[t]=Uc({},e[t],i):e[t]=i}}return e}var Xk=function(r,t,i,l,f,c){r.required&&(!i.hasOwnProperty(r.field)||Br(t,c||r.type))&&l.push(Li(f.messages.required,r.fullField))},NH=function(r,t,i,l,f){(/^\s+$/.test(t)||t==="")&&l.push(Li(f.messages.whitespace,r.fullField))},yy,MH=function(){if(yy)return yy;var e="[a-fA-F\\d:]",r=function(R){return R&&R.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",l=(`
|
|
198
198
|
(?:
|
|
199
199
|
(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|