13 lines
588 KiB
JavaScript
13 lines
588 KiB
JavaScript
function Vy(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in t)){const l=Object.getOwnPropertyDescriptor(i,a);l&&Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();var Za=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zc={exports:{}},Fa={},Gc={exports:{}},Ze={};var km;function F1(){if(km)return Ze;km=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function y(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function b(T,Q,ue){this.props=T,this.context=Q,this.refs=_,this.updater=ue||x}b.prototype.isReactComponent={},b.prototype.setState=function(T,Q){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,Q,"setState")},b.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function P(){}P.prototype=b.prototype;function N(T,Q,ue){this.props=T,this.context=Q,this.refs=_,this.updater=ue||x}var F=N.prototype=new P;F.constructor=N,S(F,b.prototype),F.isPureReactComponent=!0;var L=Array.isArray,k=Object.prototype.hasOwnProperty,I={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function re(T,Q,ue){var pe,Le={},qe=null,Ce=null;if(Q!=null)for(pe in Q.ref!==void 0&&(Ce=Q.ref),Q.key!==void 0&&(qe=""+Q.key),Q)k.call(Q,pe)&&!X.hasOwnProperty(pe)&&(Le[pe]=Q[pe]);var Ge=arguments.length-2;if(Ge===1)Le.children=ue;else if(1<Ge){for(var et=Array(Ge),Rt=0;Rt<Ge;Rt++)et[Rt]=arguments[Rt+2];Le.children=et}if(T&&T.defaultProps)for(pe in Ge=T.defaultProps,Ge)Le[pe]===void 0&&(Le[pe]=Ge[pe]);return{$$typeof:t,type:T,key:qe,ref:Ce,props:Le,_owner:I.current}}function de(T,Q){return{$$typeof:t,type:T.type,key:Q,ref:T.ref,props:T.props,_owner:T._owner}}function Z(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function Oe(T){var Q={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ue){return Q[ue]})}var J=/\/+/g;function ve(T,Q){return typeof T=="object"&&T!==null&&T.key!=null?Oe(""+T.key):Q.toString(36)}function me(T,Q,ue,pe,Le){var qe=typeof T;(qe==="undefined"||qe==="boolean")&&(T=null);var Ce=!1;if(T===null)Ce=!0;else switch(qe){case"string":case"number":Ce=!0;break;case"object":switch(T.$$typeof){case t:case e:Ce=!0}}if(Ce)return Ce=T,Le=Le(Ce),T=pe===""?"."+ve(Ce,0):pe,L(Le)?(ue="",T!=null&&(ue=T.replace(J,"$&/")+"/"),me(Le,Q,ue,"",function(Rt){return Rt})):Le!=null&&(Z(Le)&&(Le=de(Le,ue+(!Le.key||Ce&&Ce.key===Le.key?"":(""+Le.key).replace(J,"$&/")+"/")+T)),Q.push(Le)),1;if(Ce=0,pe=pe===""?".":pe+":",L(T))for(var Ge=0;Ge<T.length;Ge++){qe=T[Ge];var et=pe+ve(qe,Ge);Ce+=me(qe,Q,ue,et,Le)}else if(et=y(T),typeof et=="function")for(T=et.call(T),Ge=0;!(qe=T.next()).done;)qe=qe.value,et=pe+ve(qe,Ge++),Ce+=me(qe,Q,ue,et,Le);else if(qe==="object")throw Q=String(T),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ce}function M(T,Q,ue){if(T==null)return T;var pe=[],Le=0;return me(T,pe,"","",function(qe){return Q.call(ue,qe,Le++)}),pe}function R(T){if(T._status===-1){var Q=T._result;Q=Q(),Q.then(function(ue){(T._status===0||T._status===-1)&&(T._status=1,T._result=ue)},function(ue){(T._status===0||T._status===-1)&&(T._status=2,T._result=ue)}),T._status===-1&&(T._status=0,T._result=Q)}if(T._status===1)return T._result.default;throw T._result}var G={current:null},H={transition:null},W={ReactCurrentDispatcher:G,ReactCurrentBatchConfig:H,ReactCurrentOwner:I};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:M,forEach:function(T,Q,ue){M(T,function(){Q.apply(this,arguments)},ue)},count:function(T){var Q=0;return M(T,function(){Q++}),Q},toArray:function(T){return M(T,function(Q){return Q})||[]},only:function(T){if(!Z(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},Ze.Component=b,Ze.Fragment=r,Ze.Profiler=a,Ze.PureComponent=N,Ze.StrictMode=i,Ze.Suspense=m,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,Ze.act=K,Ze.cloneElement=function(T,Q,ue){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var pe=S({},T.props),Le=T.key,qe=T.ref,Ce=T._owner;if(Q!=null){if(Q.ref!==void 0&&(qe=Q.ref,Ce=I.current),Q.key!==void 0&&(Le=""+Q.key),T.type&&T.type.defaultProps)var Ge=T.type.defaultProps;for(et in Q)k.call(Q,et)&&!X.hasOwnProperty(et)&&(pe[et]=Q[et]===void 0&&Ge!==void 0?Ge[et]:Q[et])}var et=arguments.length-2;if(et===1)pe.children=ue;else if(1<et){Ge=Array(et);for(var Rt=0;Rt<et;Rt++)Ge[Rt]=arguments[Rt+2];pe.children=Ge}return{$$typeof:t,type:T.type,key:Le,ref:qe,props:pe,_owner:Ce}},Ze.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:l,_context:T},T.Consumer=T},Ze.createElement=re,Ze.createFactory=function(T){var Q=re.bind(null,T);return Q.type=T,Q},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(T){return{$$typeof:f,render:T}},Ze.isValidElement=Z,Ze.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:R}},Ze.memo=function(T,Q){return{$$typeof:p,type:T,compare:Q===void 0?null:Q}},Ze.startTransition=function(T){var Q=H.transition;H.transition={};try{T()}finally{H.transition=Q}},Ze.unstable_act=K,Ze.useCallback=function(T,Q){return G.current.useCallback(T,Q)},Ze.useContext=function(T){return G.current.useContext(T)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(T){return G.current.useDeferredValue(T)},Ze.useEffect=function(T,Q){return G.current.useEffect(T,Q)},Ze.useId=function(){return G.current.useId()},Ze.useImperativeHandle=function(T,Q,ue){return G.current.useImperativeHandle(T,Q,ue)},Ze.useInsertionEffect=function(T,Q){return G.current.useInsertionEffect(T,Q)},Ze.useLayoutEffect=function(T,Q){return G.current.useLayoutEffect(T,Q)},Ze.useMemo=function(T,Q){return G.current.useMemo(T,Q)},Ze.useReducer=function(T,Q,ue){return G.current.useReducer(T,Q,ue)},Ze.useRef=function(T){return G.current.useRef(T)},Ze.useState=function(T){return G.current.useState(T)},Ze.useSyncExternalStore=function(T,Q,ue){return G.current.useSyncExternalStore(T,Q,ue)},Ze.useTransition=function(){return G.current.useTransition()},Ze.version="18.3.1",Ze}var Nm;function po(){return Nm||(Nm=1,Gc.exports=F1()),Gc.exports}var Cm;function D1(){if(Cm)return Fa;Cm=1;var t=po(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(f,m,p){var v,w={},y=null,x=null;p!==void 0&&(y=""+p),m.key!==void 0&&(y=""+m.key),m.ref!==void 0&&(x=m.ref);for(v in m)i.call(m,v)&&!l.hasOwnProperty(v)&&(w[v]=m[v]);if(f&&f.defaultProps)for(v in m=f.defaultProps,m)w[v]===void 0&&(w[v]=m[v]);return{$$typeof:e,type:f,key:y,ref:x,props:w,_owner:a.current}}return Fa.Fragment=r,Fa.jsx=d,Fa.jsxs=d,Fa}var Em;function $1(){return Em||(Em=1,Zc.exports=D1()),Zc.exports}var u=$1(),$=po();const ne=iu($),z1=Vy({__proto__:null,default:ne},[$]);var kl={},Jc={exports:{}},Nn={},Yc={exports:{}},Xc={};var Pm;function U1(){return Pm||(Pm=1,(function(t){function e(H,W){var K=H.length;H.push(W);e:for(;0<K;){var T=K-1>>>1,Q=H[T];if(0<a(Q,W))H[T]=W,H[K]=Q,K=T;else break e}}function r(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var W=H[0],K=H.pop();if(K!==W){H[0]=K;e:for(var T=0,Q=H.length,ue=Q>>>1;T<ue;){var pe=2*(T+1)-1,Le=H[pe],qe=pe+1,Ce=H[qe];if(0>a(Le,K))qe<Q&&0>a(Ce,Le)?(H[T]=Ce,H[qe]=K,T=qe):(H[T]=Le,H[pe]=K,T=pe);else if(qe<Q&&0>a(Ce,K))H[T]=Ce,H[qe]=K,T=qe;else break e}}return W}function a(H,W){var K=H.sortIndex-W.sortIndex;return K!==0?K:H.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var m=[],p=[],v=1,w=null,y=3,x=!1,S=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(H){for(var W=r(p);W!==null;){if(W.callback===null)i(p);else if(W.startTime<=H)i(p),W.sortIndex=W.expirationTime,e(m,W);else break;W=r(p)}}function L(H){if(_=!1,F(H),!S)if(r(m)!==null)S=!0,R(k);else{var W=r(p);W!==null&&G(L,W.startTime-H)}}function k(H,W){S=!1,_&&(_=!1,P(re),re=-1),x=!0;var K=y;try{for(F(W),w=r(m);w!==null&&(!(w.expirationTime>W)||H&&!Oe());){var T=w.callback;if(typeof T=="function"){w.callback=null,y=w.priorityLevel;var Q=T(w.expirationTime<=W);W=t.unstable_now(),typeof Q=="function"?w.callback=Q:w===r(m)&&i(m),F(W)}else i(m);w=r(m)}if(w!==null)var ue=!0;else{var pe=r(p);pe!==null&&G(L,pe.startTime-W),ue=!1}return ue}finally{w=null,y=K,x=!1}}var I=!1,X=null,re=-1,de=5,Z=-1;function Oe(){return!(t.unstable_now()-Z<de)}function J(){if(X!==null){var H=t.unstable_now();Z=H;var W=!0;try{W=X(!0,H)}finally{W?ve():(I=!1,X=null)}}else I=!1}var ve;if(typeof N=="function")ve=function(){N(J)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,M=me.port2;me.port1.onmessage=J,ve=function(){M.postMessage(null)}}else ve=function(){b(J,0)};function R(H){X=H,I||(I=!0,ve())}function G(H,W){re=b(function(){H(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_continueExecution=function(){S||x||(S=!0,R(k))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_getFirstCallbackNode=function(){return r(m)},t.unstable_next=function(H){switch(y){case 1:case 2:case 3:var W=3;break;default:W=y}var K=y;y=W;try{return H()}finally{y=K}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,W){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=y;y=H;try{return W()}finally{y=K}},t.unstable_scheduleCallback=function(H,W,K){var T=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?T+K:T):K=T,H){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=K+Q,H={id:v++,callback:W,priorityLevel:H,startTime:K,expirationTime:Q,sortIndex:-1},K>T?(H.sortIndex=K,e(p,H),r(m)===null&&H===r(p)&&(_?(P(re),re=-1):_=!0,G(L,K-T))):(H.sortIndex=Q,e(m,H),S||x||(S=!0,R(k))),H},t.unstable_shouldYield=Oe,t.unstable_wrapCallback=function(H){var W=y;return function(){var K=y;y=W;try{return H.apply(this,arguments)}finally{y=K}}}})(Xc)),Xc}var Om;function V1(){return Om||(Om=1,Yc.exports=U1()),Yc.exports}var Rm;function B1(){if(Rm)return Nn;Rm=1;var t=po(),e=V1();function r(n){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+n,o=1;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function l(n,s){d(n,s),d(n+"Capture",s)}function d(n,s){for(a[n]=s,n=0;n<s.length;n++)i.add(s[n])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,p=/^[: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]*$/,v={},w={};function y(n){return m.call(w,n)?!0:m.call(v,n)?!1:p.test(n)?w[n]=!0:(v[n]=!0,!1)}function x(n,s,o,c){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function S(n,s,o,c){if(s===null||typeof s>"u"||x(n,s,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function _(n,s,o,c,h,g,j){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=o,this.propertyName=n,this.type=s,this.sanitizeURL=g,this.removeEmptyString=j}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){b[n]=new _(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];b[s]=new _(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){b[n]=new _(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){b[n]=new _(n,2,!1,n,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(n){b[n]=new _(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){b[n]=new _(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){b[n]=new _(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){b[n]=new _(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){b[n]=new _(n,5,!1,n.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function N(n){return n[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(n){var s=n.replace(P,N);b[s]=new _(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(P,N);b[s]=new _(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(P,N);b[s]=new _(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){b[n]=new _(n,1,!1,n.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){b[n]=new _(n,1,!1,n.toLowerCase(),null,!0,!0)});function F(n,s,o,c){var h=b.hasOwnProperty(s)?b[s]:null;(h!==null?h.type!==0:c||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,o,h,c)&&(o=null),c||h===null?y(s)&&(o===null?n.removeAttribute(s):n.setAttribute(s,""+o)):h.mustUseProperty?n[h.propertyName]=o===null?h.type===3?!1:"":o:(s=h.attributeName,c=h.attributeNamespace,o===null?n.removeAttribute(s):(h=h.type,o=h===3||h===4&&o===!0?"":""+o,c?n.setAttributeNS(c,s,o):n.setAttribute(s,o))))}var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),I=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),Z=Symbol.for("react.provider"),Oe=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),H=Symbol.iterator;function W(n){return n===null||typeof n!="object"?null:(n=H&&n[H]||n["@@iterator"],typeof n=="function"?n:null)}var K=Object.assign,T;function Q(n){if(T===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);T=s&&s[1]||""}return`
|
|
`+T+n}var ue=!1;function pe(n,s){if(!n||ue)return"";ue=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(q){var c=q}Reflect.construct(n,[],s)}else{try{s.call()}catch(q){c=q}n.call(s.prototype)}else{try{throw Error()}catch(q){c=q}n()}}catch(q){if(q&&c&&typeof q.stack=="string"){for(var h=q.stack.split(`
|
|
`),g=c.stack.split(`
|
|
`),j=h.length-1,C=g.length-1;1<=j&&0<=C&&h[j]!==g[C];)C--;for(;1<=j&&0<=C;j--,C--)if(h[j]!==g[C]){if(j!==1||C!==1)do if(j--,C--,0>C||h[j]!==g[C]){var O=`
|
|
`+h[j].replace(" at new "," at ");return n.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",n.displayName)),O}while(1<=j&&0<=C);break}}}finally{ue=!1,Error.prepareStackTrace=o}return(n=n?n.displayName||n.name:"")?Q(n):""}function Le(n){switch(n.tag){case 5:return Q(n.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return n=pe(n.type,!1),n;case 11:return n=pe(n.type.render,!1),n;case 1:return n=pe(n.type,!0),n;default:return""}}function qe(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case X:return"Fragment";case I:return"Portal";case de:return"Profiler";case re:return"StrictMode";case ve:return"Suspense";case me:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Oe:return(n.displayName||"Context")+".Consumer";case Z:return(n._context.displayName||"Context")+".Provider";case J:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return s=n.displayName||null,s!==null?s:qe(n.type)||"Memo";case R:s=n._payload,n=n._init;try{return qe(n(s))}catch{}}return null}function Ce(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qe(s);case 8:return s===re?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ge(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function et(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Rt(n){var s=et(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),c=""+n[s];if(!n.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,g=o.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return h.call(this)},set:function(j){c=""+j,g.call(this,j)}}),Object.defineProperty(n,s,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(j){c=""+j},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function yn(n){n._valueTracker||(n._valueTracker=Rt(n))}function Tr(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var o=s.getValue(),c="";return n&&(c=et(n)?n.checked?"true":"false":n.value),n=c,n!==o?(s.setValue(n),!0):!1}function Jn(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Lr(n,s){var o=s.checked;return K({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??n._wrapperState.initialChecked})}function ui(n,s){var o=s.defaultValue==null?"":s.defaultValue,c=s.checked!=null?s.checked:s.defaultChecked;o=Ge(s.value!=null?s.value:o),n._wrapperState={initialChecked:c,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Yr(n,s){s=s.checked,s!=null&&F(n,"checked",s,!1)}function Ms(n,s){Yr(n,s);var o=Ge(s.value),c=s.type;if(o!=null)c==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+o):n.value!==""+o&&(n.value=""+o);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?Xr(n,s.type,o):s.hasOwnProperty("defaultValue")&&Xr(n,s.type,Ge(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function Ar(n,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var c=s.type;if(!(c!=="submit"&&c!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,o||s===n.value||(n.value=s),n.defaultValue=s}o=n.name,o!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,o!==""&&(n.name=o)}function Xr(n,s,o){(s!=="number"||Jn(n.ownerDocument)!==n)&&(o==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+o&&(n.defaultValue=""+o))}var pr=Array.isArray;function vn(n,s,o,c){if(n=n.options,s){s={};for(var h=0;h<o.length;h++)s["$"+o[h]]=!0;for(o=0;o<n.length;o++)h=s.hasOwnProperty("$"+n[o].value),n[o].selected!==h&&(n[o].selected=h),h&&c&&(n[o].defaultSelected=!0)}else{for(o=""+Ge(o),s=null,h=0;h<n.length;h++){if(n[h].value===o){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}s!==null||n[h].disabled||(s=n[h])}s!==null&&(s.selected=!0)}}function Fs(n,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return K({},s,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Rn(n,s){var o=s.value;if(o==null){if(o=s.children,s=s.defaultValue,o!=null){if(s!=null)throw Error(r(92));if(pr(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),o=s}n._wrapperState={initialValue:Ge(o)}}function E(n,s){var o=Ge(s.value),c=Ge(s.defaultValue);o!=null&&(o=""+o,o!==n.value&&(n.value=o),s.defaultValue==null&&n.defaultValue!==o&&(n.defaultValue=o)),c!=null&&(n.defaultValue=""+c)}function z(n){var s=n.textContent;s===n._wrapperState.initialValue&&s!==""&&s!==null&&(n.value=s)}function V(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(n,s){return n==null||n==="http://www.w3.org/1999/xhtml"?V(s):n==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var le,ae=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,o,c,h){MSApp.execUnsafeLocalFunction(function(){return n(s,o,c,h)})}:n})(function(n,s){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=s;else{for(le=le||document.createElement("div"),le.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=le.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function ce(n,s){if(s){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=s;return}}n.textContent=s}var Ae={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},We=["Webkit","ms","Moz","O"];Object.keys(Ae).forEach(function(n){We.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),Ae[s]=Ae[n]})});function St(n,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||Ae.hasOwnProperty(n)&&Ae[n]?(""+s).trim():s+"px"}function Tt(n,s){n=n.style;for(var o in s)if(s.hasOwnProperty(o)){var c=o.indexOf("--")===0,h=St(o,s[o],c);o==="float"&&(o="cssFloat"),c?n.setProperty(o,h):n[o]=h}}var Ft=K({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 $n(n,s){if(s){if(Ft[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Ir(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){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 Mr=null;function es(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Fr=null,mr=null,Tn=null;function Yn(n){if(n=ja(n)){if(typeof Fr!="function")throw Error(r(280));var s=n.stateNode;s&&(s=zo(s),Fr(n.stateNode,n.type,s))}}function yo(n){mr?Tn?Tn.push(n):Tn=[n]:mr=n}function Fe(){if(mr){var n=mr,s=Tn;if(Tn=mr=null,Yn(n),s)for(n=0;n<s.length;n++)Yn(s[n])}}function at(n,s){return n(s)}function ct(){}var sn=!1;function xn(n,s,o){if(sn)return n(s,o);sn=!0;try{return at(n,s,o)}finally{sn=!1,(mr!==null||Tn!==null)&&(ct(),Fe())}}function wn(n,s){var o=n.stateNode;if(o===null)return null;var c=zo(o);if(c===null)return null;o=c[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,s,typeof o));return o}var Xn=!1;if(f)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Xn=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch{Xn=!1}function gr(n,s,o,c,h,g,j,C,O){var q=Array.prototype.slice.call(arguments,3);try{s.apply(o,q)}catch(ee){this.onError(ee)}}var ra=!1,vo=null,xo=!1,pu=null,qx={onError:function(n){ra=!0,vo=n}};function Hx(n,s,o,c,h,g,j,C,O){ra=!1,vo=null,gr.apply(qx,arguments)}function Wx(n,s,o,c,h,g,j,C,O){if(Hx.apply(this,arguments),ra){if(ra){var q=vo;ra=!1,vo=null}else throw Error(r(198));xo||(xo=!0,pu=q)}}function Ds(n){var s=n,o=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(o=s.return),n=s.return;while(n)}return s.tag===3?o:null}function Qf(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function Zf(n){if(Ds(n)!==n)throw Error(r(188))}function Kx(n){var s=n.alternate;if(!s){if(s=Ds(n),s===null)throw Error(r(188));return s!==n?null:n}for(var o=n,c=s;;){var h=o.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){o=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===o)return Zf(h),n;if(g===c)return Zf(h),s;g=g.sibling}throw Error(r(188))}if(o.return!==c.return)o=h,c=g;else{for(var j=!1,C=h.child;C;){if(C===o){j=!0,o=h,c=g;break}if(C===c){j=!0,c=h,o=g;break}C=C.sibling}if(!j){for(C=g.child;C;){if(C===o){j=!0,o=g,c=h;break}if(C===c){j=!0,c=g,o=h;break}C=C.sibling}if(!j)throw Error(r(189))}}if(o.alternate!==c)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:s}function Gf(n){return n=Kx(n),n!==null?Jf(n):null}function Jf(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var s=Jf(n);if(s!==null)return s;n=n.sibling}return null}var Yf=e.unstable_scheduleCallback,Xf=e.unstable_cancelCallback,Qx=e.unstable_shouldYield,Zx=e.unstable_requestPaint,Pt=e.unstable_now,Gx=e.unstable_getCurrentPriorityLevel,mu=e.unstable_ImmediatePriority,eh=e.unstable_UserBlockingPriority,wo=e.unstable_NormalPriority,Jx=e.unstable_LowPriority,th=e.unstable_IdlePriority,bo=null,yr=null;function Yx(n){if(yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(bo,n,void 0,(n.current.flags&128)===128)}catch{}}var er=Math.clz32?Math.clz32:t0,Xx=Math.log,e0=Math.LN2;function t0(n){return n>>>=0,n===0?32:31-(Xx(n)/e0|0)|0}var jo=64,_o=4194304;function sa(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function So(n,s){var o=n.pendingLanes;if(o===0)return 0;var c=0,h=n.suspendedLanes,g=n.pingedLanes,j=o&268435455;if(j!==0){var C=j&~h;C!==0?c=sa(C):(g&=j,g!==0&&(c=sa(g)))}else j=o&~h,j!==0?c=sa(j):g!==0&&(c=sa(g));if(c===0)return 0;if(s!==0&&s!==c&&(s&h)===0&&(h=c&-c,g=s&-s,h>=g||h===16&&(g&4194240)!==0))return s;if((c&4)!==0&&(c|=o&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=c;0<s;)o=31-er(s),h=1<<o,c|=n[o],s&=~h;return c}function n0(n,s){switch(n){case 1:case 2:case 4:return s+250;case 8:case 16:case 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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function r0(n,s){for(var o=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,g=n.pendingLanes;0<g;){var j=31-er(g),C=1<<j,O=h[j];O===-1?((C&o)===0||(C&c)!==0)&&(h[j]=n0(C,s)):O<=s&&(n.expiredLanes|=C),g&=~C}}function gu(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function nh(){var n=jo;return jo<<=1,(jo&4194240)===0&&(jo=64),n}function yu(n){for(var s=[],o=0;31>o;o++)s.push(n);return s}function ia(n,s,o){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-er(s),n[s]=o}function s0(n,s){var o=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<o;){var h=31-er(o),g=1<<h;s[h]=0,c[h]=-1,n[h]=-1,o&=~g}}function vu(n,s){var o=n.entangledLanes|=s;for(n=n.entanglements;o;){var c=31-er(o),h=1<<c;h&s|n[c]&s&&(n[c]|=s),o&=~h}}var ut=0;function rh(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var sh,xu,ih,ah,oh,wu=!1,ko=[],ts=null,ns=null,rs=null,aa=new Map,oa=new Map,ss=[],i0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function lh(n,s){switch(n){case"focusin":case"focusout":ts=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":aa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(s.pointerId)}}function la(n,s,o,c,h,g){return n===null||n.nativeEvent!==g?(n={blockedOn:s,domEventName:o,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},s!==null&&(s=ja(s),s!==null&&xu(s)),n):(n.eventSystemFlags|=c,s=n.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),n)}function a0(n,s,o,c,h){switch(s){case"focusin":return ts=la(ts,n,s,o,c,h),!0;case"dragenter":return ns=la(ns,n,s,o,c,h),!0;case"mouseover":return rs=la(rs,n,s,o,c,h),!0;case"pointerover":var g=h.pointerId;return aa.set(g,la(aa.get(g)||null,n,s,o,c,h)),!0;case"gotpointercapture":return g=h.pointerId,oa.set(g,la(oa.get(g)||null,n,s,o,c,h)),!0}return!1}function uh(n){var s=$s(n.target);if(s!==null){var o=Ds(s);if(o!==null){if(s=o.tag,s===13){if(s=Qf(o),s!==null){n.blockedOn=s,oh(n.priority,function(){ih(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function No(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var o=ju(n.domEventName,n.eventSystemFlags,s[0],n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);Mr=c,o.target.dispatchEvent(c),Mr=null}else return s=ja(o),s!==null&&xu(s),n.blockedOn=o,!1;s.shift()}return!0}function ch(n,s,o){No(n)&&o.delete(s)}function o0(){wu=!1,ts!==null&&No(ts)&&(ts=null),ns!==null&&No(ns)&&(ns=null),rs!==null&&No(rs)&&(rs=null),aa.forEach(ch),oa.forEach(ch)}function ua(n,s){n.blockedOn===s&&(n.blockedOn=null,wu||(wu=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,o0)))}function ca(n){function s(h){return ua(h,n)}if(0<ko.length){ua(ko[0],n);for(var o=1;o<ko.length;o++){var c=ko[o];c.blockedOn===n&&(c.blockedOn=null)}}for(ts!==null&&ua(ts,n),ns!==null&&ua(ns,n),rs!==null&&ua(rs,n),aa.forEach(s),oa.forEach(s),o=0;o<ss.length;o++)c=ss[o],c.blockedOn===n&&(c.blockedOn=null);for(;0<ss.length&&(o=ss[0],o.blockedOn===null);)uh(o),o.blockedOn===null&&ss.shift()}var ci=L.ReactCurrentBatchConfig,Co=!0;function l0(n,s,o,c){var h=ut,g=ci.transition;ci.transition=null;try{ut=1,bu(n,s,o,c)}finally{ut=h,ci.transition=g}}function u0(n,s,o,c){var h=ut,g=ci.transition;ci.transition=null;try{ut=4,bu(n,s,o,c)}finally{ut=h,ci.transition=g}}function bu(n,s,o,c){if(Co){var h=ju(n,s,o,c);if(h===null)$u(n,s,c,Eo,o),lh(n,c);else if(a0(h,n,s,o,c))c.stopPropagation();else if(lh(n,c),s&4&&-1<i0.indexOf(n)){for(;h!==null;){var g=ja(h);if(g!==null&&sh(g),g=ju(n,s,o,c),g===null&&$u(n,s,c,Eo,o),g===h)break;h=g}h!==null&&c.stopPropagation()}else $u(n,s,c,null,o)}}var Eo=null;function ju(n,s,o,c){if(Eo=null,n=es(c),n=$s(n),n!==null)if(s=Ds(n),s===null)n=null;else if(o=s.tag,o===13){if(n=Qf(s),n!==null)return n;n=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null);return Eo=n,null}function dh(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Gx()){case mu:return 1;case eh:return 4;case wo:case Jx:return 16;case th:return 536870912;default:return 16}default:return 16}}var is=null,_u=null,Po=null;function fh(){if(Po)return Po;var n,s=_u,o=s.length,c,h="value"in is?is.value:is.textContent,g=h.length;for(n=0;n<o&&s[n]===h[n];n++);var j=o-n;for(c=1;c<=j&&s[o-c]===h[g-c];c++);return Po=h.slice(n,1<c?1-c:void 0)}function Oo(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Ro(){return!0}function hh(){return!1}function Ln(n){function s(o,c,h,g,j){this._reactName=o,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=j,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(o=n[C],this[C]=o?o(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ro:hh,this.isPropagationStopped=hh,this}return K(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ro)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ro)},persist:function(){},isPersistent:Ro}),s}var di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Su=Ln(di),da=K({},di,{view:0,detail:0}),c0=Ln(da),ku,Nu,fa,To=K({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==fa&&(fa&&n.type==="mousemove"?(ku=n.screenX-fa.screenX,Nu=n.screenY-fa.screenY):Nu=ku=0,fa=n),ku)},movementY:function(n){return"movementY"in n?n.movementY:Nu}}),ph=Ln(To),d0=K({},To,{dataTransfer:0}),f0=Ln(d0),h0=K({},da,{relatedTarget:0}),Cu=Ln(h0),p0=K({},di,{animationName:0,elapsedTime:0,pseudoElement:0}),m0=Ln(p0),g0=K({},di,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),y0=Ln(g0),v0=K({},di,{data:0}),mh=Ln(v0),x0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},w0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},b0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j0(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=b0[n])?!!s[n]:!1}function Eu(){return j0}var _0=K({},da,{key:function(n){if(n.key){var s=x0[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Oo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?w0[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eu,charCode:function(n){return n.type==="keypress"?Oo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Oo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),S0=Ln(_0),k0=K({},To,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gh=Ln(k0),N0=K({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eu}),C0=Ln(N0),E0=K({},di,{propertyName:0,elapsedTime:0,pseudoElement:0}),P0=Ln(E0),O0=K({},To,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),R0=Ln(O0),T0=[9,13,27,32],Pu=f&&"CompositionEvent"in window,ha=null;f&&"documentMode"in document&&(ha=document.documentMode);var L0=f&&"TextEvent"in window&&!ha,yh=f&&(!Pu||ha&&8<ha&&11>=ha),vh=" ",xh=!1;function wh(n,s){switch(n){case"keyup":return T0.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var fi=!1;function A0(n,s){switch(n){case"compositionend":return bh(s);case"keypress":return s.which!==32?null:(xh=!0,vh);case"textInput":return n=s.data,n===vh&&xh?null:n;default:return null}}function I0(n,s){if(fi)return n==="compositionend"||!Pu&&wh(n,s)?(n=fh(),Po=_u=is=null,fi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return yh&&s.locale!=="ko"?null:s.data;default:return null}}var M0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jh(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!M0[n.type]:s==="textarea"}function _h(n,s,o,c){yo(c),s=Fo(s,"onChange"),0<s.length&&(o=new Su("onChange","change",null,o,c),n.push({event:o,listeners:s}))}var pa=null,ma=null;function F0(n){Uh(n,0)}function Lo(n){var s=yi(n);if(Tr(s))return n}function D0(n,s){if(n==="change")return s}var Sh=!1;if(f){var Ou;if(f){var Ru="oninput"in document;if(!Ru){var kh=document.createElement("div");kh.setAttribute("oninput","return;"),Ru=typeof kh.oninput=="function"}Ou=Ru}else Ou=!1;Sh=Ou&&(!document.documentMode||9<document.documentMode)}function Nh(){pa&&(pa.detachEvent("onpropertychange",Ch),ma=pa=null)}function Ch(n){if(n.propertyName==="value"&&Lo(ma)){var s=[];_h(s,ma,n,es(n)),xn(F0,s)}}function $0(n,s,o){n==="focusin"?(Nh(),pa=s,ma=o,pa.attachEvent("onpropertychange",Ch)):n==="focusout"&&Nh()}function z0(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Lo(ma)}function U0(n,s){if(n==="click")return Lo(s)}function V0(n,s){if(n==="input"||n==="change")return Lo(s)}function B0(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var tr=typeof Object.is=="function"?Object.is:B0;function ga(n,s){if(tr(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var o=Object.keys(n),c=Object.keys(s);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var h=o[c];if(!m.call(s,h)||!tr(n[h],s[h]))return!1}return!0}function Eh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ph(n,s){var o=Eh(n);n=0;for(var c;o;){if(o.nodeType===3){if(c=n+o.textContent.length,n<=s&&c>=s)return{node:o,offset:s-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Eh(o)}}function Oh(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Oh(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Rh(){for(var n=window,s=Jn();s instanceof n.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)n=s.contentWindow;else break;s=Jn(n.document)}return s}function Tu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function q0(n){var s=Rh(),o=n.focusedElem,c=n.selectionRange;if(s!==o&&o&&o.ownerDocument&&Oh(o.ownerDocument.documentElement,o)){if(c!==null&&Tu(o)){if(s=c.start,n=c.end,n===void 0&&(n=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(n,o.value.length);else if(n=(s=o.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var h=o.textContent.length,g=Math.min(c.start,h);c=c.end===void 0?g:Math.min(c.end,h),!n.extend&&g>c&&(h=c,c=g,g=h),h=Ph(o,g);var j=Ph(o,c);h&&j&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==j.node||n.focusOffset!==j.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),n.removeAllRanges(),g>c?(n.addRange(s),n.extend(j.node,j.offset)):(s.setEnd(j.node,j.offset),n.addRange(s)))}}for(s=[],n=o;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<s.length;o++)n=s[o],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var H0=f&&"documentMode"in document&&11>=document.documentMode,hi=null,Lu=null,ya=null,Au=!1;function Th(n,s,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Au||hi==null||hi!==Jn(c)||(c=hi,"selectionStart"in c&&Tu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ya&&ga(ya,c)||(ya=c,c=Fo(Lu,"onSelect"),0<c.length&&(s=new Su("onSelect","select",null,s,o),n.push({event:s,listeners:c}),s.target=hi)))}function Ao(n,s){var o={};return o[n.toLowerCase()]=s.toLowerCase(),o["Webkit"+n]="webkit"+s,o["Moz"+n]="moz"+s,o}var pi={animationend:Ao("Animation","AnimationEnd"),animationiteration:Ao("Animation","AnimationIteration"),animationstart:Ao("Animation","AnimationStart"),transitionend:Ao("Transition","TransitionEnd")},Iu={},Lh={};f&&(Lh=document.createElement("div").style,"AnimationEvent"in window||(delete pi.animationend.animation,delete pi.animationiteration.animation,delete pi.animationstart.animation),"TransitionEvent"in window||delete pi.transitionend.transition);function Io(n){if(Iu[n])return Iu[n];if(!pi[n])return n;var s=pi[n],o;for(o in s)if(s.hasOwnProperty(o)&&o in Lh)return Iu[n]=s[o];return n}var Ah=Io("animationend"),Ih=Io("animationiteration"),Mh=Io("animationstart"),Fh=Io("transitionend"),Dh=new Map,$h="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function as(n,s){Dh.set(n,s),l(s,[n])}for(var Mu=0;Mu<$h.length;Mu++){var Fu=$h[Mu],W0=Fu.toLowerCase(),K0=Fu[0].toUpperCase()+Fu.slice(1);as(W0,"on"+K0)}as(Ah,"onAnimationEnd"),as(Ih,"onAnimationIteration"),as(Mh,"onAnimationStart"),as("dblclick","onDoubleClick"),as("focusin","onFocus"),as("focusout","onBlur"),as(Fh,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var va="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Q0=new Set("cancel close invalid load scroll toggle".split(" ").concat(va));function zh(n,s,o){var c=n.type||"unknown-event";n.currentTarget=o,Wx(c,s,void 0,n),n.currentTarget=null}function Uh(n,s){s=(s&4)!==0;for(var o=0;o<n.length;o++){var c=n[o],h=c.event;c=c.listeners;e:{var g=void 0;if(s)for(var j=c.length-1;0<=j;j--){var C=c[j],O=C.instance,q=C.currentTarget;if(C=C.listener,O!==g&&h.isPropagationStopped())break e;zh(h,C,q),g=O}else for(j=0;j<c.length;j++){if(C=c[j],O=C.instance,q=C.currentTarget,C=C.listener,O!==g&&h.isPropagationStopped())break e;zh(h,C,q),g=O}}}if(xo)throw n=pu,xo=!1,pu=null,n}function ht(n,s){var o=s[Hu];o===void 0&&(o=s[Hu]=new Set);var c=n+"__bubble";o.has(c)||(Vh(s,n,2,!1),o.add(c))}function Du(n,s,o){var c=0;s&&(c|=4),Vh(o,n,c,s)}var Mo="_reactListening"+Math.random().toString(36).slice(2);function xa(n){if(!n[Mo]){n[Mo]=!0,i.forEach(function(o){o!=="selectionchange"&&(Q0.has(o)||Du(o,!1,n),Du(o,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Mo]||(s[Mo]=!0,Du("selectionchange",!1,s))}}function Vh(n,s,o,c){switch(dh(s)){case 1:var h=l0;break;case 4:h=u0;break;default:h=bu}o=h.bind(null,s,o,n),h=void 0,!Xn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(s,o,{capture:!0,passive:h}):n.addEventListener(s,o,!0):h!==void 0?n.addEventListener(s,o,{passive:h}):n.addEventListener(s,o,!1)}function $u(n,s,o,c,h){var g=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var j=c.tag;if(j===3||j===4){var C=c.stateNode.containerInfo;if(C===h||C.nodeType===8&&C.parentNode===h)break;if(j===4)for(j=c.return;j!==null;){var O=j.tag;if((O===3||O===4)&&(O=j.stateNode.containerInfo,O===h||O.nodeType===8&&O.parentNode===h))return;j=j.return}for(;C!==null;){if(j=$s(C),j===null)return;if(O=j.tag,O===5||O===6){c=g=j;continue e}C=C.parentNode}}c=c.return}xn(function(){var q=g,ee=es(o),te=[];e:{var Y=Dh.get(n);if(Y!==void 0){var he=Su,be=n;switch(n){case"keypress":if(Oo(o)===0)break e;case"keydown":case"keyup":he=S0;break;case"focusin":be="focus",he=Cu;break;case"focusout":be="blur",he=Cu;break;case"beforeblur":case"afterblur":he=Cu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=f0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=C0;break;case Ah:case Ih:case Mh:he=m0;break;case Fh:he=P0;break;case"scroll":he=c0;break;case"wheel":he=R0;break;case"copy":case"cut":case"paste":he=y0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=gh}var _e=(s&4)!==0,Ot=!_e&&n==="scroll",U=_e?Y!==null?Y+"Capture":null:Y;_e=[];for(var A=q,B;A!==null;){B=A;var se=B.stateNode;if(B.tag===5&&se!==null&&(B=se,U!==null&&(se=wn(A,U),se!=null&&_e.push(wa(A,se,B)))),Ot)break;A=A.return}0<_e.length&&(Y=new he(Y,be,null,o,ee),te.push({event:Y,listeners:_e}))}}if((s&7)===0){e:{if(Y=n==="mouseover"||n==="pointerover",he=n==="mouseout"||n==="pointerout",Y&&o!==Mr&&(be=o.relatedTarget||o.fromElement)&&($s(be)||be[Dr]))break e;if((he||Y)&&(Y=ee.window===ee?ee:(Y=ee.ownerDocument)?Y.defaultView||Y.parentWindow:window,he?(be=o.relatedTarget||o.toElement,he=q,be=be?$s(be):null,be!==null&&(Ot=Ds(be),be!==Ot||be.tag!==5&&be.tag!==6)&&(be=null)):(he=null,be=q),he!==be)){if(_e=ph,se="onMouseLeave",U="onMouseEnter",A="mouse",(n==="pointerout"||n==="pointerover")&&(_e=gh,se="onPointerLeave",U="onPointerEnter",A="pointer"),Ot=he==null?Y:yi(he),B=be==null?Y:yi(be),Y=new _e(se,A+"leave",he,o,ee),Y.target=Ot,Y.relatedTarget=B,se=null,$s(ee)===q&&(_e=new _e(U,A+"enter",be,o,ee),_e.target=B,_e.relatedTarget=Ot,se=_e),Ot=se,he&&be)t:{for(_e=he,U=be,A=0,B=_e;B;B=mi(B))A++;for(B=0,se=U;se;se=mi(se))B++;for(;0<A-B;)_e=mi(_e),A--;for(;0<B-A;)U=mi(U),B--;for(;A--;){if(_e===U||U!==null&&_e===U.alternate)break t;_e=mi(_e),U=mi(U)}_e=null}else _e=null;he!==null&&Bh(te,Y,he,_e,!1),be!==null&&Ot!==null&&Bh(te,Ot,be,_e,!0)}}e:{if(Y=q?yi(q):window,he=Y.nodeName&&Y.nodeName.toLowerCase(),he==="select"||he==="input"&&Y.type==="file")var Se=D0;else if(jh(Y))if(Sh)Se=V0;else{Se=z0;var Re=$0}else(he=Y.nodeName)&&he.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(Se=U0);if(Se&&(Se=Se(n,q))){_h(te,Se,o,ee);break e}Re&&Re(n,Y,q),n==="focusout"&&(Re=Y._wrapperState)&&Re.controlled&&Y.type==="number"&&Xr(Y,"number",Y.value)}switch(Re=q?yi(q):window,n){case"focusin":(jh(Re)||Re.contentEditable==="true")&&(hi=Re,Lu=q,ya=null);break;case"focusout":ya=Lu=hi=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,Th(te,o,ee);break;case"selectionchange":if(H0)break;case"keydown":case"keyup":Th(te,o,ee)}var Te;if(Pu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else fi?wh(n,o)&&(Me="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Me="onCompositionStart");Me&&(yh&&o.locale!=="ko"&&(fi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&fi&&(Te=fh()):(is=ee,_u="value"in is?is.value:is.textContent,fi=!0)),Re=Fo(q,Me),0<Re.length&&(Me=new mh(Me,n,null,o,ee),te.push({event:Me,listeners:Re}),Te?Me.data=Te:(Te=bh(o),Te!==null&&(Me.data=Te)))),(Te=L0?A0(n,o):I0(n,o))&&(q=Fo(q,"onBeforeInput"),0<q.length&&(ee=new mh("onBeforeInput","beforeinput",null,o,ee),te.push({event:ee,listeners:q}),ee.data=Te))}Uh(te,s)})}function wa(n,s,o){return{instance:n,listener:s,currentTarget:o}}function Fo(n,s){for(var o=s+"Capture",c=[];n!==null;){var h=n,g=h.stateNode;h.tag===5&&g!==null&&(h=g,g=wn(n,o),g!=null&&c.unshift(wa(n,g,h)),g=wn(n,s),g!=null&&c.push(wa(n,g,h))),n=n.return}return c}function mi(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Bh(n,s,o,c,h){for(var g=s._reactName,j=[];o!==null&&o!==c;){var C=o,O=C.alternate,q=C.stateNode;if(O!==null&&O===c)break;C.tag===5&&q!==null&&(C=q,h?(O=wn(o,g),O!=null&&j.unshift(wa(o,O,C))):h||(O=wn(o,g),O!=null&&j.push(wa(o,O,C)))),o=o.return}j.length!==0&&n.push({event:s,listeners:j})}var Z0=/\r\n?/g,G0=/\u0000|\uFFFD/g;function qh(n){return(typeof n=="string"?n:""+n).replace(Z0,`
|
|
`).replace(G0,"")}function Do(n,s,o){if(s=qh(s),qh(n)!==s&&o)throw Error(r(425))}function $o(){}var zu=null,Uu=null;function Vu(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Bu=typeof setTimeout=="function"?setTimeout:void 0,J0=typeof clearTimeout=="function"?clearTimeout:void 0,Hh=typeof Promise=="function"?Promise:void 0,Y0=typeof queueMicrotask=="function"?queueMicrotask:typeof Hh<"u"?function(n){return Hh.resolve(null).then(n).catch(X0)}:Bu;function X0(n){setTimeout(function(){throw n})}function qu(n,s){var o=s,c=0;do{var h=o.nextSibling;if(n.removeChild(o),h&&h.nodeType===8)if(o=h.data,o==="/$"){if(c===0){n.removeChild(h),ca(s);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=h}while(o);ca(s)}function os(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return n}function Wh(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"){if(s===0)return n;s--}else o==="/$"&&s++}n=n.previousSibling}return null}var gi=Math.random().toString(36).slice(2),vr="__reactFiber$"+gi,ba="__reactProps$"+gi,Dr="__reactContainer$"+gi,Hu="__reactEvents$"+gi,e1="__reactListeners$"+gi,t1="__reactHandles$"+gi;function $s(n){var s=n[vr];if(s)return s;for(var o=n.parentNode;o;){if(s=o[Dr]||o[vr]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(n=Wh(n);n!==null;){if(o=n[vr])return o;n=Wh(n)}return s}n=o,o=n.parentNode}return null}function ja(n){return n=n[vr]||n[Dr],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function yi(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function zo(n){return n[ba]||null}var Wu=[],vi=-1;function ls(n){return{current:n}}function pt(n){0>vi||(n.current=Wu[vi],Wu[vi]=null,vi--)}function ft(n,s){vi++,Wu[vi]=n.current,n.current=s}var us={},Qt=ls(us),bn=ls(!1),zs=us;function xi(n,s){var o=n.type.contextTypes;if(!o)return us;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===s)return c.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in o)h[g]=s[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=h),h}function jn(n){return n=n.childContextTypes,n!=null}function Uo(){pt(bn),pt(Qt)}function Kh(n,s,o){if(Qt.current!==us)throw Error(r(168));ft(Qt,s),ft(bn,o)}function Qh(n,s,o){var c=n.stateNode;if(s=s.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var h in c)if(!(h in s))throw Error(r(108,Ce(n)||"Unknown",h));return K({},o,c)}function Vo(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||us,zs=Qt.current,ft(Qt,n),ft(bn,bn.current),!0}function Zh(n,s,o){var c=n.stateNode;if(!c)throw Error(r(169));o?(n=Qh(n,s,zs),c.__reactInternalMemoizedMergedChildContext=n,pt(bn),pt(Qt),ft(Qt,n)):pt(bn),ft(bn,o)}var $r=null,Bo=!1,Ku=!1;function Gh(n){$r===null?$r=[n]:$r.push(n)}function n1(n){Bo=!0,Gh(n)}function cs(){if(!Ku&&$r!==null){Ku=!0;var n=0,s=ut;try{var o=$r;for(ut=1;n<o.length;n++){var c=o[n];do c=c(!0);while(c!==null)}$r=null,Bo=!1}catch(h){throw $r!==null&&($r=$r.slice(n+1)),Yf(mu,cs),h}finally{ut=s,Ku=!1}}return null}var wi=[],bi=0,qo=null,Ho=0,zn=[],Un=0,Us=null,zr=1,Ur="";function Vs(n,s){wi[bi++]=Ho,wi[bi++]=qo,qo=n,Ho=s}function Jh(n,s,o){zn[Un++]=zr,zn[Un++]=Ur,zn[Un++]=Us,Us=n;var c=zr;n=Ur;var h=32-er(c)-1;c&=~(1<<h),o+=1;var g=32-er(s)+h;if(30<g){var j=h-h%5;g=(c&(1<<j)-1).toString(32),c>>=j,h-=j,zr=1<<32-er(s)+h|o<<h|c,Ur=g+n}else zr=1<<g|o<<h|c,Ur=n}function Qu(n){n.return!==null&&(Vs(n,1),Jh(n,1,0))}function Zu(n){for(;n===qo;)qo=wi[--bi],wi[bi]=null,Ho=wi[--bi],wi[bi]=null;for(;n===Us;)Us=zn[--Un],zn[Un]=null,Ur=zn[--Un],zn[Un]=null,zr=zn[--Un],zn[Un]=null}var An=null,In=null,gt=!1,nr=null;function Yh(n,s){var o=Hn(5,null,null,0);o.elementType="DELETED",o.stateNode=s,o.return=n,s=n.deletions,s===null?(n.deletions=[o],n.flags|=16):s.push(o)}function Xh(n,s){switch(n.tag){case 5:var o=n.type;return s=s.nodeType!==1||o.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(n.stateNode=s,An=n,In=os(s.firstChild),!0):!1;case 6:return s=n.pendingProps===""||s.nodeType!==3?null:s,s!==null?(n.stateNode=s,An=n,In=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(o=Us!==null?{id:zr,overflow:Ur}:null,n.memoizedState={dehydrated:s,treeContext:o,retryLane:1073741824},o=Hn(18,null,null,0),o.stateNode=s,o.return=n,n.child=o,An=n,In=null,!0):!1;default:return!1}}function Gu(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Ju(n){if(gt){var s=In;if(s){var o=s;if(!Xh(n,s)){if(Gu(n))throw Error(r(418));s=os(o.nextSibling);var c=An;s&&Xh(n,s)?Yh(c,o):(n.flags=n.flags&-4097|2,gt=!1,An=n)}}else{if(Gu(n))throw Error(r(418));n.flags=n.flags&-4097|2,gt=!1,An=n}}}function ep(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;An=n}function Wo(n){if(n!==An)return!1;if(!gt)return ep(n),gt=!0,!1;var s;if((s=n.tag!==3)&&!(s=n.tag!==5)&&(s=n.type,s=s!=="head"&&s!=="body"&&!Vu(n.type,n.memoizedProps)),s&&(s=In)){if(Gu(n))throw tp(),Error(r(418));for(;s;)Yh(n,s),s=os(s.nextSibling)}if(ep(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,s=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"){if(s===0){In=os(n.nextSibling);break e}s--}else o!=="$"&&o!=="$!"&&o!=="$?"||s++}n=n.nextSibling}In=null}}else In=An?os(n.stateNode.nextSibling):null;return!0}function tp(){for(var n=In;n;)n=os(n.nextSibling)}function ji(){In=An=null,gt=!1}function Yu(n){nr===null?nr=[n]:nr.push(n)}var r1=L.ReactCurrentBatchConfig;function _a(n,s,o){if(n=o.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(r(309));var c=o.stateNode}if(!c)throw Error(r(147,n));var h=c,g=""+n;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===g?s.ref:(s=function(j){var C=h.refs;j===null?delete C[g]:C[g]=j},s._stringRef=g,s)}if(typeof n!="string")throw Error(r(284));if(!o._owner)throw Error(r(290,n))}return n}function Ko(n,s){throw n=Object.prototype.toString.call(s),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n))}function np(n){var s=n._init;return s(n._payload)}function rp(n){function s(U,A){if(n){var B=U.deletions;B===null?(U.deletions=[A],U.flags|=16):B.push(A)}}function o(U,A){if(!n)return null;for(;A!==null;)s(U,A),A=A.sibling;return null}function c(U,A){for(U=new Map;A!==null;)A.key!==null?U.set(A.key,A):U.set(A.index,A),A=A.sibling;return U}function h(U,A){return U=vs(U,A),U.index=0,U.sibling=null,U}function g(U,A,B){return U.index=B,n?(B=U.alternate,B!==null?(B=B.index,B<A?(U.flags|=2,A):B):(U.flags|=2,A)):(U.flags|=1048576,A)}function j(U){return n&&U.alternate===null&&(U.flags|=2),U}function C(U,A,B,se){return A===null||A.tag!==6?(A=Bc(B,U.mode,se),A.return=U,A):(A=h(A,B),A.return=U,A)}function O(U,A,B,se){var Se=B.type;return Se===X?ee(U,A,B.props.children,se,B.key):A!==null&&(A.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===R&&np(Se)===A.type)?(se=h(A,B.props),se.ref=_a(U,A,B),se.return=U,se):(se=yl(B.type,B.key,B.props,null,U.mode,se),se.ref=_a(U,A,B),se.return=U,se)}function q(U,A,B,se){return A===null||A.tag!==4||A.stateNode.containerInfo!==B.containerInfo||A.stateNode.implementation!==B.implementation?(A=qc(B,U.mode,se),A.return=U,A):(A=h(A,B.children||[]),A.return=U,A)}function ee(U,A,B,se,Se){return A===null||A.tag!==7?(A=Gs(B,U.mode,se,Se),A.return=U,A):(A=h(A,B),A.return=U,A)}function te(U,A,B){if(typeof A=="string"&&A!==""||typeof A=="number")return A=Bc(""+A,U.mode,B),A.return=U,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case k:return B=yl(A.type,A.key,A.props,null,U.mode,B),B.ref=_a(U,null,A),B.return=U,B;case I:return A=qc(A,U.mode,B),A.return=U,A;case R:var se=A._init;return te(U,se(A._payload),B)}if(pr(A)||W(A))return A=Gs(A,U.mode,B,null),A.return=U,A;Ko(U,A)}return null}function Y(U,A,B,se){var Se=A!==null?A.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return Se!==null?null:C(U,A,""+B,se);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case k:return B.key===Se?O(U,A,B,se):null;case I:return B.key===Se?q(U,A,B,se):null;case R:return Se=B._init,Y(U,A,Se(B._payload),se)}if(pr(B)||W(B))return Se!==null?null:ee(U,A,B,se,null);Ko(U,B)}return null}function he(U,A,B,se,Se){if(typeof se=="string"&&se!==""||typeof se=="number")return U=U.get(B)||null,C(A,U,""+se,Se);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case k:return U=U.get(se.key===null?B:se.key)||null,O(A,U,se,Se);case I:return U=U.get(se.key===null?B:se.key)||null,q(A,U,se,Se);case R:var Re=se._init;return he(U,A,B,Re(se._payload),Se)}if(pr(se)||W(se))return U=U.get(B)||null,ee(A,U,se,Se,null);Ko(A,se)}return null}function be(U,A,B,se){for(var Se=null,Re=null,Te=A,Me=A=0,Bt=null;Te!==null&&Me<B.length;Me++){Te.index>Me?(Bt=Te,Te=null):Bt=Te.sibling;var nt=Y(U,Te,B[Me],se);if(nt===null){Te===null&&(Te=Bt);break}n&&Te&&nt.alternate===null&&s(U,Te),A=g(nt,A,Me),Re===null?Se=nt:Re.sibling=nt,Re=nt,Te=Bt}if(Me===B.length)return o(U,Te),gt&&Vs(U,Me),Se;if(Te===null){for(;Me<B.length;Me++)Te=te(U,B[Me],se),Te!==null&&(A=g(Te,A,Me),Re===null?Se=Te:Re.sibling=Te,Re=Te);return gt&&Vs(U,Me),Se}for(Te=c(U,Te);Me<B.length;Me++)Bt=he(Te,U,Me,B[Me],se),Bt!==null&&(n&&Bt.alternate!==null&&Te.delete(Bt.key===null?Me:Bt.key),A=g(Bt,A,Me),Re===null?Se=Bt:Re.sibling=Bt,Re=Bt);return n&&Te.forEach(function(xs){return s(U,xs)}),gt&&Vs(U,Me),Se}function _e(U,A,B,se){var Se=W(B);if(typeof Se!="function")throw Error(r(150));if(B=Se.call(B),B==null)throw Error(r(151));for(var Re=Se=null,Te=A,Me=A=0,Bt=null,nt=B.next();Te!==null&&!nt.done;Me++,nt=B.next()){Te.index>Me?(Bt=Te,Te=null):Bt=Te.sibling;var xs=Y(U,Te,nt.value,se);if(xs===null){Te===null&&(Te=Bt);break}n&&Te&&xs.alternate===null&&s(U,Te),A=g(xs,A,Me),Re===null?Se=xs:Re.sibling=xs,Re=xs,Te=Bt}if(nt.done)return o(U,Te),gt&&Vs(U,Me),Se;if(Te===null){for(;!nt.done;Me++,nt=B.next())nt=te(U,nt.value,se),nt!==null&&(A=g(nt,A,Me),Re===null?Se=nt:Re.sibling=nt,Re=nt);return gt&&Vs(U,Me),Se}for(Te=c(U,Te);!nt.done;Me++,nt=B.next())nt=he(Te,U,Me,nt.value,se),nt!==null&&(n&&nt.alternate!==null&&Te.delete(nt.key===null?Me:nt.key),A=g(nt,A,Me),Re===null?Se=nt:Re.sibling=nt,Re=nt);return n&&Te.forEach(function(M1){return s(U,M1)}),gt&&Vs(U,Me),Se}function Ot(U,A,B,se){if(typeof B=="object"&&B!==null&&B.type===X&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case k:e:{for(var Se=B.key,Re=A;Re!==null;){if(Re.key===Se){if(Se=B.type,Se===X){if(Re.tag===7){o(U,Re.sibling),A=h(Re,B.props.children),A.return=U,U=A;break e}}else if(Re.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===R&&np(Se)===Re.type){o(U,Re.sibling),A=h(Re,B.props),A.ref=_a(U,Re,B),A.return=U,U=A;break e}o(U,Re);break}else s(U,Re);Re=Re.sibling}B.type===X?(A=Gs(B.props.children,U.mode,se,B.key),A.return=U,U=A):(se=yl(B.type,B.key,B.props,null,U.mode,se),se.ref=_a(U,A,B),se.return=U,U=se)}return j(U);case I:e:{for(Re=B.key;A!==null;){if(A.key===Re)if(A.tag===4&&A.stateNode.containerInfo===B.containerInfo&&A.stateNode.implementation===B.implementation){o(U,A.sibling),A=h(A,B.children||[]),A.return=U,U=A;break e}else{o(U,A);break}else s(U,A);A=A.sibling}A=qc(B,U.mode,se),A.return=U,U=A}return j(U);case R:return Re=B._init,Ot(U,A,Re(B._payload),se)}if(pr(B))return be(U,A,B,se);if(W(B))return _e(U,A,B,se);Ko(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,A!==null&&A.tag===6?(o(U,A.sibling),A=h(A,B),A.return=U,U=A):(o(U,A),A=Bc(B,U.mode,se),A.return=U,U=A),j(U)):o(U,A)}return Ot}var _i=rp(!0),sp=rp(!1),Qo=ls(null),Zo=null,Si=null,Xu=null;function ec(){Xu=Si=Zo=null}function tc(n){var s=Qo.current;pt(Qo),n._currentValue=s}function nc(n,s,o){for(;n!==null;){var c=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),n===o)break;n=n.return}}function ki(n,s){Zo=n,Xu=Si=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&s)!==0&&(_n=!0),n.firstContext=null)}function Vn(n){var s=n._currentValue;if(Xu!==n)if(n={context:n,memoizedValue:s,next:null},Si===null){if(Zo===null)throw Error(r(308));Si=n,Zo.dependencies={lanes:0,firstContext:n}}else Si=Si.next=n;return s}var Bs=null;function rc(n){Bs===null?Bs=[n]:Bs.push(n)}function ip(n,s,o,c){var h=s.interleaved;return h===null?(o.next=o,rc(s)):(o.next=h.next,h.next=o),s.interleaved=o,Vr(n,c)}function Vr(n,s){n.lanes|=s;var o=n.alternate;for(o!==null&&(o.lanes|=s),o=n,n=n.return;n!==null;)n.childLanes|=s,o=n.alternate,o!==null&&(o.childLanes|=s),o=n,n=n.return;return o.tag===3?o.stateNode:null}var ds=!1;function sc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ap(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Br(n,s){return{eventTime:n,lane:s,tag:0,payload:null,callback:null,next:null}}function fs(n,s,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(tt&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,Vr(n,o)}return h=c.interleaved,h===null?(s.next=s,rc(c)):(s.next=h.next,h.next=s),c.interleaved=s,Vr(n,o)}function Go(n,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var c=s.lanes;c&=n.pendingLanes,o|=c,s.lanes=o,vu(n,o)}}function op(n,s){var o=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var h=null,g=null;if(o=o.firstBaseUpdate,o!==null){do{var j={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};g===null?h=g=j:g=g.next=j,o=o.next}while(o!==null);g===null?h=g=s:g=g.next=s}else h=g=s;o={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,effects:c.effects},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=s:n.next=s,o.lastBaseUpdate=s}function Jo(n,s,o,c){var h=n.updateQueue;ds=!1;var g=h.firstBaseUpdate,j=h.lastBaseUpdate,C=h.shared.pending;if(C!==null){h.shared.pending=null;var O=C,q=O.next;O.next=null,j===null?g=q:j.next=q,j=O;var ee=n.alternate;ee!==null&&(ee=ee.updateQueue,C=ee.lastBaseUpdate,C!==j&&(C===null?ee.firstBaseUpdate=q:C.next=q,ee.lastBaseUpdate=O))}if(g!==null){var te=h.baseState;j=0,ee=q=O=null,C=g;do{var Y=C.lane,he=C.eventTime;if((c&Y)===Y){ee!==null&&(ee=ee.next={eventTime:he,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var be=n,_e=C;switch(Y=s,he=o,_e.tag){case 1:if(be=_e.payload,typeof be=="function"){te=be.call(he,te,Y);break e}te=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=_e.payload,Y=typeof be=="function"?be.call(he,te,Y):be,Y==null)break e;te=K({},te,Y);break e;case 2:ds=!0}}C.callback!==null&&C.lane!==0&&(n.flags|=64,Y=h.effects,Y===null?h.effects=[C]:Y.push(C))}else he={eventTime:he,lane:Y,tag:C.tag,payload:C.payload,callback:C.callback,next:null},ee===null?(q=ee=he,O=te):ee=ee.next=he,j|=Y;if(C=C.next,C===null){if(C=h.shared.pending,C===null)break;Y=C,C=Y.next,Y.next=null,h.lastBaseUpdate=Y,h.shared.pending=null}}while(!0);if(ee===null&&(O=te),h.baseState=O,h.firstBaseUpdate=q,h.lastBaseUpdate=ee,s=h.shared.interleaved,s!==null){h=s;do j|=h.lane,h=h.next;while(h!==s)}else g===null&&(h.shared.lanes=0);Ws|=j,n.lanes=j,n.memoizedState=te}}function lp(n,s,o){if(n=s.effects,s.effects=null,n!==null)for(s=0;s<n.length;s++){var c=n[s],h=c.callback;if(h!==null){if(c.callback=null,c=o,typeof h!="function")throw Error(r(191,h));h.call(c)}}}var Sa={},xr=ls(Sa),ka=ls(Sa),Na=ls(Sa);function qs(n){if(n===Sa)throw Error(r(174));return n}function ic(n,s){switch(ft(Na,s),ft(ka,n),ft(xr,Sa),n=s.nodeType,n){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:oe(null,"");break;default:n=n===8?s.parentNode:s,s=n.namespaceURI||null,n=n.tagName,s=oe(s,n)}pt(xr),ft(xr,s)}function Ni(){pt(xr),pt(ka),pt(Na)}function up(n){qs(Na.current);var s=qs(xr.current),o=oe(s,n.type);s!==o&&(ft(ka,n),ft(xr,o))}function ac(n){ka.current===n&&(pt(xr),pt(ka))}var wt=ls(0);function Yo(n){for(var s=n;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var oc=[];function lc(){for(var n=0;n<oc.length;n++)oc[n]._workInProgressVersionPrimary=null;oc.length=0}var Xo=L.ReactCurrentDispatcher,uc=L.ReactCurrentBatchConfig,Hs=0,bt=null,Dt=null,Ut=null,el=!1,Ca=!1,Ea=0,s1=0;function Zt(){throw Error(r(321))}function cc(n,s){if(s===null)return!1;for(var o=0;o<s.length&&o<n.length;o++)if(!tr(n[o],s[o]))return!1;return!0}function dc(n,s,o,c,h,g){if(Hs=g,bt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Xo.current=n===null||n.memoizedState===null?l1:u1,n=o(c,h),Ca){g=0;do{if(Ca=!1,Ea=0,25<=g)throw Error(r(301));g+=1,Ut=Dt=null,s.updateQueue=null,Xo.current=c1,n=o(c,h)}while(Ca)}if(Xo.current=rl,s=Dt!==null&&Dt.next!==null,Hs=0,Ut=Dt=bt=null,el=!1,s)throw Error(r(300));return n}function fc(){var n=Ea!==0;return Ea=0,n}function wr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?bt.memoizedState=Ut=n:Ut=Ut.next=n,Ut}function Bn(){if(Dt===null){var n=bt.alternate;n=n!==null?n.memoizedState:null}else n=Dt.next;var s=Ut===null?bt.memoizedState:Ut.next;if(s!==null)Ut=s,Dt=n;else{if(n===null)throw Error(r(310));Dt=n,n={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Ut===null?bt.memoizedState=Ut=n:Ut=Ut.next=n}return Ut}function Pa(n,s){return typeof s=="function"?s(n):s}function hc(n){var s=Bn(),o=s.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var c=Dt,h=c.baseQueue,g=o.pending;if(g!==null){if(h!==null){var j=h.next;h.next=g.next,g.next=j}c.baseQueue=h=g,o.pending=null}if(h!==null){g=h.next,c=c.baseState;var C=j=null,O=null,q=g;do{var ee=q.lane;if((Hs&ee)===ee)O!==null&&(O=O.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),c=q.hasEagerState?q.eagerState:n(c,q.action);else{var te={lane:ee,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};O===null?(C=O=te,j=c):O=O.next=te,bt.lanes|=ee,Ws|=ee}q=q.next}while(q!==null&&q!==g);O===null?j=c:O.next=C,tr(c,s.memoizedState)||(_n=!0),s.memoizedState=c,s.baseState=j,s.baseQueue=O,o.lastRenderedState=c}if(n=o.interleaved,n!==null){h=n;do g=h.lane,bt.lanes|=g,Ws|=g,h=h.next;while(h!==n)}else h===null&&(o.lanes=0);return[s.memoizedState,o.dispatch]}function pc(n){var s=Bn(),o=s.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var c=o.dispatch,h=o.pending,g=s.memoizedState;if(h!==null){o.pending=null;var j=h=h.next;do g=n(g,j.action),j=j.next;while(j!==h);tr(g,s.memoizedState)||(_n=!0),s.memoizedState=g,s.baseQueue===null&&(s.baseState=g),o.lastRenderedState=g}return[g,c]}function cp(){}function dp(n,s){var o=bt,c=Bn(),h=s(),g=!tr(c.memoizedState,h);if(g&&(c.memoizedState=h,_n=!0),c=c.queue,mc(pp.bind(null,o,c,n),[n]),c.getSnapshot!==s||g||Ut!==null&&Ut.memoizedState.tag&1){if(o.flags|=2048,Oa(9,hp.bind(null,o,c,h,s),void 0,null),Vt===null)throw Error(r(349));(Hs&30)!==0||fp(o,s,h)}return h}function fp(n,s,o){n.flags|=16384,n={getSnapshot:s,value:o},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.stores=[n]):(o=s.stores,o===null?s.stores=[n]:o.push(n))}function hp(n,s,o,c){s.value=o,s.getSnapshot=c,mp(s)&&gp(n)}function pp(n,s,o){return o(function(){mp(s)&&gp(n)})}function mp(n){var s=n.getSnapshot;n=n.value;try{var o=s();return!tr(n,o)}catch{return!0}}function gp(n){var s=Vr(n,1);s!==null&&ar(s,n,1,-1)}function yp(n){var s=wr();return typeof n=="function"&&(n=n()),s.memoizedState=s.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:n},s.queue=n,n=n.dispatch=o1.bind(null,bt,n),[s.memoizedState,n]}function Oa(n,s,o,c){return n={tag:n,create:s,destroy:o,deps:c,next:null},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.lastEffect=n.next=n):(o=s.lastEffect,o===null?s.lastEffect=n.next=n:(c=o.next,o.next=n,n.next=c,s.lastEffect=n)),n}function vp(){return Bn().memoizedState}function tl(n,s,o,c){var h=wr();bt.flags|=n,h.memoizedState=Oa(1|s,o,void 0,c===void 0?null:c)}function nl(n,s,o,c){var h=Bn();c=c===void 0?null:c;var g=void 0;if(Dt!==null){var j=Dt.memoizedState;if(g=j.destroy,c!==null&&cc(c,j.deps)){h.memoizedState=Oa(s,o,g,c);return}}bt.flags|=n,h.memoizedState=Oa(1|s,o,g,c)}function xp(n,s){return tl(8390656,8,n,s)}function mc(n,s){return nl(2048,8,n,s)}function wp(n,s){return nl(4,2,n,s)}function bp(n,s){return nl(4,4,n,s)}function jp(n,s){if(typeof s=="function")return n=n(),s(n),function(){s(null)};if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function _p(n,s,o){return o=o!=null?o.concat([n]):null,nl(4,4,jp.bind(null,s,n),o)}function gc(){}function Sp(n,s){var o=Bn();s=s===void 0?null:s;var c=o.memoizedState;return c!==null&&s!==null&&cc(s,c[1])?c[0]:(o.memoizedState=[n,s],n)}function kp(n,s){var o=Bn();s=s===void 0?null:s;var c=o.memoizedState;return c!==null&&s!==null&&cc(s,c[1])?c[0]:(n=n(),o.memoizedState=[n,s],n)}function Np(n,s,o){return(Hs&21)===0?(n.baseState&&(n.baseState=!1,_n=!0),n.memoizedState=o):(tr(o,s)||(o=nh(),bt.lanes|=o,Ws|=o,n.baseState=!0),s)}function i1(n,s){var o=ut;ut=o!==0&&4>o?o:4,n(!0);var c=uc.transition;uc.transition={};try{n(!1),s()}finally{ut=o,uc.transition=c}}function Cp(){return Bn().memoizedState}function a1(n,s,o){var c=gs(n);if(o={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null},Ep(n))Pp(s,o);else if(o=ip(n,s,o,c),o!==null){var h=on();ar(o,n,c,h),Op(o,s,c)}}function o1(n,s,o){var c=gs(n),h={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ep(n))Pp(s,h);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=s.lastRenderedReducer,g!==null))try{var j=s.lastRenderedState,C=g(j,o);if(h.hasEagerState=!0,h.eagerState=C,tr(C,j)){var O=s.interleaved;O===null?(h.next=h,rc(s)):(h.next=O.next,O.next=h),s.interleaved=h;return}}catch{}o=ip(n,s,h,c),o!==null&&(h=on(),ar(o,n,c,h),Op(o,s,c))}}function Ep(n){var s=n.alternate;return n===bt||s!==null&&s===bt}function Pp(n,s){Ca=el=!0;var o=n.pending;o===null?s.next=s:(s.next=o.next,o.next=s),n.pending=s}function Op(n,s,o){if((o&4194240)!==0){var c=s.lanes;c&=n.pendingLanes,o|=c,s.lanes=o,vu(n,o)}}var rl={readContext:Vn,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useInsertionEffect:Zt,useLayoutEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useMutableSource:Zt,useSyncExternalStore:Zt,useId:Zt,unstable_isNewReconciler:!1},l1={readContext:Vn,useCallback:function(n,s){return wr().memoizedState=[n,s===void 0?null:s],n},useContext:Vn,useEffect:xp,useImperativeHandle:function(n,s,o){return o=o!=null?o.concat([n]):null,tl(4194308,4,jp.bind(null,s,n),o)},useLayoutEffect:function(n,s){return tl(4194308,4,n,s)},useInsertionEffect:function(n,s){return tl(4,2,n,s)},useMemo:function(n,s){var o=wr();return s=s===void 0?null:s,n=n(),o.memoizedState=[n,s],n},useReducer:function(n,s,o){var c=wr();return s=o!==void 0?o(s):s,c.memoizedState=c.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},c.queue=n,n=n.dispatch=a1.bind(null,bt,n),[c.memoizedState,n]},useRef:function(n){var s=wr();return n={current:n},s.memoizedState=n},useState:yp,useDebugValue:gc,useDeferredValue:function(n){return wr().memoizedState=n},useTransition:function(){var n=yp(!1),s=n[0];return n=i1.bind(null,n[1]),wr().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,o){var c=bt,h=wr();if(gt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=s(),Vt===null)throw Error(r(349));(Hs&30)!==0||fp(c,s,o)}h.memoizedState=o;var g={value:o,getSnapshot:s};return h.queue=g,xp(pp.bind(null,c,g,n),[n]),c.flags|=2048,Oa(9,hp.bind(null,c,g,o,s),void 0,null),o},useId:function(){var n=wr(),s=Vt.identifierPrefix;if(gt){var o=Ur,c=zr;o=(c&~(1<<32-er(c)-1)).toString(32)+o,s=":"+s+"R"+o,o=Ea++,0<o&&(s+="H"+o.toString(32)),s+=":"}else o=s1++,s=":"+s+"r"+o.toString(32)+":";return n.memoizedState=s},unstable_isNewReconciler:!1},u1={readContext:Vn,useCallback:Sp,useContext:Vn,useEffect:mc,useImperativeHandle:_p,useInsertionEffect:wp,useLayoutEffect:bp,useMemo:kp,useReducer:hc,useRef:vp,useState:function(){return hc(Pa)},useDebugValue:gc,useDeferredValue:function(n){var s=Bn();return Np(s,Dt.memoizedState,n)},useTransition:function(){var n=hc(Pa)[0],s=Bn().memoizedState;return[n,s]},useMutableSource:cp,useSyncExternalStore:dp,useId:Cp,unstable_isNewReconciler:!1},c1={readContext:Vn,useCallback:Sp,useContext:Vn,useEffect:mc,useImperativeHandle:_p,useInsertionEffect:wp,useLayoutEffect:bp,useMemo:kp,useReducer:pc,useRef:vp,useState:function(){return pc(Pa)},useDebugValue:gc,useDeferredValue:function(n){var s=Bn();return Dt===null?s.memoizedState=n:Np(s,Dt.memoizedState,n)},useTransition:function(){var n=pc(Pa)[0],s=Bn().memoizedState;return[n,s]},useMutableSource:cp,useSyncExternalStore:dp,useId:Cp,unstable_isNewReconciler:!1};function rr(n,s){if(n&&n.defaultProps){s=K({},s),n=n.defaultProps;for(var o in n)s[o]===void 0&&(s[o]=n[o]);return s}return s}function yc(n,s,o,c){s=n.memoizedState,o=o(c,s),o=o==null?s:K({},s,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var sl={isMounted:function(n){return(n=n._reactInternals)?Ds(n)===n:!1},enqueueSetState:function(n,s,o){n=n._reactInternals;var c=on(),h=gs(n),g=Br(c,h);g.payload=s,o!=null&&(g.callback=o),s=fs(n,g,h),s!==null&&(ar(s,n,h,c),Go(s,n,h))},enqueueReplaceState:function(n,s,o){n=n._reactInternals;var c=on(),h=gs(n),g=Br(c,h);g.tag=1,g.payload=s,o!=null&&(g.callback=o),s=fs(n,g,h),s!==null&&(ar(s,n,h,c),Go(s,n,h))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var o=on(),c=gs(n),h=Br(o,c);h.tag=2,s!=null&&(h.callback=s),s=fs(n,h,c),s!==null&&(ar(s,n,c,o),Go(s,n,c))}};function Rp(n,s,o,c,h,g,j){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,j):s.prototype&&s.prototype.isPureReactComponent?!ga(o,c)||!ga(h,g):!0}function Tp(n,s,o){var c=!1,h=us,g=s.contextType;return typeof g=="object"&&g!==null?g=Vn(g):(h=jn(s)?zs:Qt.current,c=s.contextTypes,g=(c=c!=null)?xi(n,h):us),s=new s(o,g),n.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sl,n.stateNode=s,s._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=g),s}function Lp(n,s,o,c){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,c),s.state!==n&&sl.enqueueReplaceState(s,s.state,null)}function vc(n,s,o,c){var h=n.stateNode;h.props=o,h.state=n.memoizedState,h.refs={},sc(n);var g=s.contextType;typeof g=="object"&&g!==null?h.context=Vn(g):(g=jn(s)?zs:Qt.current,h.context=xi(n,g)),h.state=n.memoizedState,g=s.getDerivedStateFromProps,typeof g=="function"&&(yc(n,s,g,o),h.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(s=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),s!==h.state&&sl.enqueueReplaceState(h,h.state,null),Jo(n,o,h,c),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function Ci(n,s){try{var o="",c=s;do o+=Le(c),c=c.return;while(c);var h=o}catch(g){h=`
|
|
Error generating stack: `+g.message+`
|
|
`+g.stack}return{value:n,source:s,stack:h,digest:null}}function xc(n,s,o){return{value:n,source:null,stack:o??null,digest:s??null}}function wc(n,s){try{console.error(s.value)}catch(o){setTimeout(function(){throw o})}}var d1=typeof WeakMap=="function"?WeakMap:Map;function Ap(n,s,o){o=Br(-1,o),o.tag=3,o.payload={element:null};var c=s.value;return o.callback=function(){dl||(dl=!0,Ic=c),wc(n,s)},o}function Ip(n,s,o){o=Br(-1,o),o.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var h=s.value;o.payload=function(){return c(h)},o.callback=function(){wc(n,s)}}var g=n.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(o.callback=function(){wc(n,s),typeof c!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})}),o}function Mp(n,s,o){var c=n.pingCache;if(c===null){c=n.pingCache=new d1;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(o)||(h.add(o),n=k1.bind(null,n,s,o),s.then(n,n))}function Fp(n){do{var s;if((s=n.tag===13)&&(s=n.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return n;n=n.return}while(n!==null);return null}function Dp(n,s,o,c,h){return(n.mode&1)===0?(n===s?n.flags|=65536:(n.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(s=Br(-1,1),s.tag=2,fs(o,s,1))),o.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var f1=L.ReactCurrentOwner,_n=!1;function an(n,s,o,c){s.child=n===null?sp(s,null,o,c):_i(s,n.child,o,c)}function $p(n,s,o,c,h){o=o.render;var g=s.ref;return ki(s,h),c=dc(n,s,o,c,g,h),o=fc(),n!==null&&!_n?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~h,qr(n,s,h)):(gt&&o&&Qu(s),s.flags|=1,an(n,s,c,h),s.child)}function zp(n,s,o,c,h){if(n===null){var g=o.type;return typeof g=="function"&&!Vc(g)&&g.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(s.tag=15,s.type=g,Up(n,s,g,c,h)):(n=yl(o.type,null,c,s,s.mode,h),n.ref=s.ref,n.return=s,s.child=n)}if(g=n.child,(n.lanes&h)===0){var j=g.memoizedProps;if(o=o.compare,o=o!==null?o:ga,o(j,c)&&n.ref===s.ref)return qr(n,s,h)}return s.flags|=1,n=vs(g,c),n.ref=s.ref,n.return=s,s.child=n}function Up(n,s,o,c,h){if(n!==null){var g=n.memoizedProps;if(ga(g,c)&&n.ref===s.ref)if(_n=!1,s.pendingProps=c=g,(n.lanes&h)!==0)(n.flags&131072)!==0&&(_n=!0);else return s.lanes=n.lanes,qr(n,s,h)}return bc(n,s,o,c,h)}function Vp(n,s,o){var c=s.pendingProps,h=c.children,g=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ft(Pi,Mn),Mn|=o;else{if((o&1073741824)===0)return n=g!==null?g.baseLanes|o:o,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:n,cachePool:null,transitions:null},s.updateQueue=null,ft(Pi,Mn),Mn|=n,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:o,ft(Pi,Mn),Mn|=c}else g!==null?(c=g.baseLanes|o,s.memoizedState=null):c=o,ft(Pi,Mn),Mn|=c;return an(n,s,h,o),s.child}function Bp(n,s){var o=s.ref;(n===null&&o!==null||n!==null&&n.ref!==o)&&(s.flags|=512,s.flags|=2097152)}function bc(n,s,o,c,h){var g=jn(o)?zs:Qt.current;return g=xi(s,g),ki(s,h),o=dc(n,s,o,c,g,h),c=fc(),n!==null&&!_n?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~h,qr(n,s,h)):(gt&&c&&Qu(s),s.flags|=1,an(n,s,o,h),s.child)}function qp(n,s,o,c,h){if(jn(o)){var g=!0;Vo(s)}else g=!1;if(ki(s,h),s.stateNode===null)al(n,s),Tp(s,o,c),vc(s,o,c,h),c=!0;else if(n===null){var j=s.stateNode,C=s.memoizedProps;j.props=C;var O=j.context,q=o.contextType;typeof q=="object"&&q!==null?q=Vn(q):(q=jn(o)?zs:Qt.current,q=xi(s,q));var ee=o.getDerivedStateFromProps,te=typeof ee=="function"||typeof j.getSnapshotBeforeUpdate=="function";te||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(C!==c||O!==q)&&Lp(s,j,c,q),ds=!1;var Y=s.memoizedState;j.state=Y,Jo(s,c,j,h),O=s.memoizedState,C!==c||Y!==O||bn.current||ds?(typeof ee=="function"&&(yc(s,o,ee,c),O=s.memoizedState),(C=ds||Rp(s,o,C,c,Y,O,q))?(te||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=O),j.props=c,j.state=O,j.context=q,c=C):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{j=s.stateNode,ap(n,s),C=s.memoizedProps,q=s.type===s.elementType?C:rr(s.type,C),j.props=q,te=s.pendingProps,Y=j.context,O=o.contextType,typeof O=="object"&&O!==null?O=Vn(O):(O=jn(o)?zs:Qt.current,O=xi(s,O));var he=o.getDerivedStateFromProps;(ee=typeof he=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(C!==te||Y!==O)&&Lp(s,j,c,O),ds=!1,Y=s.memoizedState,j.state=Y,Jo(s,c,j,h);var be=s.memoizedState;C!==te||Y!==be||bn.current||ds?(typeof he=="function"&&(yc(s,o,he,c),be=s.memoizedState),(q=ds||Rp(s,o,q,c,Y,be,O)||!1)?(ee||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(c,be,O),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(c,be,O)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||C===n.memoizedProps&&Y===n.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||C===n.memoizedProps&&Y===n.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=be),j.props=c,j.state=be,j.context=O,c=q):(typeof j.componentDidUpdate!="function"||C===n.memoizedProps&&Y===n.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||C===n.memoizedProps&&Y===n.memoizedState||(s.flags|=1024),c=!1)}return jc(n,s,o,c,g,h)}function jc(n,s,o,c,h,g){Bp(n,s);var j=(s.flags&128)!==0;if(!c&&!j)return h&&Zh(s,o,!1),qr(n,s,g);c=s.stateNode,f1.current=s;var C=j&&typeof o.getDerivedStateFromError!="function"?null:c.render();return s.flags|=1,n!==null&&j?(s.child=_i(s,n.child,null,g),s.child=_i(s,null,C,g)):an(n,s,C,g),s.memoizedState=c.state,h&&Zh(s,o,!0),s.child}function Hp(n){var s=n.stateNode;s.pendingContext?Kh(n,s.pendingContext,s.pendingContext!==s.context):s.context&&Kh(n,s.context,!1),ic(n,s.containerInfo)}function Wp(n,s,o,c,h){return ji(),Yu(h),s.flags|=256,an(n,s,o,c),s.child}var _c={dehydrated:null,treeContext:null,retryLane:0};function Sc(n){return{baseLanes:n,cachePool:null,transitions:null}}function Kp(n,s,o){var c=s.pendingProps,h=wt.current,g=!1,j=(s.flags&128)!==0,C;if((C=j)||(C=n!==null&&n.memoizedState===null?!1:(h&2)!==0),C?(g=!0,s.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),ft(wt,h&1),n===null)return Ju(s),n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((s.mode&1)===0?s.lanes=1:n.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(j=c.children,n=c.fallback,g?(c=s.mode,g=s.child,j={mode:"hidden",children:j},(c&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=j):g=vl(j,c,0,null),n=Gs(n,c,o,null),g.return=s,n.return=s,g.sibling=n,s.child=g,s.child.memoizedState=Sc(o),s.memoizedState=_c,n):kc(s,j));if(h=n.memoizedState,h!==null&&(C=h.dehydrated,C!==null))return h1(n,s,j,c,C,h,o);if(g){g=c.fallback,j=s.mode,h=n.child,C=h.sibling;var O={mode:"hidden",children:c.children};return(j&1)===0&&s.child!==h?(c=s.child,c.childLanes=0,c.pendingProps=O,s.deletions=null):(c=vs(h,O),c.subtreeFlags=h.subtreeFlags&14680064),C!==null?g=vs(C,g):(g=Gs(g,j,o,null),g.flags|=2),g.return=s,c.return=s,c.sibling=g,s.child=c,c=g,g=s.child,j=n.child.memoizedState,j=j===null?Sc(o):{baseLanes:j.baseLanes|o,cachePool:null,transitions:j.transitions},g.memoizedState=j,g.childLanes=n.childLanes&~o,s.memoizedState=_c,c}return g=n.child,n=g.sibling,c=vs(g,{mode:"visible",children:c.children}),(s.mode&1)===0&&(c.lanes=o),c.return=s,c.sibling=null,n!==null&&(o=s.deletions,o===null?(s.deletions=[n],s.flags|=16):o.push(n)),s.child=c,s.memoizedState=null,c}function kc(n,s){return s=vl({mode:"visible",children:s},n.mode,0,null),s.return=n,n.child=s}function il(n,s,o,c){return c!==null&&Yu(c),_i(s,n.child,null,o),n=kc(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function h1(n,s,o,c,h,g,j){if(o)return s.flags&256?(s.flags&=-257,c=xc(Error(r(422))),il(n,s,j,c)):s.memoizedState!==null?(s.child=n.child,s.flags|=128,null):(g=c.fallback,h=s.mode,c=vl({mode:"visible",children:c.children},h,0,null),g=Gs(g,h,j,null),g.flags|=2,c.return=s,g.return=s,c.sibling=g,s.child=c,(s.mode&1)!==0&&_i(s,n.child,null,j),s.child.memoizedState=Sc(j),s.memoizedState=_c,g);if((s.mode&1)===0)return il(n,s,j,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var C=c.dgst;return c=C,g=Error(r(419)),c=xc(g,c,void 0),il(n,s,j,c)}if(C=(j&n.childLanes)!==0,_n||C){if(c=Vt,c!==null){switch(j&-j){case 4:h=2;break;case 16:h=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(c.suspendedLanes|j))!==0?0:h,h!==0&&h!==g.retryLane&&(g.retryLane=h,Vr(n,h),ar(c,n,h,-1))}return Uc(),c=xc(Error(r(421))),il(n,s,j,c)}return h.data==="$?"?(s.flags|=128,s.child=n.child,s=N1.bind(null,n),h._reactRetry=s,null):(n=g.treeContext,In=os(h.nextSibling),An=s,gt=!0,nr=null,n!==null&&(zn[Un++]=zr,zn[Un++]=Ur,zn[Un++]=Us,zr=n.id,Ur=n.overflow,Us=s),s=kc(s,c.children),s.flags|=4096,s)}function Qp(n,s,o){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s),nc(n.return,s,o)}function Nc(n,s,o,c,h){var g=n.memoizedState;g===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:h}:(g.isBackwards=s,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=o,g.tailMode=h)}function Zp(n,s,o){var c=s.pendingProps,h=c.revealOrder,g=c.tail;if(an(n,s,c.children,o),c=wt.current,(c&2)!==0)c=c&1|2,s.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Qp(n,o,s);else if(n.tag===19)Qp(n,o,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(ft(wt,c),(s.mode&1)===0)s.memoizedState=null;else switch(h){case"forwards":for(o=s.child,h=null;o!==null;)n=o.alternate,n!==null&&Yo(n)===null&&(h=o),o=o.sibling;o=h,o===null?(h=s.child,s.child=null):(h=o.sibling,o.sibling=null),Nc(s,!1,h,o,g);break;case"backwards":for(o=null,h=s.child,s.child=null;h!==null;){if(n=h.alternate,n!==null&&Yo(n)===null){s.child=h;break}n=h.sibling,h.sibling=o,o=h,h=n}Nc(s,!0,o,null,g);break;case"together":Nc(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function al(n,s){(s.mode&1)===0&&n!==null&&(n.alternate=null,s.alternate=null,s.flags|=2)}function qr(n,s,o){if(n!==null&&(s.dependencies=n.dependencies),Ws|=s.lanes,(o&s.childLanes)===0)return null;if(n!==null&&s.child!==n.child)throw Error(r(153));if(s.child!==null){for(n=s.child,o=vs(n,n.pendingProps),s.child=o,o.return=s;n.sibling!==null;)n=n.sibling,o=o.sibling=vs(n,n.pendingProps),o.return=s;o.sibling=null}return s.child}function p1(n,s,o){switch(s.tag){case 3:Hp(s),ji();break;case 5:up(s);break;case 1:jn(s.type)&&Vo(s);break;case 4:ic(s,s.stateNode.containerInfo);break;case 10:var c=s.type._context,h=s.memoizedProps.value;ft(Qo,c._currentValue),c._currentValue=h;break;case 13:if(c=s.memoizedState,c!==null)return c.dehydrated!==null?(ft(wt,wt.current&1),s.flags|=128,null):(o&s.child.childLanes)!==0?Kp(n,s,o):(ft(wt,wt.current&1),n=qr(n,s,o),n!==null?n.sibling:null);ft(wt,wt.current&1);break;case 19:if(c=(o&s.childLanes)!==0,(n.flags&128)!==0){if(c)return Zp(n,s,o);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ft(wt,wt.current),c)break;return null;case 22:case 23:return s.lanes=0,Vp(n,s,o)}return qr(n,s,o)}var Gp,Cc,Jp,Yp;Gp=function(n,s){for(var o=s.child;o!==null;){if(o.tag===5||o.tag===6)n.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Cc=function(){},Jp=function(n,s,o,c){var h=n.memoizedProps;if(h!==c){n=s.stateNode,qs(xr.current);var g=null;switch(o){case"input":h=Lr(n,h),c=Lr(n,c),g=[];break;case"select":h=K({},h,{value:void 0}),c=K({},c,{value:void 0}),g=[];break;case"textarea":h=Fs(n,h),c=Fs(n,c),g=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=$o)}$n(o,c);var j;o=null;for(q in h)if(!c.hasOwnProperty(q)&&h.hasOwnProperty(q)&&h[q]!=null)if(q==="style"){var C=h[q];for(j in C)C.hasOwnProperty(j)&&(o||(o={}),o[j]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(a.hasOwnProperty(q)?g||(g=[]):(g=g||[]).push(q,null));for(q in c){var O=c[q];if(C=h?.[q],c.hasOwnProperty(q)&&O!==C&&(O!=null||C!=null))if(q==="style")if(C){for(j in C)!C.hasOwnProperty(j)||O&&O.hasOwnProperty(j)||(o||(o={}),o[j]="");for(j in O)O.hasOwnProperty(j)&&C[j]!==O[j]&&(o||(o={}),o[j]=O[j])}else o||(g||(g=[]),g.push(q,o)),o=O;else q==="dangerouslySetInnerHTML"?(O=O?O.__html:void 0,C=C?C.__html:void 0,O!=null&&C!==O&&(g=g||[]).push(q,O)):q==="children"?typeof O!="string"&&typeof O!="number"||(g=g||[]).push(q,""+O):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(a.hasOwnProperty(q)?(O!=null&&q==="onScroll"&&ht("scroll",n),g||C===O||(g=[])):(g=g||[]).push(q,O))}o&&(g=g||[]).push("style",o);var q=g;(s.updateQueue=q)&&(s.flags|=4)}},Yp=function(n,s,o,c){o!==c&&(s.flags|=4)};function Ra(n,s){if(!gt)switch(n.tailMode){case"hidden":s=n.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Gt(n){var s=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(s)for(var h=n.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=o,s}function m1(n,s,o){var c=s.pendingProps;switch(Zu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(s),null;case 1:return jn(s.type)&&Uo(),Gt(s),null;case 3:return c=s.stateNode,Ni(),pt(bn),pt(Qt),lc(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(Wo(s)?s.flags|=4:n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,nr!==null&&(Dc(nr),nr=null))),Cc(n,s),Gt(s),null;case 5:ac(s);var h=qs(Na.current);if(o=s.type,n!==null&&s.stateNode!=null)Jp(n,s,o,c,h),n.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!c){if(s.stateNode===null)throw Error(r(166));return Gt(s),null}if(n=qs(xr.current),Wo(s)){c=s.stateNode,o=s.type;var g=s.memoizedProps;switch(c[vr]=s,c[ba]=g,n=(s.mode&1)!==0,o){case"dialog":ht("cancel",c),ht("close",c);break;case"iframe":case"object":case"embed":ht("load",c);break;case"video":case"audio":for(h=0;h<va.length;h++)ht(va[h],c);break;case"source":ht("error",c);break;case"img":case"image":case"link":ht("error",c),ht("load",c);break;case"details":ht("toggle",c);break;case"input":ui(c,g),ht("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},ht("invalid",c);break;case"textarea":Rn(c,g),ht("invalid",c)}$n(o,g),h=null;for(var j in g)if(g.hasOwnProperty(j)){var C=g[j];j==="children"?typeof C=="string"?c.textContent!==C&&(g.suppressHydrationWarning!==!0&&Do(c.textContent,C,n),h=["children",C]):typeof C=="number"&&c.textContent!==""+C&&(g.suppressHydrationWarning!==!0&&Do(c.textContent,C,n),h=["children",""+C]):a.hasOwnProperty(j)&&C!=null&&j==="onScroll"&&ht("scroll",c)}switch(o){case"input":yn(c),Ar(c,g,!0);break;case"textarea":yn(c),z(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=$o)}c=h,s.updateQueue=c,c!==null&&(s.flags|=4)}else{j=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=V(o)),n==="http://www.w3.org/1999/xhtml"?o==="script"?(n=j.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=j.createElement(o,{is:c.is}):(n=j.createElement(o),o==="select"&&(j=n,c.multiple?j.multiple=!0:c.size&&(j.size=c.size))):n=j.createElementNS(n,o),n[vr]=s,n[ba]=c,Gp(n,s,!1,!1),s.stateNode=n;e:{switch(j=Ir(o,c),o){case"dialog":ht("cancel",n),ht("close",n),h=c;break;case"iframe":case"object":case"embed":ht("load",n),h=c;break;case"video":case"audio":for(h=0;h<va.length;h++)ht(va[h],n);h=c;break;case"source":ht("error",n),h=c;break;case"img":case"image":case"link":ht("error",n),ht("load",n),h=c;break;case"details":ht("toggle",n),h=c;break;case"input":ui(n,c),h=Lr(n,c),ht("invalid",n);break;case"option":h=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},h=K({},c,{value:void 0}),ht("invalid",n);break;case"textarea":Rn(n,c),h=Fs(n,c),ht("invalid",n);break;default:h=c}$n(o,h),C=h;for(g in C)if(C.hasOwnProperty(g)){var O=C[g];g==="style"?Tt(n,O):g==="dangerouslySetInnerHTML"?(O=O?O.__html:void 0,O!=null&&ae(n,O)):g==="children"?typeof O=="string"?(o!=="textarea"||O!=="")&&ce(n,O):typeof O=="number"&&ce(n,""+O):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(a.hasOwnProperty(g)?O!=null&&g==="onScroll"&&ht("scroll",n):O!=null&&F(n,g,O,j))}switch(o){case"input":yn(n),Ar(n,c,!1);break;case"textarea":yn(n),z(n);break;case"option":c.value!=null&&n.setAttribute("value",""+Ge(c.value));break;case"select":n.multiple=!!c.multiple,g=c.value,g!=null?vn(n,!!c.multiple,g,!1):c.defaultValue!=null&&vn(n,!!c.multiple,c.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=$o)}switch(o){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Gt(s),null;case 6:if(n&&s.stateNode!=null)Yp(n,s,n.memoizedProps,c);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(o=qs(Na.current),qs(xr.current),Wo(s)){if(c=s.stateNode,o=s.memoizedProps,c[vr]=s,(g=c.nodeValue!==o)&&(n=An,n!==null))switch(n.tag){case 3:Do(c.nodeValue,o,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Do(c.nodeValue,o,(n.mode&1)!==0)}g&&(s.flags|=4)}else c=(o.nodeType===9?o:o.ownerDocument).createTextNode(c),c[vr]=s,s.stateNode=c}return Gt(s),null;case 13:if(pt(wt),c=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(gt&&In!==null&&(s.mode&1)!==0&&(s.flags&128)===0)tp(),ji(),s.flags|=98560,g=!1;else if(g=Wo(s),c!==null&&c.dehydrated!==null){if(n===null){if(!g)throw Error(r(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[vr]=s}else ji(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Gt(s),g=!1}else nr!==null&&(Dc(nr),nr=null),g=!0;if(!g)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=o,s):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(s.child.flags|=8192,(s.mode&1)!==0&&(n===null||(wt.current&1)!==0?$t===0&&($t=3):Uc())),s.updateQueue!==null&&(s.flags|=4),Gt(s),null);case 4:return Ni(),Cc(n,s),n===null&&xa(s.stateNode.containerInfo),Gt(s),null;case 10:return tc(s.type._context),Gt(s),null;case 17:return jn(s.type)&&Uo(),Gt(s),null;case 19:if(pt(wt),g=s.memoizedState,g===null)return Gt(s),null;if(c=(s.flags&128)!==0,j=g.rendering,j===null)if(c)Ra(g,!1);else{if($t!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(j=Yo(n),j!==null){for(s.flags|=128,Ra(g,!1),c=j.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),s.subtreeFlags=0,c=o,o=s.child;o!==null;)g=o,n=c,g.flags&=14680066,j=g.alternate,j===null?(g.childLanes=0,g.lanes=n,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=j.childLanes,g.lanes=j.lanes,g.child=j.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=j.memoizedProps,g.memoizedState=j.memoizedState,g.updateQueue=j.updateQueue,g.type=j.type,n=j.dependencies,g.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),o=o.sibling;return ft(wt,wt.current&1|2),s.child}n=n.sibling}g.tail!==null&&Pt()>Oi&&(s.flags|=128,c=!0,Ra(g,!1),s.lanes=4194304)}else{if(!c)if(n=Yo(j),n!==null){if(s.flags|=128,c=!0,o=n.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),Ra(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!gt)return Gt(s),null}else 2*Pt()-g.renderingStartTime>Oi&&o!==1073741824&&(s.flags|=128,c=!0,Ra(g,!1),s.lanes=4194304);g.isBackwards?(j.sibling=s.child,s.child=j):(o=g.last,o!==null?o.sibling=j:s.child=j,g.last=j)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Pt(),s.sibling=null,o=wt.current,ft(wt,c?o&1|2:o&1),s):(Gt(s),null);case 22:case 23:return zc(),c=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(s.flags|=8192),c&&(s.mode&1)!==0?(Mn&1073741824)!==0&&(Gt(s),s.subtreeFlags&6&&(s.flags|=8192)):Gt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function g1(n,s){switch(Zu(s),s.tag){case 1:return jn(s.type)&&Uo(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Ni(),pt(bn),pt(Qt),lc(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return ac(s),null;case 13:if(pt(wt),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ji()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return pt(wt),null;case 4:return Ni(),null;case 10:return tc(s.type._context),null;case 22:case 23:return zc(),null;case 24:return null;default:return null}}var ol=!1,Jt=!1,y1=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ei(n,s){var o=n.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(c){kt(n,s,c)}else o.current=null}function Ec(n,s,o){try{o()}catch(c){kt(n,s,c)}}var Xp=!1;function v1(n,s){if(zu=Co,n=Rh(),Tu(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{o.nodeType,g.nodeType}catch{o=null;break e}var j=0,C=-1,O=-1,q=0,ee=0,te=n,Y=null;t:for(;;){for(var he;te!==o||h!==0&&te.nodeType!==3||(C=j+h),te!==g||c!==0&&te.nodeType!==3||(O=j+c),te.nodeType===3&&(j+=te.nodeValue.length),(he=te.firstChild)!==null;)Y=te,te=he;for(;;){if(te===n)break t;if(Y===o&&++q===h&&(C=j),Y===g&&++ee===c&&(O=j),(he=te.nextSibling)!==null)break;te=Y,Y=te.parentNode}te=he}o=C===-1||O===-1?null:{start:C,end:O}}else o=null}o=o||{start:0,end:0}}else o=null;for(Uu={focusedElem:n,selectionRange:o},Co=!1,xe=s;xe!==null;)if(s=xe,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,xe=n;else for(;xe!==null;){s=xe;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var _e=be.memoizedProps,Ot=be.memoizedState,U=s.stateNode,A=U.getSnapshotBeforeUpdate(s.elementType===s.type?_e:rr(s.type,_e),Ot);U.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var B=s.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(se){kt(s,s.return,se)}if(n=s.sibling,n!==null){n.return=s.return,xe=n;break}xe=s.return}return be=Xp,Xp=!1,be}function Ta(n,s,o){var c=s.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&n)===n){var g=h.destroy;h.destroy=void 0,g!==void 0&&Ec(s,o,g)}h=h.next}while(h!==c)}}function ll(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&n)===n){var c=o.create;o.destroy=c()}o=o.next}while(o!==s)}}function Pc(n){var s=n.ref;if(s!==null){var o=n.stateNode;n.tag,n=o,typeof s=="function"?s(n):s.current=n}}function em(n){var s=n.alternate;s!==null&&(n.alternate=null,em(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[vr],delete s[ba],delete s[Hu],delete s[e1],delete s[t1])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function tm(n){return n.tag===5||n.tag===3||n.tag===4}function nm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||tm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Oc(n,s,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(n,s):o.insertBefore(n,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(n,o)):(s=o,s.appendChild(n)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=$o));else if(c!==4&&(n=n.child,n!==null))for(Oc(n,s,o),n=n.sibling;n!==null;)Oc(n,s,o),n=n.sibling}function Rc(n,s,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,s?o.insertBefore(n,s):o.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Rc(n,s,o),n=n.sibling;n!==null;)Rc(n,s,o),n=n.sibling}var Ht=null,sr=!1;function hs(n,s,o){for(o=o.child;o!==null;)rm(n,s,o),o=o.sibling}function rm(n,s,o){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(bo,o)}catch{}switch(o.tag){case 5:Jt||Ei(o,s);case 6:var c=Ht,h=sr;Ht=null,hs(n,s,o),Ht=c,sr=h,Ht!==null&&(sr?(n=Ht,o=o.stateNode,n.nodeType===8?n.parentNode.removeChild(o):n.removeChild(o)):Ht.removeChild(o.stateNode));break;case 18:Ht!==null&&(sr?(n=Ht,o=o.stateNode,n.nodeType===8?qu(n.parentNode,o):n.nodeType===1&&qu(n,o),ca(n)):qu(Ht,o.stateNode));break;case 4:c=Ht,h=sr,Ht=o.stateNode.containerInfo,sr=!0,hs(n,s,o),Ht=c,sr=h;break;case 0:case 11:case 14:case 15:if(!Jt&&(c=o.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var g=h,j=g.destroy;g=g.tag,j!==void 0&&((g&2)!==0||(g&4)!==0)&&Ec(o,s,j),h=h.next}while(h!==c)}hs(n,s,o);break;case 1:if(!Jt&&(Ei(o,s),c=o.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=o.memoizedProps,c.state=o.memoizedState,c.componentWillUnmount()}catch(C){kt(o,s,C)}hs(n,s,o);break;case 21:hs(n,s,o);break;case 22:o.mode&1?(Jt=(c=Jt)||o.memoizedState!==null,hs(n,s,o),Jt=c):hs(n,s,o);break;default:hs(n,s,o)}}function sm(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new y1),s.forEach(function(c){var h=C1.bind(null,n,c);o.has(c)||(o.add(c),c.then(h,h))})}}function ir(n,s){var o=s.deletions;if(o!==null)for(var c=0;c<o.length;c++){var h=o[c];try{var g=n,j=s,C=j;e:for(;C!==null;){switch(C.tag){case 5:Ht=C.stateNode,sr=!1;break e;case 3:Ht=C.stateNode.containerInfo,sr=!0;break e;case 4:Ht=C.stateNode.containerInfo,sr=!0;break e}C=C.return}if(Ht===null)throw Error(r(160));rm(g,j,h),Ht=null,sr=!1;var O=h.alternate;O!==null&&(O.return=null),h.return=null}catch(q){kt(h,s,q)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)im(s,n),s=s.sibling}function im(n,s){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(ir(s,n),br(n),c&4){try{Ta(3,n,n.return),ll(3,n)}catch(_e){kt(n,n.return,_e)}try{Ta(5,n,n.return)}catch(_e){kt(n,n.return,_e)}}break;case 1:ir(s,n),br(n),c&512&&o!==null&&Ei(o,o.return);break;case 5:if(ir(s,n),br(n),c&512&&o!==null&&Ei(o,o.return),n.flags&32){var h=n.stateNode;try{ce(h,"")}catch(_e){kt(n,n.return,_e)}}if(c&4&&(h=n.stateNode,h!=null)){var g=n.memoizedProps,j=o!==null?o.memoizedProps:g,C=n.type,O=n.updateQueue;if(n.updateQueue=null,O!==null)try{C==="input"&&g.type==="radio"&&g.name!=null&&Yr(h,g),Ir(C,j);var q=Ir(C,g);for(j=0;j<O.length;j+=2){var ee=O[j],te=O[j+1];ee==="style"?Tt(h,te):ee==="dangerouslySetInnerHTML"?ae(h,te):ee==="children"?ce(h,te):F(h,ee,te,q)}switch(C){case"input":Ms(h,g);break;case"textarea":E(h,g);break;case"select":var Y=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!g.multiple;var he=g.value;he!=null?vn(h,!!g.multiple,he,!1):Y!==!!g.multiple&&(g.defaultValue!=null?vn(h,!!g.multiple,g.defaultValue,!0):vn(h,!!g.multiple,g.multiple?[]:"",!1))}h[ba]=g}catch(_e){kt(n,n.return,_e)}}break;case 6:if(ir(s,n),br(n),c&4){if(n.stateNode===null)throw Error(r(162));h=n.stateNode,g=n.memoizedProps;try{h.nodeValue=g}catch(_e){kt(n,n.return,_e)}}break;case 3:if(ir(s,n),br(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{ca(s.containerInfo)}catch(_e){kt(n,n.return,_e)}break;case 4:ir(s,n),br(n);break;case 13:ir(s,n),br(n),h=n.child,h.flags&8192&&(g=h.memoizedState!==null,h.stateNode.isHidden=g,!g||h.alternate!==null&&h.alternate.memoizedState!==null||(Ac=Pt())),c&4&&sm(n);break;case 22:if(ee=o!==null&&o.memoizedState!==null,n.mode&1?(Jt=(q=Jt)||ee,ir(s,n),Jt=q):ir(s,n),br(n),c&8192){if(q=n.memoizedState!==null,(n.stateNode.isHidden=q)&&!ee&&(n.mode&1)!==0)for(xe=n,ee=n.child;ee!==null;){for(te=xe=ee;xe!==null;){switch(Y=xe,he=Y.child,Y.tag){case 0:case 11:case 14:case 15:Ta(4,Y,Y.return);break;case 1:Ei(Y,Y.return);var be=Y.stateNode;if(typeof be.componentWillUnmount=="function"){c=Y,o=Y.return;try{s=c,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(_e){kt(c,o,_e)}}break;case 5:Ei(Y,Y.return);break;case 22:if(Y.memoizedState!==null){lm(te);continue}}he!==null?(he.return=Y,xe=he):lm(te)}ee=ee.sibling}e:for(ee=null,te=n;;){if(te.tag===5){if(ee===null){ee=te;try{h=te.stateNode,q?(g=h.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(C=te.stateNode,O=te.memoizedProps.style,j=O!=null&&O.hasOwnProperty("display")?O.display:null,C.style.display=St("display",j))}catch(_e){kt(n,n.return,_e)}}}else if(te.tag===6){if(ee===null)try{te.stateNode.nodeValue=q?"":te.memoizedProps}catch(_e){kt(n,n.return,_e)}}else if((te.tag!==22&&te.tag!==23||te.memoizedState===null||te===n)&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===n)break e;for(;te.sibling===null;){if(te.return===null||te.return===n)break e;ee===te&&(ee=null),te=te.return}ee===te&&(ee=null),te.sibling.return=te.return,te=te.sibling}}break;case 19:ir(s,n),br(n),c&4&&sm(n);break;case 21:break;default:ir(s,n),br(n)}}function br(n){var s=n.flags;if(s&2){try{e:{for(var o=n.return;o!==null;){if(tm(o)){var c=o;break e}o=o.return}throw Error(r(160))}switch(c.tag){case 5:var h=c.stateNode;c.flags&32&&(ce(h,""),c.flags&=-33);var g=nm(n);Rc(n,g,h);break;case 3:case 4:var j=c.stateNode.containerInfo,C=nm(n);Oc(n,C,j);break;default:throw Error(r(161))}}catch(O){kt(n,n.return,O)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function x1(n,s,o){xe=n,am(n)}function am(n,s,o){for(var c=(n.mode&1)!==0;xe!==null;){var h=xe,g=h.child;if(h.tag===22&&c){var j=h.memoizedState!==null||ol;if(!j){var C=h.alternate,O=C!==null&&C.memoizedState!==null||Jt;C=ol;var q=Jt;if(ol=j,(Jt=O)&&!q)for(xe=h;xe!==null;)j=xe,O=j.child,j.tag===22&&j.memoizedState!==null?um(h):O!==null?(O.return=j,xe=O):um(h);for(;g!==null;)xe=g,am(g),g=g.sibling;xe=h,ol=C,Jt=q}om(n)}else(h.subtreeFlags&8772)!==0&&g!==null?(g.return=h,xe=g):om(n)}}function om(n){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var o=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Jt||ll(5,s);break;case 1:var c=s.stateNode;if(s.flags&4&&!Jt)if(o===null)c.componentDidMount();else{var h=s.elementType===s.type?o.memoizedProps:rr(s.type,o.memoizedProps);c.componentDidUpdate(h,o.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=s.updateQueue;g!==null&&lp(s,g,c);break;case 3:var j=s.updateQueue;if(j!==null){if(o=null,s.child!==null)switch(s.child.tag){case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}lp(s,j,o)}break;case 5:var C=s.stateNode;if(o===null&&s.flags&4){o=C;var O=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":O.autoFocus&&o.focus();break;case"img":O.src&&(o.src=O.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var q=s.alternate;if(q!==null){var ee=q.memoizedState;if(ee!==null){var te=ee.dehydrated;te!==null&&ca(te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Jt||s.flags&512&&Pc(s)}catch(Y){kt(s,s.return,Y)}}if(s===n){xe=null;break}if(o=s.sibling,o!==null){o.return=s.return,xe=o;break}xe=s.return}}function lm(n){for(;xe!==null;){var s=xe;if(s===n){xe=null;break}var o=s.sibling;if(o!==null){o.return=s.return,xe=o;break}xe=s.return}}function um(n){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var o=s.return;try{ll(4,s)}catch(O){kt(s,o,O)}break;case 1:var c=s.stateNode;if(typeof c.componentDidMount=="function"){var h=s.return;try{c.componentDidMount()}catch(O){kt(s,h,O)}}var g=s.return;try{Pc(s)}catch(O){kt(s,g,O)}break;case 5:var j=s.return;try{Pc(s)}catch(O){kt(s,j,O)}}}catch(O){kt(s,s.return,O)}if(s===n){xe=null;break}var C=s.sibling;if(C!==null){C.return=s.return,xe=C;break}xe=s.return}}var w1=Math.ceil,ul=L.ReactCurrentDispatcher,Tc=L.ReactCurrentOwner,qn=L.ReactCurrentBatchConfig,tt=0,Vt=null,Lt=null,Wt=0,Mn=0,Pi=ls(0),$t=0,La=null,Ws=0,cl=0,Lc=0,Aa=null,Sn=null,Ac=0,Oi=1/0,Hr=null,dl=!1,Ic=null,ps=null,fl=!1,ms=null,hl=0,Ia=0,Mc=null,pl=-1,ml=0;function on(){return(tt&6)!==0?Pt():pl!==-1?pl:pl=Pt()}function gs(n){return(n.mode&1)===0?1:(tt&2)!==0&&Wt!==0?Wt&-Wt:r1.transition!==null?(ml===0&&(ml=nh()),ml):(n=ut,n!==0||(n=window.event,n=n===void 0?16:dh(n.type)),n)}function ar(n,s,o,c){if(50<Ia)throw Ia=0,Mc=null,Error(r(185));ia(n,o,c),((tt&2)===0||n!==Vt)&&(n===Vt&&((tt&2)===0&&(cl|=o),$t===4&&ys(n,Wt)),kn(n,c),o===1&&tt===0&&(s.mode&1)===0&&(Oi=Pt()+500,Bo&&cs()))}function kn(n,s){var o=n.callbackNode;r0(n,s);var c=So(n,n===Vt?Wt:0);if(c===0)o!==null&&Xf(o),n.callbackNode=null,n.callbackPriority=0;else if(s=c&-c,n.callbackPriority!==s){if(o!=null&&Xf(o),s===1)n.tag===0?n1(dm.bind(null,n)):Gh(dm.bind(null,n)),Y0(function(){(tt&6)===0&&cs()}),o=null;else{switch(rh(c)){case 1:o=mu;break;case 4:o=eh;break;case 16:o=wo;break;case 536870912:o=th;break;default:o=wo}o=xm(o,cm.bind(null,n))}n.callbackPriority=s,n.callbackNode=o}}function cm(n,s){if(pl=-1,ml=0,(tt&6)!==0)throw Error(r(327));var o=n.callbackNode;if(Ri()&&n.callbackNode!==o)return null;var c=So(n,n===Vt?Wt:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||s)s=gl(n,c);else{s=c;var h=tt;tt|=2;var g=hm();(Vt!==n||Wt!==s)&&(Hr=null,Oi=Pt()+500,Qs(n,s));do try{_1();break}catch(C){fm(n,C)}while(!0);ec(),ul.current=g,tt=h,Lt!==null?s=0:(Vt=null,Wt=0,s=$t)}if(s!==0){if(s===2&&(h=gu(n),h!==0&&(c=h,s=Fc(n,h))),s===1)throw o=La,Qs(n,0),ys(n,c),kn(n,Pt()),o;if(s===6)ys(n,c);else{if(h=n.current.alternate,(c&30)===0&&!b1(h)&&(s=gl(n,c),s===2&&(g=gu(n),g!==0&&(c=g,s=Fc(n,g))),s===1))throw o=La,Qs(n,0),ys(n,c),kn(n,Pt()),o;switch(n.finishedWork=h,n.finishedLanes=c,s){case 0:case 1:throw Error(r(345));case 2:Zs(n,Sn,Hr);break;case 3:if(ys(n,c),(c&130023424)===c&&(s=Ac+500-Pt(),10<s)){if(So(n,0)!==0)break;if(h=n.suspendedLanes,(h&c)!==c){on(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=Bu(Zs.bind(null,n,Sn,Hr),s);break}Zs(n,Sn,Hr);break;case 4:if(ys(n,c),(c&4194240)===c)break;for(s=n.eventTimes,h=-1;0<c;){var j=31-er(c);g=1<<j,j=s[j],j>h&&(h=j),c&=~g}if(c=h,c=Pt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*w1(c/1960))-c,10<c){n.timeoutHandle=Bu(Zs.bind(null,n,Sn,Hr),c);break}Zs(n,Sn,Hr);break;case 5:Zs(n,Sn,Hr);break;default:throw Error(r(329))}}}return kn(n,Pt()),n.callbackNode===o?cm.bind(null,n):null}function Fc(n,s){var o=Aa;return n.current.memoizedState.isDehydrated&&(Qs(n,s).flags|=256),n=gl(n,s),n!==2&&(s=Sn,Sn=o,s!==null&&Dc(s)),n}function Dc(n){Sn===null?Sn=n:Sn.push.apply(Sn,n)}function b1(n){for(var s=n;;){if(s.flags&16384){var o=s.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var c=0;c<o.length;c++){var h=o[c],g=h.getSnapshot;h=h.value;try{if(!tr(g(),h))return!1}catch{return!1}}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ys(n,s){for(s&=~Lc,s&=~cl,n.suspendedLanes|=s,n.pingedLanes&=~s,n=n.expirationTimes;0<s;){var o=31-er(s),c=1<<o;n[o]=-1,s&=~c}}function dm(n){if((tt&6)!==0)throw Error(r(327));Ri();var s=So(n,0);if((s&1)===0)return kn(n,Pt()),null;var o=gl(n,s);if(n.tag!==0&&o===2){var c=gu(n);c!==0&&(s=c,o=Fc(n,c))}if(o===1)throw o=La,Qs(n,0),ys(n,s),kn(n,Pt()),o;if(o===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=s,Zs(n,Sn,Hr),kn(n,Pt()),null}function $c(n,s){var o=tt;tt|=1;try{return n(s)}finally{tt=o,tt===0&&(Oi=Pt()+500,Bo&&cs())}}function Ks(n){ms!==null&&ms.tag===0&&(tt&6)===0&&Ri();var s=tt;tt|=1;var o=qn.transition,c=ut;try{if(qn.transition=null,ut=1,n)return n()}finally{ut=c,qn.transition=o,tt=s,(tt&6)===0&&cs()}}function zc(){Mn=Pi.current,pt(Pi)}function Qs(n,s){n.finishedWork=null,n.finishedLanes=0;var o=n.timeoutHandle;if(o!==-1&&(n.timeoutHandle=-1,J0(o)),Lt!==null)for(o=Lt.return;o!==null;){var c=o;switch(Zu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Uo();break;case 3:Ni(),pt(bn),pt(Qt),lc();break;case 5:ac(c);break;case 4:Ni();break;case 13:pt(wt);break;case 19:pt(wt);break;case 10:tc(c.type._context);break;case 22:case 23:zc()}o=o.return}if(Vt=n,Lt=n=vs(n.current,null),Wt=Mn=s,$t=0,La=null,Lc=cl=Ws=0,Sn=Aa=null,Bs!==null){for(s=0;s<Bs.length;s++)if(o=Bs[s],c=o.interleaved,c!==null){o.interleaved=null;var h=c.next,g=o.pending;if(g!==null){var j=g.next;g.next=h,c.next=j}o.pending=c}Bs=null}return n}function fm(n,s){do{var o=Lt;try{if(ec(),Xo.current=rl,el){for(var c=bt.memoizedState;c!==null;){var h=c.queue;h!==null&&(h.pending=null),c=c.next}el=!1}if(Hs=0,Ut=Dt=bt=null,Ca=!1,Ea=0,Tc.current=null,o===null||o.return===null){$t=1,La=s,Lt=null;break}e:{var g=n,j=o.return,C=o,O=s;if(s=Wt,C.flags|=32768,O!==null&&typeof O=="object"&&typeof O.then=="function"){var q=O,ee=C,te=ee.tag;if((ee.mode&1)===0&&(te===0||te===11||te===15)){var Y=ee.alternate;Y?(ee.updateQueue=Y.updateQueue,ee.memoizedState=Y.memoizedState,ee.lanes=Y.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var he=Fp(j);if(he!==null){he.flags&=-257,Dp(he,j,C,g,s),he.mode&1&&Mp(g,q,s),s=he,O=q;var be=s.updateQueue;if(be===null){var _e=new Set;_e.add(O),s.updateQueue=_e}else be.add(O);break e}else{if((s&1)===0){Mp(g,q,s),Uc();break e}O=Error(r(426))}}else if(gt&&C.mode&1){var Ot=Fp(j);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),Dp(Ot,j,C,g,s),Yu(Ci(O,C));break e}}g=O=Ci(O,C),$t!==4&&($t=2),Aa===null?Aa=[g]:Aa.push(g),g=j;do{switch(g.tag){case 3:g.flags|=65536,s&=-s,g.lanes|=s;var U=Ap(g,O,s);op(g,U);break e;case 1:C=O;var A=g.type,B=g.stateNode;if((g.flags&128)===0&&(typeof A.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(ps===null||!ps.has(B)))){g.flags|=65536,s&=-s,g.lanes|=s;var se=Ip(g,C,s);op(g,se);break e}}g=g.return}while(g!==null)}mm(o)}catch(Se){s=Se,Lt===o&&o!==null&&(Lt=o=o.return);continue}break}while(!0)}function hm(){var n=ul.current;return ul.current=rl,n===null?rl:n}function Uc(){($t===0||$t===3||$t===2)&&($t=4),Vt===null||(Ws&268435455)===0&&(cl&268435455)===0||ys(Vt,Wt)}function gl(n,s){var o=tt;tt|=2;var c=hm();(Vt!==n||Wt!==s)&&(Hr=null,Qs(n,s));do try{j1();break}catch(h){fm(n,h)}while(!0);if(ec(),tt=o,ul.current=c,Lt!==null)throw Error(r(261));return Vt=null,Wt=0,$t}function j1(){for(;Lt!==null;)pm(Lt)}function _1(){for(;Lt!==null&&!Qx();)pm(Lt)}function pm(n){var s=vm(n.alternate,n,Mn);n.memoizedProps=n.pendingProps,s===null?mm(n):Lt=s,Tc.current=null}function mm(n){var s=n;do{var o=s.alternate;if(n=s.return,(s.flags&32768)===0){if(o=m1(o,s,Mn),o!==null){Lt=o;return}}else{if(o=g1(o,s),o!==null){o.flags&=32767,Lt=o;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{$t=6,Lt=null;return}}if(s=s.sibling,s!==null){Lt=s;return}Lt=s=n}while(s!==null);$t===0&&($t=5)}function Zs(n,s,o){var c=ut,h=qn.transition;try{qn.transition=null,ut=1,S1(n,s,o,c)}finally{qn.transition=h,ut=c}return null}function S1(n,s,o,c){do Ri();while(ms!==null);if((tt&6)!==0)throw Error(r(327));o=n.finishedWork;var h=n.finishedLanes;if(o===null)return null;if(n.finishedWork=null,n.finishedLanes=0,o===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var g=o.lanes|o.childLanes;if(s0(n,g),n===Vt&&(Lt=Vt=null,Wt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||fl||(fl=!0,xm(wo,function(){return Ri(),null})),g=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||g){g=qn.transition,qn.transition=null;var j=ut;ut=1;var C=tt;tt|=4,Tc.current=null,v1(n,o),im(o,n),q0(Uu),Co=!!zu,Uu=zu=null,n.current=o,x1(o),Zx(),tt=C,ut=j,qn.transition=g}else n.current=o;if(fl&&(fl=!1,ms=n,hl=h),g=n.pendingLanes,g===0&&(ps=null),Yx(o.stateNode),kn(n,Pt()),s!==null)for(c=n.onRecoverableError,o=0;o<s.length;o++)h=s[o],c(h.value,{componentStack:h.stack,digest:h.digest});if(dl)throw dl=!1,n=Ic,Ic=null,n;return(hl&1)!==0&&n.tag!==0&&Ri(),g=n.pendingLanes,(g&1)!==0?n===Mc?Ia++:(Ia=0,Mc=n):Ia=0,cs(),null}function Ri(){if(ms!==null){var n=rh(hl),s=qn.transition,o=ut;try{if(qn.transition=null,ut=16>n?16:n,ms===null)var c=!1;else{if(n=ms,ms=null,hl=0,(tt&6)!==0)throw Error(r(331));var h=tt;for(tt|=4,xe=n.current;xe!==null;){var g=xe,j=g.child;if((xe.flags&16)!==0){var C=g.deletions;if(C!==null){for(var O=0;O<C.length;O++){var q=C[O];for(xe=q;xe!==null;){var ee=xe;switch(ee.tag){case 0:case 11:case 15:Ta(8,ee,g)}var te=ee.child;if(te!==null)te.return=ee,xe=te;else for(;xe!==null;){ee=xe;var Y=ee.sibling,he=ee.return;if(em(ee),ee===q){xe=null;break}if(Y!==null){Y.return=he,xe=Y;break}xe=he}}}var be=g.alternate;if(be!==null){var _e=be.child;if(_e!==null){be.child=null;do{var Ot=_e.sibling;_e.sibling=null,_e=Ot}while(_e!==null)}}xe=g}}if((g.subtreeFlags&2064)!==0&&j!==null)j.return=g,xe=j;else e:for(;xe!==null;){if(g=xe,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:Ta(9,g,g.return)}var U=g.sibling;if(U!==null){U.return=g.return,xe=U;break e}xe=g.return}}var A=n.current;for(xe=A;xe!==null;){j=xe;var B=j.child;if((j.subtreeFlags&2064)!==0&&B!==null)B.return=j,xe=B;else e:for(j=A;xe!==null;){if(C=xe,(C.flags&2048)!==0)try{switch(C.tag){case 0:case 11:case 15:ll(9,C)}}catch(Se){kt(C,C.return,Se)}if(C===j){xe=null;break e}var se=C.sibling;if(se!==null){se.return=C.return,xe=se;break e}xe=C.return}}if(tt=h,cs(),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(bo,n)}catch{}c=!0}return c}finally{ut=o,qn.transition=s}}return!1}function gm(n,s,o){s=Ci(o,s),s=Ap(n,s,1),n=fs(n,s,1),s=on(),n!==null&&(ia(n,1,s),kn(n,s))}function kt(n,s,o){if(n.tag===3)gm(n,n,o);else for(;s!==null;){if(s.tag===3){gm(s,n,o);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ps===null||!ps.has(c))){n=Ci(o,n),n=Ip(s,n,1),s=fs(s,n,1),n=on(),s!==null&&(ia(s,1,n),kn(s,n));break}}s=s.return}}function k1(n,s,o){var c=n.pingCache;c!==null&&c.delete(s),s=on(),n.pingedLanes|=n.suspendedLanes&o,Vt===n&&(Wt&o)===o&&($t===4||$t===3&&(Wt&130023424)===Wt&&500>Pt()-Ac?Qs(n,0):Lc|=o),kn(n,s)}function ym(n,s){s===0&&((n.mode&1)===0?s=1:(s=_o,_o<<=1,(_o&130023424)===0&&(_o=4194304)));var o=on();n=Vr(n,s),n!==null&&(ia(n,s,o),kn(n,o))}function N1(n){var s=n.memoizedState,o=0;s!==null&&(o=s.retryLane),ym(n,o)}function C1(n,s){var o=0;switch(n.tag){case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(o=h.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(s),ym(n,o)}var vm;vm=function(n,s,o){if(n!==null)if(n.memoizedProps!==s.pendingProps||bn.current)_n=!0;else{if((n.lanes&o)===0&&(s.flags&128)===0)return _n=!1,p1(n,s,o);_n=(n.flags&131072)!==0}else _n=!1,gt&&(s.flags&1048576)!==0&&Jh(s,Ho,s.index);switch(s.lanes=0,s.tag){case 2:var c=s.type;al(n,s),n=s.pendingProps;var h=xi(s,Qt.current);ki(s,o),h=dc(null,s,c,n,h,o);var g=fc();return s.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jn(c)?(g=!0,Vo(s)):g=!1,s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,sc(s),h.updater=sl,s.stateNode=h,h._reactInternals=s,vc(s,c,n,o),s=jc(null,s,c,!0,g,o)):(s.tag=0,gt&&g&&Qu(s),an(null,s,h,o),s=s.child),s;case 16:c=s.elementType;e:{switch(al(n,s),n=s.pendingProps,h=c._init,c=h(c._payload),s.type=c,h=s.tag=P1(c),n=rr(c,n),h){case 0:s=bc(null,s,c,n,o);break e;case 1:s=qp(null,s,c,n,o);break e;case 11:s=$p(null,s,c,n,o);break e;case 14:s=zp(null,s,c,rr(c.type,n),o);break e}throw Error(r(306,c,""))}return s;case 0:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:rr(c,h),bc(n,s,c,h,o);case 1:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:rr(c,h),qp(n,s,c,h,o);case 3:e:{if(Hp(s),n===null)throw Error(r(387));c=s.pendingProps,g=s.memoizedState,h=g.element,ap(n,s),Jo(s,c,null,o);var j=s.memoizedState;if(c=j.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},s.updateQueue.baseState=g,s.memoizedState=g,s.flags&256){h=Ci(Error(r(423)),s),s=Wp(n,s,c,o,h);break e}else if(c!==h){h=Ci(Error(r(424)),s),s=Wp(n,s,c,o,h);break e}else for(In=os(s.stateNode.containerInfo.firstChild),An=s,gt=!0,nr=null,o=sp(s,null,c,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ji(),c===h){s=qr(n,s,o);break e}an(n,s,c,o)}s=s.child}return s;case 5:return up(s),n===null&&Ju(s),c=s.type,h=s.pendingProps,g=n!==null?n.memoizedProps:null,j=h.children,Vu(c,h)?j=null:g!==null&&Vu(c,g)&&(s.flags|=32),Bp(n,s),an(n,s,j,o),s.child;case 6:return n===null&&Ju(s),null;case 13:return Kp(n,s,o);case 4:return ic(s,s.stateNode.containerInfo),c=s.pendingProps,n===null?s.child=_i(s,null,c,o):an(n,s,c,o),s.child;case 11:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:rr(c,h),$p(n,s,c,h,o);case 7:return an(n,s,s.pendingProps,o),s.child;case 8:return an(n,s,s.pendingProps.children,o),s.child;case 12:return an(n,s,s.pendingProps.children,o),s.child;case 10:e:{if(c=s.type._context,h=s.pendingProps,g=s.memoizedProps,j=h.value,ft(Qo,c._currentValue),c._currentValue=j,g!==null)if(tr(g.value,j)){if(g.children===h.children&&!bn.current){s=qr(n,s,o);break e}}else for(g=s.child,g!==null&&(g.return=s);g!==null;){var C=g.dependencies;if(C!==null){j=g.child;for(var O=C.firstContext;O!==null;){if(O.context===c){if(g.tag===1){O=Br(-1,o&-o),O.tag=2;var q=g.updateQueue;if(q!==null){q=q.shared;var ee=q.pending;ee===null?O.next=O:(O.next=ee.next,ee.next=O),q.pending=O}}g.lanes|=o,O=g.alternate,O!==null&&(O.lanes|=o),nc(g.return,o,s),C.lanes|=o;break}O=O.next}}else if(g.tag===10)j=g.type===s.type?null:g.child;else if(g.tag===18){if(j=g.return,j===null)throw Error(r(341));j.lanes|=o,C=j.alternate,C!==null&&(C.lanes|=o),nc(j,o,s),j=g.sibling}else j=g.child;if(j!==null)j.return=g;else for(j=g;j!==null;){if(j===s){j=null;break}if(g=j.sibling,g!==null){g.return=j.return,j=g;break}j=j.return}g=j}an(n,s,h.children,o),s=s.child}return s;case 9:return h=s.type,c=s.pendingProps.children,ki(s,o),h=Vn(h),c=c(h),s.flags|=1,an(n,s,c,o),s.child;case 14:return c=s.type,h=rr(c,s.pendingProps),h=rr(c.type,h),zp(n,s,c,h,o);case 15:return Up(n,s,s.type,s.pendingProps,o);case 17:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:rr(c,h),al(n,s),s.tag=1,jn(c)?(n=!0,Vo(s)):n=!1,ki(s,o),Tp(s,c,h),vc(s,c,h,o),jc(null,s,c,!0,n,o);case 19:return Zp(n,s,o);case 22:return Vp(n,s,o)}throw Error(r(156,s.tag))};function xm(n,s){return Yf(n,s)}function E1(n,s,o,c){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hn(n,s,o,c){return new E1(n,s,o,c)}function Vc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function P1(n){if(typeof n=="function")return Vc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===J)return 11;if(n===M)return 14}return 2}function vs(n,s){var o=n.alternate;return o===null?(o=Hn(n.tag,s,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=s,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&14680064,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,s=n.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o}function yl(n,s,o,c,h,g){var j=2;if(c=n,typeof n=="function")Vc(n)&&(j=1);else if(typeof n=="string")j=5;else e:switch(n){case X:return Gs(o.children,h,g,s);case re:j=8,h|=8;break;case de:return n=Hn(12,o,s,h|2),n.elementType=de,n.lanes=g,n;case ve:return n=Hn(13,o,s,h),n.elementType=ve,n.lanes=g,n;case me:return n=Hn(19,o,s,h),n.elementType=me,n.lanes=g,n;case G:return vl(o,h,g,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Z:j=10;break e;case Oe:j=9;break e;case J:j=11;break e;case M:j=14;break e;case R:j=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return s=Hn(j,o,s,h),s.elementType=n,s.type=c,s.lanes=g,s}function Gs(n,s,o,c){return n=Hn(7,n,c,s),n.lanes=o,n}function vl(n,s,o,c){return n=Hn(22,n,c,s),n.elementType=G,n.lanes=o,n.stateNode={isHidden:!1},n}function Bc(n,s,o){return n=Hn(6,n,null,s),n.lanes=o,n}function qc(n,s,o){return s=Hn(4,n.children!==null?n.children:[],n.key,s),s.lanes=o,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function O1(n,s,o,c,h){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yu(0),this.expirationTimes=yu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yu(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Hc(n,s,o,c,h,g,j,C,O){return n=new O1(n,s,o,C,O),s===1?(s=1,g===!0&&(s|=8)):s=0,g=Hn(3,null,null,s),n.current=g,g.stateNode=n,g.memoizedState={element:c,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},sc(g),n}function R1(n,s,o){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:c==null?null:""+c,children:n,containerInfo:s,implementation:o}}function wm(n){if(!n)return us;n=n._reactInternals;e:{if(Ds(n)!==n||n.tag!==1)throw Error(r(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(n.tag===1){var o=n.type;if(jn(o))return Qh(n,o,s)}return s}function bm(n,s,o,c,h,g,j,C,O){return n=Hc(o,c,!0,n,h,g,j,C,O),n.context=wm(null),o=n.current,c=on(),h=gs(o),g=Br(c,h),g.callback=s??null,fs(o,g,h),n.current.lanes=h,ia(n,h,c),kn(n,c),n}function xl(n,s,o,c){var h=s.current,g=on(),j=gs(h);return o=wm(o),s.context===null?s.context=o:s.pendingContext=o,s=Br(g,j),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=fs(h,s,j),n!==null&&(ar(n,h,j,g),Go(n,h,j)),j}function wl(n){return n=n.current,n.child?(n.child.tag===5,n.child.stateNode):null}function jm(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<s?o:s}}function Wc(n,s){jm(n,s),(n=n.alternate)&&jm(n,s)}function T1(){return null}var _m=typeof reportError=="function"?reportError:function(n){console.error(n)};function Kc(n){this._internalRoot=n}bl.prototype.render=Kc.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(r(409));xl(n,s,null,null)},bl.prototype.unmount=Kc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;Ks(function(){xl(null,n,null,null)}),s[Dr]=null}};function bl(n){this._internalRoot=n}bl.prototype.unstable_scheduleHydration=function(n){if(n){var s=ah();n={blockedOn:null,target:n,priority:s};for(var o=0;o<ss.length&&s!==0&&s<ss[o].priority;o++);ss.splice(o,0,n),o===0&&uh(n)}};function Qc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function jl(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Sm(){}function L1(n,s,o,c,h){if(h){if(typeof c=="function"){var g=c;c=function(){var q=wl(j);g.call(q)}}var j=bm(s,c,n,0,null,!1,!1,"",Sm);return n._reactRootContainer=j,n[Dr]=j.current,xa(n.nodeType===8?n.parentNode:n),Ks(),j}for(;h=n.lastChild;)n.removeChild(h);if(typeof c=="function"){var C=c;c=function(){var q=wl(O);C.call(q)}}var O=Hc(n,0,!1,null,null,!1,!1,"",Sm);return n._reactRootContainer=O,n[Dr]=O.current,xa(n.nodeType===8?n.parentNode:n),Ks(function(){xl(s,O,o,c)}),O}function _l(n,s,o,c,h){var g=o._reactRootContainer;if(g){var j=g;if(typeof h=="function"){var C=h;h=function(){var O=wl(j);C.call(O)}}xl(s,j,n,h)}else j=L1(o,s,n,h,c);return wl(j)}sh=function(n){switch(n.tag){case 3:var s=n.stateNode;if(s.current.memoizedState.isDehydrated){var o=sa(s.pendingLanes);o!==0&&(vu(s,o|1),kn(s,Pt()),(tt&6)===0&&(Oi=Pt()+500,cs()))}break;case 13:Ks(function(){var c=Vr(n,1);if(c!==null){var h=on();ar(c,n,1,h)}}),Wc(n,1)}},xu=function(n){if(n.tag===13){var s=Vr(n,134217728);if(s!==null){var o=on();ar(s,n,134217728,o)}Wc(n,134217728)}},ih=function(n){if(n.tag===13){var s=gs(n),o=Vr(n,s);if(o!==null){var c=on();ar(o,n,s,c)}Wc(n,s)}},ah=function(){return ut},oh=function(n,s){var o=ut;try{return ut=n,s()}finally{ut=o}},Fr=function(n,s,o){switch(s){case"input":if(Ms(n,o),s=o.name,o.type==="radio"&&s!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<o.length;s++){var c=o[s];if(c!==n&&c.form===n.form){var h=zo(c);if(!h)throw Error(r(90));Tr(c),Ms(c,h)}}}break;case"textarea":E(n,o);break;case"select":s=o.value,s!=null&&vn(n,!!o.multiple,s,!1)}},at=$c,ct=Ks;var A1={usingClientEntryPoint:!1,Events:[ja,yi,zo,yo,Fe,$c]},Ma={findFiberByHostInstance:$s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},I1={bundleType:Ma.bundleType,version:Ma.version,rendererPackageName:Ma.rendererPackageName,rendererConfig:Ma.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Gf(n),n===null?null:n.stateNode},findFiberByHostInstance:Ma.findFiberByHostInstance||T1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sl.isDisabled&&Sl.supportsFiber)try{bo=Sl.inject(I1),yr=Sl}catch{}}return Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A1,Nn.createPortal=function(n,s){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Qc(s))throw Error(r(200));return R1(n,s,null,o)},Nn.createRoot=function(n,s){if(!Qc(n))throw Error(r(299));var o=!1,c="",h=_m;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onRecoverableError!==void 0&&(h=s.onRecoverableError)),s=Hc(n,1,!1,null,null,o,!1,c,h),n[Dr]=s.current,xa(n.nodeType===8?n.parentNode:n),new Kc(s)},Nn.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Gf(s),n=n===null?null:n.stateNode,n},Nn.flushSync=function(n){return Ks(n)},Nn.hydrate=function(n,s,o){if(!jl(s))throw Error(r(200));return _l(null,n,s,!0,o)},Nn.hydrateRoot=function(n,s,o){if(!Qc(n))throw Error(r(405));var c=o!=null&&o.hydratedSources||null,h=!1,g="",j=_m;if(o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onRecoverableError!==void 0&&(j=o.onRecoverableError)),s=bm(s,null,n,1,o??null,h,!1,g,j),n[Dr]=s.current,xa(n),c)for(n=0;n<c.length;n++)o=c[n],h=o._getVersion,h=h(o._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[o,h]:s.mutableSourceEagerHydrationData.push(o,h);return new bl(s)},Nn.render=function(n,s,o){if(!jl(s))throw Error(r(200));return _l(null,n,s,!1,o)},Nn.unmountComponentAtNode=function(n){if(!jl(n))throw Error(r(40));return n._reactRootContainer?(Ks(function(){_l(null,null,n,!1,function(){n._reactRootContainer=null,n[Dr]=null})}),!0):!1},Nn.unstable_batchedUpdates=$c,Nn.unstable_renderSubtreeIntoContainer=function(n,s,o,c){if(!jl(o))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return _l(n,s,o,!1,c)},Nn.version="18.3.1-next-f1338f8080-20240426",Nn}var Tm;function By(){if(Tm)return Jc.exports;Tm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Jc.exports=B1(),Jc.exports}var Lm;function q1(){if(Lm)return kl;Lm=1;var t=By();return kl.createRoot=t.createRoot,kl.hydrateRoot=t.hydrateRoot,kl}var H1=q1();const W1=iu(H1);var ed={exports:{}},td={};var Am;function K1(){if(Am)return td;Am=1;var t=po();function e(w,y){return w===y&&(w!==0||1/w===1/y)||w!==w&&y!==y}var r=typeof Object.is=="function"?Object.is:e,i=t.useState,a=t.useEffect,l=t.useLayoutEffect,d=t.useDebugValue;function f(w,y){var x=y(),S=i({inst:{value:x,getSnapshot:y}}),_=S[0].inst,b=S[1];return l(function(){_.value=x,_.getSnapshot=y,m(_)&&b({inst:_})},[w,x,y]),a(function(){return m(_)&&b({inst:_}),w(function(){m(_)&&b({inst:_})})},[w]),d(x),x}function m(w){var y=w.getSnapshot;w=w.value;try{var x=y();return!r(w,x)}catch{return!0}}function p(w,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return td.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,td}var Im;function qy(){return Im||(Im=1,ed.exports=K1()),ed.exports}qy();var nd={exports:{}},rd={};var Mm;function Q1(){if(Mm)return rd;Mm=1;var t=po(),e=qy();function r(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var i=typeof Object.is=="function"?Object.is:r,a=e.useSyncExternalStore,l=t.useRef,d=t.useEffect,f=t.useMemo,m=t.useDebugValue;return rd.useSyncExternalStoreWithSelector=function(p,v,w,y,x){var S=l(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=f(function(){function P(I){if(!N){if(N=!0,F=I,I=y(I),x!==void 0&&_.hasValue){var X=_.value;if(x(X,I))return L=X}return L=I}if(X=L,i(F,I))return X;var re=y(I);return x!==void 0&&x(X,re)?(F=I,X):(F=I,L=re)}var N=!1,F,L,k=w===void 0?null:w;return[function(){return P(v())},k===null?void 0:function(){return P(k())}]},[v,w,y,x]);var b=a(p,S[0],S[1]);return d(function(){_.hasValue=!0,_.value=b},[b]),m(b),b},rd}var Fm;function Z1(){return Fm||(Fm=1,nd.exports=Q1()),nd.exports}var G1=Z1(),Hy=By();const J1=iu(Hy);function Y1(t){t()}let Wy=Y1;const X1=t=>Wy=t,ew=()=>Wy,Dm=Symbol.for("react-redux-context"),$m=typeof globalThis<"u"?globalThis:{};function tw(){var t;if(!$.createContext)return{};const e=(t=$m[Dm])!=null?t:$m[Dm]=new Map;let r=e.get($.createContext);return r||(r=$.createContext(null),e.set($.createContext,r)),r}const Rs=tw();function gf(t=Rs){return function(){return $.useContext(t)}}const Ky=gf(),nw=()=>{throw new Error("uSES not initialized!")};let Qy=nw;const rw=t=>{Qy=t},sw=(t,e)=>t===e;function iw(t=Rs){const e=t===Rs?Ky:gf(t);return function(i,a={}){const{equalityFn:l=sw,stabilityCheck:d=void 0,noopCheck:f=void 0}=typeof a=="function"?{equalityFn:a}:a,{store:m,subscription:p,getServerState:v,stabilityCheck:w,noopCheck:y}=e();$.useRef(!0);const x=$.useCallback({[i.name](_){return i(_)}}[i.name],[i,w,d]),S=Qy(p.addNestedSub,m.getState,v||m.getState,x,l);return $.useDebugValue(S),S}}const aw=iw();var sd={exports:{}},ot={};var zm;function ow(){if(zm)return ot;zm=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,l=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,f=t?Symbol.for("react.context"):60110,m=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,v=t?Symbol.for("react.forward_ref"):60112,w=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,x=t?Symbol.for("react.memo"):60115,S=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,P=t?Symbol.for("react.responder"):60118,N=t?Symbol.for("react.scope"):60119;function F(k){if(typeof k=="object"&&k!==null){var I=k.$$typeof;switch(I){case e:switch(k=k.type,k){case m:case p:case i:case l:case a:case w:return k;default:switch(k=k&&k.$$typeof,k){case f:case v:case S:case x:case d:return k;default:return I}}case r:return I}}}function L(k){return F(k)===p}return ot.AsyncMode=m,ot.ConcurrentMode=p,ot.ContextConsumer=f,ot.ContextProvider=d,ot.Element=e,ot.ForwardRef=v,ot.Fragment=i,ot.Lazy=S,ot.Memo=x,ot.Portal=r,ot.Profiler=l,ot.StrictMode=a,ot.Suspense=w,ot.isAsyncMode=function(k){return L(k)||F(k)===m},ot.isConcurrentMode=L,ot.isContextConsumer=function(k){return F(k)===f},ot.isContextProvider=function(k){return F(k)===d},ot.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},ot.isForwardRef=function(k){return F(k)===v},ot.isFragment=function(k){return F(k)===i},ot.isLazy=function(k){return F(k)===S},ot.isMemo=function(k){return F(k)===x},ot.isPortal=function(k){return F(k)===r},ot.isProfiler=function(k){return F(k)===l},ot.isStrictMode=function(k){return F(k)===a},ot.isSuspense=function(k){return F(k)===w},ot.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===i||k===p||k===l||k===a||k===w||k===y||typeof k=="object"&&k!==null&&(k.$$typeof===S||k.$$typeof===x||k.$$typeof===d||k.$$typeof===f||k.$$typeof===v||k.$$typeof===b||k.$$typeof===P||k.$$typeof===N||k.$$typeof===_)},ot.typeOf=F,ot}var Um;function lw(){return Um||(Um=1,sd.exports=ow()),sd.exports}var id,Vm;function uw(){if(Vm)return id;Vm=1;var t=lw(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[t.ForwardRef]=i,l[t.Memo]=a;function d(S){return t.isMemo(S)?a:l[S.$$typeof]||e}var f=Object.defineProperty,m=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,w=Object.getPrototypeOf,y=Object.prototype;function x(S,_,b){if(typeof _!="string"){if(y){var P=w(_);P&&P!==y&&x(S,P,b)}var N=m(_);p&&(N=N.concat(p(_)));for(var F=d(S),L=d(_),k=0;k<N.length;++k){var I=N[k];if(!r[I]&&!(b&&b[I])&&!(L&&L[I])&&!(F&&F[I])){var X=v(_,I);try{f(S,I,X)}catch{}}}}return S}return id=x,id}uw();var ad={exports:{}},lt={};var Bm;function cw(){if(Bm)return lt;Bm=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.server_context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function _(b){if(typeof b=="object"&&b!==null){var P=b.$$typeof;switch(P){case t:switch(b=b.type,b){case r:case a:case i:case p:case v:return b;default:switch(b=b&&b.$$typeof,b){case f:case d:case m:case y:case w:case l:return b;default:return P}}case e:return P}}}return lt.ContextConsumer=d,lt.ContextProvider=l,lt.Element=t,lt.ForwardRef=m,lt.Fragment=r,lt.Lazy=y,lt.Memo=w,lt.Portal=e,lt.Profiler=a,lt.StrictMode=i,lt.Suspense=p,lt.SuspenseList=v,lt.isAsyncMode=function(){return!1},lt.isConcurrentMode=function(){return!1},lt.isContextConsumer=function(b){return _(b)===d},lt.isContextProvider=function(b){return _(b)===l},lt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},lt.isForwardRef=function(b){return _(b)===m},lt.isFragment=function(b){return _(b)===r},lt.isLazy=function(b){return _(b)===y},lt.isMemo=function(b){return _(b)===w},lt.isPortal=function(b){return _(b)===e},lt.isProfiler=function(b){return _(b)===a},lt.isStrictMode=function(b){return _(b)===i},lt.isSuspense=function(b){return _(b)===p},lt.isSuspenseList=function(b){return _(b)===v},lt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===a||b===i||b===p||b===v||b===x||typeof b=="object"&&b!==null&&(b.$$typeof===y||b.$$typeof===w||b.$$typeof===l||b.$$typeof===d||b.$$typeof===m||b.$$typeof===S||b.getModuleId!==void 0)},lt.typeOf=_,lt}var qm;function dw(){return qm||(qm=1,ad.exports=cw()),ad.exports}dw();function fw(){const t=ew();let e=null,r=null;return{clear(){e=null,r=null},notify(){t(()=>{let i=e;for(;i;)i.callback(),i=i.next})},get(){let i=[],a=e;for(;a;)i.push(a),a=a.next;return i},subscribe(i){let a=!0,l=r={callback:i,next:null,prev:r};return l.prev?l.prev.next=l:e=l,function(){!a||e===null||(a=!1,l.next?l.next.prev=l.prev:r=l.prev,l.prev?l.prev.next=l.next:e=l.next)}}}}const Hm={notify(){},get:()=>[]};function hw(t,e){let r,i=Hm,a=0,l=!1;function d(_){v();const b=i.subscribe(_);let P=!1;return()=>{P||(P=!0,b(),w())}}function f(){i.notify()}function m(){S.onStateChange&&S.onStateChange()}function p(){return l}function v(){a++,r||(r=t.subscribe(m),i=fw())}function w(){a--,r&&a===0&&(r(),r=void 0,i.clear(),i=Hm)}function y(){l||(l=!0,v())}function x(){l&&(l=!1,w())}const S={addNestedSub:d,notifyNestedSubs:f,handleChangeWrapper:m,isSubscribed:p,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>i};return S}const pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mw=pw?$.useLayoutEffect:$.useEffect;function gw({store:t,context:e,children:r,serverState:i,stabilityCheck:a="once",noopCheck:l="once"}){const d=$.useMemo(()=>{const p=hw(t);return{store:t,subscription:p,getServerState:i?()=>i:void 0,stabilityCheck:a,noopCheck:l}},[t,i,a,l]),f=$.useMemo(()=>t.getState(),[t]);mw(()=>{const{subscription:p}=d;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==t.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[d,f]);const m=e||Rs;return $.createElement(m.Provider,{value:d},r)}function Zy(t=Rs){const e=t===Rs?Ky:gf(t);return function(){const{store:i}=e();return i}}const yw=Zy();function vw(t=Rs){const e=t===Rs?yw:Zy(t);return function(){return e().dispatch}}const xw=vw();rw(G1.useSyncExternalStoreWithSelector);X1(Hy.unstable_batchedUpdates);function eo(){return eo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},eo.apply(this,arguments)}var ks;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(ks||(ks={}));const Wm="popstate";function ww(t){t===void 0&&(t={});function e(i,a){let{pathname:l,search:d,hash:f}=i.location;return Od("",{pathname:l,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(i,a){return typeof a=="string"?a:Fl(a)}return jw(e,r,null,t)}function Et(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function yf(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function bw(){return Math.random().toString(36).substr(2,8)}function Km(t,e){return{usr:t.state,key:t.key,idx:e}}function Od(t,e,r,i){return r===void 0&&(r=null),eo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Yi(e):e,{state:r,key:e&&e.key||i||bw()})}function Fl(t){let{pathname:e="/",search:r="",hash:i=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Yi(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function jw(t,e,r,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:l=!1}=i,d=a.history,f=ks.Pop,m=null,p=v();p==null&&(p=0,d.replaceState(eo({},d.state,{idx:p}),""));function v(){return(d.state||{idx:null}).idx}function w(){f=ks.Pop;let b=v(),P=b==null?null:b-p;p=b,m&&m({action:f,location:_.location,delta:P})}function y(b,P){f=ks.Push;let N=Od(_.location,b,P);p=v()+1;let F=Km(N,p),L=_.createHref(N);try{d.pushState(F,"",L)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(L)}l&&m&&m({action:f,location:_.location,delta:1})}function x(b,P){f=ks.Replace;let N=Od(_.location,b,P);p=v();let F=Km(N,p),L=_.createHref(N);d.replaceState(F,"",L),l&&m&&m({action:f,location:_.location,delta:0})}function S(b){let P=a.location.origin!=="null"?a.location.origin:a.location.href,N=typeof b=="string"?b:Fl(b);return N=N.replace(/ $/,"%20"),Et(P,"No window.location.(origin|href) available to create URL for href: "+N),new URL(N,P)}let _={get action(){return f},get location(){return t(a,d)},listen(b){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(Wm,w),m=b,()=>{a.removeEventListener(Wm,w),m=null}},createHref(b){return e(a,b)},createURL:S,encodeLocation(b){let P=S(b);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:y,replace:x,go(b){return d.go(b)}};return _}var Qm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Qm||(Qm={}));function _w(t,e,r){return r===void 0&&(r="/"),Sw(t,e,r)}function Sw(t,e,r,i){let a=typeof e=="string"?Yi(e):e,l=Ui(a.pathname||"/",r);if(l==null)return null;let d=Gy(t);kw(d);let f=null;for(let m=0;f==null&&m<d.length;++m){let p=Mw(l);f=Aw(d[m],p)}return f}function Gy(t,e,r,i){e===void 0&&(e=[]),r===void 0&&(r=[]),i===void 0&&(i="");let a=(l,d,f)=>{let m={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};m.relativePath.startsWith("/")&&(Et(m.relativePath.startsWith(i),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(i.length));let p=Ns([i,m.relativePath]),v=r.concat(m);l.children&&l.children.length>0&&(Et(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Gy(l.children,e,v,p)),!(l.path==null&&!l.index)&&e.push({path:p,score:Tw(p,l.index),routesMeta:v})};return t.forEach((l,d)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))a(l,d);else for(let m of Jy(l.path))a(l,d,m)}),e}function Jy(t){let e=t.split("/");if(e.length===0)return[];let[r,...i]=e,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(i.length===0)return a?[l,""]:[l];let d=Jy(i.join("/")),f=[];return f.push(...d.map(m=>m===""?l:[l,m].join("/"))),a&&f.push(...d),f.map(m=>t.startsWith("/")&&m===""?"/":m)}function kw(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Lw(e.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const Nw=/^:[\w-]+$/,Cw=3,Ew=2,Pw=1,Ow=10,Rw=-2,Zm=t=>t==="*";function Tw(t,e){let r=t.split("/"),i=r.length;return r.some(Zm)&&(i+=Rw),e&&(i+=Ew),r.filter(a=>!Zm(a)).reduce((a,l)=>a+(Nw.test(l)?Cw:l===""?Pw:Ow),i)}function Lw(t,e){return t.length===e.length&&t.slice(0,-1).every((i,a)=>i===e[a])?t[t.length-1]-e[e.length-1]:0}function Aw(t,e,r){let{routesMeta:i}=t,a={},l="/",d=[];for(let f=0;f<i.length;++f){let m=i[f],p=f===i.length-1,v=l==="/"?e:e.slice(l.length)||"/",w=to({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},v),y=m.route;if(!w)return null;Object.assign(a,w.params),d.push({params:a,pathname:Ns([l,w.pathname]),pathnameBase:Uw(Ns([l,w.pathnameBase])),route:y}),w.pathnameBase!=="/"&&(l=Ns([l,w.pathnameBase]))}return d}function to(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,i]=Iw(t.path,t.caseSensitive,t.end),a=e.match(r);if(!a)return null;let l=a[0],d=l.replace(/(.)\/+$/,"$1"),f=a.slice(1);return{params:i.reduce((p,v,w)=>{let{paramName:y,isOptional:x}=v;if(y==="*"){let _=f[w]||"";d=l.slice(0,l.length-_.length).replace(/(.)\/+$/,"$1")}const S=f[w];return x&&!S?p[y]=void 0:p[y]=(S||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:d,pattern:t}}function Iw(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),yf(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m)=>(i.push({paramName:f,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}function Mw(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return yf(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ui(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}const Fw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dw=t=>Fw.test(t);function $w(t,e){e===void 0&&(e="/");let{pathname:r,search:i="",hash:a=""}=typeof t=="string"?Yi(t):t,l;if(r)if(Dw(r))l=r;else{if(r.includes("//")){let d=r;r=r.replace(/\/\/+/g,"/"),yf(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+r))}r.startsWith("/")?l=Gm(r.substring(1),"/"):l=Gm(r,e)}else l=e;return{pathname:l,search:Vw(i),hash:Bw(a)}}function Gm(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function od(t,e,r,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function zw(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Yy(t,e){let r=zw(t);return e?r.map((i,a)=>a===r.length-1?i.pathname:i.pathnameBase):r.map(i=>i.pathnameBase)}function Xy(t,e,r,i){i===void 0&&(i=!1);let a;typeof t=="string"?a=Yi(t):(a=eo({},t),Et(!a.pathname||!a.pathname.includes("?"),od("?","pathname","search",a)),Et(!a.pathname||!a.pathname.includes("#"),od("#","pathname","hash",a)),Et(!a.search||!a.search.includes("#"),od("#","search","hash",a)));let l=t===""||a.pathname==="",d=l?"/":a.pathname,f;if(d==null)f=r;else{let w=e.length-1;if(!i&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),w-=1;a.pathname=y.join("/")}f=w>=0?e[w]:"/"}let m=$w(a,f),p=d&&d!=="/"&&d.endsWith("/"),v=(l||d===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(p||v)&&(m.pathname+="/"),m}const Ns=t=>t.join("/").replace(/\/\/+/g,"/"),Uw=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Vw=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Bw=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function qw(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ev=["post","put","patch","delete"];new Set(ev);const Hw=["get",...ev];new Set(Hw);function no(){return no=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},no.apply(this,arguments)}const au=$.createContext(null),tv=$.createContext(null),Is=$.createContext(null),ou=$.createContext(null),Jr=$.createContext({outlet:null,matches:[],isDataRoute:!1}),nv=$.createContext(null);function Ww(t,e){let{relative:r}=e===void 0?{}:e;mo()||Et(!1);let{basename:i,navigator:a}=$.useContext(Is),{hash:l,pathname:d,search:f}=lu(t,{relative:r}),m=d;return i!=="/"&&(m=d==="/"?i:Ns([i,d])),a.createHref({pathname:m,search:f,hash:l})}function mo(){return $.useContext(ou)!=null}function Xi(){return mo()||Et(!1),$.useContext(ou).location}function rv(t){$.useContext(Is).static||$.useLayoutEffect(t)}function mn(){let{isDataRoute:t}=$.useContext(Jr);return t?ob():Kw()}function Kw(){mo()||Et(!1);let t=$.useContext(au),{basename:e,future:r,navigator:i}=$.useContext(Is),{matches:a}=$.useContext(Jr),{pathname:l}=Xi(),d=JSON.stringify(Yy(a,r.v7_relativeSplatPath)),f=$.useRef(!1);return rv(()=>{f.current=!0}),$.useCallback(function(p,v){if(v===void 0&&(v={}),!f.current)return;if(typeof p=="number"){i.go(p);return}let w=Xy(p,JSON.parse(d),l,v.relative==="path");t==null&&e!=="/"&&(w.pathname=w.pathname==="/"?e:Ns([e,w.pathname])),(v.replace?i.replace:i.push)(w,v.state,v)},[e,i,d,l,t])}const Qw=$.createContext(null);function Zw(t){let e=$.useContext(Jr).outlet;return e&&$.createElement(Qw.Provider,{value:t},e)}function fr(){let{matches:t}=$.useContext(Jr),e=t[t.length-1];return e?e.params:{}}function lu(t,e){let{relative:r}=e===void 0?{}:e,{future:i}=$.useContext(Is),{matches:a}=$.useContext(Jr),{pathname:l}=Xi(),d=JSON.stringify(Yy(a,i.v7_relativeSplatPath));return $.useMemo(()=>Xy(t,JSON.parse(d),l,r==="path"),[t,d,l,r])}function Gw(t,e){return Jw(t,e)}function Jw(t,e,r,i){mo()||Et(!1);let{navigator:a}=$.useContext(Is),{matches:l}=$.useContext(Jr),d=l[l.length-1],f=d?d.params:{};d&&d.pathname;let m=d?d.pathnameBase:"/";d&&d.route;let p=Xi(),v;if(e){var w;let b=typeof e=="string"?Yi(e):e;m==="/"||(w=b.pathname)!=null&&w.startsWith(m)||Et(!1),v=b}else v=p;let y=v.pathname||"/",x=y;if(m!=="/"){let b=m.replace(/^\//,"").split("/");x="/"+y.replace(/^\//,"").split("/").slice(b.length).join("/")}let S=_w(t,{pathname:x}),_=nb(S&&S.map(b=>Object.assign({},b,{params:Object.assign({},f,b.params),pathname:Ns([m,a.encodeLocation?a.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?m:Ns([m,a.encodeLocation?a.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),l,r,i);return e&&_?$.createElement(ou.Provider,{value:{location:no({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:ks.Pop}},_):_}function Yw(){let t=ab(),e=qw(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},e),r?$.createElement("pre",{style:a},r):null,null)}const Xw=$.createElement(Yw,null);class eb extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?$.createElement(Jr.Provider,{value:this.props.routeContext},$.createElement(nv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tb(t){let{routeContext:e,match:r,children:i}=t,a=$.useContext(au);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(Jr.Provider,{value:e},i)}function nb(t,e,r,i){var a;if(e===void 0&&(e=[]),r===void 0&&(r=null),i===void 0&&(i=null),t==null){var l;if(!r)return null;if(r.errors)t=r.matches;else if((l=i)!=null&&l.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let d=t,f=(a=r)==null?void 0:a.errors;if(f!=null){let v=d.findIndex(w=>w.route.id&&f?.[w.route.id]!==void 0);v>=0||Et(!1),d=d.slice(0,Math.min(d.length,v+1))}let m=!1,p=-1;if(r&&i&&i.v7_partialHydration)for(let v=0;v<d.length;v++){let w=d[v];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(p=v),w.route.id){let{loaderData:y,errors:x}=r,S=w.route.loader&&y[w.route.id]===void 0&&(!x||x[w.route.id]===void 0);if(w.route.lazy||S){m=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}return d.reduceRight((v,w,y)=>{let x,S=!1,_=null,b=null;r&&(x=f&&w.route.id?f[w.route.id]:void 0,_=w.route.errorElement||Xw,m&&(p<0&&y===0?(lb("route-fallback"),S=!0,b=null):p===y&&(S=!0,b=w.route.hydrateFallbackElement||null)));let P=e.concat(d.slice(0,y+1)),N=()=>{let F;return x?F=_:S?F=b:w.route.Component?F=$.createElement(w.route.Component,null):w.route.element?F=w.route.element:F=v,$.createElement(tb,{match:w,routeContext:{outlet:v,matches:P,isDataRoute:r!=null},children:F})};return r&&(w.route.ErrorBoundary||w.route.errorElement||y===0)?$.createElement(eb,{location:r.location,revalidation:r.revalidation,component:_,error:x,children:N(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):N()},null)}var sv=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(sv||{}),iv=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(iv||{});function rb(t){let e=$.useContext(au);return e||Et(!1),e}function sb(t){let e=$.useContext(tv);return e||Et(!1),e}function ib(t){let e=$.useContext(Jr);return e||Et(!1),e}function av(t){let e=ib(),r=e.matches[e.matches.length-1];return r.route.id||Et(!1),r.route.id}function ab(){var t;let e=$.useContext(nv),r=sb(),i=av();return e!==void 0?e:(t=r.errors)==null?void 0:t[i]}function ob(){let{router:t}=rb(sv.UseNavigateStable),e=av(iv.UseNavigateStable),r=$.useRef(!1);return rv(()=>{r.current=!0}),$.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?t.navigate(a):t.navigate(a,no({fromRouteId:e},l)))},[t,e])}const Jm={};function lb(t,e,r){Jm[t]||(Jm[t]=!0)}function ub(t,e){t?.v7_startTransition,t?.v7_relativeSplatPath}function cb(t){return Zw(t.context)}function ln(t){Et(!1)}function db(t){let{basename:e="/",children:r=null,location:i,navigationType:a=ks.Pop,navigator:l,static:d=!1,future:f}=t;mo()&&Et(!1);let m=e.replace(/^\/*/,"/"),p=$.useMemo(()=>({basename:m,navigator:l,static:d,future:no({v7_relativeSplatPath:!1},f)}),[m,f,l,d]);typeof i=="string"&&(i=Yi(i));let{pathname:v="/",search:w="",hash:y="",state:x=null,key:S="default"}=i,_=$.useMemo(()=>{let b=Ui(v,m);return b==null?null:{location:{pathname:b,search:w,hash:y,state:x,key:S},navigationType:a}},[m,v,w,y,x,S,a]);return _==null?null:$.createElement(Is.Provider,{value:p},$.createElement(ou.Provider,{children:r,value:_}))}function fb(t){let{children:e,location:r}=t;return Gw(Rd(e),r)}new Promise(()=>{});function Rd(t,e){e===void 0&&(e=[]);let r=[];return $.Children.forEach(t,(i,a)=>{if(!$.isValidElement(i))return;let l=[...e,a];if(i.type===$.Fragment){r.push.apply(r,Rd(i.props.children,l));return}i.type!==ln&&Et(!1),!i.props.index||!i.props.children||Et(!1);let d={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Rd(i.props.children,l)),r.push(d)}),r}function Dl(){return Dl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Dl.apply(this,arguments)}function ov(t,e){if(t==null)return{};var r={},i=Object.keys(t),a,l;for(l=0;l<i.length;l++)a=i[l],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function hb(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function pb(t,e){return t.button===0&&(!e||e==="_self")&&!hb(t)}const mb=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gb=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],yb="6";try{window.__reactRouterVersion=yb}catch{}const vb=$.createContext({isTransitioning:!1}),xb="startTransition",Ym=z1[xb];function wb(t){let{basename:e,children:r,future:i,window:a}=t,l=$.useRef();l.current==null&&(l.current=ww({window:a,v5Compat:!0}));let d=l.current,[f,m]=$.useState({action:d.action,location:d.location}),{v7_startTransition:p}=i||{},v=$.useCallback(w=>{p&&Ym?Ym(()=>m(w)):m(w)},[m,p]);return $.useLayoutEffect(()=>d.listen(v),[d,v]),$.useEffect(()=>ub(i),[i]),$.createElement(db,{basename:e,children:r,location:f.location,navigationType:f.action,navigator:d,future:i})}const bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_b=$.forwardRef(function(e,r){let{onClick:i,relative:a,reloadDocument:l,replace:d,state:f,target:m,to:p,preventScrollReset:v,viewTransition:w}=e,y=ov(e,mb),{basename:x}=$.useContext(Is),S,_=!1;if(typeof p=="string"&&jb.test(p)&&(S=p,bb))try{let F=new URL(window.location.href),L=p.startsWith("//")?new URL(F.protocol+p):new URL(p),k=Ui(L.pathname,x);L.origin===F.origin&&k!=null?p=k+L.search+L.hash:_=!0}catch{}let b=Ww(p,{relative:a}),P=Nb(p,{replace:d,state:f,target:m,preventScrollReset:v,relative:a,viewTransition:w});function N(F){i&&i(F),F.defaultPrevented||P(F)}return $.createElement("a",Dl({},y,{href:S||b,onClick:_||l?i:N,ref:r,target:m}))}),Sb=$.forwardRef(function(e,r){let{"aria-current":i="page",caseSensitive:a=!1,className:l="",end:d=!1,style:f,to:m,viewTransition:p,children:v}=e,w=ov(e,gb),y=lu(m,{relative:w.relative}),x=Xi(),S=$.useContext(tv),{navigator:_,basename:b}=$.useContext(Is),P=S!=null&&Cb(y)&&p===!0,N=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,F=x.pathname,L=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(F=F.toLowerCase(),L=L?L.toLowerCase():null,N=N.toLowerCase()),L&&b&&(L=Ui(L,b)||L);const k=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let I=F===N||!d&&F.startsWith(N)&&F.charAt(k)==="/",X=L!=null&&(L===N||!d&&L.startsWith(N)&&L.charAt(N.length)==="/"),re={isActive:I,isPending:X,isTransitioning:P},de=I?i:void 0,Z;typeof l=="function"?Z=l(re):Z=[l,I?"active":null,X?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let Oe=typeof f=="function"?f(re):f;return $.createElement(_b,Dl({},w,{"aria-current":de,className:Z,ref:r,style:Oe,to:m,viewTransition:p}),typeof v=="function"?v(re):v)});var Td;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Td||(Td={}));var Xm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Xm||(Xm={}));function kb(t){let e=$.useContext(au);return e||Et(!1),e}function Nb(t,e){let{target:r,replace:i,state:a,preventScrollReset:l,relative:d,viewTransition:f}=e===void 0?{}:e,m=mn(),p=Xi(),v=lu(t,{relative:d});return $.useCallback(w=>{if(pb(w,r)){w.preventDefault();let y=i!==void 0?i:Fl(p)===Fl(v);m(t,{replace:y,state:a,preventScrollReset:l,relative:d,viewTransition:f})}},[p,m,v,i,a,r,t,l,d,f])}function Cb(t,e){e===void 0&&(e={});let r=$.useContext(vb);r==null&&Et(!1);let{basename:i}=kb(Td.useViewTransitionState),a=lu(t,{relative:e.relative});if(!r.isTransitioning)return!1;let l=Ui(r.currentLocation.pathname,i)||r.currentLocation.pathname,d=Ui(r.nextLocation.pathname,i)||r.nextLocation.pathname;return to(a.pathname,d)!=null||to(a.pathname,l)!=null}var ea=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Eb=class extends ea{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},vf=new Eb,Pb={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ob=class{#e=Pb;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Xs=new Ob;function Rb(t){setTimeout(t,0)}var Tb=typeof window>"u"||"Deno"in globalThis;function un(){}function Lb(t,e){return typeof t=="function"?t(e):t}function Ld(t){return typeof t=="number"&&t>=0&&t!==1/0}function lv(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cs(t,e){return typeof t=="function"?t(e):t}function Fn(t,e){return typeof t=="function"?t(e):t}function eg(t,e){const{type:r="all",exact:i,fetchStatus:a,predicate:l,queryKey:d,stale:f}=t;if(d){if(i){if(e.queryHash!==xf(d,e.options))return!1}else if(!ro(e.queryKey,d))return!1}if(r!=="all"){const m=e.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||a&&a!==e.state.fetchStatus||l&&!l(e))}function tg(t,e){const{exact:r,status:i,predicate:a,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(r){if(ti(e.options.mutationKey)!==ti(l))return!1}else if(!ro(e.options.mutationKey,l))return!1}return!(i&&e.state.status!==i||a&&!a(e))}function xf(t,e){return(e?.queryKeyHashFn||ti)(t)}function ti(t){return JSON.stringify(t,(e,r)=>Ad(r)?Object.keys(r).sort().reduce((i,a)=>(i[a]=r[a],i),{}):r)}function ro(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>ro(t[r],e[r])):!1}var Ab=Object.prototype.hasOwnProperty;function uv(t,e,r=0){if(t===e)return t;if(r>500)return e;const i=ng(t)&&ng(e);if(!i&&!(Ad(t)&&Ad(e)))return e;const l=(i?t:Object.keys(t)).length,d=i?e:Object.keys(e),f=d.length,m=i?new Array(f):{};let p=0;for(let v=0;v<f;v++){const w=i?v:d[v],y=t[w],x=e[w];if(y===x){m[w]=y,(i?v<l:Ab.call(t,w))&&p++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){m[w]=x;continue}const S=uv(y,x,r+1);m[w]=S,S===y&&p++}return l===f&&p===l?t:m}function $l(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function ng(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ad(t){if(!rg(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!rg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rg(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ib(t){return new Promise(e=>{Xs.setTimeout(e,t)})}function Id(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?uv(t,e):e}function Mb(t,e,r=0){const i=[...t,e];return r&&i.length>r?i.slice(1):i}function Fb(t,e,r=0){const i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var wf=Symbol();function cv(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===wf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function bf(t,e){return typeof t=="function"?t(...e):!!t}function Db(t,e,r){let i=!1,a;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(a??=e(),i||(i=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),t}var so=(()=>{let t=()=>Tb;return{isServer(){return t()},setIsServer(e){t=e}}})();function Md(){let t,e;const r=new Promise((a,l)=>{t=a,e=l});r.status="pending",r.catch(()=>{});function i(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{i({status:"fulfilled",value:a}),t(a)},r.reject=a=>{i({status:"rejected",reason:a}),e(a)},r}var $b=Rb;function zb(){let t=[],e=0,r=f=>{f()},i=f=>{f()},a=$b;const l=f=>{e?t.push(f):a(()=>{r(f)})},d=()=>{const f=t;t=[],f.length&&a(()=>{i(()=>{f.forEach(m=>{r(m)})})})};return{batch:f=>{let m;e++;try{m=f()}finally{e--,e||d()}return m},batchCalls:f=>(...m)=>{l(()=>{f(...m)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{a=f}}}var zt=zb(),Ub=class extends ea{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#e}},zl=new Ub;function Vb(t){return Math.min(1e3*2**t,3e4)}function dv(t){return(t??"online")==="online"?zl.isOnline():!0}var Fd=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function fv(t){let e=!1,r=0,i;const a=Md(),l=()=>a.status!=="pending",d=_=>{if(!l()){const b=new Fd(_);y(b),t.onCancel?.(b)}},f=()=>{e=!0},m=()=>{e=!1},p=()=>vf.isFocused()&&(t.networkMode==="always"||zl.isOnline())&&t.canRun(),v=()=>dv(t.networkMode)&&t.canRun(),w=_=>{l()||(i?.(),a.resolve(_))},y=_=>{l()||(i?.(),a.reject(_))},x=()=>new Promise(_=>{i=b=>{(l()||p())&&_(b)},t.onPause?.()}).then(()=>{i=void 0,l()||t.onContinue?.()}),S=()=>{if(l())return;let _;const b=r===0?t.initialPromise:void 0;try{_=b??t.fn()}catch(P){_=Promise.reject(P)}Promise.resolve(_).then(w).catch(P=>{if(l())return;const N=t.retry??(so.isServer()?0:3),F=t.retryDelay??Vb,L=typeof F=="function"?F(r,P):F,k=N===!0||typeof N=="number"&&r<N||typeof N=="function"&&N(r,P);if(e||!k){y(P);return}r++,t.onFail?.(r,P),Ib(L).then(()=>p()?void 0:x()).then(()=>{e?y(P):S()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(i?.(),a),cancelRetry:f,continueRetry:m,canStart:v,start:()=>(v()?S():x().then(S),a)}}var hv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ld(this.gcTime)&&(this.#e=Xs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(so.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Xs.clearTimeout(this.#e),this.#e=void 0)}};function Bb(t){return{onFetch:(e,r)=>{const i=e.options,a=e.fetchOptions?.meta?.fetchMore?.direction,l=e.state.data?.pages||[],d=e.state.data?.pageParams||[];let f={pages:[],pageParams:[]},m=0;const p=async()=>{let v=!1;const w=S=>{Db(S,()=>e.signal,()=>v=!0)},y=cv(e.options,e.fetchOptions),x=async(S,_,b)=>{if(v)return Promise.reject(e.signal.reason);if(_==null&&S.pages.length)return Promise.resolve(S);const N=(()=>{const I={client:e.client,queryKey:e.queryKey,pageParam:_,direction:b?"backward":"forward",meta:e.options.meta};return w(I),I})(),F=await y(N),{maxPages:L}=e.options,k=b?Fb:Mb;return{pages:k(S.pages,F,L),pageParams:k(S.pageParams,_,L)}};if(a&&l.length){const S=a==="backward",_=S?qb:sg,b={pages:l,pageParams:d},P=_(i,b);f=await x(b,P,S)}else{const S=t??l.length;do{const _=m===0?d[0]??i.initialPageParam:sg(i,f);if(m>0&&_==null)break;f=await x(f,_),m++}while(m<S)}return f};e.options.persister?e.fetchFn=()=>e.options.persister?.(p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=p}}}function sg(t,{pages:e,pageParams:r}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}function qb(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}var Hb=class extends hv{#e;#t;#n;#r;#i;#s;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=ag(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=ag(this.options);e.data!==void 0&&(this.setState(ig(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const r=Id(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#s?.promise;return this.#s?.cancel(t),e?e.then(un).catch(un):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Fn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Cs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!lv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#a||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},a=()=>{const m=cv(this.options,e),v=(()=>{const w={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(w),w})();return this.#a=!1,this.options.persister?this.options.persister(m,v,this):m(v)},d=(()=>{const m={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return i(m),m})();(this.#e==="infinite"?Bb(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta}),this.#s=fv({initialPromise:e?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Fd&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await this.#s.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#r.config.onSuccess?.(m,this),this.#r.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Fd){if(m.silent)return this.#s.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#r.config.onError?.(m,this),this.#r.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#l(t){const e=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...pv(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...ig(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?i:void 0,i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=e(this.state),zt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function pv(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dv(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ig(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ag(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Wb=class extends ea{constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.#o=Md(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#s;#o;#a;#c;#l;#p;#d;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),og(this.#t,this.options)?this.#h():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#b(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Fn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#t.setOptions(this.options),e._defaulted&&!$l(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&lg(this.#t,r,this.options,e)&&this.#h(),this.updateResult(),i&&(this.#t!==r||Fn(this.options.enabled,this.#t)!==Fn(e.enabled,this.#t)||Cs(this.options.staleTime,this.#t)!==Cs(e.staleTime,this.#t))&&this.#g();const a=this.#y();i&&(this.#t!==r||Fn(this.options.enabled,this.#t)!==Fn(e.enabled,this.#t)||a!==this.#u)&&this.#v(a)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),r=this.createResult(e,t);return Qb(this,r)&&(this.#r=r,this.#s=this.options,this.#i=this.#t.state),r}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),r=this.#e.getQueryCache().build(this.#e,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#j();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(un)),e}#g(){this.#w();const t=Cs(this.options.staleTime,this.#t);if(so.isServer()||this.#r.isStale||!Ld(t))return;const r=lv(this.#r.dataUpdatedAt,t)+1;this.#d=Xs.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(t){this.#b(),this.#u=t,!(so.isServer()||Fn(this.options.enabled,this.#t)===!1||!Ld(this.#u)||this.#u===0)&&(this.#f=Xs.setInterval(()=>{(this.options.refetchIntervalInBackground||vf.isFocused())&&this.#h()},this.#u))}#x(){this.#g(),this.#v(this.#y())}#w(){this.#d!==void 0&&(Xs.clearTimeout(this.#d),this.#d=void 0)}#b(){this.#f!==void 0&&(Xs.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const r=this.#t,i=this.options,a=this.#r,l=this.#i,d=this.#s,m=t!==r?t.state:this.#n,{state:p}=t;let v={...p},w=!1,y;if(e._optimisticResults){const re=this.hasListeners(),de=!re&&og(t,e),Z=re&&lg(t,r,e,i);(de||Z)&&(v={...v,...pv(p.data,t.options)}),e._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:_}=v;y=v.data;let b=!1;if(e.placeholderData!==void 0&&y===void 0&&_==="pending"){let re;a?.isPlaceholderData&&e.placeholderData===d?.placeholderData?(re=a.data,b=!0):re=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,re!==void 0&&(_="success",y=Id(a?.data,re,e),w=!0)}if(e.select&&y!==void 0&&!b)if(a&&y===l?.data&&e.select===this.#c)y=this.#l;else try{this.#c=e.select,y=e.select(y),y=Id(a?.data,y,e),this.#l=y,this.#a=null}catch(re){this.#a=re}this.#a&&(x=this.#a,y=this.#l,S=Date.now(),_="error");const P=v.fetchStatus==="fetching",N=_==="pending",F=_==="error",L=N&&P,k=y!==void 0,X={status:_,fetchStatus:v.fetchStatus,isPending:N,isSuccess:_==="success",isError:F,isInitialLoading:L,isLoading:L,data:y,dataUpdatedAt:v.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:P,isRefetching:P&&!N,isLoadingError:F&&!k,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:F&&k,isStale:jf(t,e),refetch:this.refetch,promise:this.#o,isEnabled:Fn(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const re=X.data!==void 0,de=X.status==="error"&&!re,Z=ve=>{de?ve.reject(X.error):re&&ve.resolve(X.data)},Oe=()=>{const ve=this.#o=X.promise=Md();Z(ve)},J=this.#o;switch(J.status){case"pending":t.queryHash===r.queryHash&&Z(J);break;case"fulfilled":(de||X.data!==J.value)&&Oe();break;case"rejected":(!de||X.error!==J.reason)&&Oe();break}}return X}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#p=this.#t),$l(e,t))return;this.#r=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!this.#m.size)return!0;const l=new Set(a??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#r).some(d=>{const f=d;return this.#r[f]!==t[f]&&l.has(f)})};this.#_({listeners:r()})}#j(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#_(t){zt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Kb(t,e){return Fn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Fn(e.retryOnMount,t)===!1)}function og(t,e){return Kb(t,e)||t.state.data!==void 0&&Dd(t,e,e.refetchOnMount)}function Dd(t,e,r){if(Fn(e.enabled,t)!==!1&&Cs(e.staleTime,t)!=="static"){const i=typeof r=="function"?r(t):r;return i==="always"||i!==!1&&jf(t,e)}return!1}function lg(t,e,r,i){return(t!==e||Fn(i.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&jf(t,r)}function jf(t,e){return Fn(e.enabled,t)!==!1&&t.isStaleByTime(Cs(e.staleTime,t))}function Qb(t,e){return!$l(t.getCurrentResult(),e)}var Zb=class extends hv{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||mv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=fv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,d)=>{this.#i({type:"failed",failureCount:l,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",a=!this.#r.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);const d=await this.options.onMutate?.(t,r);d!==this.state.context&&this.#i({type:"pending",context:d,variables:t,isPaused:a})}const l=await this.#r.start();return await this.#n.config.onSuccess?.(l,t,this.state.context,this,r),await this.options.onSuccess?.(l,t,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,t,this.state.context,r),this.#i({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,t,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onError?.(l,t,this.state.context,r)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,l,t,this.state.context,r)}catch(d){Promise.reject(d)}throw this.#i({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#i(t){const e=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),zt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function mv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gb=class extends ea{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,r){const i=new Zb({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:r});return this.add(i),i}add(t){this.#e.add(t);const e=Nl(t);if(typeof e=="string"){const r=this.#t.get(e);r?r.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Nl(t);if(typeof e=="string"){const r=this.#t.get(e);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Nl(t);if(typeof e=="string"){const i=this.#t.get(e)?.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=Nl(t);return typeof e=="string"?this.#t.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){zt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(r=>tg(e,r))}findAll(t={}){return this.getAll().filter(e=>tg(t,e))}notify(t){zt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return zt.batch(()=>Promise.all(t.map(e=>e.continue().catch(un))))}};function Nl(t){return t.options.scope?.id}var Jb=class extends ea{#e;#t=void 0;#n;#r;constructor(e,r){super(),this.#e=e,this.setOptions(r),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const r=this.options;this.options=this.#e.defaultMutationOptions(e),$l(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&ti(r.mutationKey)!==ti(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(e,r){return this.#r=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){const e=this.#n?.state??mv();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#s(e){zt.batch(()=>{if(this.#r&&this.hasListeners()){const r=this.#t.variables,i=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,r,i,a)}catch(l){Promise.reject(l)}try{this.#r.onSettled?.(e.data,null,r,i,a)}catch(l){Promise.reject(l)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,r,i,a)}catch(l){Promise.reject(l)}try{this.#r.onSettled?.(void 0,e.error,r,i,a)}catch(l){Promise.reject(l)}}}this.listeners.forEach(r=>{r(this.#t)})})}},Yb=class extends ea{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,r){const i=e.queryKey,a=e.queryHash??xf(i,e);let l=this.get(a);return l||(l=new Hb({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(r=>eg(e,r))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(r=>eg(t,r)):e}notify(t){zt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xb=class{#e;#t;#n;#r;#i;#s;#o;#a;constructor(t={}){this.#e=t.queryCache||new Yb,this.#t=t.mutationCache||new Gb,this.#n=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=vf.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=zl.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=this.#e.build(this,e),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Cs(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:r})=>{const i=r.data;return[e,i]})}setQueryData(t,e,r){const i=this.defaultQueryOptions({queryKey:t}),l=this.#e.get(i.queryHash)?.state.data,d=Lb(e,l);if(d!==void 0)return this.#e.build(this,i).setData(d,{...r,manual:!0})}setQueriesData(t,e,r){return zt.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,r)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;zt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=this.#e;return zt.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},i=zt.batch(()=>this.#e.findAll(t).map(a=>a.cancel(r)));return Promise.all(i).then(un).catch(un)}invalidateQueries(t,e={}){return zt.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},i=zt.batch(()=>this.#e.findAll(t).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,r);return r.throwOnError||(l=l.catch(un)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(un)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=this.#e.build(this,e);return r.isStaleByTime(Cs(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(un).catch(un)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(un).catch(un)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return zl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(ti(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],r={};return e.forEach(i=>{ro(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,e){this.#i.set(ti(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],r={};return e.forEach(i=>{ro(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=xf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===wf&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},gv=$.createContext(void 0),Kt=t=>{const e=$.useContext(gv);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ej=({client:t,children:e})=>($.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),u.jsx(gv.Provider,{value:t,children:e})),yv=$.createContext(!1),tj=()=>$.useContext(yv);yv.Provider;function nj(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rj=$.createContext(nj()),sj=()=>$.useContext(rj),ij=(t,e,r)=>{const i=r?.state.error&&typeof t.throwOnError=="function"?bf(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},aj=t=>{$.useEffect(()=>{t.clearReset()},[t])},oj=({result:t,errorResetBoundary:e,throwOnError:r,query:i,suspense:a})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(a&&t.data===void 0||bf(r,[t.error,i])),lj=t=>{if(t.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...a)=>r(i(...a)):r(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},uj=(t,e)=>t.isLoading&&t.isFetching&&!e,cj=(t,e)=>t?.suspense&&e.isPending,ug=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function dj(t,e,r){const i=tj(),a=sj(),l=Kt(),d=l.defaultQueryOptions(t);l.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const f=l.getQueryCache().get(d.queryHash);d._optimisticResults=i?"isRestoring":"optimistic",lj(d),ij(d,a,f),aj(a);const m=!l.getQueryCache().get(d.queryHash),[p]=$.useState(()=>new e(l,d)),v=p.getOptimisticResult(d),w=!i&&t.subscribed!==!1;if($.useSyncExternalStore($.useCallback(y=>{const x=w?p.subscribe(zt.batchCalls(y)):un;return p.updateResult(),x},[p,w]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),$.useEffect(()=>{p.setOptions(d)},[d,p]),cj(d,v))throw ug(d,p,a);if(oj({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:f,suspense:d.suspense}))throw v.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(d,v),d.experimental_prefetchInRender&&!so.isServer()&&uj(v,i)&&(m?ug(d,p,a):f?.promise)?.catch(un).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?v:p.trackResult(v)}function On(t,e){return dj(t,Wb)}function gn(t,e){const r=Kt(),[i]=$.useState(()=>new Jb(r,t));$.useEffect(()=>{i.setOptions(t)},[i,t]);const a=$.useSyncExternalStore($.useCallback(d=>i.subscribe(zt.batchCalls(d)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=$.useCallback((d,f)=>{i.mutate(d,f).catch(un)},[i]);if(a.error&&bf(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}var fj=t=>{switch(t){case"success":return mj;case"info":return yj;case"warning":return gj;case"error":return vj;default:return null}},hj=Array(12).fill(0),pj=({visible:t,className:e})=>ne.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ne.createElement("div",{className:"sonner-spinner"},hj.map((r,i)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),mj=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gj=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),yj=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),vj=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xj=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wj=()=>{let[t,e]=ne.useState(document.hidden);return ne.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},$d=1,bj=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...i}=t,a=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:$d++,l=this.toasts.find(f=>f.id===a),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:r}),{...f,...t,id:a,dismissible:d,title:r}):f):this.addToast({title:r,...i,dismissible:d,id:a}),a},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let i=t instanceof Promise?t:t(),a=r!==void 0,l,d=i.then(async m=>{if(l=["resolve",m],ne.isValidElement(m))a=!1,this.create({id:r,type:"default",message:m});else if(_j(m)&&!m.ok){a=!1;let p=typeof e.error=="function"?await e.error(`HTTP error! status: ${m.status}`):e.error,v=typeof e.description=="function"?await e.description(`HTTP error! status: ${m.status}`):e.description;this.create({id:r,type:"error",message:p,description:v})}else if(e.success!==void 0){a=!1;let p=typeof e.success=="function"?await e.success(m):e.success,v=typeof e.description=="function"?await e.description(m):e.description;this.create({id:r,type:"success",message:p,description:v})}}).catch(async m=>{if(l=["reject",m],e.error!==void 0){a=!1;let p=typeof e.error=="function"?await e.error(m):e.error,v=typeof e.description=="function"?await e.description(m):e.description;this.create({id:r,type:"error",message:p,description:v})}}).finally(()=>{var m;a&&(this.dismiss(r),r=void 0),(m=e.finally)==null||m.call(e)}),f=()=>new Promise((m,p)=>d.then(()=>l[0]==="reject"?p(l[1]):m(l[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,e)=>{let r=e?.id||$d++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Cn=new bj,jj=(t,e)=>{let r=e?.id||$d++;return Cn.addToast({title:t,...e,id:r}),r},_j=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Sj=jj,kj=()=>Cn.toasts,Nj=()=>Cn.getActiveToasts(),jt=Object.assign(Sj,{success:Cn.success,info:Cn.info,warning:Cn.warning,error:Cn.error,custom:Cn.custom,message:Cn.message,promise:Cn.promise,dismiss:Cn.dismiss,loading:Cn.loading},{getHistory:kj,getToasts:Nj});function Cj(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}Cj(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
`);function Cl(t){return t.label!==void 0}var Ej=3,Pj="32px",Oj="16px",cg=4e3,Rj=356,Tj=14,Lj=20,Aj=200;function or(...t){return t.filter(Boolean).join(" ")}function Ij(t){let[e,r]=t.split("-"),i=[];return e&&i.push(e),r&&i.push(r),i}var Mj=t=>{var e,r,i,a,l,d,f,m,p,v,w;let{invert:y,toast:x,unstyled:S,interacting:_,setHeights:b,visibleToasts:P,heights:N,index:F,toasts:L,expanded:k,removeToast:I,defaultRichColors:X,closeButton:re,style:de,cancelButtonStyle:Z,actionButtonStyle:Oe,className:J="",descriptionClassName:ve="",duration:me,position:M,gap:R,loadingIcon:G,expandByDefault:H,classNames:W,icons:K,closeButtonAriaLabel:T="Close toast",pauseWhenPageIsHidden:Q}=t,[ue,pe]=ne.useState(null),[Le,qe]=ne.useState(null),[Ce,Ge]=ne.useState(!1),[et,Rt]=ne.useState(!1),[yn,Tr]=ne.useState(!1),[Jn,Lr]=ne.useState(!1),[ui,Yr]=ne.useState(!1),[Ms,Ar]=ne.useState(0),[Xr,pr]=ne.useState(0),vn=ne.useRef(x.duration||me||cg),Fs=ne.useRef(null),Rn=ne.useRef(null),E=F===0,z=F+1<=P,V=x.type,oe=x.dismissible!==!1,le=x.className||"",ae=x.descriptionClassName||"",ce=ne.useMemo(()=>N.findIndex(Fe=>Fe.toastId===x.id)||0,[N,x.id]),Ae=ne.useMemo(()=>{var Fe;return(Fe=x.closeButton)!=null?Fe:re},[x.closeButton,re]),We=ne.useMemo(()=>x.duration||me||cg,[x.duration,me]),St=ne.useRef(0),Tt=ne.useRef(0),Ft=ne.useRef(0),$n=ne.useRef(null),[Ir,Mr]=M.split("-"),es=ne.useMemo(()=>N.reduce((Fe,at,ct)=>ct>=ce?Fe:Fe+at.height,0),[N,ce]),Fr=wj(),mr=x.invert||y,Tn=V==="loading";Tt.current=ne.useMemo(()=>ce*R+es,[ce,es]),ne.useEffect(()=>{vn.current=We},[We]),ne.useEffect(()=>{Ge(!0)},[]),ne.useEffect(()=>{let Fe=Rn.current;if(Fe){let at=Fe.getBoundingClientRect().height;return pr(at),b(ct=>[{toastId:x.id,height:at,position:x.position},...ct]),()=>b(ct=>ct.filter(sn=>sn.toastId!==x.id))}},[b,x.id]),ne.useLayoutEffect(()=>{if(!Ce)return;let Fe=Rn.current,at=Fe.style.height;Fe.style.height="auto";let ct=Fe.getBoundingClientRect().height;Fe.style.height=at,pr(ct),b(sn=>sn.find(xn=>xn.toastId===x.id)?sn.map(xn=>xn.toastId===x.id?{...xn,height:ct}:xn):[{toastId:x.id,height:ct,position:x.position},...sn])},[Ce,x.title,x.description,b,x.id]);let Yn=ne.useCallback(()=>{Rt(!0),Ar(Tt.current),b(Fe=>Fe.filter(at=>at.toastId!==x.id)),setTimeout(()=>{I(x)},Aj)},[x,I,b,Tt]);ne.useEffect(()=>{if(x.promise&&V==="loading"||x.duration===1/0||x.type==="loading")return;let Fe;return k||_||Q&&Fr?(()=>{if(Ft.current<St.current){let at=new Date().getTime()-St.current;vn.current=vn.current-at}Ft.current=new Date().getTime()})():vn.current!==1/0&&(St.current=new Date().getTime(),Fe=setTimeout(()=>{var at;(at=x.onAutoClose)==null||at.call(x,x),Yn()},vn.current)),()=>clearTimeout(Fe)},[k,_,x,V,Q,Fr,Yn]),ne.useEffect(()=>{x.delete&&Yn()},[Yn,x.delete]);function yo(){var Fe,at,ct;return K!=null&&K.loading?ne.createElement("div",{className:or(W?.loader,(Fe=x?.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":V==="loading"},K.loading):G?ne.createElement("div",{className:or(W?.loader,(at=x?.classNames)==null?void 0:at.loader,"sonner-loader"),"data-visible":V==="loading"},G):ne.createElement(pj,{className:or(W?.loader,(ct=x?.classNames)==null?void 0:ct.loader),visible:V==="loading"})}return ne.createElement("li",{tabIndex:0,ref:Rn,className:or(J,le,W?.toast,(e=x?.classNames)==null?void 0:e.toast,W?.default,W?.[V],(r=x?.classNames)==null?void 0:r[V]),"data-sonner-toast":"","data-rich-colors":(i=x.richColors)!=null?i:X,"data-styled":!(x.jsx||x.unstyled||S),"data-mounted":Ce,"data-promise":!!x.promise,"data-swiped":ui,"data-removed":et,"data-visible":z,"data-y-position":Ir,"data-x-position":Mr,"data-index":F,"data-front":E,"data-swiping":yn,"data-dismissible":oe,"data-type":V,"data-invert":mr,"data-swipe-out":Jn,"data-swipe-direction":Le,"data-expanded":!!(k||H&&Ce),style:{"--index":F,"--toasts-before":F,"--z-index":L.length-F,"--offset":`${et?Ms:Tt.current}px`,"--initial-height":H?"auto":`${Xr}px`,...de,...x.style},onDragEnd:()=>{Tr(!1),pe(null),$n.current=null},onPointerDown:Fe=>{Tn||!oe||(Fs.current=new Date,Ar(Tt.current),Fe.target.setPointerCapture(Fe.pointerId),Fe.target.tagName!=="BUTTON"&&(Tr(!0),$n.current={x:Fe.clientX,y:Fe.clientY}))},onPointerUp:()=>{var Fe,at,ct,sn;if(Jn||!oe)return;$n.current=null;let xn=Number(((Fe=Rn.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wn=Number(((at=Rn.current)==null?void 0:at.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xn=new Date().getTime()-((ct=Fs.current)==null?void 0:ct.getTime()),qt=ue==="x"?xn:wn,gr=Math.abs(qt)/Xn;if(Math.abs(qt)>=Lj||gr>.11){Ar(Tt.current),(sn=x.onDismiss)==null||sn.call(x,x),qe(ue==="x"?xn>0?"right":"left":wn>0?"down":"up"),Yn(),Lr(!0),Yr(!1);return}Tr(!1),pe(null)},onPointerMove:Fe=>{var at,ct,sn,xn;if(!$n.current||!oe||((at=window.getSelection())==null?void 0:at.toString().length)>0)return;let wn=Fe.clientY-$n.current.y,Xn=Fe.clientX-$n.current.x,qt=(ct=t.swipeDirections)!=null?ct:Ij(M);!ue&&(Math.abs(Xn)>1||Math.abs(wn)>1)&&pe(Math.abs(Xn)>Math.abs(wn)?"x":"y");let gr={x:0,y:0};ue==="y"?(qt.includes("top")||qt.includes("bottom"))&&(qt.includes("top")&&wn<0||qt.includes("bottom")&&wn>0)&&(gr.y=wn):ue==="x"&&(qt.includes("left")||qt.includes("right"))&&(qt.includes("left")&&Xn<0||qt.includes("right")&&Xn>0)&&(gr.x=Xn),(Math.abs(gr.x)>0||Math.abs(gr.y)>0)&&Yr(!0),(sn=Rn.current)==null||sn.style.setProperty("--swipe-amount-x",`${gr.x}px`),(xn=Rn.current)==null||xn.style.setProperty("--swipe-amount-y",`${gr.y}px`)}},Ae&&!x.jsx?ne.createElement("button",{"aria-label":T,"data-disabled":Tn,"data-close-button":!0,onClick:Tn||!oe?()=>{}:()=>{var Fe;Yn(),(Fe=x.onDismiss)==null||Fe.call(x,x)},className:or(W?.closeButton,(a=x?.classNames)==null?void 0:a.closeButton)},(l=K?.close)!=null?l:xj):null,x.jsx||$.isValidElement(x.title)?x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title:ne.createElement(ne.Fragment,null,V||x.icon||x.promise?ne.createElement("div",{"data-icon":"",className:or(W?.icon,(d=x?.classNames)==null?void 0:d.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||yo():null,x.type!=="loading"?x.icon||K?.[V]||fj(V):null):null,ne.createElement("div",{"data-content":"",className:or(W?.content,(f=x?.classNames)==null?void 0:f.content)},ne.createElement("div",{"data-title":"",className:or(W?.title,(m=x?.classNames)==null?void 0:m.title)},typeof x.title=="function"?x.title():x.title),x.description?ne.createElement("div",{"data-description":"",className:or(ve,ae,W?.description,(p=x?.classNames)==null?void 0:p.description)},typeof x.description=="function"?x.description():x.description):null),$.isValidElement(x.cancel)?x.cancel:x.cancel&&Cl(x.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||Z,onClick:Fe=>{var at,ct;Cl(x.cancel)&&oe&&((ct=(at=x.cancel).onClick)==null||ct.call(at,Fe),Yn())},className:or(W?.cancelButton,(v=x?.classNames)==null?void 0:v.cancelButton)},x.cancel.label):null,$.isValidElement(x.action)?x.action:x.action&&Cl(x.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||Oe,onClick:Fe=>{var at,ct;Cl(x.action)&&((ct=(at=x.action).onClick)==null||ct.call(at,Fe),!Fe.defaultPrevented&&Yn())},className:or(W?.actionButton,(w=x?.classNames)==null?void 0:w.actionButton)},x.action.label):null))};function dg(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function Fj(t,e){let r={};return[t,e].forEach((i,a)=>{let l=a===1,d=l?"--mobile-offset":"--offset",f=l?Oj:Pj;function m(p){["top","right","bottom","left"].forEach(v=>{r[`${d}-${v}`]=typeof p=="number"?`${p}px`:p})}typeof i=="number"||typeof i=="string"?m(i):typeof i=="object"?["top","right","bottom","left"].forEach(p=>{i[p]===void 0?r[`${d}-${p}`]=f:r[`${d}-${p}`]=typeof i[p]=="number"?`${i[p]}px`:i[p]}):m(f)}),r}var Dj=$.forwardRef(function(t,e){let{invert:r,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:l,closeButton:d,className:f,offset:m,mobileOffset:p,theme:v="light",richColors:w,duration:y,style:x,visibleToasts:S=Ej,toastOptions:_,dir:b=dg(),gap:P=Tj,loadingIcon:N,icons:F,containerAriaLabel:L="Notifications",pauseWhenPageIsHidden:k}=t,[I,X]=ne.useState([]),re=ne.useMemo(()=>Array.from(new Set([i].concat(I.filter(Q=>Q.position).map(Q=>Q.position)))),[I,i]),[de,Z]=ne.useState([]),[Oe,J]=ne.useState(!1),[ve,me]=ne.useState(!1),[M,R]=ne.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=ne.useRef(null),H=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=ne.useRef(null),K=ne.useRef(!1),T=ne.useCallback(Q=>{X(ue=>{var pe;return(pe=ue.find(Le=>Le.id===Q.id))!=null&&pe.delete||Cn.dismiss(Q.id),ue.filter(({id:Le})=>Le!==Q.id)})},[]);return ne.useEffect(()=>Cn.subscribe(Q=>{if(Q.dismiss){X(ue=>ue.map(pe=>pe.id===Q.id?{...pe,delete:!0}:pe));return}setTimeout(()=>{J1.flushSync(()=>{X(ue=>{let pe=ue.findIndex(Le=>Le.id===Q.id);return pe!==-1?[...ue.slice(0,pe),{...ue[pe],...Q},...ue.slice(pe+1)]:[Q,...ue]})})})}),[]),ne.useEffect(()=>{if(v!=="system"){R(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?R("dark"):R("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:ue})=>{R(ue?"dark":"light")})}catch{Q.addListener(({matches:pe})=>{try{R(pe?"dark":"light")}catch(Le){console.error(Le)}})}},[v]),ne.useEffect(()=>{I.length<=1&&J(!1)},[I]),ne.useEffect(()=>{let Q=ue=>{var pe,Le;a.every(qe=>ue[qe]||ue.code===qe)&&(J(!0),(pe=G.current)==null||pe.focus()),ue.code==="Escape"&&(document.activeElement===G.current||(Le=G.current)!=null&&Le.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[a]),ne.useEffect(()=>{if(G.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,K.current=!1)}},[G.current]),ne.createElement("section",{ref:e,"aria-label":`${L} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},re.map((Q,ue)=>{var pe;let[Le,qe]=Q.split("-");return I.length?ne.createElement("ol",{key:Q,dir:b==="auto"?dg():b,tabIndex:-1,ref:G,className:f,"data-sonner-toaster":!0,"data-theme":M,"data-y-position":Le,"data-lifted":Oe&&I.length>1&&!l,"data-x-position":qe,style:{"--front-toast-height":`${((pe=de[0])==null?void 0:pe.height)||0}px`,"--width":`${Rj}px`,"--gap":`${P}px`,...x,...Fj(m,p)},onBlur:Ce=>{K.current&&!Ce.currentTarget.contains(Ce.relatedTarget)&&(K.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:Ce=>{Ce.target instanceof HTMLElement&&Ce.target.dataset.dismissible==="false"||K.current||(K.current=!0,W.current=Ce.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{ve||J(!1)},onDragEnd:()=>J(!1),onPointerDown:Ce=>{Ce.target instanceof HTMLElement&&Ce.target.dataset.dismissible==="false"||me(!0)},onPointerUp:()=>me(!1)},I.filter(Ce=>!Ce.position&&ue===0||Ce.position===Q).map((Ce,Ge)=>{var et,Rt;return ne.createElement(Mj,{key:Ce.id,icons:F,index:Ge,toast:Ce,defaultRichColors:w,duration:(et=_?.duration)!=null?et:y,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:S,closeButton:(Rt=_?.closeButton)!=null?Rt:d,interacting:ve,position:Q,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,removeToast:T,toasts:I.filter(yn=>yn.position==Ce.position),heights:de.filter(yn=>yn.position==Ce.position),setHeights:Z,expandByDefault:l,gap:P,loadingIcon:N,expanded:Oe,pauseWhenPageIsHidden:k,swipeDirections:t.swipeDirections})})):null}))});const $e=t=>typeof t=="string",Da=()=>{let t,e;const r=new Promise((i,a)=>{t=i,e=a});return r.resolve=t,r.reject=e,r},fg=t=>t==null?"":""+t,$j=(t,e,r)=>{t.forEach(i=>{e[i]&&(r[i]=e[i])})},zj=/###/g,hg=t=>t&&t.indexOf("###")>-1?t.replace(zj,"."):t,pg=t=>!t||$e(t),Ga=(t,e,r)=>{const i=$e(e)?e.split("."):e;let a=0;for(;a<i.length-1;){if(pg(t))return{};const l=hg(i[a]);!t[l]&&r&&(t[l]=new r),Object.prototype.hasOwnProperty.call(t,l)?t=t[l]:t={},++a}return pg(t)?{}:{obj:t,k:hg(i[a])}},mg=(t,e,r)=>{const{obj:i,k:a}=Ga(t,e,Object);if(i!==void 0||e.length===1){i[a]=r;return}let l=e[e.length-1],d=e.slice(0,e.length-1),f=Ga(t,d,Object);for(;f.obj===void 0&&d.length;)l=`${d[d.length-1]}.${l}`,d=d.slice(0,d.length-1),f=Ga(t,d,Object),f&&f.obj&&typeof f.obj[`${f.k}.${l}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${l}`]=r},Uj=(t,e,r,i)=>{const{obj:a,k:l}=Ga(t,e,Object);a[l]=a[l]||[],a[l].push(r)},Ul=(t,e)=>{const{obj:r,k:i}=Ga(t,e);if(r)return r[i]},Vj=(t,e,r)=>{const i=Ul(t,r);return i!==void 0?i:Ul(e,r)},vv=(t,e,r)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?$e(t[i])||t[i]instanceof String||$e(e[i])||e[i]instanceof String?r&&(t[i]=e[i]):vv(t[i],e[i],r):t[i]=e[i]);return t},Ti=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Bj={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const qj=t=>$e(t)?t.replace(/[&<>"'\/]/g,e=>Bj[e]):t;class Hj{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Wj=[" ",",","?","!",";"],Kj=new Hj(20),Qj=(t,e,r)=>{e=e||"",r=r||"";const i=Wj.filter(d=>e.indexOf(d)<0&&r.indexOf(d)<0);if(i.length===0)return!0;const a=Kj.getRegExp(`(${i.map(d=>d==="?"?"\\?":d).join("|")})`);let l=!a.test(t);if(!l){const d=t.indexOf(r);d>0&&!a.test(t.substring(0,d))&&(l=!0)}return l},zd=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(r);let a=t;for(let l=0;l<i.length;){if(!a||typeof a!="object")return;let d,f="";for(let m=l;m<i.length;++m)if(m!==l&&(f+=r),f+=i[m],d=a[f],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&m<i.length-1)continue;l+=m-l+1;break}a=d}return a},Vl=t=>t&&t.replace("_","-"),Zj={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Bl{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||Zj,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,i,a){return a&&!this.debug?null:($e(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new Bl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Bl(this.logger,e)}}var Cr=new Bl;class uu{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const a=this.observers[i].get(r)||0;this.observers[i].set(r,a+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(d=>{let[f,m]=d;for(let p=0;p<m;p++)f(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(d=>{let[f,m]=d;for(let p=0;p<m;p++)f.apply(f,[e,...i])})}}class gg extends uu{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,d=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;e.indexOf(".")>-1?f=e.split("."):(f=[e,r],i&&(Array.isArray(i)?f.push(...i):$e(i)&&l?f.push(...i.split(l)):f.push(i)));const m=Ul(this.data,f);return!m&&!r&&!i&&e.indexOf(".")>-1&&(e=f[0],r=f[1],i=f.slice(2).join(".")),m||!d||!$e(i)?m:zd(this.data&&this.data[e]&&this.data[e][r],i,l)}addResource(e,r,i,a){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const d=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let f=[e,r];i&&(f=f.concat(d?i.split(d):i)),e.indexOf(".")>-1&&(f=e.split("."),a=r,r=f[1]),this.addNamespaces(r),mg(this.data,f,a),l.silent||this.emit("added",e,r,i,a)}addResources(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const l in i)($e(i[l])||Array.isArray(i[l]))&&this.addResource(e,r,l,i[l],{silent:!0});a.silent||this.emit("added",e,r,i)}addResourceBundle(e,r,i,a,l){let d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},f=[e,r];e.indexOf(".")>-1&&(f=e.split("."),a=i,i=r,r=f[1]),this.addNamespaces(r);let m=Ul(this.data,f)||{};d.skipCopy||(i=JSON.parse(JSON.stringify(i))),a?vv(m,i,l):m={...m,...i},mg(this.data,f,m),d.silent||this.emit("added",e,r,i)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(a=>r[a]&&Object.keys(r[a]).length>0)}toJSON(){return this.data}}var xv={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,i,a){return t.forEach(l=>{this.processors[l]&&(e=this.processors[l].process(e,r,i,a))}),e}};const yg={};class ql extends uu{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$j(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,r);return i&&i.res!==void 0}extractFromKey(e,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let l=r.ns||this.options.defaultNS||[];const d=i&&e.indexOf(i)>-1,f=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Qj(e,i,a);if(d&&!f){const m=e.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:e,namespaces:$e(l)?[l]:l};const p=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),e=p.join(a)}return{key:e,namespaces:$e(l)?[l]:l}}translate(e,r,i){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:d,namespaces:f}=this.extractFromKey(e[e.length-1],r),m=f[f.length-1],p=r.lng||this.language,v=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(v){const L=r.nsSeparator||this.options.nsSeparator;return a?{res:`${m}${L}${d}`,usedKey:d,exactUsedKey:d,usedLng:p,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${L}${d}`}return a?{res:d,usedKey:d,exactUsedKey:d,usedLng:p,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:d}const w=this.resolve(e,r);let y=w&&w.res;const x=w&&w.usedKey||d,S=w&&w.exactUsedKey||d,_=Object.prototype.toString.apply(y),b=["[object Number]","[object Function]","[object RegExp]"],P=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,F=!$e(y)&&typeof y!="boolean"&&typeof y!="number";if(N&&y&&F&&b.indexOf(_)<0&&!($e(P)&&Array.isArray(y))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,y,{...r,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return a?(w.res=L,w.usedParams=this.getUsedParamsDetails(r),w):L}if(l){const L=Array.isArray(y),k=L?[]:{},I=L?S:x;for(const X in y)if(Object.prototype.hasOwnProperty.call(y,X)){const re=`${I}${l}${X}`;k[X]=this.translate(re,{...r,joinArrays:!1,ns:f}),k[X]===re&&(k[X]=y[X])}y=k}}else if(N&&$e(P)&&Array.isArray(y))y=y.join(P),y&&(y=this.extendTranslation(y,e,r,i));else{let L=!1,k=!1;const I=r.count!==void 0&&!$e(r.count),X=ql.hasDefaultValue(r),re=I?this.pluralResolver.getSuffix(p,r.count,r):"",de=r.ordinal&&I?this.pluralResolver.getSuffix(p,r.count,{ordinal:!1}):"",Z=I&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),Oe=Z&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${re}`]||r[`defaultValue${de}`]||r.defaultValue;!this.isValidLookup(y)&&X&&(L=!0,y=Oe),this.isValidLookup(y)||(k=!0,y=d);const ve=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:y,me=X&&Oe!==y&&this.options.updateMissing;if(k||L||me){if(this.logger.log(me?"updateKey":"missingKey",p,m,d,me?Oe:y),l){const H=this.resolve(d,{...r,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let H=0;H<R.length;H++)M.push(R[H]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const G=(H,W,K)=>{const T=X&&K!==y?K:ve;this.options.missingKeyHandler?this.options.missingKeyHandler(H,m,W,T,me,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,m,W,T,me,r),this.emit("missingKey",H,m,W,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(H=>{const W=this.pluralResolver.getSuffixes(H,r);Z&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(K=>{G([H],d+K,r[`defaultValue${K}`]||Oe)})}):G(M,d,Oe))}y=this.extendTranslation(y,e,r,w,i),k&&y===d&&this.options.appendNamespaceToMissingKey&&(y=`${m}:${d}`),(k||L)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}:${d}`:d,L?y:void 0):y=this.options.parseMissingKeyHandler(y))}return a?(w.res=y,w.usedParams=this.getUsedParamsDetails(r),w):y}extendTranslation(e,r,i,a,l){var d=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const p=$e(e)&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(p){const y=e.match(this.interpolator.nestingRegexp);v=y&&y.length}let w=i.replace&&!$e(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(w={...this.options.interpolation.defaultVariables,...w}),e=this.interpolator.interpolate(e,w,i.lng||this.language||a.usedLng,i),p){const y=e.match(this.interpolator.nestingRegexp),x=y&&y.length;v<x&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=this.language||a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var y=arguments.length,x=new Array(y),S=0;S<y;S++)x[S]=arguments[S];return l&&l[0]===x[0]&&!i.context?(d.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${r[0]}`),null):d.translate(...x,r)},i)),i.interpolation&&this.interpolator.reset()}const f=i.postProcess||this.options.postProcess,m=$e(f)?[f]:f;return e!=null&&m&&m.length&&i.applyPostProcessor!==!1&&(e=xv.handle(m,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,l,d,f;return $e(e)&&(e=[e]),e.forEach(m=>{if(this.isValidLookup(i))return;const p=this.extractFromKey(m,r),v=p.key;a=v;let w=p.namespaces;this.options.fallbackNS&&(w=w.concat(this.options.fallbackNS));const y=r.count!==void 0&&!$e(r.count),x=y&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),S=r.context!==void 0&&($e(r.context)||typeof r.context=="number")&&r.context!=="",_=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);w.forEach(b=>{this.isValidLookup(i)||(f=b,!yg[`${_[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(f)&&(yg[`${_[0]}-${b}`]=!0,this.logger.warn(`key "${a}" for languages "${_.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(P=>{if(this.isValidLookup(i))return;d=P;const N=[v];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(N,v,P,b,r);else{let L;y&&(L=this.pluralResolver.getSuffix(P,r.count,r));const k=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(N.push(v+L),r.ordinal&&L.indexOf(I)===0&&N.push(v+L.replace(I,this.options.pluralSeparator)),x&&N.push(v+k)),S){const X=`${v}${this.options.contextSeparator}${r.context}`;N.push(X),y&&(N.push(X+L),r.ordinal&&L.indexOf(I)===0&&N.push(X+L.replace(I,this.options.pluralSeparator)),x&&N.push(X+k))}}let F;for(;F=N.pop();)this.isValidLookup(i)||(l=F,i=this.getResource(P,b,F,r))}))})}),{res:i,usedKey:a,exactUsedKey:l,usedLng:d,usedNS:f}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,i,a):this.resourceStore.getResource(e,r,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!$e(e.replace);let a=i?e.replace:e;if(i&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const l of r)delete a[l]}return a}static hasDefaultValue(e){const r="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&r===i.substring(0,r.length)&&e[i]!==void 0)return!0;return!1}}const ld=t=>t.charAt(0).toUpperCase()+t.slice(1);class vg{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cr.create("languageUtils")}getScriptPartFromCode(e){if(e=Vl(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Vl(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if($e(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let a=Intl.getCanonicalLocales(e)[0];if(a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a)return a}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ld(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ld(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=ld(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(i=>{if(r)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(r=a)}),!r&&this.options.supportedLngs&&e.forEach(i=>{if(r)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(l=>{if(l===a)return l;if(!(l.indexOf("-")<0&&a.indexOf("-")<0)&&(l.indexOf("-")>0&&a.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===a||l.indexOf(a)===0&&a.length>1))return l})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),$e(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let i=e[r];return i||(i=e[this.getScriptPartFromCode(r)]),i||(i=e[this.formatLanguageCode(r)]),i||(i=e[this.getLanguagePartFromCode(r)]),i||(i=e.default),i||[]}toResolveHierarchy(e,r){const i=this.getFallbackCodes(r||this.options.fallbackLng||[],e),a=[],l=d=>{d&&(this.isSupportedCode(d)?a.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return $e(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):$e(e)&&l(this.formatLanguageCode(e)),i.forEach(d=>{a.indexOf(d)<0&&l(this.formatLanguageCode(d))}),a}}let Gj=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Jj={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const Yj=["v1","v2","v3"],Xj=["v4"],xg={zero:0,one:1,two:2,few:3,many:4,other:5},e_=()=>{const t={};return Gj.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:Jj[e.fc]}})}),t};class t_{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=Cr.create("pluralResolver"),(!this.options.compatibilityJSON||Xj.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=e_(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const i=Vl(e==="dev"?"en":e),a=r.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:a});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let d;try{d=new Intl.PluralRules(i,{type:a})}catch{if(!e.match(/-|_/))return;const m=this.languageUtils.getLanguagePartFromCode(e);d=this.getRule(m,r)}return this.pluralRulesCache[l]=d,d}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${r}${a}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,l)=>xg[a]-xg[l]).map(a=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,r)):[]}getSuffix(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(r)}`:this.getSuffixRetroCompatible(a,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const i=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const l=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:l():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?l():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Yj.includes(this.options.compatibilityJSON)}}const wg=function(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=Vj(t,e,r);return!l&&a&&$e(r)&&(l=zd(t,r,i),l===void 0&&(l=zd(e,r,i))),l},ud=t=>t.replace(/\$/g,"$$$$");class n_{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cr.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:a,prefix:l,prefixEscaped:d,suffix:f,suffixEscaped:m,formatSeparator:p,unescapeSuffix:v,unescapePrefix:w,nestingPrefix:y,nestingPrefixEscaped:x,nestingSuffix:S,nestingSuffixEscaped:_,nestingOptionsSeparator:b,maxReplaces:P,alwaysFormat:N}=e.interpolation;this.escape=r!==void 0?r:qj,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=l?Ti(l):d||"{{",this.suffix=f?Ti(f):m||"}}",this.formatSeparator=p||",",this.unescapePrefix=v?"":w||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=y?Ti(y):x||Ti("$t("),this.nestingSuffix=S?Ti(S):_||Ti(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=P||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,i)=>r&&r.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,i,a){let l,d,f;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=x=>{if(x.indexOf(this.formatSeparator)<0){const P=wg(r,m,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,i,{...a,...r,interpolationkey:x}):P}const S=x.split(this.formatSeparator),_=S.shift().trim(),b=S.join(this.formatSeparator).trim();return this.format(wg(r,m,_,this.options.keySeparator,this.options.ignoreJSONStructure),b,i,{...a,...r,interpolationkey:_})};this.resetRegExp();const v=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,w=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>ud(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?ud(this.escape(x)):ud(x)}].forEach(x=>{for(f=0;l=x.regex.exec(e);){const S=l[1].trim();if(d=p(S),d===void 0)if(typeof v=="function"){const b=v(e,l,a);d=$e(b)?b:""}else if(a&&Object.prototype.hasOwnProperty.call(a,S))d="";else if(w){d=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),d="";else!$e(d)&&!this.useRawValueToEscape&&(d=fg(d));const _=x.safeValue(d);if(e=e.replace(l[0],_),w?(x.regex.lastIndex+=d.length,x.regex.lastIndex-=l[0].length):x.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),e}nest(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,l,d;const f=(m,p)=>{const v=this.nestingOptionsSeparator;if(m.indexOf(v)<0)return m;const w=m.split(new RegExp(`${v}[ ]*{`));let y=`{${w[1]}`;m=w[0],y=this.interpolate(y,d);const x=y.match(/'/g),S=y.match(/"/g);(x&&x.length%2===0&&!S||S.length%2!==0)&&(y=y.replace(/'/g,'"'));try{d=JSON.parse(y),p&&(d={...p,...d})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,_),`${m}${v}${y}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,m};for(;a=this.nestingRegexp.exec(e);){let m=[];d={...i},d=d.replace&&!$e(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;let p=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const v=a[1].split(this.formatSeparator).map(w=>w.trim());a[1]=v.shift(),m=v,p=!0}if(l=r(f.call(this,a[1].trim(),d),d),l&&a[0]===e&&!$e(l))return l;$e(l)||(l=fg(l)),l||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),l=""),p&&(l=m.reduce((v,w)=>this.format(v,w,i.lng,{...i,interpolationkey:a[1].trim()}),l.trim())),e=e.replace(a[0],l),this.regexp.lastIndex=0}return e}}const r_=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach(d=>{if(d){const[f,...m]=d.split(":"),p=m.join(":").trim().replace(/^'+|'+$/g,""),v=f.trim();r[v]||(r[v]=p),p==="false"&&(r[v]=!1),p==="true"&&(r[v]=!0),isNaN(p)||(r[v]=parseInt(p,10))}})}return{formatName:e,formatOptions:r}},Li=t=>{const e={};return(r,i,a)=>{let l=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(l={...l,[a.interpolationkey]:void 0});const d=i+JSON.stringify(l);let f=e[d];return f||(f=t(Vl(i),a),e[d]=f),f(r)}};class s_{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Cr.create("formatter"),this.options=e,this.formats={number:Li((r,i)=>{const a=new Intl.NumberFormat(r,{...i});return l=>a.format(l)}),currency:Li((r,i)=>{const a=new Intl.NumberFormat(r,{...i,style:"currency"});return l=>a.format(l)}),datetime:Li((r,i)=>{const a=new Intl.DateTimeFormat(r,{...i});return l=>a.format(l)}),relativetime:Li((r,i)=>{const a=new Intl.RelativeTimeFormat(r,{...i});return l=>a.format(l,i.range||"day")}),list:Li((r,i)=>{const a=new Intl.ListFormat(r,{...i});return l=>a.format(l)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Li(r)}format(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const l=r.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(f=>f.indexOf(")")>-1)){const f=l.findIndex(m=>m.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,f)].join(this.formatSeparator)}return l.reduce((f,m)=>{const{formatName:p,formatOptions:v}=r_(m);if(this.formats[p]){let w=f;try{const y=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},x=y.locale||y.lng||a.locale||a.lng||i;w=this.formats[p](f,x,{...v,...a,...y})}catch(y){this.logger.warn(y)}return w}else this.logger.warn(`there was no format function for ${p}`);return f},e)}}const i_=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class a_ extends uu{constructor(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=Cr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,r,i,a){const l={},d={},f={},m={};return e.forEach(p=>{let v=!0;r.forEach(w=>{const y=`${p}|${w}`;!i.reload&&this.store.hasResourceBundle(p,w)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?d[y]===void 0&&(d[y]=!0):(this.state[y]=1,v=!1,d[y]===void 0&&(d[y]=!0),l[y]===void 0&&(l[y]=!0),m[w]===void 0&&(m[w]=!0)))}),v||(f[p]=!0)}),(Object.keys(l).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(l),pending:Object.keys(d),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(m)}}loaded(e,r,i){const a=e.split("|"),l=a[0],d=a[1];r&&this.emit("failedLoading",l,d,r),!r&&i&&this.store.addResourceBundle(l,d,i,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&i&&(this.state[e]=0);const f={};this.queue.forEach(m=>{Uj(m.loaded,[l],d),i_(m,e),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(p=>{f[p]||(f[p]={});const v=m.loaded[p];v.length&&v.forEach(w=>{f[p][w]===void 0&&(f[p][w]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(m=>!m.done)}read(e,r,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,d=arguments.length>5?arguments[5]:void 0;if(!e.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:i,tried:a,wait:l,callback:d});return}this.readingCalls++;const f=(p,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const w=this.waitingReads.shift();this.read(w.lng,w.ns,w.fcName,w.tried,w.wait,w.callback)}if(p&&v&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,i,a+1,l*2,d)},l);return}d(p,v)},m=this.backend[i].bind(this.backend);if(m.length===2){try{const p=m(e,r);p&&typeof p.then=="function"?p.then(v=>f(null,v)).catch(f):f(null,p)}catch(p){f(p)}return}return m(e,r,f)}prepareLoading(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();$e(e)&&(e=this.languageUtils.toResolveHierarchy(e)),$e(r)&&(r=[r]);const l=this.queueLoad(e,r,i,a);if(!l.toLoad.length)return l.pending.length||a(),null;l.toLoad.forEach(d=>{this.loadOne(d)})}load(e,r,i){this.prepareLoading(e,r,{},i)}reload(e,r,i){this.prepareLoading(e,r,{reload:!0},i)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],l=i[1];this.read(a,l,"read",void 0,void 0,(d,f)=>{d&&this.logger.warn(`${r}loading namespace ${l} for language ${a} failed`,d),!d&&f&&this.logger.log(`${r}loaded namespace ${l} for language ${a}`,f),this.loaded(e,d,f)})}saveMissing(e,r,i,a,l){let d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},f=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${i}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const m={...d,isUpdate:l},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(e,r,i,a,m):v=p(e,r,i,a),v&&typeof v.then=="function"?v.then(w=>f(null,w)).catch(f):f(null,v)}catch(v){f(v)}else p(e,r,i,a,f,m)}!e||!e[0]||this.store.addResource(e[0],r,i,a)}}}const bg=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),$e(t[1])&&(e.defaultValue=t[1]),$e(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{e[i]=r[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),jg=t=>($e(t.ns)&&(t.ns=[t.ns]),$e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),$e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),El=()=>{},o_=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class io extends uu{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=jg(e),this.services={},this.logger=Cr,this.modules={external:[]},o_(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(i=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&($e(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const a=bg();this.options={...a,...this.options,...jg(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const l=v=>v?typeof v=="function"?new v:v:null;if(!this.options.isClone){this.modules.logger?Cr.init(l(this.modules.logger),this.options):Cr.init(null,this.options);let v;this.modules.formatter?v=this.modules.formatter:typeof Intl<"u"&&(v=s_);const w=new vg(this.options);this.store=new gg(this.options.resources,this.options);const y=this.services;y.logger=Cr,y.resourceStore=this.store,y.languageUtils=w,y.pluralResolver=new t_(w,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),v&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(y.formatter=l(v),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new n_(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new a_(l(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(x){for(var S=arguments.length,_=new Array(S>1?S-1:0),b=1;b<S;b++)_[b-1]=arguments[b];e.emit(x,..._)}),this.modules.languageDetector&&(y.languageDetector=l(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=l(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new ql(this.services,this.options),this.translator.on("*",function(x){for(var S=arguments.length,_=new Array(S>1?S-1:0),b=1;b<S;b++)_[b-1]=arguments[b];e.emit(x,..._)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,i||(i=El),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const v=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);v.length>0&&v[0]!=="dev"&&(this.options.lng=v[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(v=>{this[v]=function(){return e.store[v](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(v=>{this[v]=function(){return e.store[v](...arguments),e}});const m=Da(),p=()=>{const v=(w,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(y),i(w,y)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return v(null,this.t.bind(this));this.changeLanguage(this.options.lng,v)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),m}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:El;const a=$e(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],d=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(p=>{p!=="cimode"&&l.indexOf(p)<0&&l.push(p)})};a?d(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>d(m)),this.options.preload&&this.options.preload.forEach(f=>d(f)),this.services.backendConnector.load(l,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(f)})}else i(null)}reloadResources(e,r,i){const a=Da();return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),i||(i=El),this.services.backendConnector.reload(e,r,l=>{a.resolve(),i(l)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&xv.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const i=this.languages[r];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,r){var i=this;this.isLanguageChangingTo=e;const a=Da();this.emit("languageChanging",e);const l=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},d=(m,p)=>{p?(l(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),r&&r(m,function(){return i.t(...arguments)})},f=m=>{!e&&!m&&this.services.languageDetector&&(m=[]);const p=$e(m)?m:this.services.languageUtils.getBestMatchFromCodes(m);p&&(this.language||l(p),this.translator.language||this.translator.changeLanguage(p),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(p)),this.loadResources(p,v=>{d(v,p)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(e),a}getFixedT(e,r,i){var a=this;const l=function(d,f){let m;if(typeof f!="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),w=2;w<p;w++)v[w-2]=arguments[w];m=a.options.overloadTranslationOptionHandler([d,f].concat(v))}else m={...f};m.lng=m.lng||l.lng,m.lngs=m.lngs||l.lngs,m.ns=m.ns||l.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||i||l.keyPrefix);const y=a.options.keySeparator||".";let x;return m.keyPrefix&&Array.isArray(d)?x=d.map(S=>`${m.keyPrefix}${y}${S}`):x=m.keyPrefix?`${m.keyPrefix}${y}${d}`:d,a.t(x,m)};return $e(e)?l.lng=e:l.lngs=e,l.ns=r,l.keyPrefix=i,l}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const d=(f,m)=>{const p=this.services.backendConnector.state[`${f}|${m}`];return p===-1||p===0||p===2};if(r.precheck){const f=r.precheck(this,d);if(f!==void 0)return f}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(i,e)&&(!a||d(l,e)))}loadNamespaces(e,r){const i=Da();return this.options.ns?($e(e)&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),r&&r(a)}),i):(r&&r(),Promise.resolve())}loadLanguages(e,r){const i=Da();$e(e)&&(e=[e]);const a=this.options.preload||[],l=e.filter(d=>a.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return l.length?(this.options.preload=a.concat(l),this.loadResources(d=>{i.resolve(),r&&r(d)}),i):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new vg(bg());return r.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new io(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:El;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},l=new io(a);return(e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(f=>{l[f]=this[f]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i&&(l.store=new gg(this.store.data,a),l.services.resourceStore=l.store),l.translator=new ql(l.services,a),l.translator.on("*",function(f){for(var m=arguments.length,p=new Array(m>1?m-1:0),v=1;v<m;v++)p[v-1]=arguments[v];l.emit(f,...p)}),l.init(a,r),l.translator.options=a,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const rn=io.createInstance();rn.createInstance=io.createInstance;rn.createInstance;rn.dir;rn.init;rn.loadResources;rn.reloadResources;rn.use;rn.changeLanguage;rn.getFixedT;rn.t;rn.exists;rn.setDefaultNamespace;rn.hasLoadedNamespace;rn.loadNamespaces;rn.loadLanguages;function l_(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const _g={};function Ud(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];typeof e[0]=="string"&&_g[e[0]]||(typeof e[0]=="string"&&(_g[e[0]]=new Date),l_(...e))}const wv=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}};function Sg(t,e,r){t.loadNamespaces(e,wv(t,r))}function kg(t,e,r,i){typeof r=="string"&&(r=[r]),r.forEach(a=>{t.options.ns.indexOf(a)<0&&t.options.ns.push(a)}),t.loadLanguages(e,wv(t,i))}function u_(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=e.languages[0],a=e.options?e.options.fallbackLng:!1,l=e.languages[e.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const d=(f,m)=>{const p=e.services.backendConnector.state[`${f}|${m}`];return p===-1||p===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!d(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(i,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||d(i,t)&&(!a||d(l,t)))}function c_(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Ud("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(a,l)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!l(a.isLanguageChangingTo,t))return!1}}):u_(t,e,r)}const d_=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f_={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},h_=t=>f_[t],p_=t=>t.replace(d_,h_);let Vd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:p_};function m_(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vd={...Vd,...t}}function g_(){return Vd}let bv;function y_(t){bv=t}function v_(){return bv}const x_={type:"3rdParty",init(t){m_(t.options.react),y_(t)}},w_=$.createContext();class b_{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const j_=(t,e)=>{const r=$.useRef();return $.useEffect(()=>{r.current=t},[t,e]),r.current};function oi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=e,{i18n:i,defaultNS:a}=$.useContext(w_)||{},l=r||i||v_();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new b_),!l){Ud("You will need to pass in an i18next instance by using initReactI18next");const F=(k,I)=>typeof I=="string"?I:I&&typeof I=="object"&&typeof I.defaultValue=="string"?I.defaultValue:Array.isArray(k)?k[k.length-1]:k,L=[F,{},!1];return L.t=F,L.i18n={},L.ready=!1,L}l.options.react&&l.options.react.wait!==void 0&&Ud("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...g_(),...l.options.react,...e},{useSuspense:f,keyPrefix:m}=d;let p=a||l.options&&l.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],l.reportNamespaces.addUsedNamespaces&&l.reportNamespaces.addUsedNamespaces(p);const v=(l.isInitialized||l.initializedStoreOnce)&&p.every(F=>c_(F,l,d));function w(){return l.getFixedT(e.lng||null,d.nsMode==="fallback"?p:p[0],m)}const[y,x]=$.useState(w);let S=p.join();e.lng&&(S=`${e.lng}${S}`);const _=j_(S),b=$.useRef(!0);$.useEffect(()=>{const{bindI18n:F,bindI18nStore:L}=d;b.current=!0,!v&&!f&&(e.lng?kg(l,e.lng,p,()=>{b.current&&x(w)}):Sg(l,p,()=>{b.current&&x(w)})),v&&_&&_!==S&&b.current&&x(w);function k(){b.current&&x(w)}return F&&l&&l.on(F,k),L&&l&&l.store.on(L,k),()=>{b.current=!1,F&&l&&F.split(" ").forEach(I=>l.off(I,k)),L&&l&&L.split(" ").forEach(I=>l.store.off(I,k))}},[l,S]);const P=$.useRef(!0);$.useEffect(()=>{b.current&&!P.current&&x(w),P.current=!1},[l,m]);const N=[y,l,v];if(N.t=y,N.i18n=l,N.ready=v,v||!v&&!f)return N;throw new Promise(F=>{e.lng?kg(l,e.lng,p,()=>F()):Sg(l,p,()=>F())})}function __(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ao(t){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ao(t)}function S_(t,e){if(ao(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(ao(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function jv(t){var e=S_(t,"string");return ao(e)=="symbol"?e:e+""}function k_(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,jv(i.key),i)}}function N_(t,e,r){return e&&k_(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var _v=[],C_=_v.forEach,E_=_v.slice;function P_(t){return C_.call(E_.call(arguments,1),function(e){if(e)for(var r in e)t[r]===void 0&&(t[r]=e[r])}),t}var Ng=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,O_=function(e,r,i){var a=i||{};a.path=a.path||"/";var l=encodeURIComponent(r),d="".concat(e,"=").concat(l);if(a.maxAge>0){var f=a.maxAge-0;if(Number.isNaN(f))throw new Error("maxAge should be a Number");d+="; Max-Age=".concat(Math.floor(f))}if(a.domain){if(!Ng.test(a.domain))throw new TypeError("option domain is invalid");d+="; Domain=".concat(a.domain)}if(a.path){if(!Ng.test(a.path))throw new TypeError("option path is invalid");d+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(d+="; HttpOnly"),a.secure&&(d+="; Secure"),a.sameSite){var m=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite;switch(m){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return d},Cg={create:function(e,r,i,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+i*60*1e3)),a&&(l.domain=a),document.cookie=O_(e,encodeURIComponent(r),l)},read:function(e){for(var r="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var l=i[a];l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(r)===0)return l.substring(r.length,l.length)}return null},remove:function(e){this.create(e,"",-1)}},R_={name:"cookie",lookup:function(e){var r;if(e.lookupCookie&&typeof document<"u"){var i=Cg.read(e.lookupCookie);i&&(r=i)}return r},cacheUserLanguage:function(e,r){r.lookupCookie&&typeof document<"u"&&Cg.create(r.lookupCookie,e,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},T_={name:"querystring",lookup:function(e){var r;if(typeof window<"u"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var a=i.substring(1),l=a.split("&"),d=0;d<l.length;d++){var f=l[d].indexOf("=");if(f>0){var m=l[d].substring(0,f);m===e.lookupQuerystring&&(r=l[d].substring(f+1))}}}return r}},$a=null,Eg=function(){if($a!==null)return $a;try{$a=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{$a=!1}return $a},L_={name:"localStorage",lookup:function(e){var r;if(e.lookupLocalStorage&&Eg()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(r=i)}return r},cacheUserLanguage:function(e,r){r.lookupLocalStorage&&Eg()&&window.localStorage.setItem(r.lookupLocalStorage,e)}},za=null,Pg=function(){if(za!==null)return za;try{za=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{za=!1}return za},A_={name:"sessionStorage",lookup:function(e){var r;if(e.lookupSessionStorage&&Pg()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(r=i)}return r},cacheUserLanguage:function(e,r){r.lookupSessionStorage&&Pg()&&window.sessionStorage.setItem(r.lookupSessionStorage,e)}},I_={name:"navigator",lookup:function(e){var r=[];if(typeof navigator<"u"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)r.push(navigator.languages[i]);navigator.userLanguage&&r.push(navigator.userLanguage),navigator.language&&r.push(navigator.language)}return r.length>0?r:void 0}},M_={name:"htmlTag",lookup:function(e){var r,i=e.htmlTag||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(r=i.getAttribute("lang")),r}},F_={name:"path",lookup:function(e){var r;if(typeof window<"u"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;r=i[e.lookupFromPathIndex].replace("/","")}else r=i[0].replace("/","")}return r}},D_={name:"subdomain",lookup:function(e){var r=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[r]}},Sv=!1;try{document.cookie,Sv=!0}catch{}var kv=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Sv||kv.splice(1,1);function $_(){return{order:kv,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var Nv=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};__(this,t),this.type="languageDetector",this.detectors={},this.init(e,r)}return N_(t,[{key:"init",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r||{languageUtils:{}},this.options=P_(i,this.options||{},$_()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(l){return l.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(R_),this.addDetector(T_),this.addDetector(L_),this.addDetector(A_),this.addDetector(I_),this.addDetector(M_),this.addDetector(F_),this.addDetector(D_)}},{key:"addDetector",value:function(r){return this.detectors[r.name]=r,this}},{key:"detect",value:function(r){var i=this;r||(r=this.options.order);var a=[];return r.forEach(function(l){if(i.detectors[l]){var d=i.detectors[l].lookup(i.options);d&&typeof d=="string"&&(d=[d]),d&&(a=a.concat(d))}}),a=a.map(function(l){return i.options.convertDetectedLanguage(l)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(r,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||i.forEach(function(l){a.detectors[l]&&a.detectors[l].cacheUserLanguage(r,a.options)}))}}])})();Nv.type="languageDetector";function Bd(t){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bd(t)}function Cv(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Bd(XMLHttpRequest))==="object"}function z_(t){return!!t&&typeof t.then=="function"}function U_(t){return z_(t)?t:Promise.resolve(t)}function V_(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pl={exports:{}},Ol={exports:{}},Og;function B_(){return Og||(Og=1,(function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Za<"u"&&Za,i=(function(){function l(){this.fetch=!1,this.DOMException=r.DOMException}return l.prototype=r,new l})();(function(l){(function(d){var f=typeof l<"u"&&l||typeof self<"u"&&self||typeof f<"u"&&f,m={searchParams:"URLSearchParams"in f,iterable:"Symbol"in f&&"iterator"in Symbol,blob:"FileReader"in f&&"Blob"in f&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in f,arrayBuffer:"ArrayBuffer"in f};function p(M){return M&&DataView.prototype.isPrototypeOf(M)}if(m.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=ArrayBuffer.isView||function(M){return M&&v.indexOf(Object.prototype.toString.call(M))>-1};function y(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||M==="")throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function x(M){return typeof M!="string"&&(M=String(M)),M}function S(M){var R={next:function(){var G=M.shift();return{done:G===void 0,value:G}}};return m.iterable&&(R[Symbol.iterator]=function(){return R}),R}function _(M){this.map={},M instanceof _?M.forEach(function(R,G){this.append(G,R)},this):Array.isArray(M)?M.forEach(function(R){this.append(R[0],R[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(R){this.append(R,M[R])},this)}_.prototype.append=function(M,R){M=y(M),R=x(R);var G=this.map[M];this.map[M]=G?G+", "+R:R},_.prototype.delete=function(M){delete this.map[y(M)]},_.prototype.get=function(M){return M=y(M),this.has(M)?this.map[M]:null},_.prototype.has=function(M){return this.map.hasOwnProperty(y(M))},_.prototype.set=function(M,R){this.map[y(M)]=x(R)},_.prototype.forEach=function(M,R){for(var G in this.map)this.map.hasOwnProperty(G)&&M.call(R,this.map[G],G,this)},_.prototype.keys=function(){var M=[];return this.forEach(function(R,G){M.push(G)}),S(M)},_.prototype.values=function(){var M=[];return this.forEach(function(R){M.push(R)}),S(M)},_.prototype.entries=function(){var M=[];return this.forEach(function(R,G){M.push([G,R])}),S(M)},m.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function b(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function P(M){return new Promise(function(R,G){M.onload=function(){R(M.result)},M.onerror=function(){G(M.error)}})}function N(M){var R=new FileReader,G=P(R);return R.readAsArrayBuffer(M),G}function F(M){var R=new FileReader,G=P(R);return R.readAsText(M),G}function L(M){for(var R=new Uint8Array(M),G=new Array(R.length),H=0;H<R.length;H++)G[H]=String.fromCharCode(R[H]);return G.join("")}function k(M){if(M.slice)return M.slice(0);var R=new Uint8Array(M.byteLength);return R.set(new Uint8Array(M)),R.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(M){this.bodyUsed=this.bodyUsed,this._bodyInit=M,M?typeof M=="string"?this._bodyText=M:m.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:m.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:m.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():m.arrayBuffer&&m.blob&&p(M)?(this._bodyArrayBuffer=k(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):m.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||w(M))?this._bodyArrayBuffer=k(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob&&(this.blob=function(){var M=b(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var M=b(this);return M||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(N)}),this.text=function(){var M=b(this);if(M)return M;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(Z)}),this.json=function(){return this.text().then(JSON.parse)},this}var X=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function re(M){var R=M.toUpperCase();return X.indexOf(R)>-1?R:M}function de(M,R){if(!(this instanceof de))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var G=R.body;if(M instanceof de){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,R.headers||(this.headers=new _(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!G&&M._bodyInit!=null&&(G=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new _(R.headers)),this.method=re(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&G)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(G),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var H=/([?&])_=[^&]*/;if(H.test(this.url))this.url=this.url.replace(H,"$1_="+new Date().getTime());else{var W=/\?/;this.url+=(W.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}de.prototype.clone=function(){return new de(this,{body:this._bodyInit})};function Z(M){var R=new FormData;return M.trim().split("&").forEach(function(G){if(G){var H=G.split("="),W=H.shift().replace(/\+/g," "),K=H.join("=").replace(/\+/g," ");R.append(decodeURIComponent(W),decodeURIComponent(K))}}),R}function Oe(M){var R=new _,G=M.replace(/\r?\n[\t ]+/g," ");return G.split("\r").map(function(H){return H.indexOf(`
|
|
`)===0?H.substr(1,H.length):H}).forEach(function(H){var W=H.split(":"),K=W.shift().trim();if(K){var T=W.join(":").trim();R.append(K,T)}}),R}I.call(de.prototype);function J(M,R){if(!(this instanceof J))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new _(R.headers),this.url=R.url||"",this._initBody(M)}I.call(J.prototype),J.prototype.clone=function(){return new J(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},J.error=function(){var M=new J(null,{status:0,statusText:""});return M.type="error",M};var ve=[301,302,303,307,308];J.redirect=function(M,R){if(ve.indexOf(R)===-1)throw new RangeError("Invalid status code");return new J(null,{status:R,headers:{location:M}})},d.DOMException=f.DOMException;try{new d.DOMException}catch{d.DOMException=function(R,G){this.message=R,this.name=G;var H=Error(R);this.stack=H.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function me(M,R){return new Promise(function(G,H){var W=new de(M,R);if(W.signal&&W.signal.aborted)return H(new d.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function T(){K.abort()}K.onload=function(){var ue={status:K.status,statusText:K.statusText,headers:Oe(K.getAllResponseHeaders()||"")};ue.url="responseURL"in K?K.responseURL:ue.headers.get("X-Request-URL");var pe="response"in K?K.response:K.responseText;setTimeout(function(){G(new J(pe,ue))},0)},K.onerror=function(){setTimeout(function(){H(new TypeError("Network request failed"))},0)},K.ontimeout=function(){setTimeout(function(){H(new TypeError("Network request failed"))},0)},K.onabort=function(){setTimeout(function(){H(new d.DOMException("Aborted","AbortError"))},0)};function Q(ue){try{return ue===""&&f.location.href?f.location.href:ue}catch{return ue}}K.open(W.method,Q(W.url),!0),W.credentials==="include"?K.withCredentials=!0:W.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&(m.blob?K.responseType="blob":m.arrayBuffer&&W.headers.get("Content-Type")&&W.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(K.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof _)?Object.getOwnPropertyNames(R.headers).forEach(function(ue){K.setRequestHeader(ue,x(R.headers[ue]))}):W.headers.forEach(function(ue,pe){K.setRequestHeader(pe,ue)}),W.signal&&(W.signal.addEventListener("abort",T),K.onreadystatechange=function(){K.readyState===4&&W.signal.removeEventListener("abort",T)}),K.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return me.polyfill=!0,f.fetch||(f.fetch=me,f.Headers=_,f.Request=de,f.Response=J),d.Headers=_,d.Request=de,d.Response=J,d.fetch=me,d})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=r.fetch?r:i;e=a.fetch,e.default=a.fetch,e.fetch=a.fetch,e.Headers=a.Headers,e.Request=a.Request,e.Response=a.Response,t.exports=e})(Ol,Ol.exports)),Ol.exports}var Rg;function q_(){return Rg||(Rg=1,(function(t,e){var r=typeof fetch=="function"?fetch:void 0;if(typeof Za<"u"&&Za.fetch?r=Za.fetch:typeof window<"u"&&window.fetch&&(r=window.fetch),typeof V_<"u"&&typeof window>"u"){var i=r||B_();i.default&&(i=i.default),e.default=i,t.exports=e.default}})(Pl,Pl.exports)),Pl.exports}var Ev=q_();const Pv=iu(Ev),Tg=Vy({__proto__:null,default:Pv},[Ev]);function Lg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,i)}return r}function Ag(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lg(Object(r),!0).forEach(function(i){H_(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lg(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function H_(t,e,r){return(e=W_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W_(t){var e=K_(t,"string");return ni(e)=="symbol"?e:e+""}function K_(t,e){if(ni(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(ni(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ni(t){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ni(t)}var Ts=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Ts=global.fetch:typeof window<"u"&&window.fetch&&(Ts=window.fetch);var oo;Cv()&&(typeof global<"u"&&global.XMLHttpRequest?oo=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(oo=window.XMLHttpRequest));var Hl;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Hl=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Hl=window.ActiveXObject));!Ts&&Tg&&!oo&&!Hl&&(Ts=Pv||Tg);typeof Ts!="function"&&(Ts=void 0);var qd=function(e,r){if(r&&ni(r)==="object"){var i="";for(var a in r)i+="&"+encodeURIComponent(a)+"="+encodeURIComponent(r[a]);if(!i)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+i.slice(1)}return e},Ig=function(e,r,i,a){var l=function(m){if(!m.ok)return i(m.statusText||"Error",{status:m.status});m.text().then(function(p){i(null,{status:m.status,data:p})}).catch(i)};if(a){var d=a(e,r);if(d instanceof Promise){d.then(l).catch(i);return}}typeof fetch=="function"?fetch(e,r).then(l).catch(i):Ts(e,r).then(l).catch(i)},Mg=!1,Q_=function(e,r,i,a){e.queryStringParams&&(r=qd(r,e.queryStringParams));var l=Ag({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(l["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(l["Content-Type"]="application/json");var d=typeof e.requestOptions=="function"?e.requestOptions(i):e.requestOptions,f=Ag({method:i?"POST":"GET",body:i?e.stringify(i):void 0,headers:l},Mg?{}:d),m=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Ig(r,f,a,m)}catch(p){if(!d||Object.keys(d).length===0||!p.message||p.message.indexOf("not implemented")<0)return a(p);try{Object.keys(d).forEach(function(v){delete f[v]}),Ig(r,f,a,m),Mg=!0}catch(v){a(v)}}},Z_=function(e,r,i,a){i&&ni(i)==="object"&&(i=qd("",i).slice(1)),e.queryStringParams&&(r=qd(r,e.queryStringParams));try{var l;oo?l=new oo:l=new Hl("MSXML2.XMLHTTP.3.0"),l.open(i?"POST":"GET",r,1),e.crossDomain||l.setRequestHeader("X-Requested-With","XMLHttpRequest"),l.withCredentials=!!e.withCredentials,i&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.overrideMimeType&&l.overrideMimeType("application/json");var d=e.customHeaders;if(d=typeof d=="function"?d():d,d)for(var f in d)l.setRequestHeader(f,d[f]);l.onreadystatechange=function(){l.readyState>3&&a(l.status>=400?l.statusText:null,{status:l.status,data:l.responseText})},l.send(i)}catch(m){console&&console.log(m)}},G_=function(e,r,i,a){if(typeof i=="function"&&(a=i,i=void 0),a=a||function(){},Ts&&r.indexOf("file:")!==0)return Q_(e,r,i,a);if(Cv()||typeof ActiveXObject=="function")return Z_(e,r,i,a);a(new Error("No fetch and no xhr implementation found!"))};function Vi(t){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(t)}function Fg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,i)}return r}function cd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fg(Object(r),!0).forEach(function(i){Ov(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function J_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y_(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Rv(i.key),i)}}function X_(t,e,r){return e&&Y_(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ov(t,e,r){return(e=Rv(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rv(t){var e=eS(t,"string");return Vi(e)=="symbol"?e:e+""}function eS(t,e){if(Vi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(Vi(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var tS=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,i,a){return Ov({},i,a||"")},parseLoadPayload:function(r,i){},request:G_,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Tv=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};J_(this,t),this.services=e,this.options=r,this.allOptions=i,this.type="backend",this.init(e,r,i)}return X_(t,[{key:"init",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=cd(cd(cd({},tS()),this.options||{}),a),this.allOptions=l,this.services&&this.options.reloadInterval){var d=setInterval(function(){return i.reload()},this.options.reloadInterval);Vi(d)==="object"&&typeof d.unref=="function"&&d.unref()}}},{key:"readMulti",value:function(r,i,a){this._readAny(r,r,i,i,a)}},{key:"read",value:function(r,i,a){this._readAny([r],r,[i],i,a)}},{key:"_readAny",value:function(r,i,a,l,d){var f=this,m=this.options.loadPath;typeof this.options.loadPath=="function"&&(m=this.options.loadPath(r,a)),m=U_(m),m.then(function(p){if(!p)return d(null,{});var v=f.services.interpolator.interpolate(p,{lng:r.join("+"),ns:a.join("+")});f.loadUrl(v,d,i,l)})}},{key:"loadUrl",value:function(r,i,a,l){var d=this,f=typeof a=="string"?[a]:a,m=typeof l=="string"?[l]:l,p=this.options.parseLoadPayload(f,m);this.options.request(this.options,r,p,function(v,w){if(w&&(w.status>=500&&w.status<600||!w.status))return i("failed loading "+r+"; status code: "+w.status,!0);if(w&&w.status>=400&&w.status<500)return i("failed loading "+r+"; status code: "+w.status,!1);if(!w&&v&&v.message){var y=v.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(b){return y.indexOf(b)>-1});if(x)return i("failed loading "+r+": "+v.message,!0)}if(v)return i(v,!1);var S,_;try{typeof w.data=="string"?S=d.options.parse(w.data,a,l):S=w.data}catch{_="failed parsing "+r+" to json"}if(_)return i(_,!1);i(null,S)})}},{key:"create",value:function(r,i,a,l,d){var f=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var m=this.options.parsePayload(i,a,l),p=0,v=[],w=[];r.forEach(function(y){var x=f.options.addPath;typeof f.options.addPath=="function"&&(x=f.options.addPath(y,i));var S=f.services.interpolator.interpolate(x,{lng:y,ns:i});f.options.request(f.options,S,m,function(_,b){p+=1,v.push(_),w.push(b),p===r.length&&typeof d=="function"&&d(v,w)})})}}},{key:"reload",value:function(){var r=this,i=this.services,a=i.backendConnector,l=i.languageUtils,d=i.logger,f=a.language;if(!(f&&f.toLowerCase()==="cimode")){var m=[],p=function(w){var y=l.toResolveHierarchy(w);y.forEach(function(x){m.indexOf(x)<0&&m.push(x)})};p(f),this.allOptions.preload&&this.allOptions.preload.forEach(function(v){return p(v)}),m.forEach(function(v){r.allOptions.ns.forEach(function(w){a.read(v,w,"read",null,null,function(y,x){y&&d.warn("loading namespace ".concat(w," for language ").concat(v," failed"),y),!y&&x&&d.log("loaded namespace ".concat(w," for language ").concat(v),x),a.loaded("".concat(v,"|").concat(w),y,x)})})})}}}])})();Tv.type="backend";rn.use(Tv).use(Nv).use(x_).init({fallbackLng:"en",ns:["common","pages"],defaultNS:"common",backend:{loadPath:"/static/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1},react:{useSuspense:!1}});var nS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pe=(t,e)=>{const r=$.forwardRef(({color:i="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:d,children:f,...m},p)=>$.createElement("svg",{ref:p,...nS,width:a,height:a,stroke:i,strokeWidth:d?Number(l)*24/Number(a):l,className:`lucide lucide-${rS(t)}`,...m},[...e.map(([v,w])=>$.createElement(v,w)),...(Array.isArray(f)?f:[f])||[]]));return r.displayName=`${t}`,r},sS=Pe("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),fn=Pe("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),iS=Pe("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Zn=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Lv=Pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),aS=Pe("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),oS=Pe("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),lS=Pe("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]),Av=Pe("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]),_f=Pe("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Dg=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),uS=Pe("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]),Hd=Pe("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]),Iv=Pe("Clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),cS=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Sf=Pe("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),dS=Pe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Mv=Pe("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]),fS=Pe("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Wd=Pe("FileJson",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),hS=Pe("FileSearch",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v3",key:"am10z3"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"ychnub"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}]]),pS=Pe("FileSpreadsheet",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M14 17h2",key:"10kma7"}]]),Fv=Pe("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]),mS=Pe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),gS=Pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),kf=Pe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),yS=Pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),vS=Pe("Highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]),xS=Pe("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),Dv=Pe("Layers3",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m6.08 9.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1e5n1m"}],["path",{d:"m6.08 14.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1iwflc"}]]),wS=Pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),bS=Pe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),jS=Pe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Nf=Pe("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),dr=Pe("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),_S=Pe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Cf=Pe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),$v=Pe("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]),ri=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),zv=Pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),$g=Pe("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),Uv=Pe("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Vv=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),SS=Pe("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),kS=Pe("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),Bv=Pe("ShieldCheck",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),NS=Pe("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]),CS=Pe("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),ES=Pe("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),Kd=Pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),PS=Pe("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),OS=Pe("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),zg=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ur(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ls(t){return!!t&&!!t[yt]}function Zr(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var a=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===$S})(t)||Array.isArray(t)||!!t[Kg]||!!(!((e=t.constructor)===null||e===void 0)&&e[Kg])||Ef(t)||Pf(t))}function si(t,e,r){r===void 0&&(r=!1),ta(t)===0?(r?Object.keys:$i)(t).forEach((function(i){r&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,a){return e(a,i,t)}))}function ta(t){var e=t[yt];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ef(t)?2:Pf(t)?3:0}function Di(t,e){return ta(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function RS(t,e){return ta(t)===2?t.get(e):t[e]}function qv(t,e,r){var i=ta(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function Hv(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ef(t){return FS&&t instanceof Map}function Pf(t){return DS&&t instanceof Set}function Js(t){return t.o||t.t}function Of(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Kv(t);delete e[yt];for(var r=$i(e),i=0;i<r.length;i++){var a=r[i],l=e[a];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(e[a]={configurable:!0,writable:!0,enumerable:l.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Rf(t,e){return e===void 0&&(e=!1),Tf(t)||Ls(t)||!Zr(t)||(ta(t)>1&&(t.set=t.add=t.clear=t.delete=TS),Object.freeze(t),e&&si(t,(function(r,i){return Rf(i,!0)}),!0)),t}function TS(){ur(2)}function Tf(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Er(t){var e=Jd[t];return e||ur(18,t),e}function LS(t,e){Jd[t]||(Jd[t]=e)}function Qd(){return lo}function dd(t,e){e&&(Er("Patches"),t.u=[],t.s=[],t.v=e)}function Wl(t){Zd(t),t.p.forEach(AS),t.p=null}function Zd(t){t===lo&&(lo=t.l)}function Ug(t){return lo={p:[],l:lo,h:t,m:!0,_:0}}function AS(t){var e=t[yt];e.i===0||e.i===1?e.j():e.g=!0}function fd(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||Er("ES5").S(e,t,i),i?(r[yt].P&&(Wl(e),ur(4)),Zr(t)&&(t=Kl(e,t),e.l||Ql(e,t)),e.u&&Er("Patches").M(r[yt].t,t,e.u,e.s)):t=Kl(e,r,[]),Wl(e),e.u&&e.v(e.u,e.s),t!==Wv?t:void 0}function Kl(t,e,r){if(Tf(e))return e;var i=e[yt];if(!i)return si(e,(function(f,m){return Vg(t,i,e,f,m,r)}),!0),e;if(i.A!==t)return e;if(!i.P)return Ql(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var a=i.i===4||i.i===5?i.o=Of(i.k):i.o,l=a,d=!1;i.i===3&&(l=new Set(a),a.clear(),d=!0),si(l,(function(f,m){return Vg(t,i,a,f,m,r,d)})),Ql(t,a,!1),r&&t.u&&Er("Patches").N(i,r,t.u,t.s)}return i.o}function Vg(t,e,r,i,a,l,d){if(Ls(a)){var f=Kl(t,a,l&&e&&e.i!==3&&!Di(e.R,i)?l.concat(i):void 0);if(qv(r,i,f),!Ls(f))return;t.m=!1}else d&&r.add(a);if(Zr(a)&&!Tf(a)){if(!t.h.D&&t._<1)return;Kl(t,a),e&&e.A.l||Ql(t,a)}}function Ql(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Rf(e,r)}function hd(t,e){var r=t[yt];return(r?Js(r):t)[e]}function Bg(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function Ss(t){t.P||(t.P=!0,t.l&&Ss(t.l))}function pd(t){t.o||(t.o=Of(t.t))}function Gd(t,e,r){var i=Ef(e)?Er("MapSet").F(e,r):Pf(e)?Er("MapSet").T(e,r):t.O?(function(a,l){var d=Array.isArray(a),f={i:d?1:0,A:l?l.A:Qd(),P:!1,I:!1,R:{},l,t:a,k:null,o:null,j:null,C:!1},m=f,p=uo;d&&(m=[f],p=Wa);var v=Proxy.revocable(m,p),w=v.revoke,y=v.proxy;return f.k=y,f.j=w,y})(e,r):Er("ES5").J(e,r);return(r?r.A:Qd()).p.push(i),i}function IS(t){return Ls(t)||ur(22,t),(function e(r){if(!Zr(r))return r;var i,a=r[yt],l=ta(r);if(a){if(!a.P&&(a.i<4||!Er("ES5").K(a)))return a.t;a.I=!0,i=qg(r,l),a.I=!1}else i=qg(r,l);return si(i,(function(d,f){a&&RS(a.t,d)===f||qv(i,d,e(f))})),l===3?new Set(i):i})(t)}function qg(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Of(t)}function MS(){function t(l,d){var f=a[l];return f?f.enumerable=d:a[l]=f={configurable:!0,enumerable:d,get:function(){var m=this[yt];return uo.get(m,l)},set:function(m){var p=this[yt];uo.set(p,l,m)}},f}function e(l){for(var d=l.length-1;d>=0;d--){var f=l[d][yt];if(!f.P)switch(f.i){case 5:i(f)&&Ss(f);break;case 4:r(f)&&Ss(f)}}}function r(l){for(var d=l.t,f=l.k,m=$i(f),p=m.length-1;p>=0;p--){var v=m[p];if(v!==yt){var w=d[v];if(w===void 0&&!Di(d,v))return!0;var y=f[v],x=y&&y[yt];if(x?x.t!==w:!Hv(y,w))return!0}}var S=!!d[yt];return m.length!==$i(d).length+(S?0:1)}function i(l){var d=l.k;if(d.length!==l.t.length)return!0;var f=Object.getOwnPropertyDescriptor(d,d.length-1);if(f&&!f.get)return!0;for(var m=0;m<d.length;m++)if(!d.hasOwnProperty(m))return!0;return!1}var a={};LS("ES5",{J:function(l,d){var f=Array.isArray(l),m=(function(v,w){if(v){for(var y=Array(w.length),x=0;x<w.length;x++)Object.defineProperty(y,""+x,t(x,!0));return y}var S=Kv(w);delete S[yt];for(var _=$i(S),b=0;b<_.length;b++){var P=_[b];S[P]=t(P,v||!!S[P].enumerable)}return Object.create(Object.getPrototypeOf(w),S)})(f,l),p={i:f?5:4,A:d?d.A:Qd(),P:!1,I:!1,R:{},l:d,t:l,k:m,o:null,g:!1,C:!1};return Object.defineProperty(m,yt,{value:p,writable:!0}),m},S:function(l,d,f){f?Ls(d)&&d[yt].A===l&&e(l.p):(l.u&&(function m(p){if(p&&typeof p=="object"){var v=p[yt];if(v){var w=v.t,y=v.k,x=v.R,S=v.i;if(S===4)si(y,(function(F){F!==yt&&(w[F]!==void 0||Di(w,F)?x[F]||m(y[F]):(x[F]=!0,Ss(v)))})),si(w,(function(F){y[F]!==void 0||Di(y,F)||(x[F]=!1,Ss(v))}));else if(S===5){if(i(v)&&(Ss(v),x.length=!0),y.length<w.length)for(var _=y.length;_<w.length;_++)x[_]=!1;else for(var b=w.length;b<y.length;b++)x[b]=!0;for(var P=Math.min(y.length,w.length),N=0;N<P;N++)y.hasOwnProperty(N)||(x[N]=!0),x[N]===void 0&&m(y[N])}}}})(l.p[0]),e(l.p))},K:function(l){return l.i===4?r(l):i(l)}})}var Hg,lo,Lf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",FS=typeof Map<"u",DS=typeof Set<"u",Wg=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Wv=Lf?Symbol.for("immer-nothing"):((Hg={})["immer-nothing"]=!0,Hg),Kg=Lf?Symbol.for("immer-draftable"):"__$immer_draftable",yt=Lf?Symbol.for("immer-state"):"__$immer_state",$S=""+Object.prototype.constructor,$i=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Kv=Object.getOwnPropertyDescriptors||function(t){var e={};return $i(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Jd={},uo={get:function(t,e){if(e===yt)return t;var r=Js(t);if(!Di(r,e))return(function(a,l,d){var f,m=Bg(l,d);return m?"value"in m?m.value:(f=m.get)===null||f===void 0?void 0:f.call(a.k):void 0})(t,r,e);var i=r[e];return t.I||!Zr(i)?i:i===hd(t.t,e)?(pd(t),t.o[e]=Gd(t.A.h,i,t)):i},has:function(t,e){return e in Js(t)},ownKeys:function(t){return Reflect.ownKeys(Js(t))},set:function(t,e,r){var i=Bg(Js(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var a=hd(Js(t),e),l=a?.[yt];if(l&&l.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Hv(r,a)&&(r!==void 0||Di(t.t,e)))return!0;pd(t),Ss(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return hd(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,pd(t),Ss(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Js(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){ur(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ur(12)}},Wa={};si(uo,(function(t,e){Wa[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Wa.deleteProperty=function(t,e){return Wa.set.call(this,t,e,void 0)},Wa.set=function(t,e,r){return uo.set.call(this,t[0],e,r,t[0])};var zS=(function(){function t(r){var i=this;this.O=Wg,this.D=!0,this.produce=function(a,l,d){if(typeof a=="function"&&typeof l!="function"){var f=l;l=a;var m=i;return function(_){var b=this;_===void 0&&(_=f);for(var P=arguments.length,N=Array(P>1?P-1:0),F=1;F<P;F++)N[F-1]=arguments[F];return m.produce(_,(function(L){var k;return(k=l).call.apply(k,[b,L].concat(N))}))}}var p;if(typeof l!="function"&&ur(6),d!==void 0&&typeof d!="function"&&ur(7),Zr(a)){var v=Ug(i),w=Gd(i,a,void 0),y=!0;try{p=l(w),y=!1}finally{y?Wl(v):Zd(v)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(_){return dd(v,d),fd(_,v)}),(function(_){throw Wl(v),_})):(dd(v,d),fd(p,v))}if(!a||typeof a!="object"){if((p=l(a))===void 0&&(p=a),p===Wv&&(p=void 0),i.D&&Rf(p,!0),d){var x=[],S=[];Er("Patches").M(a,p,x,S),d(x,S)}return p}ur(21,a)},this.produceWithPatches=function(a,l){if(typeof a=="function")return function(p){for(var v=arguments.length,w=Array(v>1?v-1:0),y=1;y<v;y++)w[y-1]=arguments[y];return i.produceWithPatches(p,(function(x){return a.apply(void 0,[x].concat(w))}))};var d,f,m=i.produce(a,l,(function(p,v){d=p,f=v}));return typeof Promise<"u"&&m instanceof Promise?m.then((function(p){return[p,d,f]})):[m,d,f]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Zr(r)||ur(8),Ls(r)&&(r=IS(r));var i=Ug(this),a=Gd(this,r,void 0);return a[yt].C=!0,Zd(i),a},e.finishDraft=function(r,i){var a=r&&r[yt],l=a.A;return dd(l,i),fd(void 0,l)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Wg&&ur(20),this.O=r},e.applyPatches=function(r,i){var a;for(a=i.length-1;a>=0;a--){var l=i[a];if(l.path.length===0&&l.op==="replace"){r=l.value;break}}a>-1&&(i=i.slice(a+1));var d=Er("Patches").$;return Ls(r)?d(r,i):this.produce(r,(function(f){return d(f,i)}))},t})(),Dn=new zS,Qv=Dn.produce;Dn.produceWithPatches.bind(Dn);Dn.setAutoFreeze.bind(Dn);Dn.setUseProxies.bind(Dn);Dn.applyPatches.bind(Dn);Dn.createDraft.bind(Dn);Dn.finishDraft.bind(Dn);function US(t,e,r){return(e=jv(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,i)}return r}function Zg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qg(Object(r),!0).forEach(function(i){US(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qg(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Yt(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Gg=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),md=function(){return Math.random().toString(36).substring(7).split("").join(".")},Zl={INIT:"@@redux/INIT"+md(),REPLACE:"@@redux/REPLACE"+md(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+md()}};function VS(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Zv(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Yt(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Yt(1));return r(Zv)(t,e)}if(typeof t!="function")throw new Error(Yt(2));var a=t,l=e,d=[],f=d,m=!1;function p(){f===d&&(f=d.slice())}function v(){if(m)throw new Error(Yt(3));return l}function w(_){if(typeof _!="function")throw new Error(Yt(4));if(m)throw new Error(Yt(5));var b=!0;return p(),f.push(_),function(){if(b){if(m)throw new Error(Yt(6));b=!1,p();var N=f.indexOf(_);f.splice(N,1),d=null}}}function y(_){if(!VS(_))throw new Error(Yt(7));if(typeof _.type>"u")throw new Error(Yt(8));if(m)throw new Error(Yt(9));try{m=!0,l=a(l,_)}finally{m=!1}for(var b=d=f,P=0;P<b.length;P++){var N=b[P];N()}return _}function x(_){if(typeof _!="function")throw new Error(Yt(10));a=_,y({type:Zl.REPLACE})}function S(){var _,b=w;return _={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Yt(11));function F(){N.next&&N.next(v())}F();var L=b(F);return{unsubscribe:L}}},_[Gg]=function(){return this},_}return y({type:Zl.INIT}),i={dispatch:y,subscribe:w,getState:v,replaceReducer:x},i[Gg]=S,i}function BS(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:Zl.INIT});if(typeof i>"u")throw new Error(Yt(12));if(typeof r(void 0,{type:Zl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Yt(13))})}function qS(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var a=e[i];typeof t[a]=="function"&&(r[a]=t[a])}var l=Object.keys(r),d;try{BS(r)}catch(f){d=f}return function(m,p){if(m===void 0&&(m={}),d)throw d;for(var v=!1,w={},y=0;y<l.length;y++){var x=l[y],S=r[x],_=m[x],b=S(_,p);if(typeof b>"u")throw p&&p.type,new Error(Yt(14));w[x]=b,v=v||b!==_}return v=v||l.length!==Object.keys(m).length,v?w:m}}function Gl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,a){return function(){return i(a.apply(void 0,arguments))}})}function HS(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var a=i.apply(void 0,arguments),l=function(){throw new Error(Yt(15))},d={getState:a.getState,dispatch:function(){return l.apply(void 0,arguments)}},f=e.map(function(m){return m(d)});return l=Gl.apply(void 0,f)(a.dispatch),Zg(Zg({},a),{},{dispatch:l})}}}function Gv(t){var e=function(i){var a=i.dispatch,l=i.getState;return function(d){return function(f){return typeof f=="function"?f(a,l,t):d(f)}}};return e}var Yd=Gv();Yd.withExtraArgument=Gv;var Jv=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(i[l]=a[l])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),WS=function(t,e){var r={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},i,a,l,d;return d={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function f(p){return function(v){return m([p,v])}}function m(p){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,a&&(l=p[0]&2?a.return:p[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,p[1])).done)return l;switch(a=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(l=r.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]<l[3])){r.label=p[1];break}if(p[0]===6&&r.label<l[1]){r.label=l[1],l=p;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(p);break}l[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(v){p=[6,v],a=0}finally{i=l=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Bi=function(t,e){for(var r=0,i=e.length,a=t.length;r<i;r++,a++)t[a]=e[r];return t},KS=Object.defineProperty,QS=Object.defineProperties,ZS=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,GS=Object.prototype.hasOwnProperty,JS=Object.prototype.propertyIsEnumerable,Yg=function(t,e,r){return e in t?KS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Es=function(t,e){for(var r in e||(e={}))GS.call(e,r)&&Yg(t,r,e[r]);if(Jg)for(var i=0,a=Jg(e);i<a.length;i++){var r=a[i];JS.call(e,r)&&Yg(t,r,e[r])}return t},gd=function(t,e){return QS(t,ZS(e))},YS=function(t,e,r){return new Promise(function(i,a){var l=function(m){try{f(r.next(m))}catch(p){a(p)}},d=function(m){try{f(r.throw(m))}catch(p){a(p)}},f=function(m){return m.done?i(m.value):Promise.resolve(m.value).then(l,d)};f((r=r.apply(t,e)).next())})},XS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gl:Gl.apply(null,arguments)};function ek(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Ps(t,e){function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(e){var l=e.apply(void 0,i);if(!l)throw new Error("prepareAction did not return an object");return Es(Es({type:t,payload:l.payload},"meta"in l&&{meta:l.meta}),"error"in l&&{error:l.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}var tk=(function(t){Jv(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Bi([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bi([void 0],r.concat(this))))},e})(Array),nk=(function(t){Jv(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Bi([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bi([void 0],r.concat(this))))},e})(Array);function Xd(t){return Zr(t)?Qv(t,function(){}):t}function rk(t){return typeof t=="boolean"}function sk(){return function(e){return ik(e)}}function ik(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e;t.immutableCheck,t.serializableCheck,t.actionCreatorCheck;var i=new tk;return r&&(rk(r)?i.push(Yd):i.push(Yd.withExtraArgument(r.extraArgument))),i}function ak(t){var e=sk(),r=t||{},i=r.reducer,a=i===void 0?void 0:i,l=r.middleware,d=l===void 0?e():l,f=r.devTools,m=f===void 0?!0:f,p=r.preloadedState,v=p===void 0?void 0:p,w=r.enhancers,y=w===void 0?void 0:w,x;if(typeof a=="function")x=a;else if(ek(a))x=qS(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=d;typeof S=="function"&&(S=S(e));var _=HS.apply(void 0,S),b=Gl;m&&(b=XS(Es({trace:!1},typeof m=="object"&&m)));var P=new nk(_),N=P;Array.isArray(y)?N=Bi([_],y):typeof y=="function"&&(N=y(P));var F=b.apply(void 0,N);return Zv(x,v,F)}function Yv(t){var e={},r=[],i,a={addCase:function(l,d){var f=typeof l=="string"?l:l.type;if(!f)throw new Error("`builder.addCase` cannot be called with an empty action type");if(f in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[f]=d,a},addMatcher:function(l,d){return r.push({matcher:l,reducer:d}),a},addDefaultCase:function(l){return i=l,a}};return t(a),[e,r,i]}function ok(t){return typeof t=="function"}function lk(t,e,r,i){r===void 0&&(r=[]);var a=typeof e=="function"?Yv(e):[e,r,i],l=a[0],d=a[1],f=a[2],m;if(ok(t))m=function(){return Xd(t())};else{var p=Xd(t);m=function(){return p}}function v(w,y){w===void 0&&(w=m());var x=Bi([l[y.type]],d.filter(function(S){var _=S.matcher;return _(y)}).map(function(S){var _=S.reducer;return _}));return x.filter(function(S){return!!S}).length===0&&(x=[f]),x.reduce(function(S,_){if(_)if(Ls(S)){var b=S,P=_(b,y);return P===void 0?S:P}else{if(Zr(S))return Qv(S,function(N){return _(N,y)});var P=_(S,y);if(P===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return S},w)}return v.getInitialState=m,v}function uk(t,e){return t+"/"+e}function Af(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var r=typeof t.initialState=="function"?t.initialState:Xd(t.initialState),i=t.reducers||{},a=Object.keys(i),l={},d={},f={};a.forEach(function(v){var w=i[v],y=uk(e,v),x,S;"reducer"in w?(x=w.reducer,S=w.prepare):x=w,l[v]=x,d[y]=x,f[v]=S?Ps(y,S):Ps(y)});function m(){var v=typeof t.extraReducers=="function"?Yv(t.extraReducers):[t.extraReducers],w=v[0],y=w===void 0?{}:w,x=v[1],S=x===void 0?[]:x,_=v[2],b=_===void 0?void 0:_,P=Es(Es({},y),d);return lk(r,function(N){for(var F in P)N.addCase(F,P[F]);for(var L=0,k=S;L<k.length;L++){var I=k[L];N.addMatcher(I.matcher,I.reducer)}b&&N.addDefaultCase(b)})}var p;return{name:e,reducer:function(v,w){return p||(p=m()),p(v,w)},actions:f,caseReducers:l,getInitialState:function(){return p||(p=m()),p.getInitialState()}}}var ck="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dk=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=ck[Math.random()*64|0];return e},fk=["name","message","stack","code"],yd=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Xg=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),hk=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=fk;r<i.length;r++){var a=i[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}};(function(){function t(e,r,i){var a=Ps(e+"/fulfilled",function(p,v,w,y){return{payload:p,meta:gd(Es({},y||{}),{arg:w,requestId:v,requestStatus:"fulfilled"})}}),l=Ps(e+"/pending",function(p,v,w){return{payload:void 0,meta:gd(Es({},w||{}),{arg:v,requestId:p,requestStatus:"pending"})}}),d=Ps(e+"/rejected",function(p,v,w,y,x){return{payload:y,error:(i&&i.serializeError||hk)(p||"Rejected"),meta:gd(Es({},x||{}),{arg:w,requestId:v,rejectedWithValue:!!y,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),f=typeof AbortController<"u"?AbortController:(function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p})();function m(p){return function(v,w,y){var x=i?.idGenerator?i.idGenerator(p):dk(),S=new f,_;function b(N){_=N,S.abort()}var P=(function(){return YS(this,null,function(){var N,F,L,k,I,X,re;return WS(this,function(de){switch(de.label){case 0:return de.trys.push([0,4,,5]),k=(N=i?.condition)==null?void 0:N.call(i,p,{getState:w,extra:y}),mk(k)?[4,k]:[3,2];case 1:k=de.sent(),de.label=2;case 2:if(k===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=new Promise(function(Z,Oe){return S.signal.addEventListener("abort",function(){return Oe({name:"AbortError",message:_||"Aborted"})})}),v(l(x,p,(F=i?.getPendingMeta)==null?void 0:F.call(i,{requestId:x,arg:p},{getState:w,extra:y}))),[4,Promise.race([I,Promise.resolve(r(p,{dispatch:v,getState:w,extra:y,requestId:x,signal:S.signal,abort:b,rejectWithValue:function(Z,Oe){return new yd(Z,Oe)},fulfillWithValue:function(Z,Oe){return new Xg(Z,Oe)}})).then(function(Z){if(Z instanceof yd)throw Z;return Z instanceof Xg?a(Z.payload,x,p,Z.meta):a(Z,x,p)})])];case 3:return L=de.sent(),[3,5];case 4:return X=de.sent(),L=X instanceof yd?d(null,x,p,X.payload,X.meta):d(X,x,p),[3,5];case 5:return re=i&&!i.dispatchConditionRejection&&d.match(L)&&L.meta.condition,re||v(L),[2,L]}})})})();return Object.assign(P,{abort:b,requestId:x,arg:p,unwrap:function(){return P.then(pk)}})}}return Object.assign(m,{pending:l,rejected:d,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function pk(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function mk(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var If="listenerMiddleware";Ps(If+"/add");Ps(If+"/removeAll");Ps(If+"/remove");var ey;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);MS();const gk={sidebarOpen:!0,currentStep:0,selectedProjectId:null,isLoading:!1,notification:{type:null,message:""}},Xv=Af({name:"ui",initialState:gk,reducers:{toggleSidebar:t=>{t.sidebarOpen=!t.sidebarOpen},setCurrentStep:(t,e)=>{t.currentStep=e.payload},setSelectedProject:(t,e)=>{t.selectedProjectId=e.payload},setLoading:(t,e)=>{t.isLoading=e.payload},showNotification:(t,e)=>{t.notification=e.payload},clearNotification:t=>{t.notification={type:null,message:""}}}}),{toggleSidebar:yk}=Xv.actions,vk=Xv.reducer;function ex(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=ex(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}function tx(){for(var t,e,r=0,i="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=ex(t))&&(i&&(i+=" "),i+=e);return i}const Mf="-",xk=t=>{const e=bk(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:d=>{const f=d.split(Mf);return f[0]===""&&f.length!==1&&f.shift(),nx(f,e)||wk(d)},getConflictingClassGroupIds:(d,f)=>{const m=r[d]||[];return f&&i[d]?[...m,...i[d]]:m}}},nx=(t,e)=>{if(t.length===0)return e.classGroupId;const r=t[0],i=e.nextPart.get(r),a=i?nx(t.slice(1),i):void 0;if(a)return a;if(e.validators.length===0)return;const l=t.join(Mf);return e.validators.find(({validator:d})=>d(l))?.classGroupId},ty=/^\[(.+)\]$/,wk=t=>{if(ty.test(t)){const e=ty.exec(t)[1],r=e?.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},bk=t=>{const{theme:e,prefix:r}=t,i={nextPart:new Map,validators:[]};return _k(Object.entries(t.classGroups),r).forEach(([l,d])=>{ef(d,i,l,e)}),i},ef=(t,e,r,i)=>{t.forEach(a=>{if(typeof a=="string"){const l=a===""?e:ny(e,a);l.classGroupId=r;return}if(typeof a=="function"){if(jk(a)){ef(a(i),e,r,i);return}e.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([l,d])=>{ef(d,ny(e,l),r,i)})})},ny=(t,e)=>{let r=t;return e.split(Mf).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r},jk=t=>t.isThemeGetter,_k=(t,e)=>e?t.map(([r,i])=>{const a=i.map(l=>typeof l=="string"?e+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([d,f])=>[e+d,f])):l);return[r,a]}):t,Sk=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,i=new Map;const a=(l,d)=>{r.set(l,d),e++,e>t&&(e=0,i=r,r=new Map)};return{get(l){let d=r.get(l);if(d!==void 0)return d;if((d=i.get(l))!==void 0)return a(l,d),d},set(l,d){r.has(l)?r.set(l,d):a(l,d)}}},rx="!",kk=t=>{const{separator:e,experimentalParseClassName:r}=t,i=e.length===1,a=e[0],l=e.length,d=f=>{const m=[];let p=0,v=0,w;for(let b=0;b<f.length;b++){let P=f[b];if(p===0){if(P===a&&(i||f.slice(b,b+l)===e)){m.push(f.slice(v,b)),v=b+l;continue}if(P==="/"){w=b;continue}}P==="["?p++:P==="]"&&p--}const y=m.length===0?f:f.substring(v),x=y.startsWith(rx),S=x?y.substring(1):y,_=w&&w>v?w-v:void 0;return{modifiers:m,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:_}};return r?f=>r({className:f,parseClassName:d}):d},Nk=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(i=>{i[0]==="["?(e.push(...r.sort(),i),r=[]):r.push(i)}),e.push(...r.sort()),e},Ck=t=>({cache:Sk(t.cacheSize),parseClassName:kk(t),...xk(t)}),Ek=/\s+/,Pk=(t,e)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:a}=e,l=[],d=t.trim().split(Ek);let f="";for(let m=d.length-1;m>=0;m-=1){const p=d[m],{modifiers:v,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:x}=r(p);let S=!!x,_=i(S?y.substring(0,x):y);if(!_){if(!S){f=p+(f.length>0?" "+f:f);continue}if(_=i(y),!_){f=p+(f.length>0?" "+f:f);continue}S=!1}const b=Nk(v).join(":"),P=w?b+rx:b,N=P+_;if(l.includes(N))continue;l.push(N);const F=a(_,S);for(let L=0;L<F.length;++L){const k=F[L];l.push(P+k)}f=p+(f.length>0?" "+f:f)}return f};function Ok(){let t=0,e,r,i="";for(;t<arguments.length;)(e=arguments[t++])&&(r=sx(e))&&(i&&(i+=" "),i+=r);return i}const sx=t=>{if(typeof t=="string")return t;let e,r="";for(let i=0;i<t.length;i++)t[i]&&(e=sx(t[i]))&&(r&&(r+=" "),r+=e);return r};function Rk(t,...e){let r,i,a,l=d;function d(m){const p=e.reduce((v,w)=>w(v),t());return r=Ck(p),i=r.cache.get,a=r.cache.set,l=f,f(m)}function f(m){const p=i(m);if(p)return p;const v=Pk(m,r);return a(m,v),v}return function(){return l(Ok.apply(null,arguments))}}const mt=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},ix=/^\[(?:([a-z-]+):)?(.+)\]$/i,Tk=/^\d+\/\d+$/,Lk=new Set(["px","full","screen"]),Ak=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ik=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Mk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=t=>zi(t)||Lk.has(t)||Tk.test(t),ws=t=>na(t,"length",Wk),zi=t=>!!t&&!Number.isNaN(Number(t)),vd=t=>na(t,"number",zi),Ua=t=>!!t&&Number.isInteger(Number(t)),$k=t=>t.endsWith("%")&&zi(t.slice(0,-1)),He=t=>ix.test(t),bs=t=>Ak.test(t),zk=new Set(["length","size","percentage"]),Uk=t=>na(t,zk,ax),Vk=t=>na(t,"position",ax),Bk=new Set(["image","url"]),qk=t=>na(t,Bk,Qk),Hk=t=>na(t,"",Kk),Va=()=>!0,na=(t,e,r)=>{const i=ix.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):r(i[2]):!1},Wk=t=>Ik.test(t)&&!Mk.test(t),ax=()=>!1,Kk=t=>Fk.test(t),Qk=t=>Dk.test(t),Zk=()=>{const t=mt("colors"),e=mt("spacing"),r=mt("blur"),i=mt("brightness"),a=mt("borderColor"),l=mt("borderRadius"),d=mt("borderSpacing"),f=mt("borderWidth"),m=mt("contrast"),p=mt("grayscale"),v=mt("hueRotate"),w=mt("invert"),y=mt("gap"),x=mt("gradientColorStops"),S=mt("gradientColorStopPositions"),_=mt("inset"),b=mt("margin"),P=mt("opacity"),N=mt("padding"),F=mt("saturate"),L=mt("scale"),k=mt("sepia"),I=mt("skew"),X=mt("space"),re=mt("translate"),de=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],Oe=()=>["auto",He,e],J=()=>[He,e],ve=()=>["",Wr,ws],me=()=>["auto",zi,He],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",He],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[zi,He];return{cacheSize:500,separator:":",theme:{colors:[Va],spacing:[Wr,ws],blur:["none","",bs,He],brightness:T(),borderColor:[t],borderRadius:["none","","full",bs,He],borderSpacing:J(),borderWidth:ve(),contrast:T(),grayscale:W(),hueRotate:T(),invert:W(),gap:J(),gradientColorStops:[t],gradientColorStopPositions:[$k,ws],inset:Oe(),margin:Oe(),opacity:T(),padding:J(),saturate:T(),scale:T(),sepia:W(),skew:T(),space:J(),translate:J()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[bs]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),He]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ua,He]}],basis:[{basis:Oe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",Ua,He]}],"grid-cols":[{"grid-cols":[Va]}],"col-start-end":[{col:["auto",{span:["full",Ua,He]},He]}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":[Va]}],"row-start-end":[{row:["auto",{span:[Ua,He]},He]}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,e]}],"min-w":[{"min-w":[He,e,"min","max","fit"]}],"max-w":[{"max-w":[He,e,"none","full","min","max","fit","prose",{screen:[bs]},bs]}],h:[{h:[He,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,e,"auto","min","max","fit"]}],"font-size":[{text:["base",bs,ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vd]}],"font-family":[{font:[Va]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",zi,vd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wr,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wr,ws]}],"underline-offset":[{"underline-offset":["auto",Wr,He]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),Vk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Uk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qk]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:R()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[Wr,He]}],"outline-w":[{outline:[Wr,ws]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[Wr,ws]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",bs,Hk]}],"shadow-color":[{shadow:[Va]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",bs,He]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[w]}],saturate:[{saturate:[F]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[F]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ua,He]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Wr,ws,vd]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Gk=Rk(Zk);function _t(...t){return Gk(tx(t))}const ry=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,sy=tx,ox=(t,e)=>r=>{var i;if(e?.variants==null)return sy(t,r?.class,r?.className);const{variants:a,defaultVariants:l}=e,d=Object.keys(a).map(p=>{const v=r?.[p],w=l?.[p];if(v===null)return null;const y=ry(v)||ry(w);return a[p][y]}),f=r&&Object.entries(r).reduce((p,v)=>{let[w,y]=v;return y===void 0||(p[w]=y),p},{}),m=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((p,v)=>{let{class:w,className:y,...x}=v;return Object.entries(x).every(S=>{let[_,b]=S;return Array.isArray(b)?b.includes({...l,...f}[_]):{...l,...f}[_]===b})?[...p,w,y]:p},[]);return sy(t,d,m,r?.class,r?.className)},lx=ox("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ee=$.forwardRef(({className:t,variant:e,size:r,...i},a)=>u.jsx("button",{ref:a,className:_t(lx({variant:e,size:r}),t),...i}));Ee.displayName="Button";var st;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const l={};for(const d of a)l[d]=d;return l},t.getValidEnumValues=a=>{const l=t.objectKeys(a).filter(f=>typeof a[a[f]]!="number"),d={};for(const f of l)d[f]=a[f];return t.objectValues(d)},t.objectValues=a=>t.objectKeys(a).map(function(l){return a[l]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const l=[];for(const d in a)Object.prototype.hasOwnProperty.call(a,d)&&l.push(d);return l},t.find=(a,l)=>{for(const d of a)if(l(d))return d},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function i(a,l=" | "){return a.map(d=>typeof d=="string"?`'${d}'`:d).join(l)}t.joinValues=i,t.jsonStringifyReplacer=(a,l)=>typeof l=="bigint"?l.toString():l})(st||(st={}));var iy;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(iy||(iy={}));const je=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_s=t=>{switch(typeof t){case"undefined":return je.undefined;case"string":return je.string;case"number":return Number.isNaN(t)?je.nan:je.number;case"boolean":return je.boolean;case"function":return je.function;case"bigint":return je.bigint;case"symbol":return je.symbol;case"object":return Array.isArray(t)?je.array:t===null?je.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?je.promise:typeof Map<"u"&&t instanceof Map?je.map:typeof Set<"u"&&t instanceof Set?je.set:typeof Date<"u"&&t instanceof Date?je.date:je.object;default:return je.unknown}},ie=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Gr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(l){return l.message},i={_errors:[]},a=l=>{for(const d of l.issues)if(d.code==="invalid_union")d.unionErrors.map(a);else if(d.code==="invalid_return_type")a(d.returnTypeError);else if(d.code==="invalid_arguments")a(d.argumentsError);else if(d.path.length===0)i._errors.push(r(d));else{let f=i,m=0;for(;m<d.path.length;){const p=d.path[m];m===d.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(r(d))):f[p]=f[p]||{_errors:[]},f=f[p],m++}}};return a(this),i}static assert(e){if(!(e instanceof Gr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},i=[];for(const a of this.issues)if(a.path.length>0){const l=a.path[0];r[l]=r[l]||[],r[l].push(e(a))}else i.push(e(a));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}}Gr.create=t=>new Gr(t);const tf=(t,e)=>{let r;switch(t.code){case ie.invalid_type:t.received===je.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,st.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${st.joinValues(t.keys,", ")}`;break;case ie.invalid_union:r="Invalid input";break;case ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${st.joinValues(t.options)}`;break;case ie.invalid_enum_value:r=`Invalid enum value. Expected ${st.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:r="Invalid function arguments";break;case ie.invalid_return_type:r="Invalid function return type";break;case ie.invalid_date:r="Invalid date";break;case ie.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:st.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ie.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ie.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ie.custom:r="Invalid input";break;case ie.invalid_intersection_types:r="Intersection results could not be merged";break;case ie.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:r="Number must be finite";break;default:r=e.defaultError,st.assertNever(t)}return{message:r}};let Jk=tf;function Yk(){return Jk}const Xk=t=>{const{data:e,path:r,errorMaps:i,issueData:a}=t,l=[...r,...a.path||[]],d={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let f="";const m=i.filter(p=>!!p).slice().reverse();for(const p of m)f=p(d,{data:e,defaultError:f}).message;return{...a,path:l,message:f}};function fe(t,e){const r=Yk(),i=Xk({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===tf?void 0:tf].filter(a=>!!a)});t.common.issues.push(i)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const i=[];for(const a of r){if(a.status==="aborted")return ze;a.status==="dirty"&&e.dirty(),i.push(a.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){const i=[];for(const a of r){const l=await a.key,d=await a.value;i.push({key:l,value:d})}return hn.mergeObjectSync(e,i)}static mergeObjectSync(e,r){const i={};for(const a of r){const{key:l,value:d}=a;if(l.status==="aborted"||d.status==="aborted")return ze;l.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof d.value<"u"||a.alwaysSet)&&(i[l.value]=d.value)}return{status:e.value,value:i}}}const ze=Object.freeze({status:"aborted"}),Ka=t=>({status:"dirty",value:t}),Gn=t=>({status:"valid",value:t}),ay=t=>t.status==="aborted",oy=t=>t.status==="dirty",qi=t=>t.status==="valid",Jl=t=>typeof Promise<"u"&&t instanceof Promise;var ke;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ke||(ke={}));class Or{constructor(e,r,i,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ly=(t,e)=>{if(qi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Gr(t.common.issues);return this._error=r,this._error}}};function Ke(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:i,description:a}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(d,f)=>{const{message:m}=t;return d.code==="invalid_enum_value"?{message:m??f.defaultError}:typeof f.data>"u"?{message:m??i??f.defaultError}:d.code!=="invalid_type"?{message:f.defaultError}:{message:m??r??f.defaultError}},description:a}}class Je{get description(){return this._def.description}_getType(e){return _s(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:_s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new hn,ctx:{common:e.parent.common,data:e.data,parsedType:_s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Jl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){const i={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_s(e)},a=this._parseSync({data:e,path:i.path,parent:i});return ly(i,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_s(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:r});return qi(i)?{value:i.value}:{issues:r.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(i=>qi(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(e,r){const i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){const i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_s(e)},a=this._parse({data:e,path:i.path,parent:i}),l=await(Jl(a)?a:Promise.resolve(a));return ly(i,l)}refine(e,r){const i=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,l)=>{const d=e(a),f=()=>l.addIssue({code:ie.custom,...i(a)});return typeof Promise<"u"&&d instanceof Promise?d.then(m=>m?!0:(f(),!1)):d?!0:(f(),!1)})}refinement(e,r){return this._refinement((i,a)=>e(i)?!0:(a.addIssue(typeof r=="function"?r(i,a):r),!1))}_refinement(e){return new Ki({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Os.create(this,this._def)}nullable(){return Qi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pr.create(this)}promise(){return nu.create(this,this._def)}or(e){return Xl.create([this,e],this._def)}and(e){return eu.create(this,e,this._def)}transform(e){return new Ki({...Ke(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new lf({...Ke(this._def),innerType:this,defaultValue:r,typeName:De.ZodDefault})}brand(){return new jN({typeName:De.ZodBranded,type:this,...Ke(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new uf({...Ke(this._def),innerType:this,catchValue:r,typeName:De.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ff.create(this,e)}readonly(){return cf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const eN=/^c[^\s-]{8,}$/i,tN=/^[0-9a-z]+$/,nN=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rN=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,sN=/^[a-z0-9_-]{21}$/i,iN=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,aN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,oN=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xd;const uN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,dN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,fN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ux="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",mN=new RegExp(`^${ux}$`);function cx(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function gN(t){return new RegExp(`^${cx(t)}$`)}function yN(t){let e=`${ux}T${cx(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function vN(t,e){return!!((e==="v4"||!e)&&uN.test(t)||(e==="v6"||!e)&&dN.test(t))}function xN(t,e){if(!iN.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(i));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function wN(t,e){return!!((e==="v4"||!e)&&cN.test(t)||(e==="v6"||!e)&&fN.test(t))}class Kr extends Je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==je.string){const l=this._getOrReturnCtx(e);return fe(l,{code:ie.invalid_type,expected:je.string,received:l.parsedType}),ze}const i=new hn;let a;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")e.data.length>l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const d=e.data.length>l.value,f=e.data.length<l.value;(d||f)&&(a=this._getOrReturnCtx(e,a),d?fe(a,{code:ie.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):f&&fe(a,{code:ie.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")oN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"email",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")xd||(xd=new RegExp(lN,"u")),xd.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"emoji",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")rN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"uuid",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")sN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"nanoid",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")eN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cuid",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")tN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cuid2",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")nN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"ulid",code:ie.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),fe(a,{validation:"url",code:ie.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"regex",code:ie.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?yN(l).test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?mN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?gN(l).test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?aN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"duration",code:ie.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?vN(e.data,l.version)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"ip",code:ie.invalid_string,message:l.message}),i.dirty()):l.kind==="jwt"?xN(e.data,l.alg)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"jwt",code:ie.invalid_string,message:l.message}),i.dirty()):l.kind==="cidr"?wN(e.data,l.version)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"cidr",code:ie.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?hN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"base64",code:ie.invalid_string,message:l.message}),i.dirty()):l.kind==="base64url"?pN.test(e.data)||(a=this._getOrReturnCtx(e,a),fe(a,{validation:"base64url",code:ie.invalid_string,message:l.message}),i.dirty()):st.assertNever(l);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(a=>e.test(a),{validation:r,code:ie.invalid_string,...ke.errToObj(i)})}_addCheck(e){return new Kr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ke.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ke.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ke.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ke.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ke.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ke.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ke.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ke.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ke.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ke.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ke.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ke.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ke.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ke.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ke.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ke.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ke.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ke.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ke.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ke.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ke.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ke.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ke.errToObj(r)})}nonempty(e){return this.min(1,ke.errToObj(e))}trim(){return new Kr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Kr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Kr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Kr.create=t=>new Kr({checks:[],typeName:De.ZodString,coerce:t?.coerce??!1,...Ke(t)});function bN(t,e){const r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,a=r>i?r:i,l=Number.parseInt(t.toFixed(a).replace(".","")),d=Number.parseInt(e.toFixed(a).replace(".",""));return l%d/10**a}class Hi extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==je.number){const l=this._getOrReturnCtx(e);return fe(l,{code:ie.invalid_type,expected:je.number,received:l.parsedType}),ze}let i;const a=new hn;for(const l of this._def.checks)l.kind==="int"?st.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.invalid_type,expected:"integer",received:"float",message:l.message}),a.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="multipleOf"?bN(e.data,l.value)!==0&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.not_finite,message:l.message}),a.dirty()):st.assertNever(l);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ke.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ke.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ke.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ke.toString(r))}setLimit(e,r,i,a){return new Hi({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:ke.toString(a)}]})}_addCheck(e){return new Hi({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ke.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ke.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&st.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Hi.create=t=>new Hi({checks:[],typeName:De.ZodNumber,coerce:t?.coerce||!1,...Ke(t)});class co extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==je.bigint)return this._getInvalidInput(e);let i;const a=new hn;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),fe(i,{code:ie.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):st.assertNever(l);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return fe(r,{code:ie.invalid_type,expected:je.bigint,received:r.parsedType}),ze}gte(e,r){return this.setLimit("min",e,!0,ke.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ke.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ke.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ke.toString(r))}setLimit(e,r,i,a){return new co({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:ke.toString(a)}]})}_addCheck(e){return new co({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}co.create=t=>new co({checks:[],typeName:De.ZodBigInt,coerce:t?.coerce??!1,...Ke(t)});class nf extends Je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==je.boolean){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.boolean,received:i.parsedType}),ze}return Gn(e.data)}}nf.create=t=>new nf({typeName:De.ZodBoolean,coerce:t?.coerce||!1,...Ke(t)});class Yl extends Je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==je.date){const l=this._getOrReturnCtx(e);return fe(l,{code:ie.invalid_type,expected:je.date,received:l.parsedType}),ze}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return fe(l,{code:ie.invalid_date}),ze}const i=new hn;let a;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(a=this._getOrReturnCtx(e,a),fe(a,{code:ie.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):st.assertNever(l);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Yl({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ke.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ke.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Yl.create=t=>new Yl({checks:[],coerce:t?.coerce||!1,typeName:De.ZodDate,...Ke(t)});class uy extends Je{_parse(e){if(this._getType(e)!==je.symbol){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.symbol,received:i.parsedType}),ze}return Gn(e.data)}}uy.create=t=>new uy({typeName:De.ZodSymbol,...Ke(t)});class cy extends Je{_parse(e){if(this._getType(e)!==je.undefined){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.undefined,received:i.parsedType}),ze}return Gn(e.data)}}cy.create=t=>new cy({typeName:De.ZodUndefined,...Ke(t)});class rf extends Je{_parse(e){if(this._getType(e)!==je.null){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.null,received:i.parsedType}),ze}return Gn(e.data)}}rf.create=t=>new rf({typeName:De.ZodNull,...Ke(t)});class dy extends Je{constructor(){super(...arguments),this._any=!0}_parse(e){return Gn(e.data)}}dy.create=t=>new dy({typeName:De.ZodAny,...Ke(t)});class sf extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Gn(e.data)}}sf.create=t=>new sf({typeName:De.ZodUnknown,...Ke(t)});class As extends Je{_parse(e){const r=this._getOrReturnCtx(e);return fe(r,{code:ie.invalid_type,expected:je.never,received:r.parsedType}),ze}}As.create=t=>new As({typeName:De.ZodNever,...Ke(t)});class fy extends Je{_parse(e){if(this._getType(e)!==je.undefined){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.void,received:i.parsedType}),ze}return Gn(e.data)}}fy.create=t=>new fy({typeName:De.ZodVoid,...Ke(t)});class Pr extends Je{_parse(e){const{ctx:r,status:i}=this._processInputParams(e),a=this._def;if(r.parsedType!==je.array)return fe(r,{code:ie.invalid_type,expected:je.array,received:r.parsedType}),ze;if(a.exactLength!==null){const d=r.data.length>a.exactLength.value,f=r.data.length<a.exactLength.value;(d||f)&&(fe(r,{code:d?ie.too_big:ie.too_small,minimum:f?a.exactLength.value:void 0,maximum:d?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),i.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(fe(r,{code:ie.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(fe(r,{code:ie.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((d,f)=>a.type._parseAsync(new Or(r,d,r.path,f)))).then(d=>hn.mergeArray(i,d));const l=[...r.data].map((d,f)=>a.type._parseSync(new Or(r,d,r.path,f)));return hn.mergeArray(i,l)}get element(){return this._def.type}min(e,r){return new Pr({...this._def,minLength:{value:e,message:ke.toString(r)}})}max(e,r){return new Pr({...this._def,maxLength:{value:e,message:ke.toString(r)}})}length(e,r){return new Pr({...this._def,exactLength:{value:e,message:ke.toString(r)}})}nonempty(e){return this.min(1,e)}}Pr.create=(t,e)=>new Pr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...Ke(e)});function Fi(t){if(t instanceof Mt){const e={};for(const r in t.shape){const i=t.shape[r];e[r]=Os.create(Fi(i))}return new Mt({...t._def,shape:()=>e})}else return t instanceof Pr?new Pr({...t._def,type:Fi(t.element)}):t instanceof Os?Os.create(Fi(t.unwrap())):t instanceof Qi?Qi.create(Fi(t.unwrap())):t instanceof ii?ii.create(t.items.map(e=>Fi(e))):t}class Mt extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=st.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==je.object){const p=this._getOrReturnCtx(e);return fe(p,{code:ie.invalid_type,expected:je.object,received:p.parsedType}),ze}const{status:i,ctx:a}=this._processInputParams(e),{shape:l,keys:d}=this._getCached(),f=[];if(!(this._def.catchall instanceof As&&this._def.unknownKeys==="strip"))for(const p in a.data)d.includes(p)||f.push(p);const m=[];for(const p of d){const v=l[p],w=a.data[p];m.push({key:{status:"valid",value:p},value:v._parse(new Or(a,w,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof As){const p=this._def.unknownKeys;if(p==="passthrough")for(const v of f)m.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(p==="strict")f.length>0&&(fe(a,{code:ie.unrecognized_keys,keys:f}),i.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const v of f){const w=a.data[v];m.push({key:{status:"valid",value:v},value:p._parse(new Or(a,w,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const v of m){const w=await v.key,y=await v.value;p.push({key:w,value:y,alwaysSet:v.alwaysSet})}return p}).then(p=>hn.mergeObjectSync(i,p)):hn.mergeObjectSync(i,m)}get shape(){return this._def.shape()}strict(e){return ke.errToObj,new Mt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{const a=this._def.errorMap?.(r,i).message??i.defaultError;return r.code==="unrecognized_keys"?{message:ke.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(e){return new Mt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Mt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:De.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Mt({...this._def,catchall:e})}pick(e){const r={};for(const i of st.objectKeys(e))e[i]&&this.shape[i]&&(r[i]=this.shape[i]);return new Mt({...this._def,shape:()=>r})}omit(e){const r={};for(const i of st.objectKeys(this.shape))e[i]||(r[i]=this.shape[i]);return new Mt({...this._def,shape:()=>r})}deepPartial(){return Fi(this)}partial(e){const r={};for(const i of st.objectKeys(this.shape)){const a=this.shape[i];e&&!e[i]?r[i]=a:r[i]=a.optional()}return new Mt({...this._def,shape:()=>r})}required(e){const r={};for(const i of st.objectKeys(this.shape))if(e&&!e[i])r[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof Os;)l=l._def.innerType;r[i]=l}return new Mt({...this._def,shape:()=>r})}keyof(){return dx(st.objectKeys(this.shape))}}Mt.create=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strip",catchall:As.create(),typeName:De.ZodObject,...Ke(e)});Mt.strictCreate=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strict",catchall:As.create(),typeName:De.ZodObject,...Ke(e)});Mt.lazycreate=(t,e)=>new Mt({shape:t,unknownKeys:"strip",catchall:As.create(),typeName:De.ZodObject,...Ke(e)});class Xl extends Je{_parse(e){const{ctx:r}=this._processInputParams(e),i=this._def.options;function a(l){for(const f of l)if(f.result.status==="valid")return f.result;for(const f of l)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;const d=l.map(f=>new Gr(f.ctx.common.issues));return fe(r,{code:ie.invalid_union,unionErrors:d}),ze}if(r.common.async)return Promise.all(i.map(async l=>{const d={...r,common:{...r.common,issues:[]},parent:null};return{result:await l._parseAsync({data:r.data,path:r.path,parent:d}),ctx:d}})).then(a);{let l;const d=[];for(const m of i){const p={...r,common:{...r.common,issues:[]},parent:null},v=m._parseSync({data:r.data,path:r.path,parent:p});if(v.status==="valid")return v;v.status==="dirty"&&!l&&(l={result:v,ctx:p}),p.common.issues.length&&d.push(p.common.issues)}if(l)return r.common.issues.push(...l.ctx.common.issues),l.result;const f=d.map(m=>new Gr(m));return fe(r,{code:ie.invalid_union,unionErrors:f}),ze}}get options(){return this._def.options}}Xl.create=(t,e)=>new Xl({options:t,typeName:De.ZodUnion,...Ke(e)});function af(t,e){const r=_s(t),i=_s(e);if(t===e)return{valid:!0,data:t};if(r===je.object&&i===je.object){const a=st.objectKeys(e),l=st.objectKeys(t).filter(f=>a.indexOf(f)!==-1),d={...t,...e};for(const f of l){const m=af(t[f],e[f]);if(!m.valid)return{valid:!1};d[f]=m.data}return{valid:!0,data:d}}else if(r===je.array&&i===je.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let l=0;l<t.length;l++){const d=t[l],f=e[l],m=af(d,f);if(!m.valid)return{valid:!1};a.push(m.data)}return{valid:!0,data:a}}else return r===je.date&&i===je.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class eu extends Je{_parse(e){const{status:r,ctx:i}=this._processInputParams(e),a=(l,d)=>{if(ay(l)||ay(d))return ze;const f=af(l.value,d.value);return f.valid?((oy(l)||oy(d))&&r.dirty(),{status:r.value,value:f.data}):(fe(i,{code:ie.invalid_intersection_types}),ze)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,d])=>a(l,d)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}eu.create=(t,e,r)=>new eu({left:t,right:e,typeName:De.ZodIntersection,...Ke(r)});class ii extends Je{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==je.array)return fe(i,{code:ie.invalid_type,expected:je.array,received:i.parsedType}),ze;if(i.data.length<this._def.items.length)return fe(i,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&i.data.length>this._def.items.length&&(fe(i,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const l=[...i.data].map((d,f)=>{const m=this._def.items[f]||this._def.rest;return m?m._parse(new Or(i,d,i.path,f)):null}).filter(d=>!!d);return i.common.async?Promise.all(l).then(d=>hn.mergeArray(r,d)):hn.mergeArray(r,l)}get items(){return this._def.items}rest(e){return new ii({...this._def,rest:e})}}ii.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ii({items:t,typeName:De.ZodTuple,rest:null,...Ke(e)})};class tu extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==je.object)return fe(i,{code:ie.invalid_type,expected:je.object,received:i.parsedType}),ze;const a=[],l=this._def.keyType,d=this._def.valueType;for(const f in i.data)a.push({key:l._parse(new Or(i,f,i.path,f)),value:d._parse(new Or(i,i.data[f],i.path,f)),alwaysSet:f in i.data});return i.common.async?hn.mergeObjectAsync(r,a):hn.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof Je?new tu({keyType:e,valueType:r,typeName:De.ZodRecord,...Ke(i)}):new tu({keyType:Kr.create(),valueType:e,typeName:De.ZodRecord,...Ke(r)})}}class hy extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==je.map)return fe(i,{code:ie.invalid_type,expected:je.map,received:i.parsedType}),ze;const a=this._def.keyType,l=this._def.valueType,d=[...i.data.entries()].map(([f,m],p)=>({key:a._parse(new Or(i,f,i.path,[p,"key"])),value:l._parse(new Or(i,m,i.path,[p,"value"]))}));if(i.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const m of d){const p=await m.key,v=await m.value;if(p.status==="aborted"||v.status==="aborted")return ze;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}})}else{const f=new Map;for(const m of d){const p=m.key,v=m.value;if(p.status==="aborted"||v.status==="aborted")return ze;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}}}}hy.create=(t,e,r)=>new hy({valueType:e,keyType:t,typeName:De.ZodMap,...Ke(r)});class fo extends Je{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==je.set)return fe(i,{code:ie.invalid_type,expected:je.set,received:i.parsedType}),ze;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(fe(i,{code:ie.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(fe(i,{code:ie.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const l=this._def.valueType;function d(m){const p=new Set;for(const v of m){if(v.status==="aborted")return ze;v.status==="dirty"&&r.dirty(),p.add(v.value)}return{status:r.value,value:p}}const f=[...i.data.values()].map((m,p)=>l._parse(new Or(i,m,i.path,p)));return i.common.async?Promise.all(f).then(m=>d(m)):d(f)}min(e,r){return new fo({...this._def,minSize:{value:e,message:ke.toString(r)}})}max(e,r){return new fo({...this._def,maxSize:{value:e,message:ke.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}fo.create=(t,e)=>new fo({valueType:t,minSize:null,maxSize:null,typeName:De.ZodSet,...Ke(e)});class py extends Je{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}py.create=(t,e)=>new py({getter:t,typeName:De.ZodLazy,...Ke(e)});class of extends Je{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return fe(r,{received:r.data,code:ie.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:e.data}}get value(){return this._def.value}}of.create=(t,e)=>new of({value:t,typeName:De.ZodLiteral,...Ke(e)});function dx(t,e){return new Wi({values:t,typeName:De.ZodEnum,...Ke(e)})}class Wi extends Je{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),i=this._def.values;return fe(r,{expected:st.joinValues(i),received:r.parsedType,code:ie.invalid_type}),ze}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),i=this._def.values;return fe(r,{received:r.data,code:ie.invalid_enum_value,options:i}),ze}return Gn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Wi.create(e,{...this._def,...r})}exclude(e,r=this._def){return Wi.create(this.options.filter(i=>!e.includes(i)),{...this._def,...r})}}Wi.create=dx;class my extends Je{_parse(e){const r=st.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==je.string&&i.parsedType!==je.number){const a=st.objectValues(r);return fe(i,{expected:st.joinValues(a),received:i.parsedType,code:ie.invalid_type}),ze}if(this._cache||(this._cache=new Set(st.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=st.objectValues(r);return fe(i,{received:i.data,code:ie.invalid_enum_value,options:a}),ze}return Gn(e.data)}get enum(){return this._def.values}}my.create=(t,e)=>new my({values:t,typeName:De.ZodNativeEnum,...Ke(e)});class nu extends Je{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==je.promise&&r.common.async===!1)return fe(r,{code:ie.invalid_type,expected:je.promise,received:r.parsedType}),ze;const i=r.parsedType===je.promise?r.data:Promise.resolve(r.data);return Gn(i.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}nu.create=(t,e)=>new nu({type:t,typeName:De.ZodPromise,...Ke(e)});class Ki extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:i}=this._processInputParams(e),a=this._def.effect||null,l={addIssue:d=>{fe(i,d),d.fatal?r.abort():r.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),a.type==="preprocess"){const d=a.transform(i.data,l);if(i.common.async)return Promise.resolve(d).then(async f=>{if(r.value==="aborted")return ze;const m=await this._def.schema._parseAsync({data:f,path:i.path,parent:i});return m.status==="aborted"?ze:m.status==="dirty"||r.value==="dirty"?Ka(m.value):m});{if(r.value==="aborted")return ze;const f=this._def.schema._parseSync({data:d,path:i.path,parent:i});return f.status==="aborted"?ze:f.status==="dirty"||r.value==="dirty"?Ka(f.value):f}}if(a.type==="refinement"){const d=f=>{const m=a.refinement(f,l);if(i.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(i.common.async===!1){const f=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return f.status==="aborted"?ze:(f.status==="dirty"&&r.dirty(),d(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(f=>f.status==="aborted"?ze:(f.status==="dirty"&&r.dirty(),d(f.value).then(()=>({status:r.value,value:f.value}))))}if(a.type==="transform")if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!qi(d))return ze;const f=a.transform(d.value,l);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>qi(d)?Promise.resolve(a.transform(d.value,l)).then(f=>({status:r.value,value:f})):ze);st.assertNever(a)}}Ki.create=(t,e,r)=>new Ki({schema:t,typeName:De.ZodEffects,effect:e,...Ke(r)});Ki.createWithPreprocess=(t,e,r)=>new Ki({schema:e,effect:{type:"preprocess",transform:t},typeName:De.ZodEffects,...Ke(r)});class Os extends Je{_parse(e){return this._getType(e)===je.undefined?Gn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Os.create=(t,e)=>new Os({innerType:t,typeName:De.ZodOptional,...Ke(e)});class Qi extends Je{_parse(e){return this._getType(e)===je.null?Gn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qi.create=(t,e)=>new Qi({innerType:t,typeName:De.ZodNullable,...Ke(e)});class lf extends Je{_parse(e){const{ctx:r}=this._processInputParams(e);let i=r.data;return r.parsedType===je.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}lf.create=(t,e)=>new lf({innerType:t,typeName:De.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ke(e)});class uf extends Je{_parse(e){const{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Jl(a)?a.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Gr(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Gr(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}uf.create=(t,e)=>new uf({innerType:t,typeName:De.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ke(e)});class gy extends Je{_parse(e){if(this._getType(e)!==je.nan){const i=this._getOrReturnCtx(e);return fe(i,{code:ie.invalid_type,expected:je.nan,received:i.parsedType}),ze}return{status:"valid",value:e.data}}}gy.create=t=>new gy({typeName:De.ZodNaN,...Ke(t)});class jN extends Je{_parse(e){const{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ff extends Je{_parse(e){const{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?ze:l.status==="dirty"?(r.dirty(),Ka(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?ze:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(e,r){return new Ff({in:e,out:r,typeName:De.ZodPipeline})}}class cf extends Je{_parse(e){const r=this._def.innerType._parse(e),i=a=>(qi(a)&&(a.value=Object.freeze(a.value)),a);return Jl(r)?r.then(a=>i(a)):i(r)}unwrap(){return this._def.innerType}}cf.create=(t,e)=>new cf({innerType:t,typeName:De.ZodReadonly,...Ke(e)});var De;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(De||(De={}));const D=Kr.create,Ne=Hi.create,Rr=nf.create,Df=rf.create,dn=sf.create;As.create;const it=Pr.create,Be=Mt.create,nn=Xl.create;eu.create;ii.create;const li=tu.create,fx=of.create,hx=Wi.create;nu.create;Os.create;Qi.create;class yy extends Error{constructor(e,r,i,a){super(`${e} ${r} - ${a}`),this.status=e,this.statusText=r,this.body=i,this.url=a,this.name="ApiError"}status;statusText;body;url}function _N(t,e){if(!e)return t;const r=new URLSearchParams;for(const[a,l]of Object.entries(e))l!=null&&r.append(a,String(l));const i=r.toString();return i?`${t}?${i}`:t}async function Ba(t,e,r={}){const{body:i,query:a,headers:l,...d}=r,f=_N(t,a),m={...d,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...l},body:i!==void 0?JSON.stringify(i):void 0},p=await fetch(f,m),w=(p.headers.get("content-type")??"").includes("application/json")&&p.status!==204?await p.json():await p.text();if(!p.ok)throw new yy(p.status,p.statusText,w,f);const y=e.safeParse(w);if(!y.success)throw new yy(p.status,"Response schema mismatch",{issues:y.error.issues,raw:w},f);return y.data}const rt={get:(t,e,r)=>Ba(t,e,{...r,method:"GET"}),post:(t,e,r,i)=>Ba(t,e,{...i,method:"POST",body:r}),put:(t,e,r,i)=>Ba(t,e,{...i,method:"PUT",body:r}),patch:(t,e,r,i)=>Ba(t,e,{...i,method:"PATCH",body:r}),delete:(t,e,r)=>Ba(t,e,{...r,method:"DELETE"})},SN=Be({id:nn([D(),Ne()]).transform(String),name:D(),domain:D(),created_at:D(),updated_at:D()}),kN=it(SN),NN=Be({id:nn([D(),Ne()]).transform(String),name:D(),type:D(),base_url:D().nullable().optional(),trust_level:nn([D(),Ne()]).nullable().optional(),respect_robots_txt:Rr().nullable().optional(),rate_limit_per_minute:Ne().nullable().optional()}),CN=Be({id:nn([D(),Ne()]).transform(String),name:D(),domain:D(),config:dn().optional(),sources:it(NN).default([])}),vy=Be({id:nn([D(),Ne()]).transform(String),name:D(),domain:D()}),$f={list:()=>rt.get("/projects",kN),detail:t=>rt.get(`/projects/${encodeURIComponent(t)}`,CN),create:t=>rt.post("/projects",vy,t),createInline:t=>rt.post("/projects/inline",vy,t)},Ie={projects:{all:["projects"],list:()=>[...Ie.projects.all,"list"],detail:t=>[...Ie.projects.all,"detail",t]},domains:{all:["domains"],list:()=>[...Ie.domains.all,"list"]},ontology:{all:["ontology"],byDomain:t=>[...Ie.ontology.all,"byDomain",t]},crawl:{all:["crawl"],job:t=>[...Ie.crawl.all,"job",t]},research:{all:["research"],sessions:t=>[...Ie.research.all,"sessions",t],session:t=>[...Ie.research.all,"session",t]},entities:{all:["entities"],list:(t,e)=>[...Ie.entities.all,"list",t,e??"*"]},claims:{all:["claims"],list:(t,e,r)=>[...Ie.claims.all,"list",t,e??"*",r??"*"]},platform:{all:["platform"],pipeline:t=>[...Ie.platform.all,"pipeline",t],extractionLogs:(t,e)=>[...Ie.platform.all,"extractionLogs",t,e],registry:t=>[...Ie.platform.all,"registry",t],proposals:(t,e)=>[...Ie.platform.all,"proposals",t,e],triples:(t,e,r)=>[...Ie.platform.all,"triples",t,e,r],graph:(t,e,r,i,a)=>[...Ie.platform.all,"graph",t,e,r,i,a],exportJson:(t,e,r,i)=>[...Ie.platform.all,"exportJson",t,e,r,i]}};function px(){return On({queryKey:Ie.projects.list(),queryFn:()=>$f.list()})}function hr(t){return On({queryKey:Ie.projects.detail(t??""),queryFn:()=>$f.detail(t),enabled:!!t})}function EN(){const t=Kt();return gn({mutationFn:e=>$f.createInline(e),onSuccess:()=>{t.invalidateQueries({queryKey:Ie.projects.all})}})}const PN=[{to:"/",labelKey:"nav.dashboard",label:"Dashboard",icon:wS},{to:"/onboard",labelKey:"nav.onboard",label:"New Project",icon:PS},{projectPath:"sources",labelKey:"nav.sources",label:"Source Explorer",icon:SS},{projectPath:"crawl",labelKey:"nav.crawl",label:"Seed Crawl",icon:sS},{projectPath:"pipeline",labelKey:"nav.pipeline",label:"Build Pipeline",icon:Dv},{projectPath:"analysis",labelKey:"nav.analysis",label:"Page Analysis",icon:Uv},{projectPath:"schema",labelKey:"nav.schema",label:"Schema Designer",icon:Bv},{projectPath:"editor",labelKey:"nav.editor",label:"Entity Manager",icon:Cf},{projectPath:"review",labelKey:"nav.review",label:"Claim Review",icon:Nf},{projectPath:"quality",labelKey:"nav.quality",label:"Quality Inspector",icon:Hd},{projectPath:"graph",labelKey:"nav.graph",label:"Graph View",icon:kf},{projectPath:"export",labelKey:"nav.export",label:"Export / API",icon:Sf},{projectPath:"research",labelKey:"nav.research",label:"Graph Research",icon:Av}],mx=["/sources/:projectId","/crawl/:projectId","/pipeline/:projectId","/analysis/:projectId","/schema/:projectId","/research/:projectId","/editor/:projectId","/review/:projectId","/quality/:projectId","/graph/:projectId","/export/:projectId"];function ON(t){for(const e of mx){const r=to({path:e,end:!1},t);if(r?.params.projectId)return r.params.projectId}}function RN(t){for(const e of mx)if(to({path:e,end:!1},t)?.params.projectId)return e.split("/")[1]}function TN(){const{t}=oi(),e=aw(w=>w.ui.sidebarOpen),r=xw(),i=Xi(),a=mn(),l=ON(i.pathname),d=RN(i.pathname),{data:f}=px(),m=f?.[0]?.name,p=!l||!f||f.some(w=>w.name===l),v=p?l??m:m;return $.useEffect(()=>{if(l&&f&&!p){const w=d&&m?`/${d}/${encodeURIComponent(m)}`:"/";a(w,{replace:!0})}},[m,a,f,p,l,d]),u.jsxs("div",{className:"flex min-h-screen bg-background text-foreground",children:[u.jsxs("aside",{className:_t("border-r bg-card transition-all duration-200 ease-out",e?"w-60":"w-16"),children:[u.jsxs("div",{className:"flex h-14 items-center justify-between px-4 border-b",children:[e&&u.jsx("span",{className:"text-sm font-semibold",children:t("app.title","Ontology Builder")}),u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>r(yk()),"aria-label":t("nav.toggleSidebar","Toggle sidebar"),children:u.jsx(_S,{className:"h-4 w-4"})})]}),e&&u.jsxs("div",{className:"border-b px-4 py-3",children:[u.jsx("p",{className:"text-xs text-muted-foreground",children:t("nav.currentProject","Current project")}),u.jsx("p",{className:"mt-1 truncate text-sm font-medium",children:v??t("nav.noProjectSelected","Select a project")})]}),u.jsx("nav",{className:"flex flex-col gap-1 p-2",children:PN.map(({to:w,projectPath:y,labelKey:x,label:S,icon:_})=>{const b=w??(v?`/${y}/${encodeURIComponent(v)}`:void 0);return b?u.jsxs(Sb,{to:b,end:b==="/",className:({isActive:P})=>_t("flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",P?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[u.jsx(_,{className:"h-4 w-4 flex-shrink-0"}),e&&u.jsx("span",{children:t(x,S)})]},x):u.jsxs("div",{className:"flex cursor-not-allowed items-center gap-3 rounded-md px-3 py-2 text-sm text-muted-foreground/50",title:t("nav.selectProjectFirst","Select a project from the dashboard first"),children:[u.jsx(_,{className:"h-4 w-4 flex-shrink-0"}),e&&u.jsx("span",{children:t(x,S)})]},x)})})]}),u.jsxs("div",{className:"flex flex-1 flex-col",children:[u.jsx("header",{className:"flex h-14 items-center justify-between border-b bg-card px-6",children:u.jsx("h1",{className:"text-sm font-medium text-muted-foreground",children:t("app.subtitle","AI-powered ontology construction")})}),u.jsx("main",{className:"flex-1 overflow-auto",children:u.jsx(cb,{})})]})]})}var go=t=>t.type==="checkbox",ei=t=>t instanceof Date,cn=t=>t==null;const gx=t=>typeof t=="object";var Nt=t=>!cn(t)&&!Array.isArray(t)&&gx(t)&&!ei(t),LN=t=>Nt(t)&&t.target?go(t.target)?t.target.checked:t.target.value:t,AN=(t,e)=>e.split(".").some((r,i,a)=>!isNaN(Number(r))&&t.has(a.slice(0,i).join("."))),IN=t=>{const e=t.constructor&&t.constructor.prototype;return Nt(e)&&e.hasOwnProperty("isPrototypeOf")},zf=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function At(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(zf&&(t instanceof Blob||e))return t;const r=Array.isArray(t);if(!r&&!(Nt(t)&&IN(t)))return t;const i=r?[]:Object.create(Object.getPrototypeOf(t));for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=At(t[a]));return i}var cu=t=>/^\w*$/.test(t),vt=t=>t===void 0,Uf=t=>Array.isArray(t)?t.filter(Boolean):[],Vf=t=>Uf(t.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(t,e,r)=>{if(!e||!Nt(t))return r;const a=(cu(e)?[e]:Vf(e)).reduce((l,d)=>cn(l)?void 0:l[d],t);return vt(a)||a===t?vt(t[e])?r:t[e]:a},kr=t=>typeof t=="boolean",Kn=t=>typeof t=="function",dt=(t,e,r)=>{let i=-1;const a=cu(e)?[e]:Vf(e),l=a.length,d=l-1;for(;++i<l;){const f=a[i];let m=r;if(i!==d){const p=t[f];m=Nt(p)||Array.isArray(p)?p:isNaN(+a[i+1])?{}:[]}if(f==="__proto__"||f==="constructor"||f==="prototype")return;t[f]=m,t=t[f]}};const Ai={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},cr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},lr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},wd="form",yx="root",MN=ne.createContext(null);MN.displayName="HookFormControlContext";var FN=(t,e,r,i=!0)=>{const a={};for(const l in t)Object.defineProperty(a,l,{get:()=>{const d=l;return e._proxyFormState[d]!==cr.all&&(e._proxyFormState[d]=!i||cr.all),t[d]}});return a};const DN=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;var en=t=>typeof t=="string",$N=(t,e,r,i,a)=>en(t)?(i&&e.watch.add(t),we(r,t,a)):Array.isArray(t)?t.map(l=>(i&&e.watch.add(l),we(r,l))):(i&&(e.watchAll=!0),r),df=t=>cn(t)||!gx(t);function Nr(t,e,r=new WeakSet){if(t===e)return!0;if(df(t)||df(e))return Object.is(t,e);if(ei(t)&&ei(e))return Object.is(t.getTime(),e.getTime());const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;if(r.has(t)||r.has(e))return!0;r.add(t),r.add(e);for(const l of i){const d=t[l];if(!(l in e))return!1;if(l!=="ref"){const f=e[l];if(ei(d)&&ei(f)||(Nt(d)||Array.isArray(d))&&(Nt(f)||Array.isArray(f))?!Nr(d,f,r):!Object.is(d,f))return!1}}return!0}const zN=ne.createContext(null);zN.displayName="HookFormContext";var vx=(t,e,r,i,a)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[i]:a||!0}}:{},Ja=t=>Array.isArray(t)?t:[t],xy=()=>{let t=[];return{get observers(){return t},next:a=>{for(const l of t)l.next&&l.next(a)},subscribe:a=>(t.push(a),{unsubscribe:()=>{t=t.filter(l=>l!==a)}}),unsubscribe:()=>{t=[]}}};function xx(t,e){const r={};for(const i in t)if(t.hasOwnProperty(i)){const a=t[i],l=e[i];if(a&&Nt(a)&&l){const d=xx(a,l);Nt(d)&&(r[i]=d)}else t[i]&&(r[i]=l)}return r}var Xt=t=>Nt(t)&&!Object.keys(t).length,Bf=t=>t.type==="file",ru=t=>{if(!zf)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},wx=t=>t.type==="select-multiple",qf=t=>t.type==="radio",UN=t=>qf(t)||go(t),bd=t=>ru(t)&&t.isConnected;function VN(t,e){const r=e.slice(0,-1).length;let i=0;for(;i<r;){if(cn(t)){t=void 0;break}t=t[e[i]],i++}return t}function BN(t){for(const e in t)if(t.hasOwnProperty(e)&&!vt(t[e]))return!1;return!0}function It(t,e){if(en(e)&&Object.prototype.hasOwnProperty.call(t,e))return delete t[e],t;const r=Array.isArray(e)?e:cu(e)?[e]:Vf(e),i=r.length===1?t:VN(t,r),a=r.length-1,l=r[a];return i&&delete i[l],a!==0&&(Nt(i)&&Xt(i)||Array.isArray(i)&&BN(i))&&It(t,r.slice(0,-1)),t}var qN=t=>{for(const e in t)if(Kn(t[e]))return!0;return!1};function bx(t){return Array.isArray(t)||Nt(t)&&!qN(t)}function ff(t,e={}){for(const r in t){const i=t[r];bx(i)?(e[r]=Array.isArray(i)?[]:{},ff(i,e[r])):vt(i)||(e[r]=!0)}return e}function hf(t){if(t!==!1){if(t===!0)return!0;if(Array.isArray(t)){const e=t.map(r=>hf(r));return e.some(r=>r!==void 0)?e:void 0}if(Nt(t)){const e={};for(const r in t){const i=hf(t[r]);vt(i)||(e[r]=i)}return Object.keys(e).length?e:void 0}}}function Qa(t,e,r){r||(r=ff(e));for(const i in t){const a=t[i];if(bx(a))vt(e)||df(r[i])?r[i]=ff(a,Array.isArray(a)?[]:{}):Qa(a,cn(e)?{}:e[i],r[i]);else{const l=e[i];r[i]=!Nr(a,l)}}return hf(r)||{}}const wy={value:!1,isValid:!1},by={value:!0,isValid:!0};var jx=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!vt(t[0].attributes.value)?vt(t[0].value)||t[0].value===""?by:{value:t[0].value,isValid:!0}:by:wy}return wy},_x=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:i})=>vt(t)?t:e?t===""?NaN:t&&+t:r&&en(t)?new Date(t):i?i(t):t;const jy={isValid:!1,value:null};var Sx=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,jy):jy;function _y(t){const e=t.ref;return Bf(e)?e.files:qf(e)?Sx(t.refs).value:wx(e)?[...e.selectedOptions].map(({value:r})=>r):go(e)?jx(t.refs).value:_x(vt(e.value)?t.ref.value:e.value,t)}var HN=(t,e,r,i)=>{const a={};for(const l of t){const d=we(e,l);d&&dt(a,l,d._f)}return{criteriaMode:r,names:[...t],fields:a,shouldUseNativeValidation:i}},su=t=>t instanceof RegExp,qa=t=>vt(t)?t:su(t)?t.source:Nt(t)?su(t.value)?t.value.source:t.value:t,Sy=t=>({isOnSubmit:!t||t===cr.onSubmit,isOnBlur:t===cr.onBlur,isOnChange:t===cr.onChange,isOnAll:t===cr.all,isOnTouch:t===cr.onTouched});const ky="AsyncFunction";var WN=t=>!!t&&!!t.validate&&!!(Kn(t.validate)&&t.validate.constructor.name===ky||Nt(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===ky)),KN=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),Ny=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(i=>t.startsWith(i)&&/^\.\w+/.test(t.slice(i.length))));const Ya=(t,e,r,i)=>{for(const a of r||Object.keys(t)){const l=we(t,a);if(l){const{_f:d,...f}=l;if(d){if(d.refs&&d.refs[0]&&e(d.refs[0],a)&&!i)return!0;if(d.ref&&e(d.ref,d.name)&&!i)return!0;if(Ya(f,e))break}else if(Nt(f)&&Ya(f,e))break}}};function Cy(t,e,r){const i=we(t,r);if(i||cu(r))return{error:i,name:r};const a=r.split(".");for(;a.length;){const l=a.join("."),d=we(e,l),f=we(t,l);if(d&&!Array.isArray(d)&&r!==l)return{name:r};if(f&&f.type)return{name:l,error:f};if(f&&f.root&&f.root.type)return{name:`${l}.root`,error:f.root};a.pop()}return{name:r}}var QN=(t,e,r,i)=>{r(t);const{name:a,...l}=t;return Xt(l)||i&&Object.keys(l).length>=Object.keys(e).length||Object.keys(l).find(d=>e[d]===(!i||cr.all))},ZN=(t,e,r)=>!t||!e||t===e||Ja(t).some(i=>i&&(r?i===e:i.startsWith(e)||e.startsWith(i))),GN=(t,e,r,i,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(e||t):(r?i.isOnBlur:a.isOnBlur)?!t:(r?i.isOnChange:a.isOnChange)?t:!0,JN=(t,e)=>!Uf(we(t,e)).length&&It(t,e),YN=(t,e,r)=>{const i=Ja(we(t,r));return dt(i,yx,e[r]),dt(t,r,i),t};function Ey(t,e,r="validate"){if(en(t)||Array.isArray(t)&&t.every(en)||kr(t)&&!t)return{type:r,message:en(t)?t:"",ref:e}}var Ii=t=>Nt(t)&&!su(t)?t:{value:t,message:""},Py=async(t,e,r,i,a,l)=>{const{ref:d,refs:f,required:m,maxLength:p,minLength:v,min:w,max:y,pattern:x,validate:S,name:_,valueAsNumber:b,mount:P}=t._f,N=we(r,_);if(!P||e.has(_))return{};const F=f?f[0]:d,L=J=>{a&&F.reportValidity&&(F.setCustomValidity(kr(J)?"":J||""),F.reportValidity())},k={},I=qf(d),X=go(d),re=I||X,de=(b||Bf(d))&&vt(d.value)&&vt(N)||ru(d)&&d.value===""||N===""||Array.isArray(N)&&!N.length||b&&typeof N=="number"&&isNaN(N),Z=vx.bind(null,_,i,k),Oe=(J,ve,me,M=lr.maxLength,R=lr.minLength)=>{const G=J?ve:me;k[_]={type:J?M:R,message:G,ref:d,...Z(J?M:R,G)}};if(l?!Array.isArray(N)||!N.length:m&&(!re&&(de||cn(N))||kr(N)&&!N||X&&!jx(f).isValid||I&&!Sx(f).isValid)){const{value:J,message:ve}=en(m)?{value:!!m,message:m}:Ii(m);if(J&&(k[_]={type:lr.required,message:ve,ref:F,...Z(lr.required,ve)},!i))return L(ve),k}if(!de&&(!cn(w)||!cn(y))){let J,ve;const me=Ii(y),M=Ii(w);if(!cn(N)&&!isNaN(N)){const R=d.valueAsNumber||N&&+N;cn(me.value)||(J=R>me.value),cn(M.value)||(ve=R<M.value)}else{const R=d.valueAsDate||new Date(N),G=K=>new Date(new Date().toDateString()+" "+K),H=d.type=="time",W=d.type=="week";en(me.value)&&N&&(J=H?G(N)>G(me.value):W?N>me.value:R>new Date(me.value)),en(M.value)&&N&&(ve=H?G(N)<G(M.value):W?N<M.value:R<new Date(M.value))}if((J||ve)&&(Oe(!!J,me.message,M.message,lr.max,lr.min),!i))return L(k[_].message),k}if((p||v)&&!de&&(en(N)||l&&Array.isArray(N))){const J=Ii(p),ve=Ii(v),me=!cn(J.value)&&N.length>+J.value,M=!cn(ve.value)&&N.length<+ve.value;if((me||M)&&(Oe(me,J.message,ve.message),!i))return L(k[_].message),k}if(x&&!de&&en(N)){const{value:J,message:ve}=Ii(x);if(su(J)&&!N.match(J)&&(k[_]={type:lr.pattern,message:ve,ref:d,...Z(lr.pattern,ve)},!i))return L(ve),k}if(S){if(Kn(S)){const J=await S(N,r),ve=Ey(J,F);if(ve&&(k[_]={...ve,...Z(lr.validate,ve.message)},!i))return L(ve.message),k}else if(Nt(S)){let J={};for(const ve in S){if(!Xt(J)&&!i)break;const me=Ey(await S[ve](N,r),F,ve);me&&(J={...me,...Z(ve,me.message)},L(me.message),i&&(k[_]=J))}if(!Xt(J)&&(k[_]={ref:F,...J},!i))return k}}return L(!0),k};const XN={mode:cr.onSubmit,reValidateMode:cr.onChange,shouldFocusError:!0},kx={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function eC(t={}){let e={...XN,...t},r={...At(kx),isLoading:Kn(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1},i={},a=Nt(e.defaultValues)||Nt(e.values)?At(e.defaultValues||e.values)||{}:{},l=e.shouldUnregister?{}:At(a),d={action:!1,mount:!1,watch:!1,keepIsValid:!1},f={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},m,p=0;const v={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={...v};let y={...w};const x={array:xy(),state:xy()},S=e.criteriaMode===cr.all,_=E=>z=>{clearTimeout(p),p=setTimeout(E,z)},b=async E=>{if(!d.keepIsValid&&!e.disabled&&(w.isValid||y.isValid||E)){let z;e.resolver?(z=Xt((await de()).errors),P()):z=await J({fields:i,onlyCheckValid:!0,eventType:Ai.VALID}),z!==r.isValid&&x.state.next({isValid:z})}},P=(E,z)=>{!e.disabled&&(w.isValidating||w.validatingFields||y.isValidating||y.validatingFields)&&((E||Array.from(f.mount)).forEach(V=>{V&&(z?dt(r.validatingFields,V,z):It(r.validatingFields,V))}),x.state.next({validatingFields:r.validatingFields,isValidating:!Xt(r.validatingFields)}))},N=()=>{r.dirtyFields=Qa(a,l)},F=(E,z=[],V,oe,le=!0,ae=!0)=>{if(oe&&V&&!e.disabled){if(d.action=!0,ae&&Array.isArray(we(i,E))){const ce=V(we(i,E),oe.argA,oe.argB);le&&dt(i,E,ce)}if(ae&&Array.isArray(we(r.errors,E))){const ce=V(we(r.errors,E),oe.argA,oe.argB);le&&dt(r.errors,E,ce),JN(r.errors,E)}if((w.touchedFields||y.touchedFields)&&ae&&Array.isArray(we(r.touchedFields,E))){const ce=V(we(r.touchedFields,E),oe.argA,oe.argB);le&&dt(r.touchedFields,E,ce)}(w.dirtyFields||y.dirtyFields)&&N(),x.state.next({name:E,isDirty:me(E,z),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(l,E,z)},L=(E,z)=>{dt(r.errors,E,z),x.state.next({errors:r.errors})},k=E=>{r.errors=E,x.state.next({errors:r.errors,isValid:!1})},I=(E,z,V,oe)=>{const le=we(i,E);if(le){const ae=vt(we(l,E)),ce=we(l,E,vt(V)?we(a,E):V);vt(ce)||oe&&oe.defaultChecked||z?dt(l,E,z?ce:_y(le._f)):G(E,ce),d.mount&&!d.action&&(b(),ae&&r.isDirty&&(w.isDirty||y.isDirty)&&(me()||(r.isDirty=!1,x.state.next({...r}))))}},X=(E,z,V,oe,le)=>{let ae=!1,ce=!1;const Ae={name:E};if(!e.disabled){if(!V||oe){(w.isDirty||y.isDirty)&&(ce=r.isDirty,r.isDirty=Ae.isDirty=me(),ae=ce!==Ae.isDirty);const We=Nr(we(a,E),z);ce=!!we(r.dirtyFields,E),We?It(r.dirtyFields,E):dt(r.dirtyFields,E,!0),Ae.dirtyFields=r.dirtyFields,ae=ae||(w.dirtyFields||y.dirtyFields)&&ce!==!We}if(V){const We=we(r.touchedFields,E);We||(dt(r.touchedFields,E,V),Ae.touchedFields=r.touchedFields,ae=ae||(w.touchedFields||y.touchedFields)&&We!==V)}ae&&le&&x.state.next(Ae)}return ae?Ae:{}},re=(E,z,V,oe)=>{const le=we(r.errors,E),ae=(w.isValid||y.isValid)&&kr(z)&&r.isValid!==z;if(e.delayError&&V?(m=_(()=>L(E,V)),m(e.delayError)):(clearTimeout(p),m=null,V?dt(r.errors,E,V):It(r.errors,E)),(V?!Nr(le,V):le)||!Xt(oe)||ae){const ce={...oe,...ae&&kr(z)?{isValid:z}:{},errors:r.errors,name:E};r={...r,...ce},x.state.next(ce)}},de=async E=>(P(E,!0),await e.resolver(l,e.context,HN(E||f.mount,i,e.criteriaMode,e.shouldUseNativeValidation))),Z=async E=>{const{errors:z}=await de(E);if(P(E),E)for(const V of E){const oe=we(z,V);oe?dt(r.errors,V,oe):It(r.errors,V)}else r.errors=z;return z},Oe=async({name:E,eventType:z})=>{if(t.validate){const V=await t.validate({formValues:l,formState:r,name:E,eventType:z});if(Nt(V))for(const oe in V)V[oe]&&Ce(`${wd}.${oe}`,{message:en(V.message)?V.message:"",type:lr.validate});else en(V)||!V?Ce(wd,{message:V||"",type:lr.validate}):qe(wd);return V}return!0},J=async({fields:E,onlyCheckValid:z,name:V,eventType:oe,context:le={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(le.runRootValidation=!0,!await Oe({name:V,eventType:oe})&&(le.valid=!1,z)))return le.valid;for(const ae in E){const ce=E[ae];if(ce){const{_f:Ae,...We}=ce;if(Ae){const St=f.array.has(Ae.name),Tt=ce._f&&WN(ce._f);Tt&&w.validatingFields&&P([Ae.name],!0);const Ft=await Py(ce,f.disabled,l,S,e.shouldUseNativeValidation&&!z,St);if(Tt&&w.validatingFields&&P([Ae.name]),Ft[Ae.name]&&(le.valid=!1,z)||(!z&&(we(Ft,Ae.name)?St?YN(r.errors,Ft,Ae.name):dt(r.errors,Ae.name,Ft[Ae.name]):It(r.errors,Ae.name)),t.shouldUseNativeValidation&&Ft[Ae.name]))break}!Xt(We)&&await J({context:le,onlyCheckValid:z,fields:We,name:ae,eventType:oe})}}return le.valid},ve=()=>{for(const E of f.unMount){const z=we(i,E);z&&(z._f.refs?z._f.refs.every(V=>!bd(V)):!bd(z._f.ref))&&yn(E)}f.unMount=new Set},me=(E,z)=>!e.disabled&&(E&&z&&dt(l,E,z),!Nr(pe(),a)),M=(E,z,V)=>$N(E,f,{...d.mount?l:vt(z)?a:en(E)?{[E]:z}:z},V,z),R=E=>Uf(we(d.mount?l:a,E,e.shouldUnregister?we(a,E,[]):[])),G=(E,z,V={})=>{const oe=we(i,E);let le=z;if(oe){const ae=oe._f;ae&&(!ae.disabled&&dt(l,E,_x(z,ae)),le=ru(ae.ref)&&cn(z)?"":z,wx(ae.ref)?[...ae.ref.options].forEach(ce=>ce.selected=le.includes(ce.value)):ae.refs?go(ae.ref)?ae.refs.forEach(ce=>{(!ce.defaultChecked||!ce.disabled)&&(Array.isArray(le)?ce.checked=!!le.find(Ae=>Ae===ce.value):ce.checked=le===ce.value||!!le)}):ae.refs.forEach(ce=>ce.checked=ce.value===le):Bf(ae.ref)?ae.ref.value="":(ae.ref.value=le,ae.ref.type||x.state.next({name:E,values:At(l)})))}(V.shouldDirty||V.shouldTouch)&&X(E,le,V.shouldTouch,V.shouldDirty,!0),V.shouldValidate&&ue(E)},H=(E,z,V)=>{for(const oe in z){if(!z.hasOwnProperty(oe))return;const le=z[oe],ae=E+"."+oe,ce=we(i,ae);(f.array.has(E)||Nt(le)||ce&&!ce._f)&&!ei(le)?H(ae,le,V):G(ae,le,V)}},W=(E,z,V={})=>{const oe=we(i,E),le=f.array.has(E),ae=At(z),ce=we(l,E),Ae=Nr(ce,ae);if(dt(l,E,ae),le)x.array.next({name:E,values:At(l)}),(w.isDirty||w.dirtyFields||y.isDirty||y.dirtyFields)&&V.shouldDirty&&(N(),x.state.next({name:E,dirtyFields:r.dirtyFields,isDirty:me(E,ae)}));else{const We=Array.isArray(ae)&&!ae.length||Xt(ae);!oe||oe._f||cn(ae)||We?G(E,ae,V):H(E,ae,V)}if(!Ae){const We=Ny(E,f);x.state.next({...We&&r,name:d.mount||We?E:void 0,values:At(l)})}},K=E=>{const z=Kn(E)?E(l):E;Nr(l,z)||(l={...l,...z},x.state.next({...r,values:l}))},T=async E=>{d.mount=!0;const z=E.target;let V=z.name,oe=!0;const le=we(i,V),ae=We=>{oe=Number.isNaN(We)||ei(We)&&isNaN(We.getTime())||Nr(We,we(l,V,We))},ce=Sy(e.mode),Ae=Sy(e.reValidateMode);if(le){let We,St;const Tt=z.type?_y(le._f):LN(E),Ft=E.type===Ai.BLUR||E.type===Ai.FOCUS_OUT,$n=!KN(le._f)&&!t.validate&&!e.resolver&&!we(r.errors,V)&&!le._f.deps||GN(Ft,we(r.touchedFields,V),r.isSubmitted,Ae,ce),Ir=Ny(V,f,Ft);dt(l,V,Tt),Ft?(!z||!z.readOnly)&&(le._f.onBlur&&le._f.onBlur(E),m&&m(0)):le._f.onChange&&le._f.onChange(E);const Mr=X(V,Tt,Ft),es=!Xt(Mr)||Ir;if(!Ft&&x.state.next({name:V,type:E.type,values:At(l)}),$n)return(w.isValid||y.isValid)&&(e.mode==="onBlur"?Ft&&b():Ft||b()),es&&x.state.next({name:V,...Ir?{}:Mr});if(!e.resolver&&t.validate&&await Oe({name:V,eventType:E.type}),!Ft&&Ir&&x.state.next({...r}),e.resolver){const{errors:Fr}=await de([V]);if(P([V]),ae(Tt),oe){const mr=Cy(r.errors,i,V),Tn=Cy(Fr,i,mr.name||V);We=Tn.error,V=Tn.name,St=Xt(Fr)}}else P([V],!0),We=(await Py(le,f.disabled,l,S,e.shouldUseNativeValidation))[V],P([V]),ae(Tt),oe&&(We?St=!1:(w.isValid||y.isValid)&&(St=await J({fields:i,onlyCheckValid:!0,name:V,eventType:E.type})));oe&&(le._f.deps&&(!Array.isArray(le._f.deps)||le._f.deps.length>0)&&ue(le._f.deps),re(V,St,We,Mr))}},Q=(E,z)=>{if(we(r.errors,z)&&E.focus)return E.focus(),1},ue=async(E,z={})=>{let V,oe;const le=Ja(E);if(e.resolver){const ae=await Z(vt(E)?E:le);V=Xt(ae),oe=E?!le.some(ce=>we(ae,ce)):V}else E?(oe=(await Promise.all(le.map(async ae=>{const ce=we(i,ae);return await J({fields:ce&&ce._f?{[ae]:ce}:ce,eventType:Ai.TRIGGER})}))).every(Boolean),!(!oe&&!r.isValid)&&b()):oe=V=await J({fields:i,name:E,eventType:Ai.TRIGGER});return x.state.next({...!en(E)||(w.isValid||y.isValid)&&V!==r.isValid?{}:{name:E},...e.resolver||!E?{isValid:V}:{},errors:r.errors}),z.shouldFocus&&!oe&&Ya(i,Q,E?le:f.mount),oe},pe=(E,z)=>{let V={...d.mount?l:a};return z&&(V=xx(z.dirtyFields?r.dirtyFields:r.touchedFields,V)),vt(E)?V:en(E)?we(V,E):E.map(oe=>we(V,oe))},Le=(E,z)=>({invalid:!!we((z||r).errors,E),isDirty:!!we((z||r).dirtyFields,E),error:we((z||r).errors,E),isValidating:!!we(r.validatingFields,E),isTouched:!!we((z||r).touchedFields,E)}),qe=E=>{const z=E?Ja(E):void 0;z?.forEach(V=>It(r.errors,V)),z?z.forEach(V=>{x.state.next({name:V,errors:r.errors})}):x.state.next({errors:{}})},Ce=(E,z,V)=>{const oe=(we(i,E,{_f:{}})._f||{}).ref,le=we(r.errors,E)||{},{ref:ae,message:ce,type:Ae,...We}=le;dt(r.errors,E,{...We,...z,ref:oe}),x.state.next({name:E,errors:r.errors,isValid:!1}),V&&V.shouldFocus&&oe&&oe.focus&&oe.focus()},Ge=(E,z)=>Kn(E)?x.state.subscribe({next:V=>"values"in V&&E(V.values||M(void 0,z),V)}):M(E,z,!0),et=E=>x.state.subscribe({next:z=>{if(ZN(E.name,z.name,E.exact)&&QN(z,E.formState||w,vn,E.reRenderRoot)){const V={...l};E.callback({values:V,...r,...z,defaultValues:a})}}}).unsubscribe,Rt=E=>(d.mount=!0,y={...y,...E.formState},et({...E,formState:{...v,...E.formState}})),yn=(E,z={})=>{for(const V of E?Ja(E):f.mount)f.mount.delete(V),f.array.delete(V),z.keepValue||(It(i,V),It(l,V)),!z.keepError&&It(r.errors,V),!z.keepDirty&&It(r.dirtyFields,V),!z.keepTouched&&It(r.touchedFields,V),!z.keepIsValidating&&It(r.validatingFields,V),!e.shouldUnregister&&!z.keepDefaultValue&&It(a,V);x.state.next({values:At(l)}),x.state.next({...r,...z.keepDirty?{isDirty:me()}:{}}),!z.keepIsValid&&b()},Tr=({disabled:E,name:z})=>{if(kr(E)&&d.mount||E||f.disabled.has(z)){const le=f.disabled.has(z)!==!!E;E?f.disabled.add(z):f.disabled.delete(z),le&&d.mount&&!d.action&&b()}},Jn=(E,z={})=>{let V=we(i,E);const oe=kr(z.disabled)||kr(e.disabled),le=!f.registerName.has(E)&&V&&V._f&&!V._f.mount;return dt(i,E,{...V||{},_f:{...V&&V._f?V._f:{ref:{name:E}},name:E,mount:!0,...z}}),f.mount.add(E),V&&!le?Tr({disabled:kr(z.disabled)?z.disabled:e.disabled,name:E}):I(E,!0,z.value),{...oe?{disabled:z.disabled||e.disabled}:{},...e.progressive?{required:!!z.required,min:qa(z.min),max:qa(z.max),minLength:qa(z.minLength),maxLength:qa(z.maxLength),pattern:qa(z.pattern)}:{},name:E,onChange:T,onBlur:T,ref:ae=>{if(ae){f.registerName.add(E),Jn(E,z),f.registerName.delete(E),V=we(i,E);const ce=vt(ae.value)&&ae.querySelectorAll&&ae.querySelectorAll("input,select,textarea")[0]||ae,Ae=UN(ce),We=V._f.refs||[];if(Ae?We.find(St=>St===ce):ce===V._f.ref)return;dt(i,E,{_f:{...V._f,...Ae?{refs:[...We.filter(bd),ce,...Array.isArray(we(a,E))?[{}]:[]],ref:{type:ce.type,name:E}}:{ref:ce}}}),I(E,!1,void 0,ce)}else V=we(i,E,{}),V._f&&(V._f.mount=!1),(e.shouldUnregister||z.shouldUnregister)&&!(AN(f.array,E)&&d.action)&&f.unMount.add(E)}}},Lr=()=>e.shouldFocusError&&Ya(i,Q,f.mount),ui=E=>{kr(E)&&(x.state.next({disabled:E}),Ya(i,(z,V)=>{const oe=we(i,V);oe&&(z.disabled=oe._f.disabled||E,Array.isArray(oe._f.refs)&&oe._f.refs.forEach(le=>{le.disabled=oe._f.disabled||E}))},0,!1))},Yr=(E,z)=>async V=>{let oe;V&&(V.preventDefault&&V.preventDefault(),V.persist&&V.persist());let le=At(l);if(x.state.next({isSubmitting:!0}),e.resolver){const{errors:ae,values:ce}=await de();P(),r.errors=ae,le=At(ce)}else await J({fields:i,eventType:Ai.SUBMIT});if(f.disabled.size)for(const ae of f.disabled)It(le,ae);if(It(r.errors,yx),Xt(r.errors)){x.state.next({errors:{}});try{await E(le,V)}catch(ae){oe=ae}}else z&&await z({...r.errors},V),Lr(),setTimeout(Lr);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Xt(r.errors)&&!oe,submitCount:r.submitCount+1,errors:r.errors}),oe)throw oe},Ms=(E,z={})=>{we(i,E)&&(vt(z.defaultValue)?W(E,At(we(a,E))):(W(E,z.defaultValue),dt(a,E,At(z.defaultValue))),z.keepTouched||It(r.touchedFields,E),z.keepDirty||(It(r.dirtyFields,E),r.isDirty=z.defaultValue?me(E,At(we(a,E))):me()),z.keepError||(It(r.errors,E),w.isValid&&b()),x.state.next({...r}))},Ar=(E,z={})=>{const V=E?At(E):a,oe=At(V),le=Xt(E),ae=le?a:oe;if(z.keepDefaultValues||(a=V),!z.keepValues){if(z.keepDirtyValues){const ce=new Set([...f.mount,...Object.keys(Qa(a,l))]);for(const Ae of Array.from(ce)){const We=we(r.dirtyFields,Ae),St=we(l,Ae),Tt=we(ae,Ae);We&&!vt(St)?dt(ae,Ae,St):!We&&!vt(Tt)&&W(Ae,Tt)}}else{if(zf&&vt(E))for(const ce of f.mount){const Ae=we(i,ce);if(Ae&&Ae._f){const We=Array.isArray(Ae._f.refs)?Ae._f.refs[0]:Ae._f.ref;if(ru(We)){const St=We.closest("form");if(St){St.reset();break}}}}if(z.keepFieldsRef)for(const ce of f.mount)W(ce,we(ae,ce));else i={}}l=e.shouldUnregister?z.keepDefaultValues?At(a):{}:At(ae),x.array.next({values:{...ae}}),x.state.next({values:{...ae}})}f={mount:z.keepDirtyValues?f.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},d.mount=!w.isValid||!!z.keepIsValid||!!z.keepDirtyValues||!e.shouldUnregister&&!Xt(ae),d.watch=!!e.shouldUnregister,d.keepIsValid=!!z.keepIsValid,d.action=!1,z.keepErrors||(r.errors={}),x.state.next({submitCount:z.keepSubmitCount?r.submitCount:0,isDirty:le?!1:z.keepDirty?r.isDirty:!!(z.keepDefaultValues&&!Nr(E,a)),isSubmitted:z.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:le?{}:z.keepDirtyValues?z.keepDefaultValues&&l?Qa(a,l):r.dirtyFields:z.keepDefaultValues&&E?Qa(a,E):z.keepDirty?r.dirtyFields:{},touchedFields:z.keepTouched?r.touchedFields:{},errors:z.keepErrors?r.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Xr=(E,z)=>Ar(Kn(E)?E(l):E,{...e.resetOptions,...z}),pr=(E,z={})=>{const V=we(i,E),oe=V&&V._f;if(oe){const le=oe.refs?oe.refs[0]:oe.ref;le.focus&&setTimeout(()=>{le.focus(),z.shouldSelect&&Kn(le.select)&&le.select()})}},vn=E=>{r={...r,...E}},Rn={control:{register:Jn,unregister:yn,getFieldState:Le,handleSubmit:Yr,setError:Ce,_subscribe:et,_runSchema:de,_updateIsValidating:P,_focusError:Lr,_getWatch:M,_getDirty:me,_setValid:b,_setFieldArray:F,_setDisabledField:Tr,_setErrors:k,_getFieldArray:R,_reset:Ar,_resetDefaultValues:()=>Kn(e.defaultValues)&&e.defaultValues().then(E=>{Xr(E,e.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:ve,_disableForm:ui,_subjects:x,_proxyFormState:w,get _fields(){return i},get _formValues(){return l},get _state(){return d},set _state(E){d=E},get _defaultValues(){return a},get _names(){return f},set _names(E){f=E},get _formState(){return r},get _options(){return e},set _options(E){e={...e,...E}}},subscribe:Rt,trigger:ue,register:Jn,handleSubmit:Yr,watch:Ge,setValue:W,setValues:K,getValues:pe,reset:Xr,resetField:Ms,clearErrors:qe,unregister:yn,setError:Ce,setFocus:pr,getFieldState:Le};return{...Rn,formControl:Rn}}function Zi(t={}){const e=ne.useRef(void 0),r=ne.useRef(void 0),[i,a]=ne.useState(()=>({...At(kx),isLoading:Kn(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Kn(t.defaultValues)?void 0:t.defaultValues}));if(!e.current)if(t.formControl)e.current={...t.formControl,formState:i},t.defaultValues&&!Kn(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:d,...f}=eC(t);e.current={...f,formState:i}}const l=e.current.control;return l._options=t,DN(()=>{const d=l._subscribe({formState:l._proxyFormState,callback:()=>a({...l._formState}),reRenderRoot:!0});return a(f=>({...f,isReady:!0})),l._formState.isReady=!0,d},[l]),ne.useEffect(()=>l._disableForm(t.disabled),[l,t.disabled]),ne.useEffect(()=>{t.mode&&(l._options.mode=t.mode),t.reValidateMode&&(l._options.reValidateMode=t.reValidateMode)},[l,t.mode,t.reValidateMode]),ne.useEffect(()=>{t.errors&&(l._setErrors(t.errors),l._focusError())},[l,t.errors]),ne.useEffect(()=>{t.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,t.shouldUnregister]),ne.useEffect(()=>{if(l._proxyFormState.isDirty){const d=l._getDirty();d!==i.isDirty&&l._subjects.state.next({isDirty:d})}},[l,i.isDirty]),ne.useEffect(()=>{var d;t.values&&!Nr(t.values,r.current)?(l._reset(t.values,{keepFieldsRef:!0,...l._options.resetOptions}),!((d=l._options.resetOptions)===null||d===void 0)&&d.keepIsValid||l._setValid(),r.current=t.values,a(f=>({...f}))):l._resetDefaultValues()},[l,t.values]),ne.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),e.current.formState=ne.useMemo(()=>FN(i,l),[l,i]),e.current}const Oy=(t,e,r)=>{if(t&&"reportValidity"in t){const i=we(r,e);t.setCustomValidity(i&&i.message||""),t.reportValidity()}},Nx=(t,e)=>{for(const r in e.fields){const i=e.fields[r];i&&i.ref&&"reportValidity"in i.ref?Oy(i.ref,r,t):i.refs&&i.refs.forEach(a=>Oy(a,r,t))}},tC=(t,e)=>{e.shouldUseNativeValidation&&Nx(t,e);const r={};for(const i in t){const a=we(e.fields,i),l=Object.assign(t[i]||{},{ref:a&&a.ref});if(nC(e.names||Object.keys(t),i)){const d=Object.assign({},we(r,i));dt(d,"root",l),dt(r,i,d)}else dt(r,i,l)}return r},nC=(t,e)=>t.some(r=>r.startsWith(e+"."));var rC=function(t,e){for(var r={};t.length;){var i=t[0],a=i.code,l=i.message,d=i.path.join(".");if(!r[d])if("unionErrors"in i){var f=i.unionErrors[0].errors[0];r[d]={message:f.message,type:f.code}}else r[d]={message:l,type:a};if("unionErrors"in i&&i.unionErrors.forEach(function(v){return v.errors.forEach(function(w){return t.push(w)})}),e){var m=r[d].types,p=m&&m[i.code];r[d]=vx(d,e,r,a,p?[].concat(p,i.message):i.message)}t.shift()}return r},Gi=function(t,e,r){return r===void 0&&(r={}),function(i,a,l){try{return Promise.resolve((function(d,f){try{var m=Promise.resolve(t[r.mode==="sync"?"parse":"parseAsync"](i,e)).then(function(p){return l.shouldUseNativeValidation&&Nx({},l),{errors:{},values:r.raw?i:p}})}catch(p){return f(p)}return m&&m.then?m.then(void 0,f):m})(0,function(d){if((function(f){return Array.isArray(f?.errors)})(d))return{values:{},errors:tC(rC(d.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw d}))}catch(d){return Promise.reject(d)}}};const ge=$.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:_t("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));ge.displayName="Card";const Ue=$.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:_t("flex flex-col space-y-1.5 p-6",t),...e}));Ue.displayName="CardHeader";const Ve=$.forwardRef(({className:t,...e},r)=>u.jsx("h3",{ref:r,className:_t("text-lg font-semibold leading-none tracking-tight",t),...e}));Ve.displayName="CardTitle";const Qe=$.forwardRef(({className:t,...e},r)=>u.jsx("p",{ref:r,className:_t("text-sm text-muted-foreground",t),...e}));Qe.displayName="CardDescription";const ye=$.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:_t("p-6 pt-0",t),...e}));ye.displayName="CardContent";const sC=$.forwardRef(({className:t,...e},r)=>u.jsx("div",{ref:r,className:_t("flex items-center p-6 pt-0",t),...e}));sC.displayName="CardFooter";const xt=$.forwardRef(({className:t,type:e="text",...r},i)=>u.jsx("input",{type:e,ref:i,className:_t("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...r}));xt.displayName="Input";const Ye=$.forwardRef(({className:t,...e},r)=>u.jsx("label",{ref:r,className:_t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...e}));Ye.displayName="Label";function pn({className:t,...e}){return u.jsx("div",{className:_t("animate-pulse rounded-md bg-muted",t),...e})}const iC=Be({domain:D(),entity_types:it(D()),predicates:it(D()),attribute_count:Ne().int()}),aC=it(iC),oC={list:()=>rt.get("/domains",aC)},lC=Be({domain:D(),entity_types:it(D()),predicates:it(D()),attributes:it(D()),aliases:li(D(),D()).default({})}),uC={get:t=>rt.get(`/ontology/${encodeURIComponent(t)}`,lC)};function cC(){return On({queryKey:Ie.domains.list(),queryFn:()=>oC.list(),staleTime:1e3*60*30})}function Cx(t){return On({queryKey:Ie.ontology.byDomain(t??""),queryFn:()=>uC.get(t),enabled:!!t,staleTime:1e3*60*30})}const dC=/^[a-zA-Z0-9_-]+$/,fC=Be({project_name:D().min(2,"최소 2자 이상").max(64,"최대 64자").regex(dC,"영문/숫자/_/- 만 허용"),domain:D().min(1,"도메인을 선택하세요")});function hC(){const t=mn(),{t:e}=oi(),{data:r,isLoading:i,isError:a,error:l,refetch:d}=cC(),f=EN(),{register:m,handleSubmit:p,watch:v,setValue:w,formState:{errors:y,isSubmitting:x}}=Zi({resolver:Gi(fC),defaultValues:{project_name:"",domain:""}}),S=v("domain"),_=async b=>{const P=r?.find(N=>N.domain===b.domain);try{const N=await f.mutateAsync({project_name:b.project_name,domain:b.domain,target_entities:P?.entity_types??[]});jt.success(e("onboarding.created","프로젝트가 생성되었습니다: {{name}}",{name:N.name})),t(`/sources/${N.name}`)}catch(N){jt.error(e("onboarding.createFailed","생성 실패: {{msg}}",{msg:N.message}))}};return u.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-10",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t("/"),"aria-label":e("common.back","이전"),children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:e("onboarding.title","새 프로젝트 만들기")})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:e("onboarding.formTitle","온톨로지 도메인 선택")}),u.jsx(Qe,{children:e("onboarding.formDesc","어떤 종류의 온톨로지를 구축할지 도메인을 선택하고 프로젝트 이름을 정해주세요.")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:p(_),className:"space-y-6",noValidate:!0,children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ye,{htmlFor:"project_name",children:e("onboarding.projectName","프로젝트 이름")}),u.jsx(xt,{id:"project_name",placeholder:"my_perfume_project","aria-invalid":!!y.project_name,...m("project_name")}),y.project_name&&u.jsx("p",{className:"text-sm text-destructive",children:y.project_name.message}),u.jsx("p",{className:"text-xs text-muted-foreground",children:e("onboarding.projectNameHint","영문, 숫자, _ , - 만 사용 (2~64자)")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ye,{children:e("onboarding.domain","도메인")}),a&&u.jsx(ge,{className:"border-destructive",children:u.jsxs(ye,{className:"flex items-center justify-between gap-3 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),u.jsx("span",{children:l.message})]}),u.jsx(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>d(),children:e("common.retry","다시 시도")})]})}),i&&u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:Array.from({length:4}).map((b,P)=>u.jsx(pn,{className:"h-24"},P))}),r&&u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:r.map(b=>{const P=S===b.domain;return u.jsxs("button",{type:"button",onClick:()=>w("domain",b.domain,{shouldValidate:!0}),className:_t("rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",P&&"border-primary bg-accent/60"),children:[u.jsx("div",{className:"mb-1 font-semibold capitalize",children:b.domain}),u.jsx("div",{className:"text-xs text-muted-foreground",children:e("onboarding.domainSummary",{entities:b.entity_types.length,predicates:b.predicates.length,defaultValue:"엔티티 {{entities}}종 · 관계 {{predicates}}개"})}),u.jsxs("div",{className:"mt-2 line-clamp-2 text-xs text-muted-foreground/70",children:[b.entity_types.slice(0,5).join(", "),b.entity_types.length>5&&" …"]})]},b.domain)})}),y.domain&&u.jsx("p",{className:"text-sm text-destructive",children:y.domain.message})]}),u.jsxs("div",{className:"flex justify-end gap-3 border-t pt-4",children:[u.jsx(Ee,{type:"button",variant:"outline",onClick:()=>t("/"),disabled:x||f.isPending,children:e("common.cancel","취소")}),u.jsxs(Ee,{type:"submit",disabled:x||f.isPending,children:[f.isPending&&u.jsx(dr,{className:"h-4 w-4 animate-spin"}),e("onboarding.submit","프로젝트 만들기")]})]})]})})]})]})}const pC=Be({id:nn([D(),Ne()]).transform(String),name:D(),type:D(),base_url:D().nullable().optional(),trust_level:Ne().nullable().optional(),respect_robots_txt:Rr().nullable().optional(),rate_limit_per_minute:Ne().nullable().optional()}),mC=Be({ok:Rr(),deleted:D()}),Ex={create:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/sources`,pC,e),delete:(t,e)=>rt.delete(`/projects/${encodeURIComponent(t)}/sources/${encodeURIComponent(e)}`,mC)};function gC(t){const e=Kt();return gn({mutationFn:r=>Ex.create(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.projects.detail(t)})}})}function yC(t){const e=Kt();return gn({mutationFn:r=>Ex.delete(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.projects.detail(t)})}})}const Px=["official","review","blog","news","community","unknown"],vC=Be({name:D().min(2,"최소 2자 이상").max(64,"최대 64자").regex(/^[a-zA-Z0-9_-]+$/,"영문/숫자/_/-만 허용"),type:hx(Px),base_url:D().url("올바른 URL 형식이 아닙니다").or(fx("")).optional(),trust_level:Ne({invalid_type_error:"0~1 사이의 숫자"}).min(0).max(1),rate_limit_per_minute:Ne({invalid_type_error:"양의 정수"}).int().min(1).max(600),respect_robots_txt:Rr()});function xC(){const t=mn(),{projectId:e}=fr(),{t:r}=oi(),i=e??"",{data:a,isLoading:l,isError:d,error:f,refetch:m}=hr(i),p=gC(i),v=yC(i),{register:w,handleSubmit:y,reset:x,formState:{errors:S,isSubmitting:_}}=Zi({resolver:Gi(vC),defaultValues:{name:"",type:"official",base_url:"",trust_level:.7,rate_limit_per_minute:30,respect_robots_txt:!0}}),b=async N=>{try{await p.mutateAsync({...N,base_url:N.base_url||null}),jt.success(r("sources.added","소스가 추가되었습니다: {{name}}",{name:N.name})),x()}catch(F){jt.error(r("sources.addFailed","추가 실패: {{msg}}",{msg:F.message}))}},P=async N=>{if(confirm(r("sources.confirmDelete","정말 '{{name}}' 소스를 삭제하시겠습니까?",{name:N})))try{await v.mutateAsync(N),jt.success(r("sources.deleted","소스가 삭제되었습니다: {{name}}",{name:N}))}catch(F){jt.error(r("sources.deleteFailed","삭제 실패: {{msg}}",{msg:F.message}))}};return u.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-10",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t("/"),"aria-label":r("common.back","이전"),children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:r("sources.title","참고 소스 설정")}),a&&u.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.name," ",u.jsxs("span",{className:"capitalize text-muted-foreground/70",children:["· ",a.domain]})]})]}),u.jsxs(Ee,{onClick:()=>t(`/crawl/${i}`),disabled:!a||(a.sources?.length??0)===0,children:[r("sources.next","크롤 진행"),u.jsx(Lv,{className:"h-4 w-4"})]})]}),d&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center justify-between gap-3 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),u.jsx("span",{children:f.message})]}),u.jsx(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>m(),children:r("common.retry","다시 시도")})]})}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_360px]",children:[u.jsx("section",{children:u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("sources.listTitle","등록된 소스")}),u.jsx(Qe,{children:r("sources.listDesc","프로젝트 온톨로지 구축에 사용할 참고 사이트 목록")})]}),u.jsxs(ye,{children:[l&&u.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((N,F)=>u.jsx(pn,{className:"h-16"},F))}),a&&a.sources.length===0&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:r("sources.empty","아직 등록된 소스가 없습니다. 오른쪽 폼에서 추가하세요.")}),a&&a.sources.length>0&&u.jsx("ul",{className:"divide-y",children:a.sources.map(N=>u.jsxs("li",{className:"flex items-center justify-between gap-4 py-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-medium",children:N.name}),u.jsx("span",{className:"rounded bg-secondary px-1.5 py-0.5 text-xs text-secondary-foreground",children:N.type}),typeof N.trust_level=="number"&&u.jsxs("span",{className:"text-xs text-muted-foreground",children:[r("sources.trust","신뢰도")," ",N.trust_level.toFixed(2)]})]}),N.base_url&&u.jsxs("a",{href:N.base_url,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[u.jsx(Mv,{className:"h-3 w-3"}),N.base_url]})]}),u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>P(N.name),disabled:v.isPending,"aria-label":r("sources.delete","삭제"),children:u.jsx(Kd,{className:"h-4 w-4 text-destructive"})})]},N.id))})]})]})}),u.jsx("aside",{children:u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("sources.addTitle","소스 추가")}),u.jsx(Qe,{children:r("sources.addDesc","참고할 사이트 정보를 입력하세요")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:y(b),className:"space-y-4",noValidate:!0,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"src_name",children:r("sources.name","이름")}),u.jsx(xt,{id:"src_name",placeholder:"official_brand_site",...w("name")}),S.name&&u.jsx("p",{className:"text-xs text-destructive",children:S.name.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"src_type",children:r("sources.type","타입")}),u.jsx("select",{id:"src_type",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",...w("type"),children:Px.map(N=>u.jsx("option",{value:N,children:N},N))})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"src_url",children:r("sources.baseUrl","Base URL")}),u.jsx(xt,{id:"src_url",placeholder:"https://example.com",type:"url",...w("base_url")}),S.base_url&&u.jsx("p",{className:"text-xs text-destructive",children:S.base_url.message})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"src_trust",children:r("sources.trust","신뢰도")}),u.jsx(xt,{id:"src_trust",type:"number",step:"0.05",min:0,max:1,...w("trust_level",{valueAsNumber:!0})}),S.trust_level&&u.jsx("p",{className:"text-xs text-destructive",children:S.trust_level.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"src_rate",children:r("sources.rateLimit","rate/분")}),u.jsx(xt,{id:"src_rate",type:"number",min:1,max:600,...w("rate_limit_per_minute",{valueAsNumber:!0})}),S.rate_limit_per_minute&&u.jsx("p",{className:"text-xs text-destructive",children:S.rate_limit_per_minute.message})]})]}),u.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[u.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...w("respect_robots_txt")}),u.jsx("span",{children:r("sources.respectRobots","robots.txt 준수")})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:_||p.isPending,children:[p.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(ri,{className:"h-4 w-4"}),r("sources.add","소스 추가")]})]})})]})})]})]})}const En=$.forwardRef(({className:t,children:e,...r},i)=>u.jsx("select",{ref:i,className:_t("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:e}));En.displayName="Select";const Ji=$.forwardRef(({className:t,value:e=0,max:r=100,indeterminate:i,...a},l)=>{const d=Math.min(100,Math.max(0,e/r*100));return u.jsx("div",{ref:l,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i?void 0:e,className:_t("relative h-2 w-full overflow-hidden rounded-full bg-secondary",t),...a,children:u.jsx("div",{className:_t("h-full bg-primary transition-all",i&&"w-1/3 animate-pulse"),style:i?void 0:{width:`${d}%`}})})});Ji.displayName="Progress";const wC=ox("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-800",warning:"border-transparent bg-yellow-100 text-yellow-800"}},defaultVariants:{variant:"default"}});function Xe({className:t,variant:e,...r}){return u.jsx("span",{className:_t(wC({variant:e}),t),...r})}const bC=nn([D(),Ne()]).transform(String),Ry=Be({url:D().optional(),status:D().optional(),page_type:D().optional(),title:D().nullable().optional(),error:D().nullable().optional()}).passthrough(),jC=Be({seed_url:D().optional(),visited_count:Ne().optional(),analyzed_count:Ne().optional(),queued_count:Ne().optional(),skipped_count:Ne().optional(),errors:it(D()).optional(),pages:it(Ry).optional(),latest_page:Ry.optional()}).passthrough(),jd=Be({job_id:bC,status:D(),url:D().nullable().optional(),error:D().nullable().optional(),scheduled_at:D().nullable().optional(),started_at:D().nullable().optional(),finished_at:D().nullable().optional(),progress:jC.default({}),request:li(D(),dn()).default({})}),_C=new Set(["completed","failed","canceled"]);function Ox(t){return _C.has(t)}const Hf={startByProject:t=>rt.post("/crawl-site/by-project",jd,t),getJob:t=>rt.get(`/crawl-site/jobs/${encodeURIComponent(t)}`,jd),cancel:t=>rt.post(`/crawl-site/jobs/${encodeURIComponent(t)}/cancel`,jd)},Ty=2e3;function SC(){const t=Kt();return gn({mutationFn:e=>Hf.startByProject(e),onSuccess:e=>{t.setQueryData(Ie.crawl.job(e.job_id),e)}})}function kC(t){return On({queryKey:Ie.crawl.job(t??""),queryFn:()=>Hf.getJob(t),enabled:!!t,refetchInterval:e=>{const r=e.state.data;return r&&Ox(r.status)?!1:Ty},refetchIntervalInBackground:!1})}function NC(){const t=Kt();return gn({mutationFn:e=>Hf.cancel(e),onSuccess:e=>{t.setQueryData(Ie.crawl.job(e.job_id),e)}})}const CC=Be({source_name:D().min(1,"소스를 선택하세요"),url:D().url("올바른 URL 형식이 아닙니다"),max_depth:Ne().int().min(0).max(10),max_pages:Ne().int().min(1).max(500),same_domain_only:Rr()});function EC(t){switch(t){case"completed":return"success";case"failed":return"destructive";case"canceled":return"secondary";case"cancel_requested":return"warning";case"running":case"pending":return"default";default:return"outline"}}function PC({status:t}){return u.jsx(Xe,{variant:EC(t),children:t})}function OC(){const t=mn(),{projectId:e}=fr(),{t:r}=oi(),i=e??"",{data:a,isLoading:l,isError:d,error:f,refetch:m}=hr(i),[p,v]=$.useState(null),{data:w}=kC(p),y=SC(),x=NC(),{register:S,handleSubmit:_,setValue:b,watch:P,formState:{errors:N,isSubmitting:F}}=Zi({resolver:Gi(CC),defaultValues:{source_name:"",url:"",max_depth:2,max_pages:30,same_domain_only:!0}}),L=async H=>{try{const W=await y.mutateAsync({project_name:i,...H});v(W.job_id),jt.success(r("crawl.started","크롤이 시작되었습니다 (job #{{id}})",{id:W.job_id}))}catch(W){jt.error(r("crawl.startFailed","시작 실패: {{msg}}",{msg:W.message}))}},k=async()=>{if(p)try{await x.mutateAsync(p),jt.info(r("crawl.cancelRequested","취소 요청됨"))}catch(H){jt.error(r("crawl.cancelFailed","취소 실패: {{msg}}",{msg:H.message}))}},I=a?.sources??[],X=P("source_name"),re=I.find(H=>H.name===X),de=w?.progress,Z=de?.visited_count??0,Oe=de?.queued_count??0,J=de?.analyzed_count??0,ve=de?.errors??[],me=P("max_pages"),M=w&&me?Math.min(100,Z/me*100):0,R=w?Ox(w.status):!1,G=w&&!R;return u.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-10",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":r("common.back","이전"),children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:r("crawl.title","시드 크롤")}),a&&u.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.name,u.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",a.domain]})]})]}),R&&w?.status==="completed"&&u.jsxs(Ee,{onClick:()=>t(`/pipeline/${i}`),children:[r("crawl.review","파이프라인 확인"),u.jsx(Lv,{className:"h-4 w-4"})]})]}),d&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center justify-between gap-3 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),u.jsx("span",{children:f.message})]}),u.jsx(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>m(),children:r("common.retry","다시 시도")})]})}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[420px_1fr]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("crawl.formTitle","크롤 설정")}),u.jsx(Qe,{children:r("crawl.formDesc","시드 URL에서 시작해 링크를 따라가며 정보를 추출합니다")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:_(L),className:"space-y-4",noValidate:!0,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"source_name",children:r("crawl.source","참고 소스")}),l?u.jsx(pn,{className:"h-10"}):u.jsxs(En,{id:"source_name",...S("source_name"),onChange:H=>{const W=H.target.value,K=I.find(T=>T.name===W);b("source_name",W,{shouldValidate:!0,shouldDirty:!0}),b("url",K?.base_url??"",{shouldValidate:!!K?.base_url,shouldDirty:!0})},children:[u.jsx("option",{value:"",children:r("crawl.pickSource","소스를 선택하세요...")}),I.map(H=>u.jsxs("option",{value:H.name,children:[H.name," (",H.type,")"]},H.id))]}),I.length===0&&!l&&u.jsxs("p",{className:"text-xs text-muted-foreground",children:[r("crawl.noSources","등록된 소스가 없습니다. 먼저 참고 소스를 추가하세요.")," ",u.jsx("button",{type:"button",className:"text-primary underline",onClick:()=>t(`/sources/${i}`),children:r("crawl.addSource","소스 추가")})]}),N.source_name&&u.jsx("p",{className:"text-xs text-destructive",children:N.source_name.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"url",children:r("crawl.seedUrl","시드 URL")}),u.jsx(xt,{id:"url",placeholder:re?.base_url??"https://example.com/start",...S("url")}),N.url&&u.jsx("p",{className:"text-xs text-destructive",children:N.url.message})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"max_depth",children:r("crawl.maxDepth","최대 깊이")}),u.jsx(xt,{id:"max_depth",type:"number",min:0,max:10,...S("max_depth",{valueAsNumber:!0})}),N.max_depth&&u.jsx("p",{className:"text-xs text-destructive",children:N.max_depth.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"max_pages",children:r("crawl.maxPages","최대 페이지")}),u.jsx(xt,{id:"max_pages",type:"number",min:1,max:500,...S("max_pages",{valueAsNumber:!0})}),N.max_pages&&u.jsx("p",{className:"text-xs text-destructive",children:N.max_pages.message})]})]}),u.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[u.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...S("same_domain_only")}),u.jsx("span",{children:r("crawl.sameDomainOnly","동일 도메인만 따라가기")})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:F||y.isPending||!!G,children:[y.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx($v,{className:"h-4 w-4"}),r("crawl.start","크롤 시작")]})]})})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:r("crawl.progressTitle","진행 상태")}),w&&u.jsxs(Qe,{className:"flex items-center gap-2",children:[u.jsxs("span",{children:["job #",w.job_id]}),u.jsx(PC,{status:w.status})]})]}),G&&u.jsxs(Ee,{variant:"outline",size:"sm",onClick:k,disabled:x.isPending,children:[u.jsx(aS,{className:"h-4 w-4"}),r("crawl.cancel","취소")]})]})}),u.jsxs(ye,{children:[!w&&u.jsxs("div",{className:"flex flex-col items-center gap-3 py-12 text-center text-muted-foreground",children:[u.jsx(yS,{className:"h-12 w-12 opacity-40"}),u.jsx("p",{children:r("crawl.idleHint","왼쪽에서 시드 URL을 입력하고 시작하세요")})]}),w&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"mb-1 flex items-center justify-between text-sm",children:[u.jsxs("span",{className:"text-muted-foreground",children:[r("crawl.visited","방문")," ",Z," / ",me]}),u.jsxs("span",{className:"text-muted-foreground",children:[r("crawl.queued","대기")," ",Oe," ·"," ",r("crawl.analyzed","분석")," ",J]})]}),u.jsx(Ji,{value:M,indeterminate:G&&Z===0})]}),w.url&&u.jsxs("div",{className:"rounded-md bg-secondary/30 px-3 py-2 text-xs",children:[u.jsx("div",{className:"text-muted-foreground",children:r("crawl.seedUrl","시드 URL")}),u.jsx("a",{href:w.url,target:"_blank",rel:"noopener noreferrer",className:"break-all text-foreground hover:underline",children:w.url})]}),de?.latest_page&&u.jsxs("div",{className:"rounded-md border bg-background px-3 py-2 text-xs",children:[u.jsx("div",{className:"mb-1 text-muted-foreground",children:r("crawl.latestPage","최근 페이지")}),u.jsx("div",{className:"truncate font-medium",children:de.latest_page.title||de.latest_page.url}),de.latest_page.page_type&&u.jsx(Xe,{variant:"outline",className:"mt-1",children:de.latest_page.page_type})]}),w.error&&u.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive bg-destructive/5 px-3 py-2 text-sm text-destructive",children:[u.jsx(OS,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),u.jsx("span",{children:w.error})]}),ve.length>0&&u.jsxs("details",{className:"rounded-md border bg-background",children:[u.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:r("crawl.errorsCount","에러 {{count}}건",{count:ve.length})}),u.jsx("ul",{className:"max-h-40 overflow-y-auto px-4 py-2 text-xs text-muted-foreground",children:ve.map((H,W)=>u.jsx("li",{className:"border-b py-1 last:border-0",children:H},W))})]}),R&&w.status==="completed"&&u.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-700",children:[u.jsx(_f,{className:"h-4 w-4"}),r("crawl.doneHint","크롤 완료. 구축 파이프라인으로 이동하세요.")]})]})]})]})]})]})}const ho=$.forwardRef(({className:t,...e},r)=>u.jsx("textarea",{ref:r,className:_t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e}));ho.displayName="Textarea";const pf=nn([D(),Ne()]).transform(String),RC=Be({job_id:pf.optional(),project_id:pf.optional(),project_name:D().optional(),goal:D().optional(),status:D().optional(),started_at:D().nullable().optional(),finished_at:D().nullable().optional(),steps_taken:Ne().optional(),pages_visited:Ne().optional(),entities_found:Ne().optional(),claims_added:Ne().optional(),error:D().nullable().optional()}).passthrough(),Rx=Be({job_id:pf,status:D().optional(),goal:D().nullable().optional(),seed_url:D().nullable().optional(),started_at:D().nullable().optional(),finished_at:D().nullable().optional(),steps_taken:Ne().nullable().optional(),pages_visited:Ne().nullable().optional(),entities_found:Ne().nullable().optional()}).passthrough(),TC=it(Rx),LC=Rx.extend({trace:it(li(D(),dn())).optional()}),Tx={startByProject:t=>rt.post("/research/run/by-project",RC,t),listSessions:(t,e=25)=>rt.get(`/projects/${encodeURIComponent(t)}/research/sessions`,TC,{query:{limit:e}}),getSession:t=>rt.get(`/research/sessions/${encodeURIComponent(t)}`,LC)};function AC(t){const e=Kt();return gn({mutationFn:r=>Tx.startByProject(r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.research.sessions(t)})}})}function IC(t,e=25){return On({queryKey:Ie.research.sessions(t),queryFn:()=>Tx.listSessions(t,e),enabled:!!t})}const MC=Be({source_name:D().min(1,"소스를 선택하세요"),url:D().url("올바른 URL 형식이 아닙니다").or(fx("")).optional(),goal:D().min(3,"최소 3자").max(500,"최대 500자"),max_depth:Ne().int().min(0).max(10),max_steps:Ne().int().min(1).max(50),max_branch:Ne().int().min(1).max(30),min_relevance:Ne().min(0).max(1),same_domain_only:Rr()});function FC(t){switch(t){case"completed":return"success";case"failed":return"destructive";case"canceled":return"secondary";case"running":case"pending":return"default";default:return"outline"}}function DC(){const t=mn(),{projectId:e}=fr(),{t:r}=oi(),i=e??"",{data:a,isLoading:l,isError:d,error:f,refetch:m}=hr(i),p=IC(i),v=AC(i),[w,y]=$.useState(null),{register:x,handleSubmit:S,setValue:_,formState:{errors:b,isSubmitting:P}}=Zi({resolver:Gi(MC),defaultValues:{source_name:"",url:"",goal:"Semantic ontology exploration",max_depth:2,max_steps:12,max_branch:8,min_relevance:.35,same_domain_only:!0}}),N=async L=>{try{y(null);const k=await v.mutateAsync({project_name:i,source_name:L.source_name,url:L.url||void 0,goal:L.goal,max_depth:L.max_depth,max_steps:L.max_steps,max_branch:L.max_branch,min_relevance:L.min_relevance,same_domain_only:L.same_domain_only});y(k),jt.success(r("research.completed","자율 연구가 완료되었습니다"))}catch(k){jt.error(r("research.failed","실패: {{msg}}",{msg:k.message}))}},F=a?.sources??[];return u.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-10",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":r("common.back","이전"),children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Av,{className:"h-6 w-6 text-primary"}),r("research.title","자율 연구")]}),a&&u.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.name,u.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",a.domain]})]})]})]}),d&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center justify-between gap-3 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),u.jsx("span",{children:f.message})]}),u.jsx(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>m(),children:r("common.retry","다시 시도")})]})}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[460px_1fr]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(ES,{className:"h-5 w-5"}),r("research.formTitle","자율 연구 설정")]}),u.jsx(Qe,{children:r("research.formDesc","AI가 시드에서 시작해 스스로 링크를 따라가며 온톨로지를 확장합니다")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:S(N),className:"space-y-4",noValidate:!0,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"source_name",children:r("research.source","참고 소스")}),l?u.jsx(pn,{className:"h-10"}):u.jsxs(En,{id:"source_name",...x("source_name"),onChange:L=>_("source_name",L.target.value,{shouldValidate:!0}),children:[u.jsx("option",{value:"",children:r("research.pickSource","소스를 선택하세요...")}),F.map(L=>u.jsxs("option",{value:L.name,children:[L.name," (",L.type,")"]},L.id))]}),b.source_name&&u.jsx("p",{className:"text-xs text-destructive",children:b.source_name.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"goal",children:r("research.goal","목표")}),u.jsx(ho,{id:"goal",rows:2,placeholder:r("research.goalPlaceholder","예: 인기 브랜드 향수의 노트 구성과 시즌 추천 정보 수집"),...x("goal")}),b.goal&&u.jsx("p",{className:"text-xs text-destructive",children:b.goal.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(Ye,{htmlFor:"url",children:[r("research.seedUrl","시드 URL")," ",u.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",r("research.optional","선택"),")"]})]}),u.jsx(xt,{id:"url",placeholder:"https://example.com/start",...x("url")}),b.url&&u.jsx("p",{className:"text-xs text-destructive",children:b.url.message})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"max_steps",children:r("research.maxSteps","최대 단계")}),u.jsx(xt,{id:"max_steps",type:"number",min:1,max:50,...x("max_steps",{valueAsNumber:!0})}),b.max_steps&&u.jsx("p",{className:"text-xs text-destructive",children:b.max_steps.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"max_branch",children:r("research.maxBranch","분기 폭")}),u.jsx(xt,{id:"max_branch",type:"number",min:1,max:30,...x("max_branch",{valueAsNumber:!0})}),b.max_branch&&u.jsx("p",{className:"text-xs text-destructive",children:b.max_branch.message})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"max_depth",children:r("research.maxDepth","최대 깊이")}),u.jsx(xt,{id:"max_depth",type:"number",min:0,max:10,...x("max_depth",{valueAsNumber:!0})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"min_relevance",children:r("research.minRelevance","최소 관련도")}),u.jsx(xt,{id:"min_relevance",type:"number",step:"0.05",min:0,max:1,...x("min_relevance",{valueAsNumber:!0})})]})]}),u.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[u.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-input",...x("same_domain_only")}),u.jsx("span",{children:r("research.sameDomainOnly","동일 도메인만 탐색")})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:P||v.isPending,children:[v.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(CS,{className:"h-4 w-4"}),r("research.start","자율 연구 시작")]}),v.isPending&&u.jsx("p",{className:"text-xs text-muted-foreground",children:r("research.runningHint","장시간 걸릴 수 있습니다. 완료될 때까지 페이지를 닫지 마세요.")})]})})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("research.resultTitle","최근 결과")}),u.jsx(Qe,{children:r("research.resultDesc","이번 세션에서 실행된 연구의 결과")})]}),u.jsxs(ye,{children:[!w&&!v.isPending&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:r("research.idleHint","왼쪽에서 자율 연구를 시작하면 결과가 여기에 표시됩니다")}),v.isPending&&u.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center text-muted-foreground",children:[u.jsx(dr,{className:"h-8 w-8 animate-spin text-primary"}),u.jsx("p",{children:r("research.runningTitle","AI가 연구 중입니다...")})]}),w&&!v.isPending&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-700",children:[u.jsx(_f,{className:"h-4 w-4"}),r("research.doneHint","완료")]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm sm:grid-cols-4",children:[u.jsx(Rl,{label:r("research.stepsTaken","단계"),value:w.steps_taken}),u.jsx(Rl,{label:r("research.pagesVisited","페이지"),value:w.pages_visited}),u.jsx(Rl,{label:r("research.entitiesFound","엔티티"),value:w.entities_found}),u.jsx(Rl,{label:r("research.claimsAdded","클레임"),value:w.claims_added})]}),w.error&&u.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-destructive bg-destructive/5 px-3 py-2 text-sm text-destructive",children:[u.jsx(fn,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),u.jsx("span",{children:w.error})]}),u.jsxs("details",{className:"rounded-md border bg-background",children:[u.jsx("summary",{className:"cursor-pointer px-3 py-2 text-sm font-medium",children:r("research.rawResult","원시 응답 JSON")}),u.jsx("pre",{className:"max-h-64 overflow-auto px-4 py-2 text-xs text-muted-foreground",children:JSON.stringify(w,null,2)})]})]})]})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(xS,{className:"h-5 w-5"}),r("research.historyTitle","세션 이력")]}),u.jsx(Qe,{children:r("research.historyDesc","이 프로젝트의 자율 연구 세션 기록")})]}),u.jsxs(ye,{children:[p.isLoading&&u.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((L,k)=>u.jsx(pn,{className:"h-12"},k))}),p.data&&p.data.length===0&&u.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:r("research.historyEmpty","아직 실행된 세션이 없습니다")}),p.data&&p.data.length>0&&u.jsx("ul",{className:"divide-y",children:p.data.map(L=>u.jsxs("li",{className:"flex items-center justify-between gap-3 py-3 text-sm",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"font-medium",children:["#",L.job_id]}),L.status&&u.jsx(Xe,{variant:FC(L.status),children:L.status})]}),L.goal&&u.jsx("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:L.goal})]}),u.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[typeof L.pages_visited=="number"&&u.jsxs("div",{children:[L.pages_visited," ",r("research.pages","페이지")]}),L.started_at&&u.jsx("div",{children:new Date(L.started_at).toLocaleString()})]})]},L.job_id))})]})]})]})]})]})}function Rl({label:t,value:e}){return u.jsxs("div",{className:"rounded-md border bg-background px-3 py-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 text-xl font-semibold",children:typeof e=="number"?e:"—"})]})}const Lx=$.createContext(null);function Ax(){const t=$.useContext(Lx);if(!t)throw new Error("Tabs primitives must be used within <Tabs>");return t}function $C({value:t,onValueChange:e,className:r,children:i}){return u.jsx(Lx.Provider,{value:{value:t,onChange:e},children:u.jsx("div",{className:_t("flex flex-col gap-3",r),children:i})})}function zC({className:t,children:e}){return u.jsx("div",{role:"tablist",className:_t("inline-flex h-10 items-center justify-start gap-1 rounded-md bg-muted p-1 text-muted-foreground",t),children:e})}function _d({value:t,children:e,className:r}){const i=Ax(),a=i.value===t;return u.jsx("button",{role:"tab",type:"button","aria-selected":a,onClick:()=>i.onChange(t),className:_t("inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",a?"bg-background text-foreground shadow-sm":"hover:text-foreground",r),children:e})}function Sd({value:t,children:e,className:r}){return Ax().value!==t?null:u.jsx("div",{role:"tabpanel",className:_t("focus-visible:outline-none",r),children:e})}const Ix=nn([D(),Ne()]).transform(String),Mx=Be({id:Ix,type:D(),name:D(),metadata:li(D(),dn()).default({})}),UC=it(Mx),VC=Be({created:Ne(),entities:it(Be({id:Ix,type:D(),name:D()}))}),Fx=Be({ok:Rr(),deleted:nn([D(),Ne()])}),du={list:(t,e,r=200)=>rt.get(`/projects/${encodeURIComponent(t)}/entities`,UC,{query:{limit:r,...e?{entity_type:e}:{}}}),create:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/entities`,Mx,e),bulkCreate:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/entities/bulk`,VC,e),delete:(t,e)=>rt.delete(`/projects/${encodeURIComponent(t)}/entities/${e}`,Fx)};function Dx(t,e){return On({queryKey:Ie.entities.list(t,e),queryFn:()=>du.list(t,e),enabled:!!t})}function BC(t){const e=Kt();return gn({mutationFn:r=>du.create(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.entities.all})}})}function qC(t){const e=Kt();return gn({mutationFn:r=>du.bulkCreate(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.entities.all})}})}function HC(t){const e=Kt();return gn({mutationFn:r=>du.delete(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.entities.all}),e.invalidateQueries({queryKey:Ie.claims.all})}})}const Wf=nn([D(),Ne()]).transform(String),WC=Be({id:Wf,subject:D().optional(),subject_type:D().optional(),predicate:D(),object:D().nullable().optional(),object_type:D().nullable().optional(),object_value:dn().nullable().optional(),source:D().nullable().optional(),page_url:D().nullable().optional(),confidence:Ne().optional(),confidence_reason:D().nullable().optional(),status:D().optional(),evidence_text:D().nullable().optional(),evidence_summary:D().nullable().optional(),page_type:D().nullable().optional(),source_zone:D().nullable().optional(),source_selector:D().nullable().optional(),extraction_method:D().nullable().optional(),validation_status:D().nullable().optional(),graph_merge_status:D().nullable().optional(),graph_merge_reason:D().nullable().optional(),confidence_breakdown:li(D(),dn()).nullable().optional(),review_required:Rr().nullable().optional(),review_reason:D().nullable().optional(),conflict_status:D().nullable().optional(),source_history:it(dn()).optional(),last_seen_at:D().optional()}).passthrough(),KC=it(WC),QC=Be({id:Wf,subject_entity_id:nn([D(),Ne()]).transform(String),predicate:D(),object_entity_id:nn([D(),Ne(),Df()]).nullable().optional(),object_value:dn().nullable().optional(),confidence:Ne(),status:D()}),ZC=Be({ok:Rr(),claim_id:Wf,status:D()}),fu={list:(t,e={})=>rt.get(`/projects/${encodeURIComponent(t)}/claims`,KC,{query:{limit:e.limit??100,include_candidates:e.includeCandidates,status:e.status}}),create:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/claims`,QC,e),delete:(t,e)=>rt.delete(`/projects/${encodeURIComponent(t)}/claims/${e}`,Fx),updateStatus:(t,e)=>rt.patch(`/claims/${encodeURIComponent(String(t))}/status`,ZC,e)};function hu(t,e={}){return On({queryKey:Ie.claims.list(t,e.status,e.limit),queryFn:()=>fu.list(t,{status:e.status,includeCandidates:e.includeCandidates,limit:e.limit}),enabled:!!t})}function GC(t){const e=Kt();return gn({mutationFn:r=>fu.create(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.claims.all})}})}function JC(t){const e=Kt();return gn({mutationFn:r=>fu.delete(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.claims.all})}})}function YC(t){const e=Kt();return gn({mutationFn:({claimId:r,status:i,reason:a})=>fu.updateStatus(r,{status:i,reason:a}),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.claims.all}),e.invalidateQueries({queryKey:Ie.platform.all}),e.invalidateQueries({queryKey:Ie.platform.pipeline(t)})}})}const XC=Be({entity_type:D().min(1,"타입을 선택하세요"),name:D().min(1,"이름을 입력하세요").max(240)}),e2=Be({source_name:D().min(1,"소스를 선택하세요"),subject_entity_id:Ne().int().min(1,"주어 엔티티 선택"),predicate:D().min(1,"술어를 선택하세요"),object_kind:hx(["entity","value"]),object_entity_id:Ne().int().nullable().optional(),object_value:D().optional(),confidence:Ne().min(0).max(1)});function t2(){const t=mn(),{projectId:e}=fr(),{t:r}=oi(),i=e??"",[a,l]=$.useState("entities"),{data:d,isLoading:f,isError:m,error:p,refetch:v}=hr(i),{data:w}=Cx(d?.domain),y=Dx(i),x=hu(i,{includeCandidates:!0}),S=BC(i),_=qC(i),b=HC(i),P=GC(i),N=JC(i),F=d?.sources??[],L=$.useMemo(()=>w?.entity_types?.length?w.entity_types:["Entity","Concept","Attribute"],[w]),k=$.useMemo(()=>w?.predicates?.length?w.predicates:["hasAttribute","relatedTo","sameAs"],[w]),I=Zi({resolver:Gi(XC),defaultValues:{entity_type:"",name:""}}),X=async R=>{try{await S.mutateAsync({entity_type:R.entity_type,name:R.name}),jt.success(r("editor.entityAdded","엔티티가 추가되었습니다: {{name}}",{name:R.name})),I.reset({entity_type:R.entity_type,name:""})}catch(G){jt.error(r("editor.entityAddFailed","추가 실패: {{msg}}",{msg:G.message}))}},re=Zi({resolver:Gi(e2),defaultValues:{source_name:"",subject_entity_id:0,predicate:"",object_kind:"entity",object_entity_id:null,object_value:"",confidence:1}}),de=re.watch("object_kind"),Z=async R=>{try{await P.mutateAsync({source_name:R.source_name,subject_entity_id:R.subject_entity_id,predicate:R.predicate,object_entity_id:R.object_kind==="entity"?R.object_entity_id:null,object_value:R.object_kind==="value"?R.object_value:void 0,confidence:R.confidence}),jt.success(r("editor.claimAdded","클레임이 추가되었습니다")),re.reset({...re.getValues(),object_entity_id:null,object_value:""})}catch(G){jt.error(r("editor.claimAddFailed","추가 실패: {{msg}}",{msg:G.message}))}},[Oe,J]=$.useState(JSON.stringify({entities:[{entity_type:"Entity",name:"Example A"},{entity_type:"Entity",name:"Example B"}]},null,2)),[ve,me]=$.useState(null),M=async()=>{me(null);try{const R=JSON.parse(Oe),G=Array.isArray(R.entities)?R.entities:Array.isArray(R)?R:null;if(!G||G.length===0)throw new Error("최상위에 entities 배열이 있어야 합니다");const H=G.map((K,T)=>{if(typeof K!="object"||K===null||typeof K.entity_type!="string"||typeof K.name!="string")throw new Error(`항목 [${T}]에 entity_type/name 문자열이 필요합니다`);return{entity_type:K.entity_type,name:K.name,metadata:typeof K.metadata=="object"&&K.metadata!==null?K.metadata:{}}}),W=await _.mutateAsync({entities:H});jt.success(r("editor.bulkAdded","{{count}}개 엔티티가 추가되었습니다",{count:W.created}))}catch(R){me(R.message)}};return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/sources/${i}`),"aria-label":r("common.back","이전"),children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Cf,{className:"h-6 w-6 text-primary"}),r("editor.title","온톨로지 직접 편집")]}),d&&u.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.name,u.jsxs("span",{className:"capitalize text-muted-foreground/70",children:[" ","· ",d.domain]})]})]})]}),m&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center justify-between gap-3 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),u.jsx("span",{children:p.message})]}),u.jsx(Ee,{variant:"outline",size:"sm",type:"button",onClick:()=>v(),children:r("common.retry","다시 시도")})]})}),u.jsxs($C,{value:a,onValueChange:R=>l(R),children:[u.jsxs(zC,{children:[u.jsxs(_d,{value:"entities",children:[r("editor.entitiesTab","엔티티")," (",y.data?.length??0,")"]}),u.jsxs(_d,{value:"claims",children:[u.jsx(bS,{className:"mr-1 h-4 w-4"}),r("editor.claimsTab","클레임")," (",x.data?.length??0,")"]}),u.jsxs(_d,{value:"bulk",children:[u.jsx(Wd,{className:"mr-1 h-4 w-4"}),r("editor.bulkTab","JSON 일괄 입력")]})]}),u.jsx(Sd,{value:"entities",children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[380px_1fr]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("editor.addEntity","엔티티 추가")}),u.jsx(Qe,{children:r("editor.addEntityDesc","온톨로지 도메인의 entity_types 중에서 선택")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:I.handleSubmit(X),className:"space-y-3",noValidate:!0,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.entityType","타입")}),u.jsxs(En,{...I.register("entity_type"),children:[u.jsx("option",{value:"",children:r("editor.pickType","타입 선택...")}),L.map(R=>u.jsx("option",{value:R,children:R},R))]}),I.formState.errors.entity_type&&u.jsx("p",{className:"text-xs text-destructive",children:I.formState.errors.entity_type.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.entityName","이름")}),u.jsx(xt,{placeholder:"Chanel No.5",...I.register("name")}),I.formState.errors.name&&u.jsx("p",{className:"text-xs text-destructive",children:I.formState.errors.name.message})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:S.isPending,children:[S.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(ri,{className:"h-4 w-4"}),r("editor.add","추가")]})]})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("editor.entitiesList","엔티티 목록")}),u.jsx(Qe,{children:y.data?r("editor.entityCount","{{count}}개",{count:y.data.length}):r("dashboard.loadFailed","")})]}),u.jsxs(ye,{children:[y.isLoading&&u.jsx("div",{className:"space-y-2",children:Array.from({length:4}).map((R,G)=>u.jsx(pn,{className:"h-10"},G))}),y.data&&y.data.length===0&&u.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:r("editor.entitiesEmpty","아직 등록된 엔티티가 없습니다")}),y.data&&y.data.length>0&&u.jsx("ul",{className:"max-h-[600px] divide-y overflow-y-auto",children:y.data.map(R=>u.jsxs("li",{className:"flex items-center justify-between gap-3 py-2 text-sm",children:[u.jsx("div",{className:"min-w-0 flex-1",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Xe,{variant:"outline",children:R.type}),u.jsx("span",{className:"truncate font-medium",children:R.name})]})}),u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>{confirm(r("editor.confirmDeleteEntity","엔티티 '{{name}}'을 삭제하시겠습니까?",{name:R.name}))&&b.mutate(R.id)},disabled:b.isPending,children:u.jsx(Kd,{className:"h-4 w-4 text-destructive"})})]},R.id))})]})]})]})}),u.jsx(Sd,{value:"claims",children:u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[420px_1fr]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("editor.addClaim","클레임 추가")}),u.jsx(Qe,{children:r("editor.addClaimDesc","주어-술어-목적어 형태로 직접 입력")})]}),u.jsx(ye,{children:u.jsxs("form",{onSubmit:re.handleSubmit(Z),className:"space-y-3",noValidate:!0,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.source","소스")}),u.jsxs(En,{...re.register("source_name"),children:[u.jsx("option",{value:"",children:r("editor.pickSource","소스 선택...")}),F.map(R=>u.jsx("option",{value:R.name,children:R.name},R.id))]}),re.formState.errors.source_name&&u.jsx("p",{className:"text-xs text-destructive",children:re.formState.errors.source_name.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.subject","주어 (Subject)")}),u.jsxs(En,{...re.register("subject_entity_id",{valueAsNumber:!0}),children:[u.jsx("option",{value:0,children:r("editor.pickSubject","엔티티 선택...")}),y.data?.map(R=>u.jsxs("option",{value:R.id,children:["[",R.type,"] ",R.name]},R.id))]}),re.formState.errors.subject_entity_id&&u.jsx("p",{className:"text-xs text-destructive",children:re.formState.errors.subject_entity_id.message})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.predicate","술어 (Predicate)")}),u.jsxs(En,{...re.register("predicate"),children:[u.jsx("option",{value:"",children:r("editor.pickPredicate","술어 선택...")}),k.map(R=>u.jsx("option",{value:R,children:R},R))]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.objectKind","목적어 유형")}),u.jsxs(En,{...re.register("object_kind"),children:[u.jsx("option",{value:"entity",children:r("editor.objectEntity","다른 엔티티")}),u.jsx("option",{value:"value",children:r("editor.objectValue","리터럴 값")})]})]}),de==="entity"?u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.objectEntity","목적 엔티티")}),u.jsxs(En,{...re.register("object_entity_id",{valueAsNumber:!0,setValueAs:R=>R===""||R===null||R===void 0?null:Number(R)}),children:[u.jsx("option",{value:"",children:r("editor.pickObject","엔티티 선택...")}),y.data?.map(R=>u.jsxs("option",{value:R.id,children:["[",R.type,"] ",R.name]},R.id))]})]}):u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.objectValue","값")}),u.jsx(xt,{placeholder:"2024-01-15 또는 임의 문자열",...re.register("object_value")})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{children:r("editor.confidence","신뢰도")}),u.jsx(xt,{type:"number",step:"0.05",min:0,max:1,...re.register("confidence",{valueAsNumber:!0})})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:P.isPending,children:[P.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(ri,{className:"h-4 w-4"}),r("editor.add","추가")]})]})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("editor.claimsList","클레임 목록")}),u.jsx(Qe,{children:x.data&&r("editor.claimCount","{{count}}개",{count:x.data.length})})]}),u.jsxs(ye,{children:[x.isLoading&&u.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((R,G)=>u.jsx(pn,{className:"h-12"},G))}),x.data&&x.data.length===0&&u.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:r("editor.claimsEmpty","아직 등록된 클레임이 없습니다")}),x.data&&x.data.length>0&&u.jsx("ul",{className:"max-h-[600px] divide-y overflow-y-auto",children:x.data.map(R=>u.jsxs("li",{className:"flex items-start justify-between gap-3 py-3 text-sm",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[u.jsx("span",{className:"font-medium",children:R.subject??"?"}),u.jsx(Xe,{variant:"secondary",children:R.predicate}),u.jsx("span",{className:"font-medium",children:R.object??String(R.object_value??"—")})]}),u.jsxs("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-muted-foreground",children:[u.jsxs("span",{children:[r("editor.source","소스"),": ",R.source??"—"]}),typeof R.confidence=="number"&&u.jsxs("span",{children:[r("editor.confidence","신뢰도"),":"," ",R.confidence.toFixed(2)]}),R.status&&u.jsx(Xe,{variant:"outline",children:R.status})]})]}),u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>{confirm(r("editor.confirmDeleteClaim","클레임을 삭제하시겠습니까?"))&&N.mutate(R.id)},children:u.jsx(Kd,{className:"h-4 w-4 text-destructive"})})]},R.id))})]})]})]})}),u.jsx(Sd,{value:"bulk",children:u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:r("editor.bulkTitle","JSON 일괄 입력")}),u.jsx(Qe,{children:r("editor.bulkDesc","{ entities: [{ entity_type, name, metadata? }] } 형태의 JSON")})]}),u.jsxs(ye,{className:"space-y-3",children:[u.jsx(ho,{value:Oe,onChange:R=>J(R.target.value),rows:12,className:"font-mono text-xs"}),ve&&u.jsx("p",{className:"text-sm text-destructive",children:ve}),u.jsxs(Ee,{onClick:M,disabled:_.isPending||f,children:[_.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(Wd,{className:"h-4 w-4"}),r("editor.bulkSubmit","일괄 추가")]})]})]})})]})]})}function Ct(t,e="-"){if(t==null||t==="")return e;if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)){const r=t.map(i=>Ct(i,"")).filter(Boolean);return r.length?r.join(", "):e}if(typeof t=="object"){const r=t;for(const a of["label","name","title","value","text","display","canonical_name"])if(r[a]!==void 0&&r[a]!==null)return Ct(r[a],e);const i=Object.entries(r).filter(([,a])=>a!=null&&a!=="").slice(0,4).map(([a,l])=>`${a}: ${Ct(l,"")}`).filter(a=>!a.endsWith(": "));return i.length?i.join(" · "):e}return String(t)}function tn(t,e="-"){return typeof t!="number"||Number.isNaN(t)?e:`${Math.round(t*100)}%`}function ai(t,e="-"){if(typeof t!="string"||!t)return e;const r=new Date(t);return Number.isNaN(r.getTime())?t:r.toLocaleString()}function Ys(t){switch((t??"").toLowerCase()){case"validated_claim":return"approved";case"rejected":return"rejected";case"active":case"candidate_claim":case"rule_candidate":return"candidate";default:return t||"candidate"}}function Ly(t){switch(Ys(t)){case"approved":return"success";case"rejected":return"destructive";case"candidate":return"warning";default:return"outline"}}function n2(t){return typeof t.confidence!="number"?"unknown":t.confidence>=.9?"auto-approve candidate":t.confidence>=.7?"normal review":"priority review"}function Ay(t){return Ct(t.object??t.object_value)}function r2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),a=hu(r,{includeCandidates:!0,limit:300}),l=YC(r),[d,f]=$.useState("all"),[m,p]=$.useState(""),[v,w]=$.useState(null),y=$.useMemo(()=>{const b=m.trim().toLowerCase();return(a.data??[]).filter(P=>d!=="all"&&Ys(P.status)!==d?!1:b?[P.subject,P.predicate,Ay(P),P.evidence_text,P.page_url,P.source].map(N=>Ct(N,"").toLowerCase()).some(N=>N.includes(b)):!0)},[a.data,m,d]),x=$.useMemo(()=>y.find(b=>b.id===v)??y[0],[y,v]),S=$.useMemo(()=>{const b=a.data??[];return{total:b.length,candidate:b.filter(P=>Ys(P.status)==="candidate").length,approved:b.filter(P=>Ys(P.status)==="approved").length,rejected:b.filter(P=>Ys(P.status)==="rejected").length}},[a.data]),_=async(b,P)=>{try{await l.mutateAsync({claimId:b.id,status:P,reason:P==="rejected"?"Rejected from Claim Review":"Updated from Claim Review"}),jt.success(`Claim ${P}`)}catch(N){jt.error(N.message)}};return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/schema/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Nf,{className:"h-6 w-6 text-primary"}),"Claim Review"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," · 후보, 승인, 반려 상태 분리 검토"]})]}),u.jsx(Ee,{onClick:()=>t(`/quality/${r}`),children:"Quality Inspector"})]}),a.isError&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),a.error.message]})}),u.jsxs("div",{className:"mb-6 grid gap-4 md:grid-cols-4",children:[u.jsx(Tl,{label:"Total",value:S.total}),u.jsx(Tl,{label:"Candidate",value:S.candidate}),u.jsx(Tl,{label:"Approved",value:S.approved}),u.jsx(Tl,{label:"Rejected",value:S.rejected})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_420px]",children:[u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:"Review Queue"}),u.jsx(Qe,{children:"신뢰도, 출처, 생성 방식, 검증 결과를 함께 확인합니다."})]}),u.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Vv,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),u.jsx(xt,{value:m,onChange:b=>p(b.target.value),className:"w-56 pl-9",placeholder:"Search claims"})]}),u.jsxs("div",{className:"relative",children:[u.jsx(mS,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),u.jsxs(En,{value:d,onChange:b=>f(b.target.value),className:"w-40 pl-9",children:[u.jsx("option",{value:"all",children:"All"}),u.jsx("option",{value:"candidate",children:"Candidate"}),u.jsx("option",{value:"approved",children:"Approved"}),u.jsx("option",{value:"rejected",children:"Rejected"})]})]})]})]})}),u.jsxs(ye,{children:[a.isLoading&&u.jsx("div",{className:"space-y-3",children:Array.from({length:5}).map((b,P)=>u.jsx(pn,{className:"h-24"},P))}),!a.isLoading&&y.length===0&&u.jsx("p",{className:"py-10 text-center text-sm text-muted-foreground",children:"조건에 맞는 클레임이 없습니다."}),u.jsx("div",{className:"space-y-3",children:y.map(b=>u.jsx("article",{className:"rounded-md border bg-background p-4",children:u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("button",{type:"button",onClick:()=>w(b.id),className:"min-w-0 flex-1 text-left",children:[u.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[u.jsx(Xe,{variant:Ly(b.status),children:Ys(b.status)}),u.jsx(Xe,{variant:"secondary",children:b.predicate}),u.jsx("span",{className:"text-xs text-muted-foreground",children:n2(b)})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[u.jsx("span",{className:"font-medium",children:Ct(b.subject)}),u.jsx("span",{className:"text-muted-foreground",children:"->"}),u.jsx("span",{className:"font-medium",children:Ay(b)})]}),u.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-muted-foreground",children:[u.jsxs("span",{children:["Confidence ",tn(b.confidence)]}),u.jsxs("span",{children:["Source ",Ct(b.source)]}),u.jsxs("span",{children:["Evidence ",b.evidence_text?"yes":"missing"]}),u.jsxs("span",{children:["Method ",Ct(b.extraction_method)]})]})]}),u.jsxs("div",{className:"flex gap-1",children:[u.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>w(b.id),children:[u.jsx(fS,{className:"h-4 w-4"}),"Detail"]}),u.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>_(b,"validated_claim"),disabled:l.isPending,children:[u.jsx(Dg,{className:"h-4 w-4"}),"Approve"]}),u.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>_(b,"rejected"),disabled:l.isPending,children:[u.jsx(zg,{className:"h-4 w-4"}),"Reject"]})]})]})},b.id))})]})]}),u.jsx("aside",{className:"lg:sticky lg:top-4 lg:self-start",children:u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Claim Detail"}),u.jsx(Qe,{children:"근거, 출처, 검증 결과, 히스토리"})]}),u.jsxs(ye,{children:[!x&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"클레임을 선택하세요."}),x&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Xe,{variant:Ly(x.status),children:Ys(x.status)}),u.jsx(Xe,{variant:"outline",children:tn(x.confidence)}),x.review_required&&u.jsx(Xe,{variant:"warning",children:"review required"})]}),u.jsx(jr,{label:"Subject",value:x.subject}),u.jsx(jr,{label:"Subject Type",value:x.subject_type}),u.jsx(jr,{label:"Predicate",value:x.predicate}),u.jsx(jr,{label:"Object",value:x.object??x.object_value}),u.jsx(jr,{label:"Source",value:x.source}),u.jsx(jr,{label:"Source URL",value:x.page_url}),u.jsx(jr,{label:"Page Type",value:x.page_type}),u.jsx(jr,{label:"Created By",value:x.extraction_method}),u.jsx(jr,{label:"Validation",value:x.validation_status??x.graph_merge_status}),x.graph_merge_reason&&u.jsx(jr,{label:"Graph Reason",value:x.graph_merge_reason}),x.evidence_text&&u.jsxs("section",{children:[u.jsx("h3",{className:"mb-2 text-sm font-medium",children:"Evidence Text"}),u.jsx("div",{className:"rounded-md bg-yellow-50 px-3 py-2 text-sm leading-relaxed text-yellow-950",children:x.evidence_text})]}),x.confidence_breakdown&&u.jsxs("section",{children:[u.jsx("h3",{className:"mb-2 text-sm font-medium",children:"Confidence Breakdown"}),u.jsx("pre",{className:"max-h-44 overflow-auto rounded-md bg-secondary/30 p-3 text-xs",children:JSON.stringify(x.confidence_breakdown,null,2)})]}),x.source_history&&x.source_history.length>0&&u.jsxs("section",{children:[u.jsx("h3",{className:"mb-2 text-sm font-medium",children:"Source History"}),u.jsx("pre",{className:"max-h-44 overflow-auto rounded-md bg-secondary/30 p-3 text-xs",children:JSON.stringify(x.source_history,null,2)})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-2 pt-2",children:[u.jsxs(Ee,{onClick:()=>_(x,"validated_claim"),disabled:l.isPending,children:[u.jsx(Dg,{className:"h-4 w-4"}),"Approve"]}),u.jsxs(Ee,{variant:"outline",onClick:()=>_(x,"rejected"),disabled:l.isPending,children:[u.jsx(zg,{className:"h-4 w-4"}),"Reject"]})]}),u.jsxs("div",{className:"text-xs text-muted-foreground",children:["Last seen ",ai(x.last_seen_at)]})]})]})]})})]})]})}function Tl({label:t,value:e}){return u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 text-2xl font-semibold",children:e.toLocaleString()})]})})}function jr({label:t,value:e}){return u.jsxs("div",{className:"rounded-md border bg-background px-3 py-2 text-sm",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 break-words font-medium",children:Ct(e)})]})}const Pn=nn([D(),Ne()]).transform(String),Qr=li(D(),dn()),s2=Be({key:D(),count:Ne().default(0),extra:Qr.optional()}).passthrough(),i2=Be({stages:it(s2).default([]),entity_types:it(Be({type:D(),count:Ne()})).default([]),recent_pages:it(Be({id:Pn,url:D(),title:D().nullable().optional(),status_code:Ne().nullable().optional(),page_type:D().nullable().optional(),fetched_at:D().nullable().optional()}).passthrough()).default([]),recent_claims:it(Be({id:Pn,subject:D().nullable().optional(),predicate:D(),confidence:Ne().optional(),status:D().optional(),last_seen_at:D().nullable().optional()}).passthrough()).default([])}).passthrough(),a2=Be({id:Pn,page_url:D().nullable().optional(),extractor_name:D(),provider:D(),error:D().nullable().optional(),created_at:D(),validation:dn().optional(),page_context:dn().optional(),candidate_count:Ne().default(0),raw_output:dn().optional()}).passthrough(),o2=Be({entity_types:it(Be({id:Pn,name:D(),domain:D().optional(),description:D().nullable().optional(),status:D().optional(),version:D().optional(),confidence:Ne().optional(),metadata:Qr.optional()}).passthrough()).default([]),relation_types:it(Be({id:Pn,name:D(),domain:D().optional(),description:D().nullable().optional(),allowed_subject_types:it(D()).default([]),allowed_object_types:it(D()).default([]),allowed_page_types:it(D()).default([]),allowed_source_zones:it(D()).default([]),semantic_constraints:Qr.default({}),confidence_rules:Qr.default({}),status:D().optional(),version:D().optional(),confidence:Ne().optional(),metadata:Qr.optional()}).passthrough()).default([])}).passthrough(),l2=Be({id:Pn,proposal_type:D(),name:D(),reason:D().nullable().optional(),evidence:D().nullable().optional(),status:D(),confidence:Ne().optional(),metadata:Qr.optional(),updated_at:D().nullable().optional()}).passthrough(),u2=Be({id:Pn,claim_id:nn([D(),Ne(),Df()]).nullable().optional(),subject:D().nullable().optional(),subject_type:D().nullable().optional(),predicate:D(),object:D().nullable().optional(),object_type:D().nullable().optional(),object_value:dn().nullable().optional(),value_type:D().optional(),status:D().optional(),confidence:Ne().optional(),support_count:Ne().optional(),metadata:Qr.optional(),last_seen_at:D().nullable().optional()}).passthrough(),c2=Be({id:Pn,name:D(),type:D().optional(),canonical_name:D().nullable().optional(),metadata:Qr.optional()}).passthrough(),d2=Be({claim_id:Pn,source:Pn,target:nn([D(),Ne(),Df()]).nullable().optional(),target_value:dn().nullable().optional(),predicate:D(),status:D().optional(),confidence:Ne().optional(),last_seen_at:D().nullable().optional(),metadata:Qr.optional(),object:Be({id:Pn,name:D()}).nullable().optional()}).passthrough(),f2=Be({nodes:it(c2).default([]),edges:it(d2).default([])}).passthrough(),h2=Be({project:D(),status:D(),count:Ne(),claims:it(li(D(),dn())).default([])}).passthrough(),p2=Be({ok:Rr().optional(),stage:D(),action:D(),route:D().optional(),message:D().optional(),job_id:Pn.optional(),status:D().optional()}).passthrough(),m2=Be({id:Pn,name:D(),domain:D().optional(),status:D().optional()}).passthrough(),g2=Be({id:Pn,name:D(),domain:D().optional(),status:D().optional()}).passthrough(),Qn={pipeline:t=>rt.get(`/projects/${encodeURIComponent(t)}/pipeline`,i2),extractionLogs:(t,e=50)=>rt.get(`/projects/${encodeURIComponent(t)}/extraction-logs`,it(a2),{query:{limit:e}}),registry:t=>rt.get(`/projects/${encodeURIComponent(t)}/ontology/registry`,o2),proposals:(t,e=100)=>rt.get(`/projects/${encodeURIComponent(t)}/ontology/proposals`,it(l2),{query:{limit:e}}),triples:(t,e,r=200)=>rt.get(`/projects/${encodeURIComponent(t)}/ontology/triples`,it(u2),{query:{status:e,limit:r}}),graphNeighborhood:(t,e={})=>rt.get(`/projects/${encodeURIComponent(t)}/graph/neighborhood`,f2,{query:{entity_id:e.entityId,limit:e.limit??200,include_candidates:e.includeCandidates,status:e.status}}),exportJson:(t,e={})=>rt.get(`/projects/${encodeURIComponent(t)}/export`,h2,{query:{format:"json",status:e.status??"validated_claim",include_evidence:e.includeEvidence??!0,limit:e.limit??1e3}}),exportUrl:(t,e,r="validated_claim",i=!0,a=1e3)=>{const l=new URLSearchParams({format:e,status:r,include_evidence:String(i),limit:String(a)});return`/projects/${encodeURIComponent(t)}/export?${l.toString()}`},rerunStage:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/pipeline/rerun`,p2,{stage:e}),createSchemaEntityType:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/schema/entity-types`,m2,e),createSchemaRelationType:(t,e)=>rt.post(`/projects/${encodeURIComponent(t)}/schema/relation-types`,g2,e)};function Kf(t){return On({queryKey:Ie.platform.pipeline(t),queryFn:()=>Qn.pipeline(t),enabled:!!t})}function y2(t,e=50){return On({queryKey:Ie.platform.extractionLogs(t,e),queryFn:()=>Qn.extractionLogs(t,e),enabled:!!t})}function $x(t){return On({queryKey:Ie.platform.registry(t),queryFn:()=>Qn.registry(t),enabled:!!t})}function v2(t,e=100){return On({queryKey:Ie.platform.proposals(t,e),queryFn:()=>Qn.proposals(t,e),enabled:!!t})}function x2(t,e={}){const r=e.entityId==null?"*":String(e.entityId),i=e.status??"*",a=e.limit??200;return On({queryKey:Ie.platform.graph(t,r,!!e.includeCandidates,i,a),queryFn:()=>Qn.graphNeighborhood(t,e),enabled:!!t})}function w2(t,e={}){const r=e.status??"validated_claim",i=e.includeEvidence??!0,a=e.limit??1e3;return On({queryKey:Ie.platform.exportJson(t,r,i,a),queryFn:()=>Qn.exportJson(t,{status:r,includeEvidence:i,limit:a}),enabled:!!t})}function b2(t){const e=Kt();return gn({mutationFn:r=>Qn.rerunStage(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.platform.pipeline(t)})}})}function j2(t){const e=Kt();return gn({mutationFn:r=>Qn.createSchemaEntityType(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.platform.registry(t)})}})}function _2(t){const e=Kt();return gn({mutationFn:r=>Qn.createSchemaRelationType(t,r),onSuccess:()=>{e.invalidateQueries({queryKey:Ie.platform.registry(t)})}})}function S2(t){const e=new Date(t);return Number.isNaN(e.getTime())?t:e.toLocaleString()}function k2(){const t=mn(),{t:e}=oi(),{data:r,isLoading:i,isError:a,error:l,refetch:d}=px();return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10",children:[u.jsxs("div",{className:"mb-8 flex items-start justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e("dashboard.title","Ontology Builder")}),u.jsx("p",{className:"mt-2 text-muted-foreground",children:e("dashboard.subtitle","Build and manage domain ontologies with AI-powered extraction")})]}),u.jsxs(Ee,{onClick:()=>t("/onboard"),children:[u.jsx(ri,{className:"h-4 w-4"}),e("dashboard.newProject","New Project")]})]}),u.jsxs("section",{children:[u.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[u.jsx("h2",{className:"text-lg font-semibold",children:e("dashboard.projects","Projects")}),r&&u.jsx("span",{className:"text-sm text-muted-foreground",children:e("dashboard.projectCount","{{count}} total",{count:r.length})})]}),i&&u.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((f,m)=>u.jsx(pn,{className:"h-32"},m))}),a&&u.jsxs(ge,{className:"border-destructive",children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2 text-destructive",children:[u.jsx(fn,{className:"h-5 w-5"}),e("dashboard.loadFailed","Failed to load projects")]}),u.jsx(Qe,{children:l.message})]}),u.jsx(ye,{children:u.jsx(Ee,{variant:"outline",onClick:()=>d(),children:e("common.retry","Retry")})})]}),r&&r.length===0&&u.jsx(ge,{children:u.jsxs(ye,{className:"flex flex-col items-center gap-4 py-12 text-center",children:[u.jsx(gS,{className:"h-12 w-12 text-muted-foreground"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-medium",children:e("dashboard.empty.title","No projects yet")}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e("dashboard.empty.hint","Create your first project to start building an ontology")})]}),u.jsxs(Ee,{onClick:()=>t("/onboard"),children:[u.jsx(ri,{className:"h-4 w-4"}),e("dashboard.newProject","New Project")]})]})}),r&&r.length>0&&u.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(f=>u.jsx(N2,{project:f,onOpen:t},f.id))})]})]})}function N2({project:t,onOpen:e}){const r=Kf(t.name),i=r.data?.stages.find(p=>p.key==="claims"),a=r.data?.stages.find(p=>p.key==="validated"),l=r.data?.stages.find(p=>p.key==="crawled"),d=i?.count??0,f=a?.count??0,m=d>0?f/d:0;return u.jsxs(ge,{role:"button",tabIndex:0,onClick:()=>e(`/sources/${t.name}`),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&e(`/sources/${t.name}`)},className:"cursor-pointer transition-colors hover:bg-accent/40",children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:t.name}),u.jsx(Qe,{children:t.domain})]}),u.jsxs(ye,{children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[u.jsx(kd,{label:"Pages",value:l?.count??0}),u.jsx(kd,{label:"Claims",value:d}),u.jsx(kd,{label:"Approved",value:tn(m)})]}),u.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx(cS,{className:"h-3 w-3"}),S2(t.updated_at)]})]})]})}function kd({label:t,value:e}){return u.jsxs("div",{className:"rounded-md border bg-background px-2 py-1",children:[u.jsx("div",{className:"text-muted-foreground",children:t}),u.jsx("div",{className:"font-semibold",children:typeof e=="number"?e.toLocaleString():e})]})}const C2=new Set(["human-review","ontology-commit","export"]);function Wn(t){return typeof t=="number"&&Number.isFinite(t)?t:0}function E2(t){switch(t){case"done":return"success";case"running":return"default";case"issue":return"warning";default:return"outline"}}function P2(t){return t.key==="human-review"?"Open review":t.key==="ontology-commit"?"Open graph":t.key==="export"?"Open export":"Rerun"}function O2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),a=Kf(r),l=b2(r),[d,f]=$.useState(null),m=$.useMemo(()=>{const y=a.data?.stages??[],x=new Map(y.map(Z=>[Z.key,Z])),S=Wn(x.get("crawled")?.count),_=Wn(x.get("extracted")?.count),b=Wn(x.get("extracted")?.extra?.events),P=Wn(x.get("extracted")?.extra?.errors),N=x.get("claims")?.extra??{},F=Wn(x.get("claims")?.count),L=Wn(x.get("validated")?.count),k=Wn(N.rejected),I=Wn(N.active)+Wn(N.rule_candidate)+Wn(N.candidate_claim),X=Wn(x.get("graph")?.count),re=Wn(x.get("graph")?.extra?.entities),de=a.data?.recent_pages.filter(Z=>Z.page_type).length??0;return[{key:"source-crawl",name:"Source Crawl",description:"Fetch source HTML, metadata, and in-domain links.",count:S,target:Math.max(S,1),status:S>0?"done":"waiting"},{key:"page-clean",name:"Page Clean",description:"Normalize page text and remove repeated UI noise.",count:S,target:Math.max(S,1),status:S>0?"done":"waiting"},{key:"page-classification",name:"Page Classification",description:"Classify product, brand, review, and supporting pages.",count:de,target:Math.max(S,1),status:de>0?"done":S>0?"running":"waiting"},{key:"entity-extraction",name:"Entity Extraction",description:"Extract candidate entities from typed pages.",count:re,target:Math.max(re,1),status:re>0?"done":_>0?"running":"waiting",extra:`${b} extraction events`},{key:"claim-generation",name:"Claim Generation",description:"Turn entities and page evidence into relation claims.",count:F,target:Math.max(F,1),status:F>0?"done":re>0?"running":"waiting"},{key:"deduplication",name:"Deduplication",description:"Collapse repeated entities and duplicate relation claims.",count:Math.max(F-I,0),target:Math.max(F,1),status:F>0?"done":"waiting"},{key:"validation",name:"Validation",description:"Check schema fit, evidence quality, and conflicts.",count:Math.max(F-I,0),target:Math.max(F,1),status:P>0?"issue":F>0?"done":"waiting",extra:P>0?`${P} errors`:void 0},{key:"human-review",name:"Human Review",description:"Approve, reject, or send uncertain claims back for cleanup.",count:L+k,target:Math.max(F,1),status:L+k>0?"done":F>0?"running":"waiting",extra:`${L} approved / ${k} rejected`},{key:"ontology-commit",name:"Ontology Commit",description:"Project accepted claims into the graph triple store.",count:X,target:Math.max(L,1),status:X>0?"done":L>0?"running":"waiting"},{key:"export",name:"Export",description:"Prepare JSON, CSV, Turtle, and API access for downstream use.",count:X,target:Math.max(X,1),status:X>0?"done":"waiting"}]},[a.data]),p=m.filter(y=>y.status==="done").length,v=m.length?p/m.length*100:0;async function w(y){f(null);try{const x=await l.mutateAsync(y.key);if(x.action==="navigate"&&x.route){t(x.route);return}f({tone:"success",text:x.job_id!=null?`Started job #${x.job_id} for ${y.name}.`:x.message??`${y.name} action completed.`}),a.refetch()}catch(x){f({tone:"error",text:x instanceof Error?x.message:"Stage action failed."})}}return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/crawl/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Dv,{className:"h-6 w-6 text-primary"}),"Build Pipeline"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," pipeline status and recovery actions"]})]}),u.jsxs(Ee,{variant:"outline",onClick:()=>a.refetch(),children:[u.jsx($g,{className:"h-4 w-4"}),"Refresh"]})]}),d&&u.jsx(ge,{className:d.tone==="error"?"mb-6 border-destructive":"mb-6 border-green-200",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm",children:[u.jsx(fn,{className:"h-4 w-4"}),d.text]})}),a.isError&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),a.error.message]})}),u.jsxs("div",{className:"mb-6 grid gap-4 md:grid-cols-4",children:[u.jsx(Ll,{icon:dS,label:"Collected pages",value:a.data?.stages.find(y=>y.key==="crawled")?.count}),u.jsx(Ll,{icon:hS,label:"Extraction pages",value:a.data?.stages.find(y=>y.key==="extracted")?.count}),u.jsx(Ll,{icon:Nf,label:"Claims",value:a.data?.stages.find(y=>y.key==="claims")?.count}),u.jsx(Ll,{icon:_f,label:"Overall",value:tn(v/100)})]}),u.jsxs(ge,{className:"mb-6",children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:"Ontology Build Flow"}),u.jsx(Qe,{children:"The ten major build stages, current counts, and recovery entry points."})]}),u.jsxs(Xe,{variant:"outline",children:[p,"/",m.length," complete"]})]})}),u.jsxs(ye,{children:[u.jsx(Ji,{value:v,className:"mb-5"}),a.isLoading?u.jsx("div",{className:"space-y-3",children:Array.from({length:6}).map((y,x)=>u.jsx(pn,{className:"h-20"},x))}):u.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:m.map((y,x)=>{const S=y.target>0?Math.min(100,y.count/y.target*100):0,_=C2.has(y.key);return u.jsxs("article",{className:"rounded-md border bg-background p-4",children:[u.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"text-xs text-muted-foreground",children:["Step ",x+1]}),u.jsx("h3",{className:"font-semibold",children:y.name}),u.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:y.description})]}),u.jsx(Xe,{variant:E2(y.status),children:y.status})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Ji,{value:S,className:"h-2"}),u.jsxs("span",{className:"w-16 text-right text-xs text-muted-foreground",children:[Math.round(S),"%"]})]}),u.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3 text-xs text-muted-foreground",children:[u.jsxs("div",{children:[u.jsxs("span",{children:[y.count.toLocaleString()," items"]}),y.extra&&u.jsxs("span",{children:[" / ",y.extra]})]}),u.jsxs(Ee,{size:"sm",variant:_?"outline":"secondary",disabled:!r||l.isPending,onClick:()=>w(y),children:[_?u.jsx(Mv,{className:"h-3.5 w-3.5"}):u.jsx($g,{className:"h-3.5 w-3.5"}),l.isPending?"Working":P2(y)]})]})]},y.key)})})]})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Recent Pages"}),u.jsx(Qe,{children:"Most recently collected and typed pages."})]}),u.jsx(ye,{children:u.jsxs("ul",{className:"divide-y",children:[(a.data?.recent_pages??[]).map(y=>u.jsxs("li",{className:"py-3 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Xe,{variant:"outline",children:y.page_type??"unknown"}),u.jsx("span",{className:"truncate font-medium",children:y.title||y.url})]}),u.jsx("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:y.url}),u.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:ai(y.fetched_at)})]},y.id)),a.data?.recent_pages.length===0&&u.jsx("li",{className:"py-6 text-center text-sm text-muted-foreground",children:"No collected pages yet."})]})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Recent Claims"}),u.jsx(Qe,{children:"Latest relation claims from the build flow."})]}),u.jsx(ye,{children:u.jsxs("ul",{className:"divide-y",children:[(a.data?.recent_claims??[]).map(y=>u.jsxs("li",{className:"py-3 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($v,{className:"h-4 w-4 text-muted-foreground"}),u.jsx("span",{className:"truncate font-medium",children:y.subject||"-"}),u.jsx(Xe,{variant:"secondary",children:y.predicate})]}),u.jsxs("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-muted-foreground",children:[u.jsx("span",{children:tn(y.confidence)}),u.jsx("span",{children:y.status}),u.jsx("span",{children:ai(y.last_seen_at)})]})]},y.id)),a.data?.recent_claims.length===0&&u.jsx("li",{className:"py-6 text-center text-sm text-muted-foreground",children:"No claims have been generated yet."})]})})]})]})]})}function Ll({icon:t,label:e,value:r}){return u.jsx(ge,{children:u.jsxs(ye,{className:"flex items-center justify-between gap-4 py-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:e}),u.jsx("div",{className:"mt-1 text-2xl font-semibold",children:typeof r=="number"?r.toLocaleString():r??"-"})]}),u.jsx(t,{className:"h-5 w-5 text-muted-foreground"})]})})}function Xa(t){return typeof t=="object"&&t!==null?t:{}}function Iy(...t){for(const e of t)if(typeof e=="string"&&e.trim())return e;return""}function R2(t){const e=Xa(t?.raw_output),r=e.candidate_claims;if(Array.isArray(r))return r;const a=Xa(e.validation).candidate_claims;return Array.isArray(a)?a:[]}function T2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),a=y2(r,100),l=hu(r,{includeCandidates:!0,limit:300}),[d,f]=$.useState(null),m=$.useMemo(()=>{const _=a.data??[];return _.find(b=>b.id===d)??_[0]},[a.data,d]),p=$.useMemo(()=>m?.page_url?(l.data??[]).filter(_=>_.page_url===m.page_url):[],[l.data,m?.page_url]),v=Xa(m?.page_context),w=Xa(m?.raw_output),y=Xa(w.page_context),x=Iy(v.clean_text,v.cleaned_text,v.text,y.clean_text,y.cleaned_text,y.text),S=Iy(v.html,v.raw_html,y.html,y.raw_html);return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/pipeline/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Uv,{className:"h-6 w-6 text-primary"}),"Page Analysis"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," · 추출 근거와 페이지 분석 로그"]})]}),u.jsx(Ee,{variant:"outline",onClick:()=>a.refetch(),children:"Refresh"})]}),(a.isError||l.isError)&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),a.error?.message??l.error?.message]})}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[360px_1fr]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Analysis Runs"}),u.jsx(Qe,{children:"페이지별 추출 실행 기록과 오류 상태"})]}),u.jsxs(ye,{children:[a.isLoading&&u.jsx("div",{className:"space-y-3",children:Array.from({length:5}).map((_,b)=>u.jsx(pn,{className:"h-16"},b))}),a.data?.length===0&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"아직 분석 로그가 없습니다. 먼저 크롤을 실행하세요."}),u.jsx("ul",{className:"max-h-[720px] divide-y overflow-y-auto",children:(a.data??[]).map(_=>u.jsx("li",{className:"py-2",children:u.jsxs("button",{type:"button",onClick:()=>f(_.id),className:"w-full rounded-md px-3 py-2 text-left transition-colors hover:bg-accent/10",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"truncate text-sm font-medium",children:_.page_url??`run #${_.id}`}),u.jsx(Xe,{variant:_.error?"destructive":"success",children:_.error?"error":"ok"})]}),u.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx("span",{children:_.extractor_name}),u.jsx("span",{children:_.provider}),u.jsxs("span",{children:[_.candidate_count," candidates"]})]}),u.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:ai(_.created_at)})]})},_.id))})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:"Selected Page"}),u.jsx(Qe,{children:m?.page_url??"분석 로그를 선택하세요"})]}),m&&u.jsx(Xe,{variant:m.error?"destructive":"outline",children:m.provider})]})}),u.jsxs(ye,{children:[!m&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"표시할 페이지 분석 결과가 없습니다."}),m&&u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsx(Nd,{label:"Extractor",value:m.extractor_name}),u.jsx(Nd,{label:"Candidates",value:String(m.candidate_count)}),u.jsx(Nd,{label:"Validation",value:Ct(m.validation)})]}),m?.error&&u.jsx("div",{className:"mt-4 rounded-md border border-destructive bg-destructive/5 px-3 py-2 text-sm text-destructive",children:m.error})]})]}),u.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(Fv,{className:"h-5 w-5"}),"Cleaned Text"]}),u.jsx(Qe,{children:"AI 분석에 투입된 정제 본문"})]}),u.jsx(ye,{children:u.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap rounded-md bg-secondary/30 p-3 text-xs leading-relaxed",children:x||"정제 본문이 저장되어 있지 않습니다."})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(Sf,{className:"h-5 w-5"}),"Raw Context"]}),u.jsx(Qe,{children:"원문 HTML 또는 분석 입력 컨텍스트"})]}),u.jsx(ye,{children:u.jsx("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap rounded-md bg-secondary/30 p-3 text-xs leading-relaxed",children:S||JSON.stringify(v||y,null,2)})})]})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Extracted Claims"}),u.jsx(Qe,{children:"같은 페이지에서 생성된 클레임과 근거 문장"})]}),u.jsxs(ye,{children:[l.isLoading&&u.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[u.jsx(dr,{className:"h-4 w-4 animate-spin"}),"클레임을 불러오는 중"]}),u.jsxs("div",{className:"space-y-3",children:[p.map(_=>u.jsxs("article",{className:"rounded-md border p-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[u.jsx("span",{className:"font-medium",children:Ct(_.subject)}),u.jsx(Xe,{variant:"secondary",children:_.predicate}),u.jsx("span",{className:"font-medium",children:Ct(_.object??_.object_value)}),u.jsx(Xe,{variant:"outline",children:tn(_.confidence)})]}),_.evidence_text&&u.jsxs("div",{className:"mt-3 rounded-md bg-yellow-50 px-3 py-2 text-sm text-yellow-950",children:[u.jsx(vS,{className:"mr-1 inline h-4 w-4"}),_.evidence_text]})]},_.id)),!l.isLoading&&p.length===0&&u.jsx("p",{className:"py-4 text-center text-sm text-muted-foreground",children:"이 페이지 URL과 연결된 클레임이 없습니다."})]})]})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Candidate Payload"}),u.jsx(Qe,{children:"추출기가 반환한 후보 원본 일부"})]}),u.jsx(ye,{children:u.jsx("pre",{className:"max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-secondary/30 p-3 text-xs",children:JSON.stringify(R2(m),null,2)})})]})]})]})]})}function Nd({label:t,value:e}){return u.jsxs("div",{className:"rounded-md border bg-background px-3 py-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 truncate text-sm font-medium",children:e||"-"})]})}function My(t){return t.split(",").map(e=>e.trim()).filter(Boolean)}function L2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),a=Cx(i?.domain),l=$x(r),d=v2(r,100),f=j2(r),m=_2(r),[p,v]=$.useState(""),[w,y]=$.useState(""),[x,S]=$.useState(""),[_,b]=$.useState(""),[P,N]=$.useState(""),[F,L]=$.useState(""),k=$.useMemo(()=>new Set(a.data?.entity_types??[]),[a.data?.entity_types]),I=$.useMemo(()=>new Set((l.data?.entity_types??[]).map(Z=>Z.name.toLowerCase())),[l.data?.entity_types]),X=(a.data?.entity_types??[]).filter(Z=>!I.has(Z.toLowerCase())),re=async Z=>{if(Z.preventDefault(),!!p.trim())try{await f.mutateAsync({name:p.trim(),domain:i?.domain??"generic",description:w.trim()||null}),jt.success("Entity type saved"),v(""),y("")}catch(Oe){jt.error(Oe.message)}},de=async Z=>{if(Z.preventDefault(),!!x.trim())try{await m.mutateAsync({name:x.trim(),domain:i?.domain??"generic",description:F.trim()||null,allowed_subject_types:My(_),allowed_object_types:My(P),min_confidence:.8}),jt.success("Predicate rule saved"),S(""),b(""),N(""),L("")}catch(Oe){jt.error(Oe.message)}};return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/analysis/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Bv,{className:"h-6 w-6 text-primary"}),"Schema Designer"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," · 엔티티 타입과 Predicate 규칙 관리"]})]}),u.jsx(Ee,{variant:"outline",onClick:()=>l.refetch(),children:"Refresh"})]}),(l.isError||a.isError||d.isError)&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),l.error?.message??a.error?.message??d.error?.message]})}),u.jsxs("div",{className:"mb-6 grid gap-4 md:grid-cols-4",children:[u.jsx(Al,{label:"Entity types",value:l.data?.entity_types.length}),u.jsx(Al,{label:"Predicates",value:l.data?.relation_types.length}),u.jsx(Al,{label:"Schema proposals",value:d.data?.length}),u.jsx(Al,{label:"Domain coverage",value:a.data?.entity_types.length?tn(1-X.length/a.data.entity_types.length):"-"})]}),u.jsxs("div",{className:"grid gap-6 xl:grid-cols-[380px_1fr]",children:[u.jsxs("div",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(oS,{className:"h-5 w-5"}),"Entity Type"]}),u.jsx(Qe,{children:"AI가 생성할 수 있는 개체 종류를 명시합니다."})]}),u.jsx(ye,{children:u.jsxs("form",{className:"space-y-3",onSubmit:re,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"entityName",children:"Name"}),u.jsx(xt,{id:"entityName",value:p,onChange:Z=>v(Z.target.value),placeholder:"Product"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"entityDescription",children:"Description"}),u.jsx(ho,{id:"entityDescription",value:w,onChange:Z=>y(Z.target.value),rows:2,placeholder:"상품 또는 서비스 개체"})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:f.isPending,children:[f.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(ri,{className:"h-4 w-4"}),"Save entity type"]})]})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(kf,{className:"h-5 w-5"}),"Predicate Rule"]}),u.jsx(Qe,{children:"주어/목적어 타입과 최소 신뢰도 기준을 정의합니다."})]}),u.jsx(ye,{children:u.jsxs("form",{className:"space-y-3",onSubmit:de,children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"relationName",children:"Predicate"}),u.jsx(xt,{id:"relationName",value:x,onChange:Z=>S(Z.target.value),placeholder:"hasBrand"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"subjectTypes",children:"Subject types"}),u.jsx(xt,{id:"subjectTypes",value:_,onChange:Z=>b(Z.target.value),placeholder:"Product, Perfume"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"objectTypes",children:"Object types"}),u.jsx(xt,{id:"objectTypes",value:P,onChange:Z=>N(Z.target.value),placeholder:"Brand"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Ye,{htmlFor:"relationDescription",children:"Description"}),u.jsx(ho,{id:"relationDescription",value:F,onChange:Z=>L(Z.target.value),rows:2,placeholder:"상품이 특정 브랜드에 속함"})]}),u.jsxs(Ee,{type:"submit",className:"w-full",disabled:m.isPending,children:[m.isPending?u.jsx(dr,{className:"h-4 w-4 animate-spin"}):u.jsx(ri,{className:"h-4 w-4"}),"Save predicate rule"]})]})})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Registered Entity Types"}),u.jsx(Qe,{children:"프로젝트 스키마 레지스트리에 저장된 타입"})]}),u.jsx(ye,{children:l.isLoading?u.jsx(pn,{className:"h-32"}):u.jsx("div",{className:"grid gap-3 md:grid-cols-2",children:(l.data?.entity_types??[]).map(Z=>u.jsxs("article",{className:"rounded-md border p-3",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsx("span",{className:"font-medium",children:Z.name}),u.jsx(Xe,{variant:k.has(Z.name)?"success":"outline",children:Z.domain??"generic"})]}),u.jsx("p",{className:"mt-2 line-clamp-2 text-sm text-muted-foreground",children:Z.description||Ct(Z.metadata)})]},Z.id))})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Predicate Rules"}),u.jsx(Qe,{children:"허용 관계와 타입 제약. 검증 단계에서 활용됩니다."})]}),u.jsx(ye,{children:u.jsxs("div",{className:"space-y-3",children:[(l.data?.relation_types??[]).map(Z=>u.jsxs("article",{className:"rounded-md border p-4",children:[u.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"font-medium",children:Z.name}),u.jsx(Xe,{variant:"outline",children:Z.status??"active"}),u.jsx("span",{className:"text-xs text-muted-foreground",children:tn(Z.confidence)})]}),u.jsxs("div",{className:"grid gap-3 text-sm md:grid-cols-2",children:[u.jsx(Fy,{label:"Subject",values:Z.allowed_subject_types}),u.jsx(Fy,{label:"Object",values:Z.allowed_object_types})]}),u.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:Z.description||Ct(Z.semantic_constraints)})]},Z.id)),l.data?.relation_types.length===0&&u.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:"등록된 Predicate 규칙이 없습니다."})]})})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Schema Proposals"}),u.jsx(Qe,{children:"추출 중 발견된 스키마 보강 후보"})]}),u.jsx(ye,{children:u.jsxs("ul",{className:"divide-y",children:[(d.data??[]).map(Z=>u.jsxs("li",{className:"py-3 text-sm",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Xe,{variant:"secondary",children:Z.proposal_type}),u.jsx("span",{className:"font-medium",children:Z.name}),u.jsx(Xe,{variant:"outline",children:Z.status})]}),u.jsx("p",{className:"mt-1 text-muted-foreground",children:Z.reason||Z.evidence||"-"}),u.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:ai(Z.updated_at)})]},Z.id)),d.data?.length===0&&u.jsx("li",{className:"py-6 text-center text-sm text-muted-foreground",children:"현재 스키마 제안이 없습니다."})]})})]})]})]})]})}function Al({label:t,value:e}){return u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 text-2xl font-semibold",children:typeof e=="number"?e.toLocaleString():e??"-"})]})})}function Fy({label:t,values:e}){return u.jsxs("div",{children:[u.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"flex flex-wrap gap-1",children:e.length?e.map(r=>u.jsx(Xe,{variant:"outline",children:r},r)):u.jsx("span",{className:"text-xs text-muted-foreground",children:"Any"})})]})}const A2=new Set(["valid","ok","passed","clean"]),I2=new Set(["merged","active","synced","ok","ready"]),Dy=new Set(["value","keyword","name","item","product","brand","accord","note","unknown"]);function zx(t){switch(t){case"high":return"destructive";case"medium":return"warning";default:return"outline"}}function _r(t){return Ct(t).trim().toLowerCase().replace(/\s+/g," ")}function Ux(t){return Ct(t.object??t.object_value)}function M2(t){const e=t.value_type;return typeof e=="string"&&e.trim()?e.trim():void 0}function F2(t){return`${t.subject??""}|${t.predicate}|${Ux(t)}`.toLowerCase()}function Il(t,e){if(!e)return!1;const r=e.toLowerCase();return t.some(i=>i.toLowerCase()===r)}function js(t){return t.length?t.join(", "):"-"}function D2(t,e){if(t)for(const r of e){const i=t[r];if(typeof i=="number"&&Number.isFinite(i))return i}}function $2(t){return D2(t?.confidence_rules,["min_confidence","minimum_confidence","minConfidence"])??.7}function z2(t){if(!t)return;const e=new Date(t).getTime();if(Number.isFinite(e))return(Date.now()-e)/864e5}function U2(t,e,r){const i=[],a=new Map,l=new Map,d=new Set,f=new Map,m=new Map;r.forEach(p=>{m.set(p.name.toLowerCase(),p)});for(const p of e){const v=_r(p.name);if(!v)continue;const w=l.get(v)??[];w.push(p),l.set(v,w),f.set(v,p.type)}for(const p of t){const v=Ux(p),w=`${Ct(p.subject)} ${p.predicate} ${v}`,y=m.get(p.predicate.toLowerCase()),x=p.subject_type??f.get(_r(p.subject)),S=p.object_type??f.get(_r(v))??M2(p),_=p.evidence_text?.trim()??"",b=p.page_url?.trim()??"";if(y||i.push({id:`unknown-predicate-${p.id}`,type:"unknown_predicate",severity:"medium",title:"Predicate is not registered",detail:`${p.predicate} is missing from the ontology registry.`,target:w}),!b||!_?i.push({id:`source-${p.id}`,type:"missing_source",severity:"high",title:"Source or evidence is missing",detail:"Every claim should carry both page URL and evidence text.",target:w}):_.length<24&&i.push({id:`thin-evidence-${p.id}`,type:"thin_evidence",severity:"medium",title:"Evidence snippet is too thin",detail:"The supporting text is short enough to be ambiguous.",target:w}),_&&p.subject&&v){const X=_.toLowerCase(),re=_r(p.subject),de=_r(v),Z=re.length>2&&X.includes(re),Oe=de.length>2&&X.includes(de);!Z&&!Oe&&i.push({id:`evidence-alignment-${p.id}`,type:"weak_evidence_alignment",severity:"low",title:"Evidence does not mention the relation terms",detail:"The snippet may support the page generally, but not this exact relation.",target:w})}const P=$2(y);typeof p.confidence!="number"?i.push({id:`confidence-missing-${p.id}`,type:"missing_confidence",severity:"medium",title:"Confidence is missing",detail:"Claims need confidence for review prioritization.",target:w}):p.confidence<P&&i.push({id:`confidence-${p.id}`,type:"low_confidence",severity:p.confidence<Math.max(.45,P-.25)?"high":"medium",title:"Confidence is below rule threshold",detail:`${tn(p.confidence)} is below ${tn(P)}.`,target:w}),y?.allowed_subject_types.length&&(x?Il(y.allowed_subject_types,x)||i.push({id:`subject-type-${p.id}`,type:"subject_type_mismatch",severity:"high",title:"Subject type violates relation rule",detail:`${x} is not one of ${js(y.allowed_subject_types)}.`,target:w}):i.push({id:`subject-type-missing-${p.id}`,type:"missing_subject_type",severity:"medium",title:"Subject type is missing",detail:`Allowed subject types: ${js(y.allowed_subject_types)}.`,target:w})),y?.allowed_object_types.length&&(S?Il(y.allowed_object_types,S)||i.push({id:`object-type-${p.id}`,type:"object_type_mismatch",severity:"high",title:"Object type violates relation rule",detail:`${S} is not one of ${js(y.allowed_object_types)}.`,target:w}):i.push({id:`object-type-missing-${p.id}`,type:"missing_object_type",severity:"medium",title:"Object type is missing",detail:`Allowed object types: ${js(y.allowed_object_types)}.`,target:w})),y?.allowed_page_types.length&&(p.page_type?Il(y.allowed_page_types,p.page_type)||i.push({id:`page-type-${p.id}`,type:"page_type_mismatch",severity:"medium",title:"Page type violates relation rule",detail:`${p.page_type} is not one of ${js(y.allowed_page_types)}.`,target:w}):i.push({id:`page-type-missing-${p.id}`,type:"missing_page_type",severity:"low",title:"Page type is missing",detail:`Allowed page types: ${js(y.allowed_page_types)}.`,target:w})),y?.allowed_source_zones.length&&(p.source_zone?Il(y.allowed_source_zones,p.source_zone)||i.push({id:`source-zone-${p.id}`,type:"source_zone_mismatch",severity:"medium",title:"Source zone violates relation rule",detail:`${p.source_zone} is not one of ${js(y.allowed_source_zones)}.`,target:w}):i.push({id:`source-zone-missing-${p.id}`,type:"missing_source_zone",severity:"low",title:"Source zone is missing",detail:`Allowed source zones: ${js(y.allowed_source_zones)}.`,target:w})),p.validation_status&&!A2.has(p.validation_status.toLowerCase())&&i.push({id:`schema-${p.id}`,type:"schema_violation",severity:"high",title:"Validation status needs attention",detail:p.validation_status,target:w}),p.graph_merge_status&&!I2.has(p.graph_merge_status.toLowerCase())&&i.push({id:`graph-merge-${p.id}`,type:"graph_merge_warning",severity:"medium",title:"Graph merge status is not ready",detail:p.graph_merge_reason||p.graph_merge_status,target:w}),(p.review_required||p.conflict_status)&&i.push({id:`review-${p.id}`,type:"review_required",severity:p.conflict_status?"high":"medium",title:"Human review is required",detail:p.review_reason||p.conflict_status||"review required",target:w});const N=z2(p.last_seen_at);N===void 0?i.push({id:`last-seen-missing-${p.id}`,type:"missing_last_seen",severity:"low",title:"Last seen timestamp is missing",detail:"Freshness checks need a last_seen_at value.",target:w}):N>180&&i.push({id:`stale-${p.id}`,type:"stale_claim",severity:"medium",title:"Claim is stale",detail:`Last observed ${Math.round(N)} days ago.`,target:w});const F=_r(p.subject),L=_r(v);(Dy.has(F)||F.length<=1)&&i.push({id:`generic-subject-${p.id}`,type:"generic_subject",severity:"medium",title:"Subject label is too generic",detail:"Generic entity labels should be normalized before graph commit.",target:w}),(Dy.has(L)||L.length<=1)&&i.push({id:`generic-object-${p.id}`,type:"generic_object",severity:"low",title:"Object label is too generic",detail:"The object value may need a more specific entity or literal label.",target:w});const k=F2(p),I=a.get(k);I?i.push({id:`duplicate-claim-${p.id}`,type:"duplicate_claim",severity:I.status!==p.status?"medium":"low",title:"Duplicate relation claim",detail:`Claim #${I.id} already has the same subject, predicate, and object.`,target:w}):a.set(k,p),p.subject&&d.add(_r(p.subject)),v&&d.add(_r(v))}for(const p of l.values())p.length>1&&i.push({id:`duplicate-entity-${p[0].id}`,type:"duplicate_entity",severity:"medium",title:"Duplicate entity candidate",detail:`${p.length} entities share the same normalized name.`,target:p[0].name});for(const p of e){const v=_r(p.name);d.has(v)||i.push({id:`isolated-${p.id}`,type:"isolated_entity",severity:"low",title:"Entity is isolated",detail:"No relation currently connects to this entity in the loaded claim set.",target:`[${p.type}] ${p.name}`}),["entity","unknown","unknown_entity"].includes(p.type.toLowerCase())&&i.push({id:`generic-entity-type-${p.id}`,type:"generic_entity_type",severity:"low",title:"Entity type is generic",detail:"The entity should be assigned to a domain-specific type.",target:`[${p.type}] ${p.name}`})}return i}function V2(t){const e=new Map;return t.forEach(r=>{e.set(r.type,(e.get(r.type)??0)+1)}),Array.from(e.entries()).map(([r,i])=>({type:r,count:i})).sort((r,i)=>i.count-r.count)}function B2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),a=hu(r,{includeCandidates:!0,limit:300}),l=Dx(r,void 0),d=$x(r),f=Kf(r),m=$.useMemo(()=>U2(a.data??[],l.data??[],d.data?.relation_types??[]),[a.data,l.data,d.data?.relation_types]),p=m.filter(k=>k.severity==="high").length,v=m.filter(k=>k.severity==="medium").length,w=m.filter(k=>k.severity==="low").length,y=Math.max(0,Math.round(100-p*10-v*5-w*1.5)),x=V2(m),S=new Set((d.data?.relation_types??[]).map(k=>k.name)),_=Array.from(new Set((a.data??[]).map(k=>k.predicate).filter(k=>!S.has(k)))),b=(a.data??[]).filter(k=>["validated_claim","rejected"].includes(k.status??"")).length,P=a.data?.length?b/a.data.length:0,N=m.filter(k=>["unknown_predicate","subject_type_mismatch","object_type_mismatch","page_type_mismatch","source_zone_mismatch","schema_violation"].includes(k.type)).length,F=m.filter(k=>["missing_source","thin_evidence","weak_evidence_alignment"].includes(k.type)).length,L=m.slice(0,250);return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/review/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Hd,{className:"h-6 w-6 text-primary"}),"Quality Inspector"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," schema, evidence, duplicate, and graph readiness checks."]})]}),u.jsx(Ee,{variant:"outline",onClick:()=>{a.refetch(),l.refetch(),d.refetch(),f.refetch()},children:"Refresh"})]}),(a.isError||l.isError||d.isError)&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),a.error?.message??l.error?.message??d.error?.message]})}),u.jsxs("div",{className:"mb-6 grid gap-4 md:grid-cols-5",children:[u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"Quality score"}),u.jsx("div",{className:"mt-1 text-3xl font-semibold",children:y}),u.jsx(Ji,{value:y,className:"mt-3"})]})}),u.jsx(Ml,{label:"High",value:p,tone:"high"}),u.jsx(Ml,{label:"Medium",value:v,tone:"medium"}),u.jsx(Ml,{label:"Low",value:w,tone:"low"}),u.jsx(Ml,{label:"Review rate",value:tn(P)})]}),u.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_360px]",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsx(Ve,{children:"Validation Issues"}),m.length>L.length&&u.jsxs(Xe,{variant:"outline",children:["Showing ",L.length," of ",m.length]})]}),u.jsx(Qe,{children:"Rule-based warnings generated from claim evidence and ontology registry constraints."})]}),u.jsxs(ye,{children:[(a.isLoading||l.isLoading||d.isLoading)&&u.jsx("div",{className:"space-y-3",children:Array.from({length:5}).map((k,I)=>u.jsx(pn,{className:"h-20"},I))}),!a.isLoading&&!l.isLoading&&!d.isLoading&&m.length===0&&u.jsxs("div",{className:"flex flex-col items-center gap-2 py-12 text-center text-sm text-muted-foreground",children:[u.jsx(Hd,{className:"h-10 w-10 opacity-50"}),"No quality warnings were found in the loaded scope."]}),u.jsx("div",{className:"space-y-3",children:L.map(k=>u.jsxs("article",{className:"rounded-md border p-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Xe,{variant:zx(k.severity),children:k.severity}),u.jsx(Xe,{variant:"outline",children:k.type}),u.jsx("span",{className:"font-medium",children:k.title})]}),u.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:k.detail}),u.jsx("div",{className:"mt-2 rounded-md bg-secondary/30 px-3 py-2 text-sm",children:k.target})]},k.id))})]})]}),u.jsxs("div",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(kS,{className:"h-5 w-5"}),"Schema Coverage"]}),u.jsx(Qe,{children:"Predicate and type coverage against the ontology registry."})]}),u.jsxs(ye,{className:"space-y-3",children:[u.jsx(Mi,{label:"Relation rules",value:S.size}),u.jsx(Mi,{label:"Schema warnings",value:N}),u.jsx(Mi,{label:"Evidence warnings",value:F}),u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsx("span",{children:"Unknown predicates"}),u.jsx(Xe,{variant:_.length?"warning":"success",children:_.length})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.map(k=>u.jsx(Xe,{variant:"outline",children:k},k)),_.length===0&&u.jsx("span",{className:"text-sm text-muted-foreground",children:"All loaded predicates are registered."})]})]})]}),u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(jS,{className:"h-5 w-5"}),"Graph Readiness"]}),u.jsx(Qe,{children:"Build output ready for graph and exports."})]}),u.jsxs(ye,{className:"space-y-3",children:[u.jsx(Mi,{label:"Collected pages",value:f.data?.stages.find(k=>k.key==="crawled")?.count??0}),u.jsx(Mi,{label:"Approved claims",value:f.data?.stages.find(k=>k.key==="validated")?.count??0}),u.jsx(Mi,{label:"Graph triples",value:f.data?.stages.find(k=>k.key==="graph")?.count??0})]})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(iS,{className:"h-5 w-5"}),"Issue Mix"]})}),u.jsx(ye,{children:u.jsxs("ul",{className:"space-y-2 text-sm",children:[x.slice(0,8).map(k=>u.jsxs("li",{className:"flex items-center justify-between rounded-md border px-3 py-2",children:[u.jsx("span",{children:k.type}),u.jsx("span",{className:"font-medium",children:k.count})]},k.type)),x.length===0&&u.jsx("li",{className:"py-4 text-center text-muted-foreground",children:"No issues in the loaded scope."})]})})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsx(Ve,{children:"Recommended Actions"})}),u.jsx(ye,{children:u.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[p>0&&u.jsx("li",{children:"Resolve missing evidence, type violations, and conflicts before export."}),v>0&&u.jsx("li",{children:"Review stale claims, thin evidence, duplicate relations, and missing rule fields."}),_.length>0&&u.jsx("li",{children:"Add missing predicate rules in Schema Designer."}),y>=90&&u.jsx("li",{children:"The ontology is ready for graph inspection and Export/API handoff."})]})})]})]})]})]})}function Ml({label:t,value:e,tone:r}){return u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-2xl font-semibold",children:e}),r&&u.jsx(Xe,{variant:zx(r),children:r})]})]})})}function Mi({label:t,value:e}){return u.jsxs("div",{className:"flex items-center justify-between rounded-md border px-3 py-2 text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:t}),u.jsx("span",{className:"font-medium",children:e.toLocaleString()})]})}const $y=["#2563eb","#059669","#d97706","#7c3aed","#db2777","#0891b2","#4b5563","#dc2626"];function mf(t,e){const r=Math.max(e.indexOf(t),0);return $y[r%$y.length]}function q2(t,e,r){const i=r.search.trim().toLowerCase(),a=Array.from(new Set(t.map(S=>S.type||"Entity").concat("Literal"))).sort(),l=new Map;t.forEach(S=>{const _=S.type||"Entity";l.set(String(S.id),{id:String(S.id),name:S.name,type:_,x:0,y:0,radius:18,color:mf(_,a),source:"entity",raw:S})});const d=[];e.forEach(S=>{const _=S.confidence??0;if(_<r.minConfidence||r.predicate&&S.predicate!==r.predicate)return;const b=String(S.source),P=S.target!==null&&S.target!==void 0?String(S.target):`literal-${S.claim_id}`;if(l.has(b)){if(!l.has(P)){const N=Ct(S.target_value??S.object?.name);l.set(P,{id:P,name:N||"(empty value)",type:"Literal",x:0,y:0,radius:14,color:mf("Literal",a),source:"literal"})}d.push({id:String(S.claim_id),source:b,target:P,predicate:S.predicate,confidence:_,raw:S})}});let f=Array.from(l.values()).filter(S=>r.entityType&&S.type!==r.entityType?!1:i?S.name.toLowerCase().includes(i)||S.type.toLowerCase().includes(i):!0);const m=new Set(f.map(S=>S.id)),p=d.filter(S=>m.has(S.source)&&m.has(S.target)),v=new Set;p.forEach(S=>{v.add(S.source),v.add(S.target)}),(r.predicate||r.minConfidence>0||i)&&(f=f.filter(S=>v.has(S.id)));const w=430,y=300,x=Math.max(160,Math.min(260,f.length*13));return f.forEach((S,_)=>{const b=Math.PI*2*_/Math.max(f.length,1);S.x=w+Math.cos(b)*x,S.y=y+Math.sin(b)*x}),{nodes:f,edges:p,types:a}}function H2(t,e){const r=e.find(a=>a.id===t.source),i=e.find(a=>a.id===t.target);return{source:r,target:i}}function W2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),[a,l]=$.useState("validated_claim"),[d,f]=$.useState(!0),[m,p]=$.useState(""),[v,w]=$.useState(""),[y,x]=$.useState(""),[S,_]=$.useState(0),[b,P]=$.useState(null),N=x2(r,{includeCandidates:d&&a==="validated_claim",limit:300,status:d&&a==="validated_claim"?void 0:a}),F=$.useMemo(()=>Array.from(new Set((N.data?.edges??[]).map(I=>I.predicate))).sort(),[N.data?.edges]),L=$.useMemo(()=>q2(N.data?.nodes??[],N.data?.edges??[],{search:m,predicate:v,entityType:y,minConfidence:S}),[y,N.data?.edges,N.data?.nodes,S,v,m]),k=L.edges.length?L.edges.reduce((I,X)=>I+X.confidence,0)/L.edges.length:0;return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/quality/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Cf,{className:"h-6 w-6 text-primary"}),"Graph View"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," relation graph, candidates, and edge evidence."]})]}),u.jsxs(Ee,{variant:"outline",onClick:()=>N.refetch(),children:[u.jsx(zv,{className:"h-4 w-4"}),"Refresh"]})]}),N.isError&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),N.error.message]})}),u.jsxs("div",{className:"mb-4 grid gap-3 xl:grid-cols-[1fr_180px_180px_180px_220px]",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Vv,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),u.jsx(xt,{value:m,onChange:I=>p(I.target.value),className:"pl-9",placeholder:"Search node or type"})]}),u.jsxs(En,{value:y,onChange:I=>x(I.target.value),children:[u.jsx("option",{value:"",children:"All types"}),L.types.map(I=>u.jsx("option",{value:I,children:I},I))]}),u.jsxs(En,{value:v,onChange:I=>w(I.target.value),children:[u.jsx("option",{value:"",children:"All predicates"}),F.map(I=>u.jsx("option",{value:I,children:I},I))]}),u.jsxs(En,{value:a,onChange:I=>l(I.target.value),children:[u.jsx("option",{value:"validated_claim",children:"Validated"}),u.jsx("option",{value:"candidate_claim",children:"Candidate"}),u.jsx("option",{value:"rule_candidate",children:"Rule candidate"}),u.jsx("option",{value:"active",children:"Active"}),u.jsx("option",{value:"all",children:"All statuses"})]}),u.jsxs("label",{className:"flex items-center gap-2 rounded-md border px-3 text-sm",children:[u.jsx("input",{type:"checkbox",checked:d,disabled:a!=="validated_claim",onChange:I=>f(I.target.checked)}),"Blend candidates"]})]}),u.jsxs("div",{className:"mb-6 rounded-md border px-4 py-3",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between text-sm",children:[u.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[u.jsx(NS,{className:"h-4 w-4"}),"Minimum confidence"]}),u.jsx("span",{children:tn(S)})]}),u.jsx("input",{type:"range",min:0,max:1,step:.05,value:S,onChange:I=>_(Number(I.target.value)),className:"w-full"})]}),u.jsxs("div",{className:"grid gap-6 xl:grid-cols-[1fr_360px]",children:[u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:"Ontology Network"}),u.jsxs(Qe,{children:[L.nodes.length," nodes / ",L.edges.length," edges shown"]})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:L.types.slice(0,8).map(I=>u.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[u.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:mf(I,L.types)}}),I]},I))})]})}),u.jsx(ye,{children:N.isLoading?u.jsx(pn,{className:"h-[640px]"}):L.nodes.length===0?u.jsxs("div",{className:"flex h-[500px] flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground",children:[u.jsx(kf,{className:"h-12 w-12 opacity-50"}),"No graph is available for the current filters."]}):u.jsxs("svg",{viewBox:"0 0 860 600",className:"h-[640px] w-full rounded-md border bg-secondary/20",role:"img","aria-label":"Ontology graph",children:[u.jsx("defs",{children:u.jsx("marker",{id:"arrow",markerWidth:"10",markerHeight:"10",refX:"10",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:u.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:"#64748b"})})}),L.edges.map(I=>{const{source:X,target:re}=H2(I,L.nodes);if(!X||!re)return null;const de=(X.x+re.x)/2,Z=(X.y+re.y)/2;return u.jsxs("g",{className:"cursor-pointer",onClick:()=>P(I),children:[u.jsx("line",{x1:X.x,y1:X.y,x2:re.x,y2:re.y,stroke:"#64748b",strokeWidth:1+I.confidence*3,strokeOpacity:"0.65",markerEnd:"url(#arrow)"}),u.jsx("text",{x:de,y:Z,textAnchor:"middle",className:"fill-slate-600 text-[10px]",children:I.predicate})]},I.id)}),L.nodes.map(I=>u.jsxs("g",{className:"cursor-pointer",onClick:()=>P(I),children:[u.jsx("circle",{cx:I.x,cy:I.y,r:I.radius,fill:I.color,stroke:b&&"id"in b&&b.id===I.id?"#111827":"#ffffff",strokeWidth:"2"}),u.jsx("text",{x:I.x,y:I.y+I.radius+14,textAnchor:"middle",className:"fill-slate-800 text-[11px] font-medium",children:I.name.length>24?`${I.name.slice(0,24)}...`:I.name})]},I.id))]})})]}),u.jsxs("aside",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsx(Ve,{children:"Selection"}),u.jsx(Qe,{children:"Click a node or edge to inspect it."})]}),u.jsxs(ye,{children:[!b&&u.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"Nothing selected."}),b&&"predicate"in b&&u.jsxs("div",{className:"space-y-3",children:[u.jsx(Xe,{variant:"secondary",children:b.predicate}),u.jsx(Sr,{label:"Claim",value:`#${b.id}`}),u.jsx(Sr,{label:"Status",value:b.raw.status}),u.jsx(Sr,{label:"Confidence",value:tn(b.confidence)}),u.jsx(Sr,{label:"Object",value:b.raw.object?.name??b.raw.target_value}),u.jsx(Sr,{label:"Last seen",value:ai(b.raw.last_seen_at)}),u.jsx(Sr,{label:"Metadata",value:Ct(b.raw.metadata)})]}),b&&!("predicate"in b)&&u.jsxs("div",{className:"space-y-3",children:[u.jsx(Xe,{variant:"outline",children:b.type}),u.jsx(Sr,{label:"Name",value:b.name}),u.jsx(Sr,{label:"Source",value:b.source}),u.jsx(Sr,{label:"Canonical",value:b.raw?.canonical_name}),u.jsx(Sr,{label:"Metadata",value:Ct(b.raw?.metadata)})]})]})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsx(Ve,{children:"Graph Health"})}),u.jsxs(ye,{className:"space-y-3",children:[u.jsx(Cd,{label:"Visible nodes",value:L.nodes.length}),u.jsx(Cd,{label:"Visible edges",value:L.edges.length}),u.jsx(Cd,{label:"Avg confidence",value:L.edges.length?tn(k):"-"}),u.jsx(Ji,{value:k*100})]})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(uS,{className:"h-5 w-5"}),"Predicate Counts"]})}),u.jsx(ye,{children:u.jsxs("ul",{className:"space-y-2 text-sm",children:[F.map(I=>{const X=(N.data?.edges??[]).filter(re=>re.predicate===I).length;return u.jsxs("li",{className:"flex items-center justify-between rounded-md border px-3 py-2",children:[u.jsx("span",{children:I}),u.jsx("span",{className:"font-medium",children:X})]},I)}),F.length===0&&u.jsx("li",{className:"py-4 text-center text-muted-foreground",children:"No predicates found."})]})})]})]})]})]})}function Sr({label:t,value:e}){return u.jsxs("div",{className:"rounded-md border px-3 py-2 text-sm",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:t}),u.jsx("div",{className:"mt-1 break-words font-medium",children:Ct(e)})]})}function Cd({label:t,value:e}){return u.jsxs("div",{className:"flex items-center justify-between text-sm",children:[u.jsx("span",{className:"text-muted-foreground",children:t}),u.jsx("span",{className:"font-medium",children:typeof e=="number"?e.toLocaleString():e})]})}const zy=[{value:"validated_claim",label:"Validated claims"},{value:"active",label:"Active claims"},{value:"candidate_claim",label:"Candidate claims"},{value:"rule_candidate",label:"Rule candidates"},{value:"rejected",label:"Rejected claims"},{value:"all",label:"All statuses"}];function Ha(t,e){return Ct(t[e])}function K2(){const t=mn(),{projectId:e}=fr(),r=e??"",{data:i}=hr(r),[a,l]=$.useState("validated_claim"),[d,f]=$.useState(!0),[m,p]=$.useState(1e3),[v,w]=$.useState(null),y=w2(r,{status:a,includeEvidence:d,limit:m}),x=$.useMemo(()=>({json:Qn.exportUrl(r,"json",a,d,m),csv:Qn.exportUrl(r,"csv",a,d,m),turtle:Qn.exportUrl(r,"turtle",a,d,m)}),[d,m,r,a]),_=`${typeof window<"u"&&window.location?.origin?window.location.origin:""}${x.json}`,b=`curl -L "${_}"`,P=`const response = await fetch("${x.json}");
|
|
const ontology = await response.json();`,N=y.data?.claims.slice(0,8)??[],F=y.data?.claims.length?y.data.claims.reduce((k,I)=>{const X=I.confidence;return k+(typeof X=="number"?X:0)},0)/y.data.claims.length:0;async function L(k,I){try{await navigator.clipboard.writeText(k),w(I),window.setTimeout(()=>w(null),1600)}catch{w("failed")}}return u.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[u.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[u.jsx(Ee,{variant:"ghost",size:"icon",onClick:()=>t(`/graph/${r}`),"aria-label":"Back",children:u.jsx(Zn,{className:"h-4 w-4"})}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-bold tracking-tight",children:[u.jsx(Sf,{className:"h-6 w-6 text-primary"}),"Export / API Center"]}),u.jsxs("p",{className:"text-sm text-muted-foreground",children:[i?.name??r," exports, endpoint settings, and integration snippets."]})]}),u.jsxs(Ee,{variant:"outline",onClick:()=>y.refetch(),children:[u.jsx(zv,{className:"h-4 w-4"}),"Refresh"]})]}),y.isError&&u.jsx(ge,{className:"mb-6 border-destructive",children:u.jsxs(ye,{className:"flex items-center gap-2 py-4 text-sm text-destructive",children:[u.jsx(fn,{className:"h-4 w-4"}),y.error.message]})}),u.jsxs("div",{className:"mb-6 grid gap-3 lg:grid-cols-[220px_180px_1fr_180px]",children:[u.jsx(En,{value:a,onChange:k=>l(k.target.value),children:zy.map(k=>u.jsx("option",{value:k.value,children:k.label},k.value))}),u.jsx(xt,{type:"number",min:1,max:5e3,value:m,onChange:k=>p(Math.max(1,Math.min(5e3,Number(k.target.value)||1))),"aria-label":"Export row limit"}),u.jsxs("label",{className:"flex items-center gap-2 rounded-md border px-3 text-sm",children:[u.jsx("input",{type:"checkbox",checked:d,onChange:k=>f(k.target.checked)}),"Include evidence text"]}),u.jsxs(Xe,{variant:"outline",className:"justify-center py-2",children:[y.data?.count??0," rows"]})]}),u.jsxs("div",{className:"mb-6 grid gap-4 md:grid-cols-3",children:[u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"Export rows"}),u.jsx("div",{className:"mt-1 text-3xl font-semibold",children:(y.data?.count??0).toLocaleString()})]})}),u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"Status scope"}),u.jsx("div",{className:"mt-1 text-lg font-semibold",children:zy.find(k=>k.value===a)?.label})]})}),u.jsx(ge,{children:u.jsxs(ye,{className:"py-4",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:"Avg confidence"}),u.jsx("div",{className:"mt-1 text-3xl font-semibold",children:tn(F)})]})})]}),u.jsxs("div",{className:"grid gap-6 xl:grid-cols-[1fr_380px]",children:[u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx(Ve,{children:"Export Preview"}),u.jsx(Qe,{children:"First rows from the JSON export endpoint."})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Ed,{href:x.json,icon:Wd,label:"JSON"}),u.jsx(Ed,{href:x.csv,icon:pS,label:"CSV"}),u.jsx(Ed,{href:x.turtle,icon:Fv,label:"Turtle"})]})]})}),u.jsx(ye,{children:y.isLoading?u.jsx("div",{className:"space-y-3",children:Array.from({length:5}).map((k,I)=>u.jsx(pn,{className:"h-16"},I))}):N.length===0?u.jsx("div",{className:"py-12 text-center text-sm text-muted-foreground",children:"No export rows match the current settings."}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"border-b text-xs text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"py-2 pr-3",children:"Claim"}),u.jsx("th",{className:"py-2 pr-3",children:"Subject"}),u.jsx("th",{className:"py-2 pr-3",children:"Predicate"}),u.jsx("th",{className:"py-2 pr-3",children:"Object"}),u.jsx("th",{className:"py-2 pr-3",children:"Confidence"}),u.jsx("th",{className:"py-2 pr-3",children:"Last seen"})]})}),u.jsx("tbody",{className:"divide-y",children:N.map((k,I)=>u.jsxs("tr",{children:[u.jsxs("td",{className:"py-3 pr-3 font-medium",children:["#",Ha(k,"claim_id")]}),u.jsx("td",{className:"max-w-[180px] truncate py-3 pr-3",children:Ha(k,"subject")}),u.jsx("td",{className:"py-3 pr-3",children:u.jsx(Xe,{variant:"secondary",children:Ha(k,"predicate")})}),u.jsx("td",{className:"max-w-[220px] truncate py-3 pr-3",children:Ha(k,"object")}),u.jsx("td",{className:"py-3 pr-3",children:typeof k.confidence=="number"?tn(k.confidence):"-"}),u.jsx("td",{className:"py-3 pr-3",children:ai(typeof k.last_seen_at=="string"?k.last_seen_at:void 0)})]},`${Ha(k,"claim_id")}-${I}`))})]})})})]}),u.jsxs("aside",{className:"space-y-6",children:[u.jsxs(ge,{children:[u.jsxs(Ue,{children:[u.jsxs(Ve,{className:"flex items-center gap-2",children:[u.jsx(lS,{className:"h-5 w-5"}),"API Endpoint"]}),u.jsx(Qe,{children:"Same settings as the preview."})]}),u.jsxs(ye,{className:"space-y-3",children:[u.jsx(Vx,{value:_}),u.jsxs(Ee,{variant:"outline",className:"w-full",onClick:()=>L(_,"endpoint"),children:[u.jsx(Iv,{className:"h-4 w-4"}),v==="endpoint"?"Copied":"Copy endpoint"]})]})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsx(Ve,{children:"Integration Snippets"})}),u.jsxs(ye,{className:"space-y-4",children:[u.jsx(Uy,{title:"cURL",value:b,copied:v==="curl",onCopy:()=>L(b,"curl")}),u.jsx(Uy,{title:"JavaScript",value:P,copied:v==="fetch",onCopy:()=>L(P,"fetch")})]})]}),u.jsxs(ge,{children:[u.jsx(Ue,{children:u.jsx(Ve,{children:"Formats"})}),u.jsxs(ye,{className:"space-y-2 text-sm",children:[u.jsx(Pd,{label:"JSON",detail:"API-first claim objects with evidence."}),u.jsx(Pd,{label:"CSV",detail:"Spreadsheet-friendly rows for review."}),u.jsx(Pd,{label:"Turtle",detail:"RDF triples for semantic graph tools."})]})]})]})]})]})}function Ed({href:t,icon:e,label:r}){return u.jsxs("a",{href:t,className:_t(lx({variant:"outline",size:"sm"})),children:[u.jsx(e,{className:"h-4 w-4"}),r]})}function Vx({value:t}){return u.jsx("pre",{className:"max-h-40 overflow-auto rounded-md bg-secondary/40 p-3 text-xs",children:u.jsx("code",{children:t})})}function Uy({title:t,value:e,copied:r,onCopy:i}){return u.jsxs("div",{className:"rounded-md border p-3",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-sm font-medium",children:t}),u.jsxs(Ee,{variant:"ghost",size:"sm",onClick:i,children:[u.jsx(Iv,{className:"h-4 w-4"}),r?"Copied":"Copy"]})]}),u.jsx(Vx,{value:e})]})}function Pd({label:t,detail:e}){return u.jsxs("div",{className:"rounded-md border px-3 py-2",children:[u.jsx("div",{className:"font-medium",children:t}),u.jsx("div",{className:"text-xs text-muted-foreground",children:e})]})}function Q2(){return u.jsx(fb,{children:u.jsxs(ln,{element:u.jsx(TN,{}),children:[u.jsx(ln,{path:"/",element:u.jsx(k2,{})}),u.jsx(ln,{path:"/onboard",element:u.jsx(hC,{})}),u.jsx(ln,{path:"/sources/:projectId",element:u.jsx(xC,{})}),u.jsx(ln,{path:"/crawl/:projectId",element:u.jsx(OC,{})}),u.jsx(ln,{path:"/pipeline/:projectId",element:u.jsx(O2,{})}),u.jsx(ln,{path:"/analysis/:projectId",element:u.jsx(T2,{})}),u.jsx(ln,{path:"/schema/:projectId",element:u.jsx(L2,{})}),u.jsx(ln,{path:"/research/:projectId",element:u.jsx(DC,{})}),u.jsx(ln,{path:"/editor/:projectId",element:u.jsx(t2,{})}),u.jsx(ln,{path:"/review/:projectId",element:u.jsx(r2,{})}),u.jsx(ln,{path:"/quality/:projectId",element:u.jsx(B2,{})}),u.jsx(ln,{path:"/graph/:projectId",element:u.jsx(W2,{})}),u.jsx(ln,{path:"/export/:projectId",element:u.jsx(K2,{})})]})})}const Bx={name:"",domain:"",format:null,fileName:null,rawText:""},Z2={draft:Bx,isDirty:!1},G2=Af({name:"ontology",initialState:Z2,reducers:{updateDraft:(t,e)=>{t.draft={...t.draft,...e.payload},t.isDirty=!0},resetDraft:t=>{t.draft=Bx,t.isDirty=!1},markClean:t=>{t.isDirty=!1}}}),J2=G2.reducer,Y2={activeJobId:null,expandedStep:null,showLogs:!0,autoScrollLogs:!0},X2=Af({name:"crawl",initialState:Y2,reducers:{setActiveJob:(t,e)=>{t.activeJobId=e.payload},expandStep:(t,e)=>{t.expandedStep=e.payload},toggleLogs:t=>{t.showLogs=!t.showLogs},setAutoScroll:(t,e)=>{t.autoScrollLogs=e.payload}}}),eE=X2.reducer,tE=ak({reducer:{ontology:J2,crawl:eE,ui:vk}}),nE=new Xb({defaultOptions:{queries:{staleTime:1e3*60*5,gcTime:1e3*60*10,retry:1},mutations:{retry:1}}});W1.createRoot(document.getElementById("root")).render(u.jsx(ne.StrictMode,{children:u.jsx(gw,{store:tE,children:u.jsx(ej,{client:nE,children:u.jsxs(wb,{basename:"/static/",children:[u.jsx(Q2,{}),u.jsx(Dj,{position:"top-right"})]})})})}));
|
|
//# sourceMappingURL=index-B9qLr-xp.js.map
|