diff --git "a/assets/index-YJz65A8p.js" "b/assets/index-YJz65A8p.js" new file mode 100644--- /dev/null +++ "b/assets/index-YJz65A8p.js" @@ -0,0 +1,271 @@ +function Ic(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rc={exports:{}},Fa={},Dc={exports:{}},K={};/** + * @license React + * react.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 Ei=Symbol.for("react.element"),gm=Symbol.for("react.portal"),ym=Symbol.for("react.fragment"),vm=Symbol.for("react.strict_mode"),wm=Symbol.for("react.profiler"),xm=Symbol.for("react.provider"),Sm=Symbol.for("react.context"),km=Symbol.for("react.forward_ref"),bm=Symbol.for("react.suspense"),Em=Symbol.for("react.memo"),Cm=Symbol.for("react.lazy"),Zl=Symbol.iterator;function _m(e){return e===null||typeof e!="object"?null:(e=Zl&&e[Zl]||e["@@iterator"],typeof e=="function"?e:null)}var Lc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oc=Object.assign,Nc={};function br(e,t,n){this.props=e,this.context=t,this.refs=Nc,this.updater=n||Lc}br.prototype.isReactComponent={};br.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mc(){}Mc.prototype=br.prototype;function zs(e,t,n){this.props=e,this.context=t,this.refs=Nc,this.updater=n||Lc}var Us=zs.prototype=new Mc;Us.constructor=zs;Oc(Us,br.prototype);Us.isPureReactComponent=!0;var eu=Array.isArray,Fc=Object.prototype.hasOwnProperty,$s={current:null},zc={key:!0,ref:!0,__self:!0,__source:!0};function Uc(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)Fc.call(t,r)&&!zc.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,ae=R[X];if(0>>1;Xi(mt,q))Uei(qt,mt)?(R[X]=qt,R[Ue]=q,X=Ue):(R[X]=mt,R[Ie]=q,X=Ie);else if(Uei(qt,q))R[X]=qt,R[Ue]=q,X=Ue;else break e}}return $}function i(R,$){var q=R.sortIndex-$.sortIndex;return q!==0?q:R.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],d=1,c=null,g=3,v=!1,S=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(R){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=R)r(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(u)}}function C(R){if(k=!1,y(R),!S)if(n(l)!==null)S=!0,Bt(T);else{var $=n(u);$!==null&&le(C,$.startTime-R)}}function T(R,$){S=!1,k&&(k=!1,h(I),I=-1),v=!0;var q=g;try{for(y($),c=n(l);c!==null&&(!(c.expirationTime>$)||R&&!J());){var X=c.callback;if(typeof X=="function"){c.callback=null,g=c.priorityLevel;var ae=X(c.expirationTime<=$);$=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===n(l)&&r(l),y($)}else r(l);c=n(l)}if(c!==null)var bt=!0;else{var Ie=n(u);Ie!==null&&le(C,Ie.startTime-$),bt=!1}return bt}finally{c=null,g=q,v=!1}}var w=!1,A=null,I=-1,O=5,z=-1;function J(){return!(e.unstable_now()-zR||125X?(R.sortIndex=q,t(u,R),n(l)===null&&R===n(u)&&(k?(h(I),I=-1):k=!0,le(C,q-X))):(R.sortIndex=ae,t(l,R),S||v||(S=!0,Bt(T))),R},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(R){var $=g;return function(){var q=g;g=$;try{return R.apply(this,arguments)}finally{g=q}}}})(Vc);qc.exports=Vc;var zm=qc.exports;/** + * @license React + * react-dom.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 Hc=p,nt=zm;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Uo=Object.prototype.hasOwnProperty,Um=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nu={},ru={};function $m(e){return Uo.call(ru,e)?!0:Uo.call(nu,e)?!1:Um.test(e)?ru[e]=!0:(nu[e]=!0,!1)}function Bm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qm(e,t,n,r){if(t===null||typeof t>"u"||Bm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ve(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Ve(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Le[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var qs=/[\-:]([a-z])/g;function Vs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qs,Vs);Le[t]=new Ve(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qs,Vs);Le[t]=new Ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qs,Vs);Le[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hs(e,t,n,r){var i=Le.hasOwnProperty(t)?Le[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{fo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qr(e):""}function Vm(e){switch(e.tag){case 5:return qr(e.type);case 16:return qr("Lazy");case 13:return qr("Suspense");case 19:return qr("SuspenseList");case 0:case 2:case 15:return e=po(e.type,!1),e;case 11:return e=po(e.type.render,!1),e;case 1:return e=po(e.type,!0),e;default:return""}}function Vo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kn:return"Fragment";case Wn:return"Portal";case $o:return"Profiler";case Qs:return"StrictMode";case Bo:return"Suspense";case qo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Kc:return(e.displayName||"Context")+".Consumer";case Wc:return(e._context.displayName||"Context")+".Provider";case Ws:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ks:return t=e.displayName||null,t!==null?t:Vo(e.type)||"Memo";case Xt:t=e._payload,e=e._init;try{return Vo(e(t))}catch{}}return null}function Hm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vo(t);case 8:return t===Qs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qm(e){var t=Yc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fi(e){e._valueTracker||(e._valueTracker=Qm(e))}function Jc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ho(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function au(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xc(e,t){t=t.checked,t!=null&&Hs(e,"checked",t,!1)}function Qo(e,t){Xc(e,t);var n=pn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Wo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wo(e,t.type,pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ou(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Wo(e,t,n){(t!=="number"||pa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vr=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=zi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ai(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wm=["Webkit","ms","Moz","O"];Object.keys(Kr).forEach(function(e){Wm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kr[t]=Kr[e]})});function nd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kr.hasOwnProperty(e)&&Kr[e]?(""+t).trim():t+"px"}function rd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=nd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Km=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yo(e,t){if(t){if(Km[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Jo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xo=null;function Gs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zo=null,dr=null,fr=null;function uu(e){if(e=Ai(e)){if(typeof Zo!="function")throw Error(j(280));var t=e.stateNode;t&&(t=qa(t),Zo(e.stateNode,e.type,t))}}function id(e){dr?fr?fr.push(e):fr=[e]:dr=e}function ad(){if(dr){var e=dr,t=fr;if(fr=dr=null,uu(e),t)for(e=0;e>>=0,e===0?32:31-(ah(e)/oh|0)|0}var Ui=64,$i=4194304;function Hr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ya(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Hr(s):(a&=o,a!==0&&(r=Hr(a)))}else o=n&~i,o!==0?r=Hr(o):a!==0&&(r=Hr(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ci(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xt(t),e[t]=n}function ch(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Yr),vu=" ",wu=!1;function Cd(e,t){switch(e){case"keyup":return Fh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _d(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function Uh(e,t){switch(e){case"compositionend":return _d(t);case"keypress":return t.which!==32?null:(wu=!0,vu);case"textInput":return e=t.data,e===vu&&wu?null:e;default:return null}}function $h(e,t){if(Gn)return e==="compositionend"||!rl&&Cd(e,t)?(e=bd(),ia=el=nn=null,Gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bu(n)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pd(){for(var e=window,t=pa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pa(e.document)}return t}function il(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yh(e){var t=Pd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Id(n.ownerDocument.documentElement,n)){if(r!==null&&il(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Eu(n,a);var o=Eu(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Yn=null,as=null,Xr=null,os=!1;function Cu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||Yn==null||Yn!==pa(r)||(r=Yn,"selectionStart"in r&&il(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&di(Xr,r)||(Xr=r,r=xa(as,"onSelect"),0Zn||(e.current=fs[Zn],fs[Zn]=null,Zn--)}function ie(e,t){Zn++,fs[Zn]=e.current,e.current=t}var mn={},ze=yn(mn),We=yn(!1),Rn=mn;function yr(e,t){var n=e.type.contextTypes;if(!n)return mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ke(e){return e=e.childContextTypes,e!=null}function ka(){se(We),se(ze)}function Ru(e,t,n){if(ze.current!==mn)throw Error(j(168));ie(ze,t),ie(We,n)}function Ud(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(j(108,Hm(e)||"Unknown",i));return pe({},n,r)}function ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,Rn=ze.current,ie(ze,e),ie(We,We.current),!0}function Du(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Ud(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,se(We),se(ze),ie(ze,e)):se(We),ie(We,n)}var Rt=null,Va=!1,Ao=!1;function $d(e){Rt===null?Rt=[e]:Rt.push(e)}function lg(e){Va=!0,$d(e)}function vn(){if(!Ao&&Rt!==null){Ao=!0;var e=0,t=Z;try{var n=Rt;for(Z=1;e>=o,i-=o,Dt=1<<32-xt(t)+i|n<I?(O=A,A=null):O=A.sibling;var z=g(h,A,y[I],C);if(z===null){A===null&&(A=O);break}e&&A&&z.alternate===null&&t(h,A),m=a(z,m,I),w===null?T=z:w.sibling=z,w=z,A=O}if(I===y.length)return n(h,A),ce&&bn(h,I),T;if(A===null){for(;II?(O=A,A=null):O=A.sibling;var J=g(h,A,z.value,C);if(J===null){A===null&&(A=O);break}e&&A&&J.alternate===null&&t(h,A),m=a(J,m,I),w===null?T=J:w.sibling=J,w=J,A=O}if(z.done)return n(h,A),ce&&bn(h,I),T;if(A===null){for(;!z.done;I++,z=y.next())z=c(h,z.value,C),z!==null&&(m=a(z,m,I),w===null?T=z:w.sibling=z,w=z);return ce&&bn(h,I),T}for(A=r(h,A);!z.done;I++,z=y.next())z=v(A,h,I,z.value,C),z!==null&&(e&&z.alternate!==null&&A.delete(z.key===null?I:z.key),m=a(z,m,I),w===null?T=z:w.sibling=z,w=z);return e&&A.forEach(function(ke){return t(h,ke)}),ce&&bn(h,I),T}function _(h,m,y,C){if(typeof y=="object"&&y!==null&&y.type===Kn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Mi:e:{for(var T=y.key,w=m;w!==null;){if(w.key===T){if(T=y.type,T===Kn){if(w.tag===7){n(h,w.sibling),m=i(w,y.props.children),m.return=h,h=m;break e}}else if(w.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Xt&&Uu(T)===w.type){n(h,w.sibling),m=i(w,y.props),m.ref=Or(h,w,y),m.return=h,h=m;break e}n(h,w);break}else t(h,w);w=w.sibling}y.type===Kn?(m=Pn(y.props.children,h.mode,C,y.key),m.return=h,h=m):(C=fa(y.type,y.key,y.props,null,h.mode,C),C.ref=Or(h,m,y),C.return=h,h=C)}return o(h);case Wn:e:{for(w=y.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Oo(y,h.mode,C),m.return=h,h=m}return o(h);case Xt:return w=y._init,_(h,m,w(y._payload),C)}if(Vr(y))return S(h,m,y,C);if(Ir(y))return k(h,m,y,C);Ki(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=Lo(y,h.mode,C),m.return=h,h=m),o(h)):n(h,m)}return _}var wr=Gd(!0),Yd=Gd(!1),ji={},Tt=yn(ji),hi=yn(ji),gi=yn(ji);function An(e){if(e===ji)throw Error(j(174));return e}function pl(e,t){switch(ie(gi,t),ie(hi,e),ie(Tt,ji),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Go(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Go(t,e)}se(Tt),ie(Tt,t)}function xr(){se(Tt),se(hi),se(gi)}function Jd(e){An(gi.current);var t=An(Tt.current),n=Go(t,e.type);t!==n&&(ie(hi,e),ie(Tt,n))}function ml(e){hi.current===e&&(se(Tt),se(hi))}var de=yn(0);function Ta(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=[];function hl(){for(var e=0;en?n:4,e(!0);var r=To.transition;To.transition={};try{e(!1),t()}finally{Z=n,To.transition=r}}function mf(){return pt().memoizedState}function fg(e,t,n){var r=dn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hf(e))gf(t,n);else if(n=Hd(e,t,n,r),n!==null){var i=Be();St(n,e,r,i),yf(n,t,r)}}function pg(e,t,n){var r=dn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hf(e))gf(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,kt(s,o)){var l=t.interleaved;l===null?(i.next=i,dl(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Hd(e,t,i,r),n!==null&&(i=Be(),St(n,e,r,i),yf(n,t,r))}}function hf(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function gf(e,t){Zr=Ia=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Js(e,n)}}var Pa={readContext:ft,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},mg={readContext:ft,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Bu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,la(4194308,4,uf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return la(4194308,4,e,t)},useInsertionEffect:function(e,t){return la(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fg.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:$u,useDebugValue:xl,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=$u(!1),t=e[0];return e=dg.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,i=_t();if(ce){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Te===null)throw Error(j(349));Ln&30||ef(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Bu(nf.bind(null,r,a,e),[e]),r.flags|=2048,wi(9,tf.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=_t(),t=Te.identifierPrefix;if(ce){var n=Lt,r=Dt;n=(r&~(1<<32-xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[At]=t,e[mi]=r,_f(e,t,!1,!1),t.stateNode=e;e:{switch(o=Jo(n,r),n){case"dialog":oe("cancel",e),oe("close",e),i=r;break;case"iframe":case"object":case"embed":oe("load",e),i=r;break;case"video":case"audio":for(i=0;ikr&&(t.flags|=128,r=!0,Nr(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ta(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ce)return Ne(t),null}else 2*ve()-a.renderingStartTime>kr&&n!==1073741824&&(t.flags|=128,r=!0,Nr(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ve(),t.sibling=null,n=de.current,ie(de,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return _l(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function kg(e,t){switch(ol(t),t.tag){case 1:return Ke(t.type)&&ka(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(),se(We),se(ze),hl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ml(t),null;case 13:if(se(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(de),null;case 4:return xr(),null;case 10:return cl(t.type._context),null;case 22:case 23:return _l(),null;case 24:return null;default:return null}}var Yi=!1,Fe=!1,bg=typeof WeakSet=="function"?WeakSet:Set,D=null;function rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Es(e,t,n){try{n()}catch(r){he(e,t,r)}}var Ju=!1;function Eg(e,t){if(ss=va,e=Pd(),il(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,u=0,d=0,c=e,g=null;t:for(;;){for(var v;c!==n||i!==0&&c.nodeType!==3||(s=o+i),c!==a||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(v=c.firstChild)!==null;)g=c,c=v;for(;;){if(c===e)break t;if(g===n&&++u===i&&(s=o),g===a&&++d===r&&(l=o),(v=c.nextSibling)!==null)break;c=g,g=c.parentNode}c=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ls={focusedElem:e,selectionRange:n},va=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,_=S.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?k:gt(t.type,k),_);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){he(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return S=Ju,Ju=!1,S}function ei(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Es(t,n,a)}i=i.next}while(i!==r)}}function Wa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Cs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Tf(e){var t=e.alternate;t!==null&&(e.alternate=null,Tf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[mi],delete t[ds],delete t[og],delete t[sg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function If(e){return e.tag===5||e.tag===3||e.tag===4}function Xu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||If(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _s(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Sa));else if(r!==4&&(e=e.child,e!==null))for(_s(e,t,n),e=e.sibling;e!==null;)_s(e,t,n),e=e.sibling}function As(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(As(e,t,n),e=e.sibling;e!==null;)As(e,t,n),e=e.sibling}var Re=null,yt=!1;function Wt(e,t,n){for(n=n.child;n!==null;)Pf(e,t,n),n=n.sibling}function Pf(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(za,n)}catch{}switch(n.tag){case 5:Fe||rr(n,t);case 6:var r=Re,i=yt;Re=null,Wt(e,t,n),Re=r,yt=i,Re!==null&&(yt?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(yt?(e=Re,n=n.stateNode,e.nodeType===8?_o(e.parentNode,n):e.nodeType===1&&_o(e,n),ui(e)):_o(Re,n.stateNode));break;case 4:r=Re,i=yt,Re=n.stateNode.containerInfo,yt=!0,Wt(e,t,n),Re=r,yt=i;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Es(n,t,o),i=i.next}while(i!==r)}Wt(e,t,n);break;case 1:if(!Fe&&(rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){he(n,t,s)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,Wt(e,t,n),Fe=r):Wt(e,t,n);break;default:Wt(e,t,n)}}function Zu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bg),t.forEach(function(r){var i=Dg.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_g(r/1960))-r,10e?16:e,rn===null)var r=!1;else{if(e=rn,rn=null,La=0,Y&6)throw Error(j(331));var i=Y;for(Y|=4,D=e.current;D!==null;){var a=D,o=a.child;if(D.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lve()-El?In(e,0):bl|=n),Ge(e,t)}function zf(e,t){t===0&&(e.mode&1?(t=$i,$i<<=1,!($i&130023424)&&($i=4194304)):t=1);var n=Be();e=zt(e,t),e!==null&&(Ci(e,t,n),Ge(e,n))}function Rg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zf(e,n)}function Dg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),zf(e,n)}var Uf;Uf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||We.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,xg(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,ce&&t.flags&1048576&&Bd(t,Ca,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ua(e,t),e=t.pendingProps;var i=yr(t,ze.current);mr(t,n),i=yl(null,t,r,e,i,n);var a=vl();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ke(r)?(a=!0,ba(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fl(t),i.updater=Ha,t.stateNode=i,i._reactInternals=t,ys(t,r,e,n),t=xs(null,t,r,!0,a,n)):(t.tag=0,ce&&a&&al(t),$e(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ua(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Og(r),e=gt(r,e),i){case 0:t=ws(null,t,r,e,n);break e;case 1:t=Ku(null,t,r,e,n);break e;case 11:t=Qu(null,t,r,e,n);break e;case 14:t=Wu(null,t,r,gt(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ws(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Ku(e,t,r,i,n);case 3:e:{if(bf(t),e===null)throw Error(j(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Qd(e,t),ja(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Sr(Error(j(423)),t),t=Gu(e,t,r,n,i);break e}else if(r!==i){i=Sr(Error(j(424)),t),t=Gu(e,t,r,n,i);break e}else for(et=ln(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,wt=null,n=Yd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vr(),r===i){t=Ut(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Jd(t),e===null&&ms(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,us(r,i)?o=null:a!==null&&us(r,a)&&(t.flags|=32),kf(e,t),$e(e,t,o,n),t.child;case 6:return e===null&&ms(t),null;case 13:return Ef(e,t,n);case 4:return pl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Qu(e,t,r,i,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,ie(_a,r._currentValue),r._currentValue=o,a!==null)if(kt(a.value,o)){if(a.children===i.children&&!We.current){t=Ut(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Ot(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),hs(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(j(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),hs(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$e(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mr(t,n),i=ft(i),r=r(i),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),Wu(e,t,r,i,n);case 15:return xf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ua(e,t),t.tag=1,Ke(r)?(e=!0,ba(t)):e=!1,mr(t,n),Kd(t,r,i),ys(t,r,i,n),xs(null,t,r,!0,e,n);case 19:return Cf(e,t,n);case 22:return Sf(e,t,n)}throw Error(j(156,t.tag))};function $f(e,t){return fd(e,t)}function Lg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new Lg(e,t,n,r)}function jl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Og(e){if(typeof e=="function")return jl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ws)return 11;if(e===Ks)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function fa(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")jl(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Kn:return Pn(n.children,i,a,t);case Qs:o=8,i|=8;break;case $o:return e=ct(12,n,t,i|2),e.elementType=$o,e.lanes=a,e;case Bo:return e=ct(13,n,t,i),e.elementType=Bo,e.lanes=a,e;case qo:return e=ct(19,n,t,i),e.elementType=qo,e.lanes=a,e;case Gc:return Ga(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wc:o=10;break e;case Kc:o=9;break e;case Ws:o=11;break e;case Ks:o=14;break e;case Xt:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ct(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Pn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Ga(e,t,n,r){return e=ct(22,e,r,t),e.elementType=Gc,e.lanes=n,e.stateNode={isHidden:!1},e}function Lo(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function Oo(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ng(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ho(0),this.expirationTimes=ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ho(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Tl(e,t,n,r,i,a,o,s,l){return e=new Ng(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ct(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fl(a),e}function Mg(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hf)}catch(e){console.error(e)}}Hf(),Bc.exports=rt;var Dl=Bc.exports;const Bg=Pc(Dl),qg=Ic({__proto__:null,default:Bg},[Dl]);var Qf,sc=Dl;Qf=sc.createRoot,sc.hydrateRoot;/** + * @remix-run/router v1.14.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Hg(){return Math.random().toString(36).substr(2,8)}function uc(e,t){return{usr:e.state,key:e.key,idx:t}}function Si(e,t,n,r){return n===void 0&&(n=null),ge({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?It(t):t,{state:n,key:t&&t.key||r||Hg()})}function Mn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function It(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Qg(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=ye.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(ge({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function c(){s=ye.Pop;let _=d(),h=_==null?null:_-u;u=_,l&&l({action:s,location:k.location,delta:h})}function g(_,h){s=ye.Push;let m=Si(k.location,_,h);n&&n(m,_),u=d()+1;let y=uc(m,u),C=k.createHref(m);try{o.pushState(y,"",C)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(C)}a&&l&&l({action:s,location:k.location,delta:1})}function v(_,h){s=ye.Replace;let m=Si(k.location,_,h);n&&n(m,_),u=d();let y=uc(m,u),C=k.createHref(m);o.replaceState(y,"",C),a&&l&&l({action:s,location:k.location,delta:0})}function S(_){let h=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof _=="string"?_:Mn(_);return Q(h,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,h)}let k={get action(){return s},get location(){return e(i,o)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(lc,c),l=_,()=>{i.removeEventListener(lc,c),l=null}},createHref(_){return t(i,_)},createURL:S,encodeLocation(_){let h=S(_);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:g,replace:v,go(_){return o.go(_)}};return k}var me;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(me||(me={}));const Wg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Kg(e){return e.index===!0}function Rs(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,a)=>{let o=[...n,a],s=typeof i.id=="string"?i.id:o.join("-");if(Q(i.index!==!0||!i.children,"Cannot specify children on an index route"),Q(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Kg(i)){let l=ge({},i,t(i),{id:s});return r[s]=l,l}else{let l=ge({},i,t(i),{id:s,children:void 0});return r[s]=l,i.children&&(l.children=Rs(i.children,t,o,r)),l}})}function ar(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?It(t):t,i=_r(r.pathname||"/",n);if(i==null)return null;let a=Wf(e);Yg(a);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Q(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Nt([r,l.relativePath]),d=n.concat(l);a.children&&a.children.length>0&&(Q(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Wf(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:ry(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of Kf(a.path))i(a,o,l)}),t}function Kf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=Kf(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Yg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:iy(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jg=/^:[\w-]+$/,Xg=3,Zg=2,ey=1,ty=10,ny=-2,cc=e=>e==="*";function ry(e,t){let n=e.split("/"),r=n.length;return n.some(cc)&&(r+=ny),t&&(r+=Zg),n.filter(i=>!cc(i)).reduce((i,a)=>i+(Jg.test(a)?Xg:a===""?ey:ty),r)}function iy(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function ay(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let o=0;o{let{paramName:g,isOptional:v}=d;if(g==="*"){let k=s[c]||"";o=a.slice(0,a.length-k.length).replace(/(.)\/+$/,"$1")}const S=s[c];return v&&!S?u[g]=void 0:u[g]=uy(S||"",g),u},{}),pathname:a,pathnameBase:o,pattern:e}}function sy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ly(e){try{return decodeURI(e)}catch(t){return hn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function uy(e,t){try{return decodeURIComponent(e)}catch(n){return hn(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function _r(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function cy(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?It(e):e;return{pathname:n?n.startsWith("/")?n:dy(n,t):t,search:py(r),hash:my(i)}}function dy(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function No(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Gf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ll(e,t){let n=Gf(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ol(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=It(e):(i=ge({},e),Q(!i.pathname||!i.pathname.includes("?"),No("?","pathname","search",i)),Q(!i.pathname||!i.pathname.includes("#"),No("#","pathname","hash",i)),Q(!i.search||!i.search.includes("#"),No("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let c=t.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),c-=1;i.pathname=g.join("/")}s=c>=0?t[c]:"/"}let l=cy(i,s),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Nt=e=>e.join("/").replace(/\/\/+/g,"/"),fy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),py=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,my=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Nl{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Yf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jf=["post","put","patch","delete"],hy=new Set(Jf),gy=["get",...Jf],yy=new Set(gy),vy=new Set([301,302,303,307,308]),wy=new Set([307,308]),Mo={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xy={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Fr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sy=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Zf="remix-router-transitions";function ky(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Q(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let x=e.detectErrorBoundary;i=b=>({hasErrorBoundary:x(b)})}else i=Sy;let a={},o=Rs(e.routes,i,void 0,a),s,l=e.basename||"/",u=ge({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),d=null,c=new Set,g=null,v=null,S=null,k=e.hydrationData!=null,_=ar(o,e.history.location,l),h=null;if(_==null){let x=st(404,{pathname:e.history.location.pathname}),{matches:b,route:E}=vc(o);_=b,h={[E.id]:x}}let m,y=_.some(x=>x.route.lazy),C=_.some(x=>x.route.loader);if(y)m=!1;else if(!C)m=!0;else if(u.v7_partialHydration){let x=e.hydrationData?e.hydrationData.loaderData:null,b=e.hydrationData?e.hydrationData.errors:null;m=_.every(E=>E.route.loader&&E.route.loader.hydrate!==!0&&(x&&x[E.route.id]!==void 0||b&&b[E.route.id]!==void 0))}else m=e.hydrationData!=null;let T,w={historyAction:e.history.action,location:e.history.location,matches:_,initialized:m,navigation:Mo,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||h,fetchers:new Map,blockers:new Map},A=ye.Pop,I=!1,O,z=!1,J=new Map,ke=null,xe=!1,at=!1,$n=[],Bt=[],le=new Map,R=0,$=-1,q=new Map,X=new Set,ae=new Map,bt=new Map,Ie=new Set,mt=new Map,Ue=new Map,qt=!1;function tm(){if(d=e.history.listen(x=>{let{action:b,location:E,delta:P}=x;if(qt){qt=!1;return}hn(Ue.size===0||P!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let L=Yl({currentLocation:w.location,nextLocation:E,historyAction:b});if(L&&P!=null){qt=!0,e.history.go(P*-1),Di(L,{state:"blocked",location:E,proceed(){Di(L,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),e.history.go(P)},reset(){let H=new Map(w.blockers);H.set(L,Fr),Ye({blockers:H})}});return}return Sn(b,E)}),n){Dy(t,J);let x=()=>Ly(t,J);t.addEventListener("pagehide",x),ke=()=>t.removeEventListener("pagehide",x)}return w.initialized||Sn(ye.Pop,w.location,{initialHydration:!0}),T}function nm(){d&&d(),ke&&ke(),c.clear(),O&&O.abort(),w.fetchers.forEach((x,b)=>Ri(b)),w.blockers.forEach((x,b)=>Gl(b))}function rm(x){return c.add(x),()=>c.delete(x)}function Ye(x,b){b===void 0&&(b={}),w=ge({},w,x);let E=[],P=[];u.v7_fetcherPersist&&w.fetchers.forEach((L,H)=>{L.state==="idle"&&(Ie.has(H)?P.push(H):E.push(H))}),[...c].forEach(L=>L(w,{deletedFetchers:P,unstable_viewTransitionOpts:b.viewTransitionOpts,unstable_flushSync:b.flushSync===!0})),u.v7_fetcherPersist&&(E.forEach(L=>w.fetchers.delete(L)),P.forEach(L=>Ri(L)))}function Ar(x,b,E){var P,L;let{flushSync:H}=E===void 0?{}:E,B=w.actionData!=null&&w.navigation.formMethod!=null&&vt(w.navigation.formMethod)&&w.navigation.state==="loading"&&((P=x.state)==null?void 0:P._isRedirect)!==!0,U;b.actionData?Object.keys(b.actionData).length>0?U=b.actionData:U=null:B?U=w.actionData:U=null;let M=b.loaderData?yc(w.loaderData,b.loaderData,b.matches||[],b.errors):w.loaderData,G=w.blockers;G.size>0&&(G=new Map(G),G.forEach((re,Pe)=>G.set(Pe,Fr)));let _e=I===!0||w.navigation.formMethod!=null&&vt(w.navigation.formMethod)&&((L=x.state)==null?void 0:L._isRedirect)!==!0;s&&(o=s,s=void 0),xe||A===ye.Pop||(A===ye.Push?e.history.push(x,x.state):A===ye.Replace&&e.history.replace(x,x.state));let V;if(A===ye.Pop){let re=J.get(w.location.pathname);re&&re.has(x.pathname)?V={currentLocation:w.location,nextLocation:x}:J.has(x.pathname)&&(V={currentLocation:x,nextLocation:w.location})}else if(z){let re=J.get(w.location.pathname);re?re.add(x.pathname):(re=new Set([x.pathname]),J.set(w.location.pathname,re)),V={currentLocation:w.location,nextLocation:x}}Ye(ge({},b,{actionData:U,loaderData:M,historyAction:A,location:x,initialized:!0,navigation:Mo,revalidation:"idle",restoreScrollPosition:Xl(x,b.matches||w.matches),preventScrollReset:_e,blockers:G}),{viewTransitionOpts:V,flushSync:H===!0}),A=ye.Pop,I=!1,z=!1,xe=!1,at=!1,$n=[],Bt=[]}async function ql(x,b){if(typeof x=="number"){e.history.go(x);return}let E=Ds(w.location,w.matches,l,u.v7_prependBasename,x,u.v7_relativeSplatPath,b==null?void 0:b.fromRouteId,b==null?void 0:b.relative),{path:P,submission:L,error:H}=dc(u.v7_normalizeFormMethod,!1,E,b),B=w.location,U=Si(w.location,P,b&&b.state);U=ge({},U,e.history.encodeLocation(U));let M=b&&b.replace!=null?b.replace:void 0,G=ye.Push;M===!0?G=ye.Replace:M===!1||L!=null&&vt(L.formMethod)&&L.formAction===w.location.pathname+w.location.search&&(G=ye.Replace);let _e=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,V=(b&&b.unstable_flushSync)===!0,re=Yl({currentLocation:B,nextLocation:U,historyAction:G});if(re){Di(re,{state:"blocked",location:U,proceed(){Di(re,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),ql(x,b)},reset(){let Pe=new Map(w.blockers);Pe.set(re,Fr),Ye({blockers:Pe})}});return}return await Sn(G,U,{submission:L,pendingError:H,preventScrollReset:_e,replace:b&&b.replace,enableViewTransition:b&&b.unstable_viewTransition,flushSync:V})}function im(){if(ro(),Ye({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Sn(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Sn(A||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Sn(x,b,E){O&&O.abort(),O=null,A=x,xe=(E&&E.startUninterruptedRevalidation)===!0,pm(w.location,w.matches),I=(E&&E.preventScrollReset)===!0,z=(E&&E.enableViewTransition)===!0;let P=s||o,L=E&&E.overrideNavigation,H=ar(P,b,l),B=(E&&E.flushSync)===!0;if(!H){let Pe=st(404,{pathname:b.pathname}),{matches:ot,route:Ae}=vc(P);io(),Ar(b,{matches:ot,loaderData:{},errors:{[Ae.id]:Pe}},{flushSync:B});return}if(w.initialized&&!at&&Ay(w.location,b)&&!(E&&E.submission&&vt(E.submission.formMethod))){Ar(b,{matches:H},{flushSync:B});return}O=new AbortController;let U=Ur(e.history,b,O.signal,E&&E.submission),M,G;if(E&&E.pendingError)G={[ri(H).route.id]:E.pendingError};else if(E&&E.submission&&vt(E.submission.formMethod)){let Pe=await am(U,b,E.submission,H,{replace:E.replace,flushSync:B});if(Pe.shortCircuited)return;M=Pe.pendingActionData,G=Pe.pendingActionError,L=Fo(b,E.submission),B=!1,U=new Request(U.url,{signal:U.signal})}let{shortCircuited:_e,loaderData:V,errors:re}=await om(U,b,H,L,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,B,M,G);_e||(O=null,Ar(b,ge({matches:H},M?{actionData:M}:{},{loaderData:V,errors:re})))}async function am(x,b,E,P,L){L===void 0&&(L={}),ro();let H=Py(b,E);Ye({navigation:H},{flushSync:L.flushSync===!0});let B,U=Os(P,b);if(!U.route.action&&!U.route.lazy)B={type:me.error,error:st(405,{method:x.method,pathname:b.pathname,routeId:U.route.id})};else if(B=await zr("action",x,U,P,a,i,l,u.v7_relativeSplatPath),x.signal.aborted)return{shortCircuited:!0};if(Tn(B)){let M;return L&&L.replace!=null?M=L.replace:M=B.location===w.location.pathname+w.location.search,await jr(w,B,{submission:E,replace:M}),{shortCircuited:!0}}if(or(B)){let M=ri(P,U.route.id);return(L&&L.replace)!==!0&&(A=ye.Push),{pendingActionData:{},pendingActionError:{[M.route.id]:B.error}}}if(jn(B))throw st(400,{type:"defer-action"});return{pendingActionData:{[U.route.id]:B.data}}}async function om(x,b,E,P,L,H,B,U,M,G,_e){let V=P||Fo(b,L),re=L||H||Sc(V),Pe=s||o,[ot,Ae]=fc(e.history,w,E,re,b,u.v7_partialHydration&&U===!0,at,$n,Bt,Ie,ae,X,Pe,l,G,_e);if(io(te=>!(E&&E.some(ue=>ue.route.id===te))||ot&&ot.some(ue=>ue.route.id===te)),$=++R,ot.length===0&&Ae.length===0){let te=Wl();return Ar(b,ge({matches:E,loaderData:{},errors:_e||null},G?{actionData:G}:{},te?{fetchers:new Map(w.fetchers)}:{}),{flushSync:M}),{shortCircuited:!0}}if(!xe&&(!u.v7_partialHydration||!U)){Ae.forEach(ue=>{let Et=w.fetchers.get(ue.key),Oi=$r(void 0,Et?Et.data:void 0);w.fetchers.set(ue.key,Oi)});let te=G||w.actionData;Ye(ge({navigation:V},te?Object.keys(te).length===0?{actionData:null}:{actionData:te}:{},Ae.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:M})}Ae.forEach(te=>{le.has(te.key)&&Ht(te.key),te.controller&&le.set(te.key,te.controller)});let Bn=()=>Ae.forEach(te=>Ht(te.key));O&&O.signal.addEventListener("abort",Bn);let{results:ao,loaderResults:qn,fetcherResults:Qt}=await Vl(w.matches,E,ot,Ae,x);if(x.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Bn),Ae.forEach(te=>le.delete(te.key));let kn=wc(ao);if(kn){if(kn.idx>=ot.length){let te=Ae[kn.idx-ot.length].key;X.add(te)}return await jr(w,kn.result,{replace:B}),{shortCircuited:!0}}let{loaderData:oo,errors:so}=gc(w,E,ot,qn,_e,Ae,Qt,mt);mt.forEach((te,ue)=>{te.subscribe(Et=>{(Et||te.done)&&mt.delete(ue)})});let lo=Wl(),Vn=Kl($),Li=lo||Vn||Ae.length>0;return ge({loaderData:oo,errors:so},Li?{fetchers:new Map(w.fetchers)}:{})}function sm(x,b,E,P){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");le.has(x)&&Ht(x);let L=(P&&P.unstable_flushSync)===!0,H=s||o,B=Ds(w.location,w.matches,l,u.v7_prependBasename,E,u.v7_relativeSplatPath,b,P==null?void 0:P.relative),U=ar(H,B,l);if(!U){Tr(x,b,st(404,{pathname:B}),{flushSync:L});return}let{path:M,submission:G,error:_e}=dc(u.v7_normalizeFormMethod,!0,B,P);if(_e){Tr(x,b,_e,{flushSync:L});return}let V=Os(U,M);if(I=(P&&P.preventScrollReset)===!0,G&&vt(G.formMethod)){lm(x,b,M,V,U,L,G);return}ae.set(x,{routeId:b,path:M}),um(x,b,M,V,U,L,G)}async function lm(x,b,E,P,L,H,B){if(ro(),ae.delete(x),!P.route.action&&!P.route.lazy){let ue=st(405,{method:B.formMethod,pathname:E,routeId:b});Tr(x,b,ue,{flushSync:H});return}let U=w.fetchers.get(x);Vt(x,Ry(B,U),{flushSync:H});let M=new AbortController,G=Ur(e.history,E,M.signal,B);le.set(x,M);let _e=R,V=await zr("action",G,P,L,a,i,l,u.v7_relativeSplatPath);if(G.signal.aborted){le.get(x)===M&&le.delete(x);return}if(u.v7_fetcherPersist&&Ie.has(x)){if(Tn(V)||or(V)){Vt(x,Kt(void 0));return}}else{if(Tn(V))if(le.delete(x),$>_e){Vt(x,Kt(void 0));return}else return X.add(x),Vt(x,$r(B)),jr(w,V,{fetcherSubmission:B});if(or(V)){Tr(x,b,V.error);return}}if(jn(V))throw st(400,{type:"defer-action"});let re=w.navigation.location||w.location,Pe=Ur(e.history,re,M.signal),ot=s||o,Ae=w.navigation.state!=="idle"?ar(ot,w.navigation.location,l):w.matches;Q(Ae,"Didn't find any matches after fetcher action");let Bn=++R;q.set(x,Bn);let ao=$r(B,V.data);w.fetchers.set(x,ao);let[qn,Qt]=fc(e.history,w,Ae,B,re,!1,at,$n,Bt,Ie,ae,X,ot,l,{[P.route.id]:V.data},void 0);Qt.filter(ue=>ue.key!==x).forEach(ue=>{let Et=ue.key,Oi=w.fetchers.get(Et),hm=$r(void 0,Oi?Oi.data:void 0);w.fetchers.set(Et,hm),le.has(Et)&&Ht(Et),ue.controller&&le.set(Et,ue.controller)}),Ye({fetchers:new Map(w.fetchers)});let kn=()=>Qt.forEach(ue=>Ht(ue.key));M.signal.addEventListener("abort",kn);let{results:oo,loaderResults:so,fetcherResults:lo}=await Vl(w.matches,Ae,qn,Qt,Pe);if(M.signal.aborted)return;M.signal.removeEventListener("abort",kn),q.delete(x),le.delete(x),Qt.forEach(ue=>le.delete(ue.key));let Vn=wc(oo);if(Vn){if(Vn.idx>=qn.length){let ue=Qt[Vn.idx-qn.length].key;X.add(ue)}return jr(w,Vn.result)}let{loaderData:Li,errors:te}=gc(w,w.matches,qn,so,void 0,Qt,lo,mt);if(w.fetchers.has(x)){let ue=Kt(V.data);w.fetchers.set(x,ue)}Kl(Bn),w.navigation.state==="loading"&&Bn>$?(Q(A,"Expected pending action"),O&&O.abort(),Ar(w.navigation.location,{matches:Ae,loaderData:Li,errors:te,fetchers:new Map(w.fetchers)})):(Ye({errors:te,loaderData:yc(w.loaderData,Li,Ae,te),fetchers:new Map(w.fetchers)}),at=!1)}async function um(x,b,E,P,L,H,B){let U=w.fetchers.get(x);Vt(x,$r(B,U?U.data:void 0),{flushSync:H});let M=new AbortController,G=Ur(e.history,E,M.signal);le.set(x,M);let _e=R,V=await zr("loader",G,P,L,a,i,l,u.v7_relativeSplatPath);if(jn(V)&&(V=await np(V,G.signal,!0)||V),le.get(x)===M&&le.delete(x),!G.signal.aborted){if(Ie.has(x)){Vt(x,Kt(void 0));return}if(Tn(V))if($>_e){Vt(x,Kt(void 0));return}else{X.add(x),await jr(w,V);return}if(or(V)){Tr(x,b,V.error);return}Q(!jn(V),"Unhandled fetcher deferred data"),Vt(x,Kt(V.data))}}async function jr(x,b,E){let{submission:P,fetcherSubmission:L,replace:H}=E===void 0?{}:E;b.revalidate&&(at=!0);let B=Si(x.location,b.location,{_isRedirect:!0});if(Q(B,"Expected a location on the redirect navigation"),n){let re=!1;if(b.reloadDocument)re=!0;else if(Xf.test(b.location)){const Pe=e.history.createURL(b.location);re=Pe.origin!==t.location.origin||_r(Pe.pathname,l)==null}if(re){H?t.location.replace(b.location):t.location.assign(b.location);return}}O=null;let U=H===!0?ye.Replace:ye.Push,{formMethod:M,formAction:G,formEncType:_e}=x.navigation;!P&&!L&&M&&G&&_e&&(P=Sc(x.navigation));let V=P||L;if(wy.has(b.status)&&V&&vt(V.formMethod))await Sn(U,B,{submission:ge({},V,{formAction:b.location}),preventScrollReset:I});else{let re=Fo(B,P);await Sn(U,B,{overrideNavigation:re,fetcherSubmission:L,preventScrollReset:I})}}async function Vl(x,b,E,P,L){let H=await Promise.all([...E.map(M=>zr("loader",L,M,b,a,i,l,u.v7_relativeSplatPath)),...P.map(M=>M.matches&&M.match&&M.controller?zr("loader",Ur(e.history,M.path,M.controller.signal),M.match,M.matches,a,i,l,u.v7_relativeSplatPath):{type:me.error,error:st(404,{pathname:M.path})})]),B=H.slice(0,E.length),U=H.slice(E.length);return await Promise.all([xc(x,E,B,B.map(()=>L.signal),!1,w.loaderData),xc(x,P.map(M=>M.match),U,P.map(M=>M.controller?M.controller.signal:null),!0)]),{results:H,loaderResults:B,fetcherResults:U}}function ro(){at=!0,$n.push(...io()),ae.forEach((x,b)=>{le.has(b)&&(Bt.push(b),Ht(b))})}function Vt(x,b,E){E===void 0&&(E={}),w.fetchers.set(x,b),Ye({fetchers:new Map(w.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Tr(x,b,E,P){P===void 0&&(P={});let L=ri(w.matches,b);Ri(x),Ye({errors:{[L.route.id]:E},fetchers:new Map(w.fetchers)},{flushSync:(P&&P.flushSync)===!0})}function Hl(x){return u.v7_fetcherPersist&&(bt.set(x,(bt.get(x)||0)+1),Ie.has(x)&&Ie.delete(x)),w.fetchers.get(x)||xy}function Ri(x){let b=w.fetchers.get(x);le.has(x)&&!(b&&b.state==="loading"&&q.has(x))&&Ht(x),ae.delete(x),q.delete(x),X.delete(x),Ie.delete(x),w.fetchers.delete(x)}function cm(x){if(u.v7_fetcherPersist){let b=(bt.get(x)||0)-1;b<=0?(bt.delete(x),Ie.add(x)):bt.set(x,b)}else Ri(x);Ye({fetchers:new Map(w.fetchers)})}function Ht(x){let b=le.get(x);Q(b,"Expected fetch controller: "+x),b.abort(),le.delete(x)}function Ql(x){for(let b of x){let E=Hl(b),P=Kt(E.data);w.fetchers.set(b,P)}}function Wl(){let x=[],b=!1;for(let E of X){let P=w.fetchers.get(E);Q(P,"Expected fetcher: "+E),P.state==="loading"&&(X.delete(E),x.push(E),b=!0)}return Ql(x),b}function Kl(x){let b=[];for(let[E,P]of q)if(P0}function dm(x,b){let E=w.blockers.get(x)||Fr;return Ue.get(x)!==b&&Ue.set(x,b),E}function Gl(x){w.blockers.delete(x),Ue.delete(x)}function Di(x,b){let E=w.blockers.get(x)||Fr;Q(E.state==="unblocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="blocked"||E.state==="blocked"&&b.state==="proceeding"||E.state==="blocked"&&b.state==="unblocked"||E.state==="proceeding"&&b.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+b.state);let P=new Map(w.blockers);P.set(x,b),Ye({blockers:P})}function Yl(x){let{currentLocation:b,nextLocation:E,historyAction:P}=x;if(Ue.size===0)return;Ue.size>1&&hn(!1,"A router only supports one blocker at a time");let L=Array.from(Ue.entries()),[H,B]=L[L.length-1],U=w.blockers.get(H);if(!(U&&U.state==="proceeding")&&B({currentLocation:b,nextLocation:E,historyAction:P}))return H}function io(x){let b=[];return mt.forEach((E,P)=>{(!x||x(P))&&(E.cancel(),b.push(P),mt.delete(P))}),b}function fm(x,b,E){if(g=x,S=b,v=E||null,!k&&w.navigation===Mo){k=!0;let P=Xl(w.location,w.matches);P!=null&&Ye({restoreScrollPosition:P})}return()=>{g=null,S=null,v=null}}function Jl(x,b){return v&&v(x,b.map(P=>Gg(P,w.loaderData)))||x.key}function pm(x,b){if(g&&S){let E=Jl(x,b);g[E]=S()}}function Xl(x,b){if(g){let E=Jl(x,b),P=g[E];if(typeof P=="number")return P}return null}function mm(x){a={},s=Rs(x,i,void 0,a)}return T={get basename(){return l},get future(){return u},get state(){return w},get routes(){return o},get window(){return t},initialize:tm,subscribe:rm,enableScrollRestoration:fm,navigate:ql,fetch:sm,revalidate:im,createHref:x=>e.history.createHref(x),encodeLocation:x=>e.history.encodeLocation(x),getFetcher:Hl,deleteFetcher:cm,dispose:nm,getBlocker:dm,deleteBlocker:Gl,_internalFetchControllers:le,_internalActiveDeferreds:mt,_internalSetRoutes:mm},T}function by(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ds(e,t,n,r,i,a,o,s){let l,u;if(o){l=[];for(let c of t)if(l.push(c),c.route.id===o){u=c;break}}else l=t,u=t[t.length-1];let d=Ol(i||".",Ll(l,a),_r(e.pathname,n)||e.pathname,s==="path");return i==null&&(d.search=e.search,d.hash=e.hash),(i==null||i===""||i===".")&&u&&u.route.index&&!Ml(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Nt([n,d.pathname])),Mn(d)}function dc(e,t,n,r){if(!r||!by(r))return{path:n};if(r.formMethod&&!Iy(r.formMethod))return{path:n,error:st(405,{method:r.formMethod})};let i=()=>({path:n,error:st(400,{type:"invalid-body"})}),a=r.formMethod||"get",o=e?a.toUpperCase():a.toLowerCase(),s=tp(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!vt(o))return i();let g=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,S)=>{let[k,_]=S;return""+v+k+"="+_+` +`},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:g}}}else if(r.formEncType==="application/json"){if(!vt(o))return i();try{let g=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:g,text:void 0}}}catch{return i()}}}Q(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=Ls(r.formData),u=r.formData;else if(r.body instanceof FormData)l=Ls(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=hc(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=hc(l)}catch{return i()}let d={formMethod:o,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(vt(d.formMethod))return{path:n,submission:d};let c=It(n);return t&&c.search&&Ml(c.search)&&l.append("index",""),c.search="?"+l,{path:Mn(c),submission:d}}function Ey(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function fc(e,t,n,r,i,a,o,s,l,u,d,c,g,v,S,k){let _=k?Object.values(k)[0]:S?Object.values(S)[0]:void 0,h=e.createURL(t.location),m=e.createURL(i),y=k?Object.keys(k)[0]:void 0,T=Ey(n,y).filter((A,I)=>{let{route:O}=A;if(O.lazy)return!0;if(O.loader==null)return!1;if(a)return O.loader.hydrate?!0:t.loaderData[O.id]===void 0&&(!t.errors||t.errors[O.id]===void 0);if(Cy(t.loaderData,t.matches[I],A)||s.some(ke=>ke===A.route.id))return!0;let z=t.matches[I],J=A;return pc(A,ge({currentUrl:h,currentParams:z.params,nextUrl:m,nextParams:J.params},r,{actionResult:_,defaultShouldRevalidate:o||h.pathname+h.search===m.pathname+m.search||h.search!==m.search||ep(z,J)}))}),w=[];return d.forEach((A,I)=>{if(a||!n.some(xe=>xe.route.id===A.routeId)||u.has(I))return;let O=ar(g,A.path,v);if(!O){w.push({key:I,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let z=t.fetchers.get(I),J=Os(O,A.path),ke=!1;c.has(I)?ke=!1:l.includes(I)?ke=!0:z&&z.state!=="idle"&&z.data===void 0?ke=o:ke=pc(J,ge({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:_,defaultShouldRevalidate:o})),ke&&w.push({key:I,routeId:A.routeId,path:A.path,matches:O,match:J,controller:new AbortController})}),[T,w]}function Cy(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function ep(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function pc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function mc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Q(i,"No route found in manifest");let a={};for(let o in r){let l=i[o]!==void 0&&o!=="hasErrorBoundary";hn(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!Wg.has(o)&&(a[o]=r[o])}Object.assign(i,a),Object.assign(i,ge({},t(i),{lazy:void 0}))}async function zr(e,t,n,r,i,a,o,s,l){l===void 0&&(l={});let u,d,c,g=k=>{let _,h=new Promise((m,y)=>_=y);return c=()=>_(),t.signal.addEventListener("abort",c),Promise.race([k({request:t,params:n.params,context:l.requestContext}),h])};try{let k=n.route[e];if(n.route.lazy)if(k){let _,h=await Promise.all([g(k).catch(m=>{_=m}),mc(n.route,a,i)]);if(_)throw _;d=h[0]}else if(await mc(n.route,a,i),k=n.route[e],k)d=await g(k);else if(e==="action"){let _=new URL(t.url),h=_.pathname+_.search;throw st(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:me.data,data:void 0};else if(k)d=await g(k);else{let _=new URL(t.url),h=_.pathname+_.search;throw st(404,{pathname:h})}Q(d!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(k){u=me.error,d=k}finally{c&&t.signal.removeEventListener("abort",c)}if(Ty(d)){let k=d.status;if(vy.has(k)){let h=d.headers.get("Location");if(Q(h,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xf.test(h))h=Ds(new URL(t.url),r.slice(0,r.indexOf(n)+1),o,!0,h,s);else if(!l.isStaticRequest){let m=new URL(t.url),y=h.startsWith("//")?new URL(m.protocol+h):new URL(h),C=_r(y.pathname,o)!=null;y.origin===m.origin&&C&&(h=y.pathname+y.search+y.hash)}if(l.isStaticRequest)throw d.headers.set("Location",h),d;return{type:me.redirect,status:k,location:h,revalidate:d.headers.get("X-Remix-Revalidate")!==null,reloadDocument:d.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:u===me.error?me.error:me.data,response:d};let _;try{let h=d.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?d.body==null?_=null:_=await d.json():_=await d.text()}catch(h){return{type:me.error,error:h}}return u===me.error?{type:u,error:new Nl(k,d.statusText,_),headers:d.headers}:{type:me.data,data:_,statusCode:d.status,headers:d.headers}}if(u===me.error)return{type:u,error:d};if(jy(d)){var v,S;return{type:me.deferred,deferredData:d,statusCode:(v=d.init)==null?void 0:v.status,headers:((S=d.init)==null?void 0:S.headers)&&new Headers(d.init.headers)}}return{type:me.data,data:d}}function Ur(e,t,n,r){let i=e.createURL(tp(t)).toString(),a={signal:n};if(r&&vt(r.formMethod)){let{formMethod:o,formEncType:s}=r;a.method=o.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(r.json)):s==="text/plain"?a.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?a.body=Ls(r.formData):a.body=r.formData}return new Request(i,a)}function Ls(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function hc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _y(e,t,n,r,i){let a={},o=null,s,l=!1,u={};return n.forEach((d,c)=>{let g=t[c].route.id;if(Q(!Tn(d),"Cannot handle redirect results in processLoaderData"),or(d)){let v=ri(e,g),S=d.error;r&&(S=Object.values(r)[0],r=void 0),o=o||{},o[v.route.id]==null&&(o[v.route.id]=S),a[g]=void 0,l||(l=!0,s=Yf(d.error)?d.error.status:500),d.headers&&(u[g]=d.headers)}else jn(d)?(i.set(g,d.deferredData),a[g]=d.deferredData.data):a[g]=d.data,d.statusCode!=null&&d.statusCode!==200&&!l&&(s=d.statusCode),d.headers&&(u[g]=d.headers)}),r&&(o=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:u}}function gc(e,t,n,r,i,a,o,s){let{loaderData:l,errors:u}=_y(t,n,r,i,s);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function vc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function st(e,t){let{pathname:n,routeId:r,method:i,type:a}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?s="defer() is not supported in actions":a==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(o="Not Found",s='No route matches URL "'+n+'"'):e===405&&(o="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Nl(e||500,o,new Error(s),!0)}function wc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Tn(n))return{result:n,idx:t}}}function tp(e){let t=typeof e=="string"?It(e):e;return Mn(ge({},t,{hash:""}))}function Ay(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function jn(e){return e.type===me.deferred}function or(e){return e.type===me.error}function Tn(e){return(e&&e.type)===me.redirect}function jy(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Ty(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Iy(e){return yy.has(e.toLowerCase())}function vt(e){return hy.has(e.toLowerCase())}async function xc(e,t,n,r,i,a){for(let o=0;oc.route.id===l.route.id),d=u!=null&&!ep(u,l)&&(a&&a[l.route.id])!==void 0;if(jn(s)&&(i||d)){let c=r[o];Q(c,"Expected an AbortSignal for revalidating fetcher deferred result"),await np(s,c,i).then(g=>{g&&(n[o]=g||n[o])})}}}async function np(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:me.data,data:e.deferredData.unwrappedData}}catch(i){return{type:me.error,error:i}}return{type:me.data,data:e.deferredData.data}}}function Ml(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Os(e,t){let n=typeof t=="string"?It(t).search:t.search;if(e[e.length-1].route.index&&Ml(n||""))return e[e.length-1];let r=Gf(e);return r[r.length-1]}function Sc(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Fo(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Py(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function $r(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ry(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Kt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Dy(e,t){try{let n=e.sessionStorage.getItem(Zf);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(i,new Set(a||[]))}}catch{}}function Ly(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Zf,JSON.stringify(n))}catch(r){hn(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.21.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let c=Ol(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Nt([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,o,a,e])}function My(){let{matches:e}=p.useContext(wn),t=e[e.length-1];return t?t.params:{}}function sp(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Un),{matches:i}=p.useContext(wn),{pathname:a}=Ii(),o=JSON.stringify(Ll(i,r.v7_relativeSplatPath));return p.useMemo(()=>Ol(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function Fy(e,t,n,r){Ti()||Q(!1);let{navigator:i}=p.useContext(Un),{matches:a}=p.useContext(wn),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ii(),d;if(t){var c;let _=typeof t=="string"?It(t):t;l==="/"||(c=_.pathname)!=null&&c.startsWith(l)||Q(!1),d=_}else d=u;let g=d.pathname||"/",v=l==="/"?g:g.slice(l.length)||"/",S=ar(e,{pathname:v}),k=qy(S&&S.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:Nt([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Nt([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),a,n,r);return t&&k?p.createElement(to.Provider,{value:{location:ki({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ye.Pop}},k):k}function zy(){let e=Wy(),t=Yf(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:i},n):null,null)}const Uy=p.createElement(zy,null);class $y extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(wn.Provider,{value:this.props.routeContext},p.createElement(ip.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function By(e){let{routeContext:t,match:n,children:r}=e,i=p.useContext(eo);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(wn.Provider,{value:t},r)}function qy(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));d>=0||Q(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,c,g)=>{let v,S=!1,k=null,_=null;n&&(v=s&&c.route.id?s[c.route.id]:void 0,k=c.route.errorElement||Uy,l&&(u<0&&g===0?(Gy("route-fallback",!1),S=!0,_=null):u===g&&(S=!0,_=c.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,g+1)),m=()=>{let y;return v?y=k:S?y=_:c.route.Component?y=p.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=d,p.createElement(By,{match:c,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||g===0)?p.createElement($y,{location:n.location,revalidation:n.revalidation,component:k,error:v,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var lp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lp||{}),Ma=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ma||{});function Vy(e){let t=p.useContext(eo);return t||Q(!1),t}function Hy(e){let t=p.useContext(rp);return t||Q(!1),t}function Qy(e){let t=p.useContext(wn);return t||Q(!1),t}function up(e){let t=Qy(),n=t.matches[t.matches.length-1];return n.route.id||Q(!1),n.route.id}function Wy(){var e;let t=p.useContext(ip),n=Hy(Ma.UseRouteError),r=up(Ma.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ky(){let{router:e}=Vy(lp.UseNavigateStable),t=up(Ma.UseNavigateStable),n=p.useRef(!1);return ap(()=>{n.current=!0}),p.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ki({fromRouteId:t},a)))},[e,t])}const kc={};function Gy(e,t,n){!t&&!kc[e]&&(kc[e]=!0)}function Yy(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ye.Pop,navigator:a,static:o=!1,future:s}=e;Ti()&&Q(!1);let l=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:l,navigator:a,static:o,future:ki({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=It(r));let{pathname:d="/",search:c="",hash:g="",state:v=null,key:S="default"}=r,k=p.useMemo(()=>{let _=_r(d,l);return _==null?null:{location:{pathname:_,search:c,hash:g,state:v,key:S},navigationType:i}},[l,d,c,g,v,S,i]);return k==null?null:p.createElement(Un.Provider,{value:u},p.createElement(to.Provider,{children:n,value:k}))}new Promise(()=>{});function Jy(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.21.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Zy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ev(e,t){return e.button===0&&(!t||t==="_self")&&!Zy(e)}const tv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];function nv(e,t){return ky({basename:t==null?void 0:t.basename,future:bi({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Vg({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||rv(),routes:e,mapRouteProperties:Jy,window:t==null?void 0:t.window}).initialize()}function rv(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=bi({},t,{errors:iv(t.errors)})),t}function iv(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Nl(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let a=new Error(i.message);a.stack="",n[r]=a}}else n[r]=i;return n}const av=p.createContext({isTransitioning:!1}),ov=p.createContext(new Map),sv="startTransition",bc=Rm[sv],lv="flushSync",Ec=qg[lv];function uv(e){bc?bc(e):e()}function Br(e){Ec?Ec(e):e()}class cv{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function dv(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=p.useState(n.state),[o,s]=p.useState(),[l,u]=p.useState({isTransitioning:!1}),[d,c]=p.useState(),[g,v]=p.useState(),[S,k]=p.useState(),_=p.useRef(new Map),{v7_startTransition:h}=r||{},m=p.useCallback(A=>{h?uv(A):A()},[h]),y=p.useCallback((A,I)=>{let{deletedFetchers:O,unstable_flushSync:z,unstable_viewTransitionOpts:J}=I;O.forEach(xe=>_.current.delete(xe)),A.fetchers.forEach((xe,at)=>{xe.data!==void 0&&_.current.set(at,xe.data)});let ke=n.window==null||typeof n.window.document.startViewTransition!="function";if(!J||ke){z?Br(()=>a(A)):m(()=>a(A));return}if(z){Br(()=>{g&&(d&&d.resolve(),g.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let xe=n.window.document.startViewTransition(()=>{Br(()=>a(A))});xe.finished.finally(()=>{Br(()=>{c(void 0),v(void 0),s(void 0),u({isTransitioning:!1})})}),Br(()=>v(xe));return}g?(d&&d.resolve(),g.skipTransition(),k({state:A,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(s(A),u({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[n.window,g,d,_,m]);p.useLayoutEffect(()=>n.subscribe(y),[n,y]),p.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new cv)},[l]),p.useEffect(()=>{if(d&&o&&n.window){let A=o,I=d.promise,O=n.window.document.startViewTransition(async()=>{m(()=>a(A)),await I});O.finished.finally(()=>{c(void 0),v(void 0),s(void 0),u({isTransitioning:!1})}),v(O)}},[m,o,d,n.window]),p.useEffect(()=>{d&&o&&i.location.key===o.location.key&&d.resolve()},[d,g,i.location,o]),p.useEffect(()=>{!l.isTransitioning&&S&&(s(S.state),u({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),k(void 0))},[l.isTransitioning,S]),p.useEffect(()=>{},[]);let C=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:A=>n.navigate(A),push:(A,I,O)=>n.navigate(A,{state:I,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(A,I,O)=>n.navigate(A,{replace:!0,state:I,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),T=n.basename||"/",w=p.useMemo(()=>({router:n,navigator:C,static:!1,basename:T}),[n,C,T]);return p.createElement(p.Fragment,null,p.createElement(eo.Provider,{value:w},p.createElement(rp.Provider,{value:i},p.createElement(ov.Provider,{value:_.current},p.createElement(av.Provider,{value:l},p.createElement(Yy,{basename:T,location:i.location,navigationType:i.historyAction,navigator:C,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?p.createElement(fv,{routes:n.routes,future:n.future,state:i}):t))))),null)}function fv(e){let{routes:t,future:n,state:r}=e;return Fy(t,void 0,r,n)}const pv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hv=p.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:d,unstable_viewTransition:c}=t,g=Xy(t,tv),{basename:v}=p.useContext(Un),S,k=!1;if(typeof u=="string"&&mv.test(u)&&(S=u,pv))try{let y=new URL(window.location.href),C=u.startsWith("//")?new URL(y.protocol+u):new URL(u),T=_r(C.pathname,v);C.origin===y.origin&&T!=null?u=T+C.search+C.hash:k=!0}catch{}let _=Oy(u,{relative:i}),h=gv(u,{replace:o,state:s,target:l,preventScrollReset:d,relative:i,unstable_viewTransition:c});function m(y){r&&r(y),y.defaultPrevented||h(y)}return p.createElement("a",bi({},g,{href:S||_,onClick:k||a?r:m,ref:n,target:l}))});var Cc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Cc||(Cc={}));var _c;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(_c||(_c={}));function gv(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,unstable_viewTransition:s}=t===void 0?{}:t,l=op(),u=Ii(),d=sp(e,{relative:o});return p.useCallback(c=>{if(ev(c,n)){c.preventDefault();let g=r!==void 0?r:Mn(u)===Mn(d);l(e,{replace:g,state:i,preventScrollReset:a,relative:o,unstable_viewTransition:s})}},[u,l,d,r,i,n,e,a,o,s])}var yv=Object.defineProperty,vv=(e,t,n)=>t in e?yv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zi=(e,t,n)=>(vv(e,typeof t!="symbol"?t+"":t,n),n),wv="https://huggingface.co";async function xv(e,t){var n,r;const i=new Sv(e.url,e.status,(n=e.headers.get("X-Request-Id"))!=null?n:t==null?void 0:t.requestId);if(i.message=`Api error with status ${i.statusCode}.${t!=null&&t.message?` ${t.message}.`:""} Request ID: ${i.requestId}, url: ${i.url}`,(r=e.headers.get("Content-Type"))!=null&&r.startsWith("application/json")){const a=await e.json();i.message=a.error||a.message||i.message,i.data=a}else i.data={message:await e.text()};throw i}var Sv=class extends Error{constructor(e,t,n,r){super(r),Zi(this,"statusCode"),Zi(this,"url"),Zi(this,"requestId"),Zi(this,"data"),this.statusCode=t,this.requestId=n,this.url=e}};function kv(e){if(!(!e||e.accessToken===void 0||e.accessToken===null)&&!e.accessToken.startsWith("hf_"))throw new TypeError("Your access token must start with 'hf_'")}new Promise(e=>{});function bv(e){const t=/<(https?:[/][/][^>]+)>;\s+rel="([^"]+)"/g;return Object.fromEntries([...e.matchAll(t)].map(([,n,r])=>[r,n]))}var Ev=["pipeline_tag","private","gated","downloads","likes","lastModified"];async function*Cv(e){var t,n,r;kv(e==null?void 0:e.credentials);const i=new URLSearchParams([...Object.entries({limit:"500",...(t=e==null?void 0:e.search)!=null&&t.owner?{author:e.search.owner}:void 0,...(n=e==null?void 0:e.search)!=null&&n.task?{pipeline_tag:e.search.task}:void 0}),...Ev.map(o=>["expand",o])]).toString();let a=`${(e==null?void 0:e.hubUrl)||wv}/api/models?${i}`;for(;a;){const o=await((r=e==null?void 0:e.fetch)!=null?r:fetch)(a,{headers:{accept:"application/json",...e!=null&&e.credentials?{Authorization:`Bearer ${e.credentials.accessToken}`}:void 0}});if(!o.ok)throw xv(o);const s=await o.json();for(const u of s)yield{id:u._id,name:u.id,private:u.private,task:u.pipeline_tag,downloads:u.downloads,gated:u.gated,likes:u.likes,updatedAt:new Date(u.lastModified)};const l=o.headers.get("Link");a=l?bv(l).next:void 0}}var _v=Object.defineProperty,Pi=(e,t)=>{for(var n in t)_v(e,n,{get:t[n],enumerable:!0})},Fl={"text-classification":{name:"Text Classification",subtasks:[{type:"acceptability-classification",name:"Acceptability Classification"},{type:"entity-linking-classification",name:"Entity Linking Classification"},{type:"fact-checking",name:"Fact Checking"},{type:"intent-classification",name:"Intent Classification"},{type:"language-identification",name:"Language Identification"},{type:"multi-class-classification",name:"Multi Class Classification"},{type:"multi-label-classification",name:"Multi Label Classification"},{type:"multi-input-text-classification",name:"Multi-input Text Classification"},{type:"natural-language-inference",name:"Natural Language Inference"},{type:"semantic-similarity-classification",name:"Semantic Similarity Classification"},{type:"sentiment-classification",name:"Sentiment Classification"},{type:"topic-classification",name:"Topic Classification"},{type:"semantic-similarity-scoring",name:"Semantic Similarity Scoring"},{type:"sentiment-scoring",name:"Sentiment Scoring"},{type:"sentiment-analysis",name:"Sentiment Analysis"},{type:"hate-speech-detection",name:"Hate Speech Detection"},{type:"text-scoring",name:"Text Scoring"}],modality:"nlp",color:"orange"},"token-classification":{name:"Token Classification",subtasks:[{type:"named-entity-recognition",name:"Named Entity Recognition"},{type:"part-of-speech",name:"Part of Speech"},{type:"parsing",name:"Parsing"},{type:"lemmatization",name:"Lemmatization"},{type:"word-sense-disambiguation",name:"Word Sense Disambiguation"},{type:"coreference-resolution",name:"Coreference-resolution"}],modality:"nlp",color:"blue"},"table-question-answering":{name:"Table Question Answering",modality:"nlp",color:"green"},"question-answering":{name:"Question Answering",subtasks:[{type:"extractive-qa",name:"Extractive QA"},{type:"open-domain-qa",name:"Open Domain QA"},{type:"closed-domain-qa",name:"Closed Domain QA"}],modality:"nlp",color:"blue"},"zero-shot-classification":{name:"Zero-Shot Classification",modality:"nlp",color:"yellow"},translation:{name:"Translation",modality:"nlp",color:"green"},summarization:{name:"Summarization",subtasks:[{type:"news-articles-summarization",name:"News Articles Summarization"},{type:"news-articles-headline-generation",name:"News Articles Headline Generation"}],modality:"nlp",color:"indigo"},conversational:{name:"Conversational",subtasks:[{type:"dialogue-generation",name:"Dialogue Generation"}],modality:"nlp",color:"green"},"feature-extraction":{name:"Feature Extraction",modality:"multimodal",color:"red"},"text-generation":{name:"Text Generation",subtasks:[{type:"dialogue-modeling",name:"Dialogue Modeling"},{type:"language-modeling",name:"Language Modeling"}],modality:"nlp",color:"indigo"},"text2text-generation":{name:"Text2Text Generation",subtasks:[{type:"text-simplification",name:"Text simplification"},{type:"explanation-generation",name:"Explanation Generation"},{type:"abstractive-qa",name:"Abstractive QA"},{type:"open-domain-abstractive-qa",name:"Open Domain Abstractive QA"},{type:"closed-domain-qa",name:"Closed Domain QA"},{type:"open-book-qa",name:"Open Book QA"},{type:"closed-book-qa",name:"Closed Book QA"}],modality:"nlp",color:"indigo"},"fill-mask":{name:"Fill-Mask",subtasks:[{type:"slot-filling",name:"Slot Filling"},{type:"masked-language-modeling",name:"Masked Language Modeling"}],modality:"nlp",color:"red"},"sentence-similarity":{name:"Sentence Similarity",modality:"nlp",color:"yellow"},"text-to-speech":{name:"Text-to-Speech",modality:"audio",color:"yellow"},"text-to-audio":{name:"Text-to-Audio",modality:"audio",color:"yellow"},"automatic-speech-recognition":{name:"Automatic Speech Recognition",modality:"audio",color:"yellow"},"audio-to-audio":{name:"Audio-to-Audio",modality:"audio",color:"blue"},"audio-classification":{name:"Audio Classification",subtasks:[{type:"keyword-spotting",name:"Keyword Spotting"},{type:"speaker-identification",name:"Speaker Identification"},{type:"audio-intent-classification",name:"Audio Intent Classification"},{type:"audio-emotion-recognition",name:"Audio Emotion Recognition"},{type:"audio-language-identification",name:"Audio Language Identification"}],modality:"audio",color:"green"},"voice-activity-detection":{name:"Voice Activity Detection",modality:"audio",color:"red"},"depth-estimation":{name:"Depth Estimation",modality:"cv",color:"yellow"},"image-classification":{name:"Image Classification",subtasks:[{type:"multi-label-image-classification",name:"Multi Label Image Classification"},{type:"multi-class-image-classification",name:"Multi Class Image Classification"}],modality:"cv",color:"blue"},"object-detection":{name:"Object Detection",subtasks:[{type:"face-detection",name:"Face Detection"},{type:"vehicle-detection",name:"Vehicle Detection"}],modality:"cv",color:"yellow"},"image-segmentation":{name:"Image Segmentation",subtasks:[{type:"instance-segmentation",name:"Instance Segmentation"},{type:"semantic-segmentation",name:"Semantic Segmentation"},{type:"panoptic-segmentation",name:"Panoptic Segmentation"}],modality:"cv",color:"green"},"text-to-image":{name:"Text-to-Image",modality:"multimodal",color:"yellow"},"image-to-text":{name:"Image-to-Text",subtasks:[{type:"image-captioning",name:"Image Captioning"}],modality:"multimodal",color:"red"},"image-to-image":{name:"Image-to-Image",subtasks:[{type:"image-inpainting",name:"Image Inpainting"},{type:"image-colorization",name:"Image Colorization"},{type:"super-resolution",name:"Super Resolution"}],modality:"cv",color:"indigo"},"image-to-video":{name:"Image-to-Video",modality:"multimodal",color:"indigo"},"unconditional-image-generation":{name:"Unconditional Image Generation",modality:"cv",color:"green"},"video-classification":{name:"Video Classification",modality:"cv",color:"blue"},"reinforcement-learning":{name:"Reinforcement Learning",modality:"rl",color:"red"},robotics:{name:"Robotics",modality:"rl",subtasks:[{type:"grasping",name:"Grasping"},{type:"task-planning",name:"Task Planning"}],color:"blue"},"tabular-classification":{name:"Tabular Classification",modality:"tabular",subtasks:[{type:"tabular-multi-class-classification",name:"Tabular Multi Class Classification"},{type:"tabular-multi-label-classification",name:"Tabular Multi Label Classification"}],color:"blue"},"tabular-regression":{name:"Tabular Regression",modality:"tabular",subtasks:[{type:"tabular-single-column-regression",name:"Tabular Single Column Regression"}],color:"blue"},"tabular-to-text":{name:"Tabular to Text",modality:"tabular",subtasks:[{type:"rdf-to-text",name:"RDF to text"}],color:"blue",hideInModels:!0},"table-to-text":{name:"Table to Text",modality:"nlp",color:"blue",hideInModels:!0},"multiple-choice":{name:"Multiple Choice",subtasks:[{type:"multiple-choice-qa",name:"Multiple Choice QA"},{type:"multiple-choice-coreference-resolution",name:"Multiple Choice Coreference Resolution"}],modality:"nlp",color:"blue",hideInModels:!0},"text-retrieval":{name:"Text Retrieval",subtasks:[{type:"document-retrieval",name:"Document Retrieval"},{type:"utterance-retrieval",name:"Utterance Retrieval"},{type:"entity-linking-retrieval",name:"Entity Linking Retrieval"},{type:"fact-checking-retrieval",name:"Fact Checking Retrieval"}],modality:"nlp",color:"indigo",hideInModels:!0},"time-series-forecasting":{name:"Time Series Forecasting",modality:"tabular",subtasks:[{type:"univariate-time-series-forecasting",name:"Univariate Time Series Forecasting"},{type:"multivariate-time-series-forecasting",name:"Multivariate Time Series Forecasting"}],color:"blue",hideInModels:!0},"text-to-video":{name:"Text-to-Video",modality:"multimodal",color:"green"},"visual-question-answering":{name:"Visual Question Answering",subtasks:[{type:"visual-question-answering",name:"Visual Question Answering"}],modality:"multimodal",color:"red"},"document-question-answering":{name:"Document Question Answering",subtasks:[{type:"document-question-answering",name:"Document Question Answering"}],modality:"multimodal",color:"blue",hideInDatasets:!0},"zero-shot-image-classification":{name:"Zero-Shot Image Classification",modality:"cv",color:"yellow"},"graph-ml":{name:"Graph Machine Learning",modality:"multimodal",color:"green"},"mask-generation":{name:"Mask Generation",modality:"cv",color:"indigo"},"zero-shot-object-detection":{name:"Zero-Shot Object Detection",modality:"cv",color:"yellow"},"text-to-3d":{name:"Text-to-3D",modality:"multimodal",color:"yellow"},"image-to-3d":{name:"Image-to-3D",modality:"multimodal",color:"green"},other:{name:"Other",modality:"other",color:"blue",hideInModels:!0,hideInDatasets:!0}},Av=Object.keys(Fl);Object.values(Fl).flatMap(e=>"subtasks"in e?e.subtasks:[]).map(e=>e.type);new Set(Av);var jv={datasets:[{description:"A benchmark of 10 different audio tasks.",id:"superb"}],demo:{inputs:[{filename:"audio.wav",type:"audio"}],outputs:[{data:[{label:"Up",score:.2},{label:"Down",score:.8}],type:"chart"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"An easy-to-use model for Command Recognition.",id:"speechbrain/google_speech_command_xvector"},{description:"An Emotion Recognition model.",id:"ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"},{description:"A language identification model.",id:"facebook/mms-lid-126"}],spaces:[{description:"An application that can classify music into different genre.",id:"kurianbenoy/audioclassification"}],summary:"Audio classification is the task of assigning a label or class to a given audio. It can be used for recognizing which command a user is giving or the emotion of a statement, as well as identifying a speaker.",widgetModels:["facebook/mms-lid-126"],youtubeId:"KWwzcmG98Ds"},Tv=jv,Iv={datasets:[{description:"512-element X-vector embeddings of speakers from CMU ARCTIC dataset.",id:"Matthijs/cmu-arctic-xvectors"}],demo:{inputs:[{filename:"input.wav",type:"audio"}],outputs:[{filename:"label-0.wav",type:"audio"},{filename:"label-1.wav",type:"audio"}]},metrics:[{description:"The Signal-to-Noise ratio is the relationship between the target signal level and the background noise level. It is calculated as the logarithm of the target signal divided by the background noise, in decibels.",id:"snri"},{description:"The Signal-to-Distortion ratio is the relationship between the target signal and the sum of noise, interference, and artifact errors",id:"sdri"}],models:[{description:"A solid model of audio source separation.",id:"speechbrain/sepformer-wham"},{description:"A speech enhancement model.",id:"speechbrain/metricgan-plus-voicebank"}],spaces:[{description:"An application for speech separation.",id:"younver/speechbrain-speech-separation"},{description:"An application for audio style transfer.",id:"nakas/audio-diffusion_style_transfer"}],summary:"Audio-to-Audio is a family of tasks in which the input is an audio and the output is one or multiple generated audios. Some example tasks are speech enhancement and source separation.",widgetModels:["speechbrain/sepformer-wham"],youtubeId:"iohj7nCCYoM"},Pv=Iv,Rv={datasets:[{description:"18,000 hours of multilingual audio-text dataset in 108 languages.",id:"mozilla-foundation/common_voice_13_0"},{description:"An English dataset with 1,000 hours of data.",id:"librispeech_asr"},{description:"High quality, multi-speaker audio data and their transcriptions in various languages.",id:"openslr"}],demo:{inputs:[{filename:"input.flac",type:"audio"}],outputs:[{label:"Transcript",content:"Going along slushy country roads and speaking to damp audiences in...",type:"text"}]},metrics:[{description:"",id:"wer"},{description:"",id:"cer"}],models:[{description:"A powerful ASR model by OpenAI.",id:"openai/whisper-large-v3"},{description:"A good generic ASR model by MetaAI.",id:"facebook/wav2vec2-base-960h"},{description:"An end-to-end model that performs ASR and Speech Translation by MetaAI.",id:"facebook/s2t-small-mustc-en-fr-st"}],spaces:[{description:"A powerful general-purpose speech recognition application.",id:"hf-audio/whisper-large-v3"},{description:"Fastest speech recognition application.",id:"sanchit-gandhi/whisper-jax"},{description:"A high quality speech and text translation model by Meta.",id:"facebook/seamless_m4t"}],summary:"Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. It has many applications, such as voice user interfaces.",widgetModels:["openai/whisper-large-v3"],youtubeId:"TksaY_FDgnk"},Dv=Rv,Lv={datasets:[{description:"A dataset of 7k conversations explicitly designed to exhibit multiple conversation modes: displaying personality, having empathy, and demonstrating knowledge.",id:"blended_skill_talk"},{description:"ConvAI is a dataset of human-to-bot conversations labeled for quality. This data can be used to train a metric for evaluating dialogue systems",id:"conv_ai_2"},{description:"EmpatheticDialogues, is a dataset of 25k conversations grounded in emotional situations",id:"empathetic_dialogues"}],demo:{inputs:[{label:"Input",content:"Hey my name is Julien! How are you?",type:"text"}],outputs:[{label:"Answer",content:"Hi Julien! My name is Julia! I am well.",type:"text"}]},metrics:[{description:"BLEU score is calculated by counting the number of shared single or subsequent tokens between the generated sequence and the reference. Subsequent n tokens are called “n-grams”. Unigram refers to a single token while bi-gram refers to token pairs and n-grams refer to n subsequent tokens. The score ranges from 0 to 1, where 1 means the translation perfectly matched and 0 did not match at all",id:"bleu"}],models:[{description:"A faster and smaller model than the famous BERT model.",id:"facebook/blenderbot-400M-distill"},{description:"DialoGPT is a large-scale pretrained dialogue response generation model for multiturn conversations.",id:"microsoft/DialoGPT-large"}],spaces:[{description:"A chatbot based on Blender model.",id:"EXFINITE/BlenderBot-UI"}],summary:"Conversational response modelling is the task of generating conversational text that is relevant, coherent and knowledgable given a prompt. These models have applications in chatbots, and as a part of voice assistants",widgetModels:["facebook/blenderbot-400M-distill"],youtubeId:""},Ov=Lv,Nv={datasets:[{description:"Dataset from the 2020 DocVQA challenge. The documents are taken from the UCSF Industry Documents Library.",id:"eliolio/docvqa"}],demo:{inputs:[{label:"Question",content:"What is the idea behind the consumer relations efficiency team?",type:"text"},{filename:"document-question-answering-input.png",type:"img"}],outputs:[{label:"Answer",content:"Balance cost efficiency with quality customer service",type:"text"}]},metrics:[{description:"The evaluation metric for the DocVQA challenge is the Average Normalized Levenshtein Similarity (ANLS). This metric is flexible to character regognition errors and compares the predicted answer with the ground truth answer.",id:"anls"},{description:"Exact Match is a metric based on the strict character match of the predicted answer and the right answer. For answers predicted correctly, the Exact Match will be 1. Even if only one character is different, Exact Match will be 0",id:"exact-match"}],models:[{description:"A LayoutLM model for the document QA task, fine-tuned on DocVQA and SQuAD2.0.",id:"impira/layoutlm-document-qa"},{description:"A special model for OCR-free Document QA task. Donut model fine-tuned on DocVQA.",id:"naver-clova-ix/donut-base-finetuned-docvqa"},{description:"A powerful model for document question answering.",id:"google/pix2struct-docvqa-large"}],spaces:[{description:"A robust document question answering application.",id:"impira/docquery"},{description:"An application that can answer questions from invoices.",id:"impira/invoices"},{description:"An application to compare different document question answering models.",id:"merve/compare_docvqa_models"}],summary:"Document Question Answering (also known as Document Visual Question Answering) is the task of answering questions on document images. Document question answering models take a (document, question) pair as input and return an answer in natural language. Models usually rely on multi-modal features, combining text, position of words (bounding-boxes) and image.",widgetModels:["impira/layoutlm-document-qa"],youtubeId:""},Mv=Nv,Fv={datasets:[{description:"Wikipedia dataset containing cleaned articles of all languages. Can be used to train `feature-extraction` models.",id:"wikipedia"}],demo:{inputs:[{label:"Input",content:"India, officially the Republic of India, is a country in South Asia.",type:"text"}],outputs:[{table:[["Dimension 1","Dimension 2","Dimension 3"],["2.583383083343506","2.757075071334839","0.9023529887199402"],["8.29393482208252","1.1071064472198486","2.03399395942688"],["-0.7754912972450256","-1.647324562072754","-0.6113331913948059"],["0.07087723910808563","1.5942802429199219","1.4610432386398315"]],type:"tabular"}]},metrics:[],models:[{description:"A powerful feature extraction model for natural language processing tasks.",id:"facebook/bart-base"},{description:"A strong feature extraction model for coding tasks.",id:"microsoft/codebert-base"}],spaces:[],summary:"Feature extraction refers to the process of transforming raw data into numerical features that can be processed while preserving the information in the original dataset.",widgetModels:["facebook/bart-base"]},zv=Fv,Uv={datasets:[{description:"A common dataset that is used to train models for many languages.",id:"wikipedia"},{description:"A large English dataset with text crawled from the web.",id:"c4"}],demo:{inputs:[{label:"Input",content:"The barked at me",type:"text"}],outputs:[{type:"chart",data:[{label:"wolf",score:.487},{label:"dog",score:.061},{label:"cat",score:.058},{label:"fox",score:.047},{label:"squirrel",score:.025}]}]},metrics:[{description:"Cross Entropy is a metric that calculates the difference between two probability distributions. Each probability distribution is the distribution of predicted words",id:"cross_entropy"},{description:"Perplexity is the exponential of the cross-entropy loss. It evaluates the probabilities assigned to the next word by the model. Lower perplexity indicates better performance",id:"perplexity"}],models:[{description:"A faster and smaller model than the famous BERT model.",id:"distilbert-base-uncased"},{description:"A multilingual model trained on 100 languages.",id:"xlm-roberta-base"}],spaces:[],summary:"Masked language modeling is the task of masking some of the words in a sentence and predicting which words should replace those masks. These models are useful when we want to get a statistical understanding of the language in which the model is trained in.",widgetModels:["distilroberta-base"],youtubeId:"mqElG5QJWUg"},$v=Uv,Bv={datasets:[{description:"Benchmark dataset used for image classification with images that belong to 100 classes.",id:"cifar100"},{description:"Dataset consisting of images of garments.",id:"fashion_mnist"}],demo:{inputs:[{filename:"image-classification-input.jpeg",type:"img"}],outputs:[{type:"chart",data:[{label:"Egyptian cat",score:.514},{label:"Tabby cat",score:.193},{label:"Tiger cat",score:.068}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"A strong image classification model.",id:"google/vit-base-patch16-224"},{description:"A robust image classification model.",id:"facebook/deit-base-distilled-patch16-224"},{description:"A strong image classification model.",id:"facebook/convnext-large-224"}],spaces:[{description:"An application that classifies what a given image is about.",id:"nielsr/perceiver-image-classification"}],summary:"Image classification is the task of assigning a label or class to an entire image. Images are expected to have only one class for each image. Image classification models take an image as input and return a prediction about which class the image belongs to.",widgetModels:["google/vit-base-patch16-224"],youtubeId:"tjAIM7BOYhw"},qv=Bv,Vv={datasets:[{description:"Synthetic dataset, for image relighting",id:"VIDIT"},{description:"Multiple images of celebrities, used for facial expression translation",id:"huggan/CelebA-faces"}],demo:{inputs:[{filename:"image-to-image-input.jpeg",type:"img"}],outputs:[{filename:"image-to-image-output.png",type:"img"}]},isPlaceholder:!1,metrics:[{description:"Peak Signal to Noise Ratio (PSNR) is an approximation of the human perception, considering the ratio of the absolute intensity with respect to the variations. Measured in dB, a high value indicates a high fidelity.",id:"PSNR"},{description:"Structural Similarity Index (SSIM) is a perceptual metric which compares the luminance, contrast and structure of two images. The values of SSIM range between -1 and 1, and higher values indicate closer resemblance to the original image.",id:"SSIM"},{description:"Inception Score (IS) is an analysis of the labels predicted by an image classification model when presented with a sample of the generated images.",id:"IS"}],models:[{description:"A model that enhances images captured in low light conditions.",id:"keras-io/low-light-image-enhancement"},{description:"A model that increases the resolution of an image.",id:"keras-io/super-resolution"},{description:"A model that creates a set of variations of the input image in the style of DALL-E using Stable Diffusion.",id:"lambdalabs/sd-image-variations-diffusers"},{description:"A model that generates images based on segments in the input image and the text prompt.",id:"mfidabel/controlnet-segment-anything"},{description:"A model that takes an image and an instruction to edit the image.",id:"timbrooks/instruct-pix2pix"}],spaces:[{description:"Image enhancer application for low light.",id:"keras-io/low-light-image-enhancement"},{description:"Style transfer application.",id:"keras-io/neural-style-transfer"},{description:"An application that generates images based on segment control.",id:"mfidabel/controlnet-segment-anything"},{description:"Image generation application that takes image control and text prompt.",id:"hysts/ControlNet"},{description:"Colorize any image using this app.",id:"ioclab/brightness-controlnet"},{description:"Edit images with instructions.",id:"timbrooks/instruct-pix2pix"}],summary:"Image-to-image is the task of transforming a source image to match the characteristics of a target image or a target image domain. Any image manipulation and enhancement is possible with image to image models.",widgetModels:["lllyasviel/sd-controlnet-canny"],youtubeId:""},Hv=Vv,Qv={datasets:[{description:"Dataset from 12M image-text of Reddit",id:"red_caps"},{description:"Dataset from 3.3M images of Google",id:"datasets/conceptual_captions"}],demo:{inputs:[{filename:"savanna.jpg",type:"img"}],outputs:[{label:"Detailed description",content:"a herd of giraffes and zebras grazing in a field",type:"text"}]},metrics:[],models:[{description:"A robust image captioning model.",id:"Salesforce/blip2-opt-2.7b"},{description:"A powerful and accurate image-to-text model that can also localize concepts in images.",id:"microsoft/kosmos-2-patch14-224"},{description:"A strong optical character recognition model.",id:"facebook/nougat-base"},{description:"A powerful model that lets you have a conversation with the image.",id:"llava-hf/llava-1.5-7b-hf"}],spaces:[{description:"An application that compares various image captioning models.",id:"nielsr/comparing-captioning-models"},{description:"A robust image captioning application.",id:"flax-community/image-captioning"},{description:"An application that transcribes handwritings into text.",id:"nielsr/TrOCR-handwritten"},{description:"An application that can caption images and answer questions about a given image.",id:"Salesforce/BLIP"},{description:"An application that can caption images and answer questions with a conversational agent.",id:"Salesforce/BLIP2"},{description:"An image captioning application that demonstrates the effect of noise on captions.",id:"johko/capdec-image-captioning"}],summary:"Image to text models output a text from a given image. Image captioning or optical character recognition can be considered as the most common applications of image to text.",widgetModels:["Salesforce/blip-image-captioning-base"],youtubeId:""},Wv=Qv,Kv={datasets:[{description:"Scene segmentation dataset.",id:"scene_parse_150"}],demo:{inputs:[{filename:"image-segmentation-input.jpeg",type:"img"}],outputs:[{filename:"image-segmentation-output.png",type:"img"}]},metrics:[{description:"Average Precision (AP) is the Area Under the PR Curve (AUC-PR). It is calculated for each semantic class separately",id:"Average Precision"},{description:"Mean Average Precision (mAP) is the overall average of the AP values",id:"Mean Average Precision"},{description:"Intersection over Union (IoU) is the overlap of segmentation masks. Mean IoU is the average of the IoU of all semantic classes",id:"Mean Intersection over Union"},{description:"APα is the Average Precision at the IoU threshold of a α value, for example, AP50 and AP75",id:"APα"}],models:[{description:"Solid panoptic segmentation model trained on the COCO 2017 benchmark dataset.",id:"facebook/detr-resnet-50-panoptic"},{description:"Semantic segmentation model trained on ADE20k benchmark dataset.",id:"microsoft/beit-large-finetuned-ade-640-640"},{description:"Semantic segmentation model trained on ADE20k benchmark dataset with 512x512 resolution.",id:"nvidia/segformer-b0-finetuned-ade-512-512"},{description:"Semantic segmentation model trained Cityscapes dataset.",id:"facebook/mask2former-swin-large-cityscapes-semantic"},{description:"Panoptic segmentation model trained COCO (common objects) dataset.",id:"facebook/mask2former-swin-large-coco-panoptic"}],spaces:[{description:"A semantic segmentation application that can predict unseen instances out of the box.",id:"facebook/ov-seg"},{description:"One of the strongest segmentation applications.",id:"jbrinkma/segment-anything"},{description:"A semantic segmentation application that predicts human silhouettes.",id:"keras-io/Human-Part-Segmentation"},{description:"An instance segmentation application to predict neuronal cell types from microscopy images.",id:"rashmi/sartorius-cell-instance-segmentation"},{description:"An application that segments videos.",id:"ArtGAN/Segment-Anything-Video"},{description:"An panoptic segmentation application built for outdoor environments.",id:"segments/panoptic-segment-anything"}],summary:"Image Segmentation divides an image into segments where each pixel in the image is mapped to an object. This task has multiple variants such as instance segmentation, panoptic segmentation and semantic segmentation.",widgetModels:["facebook/detr-resnet-50-panoptic"],youtubeId:"dKE8SIt9C-w"},Gv=Kv,Yv={datasets:[{description:"Widely used benchmark dataset for multiple Vision tasks.",id:"merve/coco2017"}],demo:{inputs:[{filename:"object-detection-input.jpg",type:"img"}],outputs:[{filename:"object-detection-output.jpg",type:"img"}]},metrics:[{description:"The Average Precision (AP) metric is the Area Under the PR Curve (AUC-PR). It is calculated for each class separately",id:"Average Precision"},{description:"The Mean Average Precision (mAP) metric is the overall average of the AP values",id:"Mean Average Precision"},{description:"The APα metric is the Average Precision at the IoU threshold of a α value, for example, AP50 and AP75",id:"APα"}],models:[{description:"Solid object detection model trained on the benchmark dataset COCO 2017.",id:"facebook/detr-resnet-50"},{description:"Strong object detection model trained on ImageNet-21k dataset.",id:"microsoft/beit-base-patch16-224-pt22k-ft22k"}],spaces:[{description:"Leaderboard to compare various object detection models across several metrics.",id:"hf-vision/object_detection_leaderboard"},{description:"An object detection application that can detect unseen objects out of the box.",id:"merve/owlv2"},{description:"An application that contains various object detection models to try from.",id:"Gradio-Blocks/Object-Detection-With-DETR-and-YOLOS"},{description:"An application that shows multiple cutting edge techniques for object detection and tracking.",id:"kadirnar/torchyolo"},{description:"An object tracking, segmentation and inpainting application.",id:"VIPLab/Track-Anything"}],summary:"Object Detection models allow users to identify objects of certain defined classes. Object detection models receive an image as input and output the images with bounding boxes and labels on detected objects.",widgetModels:["facebook/detr-resnet-50"],youtubeId:"WdAeKSOpxhw"},Jv=Yv,Xv={datasets:[{description:"NYU Depth V2 Dataset: Video dataset containing both RGB and depth sensor data",id:"sayakpaul/nyu_depth_v2"}],demo:{inputs:[{filename:"depth-estimation-input.jpg",type:"img"}],outputs:[{filename:"depth-estimation-output.png",type:"img"}]},metrics:[],models:[{description:"Strong Depth Estimation model trained on 1.4 million images.",id:"Intel/dpt-large"},{description:"Strong Depth Estimation model trained on the KITTI dataset.",id:"facebook/dpt-dinov2-large-kitti"},{description:"A strong monocular depth estimation model.",id:"Bingxin/Marigold"}],spaces:[{description:"An application that predicts the depth of an image and then reconstruct the 3D model as voxels.",id:"radames/dpt-depth-estimation-3d-voxels"},{description:"An application that can estimate the depth in a given image.",id:"keras-io/Monocular-Depth-Estimation"}],summary:"Depth estimation is the task of predicting depth of the objects present in an image.",widgetModels:[""],youtubeId:""},Zv=Xv,e0={datasets:[],demo:{inputs:[],outputs:[]},isPlaceholder:!0,metrics:[],models:[],spaces:[],summary:"",widgetModels:[],youtubeId:void 0},Wr=e0,t0={datasets:[{description:"A curation of widely used datasets for Data Driven Deep Reinforcement Learning (D4RL)",id:"edbeeching/decision_transformer_gym_replay"}],demo:{inputs:[{label:"State",content:"Red traffic light, pedestrians are about to pass.",type:"text"}],outputs:[{label:"Action",content:"Stop the car.",type:"text"},{label:"Next State",content:"Yellow light, pedestrians have crossed.",type:"text"}]},metrics:[{description:"Accumulated reward across all time steps discounted by a factor that ranges between 0 and 1 and determines how much the agent optimizes for future relative to immediate rewards. Measures how good is the policy ultimately found by a given algorithm considering uncertainty over the future.",id:"Discounted Total Reward"},{description:"Average return obtained after running the policy for a certain number of evaluation episodes. As opposed to total reward, mean reward considers how much reward a given algorithm receives while learning.",id:"Mean Reward"},{description:"Measures how good a given algorithm is after a predefined time. Some algorithms may be guaranteed to converge to optimal behavior across many time steps. However, an agent that reaches an acceptable level of optimality after a given time horizon may be preferable to one that ultimately reaches optimality but takes a long time.",id:"Level of Performance After Some Time"}],models:[{description:"A Reinforcement Learning model trained on expert data from the Gym Hopper environment",id:"edbeeching/decision-transformer-gym-hopper-expert"},{description:"A PPO agent playing seals/CartPole-v0 using the stable-baselines3 library and the RL Zoo.",id:"HumanCompatibleAI/ppo-seals-CartPole-v0"}],spaces:[{description:"An application for a cute puppy agent learning to catch a stick.",id:"ThomasSimonini/Huggy"},{description:"An application to play Snowball Fight with a reinforcement learning agent.",id:"ThomasSimonini/SnowballFight"}],summary:"Reinforcement learning is the computational approach of learning from action by interacting with an environment through trial and error and receiving rewards (negative or positive) as feedback",widgetModels:[],youtubeId:"q0BiUn5LiBc"},n0=t0,r0={datasets:[{description:"A famous question answering dataset based on English articles from Wikipedia.",id:"squad_v2"},{description:"A dataset of aggregated anonymized actual queries issued to the Google search engine.",id:"natural_questions"}],demo:{inputs:[{label:"Question",content:"Which name is also used to describe the Amazon rainforest in English?",type:"text"},{label:"Context",content:"The Amazon rainforest, also known in English as Amazonia or the Amazon Jungle",type:"text"}],outputs:[{label:"Answer",content:"Amazonia",type:"text"}]},metrics:[{description:"Exact Match is a metric based on the strict character match of the predicted answer and the right answer. For answers predicted correctly, the Exact Match will be 1. Even if only one character is different, Exact Match will be 0",id:"exact-match"},{description:" The F1-Score metric is useful if we value both false positives and false negatives equally. The F1-Score is calculated on each word in the predicted sequence against the correct answer",id:"f1"}],models:[{description:"A robust baseline model for most question answering domains.",id:"deepset/roberta-base-squad2"},{description:"A special model that can answer questions from tables!",id:"google/tapas-base-finetuned-wtq"}],spaces:[{description:"An application that can answer a long question from Wikipedia.",id:"deepset/wikipedia-assistant"}],summary:"Question Answering models can retrieve the answer to a question from a given text, which is useful for searching for an answer in a document. Some question answering models can generate answers without context!",widgetModels:["deepset/roberta-base-squad2"],youtubeId:"ajPx5LwJD-I"},i0=r0,a0={datasets:[{description:"Bing queries with relevant passages from various web sources.",id:"ms_marco"}],demo:{inputs:[{label:"Source sentence",content:"Machine learning is so easy.",type:"text"},{label:"Sentences to compare to",content:"Deep learning is so straightforward.",type:"text"},{label:"",content:"This is so difficult, like rocket science.",type:"text"},{label:"",content:"I can't believe how much I struggled with this.",type:"text"}],outputs:[{type:"chart",data:[{label:"Deep learning is so straightforward.",score:.623},{label:"This is so difficult, like rocket science.",score:.413},{label:"I can't believe how much I struggled with this.",score:.256}]}]},metrics:[{description:"Reciprocal Rank is a measure used to rank the relevancy of documents given a set of documents. Reciprocal Rank is the reciprocal of the rank of the document retrieved, meaning, if the rank is 3, the Reciprocal Rank is 0.33. If the rank is 1, the Reciprocal Rank is 1",id:"Mean Reciprocal Rank"},{description:"The similarity of the embeddings is evaluated mainly on cosine similarity. It is calculated as the cosine of the angle between two vectors. It is particularly useful when your texts are not the same length",id:"Cosine Similarity"}],models:[{description:"This model works well for sentences and paragraphs and can be used for clustering/grouping and semantic searches.",id:"sentence-transformers/all-mpnet-base-v2"},{description:"A multilingual model trained for FAQ retrieval.",id:"clips/mfaq"}],spaces:[{description:"An application that leverages sentence similarity to answer questions from YouTube videos.",id:"Gradio-Blocks/Ask_Questions_To_YouTube_Videos"},{description:"An application that retrieves relevant PubMed abstracts for a given online article which can be used as further references.",id:"Gradio-Blocks/pubmed-abstract-retriever"},{description:"An application that leverages sentence similarity to summarize text.",id:"nickmuchi/article-text-summarizer"},{description:"A guide that explains how Sentence Transformers can be used for semantic search.",id:"sentence-transformers/Sentence_Transformers_for_semantic_search"}],summary:"Sentence Similarity is the task of determining how similar two texts are. Sentence similarity models convert input texts into vectors (embeddings) that capture semantic information and calculate how close (similar) they are between them. This task is particularly useful for information retrieval and clustering/grouping.",widgetModels:["sentence-transformers/all-MiniLM-L6-v2"],youtubeId:"VCZq5AkbNEU"},o0=a0,s0={datasets:[{description:"News articles in five different languages along with their summaries. Widely used for benchmarking multilingual summarization models.",id:"mlsum"},{description:"English conversations and their summaries. Useful for benchmarking conversational agents.",id:"samsum"}],demo:{inputs:[{label:"Input",content:"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. It was the first structure to reach a height of 300 metres. Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.",type:"text"}],outputs:[{label:"Output",content:"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building. It was the first structure to reach a height of 300 metres.",type:"text"}]},metrics:[{description:"The generated sequence is compared against its summary, and the overlap of tokens are counted. ROUGE-N refers to overlap of N subsequent tokens, ROUGE-1 refers to overlap of single tokens and ROUGE-2 is the overlap of two subsequent tokens.",id:"rouge"}],models:[{description:"A strong summarization model trained on English news articles. Excels at generating factual summaries.",id:"facebook/bart-large-cnn"},{description:"A summarization model trained on medical articles.",id:"google/bigbird-pegasus-large-pubmed"}],spaces:[{description:"An application that can summarize long paragraphs.",id:"pszemraj/summarize-long-text"},{description:"A much needed summarization application for terms and conditions.",id:"ml6team/distilbart-tos-summarizer-tosdr"},{description:"An application that summarizes long documents.",id:"pszemraj/document-summarization"},{description:"An application that can detect errors in abstractive summarization.",id:"ml6team/post-processing-summarization"}],summary:"Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text.",widgetModels:["sshleifer/distilbart-cnn-12-6"],youtubeId:"yHnr5Dk2zCI"},l0=s0,u0={datasets:[{description:"The WikiTableQuestions dataset is a large-scale dataset for the task of question answering on semi-structured tables.",id:"wikitablequestions"},{description:"WikiSQL is a dataset of 80654 hand-annotated examples of questions and SQL queries distributed across 24241 tables from Wikipedia.",id:"wikisql"}],demo:{inputs:[{table:[["Rank","Name","No.of reigns","Combined days"],["1","lou Thesz","3","3749"],["2","Ric Flair","8","3103"],["3","Harley Race","7","1799"]],type:"tabular"},{label:"Question",content:"What is the number of reigns for Harley Race?",type:"text"}],outputs:[{label:"Result",content:"7",type:"text"}]},metrics:[{description:"Checks whether the predicted answer(s) is the same as the ground-truth answer(s).",id:"Denotation Accuracy"}],models:[{description:"A table question answering model that is capable of neural SQL execution, i.e., employ TAPEX to execute a SQL query on a given table.",id:"microsoft/tapex-base"},{description:"A robust table question answering model.",id:"google/tapas-base-finetuned-wtq"}],spaces:[{description:"An application that answers questions based on table CSV files.",id:"katanaml/table-query"}],summary:"Table Question Answering (Table QA) is the answering a question about an information on a given table.",widgetModels:["google/tapas-base-finetuned-wtq"]},c0=u0,d0={datasets:[{description:"A comprehensive curation of datasets covering all benchmarks.",id:"inria-soda/tabular-benchmark"}],demo:{inputs:[{table:[["Glucose","Blood Pressure ","Skin Thickness","Insulin","BMI"],["148","72","35","0","33.6"],["150","50","30","0","35.1"],["141","60","29","1","39.2"]],type:"tabular"}],outputs:[{table:[["Diabetes"],["1"],["1"],["0"]],type:"tabular"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"Breast cancer prediction model based on decision trees.",id:"scikit-learn/cancer-prediction-trees"}],spaces:[{description:"An application that can predict defective products on a production line.",id:"scikit-learn/tabular-playground"},{description:"An application that compares various tabular classification techniques on different datasets.",id:"scikit-learn/classification"}],summary:"Tabular classification is the task of classifying a target category (a group) based on set of attributes.",widgetModels:["scikit-learn/tabular-playground"],youtubeId:""},f0=d0,p0={datasets:[{description:"A comprehensive curation of datasets covering all benchmarks.",id:"inria-soda/tabular-benchmark"}],demo:{inputs:[{table:[["Car Name","Horsepower","Weight"],["ford torino","140","3,449"],["amc hornet","97","2,774"],["toyota corolla","65","1,773"]],type:"tabular"}],outputs:[{table:[["MPG (miles per gallon)"],["17"],["18"],["31"]],type:"tabular"}]},metrics:[{description:"",id:"mse"},{description:"Coefficient of determination (or R-squared) is a measure of how well the model fits the data. Higher R-squared is considered a better fit.",id:"r-squared"}],models:[{description:"Fish weight prediction based on length measurements and species.",id:"scikit-learn/Fish-Weight"}],spaces:[{description:"An application that can predict weight of a fish based on set of attributes.",id:"scikit-learn/fish-weight-prediction"}],summary:"Tabular regression is the task of predicting a numerical value given a set of attributes.",widgetModels:["scikit-learn/Fish-Weight"],youtubeId:""},m0=p0,h0={datasets:[{description:"RedCaps is a large-scale dataset of 12M image-text pairs collected from Reddit.",id:"red_caps"},{description:"Conceptual Captions is a dataset consisting of ~3.3M images annotated with captions.",id:"conceptual_captions"}],demo:{inputs:[{label:"Input",content:"A city above clouds, pastel colors, Victorian style",type:"text"}],outputs:[{filename:"image.jpeg",type:"img"}]},metrics:[{description:"The Inception Score (IS) measure assesses diversity and meaningfulness. It uses a generated image sample to predict its label. A higher score signifies more diverse and meaningful images.",id:"IS"},{description:"The Fréchet Inception Distance (FID) calculates the distance between distributions between synthetic and real samples. A lower FID score indicates better similarity between the distributions of real and generated images.",id:"FID"},{description:"R-precision assesses how the generated image aligns with the provided text description. It uses the generated images as queries to retrieve relevant text descriptions. The top 'r' relevant descriptions are selected and used to calculate R-precision as r/R, where 'R' is the number of ground truth descriptions associated with the generated images. A higher R-precision value indicates a better model.",id:"R-Precision"}],models:[{description:"One of the most powerful image generation models that can generate realistic outputs.",id:"stabilityai/stable-diffusion-xl-base-1.0"},{description:"A powerful yet fast image generation model.",id:"latent-consistency/lcm-lora-sdxl"},{description:"A text-to-image model that can generate coherent text inside image.",id:"DeepFloyd/IF-I-XL-v1.0"},{description:"A powerful text-to-image model.",id:"kakaobrain/karlo-v1-alpha"}],spaces:[{description:"A powerful text-to-image application.",id:"stabilityai/stable-diffusion"},{description:"A text-to-image application to generate comics.",id:"jbilcke-hf/ai-comic-factory"},{description:"A text-to-image application that can generate coherent text inside the image.",id:"DeepFloyd/IF"},{description:"A powerful yet very fast image generation application.",id:"latent-consistency/lcm-lora-for-sdxl"},{description:"A powerful text-to-image application that can generate 3D representations.",id:"hysts/Shap-E"},{description:"An application for `text-to-image`, `image-to-image` and image inpainting.",id:"ArtGAN/Stable-Diffusion-ControlNet-WebUI"}],summary:"Generates images from input text. These models can be used to generate and modify images based on text prompts.",widgetModels:["CompVis/stable-diffusion-v1-4"],youtubeId:""},g0=h0,y0={datasets:[{description:"Thousands of short audio clips of a single speaker.",id:"lj_speech"},{description:"Multi-speaker English dataset.",id:"LibriTTS"}],demo:{inputs:[{label:"Input",content:"I love audio models on the Hub!",type:"text"}],outputs:[{filename:"audio.wav",type:"audio"}]},metrics:[{description:"The Mel Cepstral Distortion (MCD) metric is used to calculate the quality of generated speech.",id:"mel cepstral distortion"}],models:[{description:"A powerful TTS model.",id:"suno/bark"},{description:"A massively multi-lingual TTS model.",id:"facebook/mms-tts"},{description:"An end-to-end speech synthesis model.",id:"microsoft/speecht5_tts"}],spaces:[{description:"An application for generate highly realistic, multilingual speech.",id:"suno/bark"},{description:"XTTS is a Voice generation model that lets you clone voices into different languages.",id:"coqui/xtts"},{description:"An application that synthesizes speech for various speaker types.",id:"Matthijs/speecht5-tts-demo"}],summary:"Text-to-Speech (TTS) is the task of generating natural sounding speech given text input. TTS models can be extended to have a single model that generates speech for multiple speakers and multiple languages.",widgetModels:["suno/bark"],youtubeId:"NW62DpzJ274"},v0=y0,w0={datasets:[{description:"A widely used dataset useful to benchmark named entity recognition models.",id:"conll2003"},{description:"A multilingual dataset of Wikipedia articles annotated for named entity recognition in over 150 different languages.",id:"wikiann"}],demo:{inputs:[{label:"Input",content:"My name is Omar and I live in Zürich.",type:"text"}],outputs:[{text:"My name is Omar and I live in Zürich.",tokens:[{type:"PERSON",start:11,end:15},{type:"GPE",start:30,end:36}],type:"text-with-tokens"}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"A robust performance model to identify people, locations, organizations and names of miscellaneous entities.",id:"dslim/bert-base-NER"},{description:"Flair models are typically the state of the art in named entity recognition tasks.",id:"flair/ner-english"}],spaces:[{description:"An application that can recognizes entities, extracts noun chunks and recognizes various linguistic features of each token.",id:"spacy/gradio_pipeline_visualizer"}],summary:"Token classification is a natural language understanding task in which a label is assigned to some tokens in a text. Some popular token classification subtasks are Named Entity Recognition (NER) and Part-of-Speech (PoS) tagging. NER models could be trained to identify specific entities in a text, such as dates, individuals and places; and PoS tagging would identify, for example, which words in a text are verbs, nouns, and punctuation marks.",widgetModels:["dslim/bert-base-NER"],youtubeId:"wVHdVlPScxA"},x0=w0,S0={datasets:[{description:"A dataset of copyright-free books translated into 16 different languages.",id:"opus_books"},{description:"An example of translation between programming languages. This dataset consists of functions in Java and C#.",id:"code_x_glue_cc_code_to_code_trans"}],demo:{inputs:[{label:"Input",content:"My name is Omar and I live in Zürich.",type:"text"}],outputs:[{label:"Output",content:"Mein Name ist Omar und ich wohne in Zürich.",type:"text"}]},metrics:[{description:"BLEU score is calculated by counting the number of shared single or subsequent tokens between the generated sequence and the reference. Subsequent n tokens are called “n-grams”. Unigram refers to a single token while bi-gram refers to token pairs and n-grams refer to n subsequent tokens. The score ranges from 0 to 1, where 1 means the translation perfectly matched and 0 did not match at all",id:"bleu"},{description:"",id:"sacrebleu"}],models:[{description:"A model that translates from English to French.",id:"Helsinki-NLP/opus-mt-en-fr"},{description:"A general-purpose Transformer that can be used to translate from English to German, French, or Romanian.",id:"t5-base"}],spaces:[{description:"An application that can translate between 100 languages.",id:"Iker/Translate-100-languages"},{description:"An application that can translate between English, Spanish and Hindi.",id:"EuroPython2022/Translate-with-Bloom"}],summary:"Translation is the task of converting text from one language to another.",widgetModels:["t5-small"],youtubeId:"1JvfrvZgi6c"},k0=S0,b0={datasets:[{description:"A widely used dataset used to benchmark multiple variants of text classification.",id:"glue"},{description:"A text classification dataset used to benchmark natural language inference models",id:"snli"}],demo:{inputs:[{label:"Input",content:"I love Hugging Face!",type:"text"}],outputs:[{type:"chart",data:[{label:"POSITIVE",score:.9},{label:"NEUTRAL",score:.1},{label:"NEGATIVE",score:0}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"The F1 metric is the harmonic mean of the precision and recall. It can be calculated as: F1 = 2 * (precision * recall) / (precision + recall)",id:"f1"}],models:[{description:"A robust model trained for sentiment analysis.",id:"distilbert-base-uncased-finetuned-sst-2-english"},{description:"Multi-genre natural language inference model.",id:"roberta-large-mnli"}],spaces:[{description:"An application that can classify financial sentiment.",id:"IoannisTr/Tech_Stocks_Trading_Assistant"},{description:"A dashboard that contains various text classification tasks.",id:"miesnerjacob/Multi-task-NLP"},{description:"An application that analyzes user reviews in healthcare.",id:"spacy/healthsea-demo"}],summary:"Text Classification is the task of assigning a label or class to a given text. Some use cases are sentiment analysis, natural language inference, and assessing grammatical correctness.",widgetModels:["distilbert-base-uncased-finetuned-sst-2-english"],youtubeId:"leNG9fN9FQU"},E0=b0,C0={datasets:[{description:"A large multilingual dataset of text crawled from the web.",id:"mc4"},{description:"Diverse open-source data consisting of 22 smaller high-quality datasets. It was used to train GPT-Neo.",id:"the_pile"},{description:"A crowd-sourced instruction dataset to develop an AI assistant.",id:"OpenAssistant/oasst1"},{description:"A crowd-sourced instruction dataset created by Databricks employees.",id:"databricks/databricks-dolly-15k"}],demo:{inputs:[{label:"Input",content:"Once upon a time,",type:"text"}],outputs:[{label:"Output",content:"Once upon a time, we knew that our ancestors were on the verge of extinction. The great explorers and poets of the Old World, from Alexander the Great to Chaucer, are dead and gone. A good many of our ancient explorers and poets have",type:"text"}]},metrics:[{description:"Cross Entropy is a metric that calculates the difference between two probability distributions. Each probability distribution is the distribution of predicted words",id:"Cross Entropy"},{description:"The Perplexity metric is the exponential of the cross-entropy loss. It evaluates the probabilities assigned to the next word by the model. Lower perplexity indicates better performance",id:"Perplexity"}],models:[{description:"A large language model trained for text generation.",id:"bigscience/bloom-560m"},{description:"A large code generation model that can generate code in 80+ languages.",id:"bigcode/starcoder"},{description:"A model trained to follow instructions, uses Pythia-12b as base model.",id:"databricks/dolly-v2-12b"},{description:"A model trained to follow instructions curated by community, uses Pythia-12b as base model.",id:"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5"},{description:"A large language model trained to generate text in English.",id:"stabilityai/stablelm-tuned-alpha-7b"},{description:"A model trained to follow instructions, based on mosaicml/mpt-7b.",id:"mosaicml/mpt-7b-instruct"},{description:"A large language model trained to generate text in English.",id:"EleutherAI/pythia-12b"},{description:"A large text-to-text model trained to follow instructions.",id:"google/flan-ul2"},{description:"A large and powerful text generation model.",id:"tiiuae/falcon-40b"},{description:"State-of-the-art open-source large language model.",id:"meta-llama/Llama-2-70b-hf"}],spaces:[{description:"A robust text generation model that can perform various tasks through natural language prompting.",id:"huggingface/bloom_demo"},{description:"An text generation based application that can write code for 80+ languages.",id:"bigcode/bigcode-playground"},{description:"An text generation based application for conversations.",id:"h2oai/h2ogpt-chatbot"},{description:"An text generation application that combines OpenAI and Hugging Face models.",id:"microsoft/HuggingGPT"},{description:"An text generation application that uses StableLM-tuned-alpha-7b.",id:"stabilityai/stablelm-tuned-alpha-chat"},{description:"An UI that uses StableLM-tuned-alpha-7b.",id:"togethercomputer/OpenChatKit"}],summary:"Generating text is the task of producing new text. These models can, for example, fill in incomplete text or paraphrase.",widgetModels:["HuggingFaceH4/zephyr-7b-beta"],youtubeId:"Vpjb1lu0MDk"},_0=C0,A0={datasets:[{description:"Microsoft Research Video to Text is a large-scale dataset for open domain video captioning",id:"iejMac/CLIP-MSR-VTT"},{description:"UCF101 Human Actions dataset consists of 13,320 video clips from YouTube, with 101 classes.",id:"quchenyuan/UCF101-ZIP"},{description:"A high-quality dataset for human action recognition in YouTube videos.",id:"nateraw/kinetics"},{description:"A dataset of video clips of humans performing pre-defined basic actions with everyday objects.",id:"HuggingFaceM4/something_something_v2"},{description:"This dataset consists of text-video pairs and contains noisy samples with irrelevant video descriptions",id:"HuggingFaceM4/webvid"},{description:"A dataset of short Flickr videos for the temporal localization of events with descriptions.",id:"iejMac/CLIP-DiDeMo"}],demo:{inputs:[{label:"Input",content:"Darth Vader is surfing on the waves.",type:"text"}],outputs:[{filename:"text-to-video-output.gif",type:"img"}]},metrics:[{description:"Inception Score uses an image classification model that predicts class labels and evaluates how distinct and diverse the images are. A higher score indicates better video generation.",id:"is"},{description:"Frechet Inception Distance uses an image classification model to obtain image embeddings. The metric compares mean and standard deviation of the embeddings of real and generated images. A smaller score indicates better video generation.",id:"fid"},{description:"Frechet Video Distance uses a model that captures coherence for changes in frames and the quality of each frame. A smaller score indicates better video generation.",id:"fvd"},{description:"CLIPSIM measures similarity between video frames and text using an image-text similarity model. A higher score indicates better video generation.",id:"clipsim"}],models:[{description:"A strong model for video generation.",id:"Vchitect/LaVie"},{description:"A robust model for text-to-video generation.",id:"damo-vilab/text-to-video-ms-1.7b"},{description:"A text-to-video generation model with high quality and smooth outputs.",id:"hotshotco/Hotshot-XL"}],spaces:[{description:"An application that generates video from text.",id:"fffiloni/zeroscope"},{description:"An application that generates video from image and text.",id:"Vchitect/LaVie"},{description:"An application that generates videos from text and provides multi-model support.",id:"ArtGAN/Video-Diffusion-WebUI"}],summary:"Text-to-video models can be used in any application that requires generating consistent sequence of images from text. ",widgetModels:[],youtubeId:void 0},j0=A0,T0={datasets:[{description:"The CIFAR-100 dataset consists of 60000 32x32 colour images in 100 classes, with 600 images per class.",id:"cifar100"},{description:"Multiple images of celebrities, used for facial expression translation.",id:"CelebA"}],demo:{inputs:[{label:"Seed",content:"42",type:"text"},{label:"Number of images to generate:",content:"4",type:"text"}],outputs:[{filename:"unconditional-image-generation-output.jpeg",type:"img"}]},metrics:[{description:"The inception score (IS) evaluates the quality of generated images. It measures the diversity of the generated images (the model predictions are evenly distributed across all possible labels) and their 'distinction' or 'sharpness' (the model confidently predicts a single label for each image).",id:"Inception score (IS)"},{description:"The Fréchet Inception Distance (FID) evaluates the quality of images created by a generative model by calculating the distance between feature vectors for real and generated images.",id:"Frećhet Inception Distance (FID)"}],models:[{description:"High-quality image generation model trained on the CIFAR-10 dataset. It synthesizes images of the ten classes presented in the dataset using diffusion probabilistic models, a class of latent variable models inspired by considerations from nonequilibrium thermodynamics.",id:"google/ddpm-cifar10-32"},{description:"High-quality image generation model trained on the 256x256 CelebA-HQ dataset. It synthesizes images of faces using diffusion probabilistic models, a class of latent variable models inspired by considerations from nonequilibrium thermodynamics.",id:"google/ddpm-celebahq-256"}],spaces:[{description:"An application that can generate realistic faces.",id:"CompVis/celeba-latent-diffusion"}],summary:"Unconditional image generation is the task of generating images with no condition in any context (like a prompt text or another image). Once trained, the model will create images that resemble its training data distribution.",widgetModels:[""],youtubeId:""},I0=T0,P0={datasets:[{description:"Benchmark dataset used for video classification with videos that belong to 400 classes.",id:"kinetics400"}],demo:{inputs:[{filename:"video-classification-input.gif",type:"img"}],outputs:[{type:"chart",data:[{label:"Playing Guitar",score:.514},{label:"Playing Tennis",score:.193},{label:"Cooking",score:.068}]}]},metrics:[{description:"",id:"accuracy"},{description:"",id:"recall"},{description:"",id:"precision"},{description:"",id:"f1"}],models:[{description:"Strong Video Classification model trained on the Kinects 400 dataset.",id:"MCG-NJU/videomae-base-finetuned-kinetics"},{description:"Strong Video Classification model trained on the Kinects 400 dataset.",id:"microsoft/xclip-base-patch32"}],spaces:[{description:"An application that classifies video at different timestamps.",id:"nateraw/lavila"},{description:"An application that classifies video.",id:"fcakyon/video-classification"}],summary:"Video classification is the task of assigning a label or class to an entire video. Videos are expected to have only one class for each video. Video classification models take a video as input and return a prediction about which class the video belongs to.",widgetModels:[],youtubeId:""},R0=P0,D0={datasets:[{description:"A widely used dataset containing questions (with answers) about images.",id:"Graphcore/vqa"},{description:"A dataset to benchmark visual reasoning based on text in images.",id:"textvqa"}],demo:{inputs:[{filename:"elephant.jpeg",type:"img"},{label:"Question",content:"What is in this image?",type:"text"}],outputs:[{type:"chart",data:[{label:"elephant",score:.97},{label:"elephants",score:.06},{label:"animal",score:.003}]}]},isPlaceholder:!1,metrics:[{description:"",id:"accuracy"},{description:"Measures how much a predicted answer differs from the ground truth based on the difference in their semantic meaning.",id:"wu-palmer similarity"}],models:[{description:"A visual question answering model trained to convert charts and plots to text.",id:"google/deplot"},{description:"A visual question answering model trained for mathematical reasoning and chart derendering from images.",id:"google/matcha-base "},{description:"A strong visual question answering that answers questions from book covers.",id:"google/pix2struct-ocrvqa-large"}],spaces:[{description:"An application that compares visual question answering models across different tasks.",id:"merve/pix2struct"},{description:"An application that can answer questions based on images.",id:"nielsr/vilt-vqa"},{description:"An application that can caption images and answer questions about a given image. ",id:"Salesforce/BLIP"},{description:"An application that can caption images and answer questions about a given image. ",id:"vumichien/Img2Prompt"}],summary:"Visual Question Answering is the task of answering open-ended questions based on an image. They output natural language responses to natural language questions.",widgetModels:["dandelin/vilt-b32-finetuned-vqa"],youtubeId:""},L0=D0,O0={datasets:[{description:"A widely used dataset used to benchmark multiple variants of text classification.",id:"glue"},{description:"The Multi-Genre Natural Language Inference (MultiNLI) corpus is a crowd-sourced collection of 433k sentence pairs annotated with textual entailment information.",id:"MultiNLI"},{description:"FEVER is a publicly available dataset for fact extraction and verification against textual sources.",id:"FEVER"}],demo:{inputs:[{label:"Text Input",content:"Dune is the best movie ever.",type:"text"},{label:"Candidate Labels",content:"CINEMA, ART, MUSIC",type:"text"}],outputs:[{type:"chart",data:[{label:"CINEMA",score:.9},{label:"ART",score:.1},{label:"MUSIC",score:0}]}]},metrics:[],models:[{description:"Powerful zero-shot text classification model",id:"facebook/bart-large-mnli"}],spaces:[],summary:"Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes.",widgetModels:["facebook/bart-large-mnli"]},N0=O0,M0={datasets:[{description:"",id:""}],demo:{inputs:[{filename:"image-classification-input.jpeg",type:"img"},{label:"Classes",content:"cat, dog, bird",type:"text"}],outputs:[{type:"chart",data:[{label:"Cat",score:.664},{label:"Dog",score:.329},{label:"Bird",score:.008}]}]},metrics:[{description:"Computes the number of times the correct label appears in top K labels predicted",id:"top-K accuracy"}],models:[{description:"Robust image classification model trained on publicly available image-caption data.",id:"openai/clip-vit-base-patch16"},{description:"Robust image classification model trained on publicly available image-caption data trained on additional high pixel data for better performance.",id:"openai/clip-vit-large-patch14-336"},{description:"Strong image classification model for biomedical domain.",id:"microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224"}],spaces:[{description:"An application that leverages zero shot image classification to find best captions to generate an image. ",id:"pharma/CLIP-Interrogator"}],summary:"Zero shot image classification is the task of classifying previously unseen classes during training of a model.",widgetModels:["openai/clip-vit-large-patch14-336"],youtubeId:""},F0=M0,z0={"audio-classification":["speechbrain","transformers","transformers.js"],"audio-to-audio":["asteroid","speechbrain"],"automatic-speech-recognition":["espnet","nemo","speechbrain","transformers","transformers.js"],conversational:["transformers"],"depth-estimation":["transformers","transformers.js"],"document-question-answering":["transformers","transformers.js"],"feature-extraction":["sentence-transformers","transformers","transformers.js"],"fill-mask":["transformers","transformers.js"],"graph-ml":["transformers"],"image-classification":["keras","timm","transformers","transformers.js"],"image-segmentation":["transformers","transformers.js"],"image-to-image":["diffusers","transformers","transformers.js"],"image-to-text":["transformers","transformers.js"],"image-to-video":["diffusers"],"video-classification":["transformers"],"mask-generation":["transformers"],"multiple-choice":["transformers"],"object-detection":["transformers","transformers.js"],other:[],"question-answering":["adapter-transformers","allennlp","transformers","transformers.js"],robotics:[],"reinforcement-learning":["transformers","stable-baselines3","ml-agents","sample-factory"],"sentence-similarity":["sentence-transformers","spacy","transformers.js"],summarization:["transformers","transformers.js"],"table-question-answering":["transformers"],"table-to-text":["transformers"],"tabular-classification":["sklearn"],"tabular-regression":["sklearn"],"tabular-to-text":["transformers"],"text-classification":["adapter-transformers","setfit","spacy","transformers","transformers.js"],"text-generation":["transformers","transformers.js"],"text-retrieval":[],"text-to-image":["diffusers"],"text-to-speech":["espnet","tensorflowtts","transformers","transformers.js"],"text-to-audio":["transformers","transformers.js"],"text-to-video":["diffusers"],"text2text-generation":["transformers","transformers.js"],"time-series-forecasting":[],"token-classification":["adapter-transformers","flair","spacy","span-marker","stanza","transformers","transformers.js"],translation:["transformers","transformers.js"],"unconditional-image-generation":["diffusers"],"visual-question-answering":["transformers","transformers.js"],"voice-activity-detection":[],"zero-shot-classification":["transformers","transformers.js"],"zero-shot-image-classification":["transformers","transformers.js"],"zero-shot-object-detection":["transformers","transformers.js"],"text-to-3d":[],"image-to-3d":[]};function W(e,t=Wr){return{...t,id:e,label:Fl[e].name,libraries:z0[e]}}W("audio-classification",Tv),W("audio-to-audio",Pv),W("automatic-speech-recognition",Dv),W("conversational",Ov),W("depth-estimation",Zv),W("document-question-answering",Mv),W("feature-extraction",zv),W("fill-mask",$v),W("image-classification",qv),W("image-segmentation",Gv),W("image-to-image",Hv),W("image-to-text",Wv),W("mask-generation",Wr),W("object-detection",Jv),W("video-classification",R0),W("question-answering",i0),W("reinforcement-learning",n0),W("sentence-similarity",o0),W("summarization",l0),W("table-question-answering",c0),W("tabular-classification",f0),W("tabular-regression",m0),W("text-classification",E0),W("text-generation",_0),W("text-to-image",g0),W("text-to-speech",v0),W("text-to-video",j0),W("token-classification",x0),W("translation",k0),W("unconditional-image-generation",I0),W("visual-question-answering",L0),W("zero-shot-classification",N0),W("zero-shot-image-classification",F0),W("zero-shot-object-detection",Wr),W("text-to-3d",Wr),W("image-to-3d",Wr);var cp=(e=>(e["adapter-transformers"]="Adapter Transformers",e.allennlp="allenNLP",e.asteroid="Asteroid",e.bertopic="BERTopic",e.diffusers="Diffusers",e.doctr="docTR",e.espnet="ESPnet",e.fairseq="Fairseq",e.flair="Flair",e.keras="Keras",e.k2="K2",e.mlx="MLX",e.nemo="NeMo",e.open_clip="OpenCLIP",e.paddlenlp="PaddleNLP",e.peft="PEFT",e["pyannote-audio"]="pyannote.audio",e["sample-factory"]="Sample Factory",e["sentence-transformers"]="Sentence Transformers",e.setfit="SetFit",e.sklearn="Scikit-learn",e.spacy="spaCy",e["span-marker"]="SpanMarker",e.speechbrain="speechbrain",e.tensorflowtts="TensorFlowTTS",e.timm="Timm",e.fastai="fastai",e.transformers="Transformers",e["transformers.js"]="Transformers.js",e.stanza="Stanza",e.fasttext="fastText",e["stable-baselines3"]="Stable-Baselines3",e["ml-agents"]="ML-Agents",e.pythae="Pythae",e.mindspore="MindSpore",e))(cp||{}),U0=Object.keys(cp);U0.filter(e=>!["doctr","k2","mindspore","tensorflowtts"].includes(e));var $0={};Pi($0,{curl:()=>fp,inputs:()=>dp,js:()=>wp,python:()=>mp});var dp={};Pi(dp,{getModelInputSnippet:()=>Ce});var B0=()=>'"Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"',q0=()=>'"Меня зовут Вольфганг и я живу в Берлине"',V0=()=>'"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."',H0=()=>`{ + "past_user_inputs": ["Which movie is the best ?"], + "generated_responses": ["It is Die Hard for sure."], + "text": "Can you explain why ?" + }`,Q0=()=>`{ + "query": "How many stars does the transformers repository have?", + "table": { + "Repository": ["Transformers", "Datasets", "Tokenizers"], + "Stars": ["36542", "4512", "3934"], + "Contributors": ["651", "77", "34"], + "Programming language": [ + "Python", + "Python", + "Rust, Python and NodeJS" + ] + } + }`,W0=()=>`{ + "image": "cat.png", + "question": "What is in this image?" + }`,K0=()=>`{ + "question": "What is my name?", + "context": "My name is Clara and I live in Berkeley." + }`,G0=()=>'"I like you. I love you"',Y0=()=>'"My name is Sarah Jessica Parker but you can call me Jessica"',J0=()=>'"Can you please let us know more details about your "',X0=()=>'"The answer to the universe is"',Z0=e=>`"The answer to the universe is ${e.mask_token}."`,ew=()=>`{ + "source_sentence": "That is a happy person", + "sentences": [ + "That is a happy dog", + "That is a very happy person", + "Today is a sunny day" + ] + }`,tw=()=>'"Today is a sunny day and I will get some ice cream."',nw=()=>'"cats.jpg"',rw=()=>'"cats.jpg"',iw=()=>'"cats.jpg"',aw=()=>'"cats.jpg"',ow=()=>'"sample1.flac"',sw=()=>'"sample1.flac"',lw=()=>'"Astronaut riding a horse"',uw=()=>'"The answer to the universe is 42"',cw=()=>'"liquid drum and bass, atmospheric synths, airy sounds"',dw=()=>'"sample1.flac"',Ac=()=>`'{"Height":[11.52,12.48],"Length1":[23.2,24.0],"Length2":[25.4,26.3],"Species": ["Bream","Bream"]}'`,fw=()=>'"cats.jpg"',pw={"audio-to-audio":ow,"audio-classification":sw,"automatic-speech-recognition":dw,conversational:H0,"document-question-answering":W0,"feature-extraction":tw,"fill-mask":Z0,"image-classification":nw,"image-to-text":rw,"image-segmentation":iw,"object-detection":aw,"question-answering":K0,"sentence-similarity":ew,summarization:V0,"table-question-answering":Q0,"tabular-regression":Ac,"tabular-classification":Ac,"text-classification":G0,"text-generation":J0,"text-to-image":lw,"text-to-speech":uw,"text-to-audio":cw,"text2text-generation":X0,"token-classification":Y0,translation:q0,"zero-shot-classification":B0,"zero-shot-image-classification":fw};function Ce(e,t=!1,n=!1){if(e.pipeline_tag){const r=pw[e.pipeline_tag];if(r){let i=r(e);if(t&&(i=i.replace(/(?:(?:\r?\n|\r)\t*)|\t+/g," ")),n){const a=/^"(.+)"$/s,o=i.match(a);i=o?o[1]:i}return i}}return"No input example has been defined for this model task."}var fp={};Pi(fp,{curlSnippets:()=>sr,getCurlInferenceSnippet:()=>mw,hasCurlInferenceSnippet:()=>hw,snippetBasic:()=>Me,snippetFile:()=>Gt,snippetZeroShotClassification:()=>pp});var Me=(e,t)=>`curl https://api-inference.huggingface.co/models/${e.id} \\ + -X POST \\ + -d '{"inputs": ${Ce(e,!0)}}' \\ + -H 'Content-Type: application/json' \\ + -H "Authorization: Bearer ${t||"{API_TOKEN}"}" +`,pp=(e,t)=>`curl https://api-inference.huggingface.co/models/${e.id} \\ + -X POST \\ + -d '{"inputs": ${Ce(e,!0)}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \\ + -H 'Content-Type: application/json' \\ + -H "Authorization: Bearer ${t||"{API_TOKEN}"}" +`,Gt=(e,t)=>`curl https://api-inference.huggingface.co/models/${e.id} \\ + -X POST \\ + --data-binary '@${Ce(e,!0,!0)}' \\ + -H "Authorization: Bearer ${t||"{API_TOKEN}"}" +`,sr={"text-classification":Me,"token-classification":Me,"table-question-answering":Me,"question-answering":Me,"zero-shot-classification":pp,translation:Me,summarization:Me,conversational:Me,"feature-extraction":Me,"text-generation":Me,"text2text-generation":Me,"fill-mask":Me,"sentence-similarity":Me,"automatic-speech-recognition":Gt,"text-to-image":Me,"text-to-speech":Me,"text-to-audio":Me,"audio-to-audio":Gt,"audio-classification":Gt,"image-classification":Gt,"image-to-text":Gt,"object-detection":Gt,"image-segmentation":Gt};function mw(e,t){var n;return e.pipeline_tag&&e.pipeline_tag in sr?((n=sr[e.pipeline_tag])==null?void 0:n.call(sr,e,t))??"":""}function hw(e){return!!e.pipeline_tag&&e.pipeline_tag in sr}var mp={};Pi(mp,{getPythonInferenceSnippet:()=>gw,hasPythonInferenceSnippet:()=>yw,pythonSnippets:()=>lr,snippetBasic:()=>Je,snippetDocumentQuestionAnswering:()=>vp,snippetFile:()=>Yt,snippetTabular:()=>Ns,snippetTextToAudio:()=>Ms,snippetTextToImage:()=>yp,snippetZeroShotClassification:()=>hp,snippetZeroShotImageClassification:()=>gp});var hp=e=>`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "inputs": ${Ce(e)}, + "parameters": {"candidate_labels": ["refund", "legal", "faq"]}, +})`,gp=e=>`def query(data): + with open(data["image_path"], "rb") as f: + img = f.read() + payload={ + "parameters": data["parameters"], + "inputs": base64.b64encode(img).decode("utf-8") + } + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "image_path": ${Ce(e)}, + "parameters": {"candidate_labels": ["cat", "dog", "llama"]}, +})`,Je=e=>`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "inputs": ${Ce(e)}, +})`,Yt=e=>`def query(filename): + with open(filename, "rb") as f: + data = f.read() + response = requests.post(API_URL, headers=headers, data=data) + return response.json() + +output = query(${Ce(e)})`,yp=e=>`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.content +image_bytes = query({ + "inputs": ${Ce(e)}, +}) +# You can access the image with PIL.Image for example +import io +from PIL import Image +image = Image.open(io.BytesIO(image_bytes))`,Ns=e=>`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.content +response = query({ + "inputs": {"data": ${Ce(e)}}, +})`,Ms=e=>e.library_name==="transformers"?`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.content + +audio_bytes = query({ + "inputs": ${Ce(e)}, +}) +# You can access the audio with IPython.display for example +from IPython.display import Audio +Audio(audio_bytes)`:`def query(payload): + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +audio, sampling_rate = query({ + "inputs": ${Ce(e)}, +}) +# You can access the audio with IPython.display for example +from IPython.display import Audio +Audio(audio, rate=sampling_rate)`,vp=e=>`def query(payload): + with open(payload["image"], "rb") as f: + img = f.read() + payload["image"] = base64.b64encode(img).decode("utf-8") + response = requests.post(API_URL, headers=headers, json=payload) + return response.json() + +output = query({ + "inputs": ${Ce(e)}, +})`,lr={"text-classification":Je,"token-classification":Je,"table-question-answering":Je,"question-answering":Je,"zero-shot-classification":hp,translation:Je,summarization:Je,conversational:Je,"feature-extraction":Je,"text-generation":Je,"text2text-generation":Je,"fill-mask":Je,"sentence-similarity":Je,"automatic-speech-recognition":Yt,"text-to-image":yp,"text-to-speech":Ms,"text-to-audio":Ms,"audio-to-audio":Yt,"audio-classification":Yt,"image-classification":Yt,"tabular-regression":Ns,"tabular-classification":Ns,"object-detection":Yt,"image-segmentation":Yt,"document-question-answering":vp,"image-to-text":Yt,"zero-shot-image-classification":gp};function gw(e,t){var r;const n=e.pipeline_tag&&e.pipeline_tag in lr?((r=lr[e.pipeline_tag])==null?void 0:r.call(lr,e))??"":"";return`import requests + +API_URL = "https://api-inference.huggingface.co/models/${e.id}" +headers = {"Authorization": ${t?`"Bearer ${t}"`:'f"Bearer {API_TOKEN}"'}} + +${n}`}function yw(e){return!!e.pipeline_tag&&e.pipeline_tag in lr}var wp={};Pi(wp,{getJsInferenceSnippet:()=>vw,hasJsInferenceSnippet:()=>ww,jsSnippets:()=>ur,snippetBasic:()=>Xe,snippetFile:()=>Jt,snippetTextToAudio:()=>Fs,snippetTextToImage:()=>Sp,snippetZeroShotClassification:()=>xp});var Xe=(e,t)=>`async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${e.id}", + { + headers: { Authorization: "Bearer ${t||"{API_TOKEN}"}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.json(); + return result; +} + +query({"inputs": ${Ce(e)}}).then((response) => { + console.log(JSON.stringify(response)); +});`,xp=(e,t)=>`async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${e.id}", + { + headers: { Authorization: "Bearer ${t||"{API_TOKEN}"}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.json(); + return result; +} + +query({"inputs": ${Ce(e)}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}).then((response) => { + console.log(JSON.stringify(response)); +});`,Sp=(e,t)=>`async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${e.id}", + { + headers: { Authorization: "Bearer ${t||"{API_TOKEN}"}" }, + method: "POST", + body: JSON.stringify(data), + } + ); + const result = await response.blob(); + return result; +} +query({"inputs": ${Ce(e)}}).then((response) => { + // Use image +});`,Fs=(e,t)=>{const n=`async function query(data) { + const response = await fetch( + "https://api-inference.huggingface.co/models/${e.id}", + { + headers: { Authorization: "Bearer ${t||"{API_TOKEN}"}" }, + method: "POST", + body: JSON.stringify(data), + } + );`;return e.library_name==="transformers"?n+` + const result = await response.blob(); + return result; + } + query({"inputs": ${Ce(e)}}).then((response) => { + // Returns a byte object of the Audio wavform. Use it directly! + });`:n+` + const result = await response.json(); + return result; + } + + query({"inputs": ${Ce(e)}}).then((response) => { + console.log(JSON.stringify(response)); + });`},Jt=(e,t)=>`async function query(filename) { + const data = fs.readFileSync(filename); + const response = await fetch( + "https://api-inference.huggingface.co/models/${e.id}", + { + headers: { Authorization: "Bearer ${t||"{API_TOKEN}"}" }, + method: "POST", + body: data, + } + ); + const result = await response.json(); + return result; +} + +query(${Ce(e)}).then((response) => { + console.log(JSON.stringify(response)); +});`,ur={"text-classification":Xe,"token-classification":Xe,"table-question-answering":Xe,"question-answering":Xe,"zero-shot-classification":xp,translation:Xe,summarization:Xe,conversational:Xe,"feature-extraction":Xe,"text-generation":Xe,"text2text-generation":Xe,"fill-mask":Xe,"sentence-similarity":Xe,"automatic-speech-recognition":Jt,"text-to-image":Sp,"text-to-speech":Fs,"text-to-audio":Fs,"audio-to-audio":Jt,"audio-classification":Jt,"image-classification":Jt,"image-to-text":Jt,"object-detection":Jt,"image-segmentation":Jt};function vw(e,t){var n;return e.pipeline_tag&&e.pipeline_tag in ur?((n=ur[e.pipeline_tag])==null?void 0:n.call(ur,e,t))??"":""}function ww(e){return!!e.pipeline_tag&&e.pipeline_tag in ur}var xw=Object.defineProperty,Sw=(e,t)=>{for(var n in t)xw(e,n,{get:t[n],enumerable:!0})},kw={};Sw(kw,{audioClassification:()=>_p,audioToAudio:()=>Tp,automaticSpeechRecognition:()=>Ap,conversational:()=>Mp,documentQuestionAnswering:()=>Gp,featureExtraction:()=>Fp,fillMask:()=>zp,imageClassification:()=>Ip,imageSegmentation:()=>Pp,imageToImage:()=>Op,imageToText:()=>Rp,objectDetection:()=>Dp,questionAnswering:()=>Up,request:()=>ee,sentenceSimilarity:()=>$p,streamingRequest:()=>zl,summarization:()=>Bp,tableQuestionAnswering:()=>qp,tabularClassification:()=>Xp,tabularRegression:()=>Jp,textClassification:()=>Vp,textGeneration:()=>Hp,textGenerationStream:()=>jw,textToImage:()=>Lp,textToSpeech:()=>jp,tokenClassification:()=>Qp,translation:()=>Wp,visualQuestionAnswering:()=>Yp,zeroShotClassification:()=>Kp,zeroShotImageClassification:()=>Np});function kp(e){return/^http(s?):/.test(e)||e.startsWith("/")}var Qn=new Map,bw=10*60*1e3,Ew=1e3,bp="https://huggingface.co";async function Ep(e,t,n){if(kp(e))return null;const r=`${e}:${t}`;let i=Qn.get(r);if(i&&i.dateo.json()).then(o=>o.pipeline_tag).catch(()=>null);if(!a)return null;i={task:a,date:new Date},Qn.set(r,{task:a,date:new Date}),Qn.size>Ew&&Qn.delete(Qn.keys().next().value)}return i.task}var jc="https://api-inference.huggingface.co",ea=null;async function Cp(e,t){const{accessToken:n,model:r,...i}=e;let{model:a}=e;const{forceTask:o,includeCredentials:s,taskHint:l,...u}=t??{},d={};if(n&&(d.Authorization=`Bearer ${n}`),!a&&!ea&&l){const k=await fetch(`${bp}/api/tasks`);k.ok&&(ea=await k.json())}if(!a&&ea&&l){const k=ea[l];k&&(a=k.models[0].id)}if(!a)throw new Error("No model provided, and no default model found for this task");const c="data"in e&&!!e.data;c?(t!=null&&t.wait_for_model&&(d["X-Wait-For-Model"]="true"),(t==null?void 0:t.use_cache)===!1&&(d["X-Use-Cache"]="false"),t!=null&&t.dont_load_model&&(d["X-Load-Model"]="0")):d["Content-Type"]="application/json";const g=kp(a)?a:o?`${jc}/pipeline/${o}/${a}`:`${jc}/models/${a}`;let v;typeof s=="string"?v=s:typeof s=="boolean"?v=s?"include":void 0:s===void 0&&(v="same-origin");const S={headers:d,method:"POST",body:c?e.data:JSON.stringify({...i,options:t&&u}),credentials:v,signal:t==null?void 0:t.signal};return{url:g,info:S}}async function ee(e,t){var a,o;const{url:n,info:r}=await Cp(e,t),i=await((t==null?void 0:t.fetch)??fetch)(n,r);if((t==null?void 0:t.retry_on_error)!==!1&&i.status===503&&!(t!=null&&t.wait_for_model))return ee(e,{...t,wait_for_model:!0});if(!i.ok){if((a=i.headers.get("Content-Type"))!=null&&a.startsWith("application/json")){const s=await i.json();if(s.error)throw new Error(s.error)}throw new Error("An error occurred while fetching the blob")}return(o=i.headers.get("Content-Type"))!=null&&o.startsWith("application/json")?await i.json():await i.blob()}function Cw(e){let t,n,r,i=!1;return function(o){t===void 0?(t=o,n=0,r=-1):t=Aw(t,o);const s=t.length;let l=0;for(;n0){const l=i.decode(o.subarray(0,s)),u=s+(o[s+1]===32?2:1),d=i.decode(o.subarray(u));switch(l){case"data":r.data=r.data?r.data+` +`+d:d;break;case"event":r.event=d;break;case"id":e(r.id=d);break;case"retry":const c=parseInt(d,10);isNaN(c)||t(r.retry=c);break}}}}function Aw(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Tc(){return{data:"",event:"",id:"",retry:void 0}}async function*zl(e,t){var u,d;const{url:n,info:r}=await Cp({...e,stream:!0},t),i=await((t==null?void 0:t.fetch)??fetch)(n,r);if((t==null?void 0:t.retry_on_error)!==!1&&i.status===503&&!(t!=null&&t.wait_for_model))return zl(e,{...t,wait_for_model:!0});if(!i.ok){if((u=i.headers.get("Content-Type"))!=null&&u.startsWith("application/json")){const c=await i.json();if(c.error)throw new Error(c.error)}throw new Error(`Server response contains error: ${i.status}`)}if(!((d=i.headers.get("content-type"))!=null&&d.startsWith("text/event-stream")))throw new Error("Server does not support event stream content type, it returned "+i.headers.get("content-type"));if(!i.body)return;const a=i.body.getReader();let o=[];const l=Cw(_w(()=>{},()=>{},c=>{o.push(c)}));try{for(;;){const{done:c,value:g}=await a.read();if(c)return;l(g);for(const v of o)if(v.data.length>0){const S=JSON.parse(v.data);if(typeof S=="object"&&S!==null&&"error"in S)throw new Error(S.error);yield S}o=[]}}finally{a.releaseLock()}}var ne=class extends TypeError{constructor(e){super(`Invalid inference output: ${e}. Use the 'request' method with the same parameters to do a custom call with no type checking.`),this.name="InferenceOutputError"}};async function _p(e,t){const n=await ee(e,{...t,taskHint:"audio-classification"});if(!(Array.isArray(n)&&n.every(i=>typeof i.label=="string"&&typeof i.score=="number")))throw new ne("Expected Array<{label: string, score: number}>");return n}async function Ap(e,t){const n=await ee(e,{...t,taskHint:"automatic-speech-recognition"});if(!(typeof(n==null?void 0:n.text)=="string"))throw new ne("Expected {text: string}");return n}async function jp(e,t){const n=await ee(e,{...t,taskHint:"text-to-speech"});if(!(n&&n instanceof Blob))throw new ne("Expected Blob");return n}async function Tp(e,t){const n=await ee(e,{...t,taskHint:"audio-to-audio"});if(!(Array.isArray(n)&&n.every(i=>typeof i.label=="string"&&typeof i.blob=="string"&&typeof i["content-type"]=="string")))throw new ne("Expected Array<{label: string, blob: string, content-type: string}>");return n}async function Ip(e,t){const n=await ee(e,{...t,taskHint:"image-classification"});if(!(Array.isArray(n)&&n.every(i=>typeof i.label=="string"&&typeof i.score=="number")))throw new ne("Expected Array<{label: string, score: number}>");return n}async function Pp(e,t){const n=await ee(e,{...t,taskHint:"image-segmentation"});if(!(Array.isArray(n)&&n.every(i=>typeof i.label=="string"&&typeof i.mask=="string"&&typeof i.score=="number")))throw new ne("Expected Array<{label: string, mask: string, score: number}>");return n}async function Rp(e,t){var r;const n=(r=await ee(e,{...t,taskHint:"image-to-text"}))==null?void 0:r[0];if(typeof(n==null?void 0:n.generated_text)!="string")throw new ne("Expected {generated_text: string}");return n}async function Dp(e,t){const n=await ee(e,{...t,taskHint:"object-detection"});if(!(Array.isArray(n)&&n.every(i=>typeof i.label=="string"&&typeof i.score=="number"&&typeof i.box.xmin=="number"&&typeof i.box.ymin=="number"&&typeof i.box.xmax=="number"&&typeof i.box.ymax=="number")))throw new ne("Expected Array<{label:string; score:number; box:{xmin:number; ymin:number; xmax:number; ymax:number}}>");return n}async function Lp(e,t){const n=await ee(e,{...t,taskHint:"text-to-image"});if(!(n&&n instanceof Blob))throw new ne("Expected Blob");return n}function no(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach(n=>{t.push(String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}async function Op(e,t){let n;e.parameters?n={...e,inputs:no(new Uint8Array(e.inputs instanceof ArrayBuffer?e.inputs:await e.inputs.arrayBuffer()))}:n={accessToken:e.accessToken,model:e.model,data:e.inputs};const r=await ee(n,{...t,taskHint:"image-to-image"});if(!(r&&r instanceof Blob))throw new ne("Expected Blob");return r}async function Np(e,t){const n={...e,inputs:{image:no(new Uint8Array(e.inputs.image instanceof ArrayBuffer?e.inputs.image:await e.inputs.image.arrayBuffer()))}},r=await ee(n,{...t,taskHint:"zero-shot-image-classification"});if(!(Array.isArray(r)&&r.every(a=>typeof a.label=="string"&&typeof a.score=="number")))throw new ne("Expected Array<{label: string, score: number}>");return r}async function Mp(e,t){const n=await ee(e,{...t,taskHint:"conversational"});if(!(Array.isArray(n.conversation.generated_responses)&&n.conversation.generated_responses.every(i=>typeof i=="string")&&Array.isArray(n.conversation.past_user_inputs)&&n.conversation.past_user_inputs.every(i=>typeof i=="string")&&typeof n.generated_text=="string"&&(typeof n.warnings>"u"||Array.isArray(n.warnings)&&n.warnings.every(i=>typeof i=="string"))))throw new ne("Expected {conversation: {generated_responses: string[], past_user_inputs: string[]}, generated_text: string, warnings: string[]}");return n}async function Fp(e,t){const n=e.model?await Ep(e.model,e.accessToken,t):void 0,r=await ee(e,{...t,taskHint:"feature-extraction",...n==="sentence-similarity"&&{forceTask:"feature-extraction"}});let i=!0;const a=(o,s,l=0)=>l>s?!1:o.every(u=>Array.isArray(u))?o.every(u=>a(u,s,l+1)):o.every(u=>typeof u=="number");if(i=Array.isArray(r)&&a(r,3,0),!i)throw new ne("Expected Array");return r}async function zp(e,t){const n=await ee(e,{...t,taskHint:"fill-mask"});if(!(Array.isArray(n)&&n.every(i=>typeof i.score=="number"&&typeof i.sequence=="string"&&typeof i.token=="number"&&typeof i.token_str=="string")))throw new ne("Expected Array<{score: number, sequence: string, token: number, token_str: string}>");return n}async function Up(e,t){const n=await ee(e,{...t,taskHint:"question-answering"});if(!(typeof n=="object"&&!!n&&typeof n.answer=="string"&&typeof n.end=="number"&&typeof n.score=="number"&&typeof n.start=="number"))throw new ne("Expected {answer: string, end: number, score: number, start: number}");return n}async function $p(e,t){const n=e.model?await Ep(e.model,e.accessToken,t):void 0,r=await ee(e,{...t,taskHint:"sentence-similarity",...n==="feature-extraction"&&{forceTask:"sentence-similarity"}});if(!(Array.isArray(r)&&r.every(a=>typeof a=="number")))throw new ne("Expected number[]");return r}async function Bp(e,t){const n=await ee(e,{...t,taskHint:"summarization"});if(!(Array.isArray(n)&&n.every(i=>typeof(i==null?void 0:i.summary_text)=="string")))throw new ne("Expected Array<{summary_text: string}>");return n==null?void 0:n[0]}async function qp(e,t){const n=await ee(e,{...t,taskHint:"table-question-answering"});if(!(typeof(n==null?void 0:n.aggregator)=="string"&&typeof n.answer=="string"&&Array.isArray(n.cells)&&n.cells.every(i=>typeof i=="string")&&Array.isArray(n.coordinates)&&n.coordinates.every(i=>Array.isArray(i)&&i.every(a=>typeof a=="number"))))throw new ne("Expected {aggregator: string, answer: string, cells: string[], coordinates: number[][]}");return n}async function Vp(e,t){var i;const n=(i=await ee(e,{...t,taskHint:"text-classification"}))==null?void 0:i[0];if(!(Array.isArray(n)&&n.every(a=>typeof(a==null?void 0:a.label)=="string"&&typeof a.score=="number")))throw new ne("Expected Array<{label: string, score: number}>");return n}async function Hp(e,t){const n=await ee(e,{...t,taskHint:"text-generation"});if(!(Array.isArray(n)&&n.every(i=>typeof(i==null?void 0:i.generated_text)=="string")))throw new ne("Expected Array<{generated_text: string}>");return n==null?void 0:n[0]}async function*jw(e,t){yield*zl(e,{...t,taskHint:"text-generation"})}function Ul(e){return Array.isArray(e)?e:[e]}async function Qp(e,t){const n=Ul(await ee(e,{...t,taskHint:"token-classification"}));if(!(Array.isArray(n)&&n.every(i=>typeof i.end=="number"&&typeof i.entity_group=="string"&&typeof i.score=="number"&&typeof i.start=="number"&&typeof i.word=="string")))throw new ne("Expected Array<{end: number, entity_group: string, score: number, start: number, word: string}>");return n}async function Wp(e,t){const n=await ee(e,{...t,taskHint:"translation"});if(!(Array.isArray(n)&&n.every(i=>typeof(i==null?void 0:i.translation_text)=="string")))throw new ne("Expected type Array<{translation_text: string}>");return n==null?void 0:n[0]}async function Kp(e,t){const n=Ul(await ee(e,{...t,taskHint:"zero-shot-classification"}));if(!(Array.isArray(n)&&n.every(i=>Array.isArray(i.labels)&&i.labels.every(a=>typeof a=="string")&&Array.isArray(i.scores)&&i.scores.every(a=>typeof a=="number")&&typeof i.sequence=="string")))throw new ne("Expected Array<{labels: string[], scores: number[], sequence: string}>");return n}async function Gp(e,t){var a;const n={...e,inputs:{question:e.inputs.question,image:no(new Uint8Array(e.inputs.image instanceof ArrayBuffer?e.inputs.image:await e.inputs.image.arrayBuffer()))}},r=(a=Ul(await ee(n,{...t,taskHint:"document-question-answering"})))==null?void 0:a[0];if(!(typeof(r==null?void 0:r.answer)=="string"&&(typeof r.end=="number"||typeof r.end>"u")&&(typeof r.score=="number"||typeof r.score>"u")&&(typeof r.start=="number"||typeof r.start>"u")))throw new ne("Expected Array<{answer: string, end?: number, score?: number, start?: number}>");return r}async function Yp(e,t){var a;const n={...e,inputs:{question:e.inputs.question,image:no(new Uint8Array(e.inputs.image instanceof ArrayBuffer?e.inputs.image:await e.inputs.image.arrayBuffer()))}},r=(a=await ee(n,{...t,taskHint:"visual-question-answering"}))==null?void 0:a[0];if(!(typeof(r==null?void 0:r.answer)=="string"&&typeof r.score=="number"))throw new ne("Expected Array<{answer: string, score: number}>");return r}async function Jp(e,t){const n=await ee(e,{...t,taskHint:"tabular-regression"});if(!(Array.isArray(n)&&n.every(i=>typeof i=="number")))throw new ne("Expected number[]");return n}async function Xp(e,t){const n=await ee(e,{...t,taskHint:"tabular-classification"});if(!(Array.isArray(n)&&n.every(i=>typeof i=="number")))throw new ne("Expected number[]");return n}const N=e=>f.jsx("button",{className:`border-4 border-yellow-200 ${e.variant==="secondary"?"":"bg-yellow-200"} w-full p-6 text-center ${e.disabled?"cursor-not-allowed opacity-50":""}`,disabled:e.disabled??!1,onClick:e.onClick,children:e.label??"Submit"}),$l=e=>f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Input"}),e.input?f.jsx("audio",{className:"w-full",controls:!0,src:URL.createObjectURL(e.input)}):f.jsxs("label",{className:"block w-full cursor-pointer bg-yellow-200 p-6 text-center",children:["No file chosen",f.jsx("input",{accept:"audio/*",className:"hidden",onChange:t=>{t.target.files&&t.target.files[0]&&e.setInput(t.target.files[0])},type:"file"})]})]}),F=e=>{const t=(()=>{try{return JSON.stringify(e.output,void 0,2)}catch(n){if(n instanceof Error)return`Error during JSON.stringify: ${n.message}`}})();return f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Output"}),f.jsx("pre",{className:`w-full select-text whitespace-pre-wrap break-words bg-yellow-200 p-6 ${e.disabled?"cursor-wait opacity-50":""}`,children:t})]})},Tw="audio-classification",Iw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await _p({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx($l,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.label)):f.jsx(p.Fragment,{})]})},Zp=e=>f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Output"}),f.jsx("audio",{className:`w-full ${e.disabled?"cursor-wait opacity-50":""}`,controls:!0,src:URL.createObjectURL(e.output)})]}),Pw="audio-to-audio",Rw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Tp({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx($l,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(Zp,{disabled:r,label:c.label,output:new Blob([c.blob],{type:c["content-type"]})},c.label)):f.jsx(p.Fragment,{})]})},Dw="automatic-speech-recognition",Lw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Ap({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx($l,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},we=e=>{const t=p.useRef(null);return p.useLayoutEffect(()=>{t.current&&(t.current.style.height="inherit",t.current.style.height=`${t.current.scrollHeight}px`)},[e.input]),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Input"}),f.jsx("textarea",{className:"w-full resize-none bg-yellow-200 p-6 text-center",disabled:e.disabled??!1,onChange:n=>{!e.disabled&&e.setInput&&(n.target.value?e.setInput(n.target.value):e.setInput(""))},ref:t,rows:1,style:{height:t.current?`${t.current.scrollHeight}px`:"inherit"},value:e.input??""})]})},Ow="conversational",Nw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0),l(v=>v?{...v,conversation:{...v.conversation,past_user_inputs:[...v.conversation.past_user_inputs,t]}}:{conversation:{generated_responses:[],past_user_inputs:[t]},generated_text:"",warnings:[]}),n(void 0);const c=s==null?void 0:s.conversation.generated_responses,g=s==null?void 0:s.conversation.past_user_inputs;try{const v=await Mp({inputs:{generated_responses:c,past_user_inputs:g,text:t},model:e.model});o(void 0),l(v)}catch(v){v instanceof Error&&o(v)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t&&!s,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?Array.from({length:Math.max(s.conversation.generated_responses.length,s.conversation.past_user_inputs.length)}).map((c,g,v)=>f.jsxs(p.Fragment,{children:[s.conversation.generated_responses[v.length-g-1]?f.jsx(F,{disabled:r,label:`Output - Generated Response #${v.length-g}`,output:s.conversation.generated_responses[v.length-g-1]}):f.jsx(p.Fragment,{}),s.conversation.past_user_inputs[v.length-g-1]?f.jsx(we,{disabled:!0,label:`Output - Past User Input #${v.length-g}`,input:s.conversation.past_user_inputs[v.length-g-1]}):f.jsx(p.Fragment,{})]},g)):f.jsx(p.Fragment,{})]})},xn=e=>f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Input"}),e.input?f.jsx("img",{className:"w-full",src:URL.createObjectURL(e.input)}):f.jsxs("label",{className:"block w-full cursor-pointer bg-yellow-200 p-6 text-center",children:["No file chosen",f.jsx("input",{accept:"image/*",className:"hidden",onChange:t=>{t.target.files&&t.target.files[0]&&e.setInput(t.target.files[0])},type:"file"})]})]}),Mw="document-question-answering",Fw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(),[a,o]=p.useState(!1),[s,l]=p.useState(),[u,d]=p.useState(),c=()=>{n(void 0),i(void 0),l(void 0),d(void 0)},g=async()=>{if(t&&r){o(!0);try{const v=await Gp({inputs:{question:t,image:r},model:e.model});l(void 0),d(v)}catch(v){v instanceof Error&&l(v)}finally{o(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,label:"Input - Question",setInput:n}),f.jsx(xn,{input:r,label:"Input - Image",setInput:i}),f.jsx(N,{label:"Clear",disabled:a||!r,onClick:c,variant:"secondary"}),f.jsx(N,{disabled:a||!r,onClick:g}),s?f.jsx(F,{disabled:a,label:"Error",output:s.message}):f.jsx(p.Fragment,{}),!s&&u?f.jsx(F,{disabled:a,output:u}):f.jsx(p.Fragment,{})]})},zw="feature-extraction",Uw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Fp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},$w="fill-mask",Bw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await zp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.token_str)):f.jsx(p.Fragment,{})]})},qw="image-classification",Vw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Ip({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.label)):f.jsx(p.Fragment,{})]})},Hw="image-segmentation",Qw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Pp({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.label)):f.jsx(p.Fragment,{})]})},em=e=>f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Output"}),f.jsx("img",{className:`w-full ${e.disabled?"cursor-wait opacity-50":""}`,src:URL.createObjectURL(e.output)})]}),Ww="image-to-image",Kw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Op({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(em,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},Gw="image-to-text",Yw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Rp({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},Jw="object-detection",Xw=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Dp({data:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.label)):f.jsx(p.Fragment,{})]})},Zw="question-answering",ex=e=>{const[t,n]=p.useState(),[r,i]=p.useState(),[a,o]=p.useState(!1),[s,l]=p.useState(),[u,d]=p.useState(),c=()=>{n(void 0),i(void 0),l(void 0),d(void 0)},g=async()=>{if(t&&r){o(!0);try{const v=await Up({inputs:{question:t,context:r},model:e.model});l(void 0),d(v)}catch(v){v instanceof Error&&l(v)}finally{o(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,label:"Input - Question",setInput:n}),f.jsx(we,{input:r,label:"Input - Context",setInput:i}),f.jsx(N,{label:"Clear",disabled:a||!t||!r,onClick:c,variant:"secondary"}),f.jsx(N,{disabled:a||!t||!r,onClick:g}),s?f.jsx(F,{disabled:a,label:"Error",output:s.message}):f.jsx(p.Fragment,{}),!s&&u?f.jsx(F,{disabled:a,output:u}):f.jsx(p.Fragment,{})]})},tx="sentence-similarity",nx=e=>{const[t,n]=p.useState(),r=Array.from({length:2}).map(()=>{}),[i,a]=p.useState(r),[o,s]=p.useState(!1),[l,u]=p.useState(),[d,c]=p.useState(),g=()=>{n(void 0),a(r),u(void 0),c(void 0)},v=async()=>{if(t&&i.every(Boolean)){s(!0);try{const S=await $p({inputs:{source_sentence:t,sentences:i},model:e.model});u(void 0),c(S)}catch(S){S instanceof Error&&u(S)}finally{s(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,label:"Input - Source Sentence",setInput:n}),i.map((S,k)=>f.jsx(we,{input:S,label:`Input - Sentence #${k+1}`,setInput:_=>a(h=>[...h.slice(0,k),_,...h.slice(k+1,h.length)])})),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Add Sentence",onClick:()=>a(S=>[...S,void 0])}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Clear",onClick:g,variant:"secondary"}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),onClick:v}),l?f.jsx(F,{disabled:o,label:"Error",output:l.message}):f.jsx(p.Fragment,{}),!l&&d?d.map((S,k)=>f.jsx(F,{disabled:o,label:`Output - Sentence #${k+1}`,output:S})):f.jsx(p.Fragment,{})]})},rx="summarization",ix=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Bp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},ax=async e=>{const t=await e.text();try{const n=JSON.parse(t);try{return JSON.stringify(n,void 0,2)}catch(r){if(r instanceof Error)return`Error during JSON.stringify: ${r.message}`}}catch(n){if(n instanceof Error)return`Error during JSON.parse: ${n.message}`}},Bl=e=>{const[t,n]=p.useState();return p.useEffect(()=>{e.input&&ax(e.input).then(n)},[e.input]),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:e.label??"Input"}),e.input?f.jsx("pre",{className:"w-full select-text whitespace-pre-wrap break-words bg-yellow-200 p-6",children:t}):f.jsxs("label",{className:"block w-full cursor-pointer bg-yellow-200 p-6 text-center",children:["No file chosen",f.jsx("input",{accept:".json",className:"hidden",onChange:r=>{r.target.files&&r.target.files[0]&&e.setInput(r.target.files[0])},type:"file"})]})]})},ox="table-question-answering",sx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(),[a,o]=p.useState(!1),[s,l]=p.useState(),[u,d]=p.useState(),c=()=>{n(void 0),i(void 0),l(void 0),d(void 0)},g=async()=>{if(t&&r){o(!0);try{const v=await qp({inputs:{query:t,table:JSON.parse(await r.text()??"{}")},model:e.model});l(void 0),d(v)}catch(v){v instanceof Error&&l(v)}finally{o(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,label:"Input - Query",setInput:n}),f.jsx(Bl,{input:r,label:"Input - Table",setInput:i}),f.jsx(N,{label:"Clear",disabled:a||!t,onClick:c,variant:"secondary"}),f.jsx(N,{disabled:a||!t,onClick:g}),s?f.jsx(F,{disabled:a,label:"Error",output:s.message}):f.jsx(p.Fragment,{}),!s&&u?f.jsx(F,{disabled:a,output:u}):f.jsx(p.Fragment,{})]})},lx="tabular-classification",ux=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Xp({inputs:{data:JSON.parse(await t.text()??"{}")},model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(Bl,{input:t,setInput:n}),f.jsx(N,{disabled:r||!t,label:"Clear",onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map((c,g)=>f.jsx(F,{disabled:r,label:`Output - Sentence #${g+1}`,output:c})):f.jsx(p.Fragment,{})]})},cx="tabular-regression",dx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Jp({inputs:{data:JSON.parse(await t.text()??"{}")},model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(Bl,{input:t,setInput:n}),f.jsx(N,{disabled:r||!t,label:"Clear",onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map((c,g)=>f.jsx(F,{disabled:r,label:`Output - Sentence #${g+1}`,output:c})):f.jsx(p.Fragment,{})]})},fx="text-classification",px=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Vp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.label)):f.jsx(p.Fragment,{})]})},mx="text-generation",hx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Hp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},gx="text-to-image",yx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Lp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(em,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},vx="text-to-speech",wx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await jp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(Zp,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},xx="token-classification",Sx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Qp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?s.map(c=>f.jsx(F,{disabled:r,output:c},c.word)):f.jsx(p.Fragment,{})]})},kx="translation",bx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(!1),[a,o]=p.useState(),[s,l]=p.useState(),u=()=>{n(void 0),o(void 0),l(void 0)},d=async()=>{if(t){i(!0);try{const c=await Wp({inputs:t,model:e.model});o(void 0),l(c)}catch(c){c instanceof Error&&o(c)}finally{i(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),f.jsx(N,{label:"Clear",disabled:r||!t,onClick:u,variant:"secondary"}),f.jsx(N,{disabled:r||!t,onClick:d}),a?f.jsx(F,{disabled:r,label:"Error",output:a.message}):f.jsx(p.Fragment,{}),!a&&s?f.jsx(F,{disabled:r,output:s}):f.jsx(p.Fragment,{})]})},Ex="visual-question-answering",Cx=e=>{const[t,n]=p.useState(),[r,i]=p.useState(),[a,o]=p.useState(!1),[s,l]=p.useState(),[u,d]=p.useState(),c=()=>{n(void 0),i(void 0),l(void 0),d(void 0)},g=async()=>{if(t&&r){o(!0);try{const v=await Yp({inputs:{question:t,image:r},model:e.model});l(void 0),d(v)}catch(v){v instanceof Error&&l(v)}finally{o(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,label:"Input - Question",setInput:n}),f.jsx(xn,{input:r,label:"Input - Image",setInput:i}),f.jsx(N,{label:"Clear",disabled:a||!r,onClick:c,variant:"secondary"}),f.jsx(N,{disabled:a||!r,onClick:g}),s?f.jsx(F,{disabled:a,label:"Error",output:s.message}):f.jsx(p.Fragment,{}),!s&&u?f.jsx(F,{disabled:a,output:u}):f.jsx(p.Fragment,{})]})},_x="zero-shot-classification",Ax=e=>{const[t,n]=p.useState(),r=Array.from({length:2}).map(()=>{}),[i,a]=p.useState(r),[o,s]=p.useState(!1),[l,u]=p.useState(),[d,c]=p.useState(),g=()=>{n(void 0),a(r),u(void 0),c(void 0)},v=async()=>{if(t&&i.every(Boolean)){s(!0);try{const S=await Kp({inputs:t,model:e.model,parameters:{candidate_labels:i}});u(void 0),c(S)}catch(S){S instanceof Error&&u(S)}finally{s(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(we,{input:t,setInput:n}),i.map((S,k)=>f.jsx(we,{input:S,label:`Parameter - Candidate Label #${k+1}`,setInput:_=>a(h=>[...h.slice(0,k),_,...h.slice(k+1,h.length)])})),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Add Candidate Label",onClick:()=>a(S=>[...S,void 0])}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Clear",onClick:g,variant:"secondary"}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),onClick:v}),l?f.jsx(F,{disabled:o,label:"Error",output:l.message}):f.jsx(p.Fragment,{}),!l&&d?d.map(S=>f.jsx(F,{disabled:o,output:S})):f.jsx(p.Fragment,{})]})},jx="zero-shot-image-classification",Tx=e=>{const[t,n]=p.useState(),r=Array.from({length:2}).map(()=>{}),[i,a]=p.useState(r),[o,s]=p.useState(!1),[l,u]=p.useState(),[d,c]=p.useState(),g=()=>{n(void 0),a(r),u(void 0),c(void 0)},v=async()=>{if(t&&i.every(Boolean)){s(!0);try{const S=await Np({inputs:{image:t},model:e.model,parameters:{candidate_labels:i}});u(void 0),c(S)}catch(S){S instanceof Error&&u(S)}finally{s(!1)}}};return f.jsxs(p.Fragment,{children:[f.jsx(xn,{input:t,setInput:n}),i.map((S,k)=>f.jsx(we,{input:S,label:`Parameter - Candidate Label #${k+1}`,setInput:_=>a(h=>[...h.slice(0,k),_,...h.slice(k+1,h.length)])})),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Add Candidate Label",onClick:()=>a(S=>[...S,void 0])}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),label:"Clear",onClick:g,variant:"secondary"}),f.jsx(N,{disabled:o||!t||!i.every(Boolean),onClick:v}),l?f.jsx(F,{disabled:o,label:"Error",output:l.message}):f.jsx(p.Fragment,{}),!l&&d?d.map(S=>f.jsx(F,{disabled:o,output:S})):f.jsx(p.Fragment,{})]})},Ix=[Tw,Pw,Dw,Ow,Mw,zw,$w,qw,Hw,Ww,Gw,Jw,Zw,tx,rx,ox,lx,cx,fx,mx,gx,vx,xx,kx,Ex,_x,jx],Px=e=>{if(!e.model||!e.task)return f.jsx(p.Fragment,{});switch(e.task){case"audio-classification":return f.jsx(Iw,{model:e.model});case"audio-to-audio":return f.jsx(Rw,{model:e.model});case"automatic-speech-recognition":return f.jsx(Lw,{model:e.model});case"conversational":return f.jsx(Nw,{model:e.model});case"document-question-answering":return f.jsx(Fw,{model:e.model});case"feature-extraction":return f.jsx(Uw,{model:e.model});case"fill-mask":return f.jsx(Bw,{model:e.model});case"image-classification":return f.jsx(Vw,{model:e.model});case"image-segmentation":return f.jsx(Qw,{model:e.model});case"image-to-image":return f.jsx(Kw,{model:e.model});case"image-to-text":return f.jsx(Yw,{model:e.model});case"object-detection":return f.jsx(Xw,{model:e.model});case"question-answering":return f.jsx(ex,{model:e.model});case"sentence-similarity":return f.jsx(nx,{model:e.model});case"summarization":return f.jsx(ix,{model:e.model});case"table-question-answering":return f.jsx(sx,{model:e.model});case"tabular-classification":return f.jsx(ux,{model:e.model});case"tabular-regression":return f.jsx(dx,{model:e.model});case"text-classification":return f.jsx(px,{model:e.model});case"text-generation":return f.jsx(hx,{model:e.model});case"text-to-image":return f.jsx(yx,{model:e.model});case"text-to-speech":return f.jsx(wx,{model:e.model});case"token-classification":return f.jsx(Sx,{model:e.model});case"translation":return f.jsx(bx,{model:e.model});case"visual-question-answering":return f.jsx(Cx,{model:e.model});case"zero-shot-classification":return f.jsx(Ax,{model:e.model});case"zero-shot-image-classification":return f.jsx(Tx,{model:e.model});default:return f.jsx(p.Fragment,{})}},zo={},Rx=1e3,Dx=async e=>{if(zo[e])return zo[e];const t=[];for await(const n of Cv({search:{task:e}}))t.push(n);return t.sort((n,r)=>n.downloads>r.downloads?-1:n.downloadsr.likes?-1:n.likesr.name?-1:n.name{var u,d,c,g;const[e,t]=p.useState(!1),[n,r]=p.useState([]),i=Ii(),a=op(),o=My(),s=((u=o["*"])==null?void 0:u.split("/")[0])||void 0,l=((d=o["*"])==null?void 0:d.split("/").length)===3?`${(c=o["*"])==null?void 0:c.split("/")[1]}/${(g=o["*"])==null?void 0:g.split("/")[2]}`:void 0;return p.useEffect(()=>{r([]),s&&(t(!0),Dx(s).then(v=>r(v.slice(0,Rx))).finally(()=>t(!1)))},[s]),f.jsx("div",{className:"min-w-screen flex h-full min-h-screen w-full flex-col items-center overflow-auto bg-yellow-500",children:f.jsxs("div",{className:"flex w-2/3 flex-col items-center justify-center space-y-12 py-24 lg:w-1/3",children:[f.jsx("header",{className:"text-center text-6xl",children:f.jsx(hv,{to:"/",children:"🤗"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:"Task"}),f.jsxs("select",{className:"w-full cursor-pointer bg-yellow-200 p-6 text-center",onChange:v=>{v.target.value&&a(v.target.value)},value:s??"",placeholder:"Select a task",children:[f.jsx("option",{children:"Select a task"}),Ix.map(v=>f.jsx("option",{value:v,children:v},v))]})]}),n.length>0?f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"text-xl",children:"Model"}),f.jsxs("select",{className:"w-full cursor-pointer bg-yellow-200 p-6 text-center",onChange:v=>{v.target.value&&a(`${i.pathname}/${v.target.value}`)},value:l??"",placeholder:"Select a model",children:[f.jsx("option",{children:"Select a model"}),n.map(v=>f.jsx("option",{value:v.name,children:v.name},v.name))]}),l?f.jsx("div",{className:"p-6 text-center font-bold text-yellow-200",children:f.jsx("a",{href:`https://huggingface.co/${l}`,rel:"noopener noferrer",target:"_blank",children:"View model on 🤗"})}):f.jsx(p.Fragment,{})]}):f.jsx("p",{className:"w-full text-center",children:s?e?"Loading models for this task":"No models available for this task":"Select a task to view available models"}),f.jsx(Px,{model:l,task:s})]})})},Ox=()=>{const t=document.getElementById("root");if(t){const n=Qf(t),i=nv([{element:f.jsx(Lx,{}),path:"*"}]),a=f.jsx(p.StrictMode,{children:f.jsx(dv,{router:i})});n.render(a)}};Ox();