123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440 |
- import{bs as Ye,bt as ee,k as t,d as X,S as Ge,$ as le,be as Oe,a6 as Ot,a2 as Tt,bu as zt,U,T as v,b3 as Me,aO as Bt,Y as It,ab as N,f as V,a9 as $t,L as Dt,ah as xe,bv as fe,h as Ke,aU as re,C as O,W as ue,a1 as Te,b4 as Mt,b8 as _t,E as _e,b7 as Ut,aR as ye,F as ke,aj as H,G as Et,x as jt,bm as At,bw as Pe,aZ as ze,bh as Ft,g as Ue,aW as Le,Z as I,a4 as ie,aN as Je,aK as Qe,aL as et,aM as tt,bx as Nt,a5 as Ee,ba as ve,ai as Ht,aC as rt,ad as Wt,m as ge,by as Vt,bz as Zt,bA as Xt,aG as je,V as Q,bB as qt,bC as Yt,aa as Gt,ac as Kt,bD as Jt,D as Qt,al as Ae}from"./index-e497b666.js";import{A as er}from"./Add-f2559956.js";import{N as tr}from"./RadioGroup-6edab0a1.js";function rr(e,o,r,n){var i=-1,d=e==null?0:e.length;for(n&&d&&(r=e[++i]);++i<d;)r=o(r,e[i],i,e);return r}function or(e){return function(o){return e==null?void 0:e[o]}}var nr={À:"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"},ir=or(nr);const ar=ir;var lr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sr="\\u0300-\\u036f",dr="\\ufe20-\\ufe2f",ur="\\u20d0-\\u20ff",cr=sr+dr+ur,fr="["+cr+"]",gr=RegExp(fr,"g");function hr(e){return e=Ye(e),e&&e.replace(lr,ar).replace(gr,"")}var pr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function vr(e){return e.match(pr)||[]}var mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function br(e){return mr.test(e)}var ot="\\ud800-\\udfff",wr="\\u0300-\\u036f",xr="\\ufe20-\\ufe2f",yr="\\u20d0-\\u20ff",Cr=wr+xr+yr,nt="\\u2700-\\u27bf",it="a-z\\xdf-\\xf6\\xf8-\\xff",Rr="\\xac\\xb1\\xd7\\xf7",Sr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kr="\\u2000-\\u206f",Pr=" \\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",at="A-Z\\xc0-\\xd6\\xd8-\\xde",Lr="\\ufe0e\\ufe0f",lt=Rr+Sr+kr+Pr,st="['’]",Fe="["+lt+"]",Or="["+Cr+"]",dt="\\d+",Tr="["+nt+"]",ut="["+it+"]",ct="[^"+ot+lt+dt+nt+it+at+"]",zr="\\ud83c[\\udffb-\\udfff]",Br="(?:"+Or+"|"+zr+")",Ir="[^"+ot+"]",ft="(?:\\ud83c[\\udde6-\\uddff]){2}",gt="[\\ud800-\\udbff][\\udc00-\\udfff]",ae="["+at+"]",$r="\\u200d",Ne="(?:"+ut+"|"+ct+")",Dr="(?:"+ae+"|"+ct+")",He="(?:"+st+"(?:d|ll|m|re|s|t|ve))?",We="(?:"+st+"(?:D|LL|M|RE|S|T|VE))?",ht=Br+"?",pt="["+Lr+"]?",Mr="(?:"+$r+"(?:"+[Ir,ft,gt].join("|")+")"+pt+ht+")*",_r="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ur="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Er=pt+ht+Mr,jr="(?:"+[Tr,ft,gt].join("|")+")"+Er,Ar=RegExp([ae+"?"+ut+"+"+He+"(?="+[Fe,ae,"$"].join("|")+")",Dr+"+"+We+"(?="+[Fe,ae+Ne,"$"].join("|")+")",ae+"?"+Ne+"+"+He,ae+"+"+We,Ur,_r,dt,jr].join("|"),"g");function Fr(e){return e.match(Ar)||[]}function Nr(e,o,r){return e=Ye(e),o=r?void 0:o,o===void 0?br(e)?Fr(e):vr(e):e.match(o)||[]}var Hr="['’]",Wr=RegExp(Hr,"g");function Vr(e){return function(o){return rr(Nr(hr(o).replace(Wr,"")),e,"")}}var Zr=Vr(function(e,o,r){return e+(r?"-":"")+o.toLowerCase()});const Xr=Zr,qr=ee("attach",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("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"}))))),Yr=ee("trash",t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},t("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;"}),t("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;"}),t("line",{x1:"312",y1:"240",x2:"200",y2:"352",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}),t("line",{x1:"312",y1:"352",x2:"200",y2:"240",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Gr=ee("download",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("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"}))))),Kr=ee("cancel",t("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{fill:"currentColor","fill-rule":"nonzero"},t("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"}))))),Jr=ee("retry",t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},t("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;"}),t("polyline",{points:"256 58 336 138 256 218",style:"fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px;"}))),Qr=ee("rotateClockwise",t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"}))),eo=ee("rotateClockwise",t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"}))),to=ee("zoomIn",t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"}))),ro=ee("zoomOut",t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"}))),oo=X({name:"ResizeSmall",render(){return t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},t("g",{fill:"none"},t("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"})))}}),no=Ge&&"loading"in document.createElement("img"),io=(e={})=>{var o;const{root:r=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(o=e.threshold)!==null&&o!==void 0?o:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof r=="string"?document.querySelector(r):r)||document.documentElement})}},Ce=new WeakMap,Re=new WeakMap,Se=new WeakMap,ao=(e,o,r)=>{if(!e)return()=>{};const n=io(o),{root:i}=n.options;let d;const u=Ce.get(i);u?d=u:(d=new Map,Ce.set(i,d));let c,s;d.has(n.hash)?(s=d.get(n.hash),s[1].has(e)||(c=s[0],s[1].add(e),c.observe(e))):(c=new IntersectionObserver(f=>{f.forEach(x=>{if(x.isIntersecting){const g=Re.get(x.target),R=Se.get(x.target);g&&g(),R&&(R.value=!0)}})},n.options),c.observe(e),s=[c,new Set([e])],d.set(n.hash,s));let a=!1;const l=()=>{a||(Re.delete(e),Se.delete(e),a=!0,s[1].has(e)&&(s[0].unobserve(e),s[1].delete(e)),s[1].size<=0&&d.delete(n.hash),d.size||Ce.delete(i))};return Re.set(e,l),Se.set(e,r),l},Be=Object.assign(Object.assign({},le.props),{showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean}),vt=Oe("n-image");function lo(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const so=Ot({name:"Image",common:Tt,peers:{Tooltip:zt},self:lo}),uo=t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})),co=t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})),fo=t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"})),go=U([U("body >",[v("image-container","position: fixed;")]),v("image-preview-container",`
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- display: flex;
- `),v("image-preview-overlay",`
- z-index: -1;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- background: rgba(0, 0, 0, .3);
- `,[Me()]),v("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;
- `,[v("base-icon",`
- padding: 0 8px;
- font-size: 28px;
- cursor: pointer;
- `),Me()]),v("image-preview-wrapper",`
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- display: flex;
- pointer-events: none;
- `,[Bt()]),v("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);
- `),v("image",`
- display: inline-flex;
- max-height: 100%;
- max-width: 100%;
- `,[It("preview-disabled",`
- cursor: pointer;
- `),U("img",`
- border-radius: inherit;
- `)])]),he=32,mt=X({name:"ImagePreview",props:Object.assign(Object.assign({},Be),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const o=le("Image","-image",go,so,e,N(e,"clsPrefix"));let r=null;const n=V(null),i=V(null),d=V(void 0),u=V(!1),c=V(!1),{localeRef:s}=$t("Image");function a(){const{value:h}=i;if(!r||!h)return;const{style:w}=h,p=r.getBoundingClientRect(),z=p.left+p.width/2,B=p.top+p.height/2;w.transformOrigin=`${z}px ${B}px`}function l(h){var w,p;switch(h.key){case" ":h.preventDefault();break;case"ArrowLeft":(w=e.onPrev)===null||w===void 0||w.call(e);break;case"ArrowRight":(p=e.onNext)===null||p===void 0||p.call(e);break;case"Escape":Ie();break}}Dt(u,h=>{h?xe("keydown",document,l):fe("keydown",document,l)}),Ke(()=>{fe("keydown",document,l)});let f=0,x=0,g=0,R=0,y=0,L=0,E=0,$=0,S=!1;function D(h){const{clientX:w,clientY:p}=h;g=w-f,R=p-x,At(q)}function b(h){const{mouseUpClientX:w,mouseUpClientY:p,mouseDownClientX:z,mouseDownClientY:B}=h,Z=z-w,K=B-p,J=`vertical${K>0?"Top":"Bottom"}`,te=`horizontal${Z>0?"Left":"Right"}`;return{moveVerticalDirection:J,moveHorizontalDirection:te,deltaHorizontal:Z,deltaVertical:K}}function C(h){const{value:w}=n;if(!w)return{offsetX:0,offsetY:0};const p=w.getBoundingClientRect(),{moveVerticalDirection:z,moveHorizontalDirection:B,deltaHorizontal:Z,deltaVertical:K}=h||{};let J=0,te=0;return p.width<=window.innerWidth?J=0:p.left>0?J=(p.width-window.innerWidth)/2:p.right<window.innerWidth?J=-(p.width-window.innerWidth)/2:B==="horizontalRight"?J=Math.min((p.width-window.innerWidth)/2,y-(Z??0)):J=Math.max(-((p.width-window.innerWidth)/2),y-(Z??0)),p.height<=window.innerHeight?te=0:p.top>0?te=(p.height-window.innerHeight)/2:p.bottom<window.innerHeight?te=-(p.height-window.innerHeight)/2:z==="verticalBottom"?te=Math.min((p.height-window.innerHeight)/2,L-(K??0)):te=Math.max(-((p.height-window.innerHeight)/2),L-(K??0)),{offsetX:J,offsetY:te}}function k(h){fe("mousemove",document,D),fe("mouseup",document,k);const{clientX:w,clientY:p}=h;S=!1;const z=b({mouseUpClientX:w,mouseUpClientY:p,mouseDownClientX:E,mouseDownClientY:$}),B=C(z);g=B.offsetX,R=B.offsetY,q()}const j=re(vt,null);function m(h){var w,p;if((p=(w=j==null?void 0:j.previewedImgPropsRef.value)===null||w===void 0?void 0:w.onMousedown)===null||p===void 0||p.call(w,h),h.button!==0)return;const{clientX:z,clientY:B}=h;S=!0,f=z-g,x=B-R,y=g,L=R,E=z,$=B,q(),xe("mousemove",document,D),xe("mouseup",document,k)}function M(h){var w,p;(p=(w=j==null?void 0:j.previewedImgPropsRef.value)===null||w===void 0?void 0:w.onDblclick)===null||p===void 0||p.call(w,h);const z=ce();P=P===z?1:z,q()}const T=1.5;let W=0,P=1,A=0;function _(){P=1,W=0}function F(){var h;_(),A=0,(h=e.onPrev)===null||h===void 0||h.call(e)}function Y(){var h;_(),A=0,(h=e.onNext)===null||h===void 0||h.call(e)}function G(){A-=90,q()}function oe(){A+=90,q()}function me(){const{value:h}=n;if(!h)return 1;const{innerWidth:w,innerHeight:p}=window,z=Math.max(1,h.naturalHeight/(p-he)),B=Math.max(1,h.naturalWidth/(w-he));return Math.max(3,z*2,B*2)}function ce(){const{value:h}=n;if(!h)return 1;const{innerWidth:w,innerHeight:p}=window,z=h.naturalHeight/(p-he),B=h.naturalWidth/(w-he);return z<1&&B<1?1:Math.max(z,B)}function be(){const h=me();P<h&&(W+=1,P=Math.min(h,Math.pow(T,W)),q())}function we(){if(P>.5){const h=P;W-=1,P=Math.max(.5,Math.pow(T,W));const w=h-P;q(!1);const p=C();P+=w,q(!1),P-=w,g=p.offsetX,R=p.offsetY,q()}}function q(h=!0){var w;const{value:p}=n;if(!p)return;const{style:z}=p,B=jt((w=j==null?void 0:j.previewedImgPropsRef.value)===null||w===void 0?void 0:w.style);let Z="";if(typeof B=="string")Z=B+";";else for(const J in B)Z+=`${Xr(J)}: ${B[J]};`;const K=`transform-origin: center; transform: translateX(${g}px) translateY(${R}px) rotate(${A}deg) scale(${P});`;S?z.cssText=Z+"cursor: grabbing; transition: none;"+K:z.cssText=Z+"cursor: grab;"+K+(h?"":"transition: none;"),h||p.offsetHeight}function Ie(){u.value=!u.value,c.value=!0}function kt(){P=ce(),W=Math.ceil(Math.log(P)/Math.log(T)),g=0,R=0,q()}const Pt={setPreviewSrc:h=>{d.value=h},setThumbnailEl:h=>{r=h},toggleShow:Ie};function Lt(h,w){if(e.showToolbarTooltip){const{value:p}=o;return t(tr,{to:!1,theme:p.peers.Tooltip,themeOverrides:p.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>s.value[w],trigger:()=>h})}else return h}const $e=O(()=>{const{common:{cubicBezierEaseInOut:h},self:{toolbarIconColor:w,toolbarBorderRadius:p,toolbarBoxShadow:z,toolbarColor:B}}=o.value;return{"--n-bezier":h,"--n-toolbar-icon-color":w,"--n-toolbar-color":B,"--n-toolbar-border-radius":p,"--n-toolbar-box-shadow":z}}),{inlineThemeDisabled:De}=ue(),ne=De?Te("image-preview",void 0,$e,e):void 0;return Object.assign({previewRef:n,previewWrapperRef:i,previewSrc:d,show:u,appear:Mt(),displayed:c,previewedImgProps:j==null?void 0:j.previewedImgPropsRef,handleWheel(h){h.preventDefault()},handlePreviewMousedown:m,handlePreviewDblclick:M,syncTransformOrigin:a,handleAfterLeave:()=>{_(),A=0,c.value=!1},handleDragStart:h=>{var w,p;(p=(w=j==null?void 0:j.previewedImgPropsRef.value)===null||w===void 0?void 0:w.onDragstart)===null||p===void 0||p.call(w,h),h.preventDefault()},zoomIn:be,zoomOut:we,rotateCounterclockwise:G,rotateClockwise:oe,handleSwitchPrev:F,handleSwitchNext:Y,withTooltip:Lt,resizeToOrignalImageSize:kt,cssVars:De?void 0:$e,themeClass:ne==null?void 0:ne.themeClass,onRender:ne==null?void 0:ne.onRender},Pt)},render(){var e,o;const{clsPrefix:r}=this;return t(ke,null,(o=(e=this.$slots).default)===null||o===void 0?void 0:o.call(e),t(_t,{show:this.show},{default:()=>{var n;return this.show||this.displayed?((n=this.onRender)===null||n===void 0||n.call(this),_e(t("div",{class:[`${r}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},t(ye,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?t("div",{class:`${r}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?t(ye,{name:"fade-in-transition",appear:this.appear},{default:()=>{if(!this.show)return null;const{withTooltip:i}=this;return t("div",{class:`${r}-image-preview-toolbar`},this.onPrev?t(ke,null,i(t(H,{clsPrefix:r,onClick:this.handleSwitchPrev},{default:()=>uo}),"tipPrevious"),i(t(H,{clsPrefix:r,onClick:this.handleSwitchNext},{default:()=>co}),"tipNext")):null,i(t(H,{clsPrefix:r,onClick:this.rotateCounterclockwise},{default:()=>t(eo,null)}),"tipCounterclockwise"),i(t(H,{clsPrefix:r,onClick:this.rotateClockwise},{default:()=>t(Qr,null)}),"tipClockwise"),i(t(H,{clsPrefix:r,onClick:this.resizeToOrignalImageSize},{default:()=>t(oo,null)}),"tipOriginalSize"),i(t(H,{clsPrefix:r,onClick:this.zoomOut},{default:()=>t(ro,null)}),"tipZoomOut"),i(t(H,{clsPrefix:r,onClick:this.zoomIn},{default:()=>t(to,null)}),"tipZoomIn"),i(t(H,{clsPrefix:r,onClick:this.toggleShow},{default:()=>fo}),"tipClose"))}}):null,t(ye,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:i={}}=this;return _e(t("div",{class:`${r}-image-preview-wrapper`,ref:"previewWrapperRef"},t("img",Object.assign({},i,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${r}-image-preview`,i.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[Et,this.show]])}})),[[Ut,{enabled:this.show}]])):null}}))}}),bt=Oe("n-image-group"),ho=Be,po=X({name:"ImageGroup",props:ho,setup(e){let o;const{mergedClsPrefixRef:r}=ue(e),n=`c${Pe()}`,i=Ft(),d=s=>{var a;o=s,(a=c.value)===null||a===void 0||a.setPreviewSrc(s)};function u(s){if(!(i!=null&&i.proxy))return;const l=i.proxy.$el.parentElement.querySelectorAll(`[data-group-id=${n}]:not([data-error=true])`);if(!l.length)return;const f=Array.from(l).findIndex(x=>x.dataset.previewSrc===o);~f?d(l[(f+s+l.length)%l.length].dataset.previewSrc):d(l[0].dataset.previewSrc)}ze(bt,{mergedClsPrefixRef:r,setPreviewSrc:d,setThumbnailEl:s=>{var a;(a=c.value)===null||a===void 0||a.setThumbnailEl(s)},toggleShow:()=>{var s;(s=c.value)===null||s===void 0||s.toggleShow()},groupId:n});const c=V(null);return{mergedClsPrefix:r,previewInstRef:c,next:()=>{u(1)},prev:()=>{u(-1)}}},render(){return t(mt,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:this.mergedClsPrefix,ref:"previewInstRef",onPrev:this.prev,onNext:this.next,showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},this.$slots)}}),vo=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),mo=X({name:"Image",props:vo,inheritAttrs:!1,setup(e){const o=V(null),r=V(!1),n=V(null),i=re(bt,null),{mergedClsPrefixRef:d}=i||ue(e),u={click:()=>{if(e.previewDisabled||r.value)return;const a=e.previewSrc||e.src;if(i){i.setPreviewSrc(a),i.setThumbnailEl(o.value),i.toggleShow();return}const{value:l}=n;l&&(l.setPreviewSrc(a),l.setThumbnailEl(o.value),l.toggleShow())}},c=V(!e.lazy);Ue(()=>{var a;(a=o.value)===null||a===void 0||a.setAttribute("data-group-id",(i==null?void 0:i.groupId)||"")}),Ue(()=>{if(e.lazy&&e.intersectionObserverOptions){let a;const l=Le(()=>{a==null||a(),a=void 0,a=ao(o.value,e.intersectionObserverOptions,c)});Ke(()=>{l(),a==null||a()})}}),Le(()=>{var a;e.src,(a=e.imgProps)===null||a===void 0||a.src,r.value=!1});const s=V(!1);return ze(vt,{previewedImgPropsRef:N(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:d,groupId:i==null?void 0:i.groupId,previewInstRef:n,imageRef:o,showError:r,shouldStartLoading:c,loaded:s,mergedOnClick:a=>{var l,f;u.click(),(f=(l=e.imgProps)===null||l===void 0?void 0:l.onClick)===null||f===void 0||f.call(l,a)},mergedOnError:a=>{if(!c.value)return;r.value=!0;const{onError:l,imgProps:{onError:f}={}}=e;l==null||l(a),f==null||f(a)},mergedOnLoad:a=>{const{onLoad:l,imgProps:{onLoad:f}={}}=e;l==null||l(a),f==null||f(a),s.value=!0}},u)},render(){var e,o;const{mergedClsPrefix:r,imgProps:n={},loaded:i,$attrs:d,lazy:u}=this,c=(o=(e=this.$slots).placeholder)===null||o===void 0?void 0:o.call(e),s=this.src||n.src,a=t("img",Object.assign(Object.assign({},n),{ref:"imageRef",width:this.width||n.width,height:this.height||n.height,src:this.showError?this.fallbackSrc:u&&this.intersectionObserverOptions?this.shouldStartLoading?s:void 0:s,alt:this.alt||n.alt,"aria-label":this.alt||n.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:no&&u&&!this.intersectionObserverOptions?"lazy":"eager",style:[n.style||"",c&&!i?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return t("div",Object.assign({},d,{role:"none",class:[d.class,`${r}-image`,(this.previewDisabled||this.showError)&&`${r}-image--preview-disabled`]}),this.groupId?a:t(mt,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:r,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},{default:()=>a}),!i&&c)}}),bo=U([v("progress",{display:"inline-block"},[v("progress-icon",`
- color: var(--n-icon-color);
- transition: color .3s var(--n-bezier);
- `),I("line",`
- width: 100%;
- display: block;
- `,[v("progress-content",`
- display: flex;
- align-items: center;
- `,[v("progress-graph",{flex:1})]),v("progress-custom-content",{marginLeft:"14px"}),v("progress-icon",`
- width: 30px;
- padding-left: 14px;
- height: var(--n-icon-size-line);
- line-height: var(--n-icon-size-line);
- font-size: var(--n-icon-size-line);
- `,[I("as-text",`
- color: var(--n-text-color-line-outer);
- text-align: center;
- width: 40px;
- font-size: var(--n-font-size);
- padding-left: 4px;
- transition: color .3s var(--n-bezier);
- `)])]),I("circle, dashboard",{width:"120px"},[v("progress-custom-content",`
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- align-items: center;
- justify-content: center;
- `),v("progress-text",`
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- align-items: center;
- color: inherit;
- font-size: var(--n-font-size-circle);
- color: var(--n-text-color-circle);
- font-weight: var(--n-font-weight-circle);
- transition: color .3s var(--n-bezier);
- white-space: nowrap;
- `),v("progress-icon",`
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- align-items: center;
- color: var(--n-icon-color);
- font-size: var(--n-icon-size-circle);
- `)]),I("multiple-circle",`
- width: 200px;
- color: inherit;
- `,[v("progress-text",`
- font-weight: var(--n-font-weight-circle);
- color: var(--n-text-color-circle);
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- align-items: center;
- justify-content: center;
- transition: color .3s var(--n-bezier);
- `)]),v("progress-content",{position:"relative"}),v("progress-graph",{position:"relative"},[v("progress-graph-circle",[U("svg",{verticalAlign:"bottom"}),v("progress-graph-circle-fill",`
- stroke: var(--n-fill-color);
- transition:
- opacity .3s var(--n-bezier),
- stroke .3s var(--n-bezier),
- stroke-dasharray .3s var(--n-bezier);
- `,[I("empty",{opacity:0})]),v("progress-graph-circle-rail",`
- transition: stroke .3s var(--n-bezier);
- overflow: hidden;
- stroke: var(--n-rail-color);
- `)]),v("progress-graph-line",[I("indicator-inside",[v("progress-graph-line-rail",`
- height: 16px;
- line-height: 16px;
- border-radius: 10px;
- `,[v("progress-graph-line-fill",`
- height: inherit;
- border-radius: 10px;
- `),v("progress-graph-line-indicator",`
- background: #0000;
- white-space: nowrap;
- text-align: right;
- margin-left: 14px;
- margin-right: 14px;
- height: inherit;
- font-size: 12px;
- color: var(--n-text-color-line-inner);
- transition: color .3s var(--n-bezier);
- `)])]),I("indicator-inside-label",`
- height: 16px;
- display: flex;
- align-items: center;
- `,[v("progress-graph-line-rail",`
- flex: 1;
- transition: background-color .3s var(--n-bezier);
- `),v("progress-graph-line-indicator",`
- background: var(--n-fill-color);
- font-size: 12px;
- transform: translateZ(0);
- display: flex;
- vertical-align: middle;
- height: 16px;
- line-height: 16px;
- padding: 0 10px;
- border-radius: 10px;
- position: absolute;
- white-space: nowrap;
- color: var(--n-text-color-line-inner);
- transition:
- right .2s var(--n-bezier),
- color .3s var(--n-bezier),
- background-color .3s var(--n-bezier);
- `)]),v("progress-graph-line-rail",`
- position: relative;
- overflow: hidden;
- height: var(--n-rail-height);
- border-radius: 5px;
- background-color: var(--n-rail-color);
- transition: background-color .3s var(--n-bezier);
- `,[v("progress-graph-line-fill",`
- background: var(--n-fill-color);
- position: relative;
- border-radius: 5px;
- height: inherit;
- width: 100%;
- max-width: 0%;
- transition:
- background-color .3s var(--n-bezier),
- max-width .2s var(--n-bezier);
- `,[I("processing",[U("&::after",`
- content: "";
- background-image: var(--n-line-bg-processing);
- animation: progress-processing-animation 2s var(--n-bezier) infinite;
- `)])])])])])]),U("@keyframes progress-processing-animation",`
- 0% {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 100%;
- opacity: 1;
- }
- 66% {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- opacity: 0;
- }
- 100% {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- opacity: 0;
- }
- `)]),wo={success:t(Je,null),error:t(Qe,null),warning:t(et,null),info:t(tt,null)},xo=X({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:String,status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:o}){const r=O(()=>ie(e.height)),n=O(()=>e.railBorderRadius!==void 0?ie(e.railBorderRadius):e.height!==void 0?ie(e.height,{c:.5}):""),i=O(()=>e.fillBorderRadius!==void 0?ie(e.fillBorderRadius):e.railBorderRadius!==void 0?ie(e.railBorderRadius):e.height!==void 0?ie(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:d,railColor:u,railStyle:c,percentage:s,unit:a,indicatorTextColor:l,status:f,showIndicator:x,fillColor:g,processing:R,clsPrefix:y}=e;return t("div",{class:`${y}-progress-content`,role:"none"},t("div",{class:`${y}-progress-graph`,"aria-hidden":!0},t("div",{class:[`${y}-progress-graph-line`,{[`${y}-progress-graph-line--indicator-${d}`]:!0}]},t("div",{class:`${y}-progress-graph-line-rail`,style:[{backgroundColor:u,height:r.value,borderRadius:n.value},c]},t("div",{class:[`${y}-progress-graph-line-fill`,R&&`${y}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,backgroundColor:g,height:r.value,lineHeight:r.value,borderRadius:i.value}},d==="inside"?t("div",{class:`${y}-progress-graph-line-indicator`,style:{color:l}},s,a):null)))),x&&d==="outside"?t("div",null,o.default?t("div",{class:`${y}-progress-custom-content`,style:{color:l},role:"none"},o.default()):f==="default"?t("div",{role:"none",class:`${y}-progress-icon ${y}-progress-icon--as-text`,style:{color:l}},s,a):t("div",{class:`${y}-progress-icon`,"aria-hidden":!0},t(H,{clsPrefix:y},{default:()=>wo[f]}))):null)}}}),yo={success:t(Je,null),error:t(Qe,null),warning:t(et,null),info:t(tt,null)},Co=X({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:String,railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:o}){function r(n,i,d){const{gapDegree:u,viewBoxWidth:c,strokeWidth:s}=e,a=50,l=0,f=a,x=0,g=2*a,R=50+s/2,y=`M ${R},${R} m ${l},${f}
- a ${a},${a} 0 1 1 ${x},${-g}
- a ${a},${a} 0 1 1 ${-x},${g}`,L=Math.PI*2*a,E={stroke:d,strokeDasharray:`${n/100*(L-u)}px ${c*8}px`,strokeDashoffset:`-${u/2}px`,transformOrigin:i?"center":void 0,transform:i?`rotate(${i}deg)`:void 0};return{pathString:y,pathStyle:E}}return()=>{const{fillColor:n,railColor:i,strokeWidth:d,offsetDegree:u,status:c,percentage:s,showIndicator:a,indicatorTextColor:l,unit:f,gapOffsetDegree:x,clsPrefix:g}=e,{pathString:R,pathStyle:y}=r(100,0,i),{pathString:L,pathStyle:E}=r(s,u,n),$=100+d;return t("div",{class:`${g}-progress-content`,role:"none"},t("div",{class:`${g}-progress-graph`,"aria-hidden":!0},t("div",{class:`${g}-progress-graph-circle`,style:{transform:x?`rotate(${x}deg)`:void 0}},t("svg",{viewBox:`0 0 ${$} ${$}`},t("g",null,t("path",{class:`${g}-progress-graph-circle-rail`,d:R,"stroke-width":d,"stroke-linecap":"round",fill:"none",style:y})),t("g",null,t("path",{class:[`${g}-progress-graph-circle-fill`,s===0&&`${g}-progress-graph-circle-fill--empty`],d:L,"stroke-width":d,"stroke-linecap":"round",fill:"none",style:E}))))),a?t("div",null,o.default?t("div",{class:`${g}-progress-custom-content`,role:"none"},o.default()):c!=="default"?t("div",{class:`${g}-progress-icon`,"aria-hidden":!0},t(H,{clsPrefix:g},{default:()=>yo[c]})):t("div",{class:`${g}-progress-text`,style:{color:l},role:"none"},t("span",{class:`${g}-progress-text__percentage`},s),t("span",{class:`${g}-progress-text__unit`},f))):null)}}});function Ve(e,o,r=100){return`m ${r/2} ${r/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const Ro=X({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:o}){const r=O(()=>e.percentage.map((i,d)=>`${Math.PI*i/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*d)-e.circleGap*d)*2}, ${e.viewBoxWidth*8}`));return()=>{const{viewBoxWidth:n,strokeWidth:i,circleGap:d,showIndicator:u,fillColor:c,railColor:s,railStyle:a,percentage:l,clsPrefix:f}=e;return t("div",{class:`${f}-progress-content`,role:"none"},t("div",{class:`${f}-progress-graph`,"aria-hidden":!0},t("div",{class:`${f}-progress-graph-circle`},t("svg",{viewBox:`0 0 ${n} ${n}`},l.map((x,g)=>t("g",{key:g},t("path",{class:`${f}-progress-graph-circle-rail`,d:Ve(n/2-i/2*(1+2*g)-d*g,i,n),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:s[g]},a[g]]}),t("path",{class:[`${f}-progress-graph-circle-fill`,x===0&&`${f}-progress-graph-circle-fill--empty`],d:Ve(n/2-i/2*(1+2*g)-d*g,i,n),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:r.value[g],strokeDashoffset:0,stroke:c[g]}})))))),u&&o.default?t("div",null,t("div",{class:`${f}-progress-text`},o.default())):null)}}}),So=Object.assign(Object.assign({},le.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),ko=X({name:"Progress",props:So,setup(e){const o=O(()=>e.indicatorPlacement||e.indicatorPosition),r=O(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:n,inlineThemeDisabled:i}=ue(e),d=le("Progress","-progress",bo,Nt,e,n),u=O(()=>{const{status:s}=e,{common:{cubicBezierEaseInOut:a},self:{fontSize:l,fontSizeCircle:f,railColor:x,railHeight:g,iconSizeCircle:R,iconSizeLine:y,textColorCircle:L,textColorLineInner:E,textColorLineOuter:$,lineBgProcessing:S,fontWeightCircle:D,[Ee("iconColor",s)]:b,[Ee("fillColor",s)]:C}}=d.value;return{"--n-bezier":a,"--n-fill-color":C,"--n-font-size":l,"--n-font-size-circle":f,"--n-font-weight-circle":D,"--n-icon-color":b,"--n-icon-size-circle":R,"--n-icon-size-line":y,"--n-line-bg-processing":S,"--n-rail-color":x,"--n-rail-height":g,"--n-text-color-circle":L,"--n-text-color-line-inner":E,"--n-text-color-line-outer":$}}),c=i?Te("progress",O(()=>e.status[0]),u,e):void 0;return{mergedClsPrefix:n,mergedIndicatorPlacement:o,gapDeg:r,cssVars:i?void 0:u,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){const{type:e,cssVars:o,indicatorTextColor:r,showIndicator:n,status:i,railColor:d,railStyle:u,color:c,percentage:s,viewBoxWidth:a,strokeWidth:l,mergedIndicatorPlacement:f,unit:x,borderRadius:g,fillBorderRadius:R,height:y,processing:L,circleGap:E,mergedClsPrefix:$,gapDeg:S,gapOffsetDegree:D,themeClass:b,$slots:C,onRender:k}=this;return k==null||k(),t("div",{class:[b,`${$}-progress`,`${$}-progress--${e}`,`${$}-progress--${i}`],style:o,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?t(Co,{clsPrefix:$,status:i,showIndicator:n,indicatorTextColor:r,railColor:d,fillColor:c,railStyle:u,offsetDegree:this.offsetDegree,percentage:s,viewBoxWidth:a,strokeWidth:l,gapDegree:S===void 0?e==="dashboard"?75:0:S,gapOffsetDegree:D,unit:x},C):e==="line"?t(xo,{clsPrefix:$,status:i,showIndicator:n,indicatorTextColor:r,railColor:d,fillColor:c,railStyle:u,percentage:s,processing:L,indicatorPlacement:f,unit:x,fillBorderRadius:R,railBorderRadius:g,height:y},C):e==="multiple-circle"?t(Ro,{clsPrefix:$,strokeWidth:l,railColor:d,fillColor:c,railStyle:u,viewBoxWidth:a,percentage:s,showIndicator:n,circleGap:E},C):null)}}),se=Oe("n-upload"),wt="__UPLOAD_DRAGGER__",Po=X({name:"UploadDragger",[wt]:!0,setup(e,{slots:o}){const r=re(se,null);return r||ve("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:n},mergedDisabledRef:{value:i},maxReachedRef:{value:d}}=r;return t("div",{class:[`${n}-upload-dragger`,(i||d)&&`${n}-upload-dragger--disabled`]},o)}}});var xt=globalThis&&globalThis.__awaiter||function(e,o,r,n){function i(d){return d instanceof r?d:new r(function(u){u(d)})}return new(r||(r=Promise))(function(d,u){function c(l){try{a(n.next(l))}catch(f){u(f)}}function s(l){try{a(n.throw(l))}catch(f){u(f)}}function a(l){l.done?d(l.value):i(l.value).then(c,s)}a((n=n.apply(e,o||[])).next())})};const yt=e=>e.includes("image/"),Ze=(e="")=>{const o=e.split("/"),n=o[o.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},Xe=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Ct=e=>{if(e.type)return yt(e.type);const o=Ze(e.name||"");if(Xe.test(o))return!0;const r=e.thumbnailUrl||e.url||"",n=Ze(r);return!!(/^data:image\//.test(r)||Xe.test(n))};function Lo(e){return xt(this,void 0,void 0,function*(){return yield new Promise(o=>{if(!e.type||!yt(e.type)){o("");return}o(window.URL.createObjectURL(e))})})}const Oo=Ge&&window.FileReader&&window.File;function To(e){return e.isDirectory}function zo(e){return e.isFile}function Bo(e,o){return xt(this,void 0,void 0,function*(){const r=[];let n,i=0;function d(){i++}function u(){i--,i||n(r)}function c(s){s.forEach(a=>{if(a){if(d(),o&&To(a)){const l=a.createReader();d(),l.readEntries(f=>{c(f),u()},()=>{u()})}else zo(a)&&(d(),a.file(l=>{r.push({file:l,entry:a,source:"dnd"}),u()},()=>{u()}));u()}})}return yield new Promise(s=>{n=s,c(e)}),r})}function de(e){const{id:o,name:r,percentage:n,status:i,url:d,file:u,thumbnailUrl:c,type:s,fullPath:a,batchId:l}=e;return{id:o,name:r,percentage:n??null,status:i,url:d??null,file:u??null,thumbnailUrl:c??null,type:s??null,fullPath:a??null,batchId:l??null}}function Io(e,o,r){return e=e.toLowerCase(),o=o.toLocaleLowerCase(),r=r.toLocaleLowerCase(),r.split(",").map(i=>i.trim()).filter(Boolean).some(i=>{if(i.startsWith(".")){if(e.endsWith(i))return!0}else if(i.includes("/")){const[d,u]=o.split("/"),[c,s]=i.split("/");if((c==="*"||d&&c&&c===d)&&(s==="*"||u&&s&&s===u))return!0}else return!0;return!1})}const $o=(e,o)=>{if(!e)return;const r=document.createElement("a");r.href=e,o!==void 0&&(r.download=o),document.body.appendChild(r),r.click(),document.body.removeChild(r)},Rt=X({name:"UploadTrigger",props:{abstract:Boolean},setup(e,{slots:o}){const r=re(se,null);r||ve("upload-trigger","`n-upload-trigger` must be placed inside `n-upload`.");const{mergedClsPrefixRef:n,mergedDisabledRef:i,maxReachedRef:d,listTypeRef:u,dragOverRef:c,openOpenFileDialog:s,draggerInsideRef:a,handleFileAddition:l,mergedDirectoryDndRef:f,triggerStyleRef:x}=r,g=O(()=>u.value==="image-card");function R(){i.value||d.value||s()}function y(S){S.preventDefault(),c.value=!0}function L(S){S.preventDefault(),c.value=!0}function E(S){S.preventDefault(),c.value=!1}function $(S){var D;if(S.preventDefault(),!a.value||i.value||d.value){c.value=!1;return}const b=(D=S.dataTransfer)===null||D===void 0?void 0:D.items;b!=null&&b.length?Bo(Array.from(b).map(C=>C.webkitGetAsEntry()),f.value).then(C=>{l(C)}).finally(()=>{c.value=!1}):c.value=!1}return()=>{var S;const{value:D}=n;return e.abstract?(S=o.default)===null||S===void 0?void 0:S.call(o,{handleClick:R,handleDrop:$,handleDragOver:y,handleDragEnter:L,handleDragLeave:E}):t("div",{class:[`${D}-upload-trigger`,(i.value||d.value)&&`${D}-upload-trigger--disabled`,g.value&&`${D}-upload-trigger--image-card`],style:x.value,onClick:R,onDrop:$,onDragover:y,onDragenter:L,onDragleave:E},g.value?t(Po,null,{default:()=>Ht(o.default,()=>[t(H,{clsPrefix:D},{default:()=>t(er,null)})])}):o)}}}),Do=X({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:re(se).mergedThemeRef}},render(){return t(rt,null,{default:()=>this.show?t(ko,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}}),Mo=t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},t("g",{fill:"none"},t("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"}))),_o=t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},t("g",{fill:"none"},t("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 Uo=globalThis&&globalThis.__awaiter||function(e,o,r,n){function i(d){return d instanceof r?d:new r(function(u){u(d)})}return new(r||(r=Promise))(function(d,u){function c(l){try{a(n.next(l))}catch(f){u(f)}}function s(l){try{a(n.throw(l))}catch(f){u(f)}}function a(l){l.done?d(l.value):i(l.value).then(c,s)}a((n=n.apply(e,o||[])).next())})};const pe={paddingMedium:"0 3px",heightMedium:"24px",iconSizeMedium:"18px"},Eo=X({name:"UploadFile",props:{clsPrefix:{type:String,required:!0},file:{type:Object,required:!0},listType:{type:String,required:!0}},setup(e){const o=re(se),r=V(null),n=V(""),i=O(()=>{const{file:b}=e;return b.status==="finished"?"success":b.status==="error"?"error":"info"}),d=O(()=>{const{file:b}=e;if(b.status==="error")return"error"}),u=O(()=>{const{file:b}=e;return b.status==="uploading"}),c=O(()=>{if(!o.showCancelButtonRef.value)return!1;const{file:b}=e;return["uploading","pending","error"].includes(b.status)}),s=O(()=>{if(!o.showRemoveButtonRef.value)return!1;const{file:b}=e;return["finished"].includes(b.status)}),a=O(()=>{if(!o.showDownloadButtonRef.value)return!1;const{file:b}=e;return["finished"].includes(b.status)}),l=O(()=>{if(!o.showRetryButtonRef.value)return!1;const{file:b}=e;return["error"].includes(b.status)}),f=Wt(()=>n.value||e.file.thumbnailUrl||e.file.url),x=O(()=>{if(!o.showPreviewButtonRef.value)return!1;const{file:{status:b},listType:C}=e;return["finished"].includes(b)&&f.value&&C==="image-card"});function g(){o.submit(e.file.id)}function R(b){b.preventDefault();const{file:C}=e;["finished","pending","error"].includes(C.status)?L(C):["uploading"].includes(C.status)?$(C):Xt("upload","The button clicked type is unknown.")}function y(b){b.preventDefault(),E(e.file)}function L(b){const{xhrMap:C,doChange:k,onRemoveRef:{value:j},mergedFileListRef:{value:m}}=o;Promise.resolve(j?j({file:Object.assign({},b),fileList:m}):!0).then(M=>{if(M===!1)return;const T=Object.assign({},b,{status:"removed"});C.delete(b.id),k(T,void 0,{remove:!0})})}function E(b){const{onDownloadRef:{value:C}}=o;Promise.resolve(C?C(Object.assign({},b)):!0).then(k=>{k!==!1&&$o(b.url,b.name)})}function $(b){const{xhrMap:C}=o,k=C.get(b.id);k==null||k.abort(),L(Object.assign({},b))}function S(){const{onPreviewRef:{value:b}}=o;if(b)b(e.file);else if(e.listType==="image-card"){const{value:C}=r;if(!C)return;C.click()}}const D=()=>Uo(this,void 0,void 0,function*(){const{listType:b}=e;b!=="image"&&b!=="image-card"||o.shouldUseThumbnailUrlRef.value(e.file)&&(n.value=yield o.getFileThumbnailUrlResolver(e.file))});return Le(()=>{D()}),{mergedTheme:o.mergedThemeRef,progressStatus:i,buttonType:d,showProgress:u,disabled:o.mergedDisabledRef,showCancelButton:c,showRemoveButton:s,showDownloadButton:a,showRetryButton:l,showPreviewButton:x,mergedThumbnailUrl:f,shouldUseThumbnailUrl:o.shouldUseThumbnailUrlRef,renderIcon:o.renderIconRef,imageRef:r,handleRemoveOrCancelClick:R,handleDownloadClick:y,handleRetryClick:g,handlePreviewClick:S}},render(){const{clsPrefix:e,mergedTheme:o,listType:r,file:n,renderIcon:i}=this;let d;const u=r==="image";u||r==="image-card"?d=!this.shouldUseThumbnailUrl(n)||!this.mergedThumbnailUrl?t("span",{class:`${e}-upload-file-info__thumbnail`},i?i(n):Ct(n)?t(H,{clsPrefix:e},{default:()=>Mo}):t(H,{clsPrefix:e},{default:()=>_o})):t("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,class:`${e}-upload-file-info__thumbnail`,onClick:this.handlePreviewClick},r==="image-card"?t(mo,{src:this.mergedThumbnailUrl||void 0,previewSrc:n.url||void 0,alt:n.name,ref:"imageRef"}):t("img",{src:this.mergedThumbnailUrl||void 0,alt:n.name})):d=t("span",{class:`${e}-upload-file-info__thumbnail`},i?i(n):t(H,{clsPrefix:e},{default:()=>t(qr,null)}));const s=t(Do,{show:this.showProgress,percentage:n.percentage||0,status:this.progressStatus}),a=r==="text"||r==="image";return t("div",{class:[`${e}-upload-file`,`${e}-upload-file--${this.progressStatus}-status`,n.url&&n.status!=="error"&&r!=="image-card"&&`${e}-upload-file--with-url`,`${e}-upload-file--${r}-type`]},t("div",{class:`${e}-upload-file-info`},d,t("div",{class:`${e}-upload-file-info__name`},a&&(n.url&&n.status!=="error"?t("a",{rel:"noopener noreferer",target:"_blank",href:n.url||void 0,onClick:this.handlePreviewClick},n.name):t("span",{onClick:this.handlePreviewClick},n.name)),u&&s),t("div",{class:[`${e}-upload-file-info__action`,`${e}-upload-file-info__action--${r}-type`]},this.showPreviewButton?t(ge,{key:"preview",quaternary:!0,type:this.buttonType,onClick:this.handlePreviewClick,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,builtinThemeOverrides:pe},{icon:()=>t(H,{clsPrefix:e},{default:()=>t(Vt,null)})}):null,(this.showRemoveButton||this.showCancelButton)&&!this.disabled&&t(ge,{key:"cancelOrTrash",theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,quaternary:!0,builtinThemeOverrides:pe,type:this.buttonType,onClick:this.handleRemoveOrCancelClick},{icon:()=>t(Zt,null,{default:()=>this.showRemoveButton?t(H,{clsPrefix:e,key:"trash"},{default:()=>t(Yr,null)}):t(H,{clsPrefix:e,key:"cancel"},{default:()=>t(Kr,null)})})}),this.showRetryButton&&!this.disabled&&t(ge,{key:"retry",quaternary:!0,type:this.buttonType,onClick:this.handleRetryClick,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,builtinThemeOverrides:pe},{icon:()=>t(H,{clsPrefix:e},{default:()=>t(Jr,null)})}),this.showDownloadButton?t(ge,{key:"download",quaternary:!0,type:this.buttonType,onClick:this.handleDownloadClick,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,builtinThemeOverrides:pe},{icon:()=>t(H,{clsPrefix:e},{default:()=>t(Gr,null)})}):null)),!u&&s)}}),jo=X({name:"UploadFileList",setup(e,{slots:o}){const r=re(se,null);r||ve("upload-file-list","`n-upload-file-list` must be placed inside `n-upload`.");const{abstractRef:n,mergedClsPrefixRef:i,listTypeRef:d,mergedFileListRef:u,fileListStyleRef:c,cssVarsRef:s,themeClassRef:a,maxReachedRef:l,showTriggerRef:f,imageGroupPropsRef:x}=r,g=O(()=>d.value==="image-card"),R=()=>u.value.map(L=>t(Eo,{clsPrefix:i.value,key:L.id,file:L,listType:d.value})),y=()=>g.value?t(po,Object.assign({},x.value),{default:R}):t(rt,{group:!0},{default:R});return()=>{const{value:L}=i,{value:E}=n;return t("div",{class:[`${L}-upload-file-list`,g.value&&`${L}-upload-file-list--grid`,E?a==null?void 0:a.value:void 0],style:[E&&s?s.value:"",c.value]},y(),f.value&&!l.value&&g.value&&t(Rt,null,o))}}}),Ao=U([v("upload","width: 100%;",[I("dragger-inside",[v("upload-trigger",`
- display: block;
- `)]),I("drag-over",[v("upload-dragger",`
- border: var(--n-dragger-border-hover);
- `)])]),v("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);
- `),I("disabled",`
- cursor: not-allowed;
- `)]),v("upload-trigger",`
- display: inline-block;
- box-sizing: border-box;
- opacity: 1;
- transition: opacity .3s var(--n-bezier);
- `,[U("+",[v("upload-file-list","margin-top: 8px;")]),I("disabled",`
- opacity: var(--n-item-disabled-opacity);
- cursor: not-allowed;
- `),I("image-card",`
- width: 96px;
- height: 96px;
- `,[v("base-icon",`
- font-size: 24px;
- `),v("upload-dragger",`
- padding: 0;
- height: 100%;
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- `)])]),v("upload-file-list",`
- line-height: var(--n-line-height);
- opacity: 1;
- transition: opacity .3s var(--n-bezier);
- `,[U("a, img","outline: none;"),I("disabled",`
- opacity: var(--n-item-disabled-opacity);
- cursor: not-allowed;
- `,[v("upload-file","cursor: not-allowed;")]),I("grid",`
- display: grid;
- grid-template-columns: repeat(auto-fill, 96px);
- grid-gap: 8px;
- margin-top: 0;
- `),v("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);
- `,[je(),v("progress",[je({foldPadding:!0})]),U("&:hover",`
- background-color: var(--n-item-color-hover);
- `,[v("upload-file-info",[Q("action",`
- opacity: 1;
- `)])]),I("image-type",`
- border-radius: var(--n-border-radius);
- text-decoration: underline;
- text-decoration-color: #0000;
- `,[v("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;
- `,[v("progress",`
- padding: 2px 0;
- margin-bottom: 0;
- `),Q("name",`
- padding: 0 8px;
- `),Q("thumbnail",`
- width: 32px;
- height: 32px;
- font-size: 28px;
- display: flex;
- justify-content: center;
- align-items: center;
- `,[U("img",`
- width: 100%;
- `)])])]),I("text-type",[v("progress",`
- box-sizing: border-box;
- padding-bottom: 6px;
- margin-bottom: 6px;
- `)]),I("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;
- `,[v("progress",`
- position: absolute;
- left: 8px;
- bottom: 8px;
- right: 8px;
- width: unset;
- `),v("upload-file-info",`
- padding: 0;
- width: 100%;
- height: 100%;
- `,[Q("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;"),v("upload-file-info",[Q("thumbnail","opacity: .12;")])])]),I("error-status",[U("&:hover",`
- background-color: var(--n-item-color-hover-error);
- `),v("upload-file-info",[Q("name","color: var(--n-item-text-color-error);"),Q("thumbnail","color: var(--n-item-text-color-error);")]),I("image-card-type",`
- border: var(--n-item-border-image-card-error);
- `)]),I("with-url",`
- cursor: pointer;
- `,[v("upload-file-info",[Q("name",`
- color: var(--n-item-text-color-success);
- text-decoration-color: var(--n-item-text-color-success);
- `,[U("a",`
- text-decoration: underline;
- `)])])]),v("upload-file-info",`
- position: relative;
- padding-top: 6px;
- padding-bottom: 6px;
- display: flex;
- flex-wrap: nowrap;
- `,[Q("thumbnail",`
- font-size: 18px;
- opacity: 1;
- transition: opacity .2s var(--n-bezier);
- color: var(--n-item-icon-color);
- `,[v("base-icon",`
- margin-right: 2px;
- vertical-align: middle;
- transition: color .3s var(--n-bezier);
- `)]),Q("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;
- `,[v("button",[U("&:not(:last-child)",{marginRight:"4px"}),v("base-icon",[U("svg",[qt()])])]),I("image-type",`
- position: relative;
- max-width: 80px;
- width: auto;
- `),I("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;
- `)]),Q("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;
- `)])])])]),v("upload-file-input",`
- display: block;
- width: 0;
- height: 0;
- opacity: 0;
- `)]);var qe=globalThis&&globalThis.__awaiter||function(e,o,r,n){function i(d){return d instanceof r?d:new r(function(u){u(d)})}return new(r||(r=Promise))(function(d,u){function c(l){try{a(n.next(l))}catch(f){u(f)}}function s(l){try{a(n.throw(l))}catch(f){u(f)}}function a(l){l.done?d(l.value):i(l.value).then(c,s)}a((n=n.apply(e,o||[])).next())})};function Fo(e,o,r){const{doChange:n,xhrMap:i}=e;let d=0;function u(s){var a;let l=Object.assign({},o,{status:"error",percentage:d});i.delete(o.id),l=de(((a=e.onError)===null||a===void 0?void 0:a.call(e,{file:l,event:s}))||l),n(l,s)}function c(s){var a;if(e.isErrorState){if(e.isErrorState(r)){u(s);return}}else if(r.status<200||r.status>=300){u(s);return}let l=Object.assign({},o,{status:"finished",percentage:d});i.delete(o.id),l=de(((a=e.onFinish)===null||a===void 0?void 0:a.call(e,{file:l,event:s}))||l),n(l,s)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(s){const a=Object.assign({},o,{status:"removed",file:null,percentage:d});i.delete(o.id),n(a,s)},handleXHRProgress(s){const a=Object.assign({},o,{status:"uploading"});if(s.lengthComputable){const l=Math.ceil(s.loaded/s.total*100);a.percentage=l,d=l}n(a,s)}}}function No(e){const{inst:o,file:r,data:n,headers:i,withCredentials:d,action:u,customRequest:c}=e,{doChange:s}=e.inst;let a=0;c({file:r,data:n,headers:i,withCredentials:d,action:u,onProgress(l){const f=Object.assign({},r,{status:"uploading"}),x=l.percent;f.percentage=x,a=x,s(f)},onFinish(){var l;let f=Object.assign({},r,{status:"finished",percentage:a});f=de(((l=o.onFinish)===null||l===void 0?void 0:l.call(o,{file:f}))||f),s(f)},onError(){var l;let f=Object.assign({},r,{status:"error",percentage:a});f=de(((l=o.onError)===null||l===void 0?void 0:l.call(o,{file:f}))||f),s(f)}})}function Ho(e,o,r){const n=Fo(e,o,r);r.onabort=n.handleXHRAbort,r.onerror=n.handleXHRError,r.onload=n.handleXHRLoad,r.upload&&(r.upload.onprogress=n.handleXHRProgress)}function St(e,o){return typeof e=="function"?e({file:o}):e||{}}function Wo(e,o,r){const n=St(o,r);n&&Object.keys(n).forEach(i=>{e.setRequestHeader(i,n[i])})}function Vo(e,o,r){const n=St(o,r);n&&Object.keys(n).forEach(i=>{e.append(i,n[i])})}function Zo(e,o,r,{method:n,action:i,withCredentials:d,responseType:u,headers:c,data:s}){const a=new XMLHttpRequest;a.responseType=u,e.xhrMap.set(r.id,a),a.withCredentials=d;const l=new FormData;if(Vo(l,s,r),l.append(o,r.file),Ho(e,r,a),i!==void 0){a.open(n.toUpperCase(),i),Wo(a,c,r),a.send(l);const f=Object.assign({},r,{status:"uploading"});e.doChange(f)}}const Xo=Object.assign(Object.assign({},le.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],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=>Oo?Ct(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerStyle:[String,Object],renderIcon:Object}),Ko=X({name:"Upload",props:Xo,setup(e){e.abstract&&e.listType==="image-card"&&ve("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:o,inlineThemeDisabled:r}=ue(e),n=le("Upload","-upload",Ao,Yt,e,o),i=Gt(e),d=O(()=>{const{max:m}=e;return m!==void 0?g.value.length>=m:!1}),u=V(e.defaultFileList),c=N(e,"fileList"),s=V(null),a={value:!1},l=V(!1),f=new Map,x=Kt(c,u),g=O(()=>x.value.map(de));function R(){var m;(m=s.value)===null||m===void 0||m.click()}function y(m){const M=m.target;$(M.files?Array.from(M.files).map(T=>({file:T,entry:null,source:"input"})):null,m),M.value=""}function L(m){const{"onUpdate:fileList":M,onUpdateFileList:T}=e;M&&Ae(M,m),T&&Ae(T,m),u.value=m}const E=O(()=>e.multiple||e.directory);function $(m,M){if(!m||m.length===0)return;const{onBeforeUpload:T}=e;m=E.value?m:[m[0]];const{max:W,accept:P}=e;m=m.filter(({file:_,source:F})=>F==="dnd"&&(P!=null&&P.trim())?Io(_.name,_.type,P):!0),W&&(m=m.slice(0,W-g.value.length));const A=Pe();Promise.all(m.map(({file:_,entry:F})=>qe(this,void 0,void 0,function*(){var Y;const G={id:Pe(),batchId:A,name:_.name,status:"pending",percentage:0,file:_,url:null,type:_.type,thumbnailUrl:null,fullPath:(Y=F==null?void 0:F.fullPath)!==null&&Y!==void 0?Y:`/${_.webkitRelativePath||_.name}`};return!T||(yield T({file:G,fileList:g.value}))!==!1?G:null}))).then(_=>qe(this,void 0,void 0,function*(){let F=Promise.resolve();_.forEach(Y=>{F=F.then(Qt).then(()=>{Y&&D(Y,M,{append:!0})})}),yield F})).then(()=>{e.defaultUpload&&S()})}function S(m){const{method:M,action:T,withCredentials:W,headers:P,data:A,name:_}=e,F=m!==void 0?g.value.filter(G=>G.id===m):g.value,Y=m!==void 0;F.forEach(G=>{const{status:oe}=G;(oe==="pending"||oe==="error"&&Y)&&(e.customRequest?No({inst:{doChange:D,xhrMap:f,onFinish:e.onFinish,onError:e.onError},file:G,action:T,withCredentials:W,headers:P,data:A,customRequest:e.customRequest}):Zo({doChange:D,xhrMap:f,onFinish:e.onFinish,onError:e.onError,isErrorState:e.isErrorState},_,G,{method:M,action:T,withCredentials:W,responseType:e.responseType,headers:P,data:A}))})}const D=(m,M,T={append:!1,remove:!1})=>{const{append:W,remove:P}=T,A=Array.from(g.value),_=A.findIndex(F=>F.id===m.id);if(W||P||~_){W?A.push(m):P?A.splice(_,1):A.splice(_,1,m);const{onChange:F}=e;F&&F({file:m,fileList:A,event:M}),L(A)}};function b(m){var M;if(m.thumbnailUrl)return m.thumbnailUrl;const{createThumbnailUrl:T}=e;return T?(M=T(m.file,m))!==null&&M!==void 0?M:m.url||"":m.url?m.url:m.file?Lo(m.file):""}const C=O(()=>{const{common:{cubicBezierEaseInOut:m},self:{draggerColor:M,draggerBorder:T,draggerBorderHover:W,itemColorHover:P,itemColorHoverError:A,itemTextColorError:_,itemTextColorSuccess:F,itemTextColor:Y,itemIconColor:G,itemDisabledOpacity:oe,lineHeight:me,borderRadius:ce,fontSize:be,itemBorderImageCardError:we,itemBorderImageCard:q}}=n.value;return{"--n-bezier":m,"--n-border-radius":ce,"--n-dragger-border":T,"--n-dragger-border-hover":W,"--n-dragger-color":M,"--n-font-size":be,"--n-item-color-hover":P,"--n-item-color-hover-error":A,"--n-item-disabled-opacity":oe,"--n-item-icon-color":G,"--n-item-text-color":Y,"--n-item-text-color-error":_,"--n-item-text-color-success":F,"--n-line-height":me,"--n-item-border-image-card-error":we,"--n-item-border-image-card":q}}),k=r?Te("upload",void 0,C,e):void 0;ze(se,{mergedClsPrefixRef:o,mergedThemeRef:n,showCancelButtonRef:N(e,"showCancelButton"),showDownloadButtonRef:N(e,"showDownloadButton"),showRemoveButtonRef:N(e,"showRemoveButton"),showRetryButtonRef:N(e,"showRetryButton"),onRemoveRef:N(e,"onRemove"),onDownloadRef:N(e,"onDownload"),mergedFileListRef:g,triggerStyleRef:N(e,"triggerStyle"),shouldUseThumbnailUrlRef:N(e,"shouldUseThumbnailUrl"),renderIconRef:N(e,"renderIcon"),xhrMap:f,submit:S,doChange:D,showPreviewButtonRef:N(e,"showPreviewButton"),onPreviewRef:N(e,"onPreview"),getFileThumbnailUrlResolver:b,listTypeRef:N(e,"listType"),dragOverRef:l,openOpenFileDialog:R,draggerInsideRef:a,handleFileAddition:$,mergedDisabledRef:i.mergedDisabledRef,maxReachedRef:d,fileListStyleRef:N(e,"fileListStyle"),abstractRef:N(e,"abstract"),acceptRef:N(e,"accept"),cssVarsRef:r?void 0:C,themeClassRef:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender,showTriggerRef:N(e,"showTrigger"),imageGroupPropsRef:N(e,"imageGroupProps"),mergedDirectoryDndRef:O(()=>{var m;return(m=e.directoryDnd)!==null&&m!==void 0?m:e.directory})});const j={clear:()=>{u.value=[]},submit:S,openOpenFileDialog:R};return Object.assign({mergedClsPrefix:o,draggerInsideRef:a,inputElRef:s,mergedTheme:n,dragOver:l,mergedMultiple:E,cssVars:r?void 0:C,themeClass:k==null?void 0:k.themeClass,onRender:k==null?void 0:k.onRender,handleFileInputChange:y},j)},render(){var e,o;const{draggerInsideRef:r,mergedClsPrefix:n,$slots:i,directory:d,onRender:u}=this;if(i.default&&!this.abstract){const s=i.default()[0];!((e=s==null?void 0:s.type)===null||e===void 0)&&e[wt]&&(r.value=!0)}const c=t("input",Object.assign({},this.inputProps,{ref:"inputElRef",type:"file",class:`${n}-upload-file-input`,accept:this.accept,multiple:this.mergedMultiple,onChange:this.handleFileInputChange,webkitdirectory:d||void 0,directory:d||void 0}));return this.abstract?t(ke,null,(o=i.default)===null||o===void 0?void 0:o.call(i),t(Jt,{to:"body"},c)):(u==null||u(),t("div",{class:[`${n}-upload`,r.value&&`${n}-upload--dragger-inside`,this.dragOver&&`${n}-upload--drag-over`,this.themeClass],style:this.cssVars},c,this.showTrigger&&this.listType!=="image-card"&&t(Rt,null,i),this.showFileList&&t(jo,null,i)))}});export{mo as _,Ko as a,ko as b};
|