Spaces:
Running
Running
File size: 27,681 Bytes
6b32816 |
1 2 3 4 5 6 7 8 9 10 |
import{r as l,R as E,j as g,a as N,F as fe,w as $e}from"./index.bd3517ca.js";import{i as me,a as pe,_ as Ae,b as Ie,c as Me,d as re,e as he,u as Te,f as Re,g as Ne,h as j,m as ge,j as Q,k as je,w as te,l as T,n as A,S as Be,o as ve,p as We,q as ze,r as De,s as Ce,I as Pe,B as Ue}from"./index.c5d86e93.js";import{r as ye,a as be,b as we}from"./axios.a426b7c9.js";import"./utils.62547028.js";function ne(e){me&&(pe(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var r=l.exports.useRef(e);r.current=l.exports.useMemo(function(){return e},[e]);var t=l.exports.useRef();return t.current||(t.current=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r.current.apply(this,i)}),t.current}var qe=Ae,Ze=function(){return qe.Date.now()},Ke=Ze,Ve=/\s/;function Xe(e){for(var r=e.length;r--&&Ve.test(e.charAt(r)););return r}var Ge=Xe,He=Ge,Je=/^\s+/;function Qe(e){return e&&e.slice(0,He(e)+1).replace(Je,"")}var Ye=Qe,et=Ie,tt=Me,rt="[object Symbol]";function nt(e){return typeof e=="symbol"||tt(e)&&et(e)==rt}var it=nt,at=Ye,oe=re,st=it,le=0/0,ot=/^[-+]0x[0-9a-f]+$/i,lt=/^0b[01]+$/i,ct=/^0o[0-7]+$/i,ut=parseInt;function dt(e){if(typeof e=="number")return e;if(st(e))return le;if(oe(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=oe(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=at(e);var t=lt.test(e);return t||ct.test(e)?ut(e.slice(2),t?2:8):ot.test(e)?le:+e}var ft=dt,mt=re,Y=Ke,ce=ft,pt="Expected a function",ht=Math.max,gt=Math.min;function vt(e,r,t){var i,s,c,v,a,d,y=0,o=!1,b=!1,C=!0;if(typeof e!="function")throw new TypeError(pt);r=ce(r)||0,mt(t)&&(o=!!t.leading,b="maxWait"in t,c=b?ht(ce(t.maxWait)||0,r):c,C="trailing"in t?!!t.trailing:C);function n(m){var w=i,k=s;return i=s=void 0,y=m,v=e.apply(k,w),v}function u(m){return y=m,a=setTimeout(O,r),o?n(m):v}function _(m){var w=m-d,k=m-y,$=r-w;return b?gt($,c-k):$}function F(m){var w=m-d,k=m-y;return d===void 0||w>=r||w<0||b&&k>=c}function O(){var m=Y();if(F(m))return S(m);a=setTimeout(O,_(m))}function S(m){return a=void 0,C&&i?n(m):(i=s=void 0,v)}function I(){a!==void 0&&clearTimeout(a),y=0,i=d=s=a=void 0}function f(){return a===void 0?v:S(Y())}function h(){var m=Y(),w=F(m);if(i=arguments,s=this,d=m,w){if(a===void 0)return u(d);if(b)return clearTimeout(a),a=setTimeout(O,r),n(d)}return a===void 0&&(a=setTimeout(O,r)),v}return h.cancel=I,h.flush=f,h}var Ct=vt,yt=Ct,bt=re,wt="Expected a function";function xt(e,r,t){var i=!0,s=!0;if(typeof e!="function")throw new TypeError(wt);return bt(t)&&(i="leading"in t?!!t.leading:i,s="trailing"in t?!!t.trailing:s),yt(e,r,{leading:i,maxWait:r,trailing:s})}var Lt=xt,kt=function(){var e=he(l.exports.useState({}),2),r=e[1];return l.exports.useCallback(function(){return r({})},[])},_t=kt;function Ft(e,r){var t;me&&(pe(e)||console.error("useThrottleFn expected parameter is a function, got ".concat(typeof e)));var i=Te(e),s=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,c=l.exports.useMemo(function(){return Lt(function(){for(var v=[],a=0;a<arguments.length;a++)v[a]=arguments[a];return i.current.apply(i,Ne([],he(v),!1))},s,r)},[]);return Re(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}function Et(e){return l.exports.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),l.exports.createElement("g",{id:"ArrowsAltOutline-ArrowsAltOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},l.exports.createElement("g",{id:"ArrowsAltOutline-\u7F16\u7EC4"},l.exports.createElement("rect",{id:"ArrowsAltOutline-\u77E9\u5F62",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),l.exports.createElement("path",{d:"M27.54027,25.4192995 L37.9992424,35.878922 L37.9992424,35.878922 L37.9999293,26.5005854 C37.9999455,26.2796715 38.1790447,26.1005985 38.3999586,26.1006147 C38.506035,26.1006225 38.6077646,26.1427646 38.682772,26.217772 L40.8828427,28.4178427 C40.9578573,28.4928573 41,28.5945988 41,28.7006854 L41,38.0000814 L41,38.0000814 C41,39.5977189 39.7511139,40.9036635 38.1763494,40.9949074 L38.0000214,41 L28.7016885,41 C28.5956001,41 28.4938569,40.9578558 28.4188421,40.882839 L26.2188213,38.6827611 C26.0626136,38.5265493 26.0626169,38.2732833 26.2188286,38.1170756 C26.2938429,38.0420633 26.3955829,37.999922 26.5016677,37.999922 L35.8782424,37.999922 L35.8782424,37.999922 L25.4189935,27.540576 C25.2627863,27.3843648 25.2627869,27.1310998 25.4189948,26.9748893 L26.9745934,25.4192907 C27.1307943,25.2630722 27.3840603,25.2630722 27.54027,25.4192819 C27.5402729,25.4192848 27.5402759,25.4192878 27.54027,25.4192995 Z M19.5801734,7.11717343 L21.78015,9.31715001 C21.9363597,9.47335972 21.9363597,9.72662572 21.78015,9.88283543 C21.7051347,9.95785072 21.6033919,9.99999352 21.4973043,9.99999272 L12.1212424,9.99992204 L12.1212424,9.99992204 L22.5812531,20.4603418 C22.7374521,20.6165579 22.7374496,20.8698197 22.5812476,21.0260328 L21.025649,22.5816313 C20.8694312,22.7378225 20.6161755,22.7378285 20.4599503,22.5816447 L9.9992424,12.121922 L9.9992424,12.121922 L9.99992925,21.4981366 C9.99994543,21.7190505 9.82087245,21.8981497 9.59995855,21.8981659 C9.49386181,21.8981736 9.39210827,21.8560303 9.31708654,21.7810086 L7.11716153,19.5810836 C7.04214447,19.5060665 7.00000153,19.4043208 7.00000424,19.2982306 L7.0002424,10.0009006 L7.0002424,10.0009006 C7.0002424,8.40323116 8.24915346,7.09726047 9.82394948,7.00601469 L10.000221,7.00092204 L19.2972917,7.00001615 C19.4033918,7.00000581 19.5051493,7.04214933 19.5801734,7.11717343 Z",id:"ArrowsAltOutline-\u5F62\u72B6",fill:"currentColor",fillRule:"nonzero"}))))}function St(e){return l.exports.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),l.exports.createElement("g",{id:"AudioOutline-AudioOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},l.exports.createElement("g",{id:"AudioOutline-\u7F16\u7EC4"},l.exports.createElement("rect",{id:"AudioOutline-\u77E9\u5F62",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),l.exports.createElement("path",{d:"M11.0280234,24.3721176 C11.0554205,24.7535019 11.0834856,25.0501619 11.1122187,25.2620977 C11.9726084,31.6083434 17.4147757,36.5 24,36.5 C30.5563593,36.5 35.9796602,31.6511327 36.8762035,25.3454661 C36.9089551,25.115114 36.9406933,24.7904814 36.9714181,24.3715686 C36.9866919,24.1625336 37.1607543,24.0007701 37.3703465,24.0007701 C37.634525,24.0007701 37.8444095,24.0007701 38,24.0007701 C38.2582838,24.0007701 38.591617,24.0007701 39,24.0007701 C39.1309734,24.0007701 39.3230245,24.0007701 39.5761532,24.0007701 C39.7971012,24.0007084 39.9762149,24.1798221 39.9762149,24.4007701 C39.9762149,24.4090903 39.9759553,24.4174084 39.9754366,24.4257124 C39.9477159,24.8694729 39.9187796,25.2146393 39.8886277,25.4612117 C39.0287343,32.4931489 33.6046985,38.1156092 26.6678639,39.2787918 C26.4729481,39.3114756 26.2013766,39.3485576 25.8531495,39.3900377 C25.6518802,39.4139065 25.5003394,39.5845847 25.5003569,39.7872643 C25.5003843,40.1036252 25.5004059,40.3526672 25.5004216,40.5343904 C25.50051,41.5562603 25.5005984,42.5781301 25.5006868,43.6 C25.5007405,43.8209139 25.3216699,44.0000155 25.100756,44.0000346 C25.1007444,44.0000346 25.1007329,44.0000346 25.1007214,44 L22.8992786,44 C22.6783647,44.0000346 22.4992786,43.8209485 22.4992786,43.6000346 C22.4992786,43.6000231 22.4992786,43.6000115 22.4993132,43.6 C22.4994011,42.583939 22.499489,41.567878 22.4995769,40.551817 C22.4995929,40.3665507 22.4996149,40.1124027 22.4996429,39.7893728 C22.4997293,39.5859497 22.3470932,39.4148995 22.1449805,39.3918467 C21.9611406,39.370878 21.8134608,39.3523813 21.7019412,39.3363565 C14.5024883,38.3018333 8.85079948,32.4787457 8.0816193,25.200152 C8.06165814,25.0112636 8.04204009,24.7526316 8.02276516,24.4242559 C8.00977186,24.2036984 8.17807611,24.0144039 8.39863633,24.0014575 C8.40644177,24.0009993 8.41425897,24.0007701 8.42207785,24.0007701 C8.66215694,24.0007701 8.85479766,24.0007701 9,24.0007701 C9.2583604,24.0007701 9.59169394,24.0007701 10,24.0007701 C10.1400474,24.0007701 10.3497683,24.0007701 10.6291627,24.0007701 C10.8388973,24.0008816 11.0129956,24.1629221 11.0280234,24.3721176 Z M24,4 C29.2492283,4 33.5045687,8.25329488 33.5045687,13.5 L33.5045687,23.5 C33.5045687,28.7467051 29.2492283,33 24,33 C18.7507717,33 14.4954313,28.7467051 14.4954313,23.5 L14.4954313,13.5 C14.4954313,8.25329488 18.7507717,4 24,4 Z M24,7 C20.4865005,7 17.6237845,9.78499621 17.500979,13.2668659 L17.4968741,13.5 L17.4968741,23.5 C17.4968741,27.0898509 20.4084227,30 24,30 C27.5134995,30 30.3762155,27.2150038 30.499021,23.7331341 L30.5031259,23.5 L30.5031259,13.5 C30.5031259,9.91014913 27.5915773,7 24,7 Z",id:"AudioOutline-\u5F62\u72B6",fill:"currentColor",fillRule:"nonzero"}))))}function Ot(e){return l.exports.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),l.exports.createElement("g",{id:"CloseCircleFill-CloseCircleFill",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},l.exports.createElement("g",{id:"CloseCircleFill-\u7F16\u7EC4"},l.exports.createElement("rect",{id:"CloseCircleFill-\u77E9\u5F62",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),l.exports.createElement("path",{d:"M24,2 C36.1502645,2 46,11.8497355 46,24 C46,36.1502645 36.1502645,46 24,46 C11.8497355,46 2,36.1502645 2,24 C2,11.8497355 11.8497355,2 24,2 Z M18.6753876,16 L15.5637812,16 C15.4576916,16 15.3559474,16.0421451 15.2809323,16.1171635 C15.124726,16.2733766 15.1247316,16.5266426 15.2809447,16.6828489 L15.2809447,16.6828489 L22.299066,23.7006641 L14.6828159,31.3171619 C14.6078042,31.3921761 14.5656632,31.4939157 14.5656632,31.6 C14.5656632,31.8209139 14.7447493,32 14.9656632,32 L14.9656632,32 L18.0753284,32 C18.1814068,32 18.2831412,31.9578638 18.3581544,31.8828594 L18.3581544,31.8828594 L24.420066,25.8216641 L30.4818451,31.8828564 C30.5568585,31.9578626 30.6585942,32 30.7646741,32 L30.7646741,32 L33.8763476,32 C33.9824309,32 34.0841695,31.9578599 34.1591835,31.8828496 C34.315397,31.7266436 34.3154031,31.4733776 34.1591972,31.3171641 L34.1591972,31.3171641 L26.542066,23.6996641 L33.5591874,16.6828489 C33.6342057,16.6078338 33.6763508,16.5060896 33.6763508,16.4 C33.6763508,16.1790861 33.4972647,16 33.2763508,16 L33.2763508,16 L30.1637654,16 C30.0576705,16 29.9559218,16.0421493 29.8809058,16.1171741 L29.8809058,16.1171741 L24.420066,21.5786641 L18.9582218,16.1171488 C18.883208,16.0421394 18.7814701,16 18.6753876,16 L18.6753876,16 Z",id:"CloseCircleFill-\u5F62\u72B6\u7ED3\u5408",fill:"currentColor",fillRule:"nonzero"}))))}function $t(e){return l.exports.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),l.exports.createElement("g",{id:"UpCircleOutline-UpCircleOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},l.exports.createElement("g",{id:"UpCircleOutline-\u7F16\u7EC4"},l.exports.createElement("rect",{id:"UpCircleOutline-\u77E9\u5F62",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),l.exports.createElement("path",{d:"M24,2 C36.1502645,2 46,11.8497355 46,24 C46,36.1502645 36.1502645,46 24,46 C11.8497355,46 2,36.1502645 2,24 C2,11.8497355 11.8497355,2 24,2 Z M24,5 C13.5065898,5 5,13.5065898 5,24 C5,34.4934102 13.5065898,43 24,43 C34.4934102,43 43,34.4934102 43,24 C43,13.5065898 34.4934102,5 24,5 Z M24.6342571,17.9537046 C24.9541516,17.9465077 25.2763361,18.0411018 25.5483174,18.2386679 L25.6798814,18.3460374 L32.8698331,24.9163737 C32.952761,24.992155 33,25.0993153 33,25.2116534 L33,28.1878801 C33,28.408794 32.8209139,28.5878801 32.6,28.5878801 C32.5001308,28.5878801 32.403874,28.5505211 32.3301537,28.4831477 L24.614,21.431323 L24.614,21.431323 L16.6698394,28.6911828 C16.5067641,28.840211 16.2537542,28.8288236 16.1047261,28.6657483 C16.0373566,28.5920287 16,28.4957749 16,28.3959089 L16,25.4196582 C16,25.3073173 16.0472414,25.2001546 16.1301729,25.124373 L23.5480406,18.3460374 L23.5480406,18.3460374 C23.8119743,18.1048436 24.1396674,17.9752317 24.4720765,17.9558732 L24.6342571,17.9537046 Z",id:"UpCircleOutline-\u5F62\u72B6",fill:"currentColor",fillRule:"nonzero"}))))}function xe(e){const{value:r,defaultValue:t,onChange:i}=e,s=_t(),c=l.exports.useRef(r!==void 0?r:t);r!==void 0&&(c.current=r);const v=ne((a,d=!1)=>{const y=typeof a=="function"?a(c.current):a;if(!(!d&&y===c.current))return c.current=y,s(),i==null?void 0:i(y)});return[c.current,v]}function At(e,r){const t=ne(e);j(()=>{const i=r.current;if(!!i)if(window.ResizeObserver){let s;const c=new ResizeObserver(()=>{s=window.requestAnimationFrame(()=>t(i))});return c.observe(i),()=>{window.cancelAnimationFrame(s),c.disconnect()}}else t(i)},[r])}function It(e,r,t){const i=ne(e);l.exports.useEffect(()=>{const s=new MutationObserver(()=>{i()});if(!!r.current)return s.observe(r.current,t),()=>{s.disconnect()}},[r])}var Le={exports:{}},p={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ie=Symbol.for("react.element"),ae=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),P=Symbol.for("react.context"),Mt=Symbol.for("react.server_context"),U=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),Tt=Symbol.for("react.offscreen"),ke;ke=Symbol.for("react.module.reference");function L(e){if(typeof e=="object"&&e!==null){var r=e.$$typeof;switch(r){case ie:switch(e=e.type,e){case B:case z:case W:case q:case Z:return e;default:switch(e=e&&e.$$typeof,e){case Mt:case P:case U:case V:case K:case D:return e;default:return r}}case ae:return r}}}p.ContextConsumer=P;p.ContextProvider=D;p.Element=ie;p.ForwardRef=U;p.Fragment=B;p.Lazy=V;p.Memo=K;p.Portal=ae;p.Profiler=z;p.StrictMode=W;p.Suspense=q;p.SuspenseList=Z;p.isAsyncMode=function(){return!1};p.isConcurrentMode=function(){return!1};p.isContextConsumer=function(e){return L(e)===P};p.isContextProvider=function(e){return L(e)===D};p.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ie};p.isForwardRef=function(e){return L(e)===U};p.isFragment=function(e){return L(e)===B};p.isLazy=function(e){return L(e)===V};p.isMemo=function(e){return L(e)===K};p.isPortal=function(e){return L(e)===ae};p.isProfiler=function(e){return L(e)===z};p.isStrictMode=function(e){return L(e)===W};p.isSuspense=function(e){return L(e)===q};p.isSuspenseList=function(e){return L(e)===Z};p.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===B||e===z||e===W||e===q||e===Z||e===Tt||typeof e=="object"&&e!==null&&(e.$$typeof===V||e.$$typeof===K||e.$$typeof===D||e.$$typeof===P||e.$$typeof===U||e.$$typeof===ke||e.getModuleId!==void 0)};p.typeOf=L;Le.exports=p;function Rt(e,r){let t=0;function i(s){E.Children.forEach(s,c=>{Le.exports.isFragment(c)?i(c.props.children):(r(c,t),t+=1)})}i(e)}const x="adm-tabs",Nt=()=>null,jt={activeLineMode:"auto",stretch:!0},Bt=e=>{var r;const t=ge(jt,e),i=l.exports.useRef(null),s=l.exports.useRef(null),c={};let v=null;const a=[];Rt(t.children,(f,h)=>{if(!E.isValidElement(f))return;const m=f.key;if(typeof m!="string")return;h===0&&(v=m);const w=a.push(f);c[m]=w-1});const[d,y]=xe({value:t.activeKey,defaultValue:(r=t.defaultActiveKey)!==null&&r!==void 0?r:v,onChange:f=>{var h;f!==null&&((h=t.onChange)===null||h===void 0||h.call(t,f))}}),[{x:o,width:b},C]=Q(()=>({x:0,width:0,config:{tension:300,clamp:!0}})),[{scrollLeft:n},u]=Q(()=>({scrollLeft:0,config:{tension:300,clamp:!0}})),[{leftMaskOpacity:_,rightMaskOpacity:F},O]=Q(()=>({leftMaskOpacity:0,rightMaskOpacity:0,config:{clamp:!0}}));function S(f=!1){const h=i.current;if(!h)return;const m=c[d];if(m===void 0){C.start({x:0,width:0,immediate:!0});return}const w=s.current;if(!w)return;const k=h.children.item(m+1),$=k.children.item(0),X=$.offsetLeft,G=$.offsetWidth,_e=k.offsetLeft,Fe=k.offsetWidth,H=h.offsetWidth,se=h.scrollWidth,Ee=h.scrollLeft,Se=w.offsetWidth;let M=0,J=0;if(t.activeLineMode==="auto"?(M=X,J=G):t.activeLineMode==="full"?(M=_e,J=Fe):M=X+(G-Se)/2,C.start({x:M,width:J,immediate:f}),se-H<=0)return;const Oe=ve(X-(H-G)/2,0,se-H);u.start({scrollLeft:Oe,from:{scrollLeft:Ee},immediate:f})}j(()=>{S(!o.isAnimating)},[]),je(()=>{S()},[d]),At(()=>{S(!o.isAnimating)},i),It(()=>{S(!o.isAnimating)},i,{subtree:!0,childList:!0,characterData:!0});const{run:I}=Ft((f=!1)=>{const h=i.current;if(!h)return;const m=h.scrollLeft,w=m>0,k=m+h.offsetWidth<h.scrollWidth;O.start({leftMaskOpacity:w?1:0,rightMaskOpacity:k?1:0,immediate:f})},{wait:100,trailing:!0,leading:!0});return j(()=>{I(!0)},[]),te(t,E.createElement("div",{className:x},E.createElement("div",{className:`${x}-header`},E.createElement(T.div,{className:A(`${x}-header-mask`,`${x}-header-mask-left`),style:{opacity:_}}),E.createElement(T.div,{className:A(`${x}-header-mask`,`${x}-header-mask-right`),style:{opacity:F}}),E.createElement(T.div,{className:`${x}-tab-list`,ref:i,scrollLeft:n,onScroll:I,role:"tablist"},E.createElement(T.div,{ref:s,className:`${x}-tab-line`,style:{width:t.activeLineMode==="fixed"?"var(--fixed-active-line-width, 30px)":b,x:o}}),a.map(f=>te(f.props,g("div",{className:A(`${x}-tab-wrapper`,{[`${x}-tab-wrapper-stretch`]:t.stretch}),children:g("div",{onClick:()=>{const{key:h}=f;f.props.disabled||h!=null&&y(h.toString())},className:A(`${x}-tab`,{[`${x}-tab-active`]:f.key===d,[`${x}-tab-disabled`]:f.props.disabled}),role:"tab","aria-selected":f.key===d,children:f.props.title})},f.key))))),a.map(f=>{if(f.props.children===void 0)return null;const h=f.key===d;return g(Be,{active:h,forceRender:f.props.forceRender,destroyOnClose:f.props.destroyOnClose,children:g("div",{className:`${x}-content`,style:{display:h?"block":"none"},children:f.props.children})},f.key)})))};var ee=We(Bt,{Tab:Nt});const R="adm-input",Wt={defaultValue:"",onlyShowClearWhenFocus:!0},zt=l.exports.forwardRef((e,r)=>{const t=ge(Wt,e),[i,s]=xe(t),[c,v]=l.exports.useState(!1),a=l.exports.useRef(!1),d=l.exports.useRef(null),{locale:y}=ze();l.exports.useImperativeHandle(r,()=>({clear:()=>{s("")},focus:()=>{var n;(n=d.current)===null||n===void 0||n.focus()},blur:()=>{var n;(n=d.current)===null||n===void 0||n.blur()},get nativeElement(){return d.current}}));const o=n=>{var u;t.onEnterPress&&(n.code==="Enter"||n.keyCode===13)&&t.onEnterPress(n),(u=t.onKeyDown)===null||u===void 0||u.call(t,n)};j(()=>{var n;if(!!t.enterKeyHint)return(n=d.current)===null||n===void 0||n.setAttribute("enterkeyhint",t.enterKeyHint),()=>{var u;(u=d.current)===null||u===void 0||u.removeAttribute("enterkeyhint")}},[t.enterKeyHint]);function b(){let n=i;t.type==="number"&&(n=n&&ve(parseFloat(n),t.min,t.max).toString()),n!==i&&s(n)}const C=(()=>!t.clearable||!i||t.readOnly?!1:t.onlyShowClearWhenFocus?c:!0)();return te(t,N("div",{className:A(`${R}`,t.disabled&&`${R}-disabled`),children:[g("input",{ref:d,className:`${R}-element`,value:i,onChange:n=>{s(n.target.value)},onFocus:n=>{var u;v(!0),(u=t.onFocus)===null||u===void 0||u.call(t,n)},onBlur:n=>{var u;v(!1),b(),(u=t.onBlur)===null||u===void 0||u.call(t,n)},id:t.id,placeholder:t.placeholder,disabled:t.disabled,readOnly:t.readOnly,maxLength:t.maxLength,minLength:t.minLength,max:t.max,min:t.min,autoComplete:t.autoComplete,autoFocus:t.autoFocus,pattern:t.pattern,inputMode:t.inputMode,type:t.type,name:t.name,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:o,onKeyUp:t.onKeyUp,onCompositionStart:n=>{var u;a.current=!0,(u=t.onCompositionStart)===null||u===void 0||u.call(t,n)},onCompositionEnd:n=>{var u;a.current=!1,(u=t.onCompositionEnd)===null||u===void 0||u.call(t,n)},onClick:t.onClick,step:t.step,role:t.role,"aria-valuenow":t["aria-valuenow"],"aria-valuemax":t["aria-valuemax"],"aria-valuemin":t["aria-valuemin"],"aria-label":t["aria-label"]}),C&&g("div",{className:`${R}-clear`,onMouseDown:n=>{n.preventDefault()},onClick:()=>{var n,u;s(""),(n=t.onClear)===null||n===void 0||n.call(t),De()&&a.current&&(a.current=!1,(u=d.current)===null||u===void 0||u.blur())},"aria-label":y.Input.clear,children:g(Ot,{})})]}))});var Dt=zt;function ue(e){const{messages:r}=e;return g(fe,{children:g("div",{className:"chat-container",children:r&&r.map(t=>g("div",{className:t.type==="0"?"chat-container-msg-content-right":"chat-container-msg-content-left",children:g("div",{className:"chat-container-msg",children:t.value})}))})})}const Pt=e=>{let r={url:be.searchURL,data:{engine:"baidu",q:e,api_key:"83df36ff90429072fcd39b47811df999a8ed942f4f2492225fe6a7f494a07935"}};return ye.get(r)},Ut=e=>{let r={url:`${be.itemFilterURL}/output-images/`,data:{populate:"images",["filters[item_id][$eq]"]:e},header:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjgwNDU1MTk2LCJleHAiOjE2ODMwNDcxOTZ9.aGgsBDn8uo5pxqINwms6doMU_EfF9rzkm96ZUsXuy0M"}};return ye.get(r)},qt="A young lady is wearing a beige knit sweater, a black shirt, black suit pants and a black blazer for a professional yet soft look.",Zt="\u8FD9\u5957\u642D\u914D\u5145\u5206\u8003\u8651\u5230\u4E86\u5929\u6C14\u3001\u6E29\u5EA6\u3001\u5DE5\u4F5C\u573A\u666F\u548C\u67D4\u548C\u98CE\u683C\uFF0C\u5C55\u73B0\u4E86\u4F60\u7684\u4E2A\u6027\u548C\u54C1\u5473\u3002\u7C73\u8272\u9488\u7EC7\u6BDB\u8863\u5916\u642D\u767D\u8272\u886C\u886B\uFF0C\u6253\u9020\u6E29\u99A8\u67D4\u548C\u7684\u611F\u89C9\uFF0C\u540C\u65F6\u642D\u914D\u9ED1\u8272\u9AD8\u8170\u5BBD\u817F\u88E4\uFF0C\u5C55\u73B0\u804C\u573A\u4F18\u96C5\u6C14\u8D28\u3002\u5916\u642D\u4E00\u4EF6\u9ED1\u8272\u897F\u88C5\u5916\u5957\uFF0C\u4F7F\u6574\u4F53\u9020\u578B\u66F4\u52A0\u804C\u573A\u6B63\u5F0F\uFF0C\u53C8\u4E0D\u5931\u67D4\u548C\u98CE\u683C\u3002";var de={description:qt,explanation:Zt,"item in the closet":[{id:"white-t-shirt",item:"Beige knit sweater"},{id:"white-t-shirt",item:"Black blazer"}],"item not in the closet":["black shirt","black suit pants"]};function Kt(){const[e,r]=l.exports.useState([]),t=()=>new Promise((s,c)=>{const v=de["item in the closet"].map(a=>Ut(a==null?void 0:a.id));Promise.all(v).then(a=>{const d=a.map(y=>{var C,n,u,_;const o=y==null?void 0:y.data[0],b={id:o==null?void 0:o.id,url:((_=(u=(n=(C=o==null?void 0:o.attributes)==null?void 0:C.images)==null?void 0:n.data[0])==null?void 0:u.attributes)==null?void 0:_.url)||"",from:"closet",link:""};return b.url=`http://106.52.238.44:8080${b.url}`,b});s(d)}).catch(a=>c(a))}),i=()=>{const s=de["item not in the closet"].map(c=>Pt(c));return new Promise((c,v)=>{Promise.all(s).then(a=>{const d=[];a.forEach(y=>{var b,C,n,u,_;const o=y==null?void 0:y.organic_results[2];if(o){if(o!=null&&o.related_images){const F={id:((C=(b=o==null?void 0:o.related_images)==null?void 0:b[0])==null?void 0:C.link)||"",url:((u=(n=o==null?void 0:o.related_images)==null?void 0:n[0])==null?void 0:u.image)||"",from:"not closet",link:((_=o==null?void 0:o.related_images[0])==null?void 0:_.link)||""};d.push(F)}else if(o!=null&&o.thumbnail){const F={id:(o==null?void 0:o.link)||"",url:(o==null?void 0:o.thumbnail)||"",from:"not closet",link:(o==null?void 0:o.link)||""};d.push(F)}}}),c(d)}).catch(a=>v(a))})};return l.exports.useEffect(()=>{(async()=>{const c=await t(),v=await i();r([...e,...c,...v])})()},[]),g(fe,{children:g("div",{className:"search-container",children:g("div",{className:"search-container-image",children:g(Ce,{wrap:!0,children:e.map(s=>g(Pe,{src:s.url},s.id))})})})})}const Vt=e=>{let r={url:"https://wef4y-stable-diffusion-webui-controlnet-docker.hf.space/sdapi/v1/txt2img",data:{prompt:"(8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.37),(Kpop idol), (aegyo sal:1), cute, professional lighting, photon mapping, radiosity, physically-based rendering, <lora:liyuuLora_liyuuV1:1>, standing,(simple white background:1.3),Fujifilm XT3,"+e,enable_hr:!1,denoising_strength:.7,firstphase_width:0,firstphase_height:0,hr_scale:2,hr_upscaler:"",hr_second_pass_steps:0,hr_resize_x:0,hr_resize_y:0,styles:[],seed:-1,subseed:-1,subseed_strength:0,seed_resize_from_h:-1,seed_resize_from_w:-1,sampler_name:"DPM++ SDE Karras",batch_size:1,n_iter:1,steps:24,cfg_scale:8,width:512,height:768,restore_faces:!1,tiling:!1,negative_prompt:"paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, lowres,bad anatomy,bad hands, text, error, missing fingers,extra digit, fewer digits, cropped, worstquality, low quality, normal quality,jpegartifacts,signature, watermark, username,blurry,bad feet,cropped,poorly drawn hands,poorly drawn face,mutation,deformed,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,extra fingers,fewer digits,extra limbs,extra arms,extra legs,malformed limbs,fused fingers,too many fingers,long neck,cross-eyed,mutated hands,polar lowres,bad body,bad proportions,gross proportions,text,error,missing fingers,missing arms,missing legs,extra digit,wrinkle, NSFW, nude",eta:0,s_churn:0,s_tmax:0,s_tmin:0,s_noise:1,override_settings:{},override_settings_restore_afterwards:!0,script_args:[],sampler_index:"DPM++ SDE Karras"},header:{Authorization:"Bearer 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"}};return we.post(r.url,r.data,{timeout:3e7,headers:{"Content-Type":"application/json;charset=UTF-8","with-credentials":!0,...r.header}})},Xt=e=>{const r={url:"https://wef4y-chat-js-server.hf.space/api/chat",data:{input:e},header:{Authorization:"Bearer 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"}};return we.post(r.url,r.data,{timeout:3e7,headers:{"Content-Type":"application/json;charset=UTF-8","with-credentials":!0,...r.header}})};var Gt="./assets/defaultImage.6ddd0d30.png";function Ht(e){const[r,t]=l.exports.useState(Gt),[i,s]=l.exports.useState(!1),[c,v]=l.exports.useState(""),[a,d]=l.exports.useState([]),[y,o]=l.exports.useState(!0),b=()=>{c!==""&&(d(C=>[...C,{type:"0",value:c}]),v(""),Xt(c).then(C=>{setTimeout(()=>{d(n=>{var u;return[...n,{type:"1",value:((u=C.data)==null?void 0:u.response)||""}]})},30)}))};return l.exports.useEffect(()=>{Vt("A young lady is wearing a white button-down shirt, a black midi skirt, light brown pumps, and a beige trench coat for a professional and elegant look.").then(C=>{C&&t("data:image/png;base64,"+C.data.images[0])})},[]),N("div",{className:"home",style:{backgroundImage:`url(${r})`},children:[g(Et,{fontSize:32,onClick:()=>s(!i)}),!i&&N(ee,{onChange:C=>{o(C==="chat")},children:[g(ee.Tab,{title:"\u7A7F\u642D",children:g(ue,{messages:a})},"chat"),g(ee.Tab,{title:"\u5355\u54C1",children:g(Kt,{})},"recommend")]}),i&&y&&g(ue,{messages:a}),y&&g("div",{className:"chat-container-input",children:N(Ce,{children:[g(St,{fontSize:24}),g(Dt,{placeholder:"\u8F93\u5165\u6587\u5B57",value:c,onChange:C=>{v(C)},onEnterPress:b}),g(Ue,{onClick:b,children:g($t,{fontSize:24})})]})})]})}var rr=$e(Ht);export{rr as default};
|