gtsoft-snail-job-server/snail-job-server/snail-job-server-ui/src/main/resources/admin/assets/download-BsdDisiO.js

276 lines
58 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{dC as Ke,ci as te,al as n,d as Q,dD as Qe,b9 as ve,bE as Pe,a$ as Et,b0 as Dt,dE as Bt,bp as U,b5 as b,dF as Fe,b_ as Ut,bN as Mt,ba as I,r as $,b7 as zt,q as Ft,dG as ye,dH as ue,by as et,bF as ne,a as j,b6 as pe,bc as tt,bQ as At,bd as M,dI as jt,c6 as Ae,dJ as $t,O as Re,a3 as he,ds as Nt,v as Vt,a8 as Ht,cz as Zt,dk as Se,dK as Wt,bP as Ee,i as je,ct as Ie,ck as me,cr as Xt,be as Gt,cC as ot,bG as Yt,B as le,dL as qt,dM as Jt,cv as Kt,bq as V,dp as $e,bv as K,dN as Qt,dO as eo,b8 as to,bb as oo,T as no,bg as Ne,ap as ro,bl as nt,o as De,b as rt,e as it,c as io,w as _e,f as Ve,g as ao,t as lo,h as so,$ as ge,aR as uo,dP as co,K as He}from"./index-Dw6v9XEN.js";import{_ as fo}from"./Progress-Qnd2DYUf.js";import{i as at}from"./Grid-oISpgLl0.js";function ho(e,t,o,r){for(var l=-1,i=e==null?0:e.length;++l<i;)o=t(o,e[l],l,e);return o}function go(e){return function(t){return e==null?void 0:e[t]}}var vo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},po=go(vo),mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wo="\\u0300-\\u036f",bo="\\ufe20-\\ufe2f",xo="\\u20d0-\\u20ff",Co=wo+bo+xo,yo="["+Co+"]",Ro=RegExp(yo,"g");function _o(e){return e=Ke(e),e&&e.replace(mo,po).replace(Ro,"")}var To=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Oo(e){return e.match(To)||[]}var Lo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function So(e){return Lo.test(e)}var lt="\\ud800-\\udfff",Io="\\u0300-\\u036f",ko="\\ufe20-\\ufe2f",Po="\\u20d0-\\u20ff",Eo=Io+ko+Po,st="\\u2700-\\u27bf",dt="a-z\\xdf-\\xf6\\xf8-\\xff",Do="\\xac\\xb1\\xd7\\xf7",Bo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Uo="\\u2000-\\u206f",Mo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ut="A-Z\\xc0-\\xd6\\xd8-\\xde",zo="\\ufe0e\\ufe0f",ct=Do+Bo+Uo+Mo,ft="[']",Ze="["+ct+"]",Fo="["+Eo+"]",ht="\\d+",Ao="["+st+"]",gt="["+dt+"]",vt="[^"+lt+ct+ht+st+dt+ut+"]",jo="\\ud83c[\\udffb-\\udfff]",$o="(?:"+Fo+"|"+jo+")",No="[^"+lt+"]",pt="(?:\\ud83c[\\udde6-\\uddff]){2}",mt="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="["+ut+"]",Vo="\\u200d",We="(?:"+gt+"|"+vt+")",Ho="(?:"+ie+"|"+vt+")",Xe="(?:"+ft+"(?:d|ll|m|re|s|t|ve))?",Ge="(?:"+ft+"(?:D|LL|M|RE|S|T|VE))?",wt=$o+"?",bt="["+zo+"]?",Zo="(?:"+Vo+"(?:"+[No,pt,mt].join("|")+")"+bt+wt+")*",Wo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Go=bt+wt+Zo,Yo="(?:"+[Ao,pt,mt].join("|")+")"+Go,qo=RegExp([ie+"?"+gt+"+"+Xe+"(?="+[Ze,ie,"$"].join("|")+")",Ho+"+"+Ge+"(?="+[Ze,ie+We,"$"].join("|")+")",ie+"?"+We+"+"+Xe,ie+"+"+Ge,Xo,Wo,ht,Yo].join("|"),"g");function Jo(e){return e.match(qo)||[]}function Ko(e,t,o){return e=Ke(e),t=t,t===void 0?So(e)?Jo(e):Oo(e):e.match(t)||[]}var Qo="[']",en=RegExp(Qo,"g");function tn(e){return function(t){return ho(Ko(_o(t).replace(en,"")),e,"")}}var on=tn(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()});const nn=te("attach",n("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M3.25735931,8.70710678 L7.85355339,4.1109127 C8.82986412,3.13460197 10.4127766,3.13460197 11.3890873,4.1109127 C12.365398,5.08722343 12.365398,6.67013588 11.3890873,7.64644661 L6.08578644,12.9497475 C5.69526215,13.3402718 5.06209717,13.3402718 4.67157288,12.9497475 C4.28104858,12.5592232 4.28104858,11.9260582 4.67157288,11.5355339 L9.97487373,6.23223305 C10.1701359,6.0369709 10.1701359,5.72038841 9.97487373,5.52512627 C9.77961159,5.32986412 9.4630291,5.32986412 9.26776695,5.52512627 L3.96446609,10.8284271 C3.18341751,11.6094757 3.18341751,12.8758057 3.96446609,13.6568542 C4.74551468,14.4379028 6.01184464,14.4379028 6.79289322,13.6568542 L12.0961941,8.35355339 C13.4630291,6.98671837 13.4630291,4.77064094 12.0961941,3.40380592 C10.7293591,2.0369709 8.51328163,2.0369709 7.14644661,3.40380592 L2.55025253,8 C2.35499039,8.19526215 2.35499039,8.51184464 2.55025253,8.70710678 C2.74551468,8.90236893 3.06209717,8.90236893 3.25735931,8.70710678 Z"}))))),rn=te("trash",n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},n("path",{d:"M432,144,403.33,419.74A32,32,0,0,1,371.55,448H140.46a32,32,0,0,1-31.78-28.26L80,144",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),n("rect",{x:"32",y:"64",width:"448",height:"80",rx:"16",ry:"16",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),n("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),n("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),xt=te("download",n("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z"}))))),an=te("cancel",n("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},n("g",{fill:"currentColor","fill-rule":"nonzero"},n("path",{d:"M2.58859116,2.7156945 L2.64644661,2.64644661 C2.82001296,2.47288026 3.08943736,2.45359511 3.2843055,2.58859116 L3.35355339,2.64644661 L8,7.293 L12.6464466,2.64644661 C12.8417088,2.45118446 13.1582912,2.45118446 13.3535534,2.64644661 C13.5488155,2.84170876 13.5488155,3.15829124 13.3535534,3.35355339 L8.707,8 L13.3535534,12.6464466 C13.5271197,12.820013 13.5464049,13.0894374 13.4114088,13.2843055 L13.3535534,13.3535534 C13.179987,13.5271197 12.9105626,13.5464049 12.7156945,13.4114088 L12.6464466,13.3535534 L8,8.707 L3.35355339,13.3535534 C3.15829124,13.5488155 2.84170876,13.5488155 2.64644661,13.3535534 C2.45118446,13.1582912 2.45118446,12.8417088 2.64644661,12.6464466 L7.293,8 L2.64644661,3.35355339 C2.47288026,3.17998704 2.45359511,2.91056264 2.58859116,2.7156945 L2.64644661,2.64644661 L2.58859116,2.7156945 Z"}))))),ln=te("retry",n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},n("path",{d:"M320,146s24.36-12-64-12A160,160,0,1,0,416,294",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-miterlimit: 10; stroke-width: 32px;"}),n("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),sn=te("rotateClockwise",n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),n("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),dn=te("rotateClockwise",n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),n("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),un=te("zoomIn",n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),n("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),cn=te("zoomOut",n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),n("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),fn=Q({name:"ResizeSmall",render(){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},n("g",{fill:"none"},n("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}}),hn=Qe&&"loading"in document.createElement("img");function gn(e={}){var t;const{root:o=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(t=e.threshold)!==null&&t!==void 0?t:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof o=="string"?document.querySelector(o):o)||document.documentElement})}}const Te=new WeakMap,Oe=new WeakMap,Le=new WeakMap,vn=(e,t,o)=>{if(!e)return()=>{};const r=gn(t),{root:l}=r.options;let i;const u=Te.get(l);u?i=u:(i=new Map,Te.set(l,i));let c,d;i.has(r.hash)?(d=i.get(r.hash),d[1].has(e)||(c=d[0],d[1].add(e),c.observe(e))):(c=new IntersectionObserver(f=>{f.forEach(w=>{if(w.isIntersecting){const y=Oe.get(w.target),x=Le.get(w.target);y&&y(),x&&(x.value=!0)}})},r.options),c.observe(e),d=[c,new Set([e])],i.set(r.hash,d));let a=!1;const s=()=>{a||(Oe.delete(e),Le.delete(e),a=!0,d[1].has(e)&&(d[0].unobserve(e),d[1].delete(e)),d[1].size<=0&&i.delete(r.hash),i.size||Te.delete(l))};return Oe.set(e,s),Le.set(e,o),s},Be=Object.assign(Object.assign({},ve.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean,renderToolbar:Function}),Ct=Pe("n-image");function pn(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const mn=Et({name:"Image",common:Dt,peers:{Tooltip:Bt},self:pn}),wn=n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"})),bn=n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"})),xn=n("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"})),Cn=U([U("body >",[b("image-container","position: fixed;")]),b("image-preview-container",`
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
`),b("image-preview-overlay",`
z-index: -1;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .3);
`,[Fe()]),b("image-preview-toolbar",`
z-index: 1;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: var(--n-toolbar-border-radius);
height: 48px;
bottom: 40px;
padding: 0 12px;
background: var(--n-toolbar-color);
box-shadow: var(--n-toolbar-box-shadow);
color: var(--n-toolbar-icon-color);
transition: color .3s var(--n-bezier);
display: flex;
align-items: center;
`,[b("base-icon",`
padding: 0 8px;
font-size: 28px;
cursor: pointer;
`),Fe()]),b("image-preview-wrapper",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
pointer-events: none;
`,[Ut()]),b("image-preview",`
user-select: none;
-webkit-user-select: none;
pointer-events: all;
margin: auto;
max-height: calc(100vh - 32px);
max-width: calc(100vw - 32px);
transition: transform .3s var(--n-bezier);
`),b("image",`
display: inline-flex;
max-height: 100%;
max-width: 100%;
`,[Mt("preview-disabled",`
cursor: pointer;
`),U("img",`
border-radius: inherit;
`)])]),ce=32,yt=Q({name:"ImagePreview",props:Object.assign(Object.assign({},Be),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=ve("Image","-image",Cn,mn,e,I(e,"clsPrefix"));let o=null;const r=$(null),l=$(null),i=$(void 0),u=$(!1),c=$(!1),{localeRef:d}=zt("Image");function a(){const{value:h}=l;if(!o||!h)return;const{style:m}=h,g=o.getBoundingClientRect(),L=g.left+g.width/2,S=g.top+g.height/2;m.transformOrigin=`${L}px ${S}px`}function s(h){var m,g;switch(h.key){case" ":h.preventDefault();break;case"ArrowLeft":(m=e.onPrev)===null||m===void 0||m.call(e);break;case"ArrowRight":(g=e.onNext)===null||g===void 0||g.call(e);break;case"Escape":Ue();break}}Ft(u,h=>{h?ye("keydown",document,s):ue("keydown",document,s)}),et(()=>{ue("keydown",document,s)});let f=0,w=0,y=0,x=0,F=0,Z=0,A=0,z=0,Y=!1;function P(h){const{clientX:m,clientY:g}=h;y=m-f,x=g-w,Zt(q)}function p(h){const{mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:L,mouseDownClientY:S}=h,H=L-m,G=S-g,J=`vertical${G>0?"Top":"Bottom"}`,oe=`horizontal${H>0?"Left":"Right"}`;return{moveVerticalDirection:J,moveHorizontalDirection:oe,deltaHorizontal:H,deltaVertical:G}}function R(h){const{value:m}=r;if(!m)return{offsetX:0,offsetY:0};const g=m.getBoundingClientRect(),{moveVerticalDirection:L,moveHorizontalDirection:S,deltaHorizontal:H,deltaVertical:G}=h||{};let J=0,oe=0;return g.width<=window.innerWidth?J=0:g.left>0?J=(g.width-window.innerWidth)/2:g.right<window.innerWidth?J=-(g.width-window.innerWidth)/2:S==="horizontalRight"?J=Math.min((g.width-window.innerWidth)/2,F-(H??0)):J=Math.max(-((g.width-window.innerWidth)/2),F-(H??0)),g.height<=window.innerHeight?oe=0:g.top>0?oe=(g.height-window.innerHeight)/2:g.bottom<window.innerHeight?oe=-(g.height-window.innerHeight)/2:L==="verticalBottom"?oe=Math.min((g.height-window.innerHeight)/2,Z-(G??0)):oe=Math.max(-((g.height-window.innerHeight)/2),Z-(G??0)),{offsetX:J,offsetY:oe}}function C(h){ue("mousemove",document,P),ue("mouseup",document,C);const{clientX:m,clientY:g}=h;Y=!1;const L=p({mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:A,mouseDownClientY:z}),S=R(L);y=S.offsetX,x=S.offsetY,q()}const E=ne(Ct,null);function v(h){var m,g;if((g=(m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onMousedown)===null||g===void 0||g.call(m,h),h.button!==0)return;const{clientX:L,clientY:S}=h;Y=!0,f=L-y,w=S-x,F=y,Z=x,A=L,z=S,q(),ye("mousemove",document,P),ye("mouseup",document,C)}const O=1.5;let _=0,T=1,D=0;function N(h){var m,g;(g=(m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onDblclick)===null||g===void 0||g.call(m,h);const L=de();T=T===L?1:L,q()}function B(){T=1,_=0}function k(){var h;B(),D=0,(h=e.onPrev)===null||h===void 0||h.call(e)}function X(){var h;B(),D=0,(h=e.onNext)===null||h===void 0||h.call(e)}function W(){D-=90,q()}function ee(){D+=90,q()}function we(){const{value:h}=r;if(!h)return 1;const{innerWidth:m,innerHeight:g}=window,L=Math.max(1,h.naturalHeight/(g-ce)),S=Math.max(1,h.naturalWidth/(m-ce));return Math.max(3,L*2,S*2)}function de(){const{value:h}=r;if(!h)return 1;const{innerWidth:m,innerHeight:g}=window,L=h.naturalHeight/(g-ce),S=h.naturalWidth/(m-ce);return L<1&&S<1?1:Math.max(L,S)}function be(){const h=we();T<h&&(_+=1,T=Math.min(h,Math.pow(O,_)),q())}function xe(){if(T>.5){const h=T;_-=1,T=Math.max(.5,Math.pow(O,_));const m=h-T;q(!1);const g=R();T+=m,q(!1),T-=m,y=g.offsetX,x=g.offsetY,q()}}function Ce(){const h=i.value;h&&at(h,void 0)}function q(h=!0){var m;const{value:g}=r;if(!g)return;const{style:L}=g,S=Vt((m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.style);let H="";if(typeof S=="string")H=`${S};`;else for(const J in S)H+=`${on(J)}: ${S[J]};`;const G=`transform-origin: center; transform: translateX(${y}px) translateY(${x}px) rotate(${D}deg) scale(${T});`;Y?L.cssText=`${H}cursor: grabbing; transition: none;${G}`:L.cssText=`${H}cursor: grab;${G}${h?"":"transition: none;"}`,h||g.offsetHeight}function Ue(){u.value=!u.value,c.value=!0}function It(){T=de(),_=Math.ceil(Math.log(T)/Math.log(O)),y=0,x=0,q()}const kt={setPreviewSrc:h=>{i.value=h},setThumbnailEl:h=>{o=h},toggleShow:Ue};function Pt(h,m){if(e.showToolbarTooltip){const{value:g}=t;return n(Ht,{to:!1,theme:g.peers.Tooltip,themeOverrides:g.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>d.value[m],trigger:()=>h})}else return h}const Me=j(()=>{const{common:{cubicBezierEaseInOut:h},self:{toolbarIconColor:m,toolbarBorderRadius:g,toolbarBoxShadow:L,toolbarColor:S}}=t.value;return{"--n-bezier":h,"--n-toolbar-icon-color":m,"--n-toolbar-color":S,"--n-toolbar-border-radius":g,"--n-toolbar-box-shadow":L}}),{inlineThemeDisabled:ze}=pe(),re=ze?tt("image-preview",void 0,Me,e):void 0;return Object.assign({previewRef:r,previewWrapperRef:l,previewSrc:i,show:u,appear:At(),displayed:c,previewedImgProps:E==null?void 0:E.previewedImgPropsRef,handleWheel(h){h.preventDefault()},handlePreviewMousedown:v,handlePreviewDblclick:N,syncTransformOrigin:a,handleAfterLeave:()=>{B(),D=0,c.value=!1},handleDragStart:h=>{var m,g;(g=(m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onDragstart)===null||g===void 0||g.call(m,h),h.preventDefault()},zoomIn:be,zoomOut:xe,handleDownloadClick:Ce,rotateCounterclockwise:W,rotateClockwise:ee,handleSwitchPrev:k,handleSwitchNext:X,withTooltip:Pt,resizeToOrignalImageSize:It,cssVars:ze?void 0:Me,themeClass:re==null?void 0:re.themeClass,onRender:re==null?void 0:re.onRender},kt)},render(){var e,t;const{clsPrefix:o,renderToolbar:r,withTooltip:l}=this,i=l(n(M,{clsPrefix:o,onClick:this.handleSwitchPrev},{default:()=>wn}),"tipPrevious"),u=l(n(M,{clsPrefix:o,onClick:this.handleSwitchNext},{default:()=>bn}),"tipNext"),c=l(n(M,{clsPrefix:o,onClick:this.rotateCounterclockwise},{default:()=>n(dn,null)}),"tipCounterclockwise"),d=l(n(M,{clsPrefix:o,onClick:this.rotateClockwise},{default:()=>n(sn,null)}),"tipClockwise"),a=l(n(M,{clsPrefix:o,onClick:this.resizeToOrignalImageSize},{default:()=>n(fn,null)}),"tipOriginalSize"),s=l(n(M,{clsPrefix:o,onClick:this.zoomOut},{default:()=>n(cn,null)}),"tipZoomOut"),f=l(n(M,{clsPrefix:o,onClick:this.handleDownloadClick},{default:()=>n(xt,null)}),"tipDownload"),w=l(n(M,{clsPrefix:o,onClick:this.toggleShow},{default:()=>xn}),"tipClose"),y=l(n(M,{clsPrefix:o,onClick:this.zoomIn},{default:()=>n(un,null)}),"tipZoomIn");return n(he,null,(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),n(jt,{show:this.show},{default:()=>{var x;return this.show||this.displayed?((x=this.onRender)===null||x===void 0||x.call(this),Ae(n("div",{class:[`${o}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},n(Re,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?n("div",{class:`${o}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?n(Re,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?n("div",{class:`${o}-image-preview-toolbar`},r?r({nodes:{prev:i,next:u,rotateCounterclockwise:c,rotateClockwise:d,resizeToOriginalSize:a,zoomOut:s,zoomIn:y,download:f,close:w}}):n(he,null,this.onPrev?n(he,null,i,u):null,c,d,a,s,y,f,w)):null}):null,n(Re,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:F={}}=this;return Ae(n("div",{class:`${o}-image-preview-wrapper`,ref:"previewWrapperRef"},n("img",Object.assign({},F,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${o}-image-preview`,F.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[Nt,this.show]])}})),[[$t,{enabled:this.show}]])):null}}))}}),Rt=Pe("n-image-group"),yn=Be,Rn=Q({name:"ImageGroup",props:yn,setup(e){let t;const{mergedClsPrefixRef:o}=pe(e),r=`c${Se()}`,l=Wt(),i=$(null),u=d=>{var a;t=d,(a=i.value)===null||a===void 0||a.setPreviewSrc(d)};function c(d){var a,s;if(!(l!=null&&l.proxy))return;const w=l.proxy.$el.parentElement.querySelectorAll(`[data-group-id=${r}]:not([data-error=true])`);if(!w.length)return;const y=Array.from(w).findIndex(x=>x.dataset.previewSrc===t);~y?u(w[(y+d+w.length)%w.length].dataset.previewSrc):u(w[0].dataset.previewSrc),d===1?(a=e.onPreviewNext)===null||a===void 0||a.call(e):(s=e.onPreviewPrev)===null||s===void 0||s.call(e)}return Ee(Rt,{mergedClsPrefixRef:o,setPreviewSrc:u,setThumbnailEl:d=>{var a;(a=i.value)===null||a===void 0||a.setThumbnailEl(d)},toggleShow:()=>{var d;(d=i.value)===null||d===void 0||d.toggleShow()},groupId:r,renderToolbarRef:I(e,"renderToolbar")}),{mergedClsPrefix:o,previewInstRef:i,next:()=>{c(1)},prev:()=>{c(-1)}}},render(){return n(yt,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:this.mergedClsPrefix,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar},this.$slots)}}),_n=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},Be),Tn=Q({name:"Image",props:_n,inheritAttrs:!1,setup(e){const t=$(null),o=$(!1),r=$(null),l=ne(Rt,null),{mergedClsPrefixRef:i}=l||pe(e),u={click:()=>{if(e.previewDisabled||o.value)return;const a=e.previewSrc||e.src;if(l){l.setPreviewSrc(a),l.setThumbnailEl(t.value),l.toggleShow();return}const{value:s}=r;s&&(s.setPreviewSrc(a),s.setThumbnailEl(t.value),s.toggleShow())}},c=$(!e.lazy);je(()=>{var a;(a=t.value)===null||a===void 0||a.setAttribute("data-group-id",(l==null?void 0:l.groupId)||"")}),je(()=>{if(e.lazy&&e.intersectionObserverOptions){let a;const s=Ie(()=>{a==null||a(),a=void 0,a=vn(t.value,e.intersectionObserverOptions,c)});et(()=>{s(),a==null||a()})}}),Ie(()=>{var a;e.src||((a=e.imgProps)===null||a===void 0||a.src),o.value=!1});const d=$(!1);return Ee(Ct,{previewedImgPropsRef:I(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:l==null?void 0:l.groupId,previewInstRef:r,imageRef:t,showError:o,shouldStartLoading:c,loaded:d,mergedOnClick:a=>{var s,f;u.click(),(f=(s=e.imgProps)===null||s===void 0?void 0:s.onClick)===null||f===void 0||f.call(s,a)},mergedOnError:a=>{if(!c.value)return;o.value=!0;const{onError:s,imgProps:{onError:f}={}}=e;s==null||s(a),f==null||f(a)},mergedOnLoad:a=>{const{onLoad:s,imgProps:{onLoad:f}={}}=e;s==null||s(a),f==null||f(a),d.value=!0}},u)},render(){var e,t;const{mergedClsPrefix:o,imgProps:r={},loaded:l,$attrs:i,lazy:u}=this,c=(t=(e=this.$slots).placeholder)===null||t===void 0?void 0:t.call(e),d=this.src||r.src,a=n("img",Object.assign(Object.assign({},r),{ref:"imageRef",width:this.width||r.width,height:this.height||r.height,src:this.showError?this.fallbackSrc:u&&this.intersectionObserverOptions?this.shouldStartLoading?d:void 0:d,alt:this.alt||r.alt,"aria-label":this.alt||r.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:hn&&u&&!this.intersectionObserverOptions?"lazy":"eager",style:[r.style||"",c&&!l?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return n("div",Object.assign({},i,{role:"none",class:[i.class,`${o}-image`,(this.previewDisabled||this.showError)&&`${o}-image--preview-disabled`]}),this.groupId?a:n(yt,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:o,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip,renderToolbar:this.renderToolbar},{default:()=>a,toolbar:()=>{var s,f;return(f=(s=this.$slots).toolbar)===null||f===void 0?void 0:f.call(s)}}),!l&&c)}}),ae=Pe("n-upload"),_t="__UPLOAD_DRAGGER__",On=Q({name:"UploadDragger",[_t]:!0,setup(e,{slots:t}){const o=ne(ae,null);return o||me("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:r},mergedDisabledRef:{value:l},maxReachedRef:{value:i}}=o;return n("div",{class:[`${r}-upload-dragger`,(l||i)&&`${r}-upload-dragger--disabled`]},t)}}});var ke=function(e,t,o,r){function l(i){return i instanceof o?i:new o(function(u){u(i)})}return new(o||(o=Promise))(function(i,u){function c(s){try{a(r.next(s))}catch(f){u(f)}}function d(s){try{a(r.throw(s))}catch(f){u(f)}}function a(s){s.done?i(s.value):l(s.value).then(c,d)}a((r=r.apply(e,t||[])).next())})};function Tt(e){return e.includes("image/")}function Ye(e=""){const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]}const qe=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Ot=e=>{if(e.type)return Tt(e.type);const t=Ye(e.name||"");if(qe.test(t))return!0;const o=e.thumbnailUrl||e.url||"",r=Ye(o);return!!(/^data:image\//.test(o)||qe.test(r))};function Ln(e){return ke(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!Tt(e.type)){t("");return}t(window.URL.createObjectURL(e))})})}const Sn=Qe&&window.FileReader&&window.File;function In(e){return e.isDirectory}function kn(e){return e.isFile}function Pn(e,t){return ke(this,void 0,void 0,function*(){const o=[];function r(l){return ke(this,void 0,void 0,function*(){for(const i of l)if(i){if(t&&In(i)){const u=i.createReader();try{const c=yield new Promise((d,a)=>{u.readEntries(d,a)});yield r(c)}catch{}}else if(kn(i))try{const u=yield new Promise((c,d)=>{i.file(c,d)});o.push({file:u,entry:i,source:"dnd"})}catch{}}})}return yield r(e),o})}function se(e){const{id:t,name:o,percentage:r,status:l,url:i,file:u,thumbnailUrl:c,type:d,fullPath:a,batchId:s}=e;return{id:t,name:o,percentage:r??null,status:l,url:i??null,file:u??null,thumbnailUrl:c??null,type:d??null,fullPath:a??null,batchId:s??null}}function En(e,t,o){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),o=o.toLocaleLowerCase(),o.split(",").map(l=>l.trim()).filter(Boolean).some(l=>{if(l.startsWith(".")){if(e.endsWith(l))return!0}else if(l.includes("/")){const[i,u]=t.split("/"),[c,d]=l.split("/");if((c==="*"||i&&c&&c===i)&&(d==="*"||u&&d&&d===u))return!0}else return!0;return!1})}const Lt=Q({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:t}){const o=ne(ae,null);o||me("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:r,mergedDisabledRef:l,maxReachedRef:i,listTypeRef:u,dragOverRef:c,openOpenFileDialog:d,draggerInsideRef:a,handleFileAddition:s,mergedDirectoryDndRef:f,triggerClassRef:w,triggerStyleRef:y}=o,x=j(()=>u.value==="image-card");function F(){l.value||i.value||d()}function Z(P){P.preventDefault(),c.value=!0}function A(P){P.preventDefault(),c.value=!0}function z(P){P.preventDefault(),c.value=!1}function Y(P){var p;if(P.preventDefault(),!a.value||l.value||i.value){c.value=!1;return}const R=(p=P.dataTransfer)===null||p===void 0?void 0:p.items;R!=null&&R.length?Pn(Array.from(R).map(C=>C.webkitGetAsEntry()),f.value).then(C=>{s(C)}).finally(()=>{c.value=!1}):c.value=!1}return()=>{var P;const{value:p}=r;return e.abstract?(P=t.default)===null||P===void 0?void 0:P.call(t,{handleClick:F,handleDrop:Y,handleDragOver:Z,handleDragEnter:A,handleDragLeave:z}):n("div",{class:[`${p}-upload-trigger`,(l.value||i.value)&&`${p}-upload-trigger--disabled`,x.value&&`${p}-upload-trigger--image-card`,w.value],style:y.value,onClick:F,onDrop:Y,onDragover:Z,onDragenter:A,onDragleave:z},x.value?n(On,null,{default:()=>Xt(t.default,()=>[n(M,{clsPrefix:p},{default:()=>n(Gt,null)})])}):t)}}}),Dn=Q({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:ne(ae).mergedThemeRef}},render(){return n(ot,null,{default:()=>this.show?n(fo,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),Bn=n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},n("g",{fill:"none"},n("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"}))),Un=n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},n("g",{fill:"none"},n("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"})));var Mn=function(e,t,o,r){function l(i){return i instanceof o?i:new o(function(u){u(i)})}return new(o||(o=Promise))(function(i,u){function c(s){try{a(r.next(s))}catch(f){u(f)}}function d(s){try{a(r.throw(s))}catch(f){u(f)}}function a(s){s.done?i(s.value):l(s.value).then(c,d)}a((r=r.apply(e,t||[])).next())})};const fe={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},zn=Q({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0},index:{type:Number,required:!0}},setup(e){const t=ne(ae),o=$(null),r=$(""),l=j(()=>{const{file:p}=e;return p.status==="finished"?"success":p.status==="error"?"error":"info"}),i=j(()=>{const{file:p}=e;if(p.status==="error")return"error"}),u=j(()=>{const{file:p}=e;return p.status==="uploading"}),c=j(()=>{if(!t.showCancelButtonRef.value)return!1;const{file:p}=e;return["uploading","pending","error"].includes(p.status)}),d=j(()=>{if(!t.showRemoveButtonRef.value)return!1;const{file:p}=e;return["finished"].includes(p.status)}),a=j(()=>{if(!t.showDownloadButtonRef.value)return!1;const{file:p}=e;return["finished"].includes(p.status)}),s=j(()=>{if(!t.showRetryButtonRef.value)return!1;const{file:p}=e;return["error"].includes(p.status)}),f=Yt(()=>r.value||e.file.thumbnailUrl||e.file.url),w=j(()=>{if(!t.showPreviewButtonRef.value)return!1;const{file:{status:p},listType:R}=e;return["finished"].includes(p)&&f.value&&R==="image-card"});function y(){t.submit(e.file.id)}function x(p){p.preventDefault();const{file:R}=e;["finished","pending","error"].includes(R.status)?Z(R):["uploading"].includes(R.status)?z(R):Kt("upload","The button clicked type is unknown.")}function F(p){p.preventDefault(),A(e.file)}function Z(p){const{xhrMap:R,doChange:C,onRemoveRef:{value:E},mergedFileListRef:{value:v}}=t;Promise.resolve(E?E({file:Object.assign({},p),fileList:v,index:e.index}):!0).then(O=>{if(O===!1)return;const _=Object.assign({},p,{status:"removed"});R.delete(p.id),C(_,void 0,{remove:!0})})}function A(p){const{onDownloadRef:{value:R}}=t;Promise.resolve(R?R(Object.assign({},p)):!0).then(C=>{C!==!1&&at(p.url,p.name)})}function z(p){const{xhrMap:R}=t,C=R.get(p.id);C==null||C.abort(),Z(Object.assign({},p))}function Y(p){const{onPreviewRef:{value:R}}=t;if(R)R(e.file,{event:p});else if(e.listType==="image-card"){const{value:C}=o;if(!C)return;C.click()}}const P=()=>Mn(this,void 0,void 0,function*(){const{listType:p}=e;p!=="image"&&p!=="image-card"||t.shouldUseThumbnailUrlRef.value(e.file)&&(r.value=yield t.getFileThumbnailUrlResolver(e.file))});return Ie(()=>{P()}),{mergedTheme:t.mergedThemeRef,progressStatus:l,buttonType:i,showProgress:u,disabled:t.mergedDisabledRef,showCancelButton:c,showRemoveButton:d,showDownloadButton:a,showRetryButton:s,showPreviewButton:w,mergedThumbnailUrl:f,shouldUseThumbnailUrl:t.shouldUseThumbnailUrlRef,renderIcon:t.renderIconRef,imageRef:o,handleRemoveOrCancelClick:x,handleDownloadClick:F,handleRetryClick:y,handlePreviewClick:Y}},render(){const{clsPrefix:e,mergedTheme:t,listType:o,file:r,renderIcon:l}=this;let i;const u=o==="image";u||o==="image-card"?i=!this.shouldUseThumbnailUrl(r)||!this.mergedThumbnailUrl?n("span",{class:`${e}-upload-file-info__thumbnail`},l?l(r):Ot(r)?n(M,{clsPrefix:e},{default:()=>Bn}):n(M,{clsPrefix:e},{default:()=>Un})):n("a",{rel:"noopener noreferer",target:"_blank",href:r.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},o==="image-card"?n(Tn,{src:this.mergedThumbnailUrl||void 0,previewSrc:r.url||void 0,alt:r.name,ref:"imageRef"}):n("img",{src:this.mergedThumbnailUrl||void 0,alt:r.name})):i=n("span",{class:`${e}-upload-file-info__thumbnail`},l?l(r):n(M,{clsPrefix:e},{default:()=>n(nn,null)}));const d=n(Dn,{show:this.showProgress,percentage:r.percentage||0,status:this.progressStatus}),a=o==="text"||o==="image";return n("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,r.url&&r.status!=="error"&&o!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${o}-type`]},n("div",{class:`${e}-upload-file-info`},i,n("div",{class:`${e}-upload-file-info__name`},a&&(r.url&&r.status!=="error"?n("a",{rel:"noopener noreferer",target:"_blank",href:r.url||void 0,onClick:this.handlePreviewClick},r.name):n("span",{onClick:this.handlePreviewClick},r.name)),u&&d),n("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${o}-type`]},this.showPreviewButton?n(le,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:fe},{icon:()=>n(M,{clsPrefix:e},{default:()=>n(qt,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&n(le,{key:"cancelOrTrash",theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:fe,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>n(Jt,null,{default:()=>this.showRemoveButton?n(M,{clsPrefix:e,key:"trash"},{default:()=>n(rn,null)}):n(M,{clsPrefix:e,key:"cancel"},{default:()=>n(an,null)})})}),this.showRetryButton&&!this.disabled&&n(le,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:fe},{icon:()=>n(M,{clsPrefix:e},{default:()=>n(ln,null)})}),this.showDownloadButton?n(le,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:t.peers.Button,themeOverrides:t.peerOverrides.Button,builtinThemeOverrides:fe},{icon:()=>n(M,{clsPrefix:e},{default:()=>n(xt,null)})}):null)),!u&&d)}}),Fn=Q({name:"UploadFileList",setup(e,{slots:t}){const o=ne(ae,null);o||me("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:r,mergedClsPrefixRef:l,listTypeRef:i,mergedFileListRef:u,fileListClassRef:c,fileListStyleRef:d,cssVarsRef:a,themeClassRef:s,maxReachedRef:f,showTriggerRef:w,imageGroupPropsRef:y}=o,x=j(()=>i.value==="image-card"),F=()=>u.value.map((A,z)=>n(zn,{clsPrefix:l.value,key:A.id,file:A,index:z,listType:i.value})),Z=()=>x.value?n(Rn,Object.assign({},y.value),{default:F}):n(ot,{group:!0},{default:F});return()=>{const{value:A}=l,{value:z}=r;return n("div",{class:[`${A}-upload-file-list`,x.value&&`${A}-upload-file-list--grid`,z?s==null?void 0:s.value:void 0,c.value],style:[z&&a?a.value:"",d.value]},Z(),w.value&&!f.value&&x.value&&n(Lt,null,t))}}}),An=U([b("upload","width: 100%;",[V("dragger-inside",[b("upload-trigger",`
display: block;
`)]),V("drag-over",[b("upload-dragger",`
border: var(--n-dragger-border-hover);
`)])]),b("upload-dragger",`
cursor: pointer;
box-sizing: border-box;
width: 100%;
text-align: center;
border-radius: var(--n-border-radius);
padding: 24px;
opacity: 1;
transition:
opacity .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
background-color: var(--n-dragger-color);
border: var(--n-dragger-border);
`,[U("&:hover",`
border: var(--n-dragger-border-hover);
`),V("disabled",`
cursor: not-allowed;
`)]),b("upload-trigger",`
display: inline-block;
box-sizing: border-box;
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[U("+",[b("upload-file-list","margin-top: 8px;")]),V("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`),V("image-card",`
width: 96px;
height: 96px;
`,[b("base-icon",`
font-size: 24px;
`),b("upload-dragger",`
padding: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
`)])]),b("upload-file-list",`
line-height: var(--n-line-height);
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[U("a, img","outline: none;"),V("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`,[b("upload-file","cursor: not-allowed;")]),V("grid",`
display: grid;
grid-template-columns: repeat(auto-fill, 96px);
grid-gap: 8px;
margin-top: 0;
`),b("upload-file",`
display: block;
box-sizing: border-box;
cursor: default;
padding: 0px 12px 0 6px;
transition: background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
`,[$e(),b("progress",[$e({foldPadding:!0})]),U("&:hover",`
background-color: var(--n-item-color-hover);
`,[b("upload-file-info",[K("action",`
opacity: 1;
`)])]),V("image-type",`
border-radius: var(--n-border-radius);
text-decoration: underline;
text-decoration-color: #0000;
`,[b("upload-file-info",`
padding-top: 0px;
padding-bottom: 0px;
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
`,[b("progress",`
padding: 2px 0;
margin-bottom: 0;
`),K("name",`
padding: 0 8px;
`),K("thumbnail",`
width: 32px;
height: 32px;
font-size: 28px;
display: flex;
justify-content: center;
align-items: center;
`,[U("img",`
width: 100%;
`)])])]),V("text-type",[b("progress",`
box-sizing: border-box;
padding-bottom: 6px;
margin-bottom: 6px;
`)]),V("image-card-type",`
position: relative;
width: 96px;
height: 96px;
border: var(--n-item-border-image-card);
border-radius: var(--n-border-radius);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
overflow: hidden;
`,[b("progress",`
position: absolute;
left: 8px;
bottom: 8px;
right: 8px;
width: unset;
`),b("upload-file-info",`
padding: 0;
width: 100%;
height: 100%;
`,[K("thumbnail",`
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 36px;
`,[U("img",`
width: 100%;
`)])]),U("&::before",`
position: absolute;
z-index: 1;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
opacity: 0;
transition: opacity .2s var(--n-bezier);
content: "";
`),U("&:hover",[U("&::before","opacity: 1;"),b("upload-file-info",[K("thumbnail","opacity: .12;")])])]),V("error-status",[U("&:hover",`
background-color: var(--n-item-color-hover-error);
`),b("upload-file-info",[K("name","color: var(--n-item-text-color-error);"),K("thumbnail","color: var(--n-item-text-color-error);")]),V("image-card-type",`
border: var(--n-item-border-image-card-error);
`)]),V("with-url",`
cursor: pointer;
`,[b("upload-file-info",[K("name",`
color: var(--n-item-text-color-success);
text-decoration-color: var(--n-item-text-color-success);
`,[U("a",`
text-decoration: underline;
`)])])]),b("upload-file-info",`
position: relative;
padding-top: 6px;
padding-bottom: 6px;
display: flex;
flex-wrap: nowrap;
`,[K("thumbnail",`
font-size: 18px;
opacity: 1;
transition: opacity .2s var(--n-bezier);
color: var(--n-item-icon-color);
`,[b("base-icon",`
margin-right: 2px;
vertical-align: middle;
transition: color .3s var(--n-bezier);
`)]),K("action",`
padding-top: inherit;
padding-bottom: inherit;
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 80px;
display: flex;
align-items: center;
transition: opacity .2s var(--n-bezier);
justify-content: flex-end;
opacity: 0;
`,[b("button",[U("&:not(:last-child)",{marginRight:"4px"}),b("base-icon",[U("svg",[Qt()])])]),V("image-type",`
position: relative;
max-width: 80px;
width: auto;
`),V("image-card-type",`
z-index: 2;
position: absolute;
width: 100%;
height: 100%;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
`)]),K("name",`
color: var(--n-item-text-color);
flex: 1;
display: flex;
justify-content: center;
text-overflow: ellipsis;
overflow: hidden;
flex-direction: column;
text-decoration-color: #0000;
font-size: var(--n-font-size);
transition:
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`,[U("a",`
color: inherit;
text-decoration: underline;
`)])])])]),b("upload-file-input",`
display: none;
width: 0;
height: 0;
opacity: 0;
`)]);var Je=function(e,t,o,r){function l(i){return i instanceof o?i:new o(function(u){u(i)})}return new(o||(o=Promise))(function(i,u){function c(s){try{a(r.next(s))}catch(f){u(f)}}function d(s){try{a(r.throw(s))}catch(f){u(f)}}function a(s){s.done?i(s.value):l(s.value).then(c,d)}a((r=r.apply(e,t||[])).next())})};function jn(e,t,o){const{doChange:r,xhrMap:l}=e;let i=0;function u(d){var a;let s=Object.assign({},t,{status:"error",percentage:i});l.delete(t.id),s=se(((a=e.onError)===null||a===void 0?void 0:a.call(e,{file:s,event:d}))||s),r(s,d)}function c(d){var a;if(e.isErrorState){if(e.isErrorState(o)){u(d);return}}else if(o.status<200||o.status>=300){u(d);return}let s=Object.assign({},t,{status:"finished",percentage:i});l.delete(t.id),s=se(((a=e.onFinish)===null||a===void 0?void 0:a.call(e,{file:s,event:d}))||s),r(s,d)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(d){const a=Object.assign({},t,{status:"removed",file:null,percentage:i});l.delete(t.id),r(a,d)},handleXHRProgress(d){const a=Object.assign({},t,{status:"uploading"});if(d.lengthComputable){const s=Math.ceil(d.loaded/d.total*100);a.percentage=s,i=s}r(a,d)}}}function $n(e){const{inst:t,file:o,data:r,headers:l,withCredentials:i,action:u,customRequest:c}=e,{doChange:d}=e.inst;let a=0;c({file:o,data:r,headers:l,withCredentials:i,action:u,onProgress(s){const f=Object.assign({},o,{status:"uploading"}),w=s.percent;f.percentage=w,a=w,d(f)},onFinish(){var s;let f=Object.assign({},o,{status:"finished",percentage:a});f=se(((s=t.onFinish)===null||s===void 0?void 0:s.call(t,{file:f}))||f),d(f)},onError(){var s;let f=Object.assign({},o,{status:"error",percentage:a});f=se(((s=t.onError)===null||s===void 0?void 0:s.call(t,{file:f}))||f),d(f)}})}function Nn(e,t,o){const r=jn(e,t,o);o.onabort=r.handleXHRAbort,o.onerror=r.handleXHRError,o.onload=r.handleXHRLoad,o.upload&&(o.upload.onprogress=r.handleXHRProgress)}function St(e,t){return typeof e=="function"?e({file:t}):e||{}}function Vn(e,t,o){const r=St(t,o);r&&Object.keys(r).forEach(l=>{e.setRequestHeader(l,r[l])})}function Hn(e,t,o){const r=St(t,o);r&&Object.keys(r).forEach(l=>{e.append(l,r[l])})}function Zn(e,t,o,{method:r,action:l,withCredentials:i,responseType:u,headers:c,data:d}){const a=new XMLHttpRequest;a.responseType=u,e.xhrMap.set(o.id,a),a.withCredentials=i;const s=new FormData;if(Hn(s,d,o),o.file!==null&&s.append(t,o.file),Nn(e,o,a),l!==void 0){a.open(r.toUpperCase(),l),Vn(a,c,o),a.send(s);const f=Object.assign({},o,{status:"uploading"});e.doChange(f)}}const Wn=Object.assign(Object.assign({},ve.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>Sn?Ot(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),Xn=Q({name:"Upload",props:Wn,setup(e){e.abstract&&e.listType==="image-card"&&me("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:t,inlineThemeDisabled:o}=pe(e),r=ve("Upload","-upload",An,eo,e,t),l=to(e),i=$(e.defaultFileList),u=I(e,"fileList"),c=$(null),d={value:!1},a=$(!1),s=new Map,f=oo(u,i),w=j(()=>f.value.map(se)),y=j(()=>{const{max:v}=e;return v!==void 0?w.value.length>=v:!1});function x(){var v;(v=c.value)===null||v===void 0||v.click()}function F(v){const O=v.target;Y(O.files?Array.from(O.files).map(_=>({file:_,entry:null,source:"input"})):null,v),O.value=""}function Z(v){const{"onUpdate:fileList":O,onUpdateFileList:_}=e;O&&Ne(O,v),_&&Ne(_,v),i.value=v}const A=j(()=>e.multiple||e.directory),z=(v,O,_={append:!1,remove:!1})=>{const{append:T,remove:D}=_,N=Array.from(w.value),B=N.findIndex(k=>k.id===v.id);if(T||D||~B){T?N.push(v):D?N.splice(B,1):N.splice(B,1,v);const{onChange:k}=e;k&&k({file:v,fileList:N,event:O}),Z(N)}};function Y(v,O){if(!v||v.length===0)return;const{onBeforeUpload:_}=e;v=A.value?v:[v[0]];const{max:T,accept:D}=e;v=v.filter(({file:B,source:k})=>k==="dnd"&&(D!=null&&D.trim())?En(B.name,B.type,D):!0),T&&(v=v.slice(0,T-w.value.length));const N=Se();Promise.all(v.map(B=>Je(this,[B],void 0,function*({file:k,entry:X}){var W;const ee={id:Se(),batchId:N,name:k.name,status:"pending",percentage:0,file:k,url:null,type:k.type,thumbnailUrl:null,fullPath:(W=X==null?void 0:X.fullPath)!==null&&W!==void 0?W:`/${k.webkitRelativePath||k.name}`};return!_||(yield _({file:ee,fileList:w.value}))!==!1?ee:null}))).then(B=>Je(this,void 0,void 0,function*(){let k=Promise.resolve();B.forEach(X=>{k=k.then(ro).then(()=>{X&&z(X,O,{append:!0})})}),yield k})).then(()=>{e.defaultUpload&&P()})}function P(v){const{method:O,action:_,withCredentials:T,headers:D,data:N,name:B}=e,k=v!==void 0?w.value.filter(W=>W.id===v):w.value,X=v!==void 0;k.forEach(W=>{const{status:ee}=W;(ee==="pending"||ee==="error"&&X)&&(e.customRequest?$n({inst:{doChange:z,xhrMap:s,onFinish:e.onFinish,onError:e.onError},file:W,action:_,withCredentials:T,headers:D,data:N,customRequest:e.customRequest}):Zn({doChange:z,xhrMap:s,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},B,W,{method:O,action:_,withCredentials:T,responseType:e.responseType,headers:D,data:N}))})}function p(v){var O;if(v.thumbnailUrl)return v.thumbnailUrl;const{createThumbnailUrl:_}=e;return _?(O=_(v.file,v))!==null&&O!==void 0?O:v.url||"":v.url?v.url:v.file?Ln(v.file):""}const R=j(()=>{const{common:{cubicBezierEaseInOut:v},self:{draggerColor:O,draggerBorder:_,draggerBorderHover:T,itemColorHover:D,itemColorHoverError:N,itemTextColorError:B,itemTextColorSuccess:k,itemTextColor:X,itemIconColor:W,itemDisabledOpacity:ee,lineHeight:we,borderRadius:de,fontSize:be,itemBorderImageCardError:xe,itemBorderImageCard:Ce}}=r.value;return{"--n-bezier":v,"--n-border-radius":de,"--n-dragger-border":_,"--n-dragger-border-hover":T,"--n-dragger-color":O,"--n-font-size":be,"--n-item-color-hover":D,"--n-item-color-hover-error":N,"--n-item-disabled-opacity":ee,"--n-item-icon-color":W,"--n-item-text-color":X,"--n-item-text-color-error":B,"--n-item-text-color-success":k,"--n-line-height":we,"--n-item-border-image-card-error":xe,"--n-item-border-image-card":Ce}}),C=o?tt("upload",void 0,R,e):void 0;Ee(ae,{mergedClsPrefixRef:t,mergedThemeRef:r,showCancelButtonRef:I(e,"showCancelButton"),showDownloadButtonRef:I(e,"showDownloadButton"),showRemoveButtonRef:I(e,"showRemoveButton"),showRetryButtonRef:I(e,"showRetryButton"),onRemoveRef:I(e,"onRemove"),onDownloadRef:I(e,"onDownload"),mergedFileListRef:w,triggerClassRef:I(e,"triggerClass"),triggerStyleRef:I(e,"triggerStyle"),shouldUseThumbnailUrlRef:I(e,"shouldUseThumbnailUrl"),renderIconRef:I(e,"renderIcon"),xhrMap:s,submit:P,doChange:z,showPreviewButtonRef:I(e,"showPreviewButton"),onPreviewRef:I(e,"onPreview"),getFileThumbnailUrlResolver:p,listTypeRef:I(e,"listType"),dragOverRef:a,openOpenFileDialog:x,draggerInsideRef:d,handleFileAddition:Y,mergedDisabledRef:l.mergedDisabledRef,maxReachedRef:y,fileListClassRef:I(e,"fileListClass"),fileListStyleRef:I(e,"fileListStyle"),abstractRef:I(e,"abstract"),acceptRef:I(e,"accept"),cssVarsRef:o?void 0:R,themeClassRef:C==null?void 0:C.themeClass,onRender:C==null?void 0:C.onRender,showTriggerRef:I(e,"showTrigger"),imageGroupPropsRef:I(e,"imageGroupProps"),mergedDirectoryDndRef:j(()=>{var v;return(v=e.directoryDnd)!==null&&v!==void 0?v:e.directory})});const E={clear:()=>{i.value=[]},submit:P,openOpenFileDialog:x};return Object.assign({mergedClsPrefix:t,draggerInsideRef:d,inputElRef:c,mergedTheme:r,dragOver:a,mergedMultiple:A,cssVars:o?void 0:R,themeClass:C==null?void 0:C.themeClass,onRender:C==null?void 0:C.onRender,handleFileInputChange:F},E)},render(){var e,t;const{draggerInsideRef:o,mergedClsPrefix:r,$slots:l,directory:i,onRender:u}=this;if(l.default&&!this.abstract){const d=l.default()[0];!((e=d==null?void 0:d.type)===null||e===void 0)&&e[_t]&&(o.value=!0)}const c=n("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${r}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:i||void 0,directory:i||void 0}));return this.abstract?n(he,null,(t=l.default)===null||t===void 0?void 0:t.call(l),n(no,{to:"body"},c)):(u==null||u(),n("div",{class:[`${r}-upload`,o.value&&`${r}-upload--dragger-inside`,this.dragOver&&`${r}-upload--drag-over`,this.themeClass],style:this.cssVars},c,this.showTrigger&&this.listType!=="image-card"&&n(Lt,null,l),this.showFileList&&n(Fn,null,l)))}}),Gn={class:"inline-block",viewBox:"0 0 16 16",width:"1em",height:"1em"},Yn=it("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.78 5.841a.75.75 0 0 1-1.06 0l-1.97-1.97v7.379a.75.75 0 0 1-1.5 0V3.871l-1.97 1.97a.75.75 0 0 1-1.06-1.06l3.25-3.25L8 1l.53.53l3.25 3.25a.75.75 0 0 1 0 1.061M2.5 9.75a.75.75 0 0 0-1.5 0V13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9.75a.75.75 0 0 0-1.5 0V13a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5z","clip-rule":"evenodd"},null,-1),qn=[Yn];function Jn(e,t){return De(),rt("svg",Gn,[...qn])}const ur=nt({name:"pajamas-export",render:Jn}),Kn={class:"inline-block",viewBox:"0 0 16 16",width:"1em",height:"1em"},Qn=it("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.78 7.159a.75.75 0 0 0-1.06 0l-1.97 1.97V1.75a.75.75 0 0 0-1.5 0v7.379l-1.97-1.97a.75.75 0 0 0-1.06 1.06l3.25 3.25L8 12l.53-.53l3.25-3.25a.75.75 0 0 0 0-1.061M2.5 9.75a.75.75 0 1 0-1.5 0V13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9.75a.75.75 0 0 0-1.5 0V13a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5z","clip-rule":"evenodd"},null,-1),er=[Qn];function tr(e,t){return De(),rt("svg",Kn,[...er])}const or=nt({name:"pajamas-import",render:tr}),cr=Q({name:"FileUpload",__name:"file-upload",props:{accept:{},action:{}},emits:["refresh"],setup(e,{emit:t}){const o=t,r=i=>{var u,c;return((u=i.file.file)==null?void 0:u.type)!=="application/json"?((c=window.$message)==null||c.error(ge("common.checkUploadType")),!1):!0},l=({file:i,data:u,headers:c,withCredentials:d,action:a,onFinish:s,onError:f,onProgress:w})=>{const y=new FormData;u&&Object.keys(u).forEach(x=>{y.append(x,u[x])}),y.append("file",i.file),uo({url:a,method:"post",data:y,withCredentials:d,headers:c,onUploadProgress:({progress:x})=>{w({percent:Math.ceil(x)})}}).then(()=>{s(),o("refresh")}).catch(()=>f())};return(i,u)=>{const c=or,d=le,a=Xn;return De(),io(a,{action:i.action,accept:i.accept,"custom-request":l,"show-file-list":!1,onBeforeUpload:r},{default:_e(()=>[Ve(d,{size:"small",ghost:"",type:"primary"},{icon:_e(()=>[Ve(c,{class:"text-icon"})]),default:_e(()=>[ao(" "+lo(so(ge)("common.import")),1)]),_:1})]),_:1},8,["action","accept"])}}}),nr={BASE_URL:"/snail-job",DEV:!1,MODE:"prod",PROD:!0,SSR:!1,VITE_APP_DEFAULT_TOKEN:"SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj",VITE_APP_DESC:"A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.",VITE_APP_TITLE:"Snail Job",VITE_APP_VERSION:"1.2.0-beta1",VITE_AUTH_ROUTE_MODE:"static",VITE_BASE_URL:"/snail-job",VITE_HTTP_PROXY:"Y",VITE_ICONIFY_URL:"/snail-job/iconify",VITE_ICON_LOCAL_PREFIX:"icon-local",VITE_ICON_PREFIX:"icon",VITE_LOGIN_CODE:"N",VITE_MENU_ICON:"mdi:menu",VITE_ROUTER_HISTORY_MODE:"hash",VITE_ROUTE_HOME:"home",VITE_SERVICE_BASE_URL:"/snail-job",VITE_SERVICE_EXPIRED_TOKEN_CODES:"9999,9998",VITE_SERVICE_LOGOUT_CODES:"8888,8889",VITE_SERVICE_MODAL_LOGOUT_CODES:"5001",VITE_SERVICE_SUCCESS_CODE:"1",VITE_SOURCE_MAP:"N",VITE_STATIC_SUPER_ROLE:"R_ADMIN",VITE_STORAGE_PREFIX:"",VITE_UPDATE_NOTIFY:"N"},{baseURL:rr}=co(nr);function ir(e,t,o=!0){var r,l;try{let i=t;o&&(i=`${t}-${new Date().getTime()}.json`),ar(e,i)}catch{(r=window.$message)==null||r.error(ge("common.downloadFail"))}finally{(l=window.$loading)==null||l.endLoading()}}function ar(e,t){const o=[e],r=new Blob(o,{type:"application/octet-stream"}),l=window.URL.createObjectURL(r),i=document.createElement("a");i.style.display="none",i.href=l,i.setAttribute("download",t),typeof i.download>"u"&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(l)}const fr=(e,t,o)=>{var i;(i=window.$loading)==null||i.startLoading();const r=He.get("token"),l=He.get("namespaceId");fetch(`${rr}${e}?t=${new Date().getTime()}`,{method:"post",body:JSON.stringify(t),headers:{"SNAIL-JOB-AUTH":r,"SNAIL-JOB-NAMESPACE-ID":l,"Content-Type":"application/json;charset=utf-8;"}}).then(async u=>u.blob()).then(u=>ir(u,o)).catch(()=>{var u;return(u=window.$message)==null?void 0:u.error(ge("common.downloadFail"))}).finally(()=>{var u;return(u=window.$loading)==null?void 0:u.endLoading()})};export{cr as _,ur as a,fr as d};