@dsrcjs/ai-widget 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ var sb=Object.defineProperty,cb=(r,a,o)=>a in r?sb(r,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[a]=o,ln=(r,a,o)=>cb(r,typeof a!="symbol"?a+"":a,o);function db(r,a){for(var o=0;o<a.length;o++){const l=a[o];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in r)){const p=Object.getOwnPropertyDescriptor(l,d);p&&Object.defineProperty(r,d,p.get?p:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function rp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var np={exports:{}},ea={},ap={exports:{}},je={},op;function ub(){if(op)return je;op=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),j=Symbol.iterator;function k(w){return w===null||typeof w!="object"?null:(w=j&&w[j]||w["@@iterator"],typeof w=="function"?w:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function M(w,L,H){this.props=w,this.context=L,this.refs=E,this.updater=H||S}M.prototype.isReactComponent={},M.prototype.setState=function(w,L){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,L,"setState")},M.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function F(){}F.prototype=M.prototype;function Z(w,L,H){this.props=w,this.context=L,this.refs=E,this.updater=H||S}var oe=Z.prototype=new F;oe.constructor=Z,_(oe,M.prototype),oe.isPureReactComponent=!0;var J=Array.isArray,ne=Object.prototype.hasOwnProperty,$={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function K(w,L,H){var V,pe={},fe=null,Se=null;if(L!=null)for(V in L.ref!==void 0&&(Se=L.ref),L.key!==void 0&&(fe=""+L.key),L)ne.call(L,V)&&!X.hasOwnProperty(V)&&(pe[V]=L[V]);var ke=arguments.length-2;if(ke===1)pe.children=H;else if(1<ke){for(var xe=Array(ke),it=0;it<ke;it++)xe[it]=arguments[it+2];pe.children=xe}if(w&&w.defaultProps)for(V in ke=w.defaultProps,ke)pe[V]===void 0&&(pe[V]=ke[V]);return{$$typeof:r,type:w,key:fe,ref:Se,props:pe,_owner:$.current}}function he(w,L){return{$$typeof:r,type:w.type,key:L,ref:w.ref,props:w.props,_owner:w._owner}}function ee(w){return typeof w=="object"&&w!==null&&w.$$typeof===r}function ue(w){var L={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(H){return L[H]})}var W=/\/+/g;function Q(w,L){return typeof w=="object"&&w!==null&&w.key!=null?ue(""+w.key):L.toString(36)}function be(w,L,H,V,pe){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var Se=!1;if(w===null)Se=!0;else switch(fe){case"string":case"number":Se=!0;break;case"object":switch(w.$$typeof){case r:case a:Se=!0}}if(Se)return Se=w,pe=pe(Se),w=V===""?"."+Q(Se,0):V,J(pe)?(H="",w!=null&&(H=w.replace(W,"$&/")+"/"),be(pe,L,H,"",function(it){return it})):pe!=null&&(ee(pe)&&(pe=he(pe,H+(!pe.key||Se&&Se.key===pe.key?"":(""+pe.key).replace(W,"$&/")+"/")+w)),L.push(pe)),1;if(Se=0,V=V===""?".":V+":",J(w))for(var ke=0;ke<w.length;ke++){fe=w[ke];var xe=V+Q(fe,ke);Se+=be(fe,L,H,xe,pe)}else if(xe=k(w),typeof xe=="function")for(w=xe.call(w),ke=0;!(fe=w.next()).done;)fe=fe.value,xe=V+Q(fe,ke++),Se+=be(fe,L,H,xe,pe);else if(fe==="object")throw L=String(w),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return Se}function Ne(w,L,H){if(w==null)return w;var V=[],pe=0;return be(w,V,"","",function(fe){return L.call(H,fe,pe++)}),V}function ve(w){if(w._status===-1){var L=w._result;L=L(),L.then(function(H){(w._status===0||w._status===-1)&&(w._status=1,w._result=H)},function(H){(w._status===0||w._status===-1)&&(w._status=2,w._result=H)}),w._status===-1&&(w._status=0,w._result=L)}if(w._status===1)return w._result.default;throw w._result}var ye={current:null},U={transition:null},D={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:U,ReactCurrentOwner:$};function T(){throw Error("act(...) is not supported in production builds of React.")}return je.Children={map:Ne,forEach:function(w,L,H){Ne(w,function(){L.apply(this,arguments)},H)},count:function(w){var L=0;return Ne(w,function(){L++}),L},toArray:function(w){return Ne(w,function(L){return L})||[]},only:function(w){if(!ee(w))throw Error("React.Children.only expected to receive a single React element child.");return w}},je.Component=M,je.Fragment=o,je.Profiler=d,je.PureComponent=Z,je.StrictMode=l,je.Suspense=m,je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,je.act=T,je.cloneElement=function(w,L,H){if(w==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+w+".");var V=_({},w.props),pe=w.key,fe=w.ref,Se=w._owner;if(L!=null){if(L.ref!==void 0&&(fe=L.ref,Se=$.current),L.key!==void 0&&(pe=""+L.key),w.type&&w.type.defaultProps)var ke=w.type.defaultProps;for(xe in L)ne.call(L,xe)&&!X.hasOwnProperty(xe)&&(V[xe]=L[xe]===void 0&&ke!==void 0?ke[xe]:L[xe])}var xe=arguments.length-2;if(xe===1)V.children=H;else if(1<xe){ke=Array(xe);for(var it=0;it<xe;it++)ke[it]=arguments[it+2];V.children=ke}return{$$typeof:r,type:w.type,key:pe,ref:fe,props:V,_owner:Se}},je.createContext=function(w){return w={$$typeof:f,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},w.Provider={$$typeof:p,_context:w},w.Consumer=w},je.createElement=K,je.createFactory=function(w){var L=K.bind(null,w);return L.type=w,L},je.createRef=function(){return{current:null}},je.forwardRef=function(w){return{$$typeof:h,render:w}},je.isValidElement=ee,je.lazy=function(w){return{$$typeof:b,_payload:{_status:-1,_result:w},_init:ve}},je.memo=function(w,L){return{$$typeof:v,type:w,compare:L===void 0?null:L}},je.startTransition=function(w){var L=U.transition;U.transition={};try{w()}finally{U.transition=L}},je.unstable_act=T,je.useCallback=function(w,L){return ye.current.useCallback(w,L)},je.useContext=function(w){return ye.current.useContext(w)},je.useDebugValue=function(){},je.useDeferredValue=function(w){return ye.current.useDeferredValue(w)},je.useEffect=function(w,L){return ye.current.useEffect(w,L)},je.useId=function(){return ye.current.useId()},je.useImperativeHandle=function(w,L,H){return ye.current.useImperativeHandle(w,L,H)},je.useInsertionEffect=function(w,L){return ye.current.useInsertionEffect(w,L)},je.useLayoutEffect=function(w,L){return ye.current.useLayoutEffect(w,L)},je.useMemo=function(w,L){return ye.current.useMemo(w,L)},je.useReducer=function(w,L,H){return ye.current.useReducer(w,L,H)},je.useRef=function(w){return ye.current.useRef(w)},je.useState=function(w){return ye.current.useState(w)},je.useSyncExternalStore=function(w,L,H){return ye.current.useSyncExternalStore(w,L,H)},je.useTransition=function(){return ye.current.useTransition()},je.version="18.3.1",je}var ip;function Hl(){return ip||(ip=1,ap.exports=ub()),ap.exports}var lp;function pb(){if(lp)return ea;lp=1;var r=Hl(),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,d=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function f(h,m,v){var b,j={},k=null,S=null;v!==void 0&&(k=""+v),m.key!==void 0&&(k=""+m.key),m.ref!==void 0&&(S=m.ref);for(b in m)l.call(m,b)&&!p.hasOwnProperty(b)&&(j[b]=m[b]);if(h&&h.defaultProps)for(b in m=h.defaultProps,m)j[b]===void 0&&(j[b]=m[b]);return{$$typeof:a,type:h,key:k,ref:S,props:j,_owner:d.current}}return ea.Fragment=o,ea.jsx=f,ea.jsxs=f,ea}var sp;function fb(){return sp||(sp=1,np.exports=pb()),np.exports}var c=fb(),x=Hl();const hb=rp(x),gb=db({__proto__:null,default:hb},[x]);var Ro={},Xl={exports:{}},ot={},cp={exports:{}},dp={},up;function mb(){return up||(up=1,(function(r){function a(U,D){var T=U.length;U.push(D);e:for(;0<T;){var w=T-1>>>1,L=U[w];if(0<d(L,D))U[w]=D,U[T]=L,T=w;else break e}}function o(U){return U.length===0?null:U[0]}function l(U){if(U.length===0)return null;var D=U[0],T=U.pop();if(T!==D){U[0]=T;e:for(var w=0,L=U.length,H=L>>>1;w<H;){var V=2*(w+1)-1,pe=U[V],fe=V+1,Se=U[fe];if(0>d(pe,T))fe<L&&0>d(Se,pe)?(U[w]=Se,U[fe]=T,w=fe):(U[w]=pe,U[V]=T,w=V);else if(fe<L&&0>d(Se,T))U[w]=Se,U[fe]=T,w=fe;else break e}}return D}function d(U,D){var T=U.sortIndex-D.sortIndex;return T!==0?T:U.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var f=Date,h=f.now();r.unstable_now=function(){return f.now()-h}}var m=[],v=[],b=1,j=null,k=3,S=!1,_=!1,E=!1,M=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oe(U){for(var D=o(v);D!==null;){if(D.callback===null)l(v);else if(D.startTime<=U)l(v),D.sortIndex=D.expirationTime,a(m,D);else break;D=o(v)}}function J(U){if(E=!1,oe(U),!_)if(o(m)!==null)_=!0,ve(ne);else{var D=o(v);D!==null&&ye(J,D.startTime-U)}}function ne(U,D){_=!1,E&&(E=!1,F(K),K=-1),S=!0;var T=k;try{for(oe(D),j=o(m);j!==null&&(!(j.expirationTime>D)||U&&!ue());){var w=j.callback;if(typeof w=="function"){j.callback=null,k=j.priorityLevel;var L=w(j.expirationTime<=D);D=r.unstable_now(),typeof L=="function"?j.callback=L:j===o(m)&&l(m),oe(D)}else l(m);j=o(m)}if(j!==null)var H=!0;else{var V=o(v);V!==null&&ye(J,V.startTime-D),H=!1}return H}finally{j=null,k=T,S=!1}}var $=!1,X=null,K=-1,he=5,ee=-1;function ue(){return!(r.unstable_now()-ee<he)}function W(){if(X!==null){var U=r.unstable_now();ee=U;var D=!0;try{D=X(!0,U)}finally{D?Q():($=!1,X=null)}}else $=!1}var Q;if(typeof Z=="function")Q=function(){Z(W)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,Ne=be.port2;be.port1.onmessage=W,Q=function(){Ne.postMessage(null)}}else Q=function(){M(W,0)};function ve(U){X=U,$||($=!0,Q())}function ye(U,D){K=M(function(){U(r.unstable_now())},D)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_continueExecution=function(){_||S||(_=!0,ve(ne))},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return k},r.unstable_getFirstCallbackNode=function(){return o(m)},r.unstable_next=function(U){switch(k){case 1:case 2:case 3:var D=3;break;default:D=k}var T=k;k=D;try{return U()}finally{k=T}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(U,D){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var T=k;k=U;try{return D()}finally{k=T}},r.unstable_scheduleCallback=function(U,D,T){var w=r.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?w+T:w):T=w,U){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=T+L,U={id:b++,callback:D,priorityLevel:U,startTime:T,expirationTime:L,sortIndex:-1},T>w?(U.sortIndex=T,a(v,U),o(m)===null&&U===o(v)&&(E?(F(K),K=-1):E=!0,ye(J,T-w))):(U.sortIndex=L,a(m,U),_||S||(_=!0,ve(ne))),U},r.unstable_shouldYield=ue,r.unstable_wrapCallback=function(U){var D=k;return function(){var T=k;k=D;try{return U.apply(this,arguments)}finally{k=T}}}})(dp)),dp}var pp;function bb(){return pp||(pp=1,cp.exports=mb()),cp.exports}var fp;function xb(){if(fp)return ot;fp=1;var r=Hl(),a=bb();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,d={};function p(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(d[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,v=/^[: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]*$/,b={},j={};function k(e){return m.call(j,e)?!0:m.call(b,e)?!1:v.test(e)?j[e]=!0:(b[e]=!0,!1)}function S(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,t,n,i){if(t===null||typeof t>"u"||S(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function E(e,t,n,i,s,u,g){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=g}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new E(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new E(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new E(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new E(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new E(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new E(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){M[e]=new E(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){M[e]=new E(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){M[e]=new E(e,5,!1,e.toLowerCase(),null,!1,!1)});var F=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F,Z);M[t]=new E(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new E(e,1,!1,e.toLowerCase(),null,!1,!1)}),M.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){M[e]=new E(e,1,!1,e.toLowerCase(),null,!0,!0)});function oe(e,t,n,i){var s=M.hasOwnProperty(t)?M[t]:null;(s!==null?s.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_(t,n,s,i)&&(n=null),i||s===null?k(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,i=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var J=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),$=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),ue=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),U=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var T=Object.assign,w;function L(e){if(w===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);w=t&&t[1]||""}return`
2
+ `+w+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(P){var i=P}Reflect.construct(e,[],t)}else{try{t.call()}catch(P){i=P}e.call(t.prototype)}else{try{throw Error()}catch(P){i=P}e()}}catch(P){if(P&&i&&typeof P.stack=="string"){for(var s=P.stack.split(`
3
+ `),u=i.stack.split(`
4
+ `),g=s.length-1,y=u.length-1;1<=g&&0<=y&&s[g]!==u[y];)y--;for(;1<=g&&0<=y;g--,y--)if(s[g]!==u[y]){if(g!==1||y!==1)do if(g--,y--,0>y||s[g]!==u[y]){var C=`
5
+ `+s[g].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=g&&0<=y);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function pe(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1),e;case 11:return e=V(e.type.render,!1),e;case 1:return e=V(e.type,!0),e;default:return""}}function fe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case $:return"Portal";case he:return"Profiler";case K:return"StrictMode";case Q:return"Suspense";case be:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ue:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case ve:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}function Se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(t);case 8:return t===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function it(e){var t=xe(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(g){i=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function va(e){e._valueTracker||(e._valueTracker=it(e))}function lc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=xe(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ya(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ei(e,t){var n=t.checked;return T({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sc(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ke(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cc(e,t){t=t.checked,t!=null&&oe(e,"checked",t,!1)}function ti(e,t){cc(e,t);var n=ke(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&ri(e,t.type,ke(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ri(e,t,n){(t!=="number"||ya(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gn=Array.isArray;function Tr(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&i&&(e[n].defaultSelected=!0)}else{for(n=""+ke(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,i&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ni(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return T({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(gn(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ke(n)}}function pc(e,t){var n=ke(t.value),i=ke(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function fc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hc(e){switch(e){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 ai(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wa,gc=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wa=wa||document.createElement("div"),wa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bn={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},pg=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){pg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bn[t]=bn[e]})});function mc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bn.hasOwnProperty(e)&&bn[e]?(""+t).trim():t+"px"}function bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=mc(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var fg=T({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 oi(e,t){if(t){if(fg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function ii(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var li=null;function si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ci=null,Ir=null,Ar=null;function xc(e){if(e=$n(e)){if(typeof ci!="function")throw Error(o(280));var t=e.stateNode;t&&(t=Ba(t),ci(e.stateNode,e.type,t))}}function vc(e){Ir?Ar?Ar.push(e):Ar=[e]:Ir=e}function yc(){if(Ir){var e=Ir,t=Ar;if(Ar=Ir=null,xc(e),t)for(e=0;e<t.length;e++)xc(t[e])}}function wc(e,t){return e(t)}function kc(){}var di=!1;function jc(e,t,n){if(di)return e(t,n);di=!0;try{return wc(e,t,n)}finally{di=!1,(Ir!==null||Ar!==null)&&(kc(),yc())}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var i=Ba(n);if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var ui=!1;if(h)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){ui=!0}}),window.addEventListener("test",vn,vn),window.removeEventListener("test",vn,vn)}catch{ui=!1}function hg(e,t,n,i,s,u,g,y,C){var P=Array.prototype.slice.call(arguments,3);try{t.apply(n,P)}catch(A){this.onError(A)}}var yn=!1,ka=null,ja=!1,pi=null,gg={onError:function(e){yn=!0,ka=e}};function mg(e,t,n,i,s,u,g,y,C){yn=!1,ka=null,hg.apply(gg,arguments)}function bg(e,t,n,i,s,u,g,y,C){if(mg.apply(this,arguments),yn){if(yn){var P=ka;yn=!1,ka=null}else throw Error(o(198));ja||(ja=!0,pi=P)}}function hr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Sc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Cc(e){if(hr(e)!==e)throw Error(o(188))}function xg(e){var t=e.alternate;if(!t){if(t=hr(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var s=n.return;if(s===null)break;var u=s.alternate;if(u===null){if(i=s.return,i!==null){n=i;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===n)return Cc(s),e;if(u===i)return Cc(s),t;u=u.sibling}throw Error(o(188))}if(n.return!==i.return)n=s,i=u;else{for(var g=!1,y=s.child;y;){if(y===n){g=!0,n=s,i=u;break}if(y===i){g=!0,i=s,n=u;break}y=y.sibling}if(!g){for(y=u.child;y;){if(y===n){g=!0,n=u,i=s;break}if(y===i){g=!0,i=u,n=s;break}y=y.sibling}if(!g)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function Nc(e){return e=xg(e),e!==null?Ec(e):null}function Ec(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ec(e);if(t!==null)return t;e=e.sibling}return null}var _c=a.unstable_scheduleCallback,zc=a.unstable_cancelCallback,vg=a.unstable_shouldYield,yg=a.unstable_requestPaint,Ae=a.unstable_now,wg=a.unstable_getCurrentPriorityLevel,fi=a.unstable_ImmediatePriority,Rc=a.unstable_UserBlockingPriority,Sa=a.unstable_NormalPriority,kg=a.unstable_LowPriority,Mc=a.unstable_IdlePriority,Ca=null,Rt=null;function jg(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Ca,e,void 0,(e.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:Ng,Sg=Math.log,Cg=Math.LN2;function Ng(e){return e>>>=0,e===0?32:31-(Sg(e)/Cg|0)|0}var Na=64,Ea=4194304;function wn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _a(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,u=e.pingedLanes,g=n&268435455;if(g!==0){var y=g&~s;y!==0?i=wn(y):(u&=g,u!==0&&(i=wn(u)))}else g=n&~s,g!==0?i=wn(g):u!==0&&(i=wn(u));if(i===0)return 0;if(t!==0&&t!==i&&(t&s)===0&&(s=i&-i,u=t&-t,s>=u||s===16&&(u&4194240)!==0))return t;if((i&4)!==0&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-wt(t),s=1<<n,i|=e[n],t&=~s;return i}function Eg(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 _g(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes;0<u;){var g=31-wt(u),y=1<<g,C=s[g];C===-1?((y&n)===0||(y&i)!==0)&&(s[g]=Eg(y,t)):C<=t&&(e.expiredLanes|=y),u&=~y}}function hi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Pc(){var e=Na;return Na<<=1,(Na&4194240)===0&&(Na=64),e}function gi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function zg(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-wt(n),u=1<<s;t[s]=0,i[s]=-1,e[s]=-1,n&=~u}}function mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-wt(n),s=1<<i;s&t|e[i]&t&&(e[i]|=t),n&=~s}}var _e=0;function Lc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Dc,bi,Tc,Ic,Ac,xi=!1,za=[],Wt=null,Ht=null,Xt=null,jn=new Map,Sn=new Map,Kt=[],Rg="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 Oc(e,t){switch(e){case"focusin":case"focusout":Wt=null;break;case"dragenter":case"dragleave":Ht=null;break;case"mouseover":case"mouseout":Xt=null;break;case"pointerover":case"pointerout":jn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sn.delete(t.pointerId)}}function Cn(e,t,n,i,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[s]},t!==null&&(t=$n(t),t!==null&&bi(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Mg(e,t,n,i,s){switch(t){case"focusin":return Wt=Cn(Wt,e,t,n,i,s),!0;case"dragenter":return Ht=Cn(Ht,e,t,n,i,s),!0;case"mouseover":return Xt=Cn(Xt,e,t,n,i,s),!0;case"pointerover":var u=s.pointerId;return jn.set(u,Cn(jn.get(u)||null,e,t,n,i,s)),!0;case"gotpointercapture":return u=s.pointerId,Sn.set(u,Cn(Sn.get(u)||null,e,t,n,i,s)),!0}return!1}function $c(e){var t=gr(e.target);if(t!==null){var n=hr(t);if(n!==null){if(t=n.tag,t===13){if(t=Sc(n),t!==null){e.blockedOn=t,Ac(e.priority,function(){Tc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);li=i,n.target.dispatchEvent(i),li=null}else return t=$n(n),t!==null&&bi(t),e.blockedOn=n,!1;t.shift()}return!0}function Fc(e,t,n){Ra(e)&&n.delete(t)}function Pg(){xi=!1,Wt!==null&&Ra(Wt)&&(Wt=null),Ht!==null&&Ra(Ht)&&(Ht=null),Xt!==null&&Ra(Xt)&&(Xt=null),jn.forEach(Fc),Sn.forEach(Fc)}function Nn(e,t){e.blockedOn===t&&(e.blockedOn=null,xi||(xi=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Pg)))}function En(e){function t(s){return Nn(s,e)}if(0<za.length){Nn(za[0],e);for(var n=1;n<za.length;n++){var i=za[n];i.blockedOn===e&&(i.blockedOn=null)}}for(Wt!==null&&Nn(Wt,e),Ht!==null&&Nn(Ht,e),Xt!==null&&Nn(Xt,e),jn.forEach(t),Sn.forEach(t),n=0;n<Kt.length;n++)i=Kt[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Kt.length&&(n=Kt[0],n.blockedOn===null);)$c(n),n.blockedOn===null&&Kt.shift()}var Or=J.ReactCurrentBatchConfig,Ma=!0;function Lg(e,t,n,i){var s=_e,u=Or.transition;Or.transition=null;try{_e=1,vi(e,t,n,i)}finally{_e=s,Or.transition=u}}function Dg(e,t,n,i){var s=_e,u=Or.transition;Or.transition=null;try{_e=4,vi(e,t,n,i)}finally{_e=s,Or.transition=u}}function vi(e,t,n,i){if(Ma){var s=yi(e,t,n,i);if(s===null)Ai(e,t,i,Pa,n),Oc(e,i);else if(Mg(s,e,t,n,i))i.stopPropagation();else if(Oc(e,i),t&4&&-1<Rg.indexOf(e)){for(;s!==null;){var u=$n(s);if(u!==null&&Dc(u),u=yi(e,t,n,i),u===null&&Ai(e,t,i,Pa,n),u===s)break;s=u}s!==null&&i.stopPropagation()}else Ai(e,t,i,null,n)}}var Pa=null;function yi(e,t,n,i){if(Pa=null,e=si(i),e=gr(e),e!==null)if(t=hr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Sc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Pa=e,null}function Uc(e){switch(e){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(wg()){case fi:return 1;case Rc:return 4;case Sa:case kg:return 16;case Mc:return 536870912;default:return 16}default:return 16}}var Qt=null,wi=null,La=null;function qc(){if(La)return La;var e,t=wi,n=t.length,i,s="value"in Qt?Qt.value:Qt.textContent,u=s.length;for(e=0;e<n&&t[e]===s[e];e++);var g=n-e;for(i=1;i<=g&&t[n-i]===s[u-i];i++);return La=s.slice(e,1<i?1-i:void 0)}function Da(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ta(){return!0}function Vc(){return!1}function lt(e){function t(n,i,s,u,g){this._reactName=n,this._targetInst=s,this.type=i,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(n=e[y],this[y]=n?n(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ta:Vc,this.isPropagationStopped=Vc,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ta)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ta)},persist:function(){},isPersistent:Ta}),t}var $r={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=lt($r),_n=T({},$r,{view:0,detail:0}),Tg=lt(_n),ji,Si,zn,Ia=T({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ni,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zn&&(zn&&e.type==="mousemove"?(ji=e.screenX-zn.screenX,Si=e.screenY-zn.screenY):Si=ji=0,zn=e),ji)},movementY:function(e){return"movementY"in e?e.movementY:Si}}),Bc=lt(Ia),Ig=T({},Ia,{dataTransfer:0}),Ag=lt(Ig),Og=T({},_n,{relatedTarget:0}),Ci=lt(Og),$g=T({},$r,{animationName:0,elapsedTime:0,pseudoElement:0}),Fg=lt($g),Ug=T({},$r,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qg=lt(Ug),Vg=T({},$r,{data:0}),Wc=lt(Vg),Bg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wg={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"},Hg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hg[e])?!!t[e]:!1}function Ni(){return Xg}var Kg=T({},_n,{key:function(e){if(e.key){var t=Bg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Da(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ni,charCode:function(e){return e.type==="keypress"?Da(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Da(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qg=lt(Kg),Yg=T({},Ia,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=lt(Yg),Zg=T({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ni}),Jg=lt(Zg),Gg=T({},$r,{propertyName:0,elapsedTime:0,pseudoElement:0}),em=lt(Gg),tm=T({},Ia,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),rm=lt(tm),nm=[9,13,27,32],Ei=h&&"CompositionEvent"in window,Rn=null;h&&"documentMode"in document&&(Rn=document.documentMode);var am=h&&"TextEvent"in window&&!Rn,Xc=h&&(!Ei||Rn&&8<Rn&&11>=Rn),Kc=" ",Qc=!1;function Yc(e,t){switch(e){case"keyup":return nm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fr=!1;function om(e,t){switch(e){case"compositionend":return Zc(t);case"keypress":return t.which!==32?null:(Qc=!0,Kc);case"textInput":return e=t.data,e===Kc&&Qc?null:e;default:return null}}function im(e,t){if(Fr)return e==="compositionend"||!Ei&&Yc(e,t)?(e=qc(),La=wi=Qt=null,Fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Xc&&t.locale!=="ko"?null:t.data;default:return null}}var lm={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 Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lm[e.type]:t==="textarea"}function Gc(e,t,n,i){vc(i),t=Ua(t,"onChange"),0<t.length&&(n=new ki("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Mn=null,Pn=null;function sm(e){bd(e,0)}function Aa(e){var t=Wr(e);if(lc(t))return e}function cm(e,t){if(e==="change")return t}var ed=!1;if(h){var _i;if(h){var zi="oninput"in document;if(!zi){var td=document.createElement("div");td.setAttribute("oninput","return;"),zi=typeof td.oninput=="function"}_i=zi}else _i=!1;ed=_i&&(!document.documentMode||9<document.documentMode)}function rd(){Mn&&(Mn.detachEvent("onpropertychange",nd),Pn=Mn=null)}function nd(e){if(e.propertyName==="value"&&Aa(Pn)){var t=[];Gc(t,Pn,e,si(e)),jc(sm,t)}}function dm(e,t,n){e==="focusin"?(rd(),Mn=t,Pn=n,Mn.attachEvent("onpropertychange",nd)):e==="focusout"&&rd()}function um(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Aa(Pn)}function pm(e,t){if(e==="click")return Aa(t)}function fm(e,t){if(e==="input"||e==="change")return Aa(t)}function hm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:hm;function Ln(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var s=n[i];if(!m.call(t,s)||!kt(e[s],t[s]))return!1}return!0}function ad(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function od(e,t){var n=ad(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ad(n)}}function id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ld(){for(var e=window,t=ya();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ya(e.document)}return t}function Ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gm(e){var t=ld(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&id(n.ownerDocument.documentElement,n)){if(i!==null&&Ri(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,u=Math.min(i.start,s);i=i.end===void 0?u:Math.min(i.end,s),!e.extend&&u>i&&(s=i,i=u,u=s),s=od(n,u);var g=od(n,i);s&&g&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),u>i?(e.addRange(t),e.extend(g.node,g.offset)):(t.setEnd(g.node,g.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mm=h&&"documentMode"in document&&11>=document.documentMode,Ur=null,Mi=null,Dn=null,Pi=!1;function sd(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pi||Ur==null||Ur!==ya(i)||(i=Ur,"selectionStart"in i&&Ri(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Dn&&Ln(Dn,i)||(Dn=i,i=Ua(Mi,"onSelect"),0<i.length&&(t=new ki("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=Ur)))}function Oa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qr={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionend:Oa("Transition","TransitionEnd")},Li={},cd={};h&&(cd=document.createElement("div").style,"AnimationEvent"in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),"TransitionEvent"in window||delete qr.transitionend.transition);function $a(e){if(Li[e])return Li[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cd)return Li[e]=t[n];return e}var dd=$a("animationend"),ud=$a("animationiteration"),pd=$a("animationstart"),fd=$a("transitionend"),hd=new Map,gd="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 Yt(e,t){hd.set(e,t),p(t,[e])}for(var Di=0;Di<gd.length;Di++){var Ti=gd[Di],bm=Ti.toLowerCase(),xm=Ti[0].toUpperCase()+Ti.slice(1);Yt(bm,"on"+xm)}Yt(dd,"onAnimationEnd"),Yt(ud,"onAnimationIteration"),Yt(pd,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(fd,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tn="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(" "),vm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tn));function md(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,bg(i,t,void 0,e),e.currentTarget=null}function bd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],s=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var g=i.length-1;0<=g;g--){var y=i[g],C=y.instance,P=y.currentTarget;if(y=y.listener,C!==u&&s.isPropagationStopped())break e;md(s,y,P),u=C}else for(g=0;g<i.length;g++){if(y=i[g],C=y.instance,P=y.currentTarget,y=y.listener,C!==u&&s.isPropagationStopped())break e;md(s,y,P),u=C}}}if(ja)throw e=pi,ja=!1,pi=null,e}function Re(e,t){var n=t[Vi];n===void 0&&(n=t[Vi]=new Set);var i=e+"__bubble";n.has(i)||(xd(t,e,2,!1),n.add(i))}function Ii(e,t,n){var i=0;t&&(i|=4),xd(n,e,i,t)}var Fa="_reactListening"+Math.random().toString(36).slice(2);function In(e){if(!e[Fa]){e[Fa]=!0,l.forEach(function(n){n!=="selectionchange"&&(vm.has(n)||Ii(n,!1,e),Ii(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fa]||(t[Fa]=!0,Ii("selectionchange",!1,t))}}function xd(e,t,n,i){switch(Uc(t)){case 1:var s=Lg;break;case 4:s=Dg;break;default:s=vi}n=s.bind(null,t,n,e),s=void 0,!ui||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),i?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ai(e,t,n,i,s){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var y=i.stateNode.containerInfo;if(y===s||y.nodeType===8&&y.parentNode===s)break;if(g===4)for(g=i.return;g!==null;){var C=g.tag;if((C===3||C===4)&&(C=g.stateNode.containerInfo,C===s||C.nodeType===8&&C.parentNode===s))return;g=g.return}for(;y!==null;){if(g=gr(y),g===null)return;if(C=g.tag,C===5||C===6){i=u=g;continue e}y=y.parentNode}}i=i.return}jc(function(){var P=u,A=si(n),O=[];e:{var I=hd.get(e);if(I!==void 0){var Y=ki,re=e;switch(e){case"keypress":if(Da(n)===0)break e;case"keydown":case"keyup":Y=Qg;break;case"focusin":re="focus",Y=Ci;break;case"focusout":re="blur",Y=Ci;break;case"beforeblur":case"afterblur":Y=Ci;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Bc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Ag;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Jg;break;case dd:case ud:case pd:Y=Fg;break;case fd:Y=em;break;case"scroll":Y=Tg;break;case"wheel":Y=rm;break;case"copy":case"cut":case"paste":Y=qg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Hc}var ae=(t&4)!==0,Oe=!ae&&e==="scroll",z=ae?I!==null?I+"Capture":null:I;ae=[];for(var N=P,R;N!==null;){R=N;var q=R.stateNode;if(R.tag===5&&q!==null&&(R=q,z!==null&&(q=xn(N,z),q!=null&&ae.push(An(N,q,R)))),Oe)break;N=N.return}0<ae.length&&(I=new Y(I,re,null,n,A),O.push({event:I,listeners:ae}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",I&&n!==li&&(re=n.relatedTarget||n.fromElement)&&(gr(re)||re[Tt]))break e;if((Y||I)&&(I=A.window===A?A:(I=A.ownerDocument)?I.defaultView||I.parentWindow:window,Y?(re=n.relatedTarget||n.toElement,Y=P,re=re?gr(re):null,re!==null&&(Oe=hr(re),re!==Oe||re.tag!==5&&re.tag!==6)&&(re=null)):(Y=null,re=P),Y!==re)){if(ae=Bc,q="onMouseLeave",z="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ae=Hc,q="onPointerLeave",z="onPointerEnter",N="pointer"),Oe=Y==null?I:Wr(Y),R=re==null?I:Wr(re),I=new ae(q,N+"leave",Y,n,A),I.target=Oe,I.relatedTarget=R,q=null,gr(A)===P&&(ae=new ae(z,N+"enter",re,n,A),ae.target=R,ae.relatedTarget=Oe,q=ae),Oe=q,Y&&re)t:{for(ae=Y,z=re,N=0,R=ae;R;R=Vr(R))N++;for(R=0,q=z;q;q=Vr(q))R++;for(;0<N-R;)ae=Vr(ae),N--;for(;0<R-N;)z=Vr(z),R--;for(;N--;){if(ae===z||z!==null&&ae===z.alternate)break t;ae=Vr(ae),z=Vr(z)}ae=null}else ae=null;Y!==null&&vd(O,I,Y,ae,!1),re!==null&&Oe!==null&&vd(O,Oe,re,ae,!0)}}e:{if(I=P?Wr(P):window,Y=I.nodeName&&I.nodeName.toLowerCase(),Y==="select"||Y==="input"&&I.type==="file")var ie=cm;else if(Jc(I))if(ed)ie=fm;else{ie=um;var ce=dm}else(Y=I.nodeName)&&Y.toLowerCase()==="input"&&(I.type==="checkbox"||I.type==="radio")&&(ie=pm);if(ie&&(ie=ie(e,P))){Gc(O,ie,n,A);break e}ce&&ce(e,I,P),e==="focusout"&&(ce=I._wrapperState)&&ce.controlled&&I.type==="number"&&ri(I,"number",I.value)}switch(ce=P?Wr(P):window,e){case"focusin":(Jc(ce)||ce.contentEditable==="true")&&(Ur=ce,Mi=P,Dn=null);break;case"focusout":Dn=Mi=Ur=null;break;case"mousedown":Pi=!0;break;case"contextmenu":case"mouseup":case"dragend":Pi=!1,sd(O,n,A);break;case"selectionchange":if(mm)break;case"keydown":case"keyup":sd(O,n,A)}var de;if(Ei)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else Fr?Yc(e,n)&&(ge="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ge="onCompositionStart");ge&&(Xc&&n.locale!=="ko"&&(Fr||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&Fr&&(de=qc()):(Qt=A,wi="value"in Qt?Qt.value:Qt.textContent,Fr=!0)),ce=Ua(P,ge),0<ce.length&&(ge=new Wc(ge,e,null,n,A),O.push({event:ge,listeners:ce}),de?ge.data=de:(de=Zc(n),de!==null&&(ge.data=de)))),(de=am?om(e,n):im(e,n))&&(P=Ua(P,"onBeforeInput"),0<P.length&&(A=new Wc("onBeforeInput","beforeinput",null,n,A),O.push({event:A,listeners:P}),A.data=de))}bd(O,t)})}function An(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ua(e,t){for(var n=t+"Capture",i=[];e!==null;){var s=e,u=s.stateNode;s.tag===5&&u!==null&&(s=u,u=xn(e,n),u!=null&&i.unshift(An(e,u,s)),u=xn(e,t),u!=null&&i.push(An(e,u,s))),e=e.return}return i}function Vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vd(e,t,n,i,s){for(var u=t._reactName,g=[];n!==null&&n!==i;){var y=n,C=y.alternate,P=y.stateNode;if(C!==null&&C===i)break;y.tag===5&&P!==null&&(y=P,s?(C=xn(n,u),C!=null&&g.unshift(An(n,C,y))):s||(C=xn(n,u),C!=null&&g.push(An(n,C,y)))),n=n.return}g.length!==0&&e.push({event:t,listeners:g})}var ym=/\r\n?/g,wm=/\u0000|\uFFFD/g;function yd(e){return(typeof e=="string"?e:""+e).replace(ym,`
6
+ `).replace(wm,"")}function qa(e,t,n){if(t=yd(t),yd(e)!==t&&n)throw Error(o(425))}function Va(){}var Oi=null,$i=null;function Fi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ui=typeof setTimeout=="function"?setTimeout:void 0,km=typeof clearTimeout=="function"?clearTimeout:void 0,wd=typeof Promise=="function"?Promise:void 0,jm=typeof queueMicrotask=="function"?queueMicrotask:typeof wd<"u"?function(e){return wd.resolve(null).then(e).catch(Sm)}:Ui;function Sm(e){setTimeout(function(){throw e})}function qi(e,t){var n=t,i=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(i===0){e.removeChild(s),En(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=s}while(n);En(t)}function Zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Br=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Br,On="__reactProps$"+Br,Tt="__reactContainer$"+Br,Vi="__reactEvents$"+Br,Cm="__reactListeners$"+Br,Nm="__reactHandles$"+Br;function gr(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=kd(e);e!==null;){if(n=e[Mt])return n;e=kd(e)}return t}e=n,n=e.parentNode}return null}function $n(e){return e=e[Mt]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Ba(e){return e[On]||null}var Bi=[],Hr=-1;function Jt(e){return{current:e}}function Me(e){0>Hr||(e.current=Bi[Hr],Bi[Hr]=null,Hr--)}function ze(e,t){Hr++,Bi[Hr]=e.current,e.current=t}var Gt={},Xe=Jt(Gt),et=Jt(!1),mr=Gt;function Xr(e,t){var n=e.type.contextTypes;if(!n)return Gt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},u;for(u in n)s[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function tt(e){return e=e.childContextTypes,e!=null}function Wa(){Me(et),Me(Xe)}function jd(e,t,n){if(Xe.current!==Gt)throw Error(o(168));ze(Xe,t),ze(et,n)}function Sd(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(o(108,Se(e)||"Unknown",s));return T({},n,i)}function Ha(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gt,mr=Xe.current,ze(Xe,e),ze(et,et.current),!0}function Cd(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Sd(e,t,mr),i.__reactInternalMemoizedMergedChildContext=e,Me(et),Me(Xe),ze(Xe,e)):Me(et),ze(et,n)}var It=null,Xa=!1,Wi=!1;function Nd(e){It===null?It=[e]:It.push(e)}function Em(e){Xa=!0,Nd(e)}function er(){if(!Wi&&It!==null){Wi=!0;var e=0,t=_e;try{var n=It;for(_e=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}It=null,Xa=!1}catch(s){throw It!==null&&(It=It.slice(e+1)),_c(fi,er),s}finally{_e=t,Wi=!1}}return null}var Kr=[],Qr=0,Ka=null,Qa=0,ft=[],ht=0,br=null,At=1,Ot="";function xr(e,t){Kr[Qr++]=Qa,Kr[Qr++]=Ka,Ka=e,Qa=t}function Ed(e,t,n){ft[ht++]=At,ft[ht++]=Ot,ft[ht++]=br,br=e;var i=At;e=Ot;var s=32-wt(i)-1;i&=~(1<<s),n+=1;var u=32-wt(t)+s;if(30<u){var g=s-s%5;u=(i&(1<<g)-1).toString(32),i>>=g,s-=g,At=1<<32-wt(t)+s|n<<s|i,Ot=u+e}else At=1<<u|n<<s|i,Ot=e}function Hi(e){e.return!==null&&(xr(e,1),Ed(e,1,0))}function Xi(e){for(;e===Ka;)Ka=Kr[--Qr],Kr[Qr]=null,Qa=Kr[--Qr],Kr[Qr]=null;for(;e===br;)br=ft[--ht],ft[ht]=null,Ot=ft[--ht],ft[ht]=null,At=ft[--ht],ft[ht]=null}var st=null,ct=null,Le=!1,jt=null;function _d(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function zd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,ct=Zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,ct=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=br!==null?{id:At,overflow:Ot}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,ct=null,!0):!1;default:return!1}}function Ki(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qi(e){if(Le){var t=ct;if(t){var n=t;if(!zd(e,t)){if(Ki(e))throw Error(o(418));t=Zt(n.nextSibling);var i=st;t&&zd(e,t)?_d(i,n):(e.flags=e.flags&-4097|2,Le=!1,st=e)}}else{if(Ki(e))throw Error(o(418));e.flags=e.flags&-4097|2,Le=!1,st=e}}}function Rd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Ya(e){if(e!==st)return!1;if(!Le)return Rd(e),Le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Fi(e.type,e.memoizedProps)),t&&(t=ct)){if(Ki(e))throw Md(),Error(o(418));for(;t;)_d(e,t),t=Zt(t.nextSibling)}if(Rd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ct=Zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ct=null}}else ct=st?Zt(e.stateNode.nextSibling):null;return!0}function Md(){for(var e=ct;e;)e=Zt(e.nextSibling)}function Yr(){ct=st=null,Le=!1}function Yi(e){jt===null?jt=[e]:jt.push(e)}var _m=J.ReactCurrentBatchConfig;function Fn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var s=i,u=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===u?t.ref:(t=function(g){var y=s.refs;g===null?delete y[u]:y[u]=g},t._stringRef=u,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Za(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pd(e){var t=e._init;return t(e._payload)}function Ld(e){function t(z,N){if(e){var R=z.deletions;R===null?(z.deletions=[N],z.flags|=16):R.push(N)}}function n(z,N){if(!e)return null;for(;N!==null;)t(z,N),N=N.sibling;return null}function i(z,N){for(z=new Map;N!==null;)N.key!==null?z.set(N.key,N):z.set(N.index,N),N=N.sibling;return z}function s(z,N){return z=sr(z,N),z.index=0,z.sibling=null,z}function u(z,N,R){return z.index=R,e?(R=z.alternate,R!==null?(R=R.index,R<N?(z.flags|=2,N):R):(z.flags|=2,N)):(z.flags|=1048576,N)}function g(z){return e&&z.alternate===null&&(z.flags|=2),z}function y(z,N,R,q){return N===null||N.tag!==6?(N=Fl(R,z.mode,q),N.return=z,N):(N=s(N,R),N.return=z,N)}function C(z,N,R,q){var ie=R.type;return ie===X?A(z,N,R.props.children,q,R.key):N!==null&&(N.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ve&&Pd(ie)===N.type)?(q=s(N,R.props),q.ref=Fn(z,N,R),q.return=z,q):(q=ko(R.type,R.key,R.props,null,z.mode,q),q.ref=Fn(z,N,R),q.return=z,q)}function P(z,N,R,q){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=Ul(R,z.mode,q),N.return=z,N):(N=s(N,R.children||[]),N.return=z,N)}function A(z,N,R,q,ie){return N===null||N.tag!==7?(N=Nr(R,z.mode,q,ie),N.return=z,N):(N=s(N,R),N.return=z,N)}function O(z,N,R){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Fl(""+N,z.mode,R),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case ne:return R=ko(N.type,N.key,N.props,null,z.mode,R),R.ref=Fn(z,null,N),R.return=z,R;case $:return N=Ul(N,z.mode,R),N.return=z,N;case ve:var q=N._init;return O(z,q(N._payload),R)}if(gn(N)||D(N))return N=Nr(N,z.mode,R,null),N.return=z,N;Za(z,N)}return null}function I(z,N,R,q){var ie=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ie!==null?null:y(z,N,""+R,q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ne:return R.key===ie?C(z,N,R,q):null;case $:return R.key===ie?P(z,N,R,q):null;case ve:return ie=R._init,I(z,N,ie(R._payload),q)}if(gn(R)||D(R))return ie!==null?null:A(z,N,R,q,null);Za(z,R)}return null}function Y(z,N,R,q,ie){if(typeof q=="string"&&q!==""||typeof q=="number")return z=z.get(R)||null,y(N,z,""+q,ie);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case ne:return z=z.get(q.key===null?R:q.key)||null,C(N,z,q,ie);case $:return z=z.get(q.key===null?R:q.key)||null,P(N,z,q,ie);case ve:var ce=q._init;return Y(z,N,R,ce(q._payload),ie)}if(gn(q)||D(q))return z=z.get(R)||null,A(N,z,q,ie,null);Za(N,q)}return null}function re(z,N,R,q){for(var ie=null,ce=null,de=N,ge=N=0,Be=null;de!==null&&ge<R.length;ge++){de.index>ge?(Be=de,de=null):Be=de.sibling;var Ee=I(z,de,R[ge],q);if(Ee===null){de===null&&(de=Be);break}e&&de&&Ee.alternate===null&&t(z,de),N=u(Ee,N,ge),ce===null?ie=Ee:ce.sibling=Ee,ce=Ee,de=Be}if(ge===R.length)return n(z,de),Le&&xr(z,ge),ie;if(de===null){for(;ge<R.length;ge++)de=O(z,R[ge],q),de!==null&&(N=u(de,N,ge),ce===null?ie=de:ce.sibling=de,ce=de);return Le&&xr(z,ge),ie}for(de=i(z,de);ge<R.length;ge++)Be=Y(de,z,ge,R[ge],q),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?ge:Be.key),N=u(Be,N,ge),ce===null?ie=Be:ce.sibling=Be,ce=Be);return e&&de.forEach(function(cr){return t(z,cr)}),Le&&xr(z,ge),ie}function ae(z,N,R,q){var ie=D(R);if(typeof ie!="function")throw Error(o(150));if(R=ie.call(R),R==null)throw Error(o(151));for(var ce=ie=null,de=N,ge=N=0,Be=null,Ee=R.next();de!==null&&!Ee.done;ge++,Ee=R.next()){de.index>ge?(Be=de,de=null):Be=de.sibling;var cr=I(z,de,Ee.value,q);if(cr===null){de===null&&(de=Be);break}e&&de&&cr.alternate===null&&t(z,de),N=u(cr,N,ge),ce===null?ie=cr:ce.sibling=cr,ce=cr,de=Be}if(Ee.done)return n(z,de),Le&&xr(z,ge),ie;if(de===null){for(;!Ee.done;ge++,Ee=R.next())Ee=O(z,Ee.value,q),Ee!==null&&(N=u(Ee,N,ge),ce===null?ie=Ee:ce.sibling=Ee,ce=Ee);return Le&&xr(z,ge),ie}for(de=i(z,de);!Ee.done;ge++,Ee=R.next())Ee=Y(de,z,ge,Ee.value,q),Ee!==null&&(e&&Ee.alternate!==null&&de.delete(Ee.key===null?ge:Ee.key),N=u(Ee,N,ge),ce===null?ie=Ee:ce.sibling=Ee,ce=Ee);return e&&de.forEach(function(lb){return t(z,lb)}),Le&&xr(z,ge),ie}function Oe(z,N,R,q){if(typeof R=="object"&&R!==null&&R.type===X&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ne:e:{for(var ie=R.key,ce=N;ce!==null;){if(ce.key===ie){if(ie=R.type,ie===X){if(ce.tag===7){n(z,ce.sibling),N=s(ce,R.props.children),N.return=z,z=N;break e}}else if(ce.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===ve&&Pd(ie)===ce.type){n(z,ce.sibling),N=s(ce,R.props),N.ref=Fn(z,ce,R),N.return=z,z=N;break e}n(z,ce);break}else t(z,ce);ce=ce.sibling}R.type===X?(N=Nr(R.props.children,z.mode,q,R.key),N.return=z,z=N):(q=ko(R.type,R.key,R.props,null,z.mode,q),q.ref=Fn(z,N,R),q.return=z,z=q)}return g(z);case $:e:{for(ce=R.key;N!==null;){if(N.key===ce)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){n(z,N.sibling),N=s(N,R.children||[]),N.return=z,z=N;break e}else{n(z,N);break}else t(z,N);N=N.sibling}N=Ul(R,z.mode,q),N.return=z,z=N}return g(z);case ve:return ce=R._init,Oe(z,N,ce(R._payload),q)}if(gn(R))return re(z,N,R,q);if(D(R))return ae(z,N,R,q);Za(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,N!==null&&N.tag===6?(n(z,N.sibling),N=s(N,R),N.return=z,z=N):(n(z,N),N=Fl(R,z.mode,q),N.return=z,z=N),g(z)):n(z,N)}return Oe}var Zr=Ld(!0),Dd=Ld(!1),Ja=Jt(null),Ga=null,Jr=null,Zi=null;function Ji(){Zi=Jr=Ga=null}function Gi(e){var t=Ja.current;Me(Ja),e._currentValue=t}function el(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Gr(e,t){Ga=e,Zi=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(rt=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Zi!==e)if(e={context:e,memoizedValue:t,next:null},Jr===null){if(Ga===null)throw Error(o(308));Jr=e,Ga.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return t}var vr=null;function tl(e){vr===null?vr=[e]:vr.push(e)}function Td(e,t,n,i){var s=t.interleaved;return s===null?(n.next=n,tl(t)):(n.next=s.next,s.next=n),t.interleaved=n,$t(e,i)}function $t(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var tr=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Id(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rr(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ce&2)!==0){var s=i.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),i.pending=t,$t(e,n)}return s=i.interleaved,s===null?(t.next=t,tl(i)):(t.next=s.next,s.next=t),i.interleaved=t,$t(e,n)}function eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,mi(e,n)}}function Ad(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var s=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var g={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?s=u=g:u=u.next=g,n=n.next}while(n!==null);u===null?s=u=t:u=u.next=t}else s=u=t;n={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function to(e,t,n,i){var s=e.updateQueue;tr=!1;var u=s.firstBaseUpdate,g=s.lastBaseUpdate,y=s.shared.pending;if(y!==null){s.shared.pending=null;var C=y,P=C.next;C.next=null,g===null?u=P:g.next=P,g=C;var A=e.alternate;A!==null&&(A=A.updateQueue,y=A.lastBaseUpdate,y!==g&&(y===null?A.firstBaseUpdate=P:y.next=P,A.lastBaseUpdate=C))}if(u!==null){var O=s.baseState;g=0,A=P=C=null,y=u;do{var I=y.lane,Y=y.eventTime;if((i&I)===I){A!==null&&(A=A.next={eventTime:Y,lane:0,tag:y.tag,payload:y.payload,callback:y.callback,next:null});e:{var re=e,ae=y;switch(I=t,Y=n,ae.tag){case 1:if(re=ae.payload,typeof re=="function"){O=re.call(Y,O,I);break e}O=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ae.payload,I=typeof re=="function"?re.call(Y,O,I):re,I==null)break e;O=T({},O,I);break e;case 2:tr=!0}}y.callback!==null&&y.lane!==0&&(e.flags|=64,I=s.effects,I===null?s.effects=[y]:I.push(y))}else Y={eventTime:Y,lane:I,tag:y.tag,payload:y.payload,callback:y.callback,next:null},A===null?(P=A=Y,C=O):A=A.next=Y,g|=I;if(y=y.next,y===null){if(y=s.shared.pending,y===null)break;I=y,y=I.next,I.next=null,s.lastBaseUpdate=I,s.shared.pending=null}}while(!0);if(A===null&&(C=O),s.baseState=C,s.firstBaseUpdate=P,s.lastBaseUpdate=A,t=s.shared.interleaved,t!==null){s=t;do g|=s.lane,s=s.next;while(s!==t)}else u===null&&(s.shared.lanes=0);kr|=g,e.lanes=g,e.memoizedState=O}}function Od(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],s=i.callback;if(s!==null){if(i.callback=null,i=n,typeof s!="function")throw Error(o(191,s));s.call(i)}}}var Un={},Pt=Jt(Un),qn=Jt(Un),Vn=Jt(Un);function yr(e){if(e===Un)throw Error(o(174));return e}function nl(e,t){switch(ze(Vn,t),ze(qn,e),ze(Pt,Un),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ai(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ai(t,e)}Me(Pt),ze(Pt,t)}function en(){Me(Pt),Me(qn),Me(Vn)}function $d(e){yr(Vn.current);var t=yr(Pt.current),n=ai(t,e.type);t!==n&&(ze(qn,e),ze(Pt,n))}function al(e){qn.current===e&&(Me(Pt),Me(qn))}var De=Jt(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ol=[];function il(){for(var e=0;e<ol.length;e++)ol[e]._workInProgressVersionPrimary=null;ol.length=0}var no=J.ReactCurrentDispatcher,ll=J.ReactCurrentBatchConfig,wr=0,Te=null,Fe=null,qe=null,ao=!1,Bn=!1,Wn=0,zm=0;function Ke(){throw Error(o(321))}function sl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kt(e[n],t[n]))return!1;return!0}function cl(e,t,n,i,s,u){if(wr=u,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,no.current=e===null||e.memoizedState===null?Lm:Dm,e=n(i,s),Bn){u=0;do{if(Bn=!1,Wn=0,25<=u)throw Error(o(301));u+=1,qe=Fe=null,t.updateQueue=null,no.current=Tm,e=n(i,s)}while(Bn)}if(no.current=lo,t=Fe!==null&&Fe.next!==null,wr=0,qe=Fe=Te=null,ao=!1,t)throw Error(o(300));return e}function dl(){var e=Wn!==0;return Wn=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Te.memoizedState=qe=e:qe=qe.next=e,qe}function mt(){if(Fe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=qe===null?Te.memoizedState:qe.next;if(t!==null)qe=t,Fe=e;else{if(e===null)throw Error(o(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},qe===null?Te.memoizedState=qe=e:qe=qe.next=e}return qe}function Hn(e,t){return typeof t=="function"?t(e):t}function ul(e){var t=mt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=Fe,s=i.baseQueue,u=n.pending;if(u!==null){if(s!==null){var g=s.next;s.next=u.next,u.next=g}i.baseQueue=s=u,n.pending=null}if(s!==null){u=s.next,i=i.baseState;var y=g=null,C=null,P=u;do{var A=P.lane;if((wr&A)===A)C!==null&&(C=C.next={lane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),i=P.hasEagerState?P.eagerState:e(i,P.action);else{var O={lane:A,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null};C===null?(y=C=O,g=i):C=C.next=O,Te.lanes|=A,kr|=A}P=P.next}while(P!==null&&P!==u);C===null?g=i:C.next=y,kt(i,t.memoizedState)||(rt=!0),t.memoizedState=i,t.baseState=g,t.baseQueue=C,n.lastRenderedState=i}if(e=n.interleaved,e!==null){s=e;do u=s.lane,Te.lanes|=u,kr|=u,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pl(e){var t=mt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,s=n.pending,u=t.memoizedState;if(s!==null){n.pending=null;var g=s=s.next;do u=e(u,g.action),g=g.next;while(g!==s);kt(u,t.memoizedState)||(rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,i]}function Fd(){}function Ud(e,t){var n=Te,i=mt(),s=t(),u=!kt(i.memoizedState,s);if(u&&(i.memoizedState=s,rt=!0),i=i.queue,fl(Bd.bind(null,n,i,e),[e]),i.getSnapshot!==t||u||qe!==null&&qe.memoizedState.tag&1){if(n.flags|=2048,Xn(9,Vd.bind(null,n,i,s,t),void 0,null),Ve===null)throw Error(o(349));(wr&30)!==0||qd(n,t,s)}return s}function qd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vd(e,t,n,i){t.value=n,t.getSnapshot=i,Wd(t)&&Hd(e)}function Bd(e,t,n){return n(function(){Wd(t)&&Hd(e)})}function Wd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kt(e,n)}catch{return!0}}function Hd(e){var t=$t(e,1);t!==null&&Et(t,e,1,-1)}function Xd(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:e},t.queue=e,e=e.dispatch=Pm.bind(null,Te,e),[t.memoizedState,e]}function Xn(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function Kd(){return mt().memoizedState}function oo(e,t,n,i){var s=Lt();Te.flags|=e,s.memoizedState=Xn(1|t,n,void 0,i===void 0?null:i)}function io(e,t,n,i){var s=mt();i=i===void 0?null:i;var u=void 0;if(Fe!==null){var g=Fe.memoizedState;if(u=g.destroy,i!==null&&sl(i,g.deps)){s.memoizedState=Xn(t,n,u,i);return}}Te.flags|=e,s.memoizedState=Xn(1|t,n,u,i)}function Qd(e,t){return oo(8390656,8,e,t)}function fl(e,t){return io(2048,8,e,t)}function Yd(e,t){return io(4,2,e,t)}function Zd(e,t){return io(4,4,e,t)}function Jd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gd(e,t,n){return n=n!=null?n.concat([e]):null,io(4,4,Jd.bind(null,t,e),n)}function hl(){}function eu(e,t){var n=mt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&sl(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function tu(e,t){var n=mt();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&sl(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function ru(e,t,n){return(wr&21)===0?(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=n):(kt(n,t)||(n=Pc(),Te.lanes|=n,kr|=n,e.baseState=!0),t)}function Rm(e,t){var n=_e;_e=n!==0&&4>n?n:4,e(!0);var i=ll.transition;ll.transition={};try{e(!1),t()}finally{_e=n,ll.transition=i}}function nu(){return mt().memoizedState}function Mm(e,t,n){var i=ir(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},au(e))ou(t,n);else if(n=Td(e,t,n,i),n!==null){var s=Je();Et(n,e,i,s),iu(n,t,i)}}function Pm(e,t,n){var i=ir(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(au(e))ou(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,y=u(g,n);if(s.hasEagerState=!0,s.eagerState=y,kt(y,g)){var C=t.interleaved;C===null?(s.next=s,tl(t)):(s.next=C.next,C.next=s),t.interleaved=s;return}}catch{}n=Td(e,t,s,i),n!==null&&(s=Je(),Et(n,e,i,s),iu(n,t,i))}}function au(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function ou(e,t){Bn=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function iu(e,t,n){if((n&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,mi(e,n)}}var lo={readContext:gt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Lm={readContext:gt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Qd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,oo(4194308,4,Jd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return oo(4194308,4,e,t)},useInsertionEffect:function(e,t){return oo(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Lt();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Mm.bind(null,Te,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Xd,useDebugValue:hl,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Xd(!1),t=e[0];return e=Rm.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Te,s=Lt();if(Le){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ve===null)throw Error(o(349));(wr&30)!==0||qd(i,t,n)}s.memoizedState=n;var u={value:n,getSnapshot:t};return s.queue=u,Qd(Bd.bind(null,i,u,e),[e]),i.flags|=2048,Xn(9,Vd.bind(null,i,u,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Ve.identifierPrefix;if(Le){var n=Ot,i=At;n=(i&~(1<<32-wt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wn++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Dm={readContext:gt,useCallback:eu,useContext:gt,useEffect:fl,useImperativeHandle:Gd,useInsertionEffect:Yd,useLayoutEffect:Zd,useMemo:tu,useReducer:ul,useRef:Kd,useState:function(){return ul(Hn)},useDebugValue:hl,useDeferredValue:function(e){var t=mt();return ru(t,Fe.memoizedState,e)},useTransition:function(){var e=ul(Hn)[0],t=mt().memoizedState;return[e,t]},useMutableSource:Fd,useSyncExternalStore:Ud,useId:nu,unstable_isNewReconciler:!1},Tm={readContext:gt,useCallback:eu,useContext:gt,useEffect:fl,useImperativeHandle:Gd,useInsertionEffect:Yd,useLayoutEffect:Zd,useMemo:tu,useReducer:pl,useRef:Kd,useState:function(){return pl(Hn)},useDebugValue:hl,useDeferredValue:function(e){var t=mt();return Fe===null?t.memoizedState=e:ru(t,Fe.memoizedState,e)},useTransition:function(){var e=pl(Hn)[0],t=mt().memoizedState;return[e,t]},useMutableSource:Fd,useSyncExternalStore:Ud,useId:nu,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=T({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function gl(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var so={isMounted:function(e){return(e=e._reactInternals)?hr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Je(),s=ir(e),u=Ft(i,s);u.payload=t,n!=null&&(u.callback=n),t=rr(e,u,s),t!==null&&(Et(t,e,s,i),eo(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Je(),s=ir(e),u=Ft(i,s);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=rr(e,u,s),t!==null&&(Et(t,e,s,i),eo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),i=ir(e),s=Ft(n,i);s.tag=2,t!=null&&(s.callback=t),t=rr(e,s,i),t!==null&&(Et(t,e,i,n),eo(t,e,i))}};function lu(e,t,n,i,s,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,g):t.prototype&&t.prototype.isPureReactComponent?!Ln(n,i)||!Ln(s,u):!0}function su(e,t,n){var i=!1,s=Gt,u=t.contextType;return typeof u=="object"&&u!==null?u=gt(u):(s=tt(t)?mr:Xe.current,i=t.contextTypes,u=(i=i!=null)?Xr(e,s):Gt),t=new t(n,u),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=so,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=u),t}function cu(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&so.enqueueReplaceState(t,t.state,null)}function ml(e,t,n,i){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},rl(e);var u=t.contextType;typeof u=="object"&&u!==null?s.context=gt(u):(u=tt(t)?mr:Xe.current,s.context=Xr(e,u)),s.state=e.memoizedState,u=t.getDerivedStateFromProps,typeof u=="function"&&(gl(e,t,u,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&so.enqueueReplaceState(s,s.state,null),to(e,n,s,i),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function tn(e,t){try{var n="",i=t;do n+=pe(i),i=i.return;while(i);var s=n}catch(u){s=`
7
+ Error generating stack: `+u.message+`
8
+ `+u.stack}return{value:e,source:t,stack:s,digest:null}}function bl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function xl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Im=typeof WeakMap=="function"?WeakMap:Map;function du(e,t,n){n=Ft(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){mo||(mo=!0,Pl=i),xl(e,t)},n}function uu(e,t,n){n=Ft(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var s=t.value;n.payload=function(){return i(s)},n.callback=function(){xl(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){xl(e,t),typeof i!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var g=t.stack;this.componentDidCatch(t.value,{componentStack:g!==null?g:""})}),n}function pu(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Im;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(n)||(s.add(n),e=Ym.bind(null,e,t,n),t.then(e,e))}function fu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function hu(e,t,n,i,s){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ft(-1,1),t.tag=2,rr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var Am=J.ReactCurrentOwner,rt=!1;function Ze(e,t,n,i){t.child=e===null?Dd(t,null,n,i):Zr(t,e.child,n,i)}function gu(e,t,n,i,s){n=n.render;var u=t.ref;return Gr(t,s),i=cl(e,t,n,i,u,s),n=dl(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(Le&&n&&Hi(t),t.flags|=1,Ze(e,t,i,s),t.child)}function mu(e,t,n,i,s){if(e===null){var u=n.type;return typeof u=="function"&&!$l(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,bu(e,t,u,i,s)):(e=ko(n.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&s)===0){var g=u.memoizedProps;if(n=n.compare,n=n!==null?n:Ln,n(g,i)&&e.ref===t.ref)return Ut(e,t,s)}return t.flags|=1,e=sr(u,i),e.ref=t.ref,e.return=t,t.child=e}function bu(e,t,n,i,s){if(e!==null){var u=e.memoizedProps;if(Ln(u,i)&&e.ref===t.ref)if(rt=!1,t.pendingProps=i=u,(e.lanes&s)!==0)(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,Ut(e,t,s)}return vl(e,t,n,i,s)}function xu(e,t,n){var i=t.pendingProps,s=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(nn,dt),dt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(nn,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:n,ze(nn,dt),dt|=i}else u!==null?(i=u.baseLanes|n,t.memoizedState=null):i=n,ze(nn,dt),dt|=i;return Ze(e,t,s,n),t.child}function vu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function vl(e,t,n,i,s){var u=tt(n)?mr:Xe.current;return u=Xr(t,u),Gr(t,s),n=cl(e,t,n,i,u,s),i=dl(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ut(e,t,s)):(Le&&i&&Hi(t),t.flags|=1,Ze(e,t,n,s),t.child)}function yu(e,t,n,i,s){if(tt(n)){var u=!0;Ha(t)}else u=!1;if(Gr(t,s),t.stateNode===null)uo(e,t),su(t,n,i),ml(t,n,i,s),i=!0;else if(e===null){var g=t.stateNode,y=t.memoizedProps;g.props=y;var C=g.context,P=n.contextType;typeof P=="object"&&P!==null?P=gt(P):(P=tt(n)?mr:Xe.current,P=Xr(t,P));var A=n.getDerivedStateFromProps,O=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function";O||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==i||C!==P)&&cu(t,g,i,P),tr=!1;var I=t.memoizedState;g.state=I,to(t,i,g,s),C=t.memoizedState,y!==i||I!==C||et.current||tr?(typeof A=="function"&&(gl(t,n,A,i),C=t.memoizedState),(y=tr||lu(t,n,y,i,I,C,P))?(O||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=C),g.props=i,g.state=C,g.context=P,i=y):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{g=t.stateNode,Id(e,t),y=t.memoizedProps,P=t.type===t.elementType?y:St(t.type,y),g.props=P,O=t.pendingProps,I=g.context,C=n.contextType,typeof C=="object"&&C!==null?C=gt(C):(C=tt(n)?mr:Xe.current,C=Xr(t,C));var Y=n.getDerivedStateFromProps;(A=typeof Y=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(y!==O||I!==C)&&cu(t,g,i,C),tr=!1,I=t.memoizedState,g.state=I,to(t,i,g,s);var re=t.memoizedState;y!==O||I!==re||et.current||tr?(typeof Y=="function"&&(gl(t,n,Y,i),re=t.memoizedState),(P=tr||lu(t,n,P,i,I,re,C)||!1)?(A||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(i,re,C),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(i,re,C)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=re),g.props=i,g.state=re,g.context=C,i=P):(typeof g.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),i=!1)}return yl(e,t,n,i,u,s)}function yl(e,t,n,i,s,u){vu(e,t);var g=(t.flags&128)!==0;if(!i&&!g)return s&&Cd(t,n,!1),Ut(e,t,u);i=t.stateNode,Am.current=t;var y=g&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&g?(t.child=Zr(t,e.child,null,u),t.child=Zr(t,null,y,u)):Ze(e,t,y,u),t.memoizedState=i.state,s&&Cd(t,n,!0),t.child}function wu(e){var t=e.stateNode;t.pendingContext?jd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jd(e,t.context,!1),nl(e,t.containerInfo)}function ku(e,t,n,i,s){return Yr(),Yi(s),t.flags|=256,Ze(e,t,n,i),t.child}var wl={dehydrated:null,treeContext:null,retryLane:0};function kl(e){return{baseLanes:e,cachePool:null,transitions:null}}function ju(e,t,n){var i=t.pendingProps,s=De.current,u=!1,g=(t.flags&128)!==0,y;if((y=g)||(y=e!==null&&e.memoizedState===null?!1:(s&2)!==0),y?(u=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ze(De,s&1),e===null)return Qi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(g=i.children,e=i.fallback,u?(i=t.mode,u=t.child,g={mode:"hidden",children:g},(i&1)===0&&u!==null?(u.childLanes=0,u.pendingProps=g):u=jo(g,i,0,null),e=Nr(e,i,n,null),u.return=t,e.return=t,u.sibling=e,t.child=u,t.child.memoizedState=kl(n),t.memoizedState=wl,e):jl(t,g));if(s=e.memoizedState,s!==null&&(y=s.dehydrated,y!==null))return Om(e,t,g,i,y,s,n);if(u){u=i.fallback,g=t.mode,s=e.child,y=s.sibling;var C={mode:"hidden",children:i.children};return(g&1)===0&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=C,t.deletions=null):(i=sr(s,C),i.subtreeFlags=s.subtreeFlags&14680064),y!==null?u=sr(y,u):(u=Nr(u,g,n,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,g=e.child.memoizedState,g=g===null?kl(n):{baseLanes:g.baseLanes|n,cachePool:null,transitions:g.transitions},u.memoizedState=g,u.childLanes=e.childLanes&~n,t.memoizedState=wl,i}return u=e.child,e=u.sibling,i=sr(u,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function jl(e,t){return t=jo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function co(e,t,n,i){return i!==null&&Yi(i),Zr(t,e.child,null,n),e=jl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Om(e,t,n,i,s,u,g){if(n)return t.flags&256?(t.flags&=-257,i=bl(Error(o(422))),co(e,t,g,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(u=i.fallback,s=t.mode,i=jo({mode:"visible",children:i.children},s,0,null),u=Nr(u,s,g,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,(t.mode&1)!==0&&Zr(t,e.child,null,g),t.child.memoizedState=kl(g),t.memoizedState=wl,u);if((t.mode&1)===0)return co(e,t,g,null);if(s.data==="$!"){if(i=s.nextSibling&&s.nextSibling.dataset,i)var y=i.dgst;return i=y,u=Error(o(419)),i=bl(u,i,void 0),co(e,t,g,i)}if(y=(g&e.childLanes)!==0,rt||y){if(i=Ve,i!==null){switch(g&-g){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(i.suspendedLanes|g))!==0?0:s,s!==0&&s!==u.retryLane&&(u.retryLane=s,$t(e,s),Et(i,e,s,-1))}return Ol(),i=bl(Error(o(421))),co(e,t,g,i)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Zm.bind(null,e),s._reactRetry=t,null):(e=u.treeContext,ct=Zt(s.nextSibling),st=t,Le=!0,jt=null,e!==null&&(ft[ht++]=At,ft[ht++]=Ot,ft[ht++]=br,At=e.id,Ot=e.overflow,br=t),t=jl(t,i.children),t.flags|=4096,t)}function Su(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),el(e.return,t,n)}function Sl(e,t,n,i,s){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=n,u.tailMode=s)}function Cu(e,t,n){var i=t.pendingProps,s=i.revealOrder,u=i.tail;if(Ze(e,t,i.children,n),i=De.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Su(e,n,t);else if(e.tag===19)Su(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(ze(De,i),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Sl(t,!1,s,n,u);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ro(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Sl(t,!0,n,null,u);break;case"together":Sl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function uo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $m(e,t,n){switch(t.tag){case 3:wu(t),Yr();break;case 5:$d(t);break;case 1:tt(t.type)&&Ha(t);break;case 4:nl(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;ze(Ja,i._currentValue),i._currentValue=s;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ze(De,De.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?ju(e,t,n):(ze(De,De.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);ze(De,De.current&1);break;case 19:if(i=(n&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Cu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ze(De,De.current),i)break;return null;case 22:case 23:return t.lanes=0,xu(e,t,n)}return Ut(e,t,n)}var Nu,Cl,Eu,_u;Nu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Cl=function(){},Eu=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,yr(Pt.current);var u=null;switch(n){case"input":s=ei(e,s),i=ei(e,i),u=[];break;case"select":s=T({},s,{value:void 0}),i=T({},i,{value:void 0}),u=[];break;case"textarea":s=ni(e,s),i=ni(e,i),u=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Va)}oi(n,i);var g;n=null;for(P in s)if(!i.hasOwnProperty(P)&&s.hasOwnProperty(P)&&s[P]!=null)if(P==="style"){var y=s[P];for(g in y)y.hasOwnProperty(g)&&(n||(n={}),n[g]="")}else P!=="dangerouslySetInnerHTML"&&P!=="children"&&P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(d.hasOwnProperty(P)?u||(u=[]):(u=u||[]).push(P,null));for(P in i){var C=i[P];if(y=s?.[P],i.hasOwnProperty(P)&&C!==y&&(C!=null||y!=null))if(P==="style")if(y){for(g in y)!y.hasOwnProperty(g)||C&&C.hasOwnProperty(g)||(n||(n={}),n[g]="");for(g in C)C.hasOwnProperty(g)&&y[g]!==C[g]&&(n||(n={}),n[g]=C[g])}else n||(u||(u=[]),u.push(P,n)),n=C;else P==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,y=y?y.__html:void 0,C!=null&&y!==C&&(u=u||[]).push(P,C)):P==="children"?typeof C!="string"&&typeof C!="number"||(u=u||[]).push(P,""+C):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&(d.hasOwnProperty(P)?(C!=null&&P==="onScroll"&&Re("scroll",e),u||y===C||(u=[])):(u=u||[]).push(P,C))}n&&(u=u||[]).push("style",n);var P=u;(t.updateQueue=P)&&(t.flags|=4)}},_u=function(e,t,n,i){n!==i&&(t.flags|=4)};function Kn(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags&14680064,i|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Fm(e,t,n){var i=t.pendingProps;switch(Xi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return tt(t.type)&&Wa(),Qe(t),null;case 3:return i=t.stateNode,en(),Me(et),Me(Xe),il(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jt!==null&&(Tl(jt),jt=null))),Cl(e,t),Qe(t),null;case 5:al(t);var s=yr(Vn.current);if(n=t.type,e!==null&&t.stateNode!=null)Eu(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Qe(t),null}if(e=yr(Pt.current),Ya(t)){i=t.stateNode,n=t.type;var u=t.memoizedProps;switch(i[Mt]=t,i[On]=u,e=(t.mode&1)!==0,n){case"dialog":Re("cancel",i),Re("close",i);break;case"iframe":case"object":case"embed":Re("load",i);break;case"video":case"audio":for(s=0;s<Tn.length;s++)Re(Tn[s],i);break;case"source":Re("error",i);break;case"img":case"image":case"link":Re("error",i),Re("load",i);break;case"details":Re("toggle",i);break;case"input":sc(i,u),Re("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!u.multiple},Re("invalid",i);break;case"textarea":uc(i,u),Re("invalid",i)}oi(n,u),s=null;for(var g in u)if(u.hasOwnProperty(g)){var y=u[g];g==="children"?typeof y=="string"?i.textContent!==y&&(u.suppressHydrationWarning!==!0&&qa(i.textContent,y,e),s=["children",y]):typeof y=="number"&&i.textContent!==""+y&&(u.suppressHydrationWarning!==!0&&qa(i.textContent,y,e),s=["children",""+y]):d.hasOwnProperty(g)&&y!=null&&g==="onScroll"&&Re("scroll",i)}switch(n){case"input":va(i),dc(i,u,!0);break;case"textarea":va(i),fc(i);break;case"select":case"option":break;default:typeof u.onClick=="function"&&(i.onclick=Va)}i=s,t.updateQueue=i,i!==null&&(t.flags|=4)}else{g=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=g.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=g.createElement(n,{is:i.is}):(e=g.createElement(n),n==="select"&&(g=e,i.multiple?g.multiple=!0:i.size&&(g.size=i.size))):e=g.createElementNS(e,n),e[Mt]=t,e[On]=i,Nu(e,t,!1,!1),t.stateNode=e;e:{switch(g=ii(n,i),n){case"dialog":Re("cancel",e),Re("close",e),s=i;break;case"iframe":case"object":case"embed":Re("load",e),s=i;break;case"video":case"audio":for(s=0;s<Tn.length;s++)Re(Tn[s],e);s=i;break;case"source":Re("error",e),s=i;break;case"img":case"image":case"link":Re("error",e),Re("load",e),s=i;break;case"details":Re("toggle",e),s=i;break;case"input":sc(e,i),s=ei(e,i),Re("invalid",e);break;case"option":s=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},s=T({},i,{value:void 0}),Re("invalid",e);break;case"textarea":uc(e,i),s=ni(e,i),Re("invalid",e);break;default:s=i}oi(n,s),y=s;for(u in y)if(y.hasOwnProperty(u)){var C=y[u];u==="style"?bc(e,C):u==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&gc(e,C)):u==="children"?typeof C=="string"?(n!=="textarea"||C!=="")&&mn(e,C):typeof C=="number"&&mn(e,""+C):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(d.hasOwnProperty(u)?C!=null&&u==="onScroll"&&Re("scroll",e):C!=null&&oe(e,u,C,g))}switch(n){case"input":va(e),dc(e,i,!1);break;case"textarea":va(e),fc(e);break;case"option":i.value!=null&&e.setAttribute("value",""+ke(i.value));break;case"select":e.multiple=!!i.multiple,u=i.value,u!=null?Tr(e,!!i.multiple,u,!1):i.defaultValue!=null&&Tr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Va)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qe(t),null;case 6:if(e&&t.stateNode!=null)_u(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(n=yr(Vn.current),yr(Pt.current),Ya(t)){if(i=t.stateNode,n=t.memoizedProps,i[Mt]=t,(u=i.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:qa(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qa(i.nodeValue,n,(e.mode&1)!==0)}u&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Mt]=t,t.stateNode=i}return Qe(t),null;case 13:if(Me(De),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Le&&ct!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Md(),Yr(),t.flags|=98560,u=!1;else if(u=Ya(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Mt]=t}else Yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),u=!1}else jt!==null&&(Tl(jt),jt=null),u=!0;if(!u)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(De.current&1)!==0?Ue===0&&(Ue=3):Ol())),t.updateQueue!==null&&(t.flags|=4),Qe(t),null);case 4:return en(),Cl(e,t),e===null&&In(t.stateNode.containerInfo),Qe(t),null;case 10:return Gi(t.type._context),Qe(t),null;case 17:return tt(t.type)&&Wa(),Qe(t),null;case 19:if(Me(De),u=t.memoizedState,u===null)return Qe(t),null;if(i=(t.flags&128)!==0,g=u.rendering,g===null)if(i)Kn(u,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=ro(e),g!==null){for(t.flags|=128,Kn(u,!1),i=g.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)u=n,e=i,u.flags&=14680066,g=u.alternate,g===null?(u.childLanes=0,u.lanes=e,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=g.childLanes,u.lanes=g.lanes,u.child=g.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=g.memoizedProps,u.memoizedState=g.memoizedState,u.updateQueue=g.updateQueue,u.type=g.type,e=g.dependencies,u.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ze(De,De.current&1|2),t.child}e=e.sibling}u.tail!==null&&Ae()>an&&(t.flags|=128,i=!0,Kn(u,!1),t.lanes=4194304)}else{if(!i)if(e=ro(g),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kn(u,!0),u.tail===null&&u.tailMode==="hidden"&&!g.alternate&&!Le)return Qe(t),null}else 2*Ae()-u.renderingStartTime>an&&n!==1073741824&&(t.flags|=128,i=!0,Kn(u,!1),t.lanes=4194304);u.isBackwards?(g.sibling=t.child,t.child=g):(n=u.last,n!==null?n.sibling=g:t.child=g,u.last=g)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Ae(),t.sibling=null,n=De.current,ze(De,i?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return Al(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(dt&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Um(e,t){switch(Xi(t),t.tag){case 1:return tt(t.type)&&Wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(),Me(et),Me(Xe),il(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return al(t),null;case 13:if(Me(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(De),null;case 4:return en(),null;case 10:return Gi(t.type._context),null;case 22:case 23:return Al(),null;case 24:return null;default:return null}}var po=!1,Ye=!1,qm=typeof WeakSet=="function"?WeakSet:Set,te=null;function rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ie(e,t,i)}else n.current=null}function zu(e,t,n){try{n()}catch(i){Ie(e,t,i)}}var Ru=!1;function Vm(e,t){if(Oi=Ma,e=ld(),Ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var g=0,y=-1,C=-1,P=0,A=0,O=e,I=null;t:for(;;){for(var Y;O!==n||s!==0&&O.nodeType!==3||(y=g+s),O!==u||i!==0&&O.nodeType!==3||(C=g+i),O.nodeType===3&&(g+=O.nodeValue.length),(Y=O.firstChild)!==null;)I=O,O=Y;for(;;){if(O===e)break t;if(I===n&&++P===s&&(y=g),I===u&&++A===i&&(C=g),(Y=O.nextSibling)!==null)break;O=I,I=O.parentNode}O=Y}n=y===-1||C===-1?null:{start:y,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for($i={focusedElem:e,selectionRange:n},Ma=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var re=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var ae=re.memoizedProps,Oe=re.memoizedState,z=t.stateNode,N=z.getSnapshotBeforeUpdate(t.elementType===t.type?ae:St(t.type,ae),Oe);z.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(q){Ie(t,t.return,q)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return re=Ru,Ru=!1,re}function Qn(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var u=s.destroy;s.destroy=void 0,u!==void 0&&zu(t,n,u)}s=s.next}while(s!==i)}}function fo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function Nl(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function Mu(e){var t=e.alternate;t!==null&&(e.alternate=null,Mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[On],delete t[Vi],delete t[Cm],delete t[Nm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pu(e){return e.tag===5||e.tag===3||e.tag===4}function Lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function El(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Va));else if(i!==4&&(e=e.child,e!==null))for(El(e,t,n),e=e.sibling;e!==null;)El(e,t,n),e=e.sibling}function _l(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(_l(e,t,n),e=e.sibling;e!==null;)_l(e,t,n),e=e.sibling}var We=null,Ct=!1;function nr(e,t,n){for(n=n.child;n!==null;)Du(e,t,n),n=n.sibling}function Du(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Ca,n)}catch{}switch(n.tag){case 5:Ye||rn(n,t);case 6:var i=We,s=Ct;We=null,nr(e,t,n),We=i,Ct=s,We!==null&&(Ct?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Ct?(e=We,n=n.stateNode,e.nodeType===8?qi(e.parentNode,n):e.nodeType===1&&qi(e,n),En(e)):qi(We,n.stateNode));break;case 4:i=We,s=Ct,We=n.stateNode.containerInfo,Ct=!0,nr(e,t,n),We=i,Ct=s;break;case 0:case 11:case 14:case 15:if(!Ye&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var u=s,g=u.destroy;u=u.tag,g!==void 0&&((u&2)!==0||(u&4)!==0)&&zu(n,t,g),s=s.next}while(s!==i)}nr(e,t,n);break;case 1:if(!Ye&&(rn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(y){Ie(n,t,y)}nr(e,t,n);break;case 21:nr(e,t,n);break;case 22:n.mode&1?(Ye=(i=Ye)||n.memoizedState!==null,nr(e,t,n),Ye=i):nr(e,t,n);break;default:nr(e,t,n)}}function Tu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qm),t.forEach(function(i){var s=Jm.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function Nt(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];try{var u=e,g=t,y=g;e:for(;y!==null;){switch(y.tag){case 5:We=y.stateNode,Ct=!1;break e;case 3:We=y.stateNode.containerInfo,Ct=!0;break e;case 4:We=y.stateNode.containerInfo,Ct=!0;break e}y=y.return}if(We===null)throw Error(o(160));Du(u,g,s),We=null,Ct=!1;var C=s.alternate;C!==null&&(C.return=null),s.return=null}catch(P){Ie(s,t,P)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling}function Iu(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Nt(t,e),Dt(e),i&4){try{Qn(3,e,e.return),fo(3,e)}catch(ae){Ie(e,e.return,ae)}try{Qn(5,e,e.return)}catch(ae){Ie(e,e.return,ae)}}break;case 1:Nt(t,e),Dt(e),i&512&&n!==null&&rn(n,n.return);break;case 5:if(Nt(t,e),Dt(e),i&512&&n!==null&&rn(n,n.return),e.flags&32){var s=e.stateNode;try{mn(s,"")}catch(ae){Ie(e,e.return,ae)}}if(i&4&&(s=e.stateNode,s!=null)){var u=e.memoizedProps,g=n!==null?n.memoizedProps:u,y=e.type,C=e.updateQueue;if(e.updateQueue=null,C!==null)try{y==="input"&&u.type==="radio"&&u.name!=null&&cc(s,u),ii(y,g);var P=ii(y,u);for(g=0;g<C.length;g+=2){var A=C[g],O=C[g+1];A==="style"?bc(s,O):A==="dangerouslySetInnerHTML"?gc(s,O):A==="children"?mn(s,O):oe(s,A,O,P)}switch(y){case"input":ti(s,u);break;case"textarea":pc(s,u);break;case"select":var I=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!u.multiple;var Y=u.value;Y!=null?Tr(s,!!u.multiple,Y,!1):I!==!!u.multiple&&(u.defaultValue!=null?Tr(s,!!u.multiple,u.defaultValue,!0):Tr(s,!!u.multiple,u.multiple?[]:"",!1))}s[On]=u}catch(ae){Ie(e,e.return,ae)}}break;case 6:if(Nt(t,e),Dt(e),i&4){if(e.stateNode===null)throw Error(o(162));s=e.stateNode,u=e.memoizedProps;try{s.nodeValue=u}catch(ae){Ie(e,e.return,ae)}}break;case 3:if(Nt(t,e),Dt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{En(t.containerInfo)}catch(ae){Ie(e,e.return,ae)}break;case 4:Nt(t,e),Dt(e);break;case 13:Nt(t,e),Dt(e),s=e.child,s.flags&8192&&(u=s.memoizedState!==null,s.stateNode.isHidden=u,!u||s.alternate!==null&&s.alternate.memoizedState!==null||(Ml=Ae())),i&4&&Tu(e);break;case 22:if(A=n!==null&&n.memoizedState!==null,e.mode&1?(Ye=(P=Ye)||A,Nt(t,e),Ye=P):Nt(t,e),Dt(e),i&8192){if(P=e.memoizedState!==null,(e.stateNode.isHidden=P)&&!A&&(e.mode&1)!==0)for(te=e,A=e.child;A!==null;){for(O=te=A;te!==null;){switch(I=te,Y=I.child,I.tag){case 0:case 11:case 14:case 15:Qn(4,I,I.return);break;case 1:rn(I,I.return);var re=I.stateNode;if(typeof re.componentWillUnmount=="function"){i=I,n=I.return;try{t=i,re.props=t.memoizedProps,re.state=t.memoizedState,re.componentWillUnmount()}catch(ae){Ie(i,n,ae)}}break;case 5:rn(I,I.return);break;case 22:if(I.memoizedState!==null){$u(O);continue}}Y!==null?(Y.return=I,te=Y):$u(O)}A=A.sibling}e:for(A=null,O=e;;){if(O.tag===5){if(A===null){A=O;try{s=O.stateNode,P?(u=s.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none"):(y=O.stateNode,C=O.memoizedProps.style,g=C!=null&&C.hasOwnProperty("display")?C.display:null,y.style.display=mc("display",g))}catch(ae){Ie(e,e.return,ae)}}}else if(O.tag===6){if(A===null)try{O.stateNode.nodeValue=P?"":O.memoizedProps}catch(ae){Ie(e,e.return,ae)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;A===O&&(A=null),O=O.return}A===O&&(A=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:Nt(t,e),Dt(e),i&4&&Tu(e);break;case 21:break;default:Nt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Pu(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var s=i.stateNode;i.flags&32&&(mn(s,""),i.flags&=-33);var u=Lu(e);_l(e,u,s);break;case 3:case 4:var g=i.stateNode.containerInfo,y=Lu(e);El(e,y,g);break;default:throw Error(o(161))}}catch(C){Ie(e,e.return,C)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bm(e,t,n){te=e,Au(e)}function Au(e,t,n){for(var i=(e.mode&1)!==0;te!==null;){var s=te,u=s.child;if(s.tag===22&&i){var g=s.memoizedState!==null||po;if(!g){var y=s.alternate,C=y!==null&&y.memoizedState!==null||Ye;y=po;var P=Ye;if(po=g,(Ye=C)&&!P)for(te=s;te!==null;)g=te,C=g.child,g.tag===22&&g.memoizedState!==null?Fu(s):C!==null?(C.return=g,te=C):Fu(s);for(;u!==null;)te=u,Au(u),u=u.sibling;te=s,po=y,Ye=P}Ou(e)}else(s.subtreeFlags&8772)!==0&&u!==null?(u.return=s,te=u):Ou(e)}}function Ou(e){for(;te!==null;){var t=te;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ye||fo(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ye)if(n===null)i.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:St(t.type,n.memoizedProps);i.componentDidUpdate(s,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var u=t.updateQueue;u!==null&&Od(t,u,i);break;case 3:var g=t.updateQueue;if(g!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Od(t,g,n)}break;case 5:var y=t.stateNode;if(n===null&&t.flags&4){n=y;var C=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&n.focus();break;case"img":C.src&&(n.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var P=t.alternate;if(P!==null){var A=P.memoizedState;if(A!==null){var O=A.dehydrated;O!==null&&En(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ye||t.flags&512&&Nl(t)}catch(I){Ie(t,t.return,I)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function $u(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function Fu(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fo(4,t)}catch(C){Ie(t,n,C)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var s=t.return;try{i.componentDidMount()}catch(C){Ie(t,s,C)}}var u=t.return;try{Nl(t)}catch(C){Ie(t,u,C)}break;case 5:var g=t.return;try{Nl(t)}catch(C){Ie(t,g,C)}}}catch(C){Ie(t,t.return,C)}if(t===e){te=null;break}var y=t.sibling;if(y!==null){y.return=t.return,te=y;break}te=t.return}}var Wm=Math.ceil,ho=J.ReactCurrentDispatcher,zl=J.ReactCurrentOwner,bt=J.ReactCurrentBatchConfig,Ce=0,Ve=null,$e=null,He=0,dt=0,nn=Jt(0),Ue=0,Yn=null,kr=0,go=0,Rl=0,Zn=null,nt=null,Ml=0,an=1/0,qt=null,mo=!1,Pl=null,ar=null,bo=!1,or=null,xo=0,Jn=0,Ll=null,vo=-1,yo=0;function Je(){return(Ce&6)!==0?Ae():vo!==-1?vo:vo=Ae()}function ir(e){return(e.mode&1)===0?1:(Ce&2)!==0&&He!==0?He&-He:_m.transition!==null?(yo===0&&(yo=Pc()),yo):(e=_e,e!==0||(e=window.event,e=e===void 0?16:Uc(e.type)),e)}function Et(e,t,n,i){if(50<Jn)throw Jn=0,Ll=null,Error(o(185));kn(e,n,i),((Ce&2)===0||e!==Ve)&&(e===Ve&&((Ce&2)===0&&(go|=n),Ue===4&&lr(e,He)),at(e,i),n===1&&Ce===0&&(t.mode&1)===0&&(an=Ae()+500,Xa&&er()))}function at(e,t){var n=e.callbackNode;_g(e,t);var i=_a(e,e===Ve?He:0);if(i===0)n!==null&&zc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&zc(n),t===1)e.tag===0?Em(qu.bind(null,e)):Nd(qu.bind(null,e)),jm(function(){(Ce&6)===0&&er()}),n=null;else{switch(Lc(i)){case 1:n=fi;break;case 4:n=Rc;break;case 16:n=Sa;break;case 536870912:n=Mc;break;default:n=Sa}n=Yu(n,Uu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uu(e,t){if(vo=-1,yo=0,(Ce&6)!==0)throw Error(o(327));var n=e.callbackNode;if(on()&&e.callbackNode!==n)return null;var i=_a(e,e===Ve?He:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=wo(e,i);else{t=i;var s=Ce;Ce|=2;var u=Bu();(Ve!==e||He!==t)&&(qt=null,an=Ae()+500,Sr(e,t));do try{Km();break}catch(y){Vu(e,y)}while(!0);Ji(),ho.current=u,Ce=s,$e!==null?t=0:(Ve=null,He=0,t=Ue)}if(t!==0){if(t===2&&(s=hi(e),s!==0&&(i=s,t=Dl(e,s))),t===1)throw n=Yn,Sr(e,0),lr(e,i),at(e,Ae()),n;if(t===6)lr(e,i);else{if(s=e.current.alternate,(i&30)===0&&!Hm(s)&&(t=wo(e,i),t===2&&(u=hi(e),u!==0&&(i=u,t=Dl(e,u))),t===1))throw n=Yn,Sr(e,0),lr(e,i),at(e,Ae()),n;switch(e.finishedWork=s,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:Cr(e,nt,qt);break;case 3:if(lr(e,i),(i&130023424)===i&&(t=Ml+500-Ae(),10<t)){if(_a(e,0)!==0)break;if(s=e.suspendedLanes,(s&i)!==i){Je(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ui(Cr.bind(null,e,nt,qt),t);break}Cr(e,nt,qt);break;case 4:if(lr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,s=-1;0<i;){var g=31-wt(i);u=1<<g,g=t[g],g>s&&(s=g),i&=~u}if(i=s,i=Ae()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Wm(i/1960))-i,10<i){e.timeoutHandle=Ui(Cr.bind(null,e,nt,qt),i);break}Cr(e,nt,qt);break;case 5:Cr(e,nt,qt);break;default:throw Error(o(329))}}}return at(e,Ae()),e.callbackNode===n?Uu.bind(null,e):null}function Dl(e,t){var n=Zn;return e.current.memoizedState.isDehydrated&&(Sr(e,t).flags|=256),e=wo(e,t),e!==2&&(t=nt,nt=n,t!==null&&Tl(t)),e}function Tl(e){nt===null?nt=e:nt.push.apply(nt,e)}function Hm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var s=n[i],u=s.getSnapshot;s=s.value;try{if(!kt(u(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lr(e,t){for(t&=~Rl,t&=~go,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),i=1<<n;e[n]=-1,t&=~i}}function qu(e){if((Ce&6)!==0)throw Error(o(327));on();var t=_a(e,0);if((t&1)===0)return at(e,Ae()),null;var n=wo(e,t);if(e.tag!==0&&n===2){var i=hi(e);i!==0&&(t=i,n=Dl(e,i))}if(n===1)throw n=Yn,Sr(e,0),lr(e,t),at(e,Ae()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cr(e,nt,qt),at(e,Ae()),null}function Il(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(an=Ae()+500,Xa&&er())}}function jr(e){or!==null&&or.tag===0&&(Ce&6)===0&&on();var t=Ce;Ce|=1;var n=bt.transition,i=_e;try{if(bt.transition=null,_e=1,e)return e()}finally{_e=i,bt.transition=n,Ce=t,(Ce&6)===0&&er()}}function Al(){dt=nn.current,Me(nn)}function Sr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,km(n)),$e!==null)for(n=$e.return;n!==null;){var i=n;switch(Xi(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Wa();break;case 3:en(),Me(et),Me(Xe),il();break;case 5:al(i);break;case 4:en();break;case 13:Me(De);break;case 19:Me(De);break;case 10:Gi(i.type._context);break;case 22:case 23:Al()}n=n.return}if(Ve=e,$e=e=sr(e.current,null),He=dt=t,Ue=0,Yn=null,Rl=go=kr=0,nt=Zn=null,vr!==null){for(t=0;t<vr.length;t++)if(n=vr[t],i=n.interleaved,i!==null){n.interleaved=null;var s=i.next,u=n.pending;if(u!==null){var g=u.next;u.next=s,i.next=g}n.pending=i}vr=null}return e}function Vu(e,t){do{var n=$e;try{if(Ji(),no.current=lo,ao){for(var i=Te.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}ao=!1}if(wr=0,qe=Fe=Te=null,Bn=!1,Wn=0,zl.current=null,n===null||n.return===null){Ue=1,Yn=t,$e=null;break}e:{var u=e,g=n.return,y=n,C=t;if(t=He,y.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var P=C,A=y,O=A.tag;if((A.mode&1)===0&&(O===0||O===11||O===15)){var I=A.alternate;I?(A.updateQueue=I.updateQueue,A.memoizedState=I.memoizedState,A.lanes=I.lanes):(A.updateQueue=null,A.memoizedState=null)}var Y=fu(g);if(Y!==null){Y.flags&=-257,hu(Y,g,y,u,t),Y.mode&1&&pu(u,P,t),t=Y,C=P;var re=t.updateQueue;if(re===null){var ae=new Set;ae.add(C),t.updateQueue=ae}else re.add(C);break e}else{if((t&1)===0){pu(u,P,t),Ol();break e}C=Error(o(426))}}else if(Le&&y.mode&1){var Oe=fu(g);if(Oe!==null){(Oe.flags&65536)===0&&(Oe.flags|=256),hu(Oe,g,y,u,t),Yi(tn(C,y));break e}}u=C=tn(C,y),Ue!==4&&(Ue=2),Zn===null?Zn=[u]:Zn.push(u),u=g;do{switch(u.tag){case 3:u.flags|=65536,t&=-t,u.lanes|=t;var z=du(u,C,t);Ad(u,z);break e;case 1:y=C;var N=u.type,R=u.stateNode;if((u.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(ar===null||!ar.has(R)))){u.flags|=65536,t&=-t,u.lanes|=t;var q=uu(u,y,t);Ad(u,q);break e}}u=u.return}while(u!==null)}Hu(n)}catch(ie){t=ie,$e===n&&n!==null&&($e=n=n.return);continue}break}while(!0)}function Bu(){var e=ho.current;return ho.current=lo,e===null?lo:e}function Ol(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Ve===null||(kr&268435455)===0&&(go&268435455)===0||lr(Ve,He)}function wo(e,t){var n=Ce;Ce|=2;var i=Bu();(Ve!==e||He!==t)&&(qt=null,Sr(e,t));do try{Xm();break}catch(s){Vu(e,s)}while(!0);if(Ji(),Ce=n,ho.current=i,$e!==null)throw Error(o(261));return Ve=null,He=0,Ue}function Xm(){for(;$e!==null;)Wu($e)}function Km(){for(;$e!==null&&!vg();)Wu($e)}function Wu(e){var t=Qu(e.alternate,e,dt);e.memoizedProps=e.pendingProps,t===null?Hu(e):$e=t,zl.current=null}function Hu(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Fm(n,t,dt),n!==null){$e=n;return}}else{if(n=Um(n,t),n!==null){n.flags&=32767,$e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,$e=null;return}}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Ue===0&&(Ue=5)}function Cr(e,t,n){var i=_e,s=bt.transition;try{bt.transition=null,_e=1,Qm(e,t,n,i)}finally{bt.transition=s,_e=i}return null}function Qm(e,t,n,i){do on();while(or!==null);if((Ce&6)!==0)throw Error(o(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var u=n.lanes|n.childLanes;if(zg(e,u),e===Ve&&($e=Ve=null,He=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||bo||(bo=!0,Yu(Sa,function(){return on(),null})),u=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||u){u=bt.transition,bt.transition=null;var g=_e;_e=1;var y=Ce;Ce|=4,zl.current=null,Vm(e,n),Iu(n,e),gm($i),Ma=!!Oi,$i=Oi=null,e.current=n,Bm(n),yg(),Ce=y,_e=g,bt.transition=u}else e.current=n;if(bo&&(bo=!1,or=e,xo=s),u=e.pendingLanes,u===0&&(ar=null),jg(n.stateNode),at(e,Ae()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],i(s.value,{componentStack:s.stack,digest:s.digest});if(mo)throw mo=!1,e=Pl,Pl=null,e;return(xo&1)!==0&&e.tag!==0&&on(),u=e.pendingLanes,(u&1)!==0?e===Ll?Jn++:(Jn=0,Ll=e):Jn=0,er(),null}function on(){if(or!==null){var e=Lc(xo),t=bt.transition,n=_e;try{if(bt.transition=null,_e=16>e?16:e,or===null)var i=!1;else{if(e=or,or=null,xo=0,(Ce&6)!==0)throw Error(o(331));var s=Ce;for(Ce|=4,te=e.current;te!==null;){var u=te,g=u.child;if((te.flags&16)!==0){var y=u.deletions;if(y!==null){for(var C=0;C<y.length;C++){var P=y[C];for(te=P;te!==null;){var A=te;switch(A.tag){case 0:case 11:case 15:Qn(8,A,u)}var O=A.child;if(O!==null)O.return=A,te=O;else for(;te!==null;){A=te;var I=A.sibling,Y=A.return;if(Mu(A),A===P){te=null;break}if(I!==null){I.return=Y,te=I;break}te=Y}}}var re=u.alternate;if(re!==null){var ae=re.child;if(ae!==null){re.child=null;do{var Oe=ae.sibling;ae.sibling=null,ae=Oe}while(ae!==null)}}te=u}}if((u.subtreeFlags&2064)!==0&&g!==null)g.return=u,te=g;else e:for(;te!==null;){if(u=te,(u.flags&2048)!==0)switch(u.tag){case 0:case 11:case 15:Qn(9,u,u.return)}var z=u.sibling;if(z!==null){z.return=u.return,te=z;break e}te=u.return}}var N=e.current;for(te=N;te!==null;){g=te;var R=g.child;if((g.subtreeFlags&2064)!==0&&R!==null)R.return=g,te=R;else e:for(g=N;te!==null;){if(y=te,(y.flags&2048)!==0)try{switch(y.tag){case 0:case 11:case 15:fo(9,y)}}catch(ie){Ie(y,y.return,ie)}if(y===g){te=null;break e}var q=y.sibling;if(q!==null){q.return=y.return,te=q;break e}te=y.return}}if(Ce=s,er(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Ca,e)}catch{}i=!0}return i}finally{_e=n,bt.transition=t}}return!1}function Xu(e,t,n){t=tn(n,t),t=du(e,t,1),e=rr(e,t,1),t=Je(),e!==null&&(kn(e,1,t),at(e,t))}function Ie(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ar===null||!ar.has(i))){e=tn(n,e),e=uu(t,e,1),t=rr(t,e,1),e=Je(),t!==null&&(kn(t,1,e),at(t,e));break}}t=t.return}}function Ym(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(He&n)===n&&(Ue===4||Ue===3&&(He&130023424)===He&&500>Ae()-Ml?Sr(e,0):Rl|=n),at(e,t)}function Ku(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ea,Ea<<=1,(Ea&130023424)===0&&(Ea=4194304)));var n=Je();e=$t(e,t),e!==null&&(kn(e,t,n),at(e,n))}function Zm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Jm(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}i!==null&&i.delete(t),Ku(e,n)}var Qu;Qu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)rt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return rt=!1,$m(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Le&&(t.flags&1048576)!==0&&Ed(t,Qa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;uo(e,t),e=t.pendingProps;var s=Xr(t,Xe.current);Gr(t,n),s=cl(null,t,i,e,s,n);var u=dl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,tt(i)?(u=!0,Ha(t)):u=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rl(t),s.updater=so,t.stateNode=s,s._reactInternals=t,ml(t,i,e,n),t=yl(null,t,i,!0,u,n)):(t.tag=0,Le&&u&&Hi(t),Ze(null,t,s,n),t=t.child),t;case 16:i=t.elementType;e:{switch(uo(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=eb(i),e=St(i,e),s){case 0:t=vl(null,t,i,e,n);break e;case 1:t=yu(null,t,i,e,n);break e;case 11:t=gu(null,t,i,e,n);break e;case 14:t=mu(null,t,i,St(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:St(i,s),vl(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:St(i,s),yu(e,t,i,s,n);case 3:e:{if(wu(t),e===null)throw Error(o(387));i=t.pendingProps,u=t.memoizedState,s=u.element,Id(e,t),to(t,i,null,n);var g=t.memoizedState;if(i=g.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){s=tn(Error(o(423)),t),t=ku(e,t,i,n,s);break e}else if(i!==s){s=tn(Error(o(424)),t),t=ku(e,t,i,n,s);break e}else for(ct=Zt(t.stateNode.containerInfo.firstChild),st=t,Le=!0,jt=null,n=Dd(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yr(),i===s){t=Ut(e,t,n);break e}Ze(e,t,i,n)}t=t.child}return t;case 5:return $d(t),e===null&&Qi(t),i=t.type,s=t.pendingProps,u=e!==null?e.memoizedProps:null,g=s.children,Fi(i,s)?g=null:u!==null&&Fi(i,u)&&(t.flags|=32),vu(e,t),Ze(e,t,g,n),t.child;case 6:return e===null&&Qi(t),null;case 13:return ju(e,t,n);case 4:return nl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Zr(t,null,i,n):Ze(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:St(i,s),gu(e,t,i,s,n);case 7:return Ze(e,t,t.pendingProps,n),t.child;case 8:return Ze(e,t,t.pendingProps.children,n),t.child;case 12:return Ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,s=t.pendingProps,u=t.memoizedProps,g=s.value,ze(Ja,i._currentValue),i._currentValue=g,u!==null)if(kt(u.value,g)){if(u.children===s.children&&!et.current){t=Ut(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var y=u.dependencies;if(y!==null){g=u.child;for(var C=y.firstContext;C!==null;){if(C.context===i){if(u.tag===1){C=Ft(-1,n&-n),C.tag=2;var P=u.updateQueue;if(P!==null){P=P.shared;var A=P.pending;A===null?C.next=C:(C.next=A.next,A.next=C),P.pending=C}}u.lanes|=n,C=u.alternate,C!==null&&(C.lanes|=n),el(u.return,n,t),y.lanes|=n;break}C=C.next}}else if(u.tag===10)g=u.type===t.type?null:u.child;else if(u.tag===18){if(g=u.return,g===null)throw Error(o(341));g.lanes|=n,y=g.alternate,y!==null&&(y.lanes|=n),el(g,n,t),g=u.sibling}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===t){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}Ze(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,Gr(t,n),s=gt(s),i=i(s),t.flags|=1,Ze(e,t,i,n),t.child;case 14:return i=t.type,s=St(i,t.pendingProps),s=St(i.type,s),mu(e,t,i,s,n);case 15:return bu(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:St(i,s),uo(e,t),t.tag=1,tt(i)?(e=!0,Ha(t)):e=!1,Gr(t,n),su(t,i,s),ml(t,i,s,n),yl(null,t,i,!0,e,n);case 19:return Cu(e,t,n);case 22:return xu(e,t,n)}throw Error(o(156,t.tag))};function Yu(e,t){return _c(e,t)}function Gm(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,n,i){return new Gm(e,t,n,i)}function $l(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eb(e){if(typeof e=="function")return $l(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W)return 11;if(e===Ne)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ko(e,t,n,i,s,u){var g=2;if(i=e,typeof e=="function")$l(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case X:return Nr(n.children,s,u,t);case K:g=8,s|=8;break;case he:return e=xt(12,n,t,s|2),e.elementType=he,e.lanes=u,e;case Q:return e=xt(13,n,t,s),e.elementType=Q,e.lanes=u,e;case be:return e=xt(19,n,t,s),e.elementType=be,e.lanes=u,e;case ye:return jo(n,s,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:g=10;break e;case ue:g=9;break e;case W:g=11;break e;case Ne:g=14;break e;case ve:g=16,i=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=xt(g,n,t,s),t.elementType=e,t.type=i,t.lanes=u,t}function Nr(e,t,n,i){return e=xt(7,e,i,t),e.lanes=n,e}function jo(e,t,n,i){return e=xt(22,e,i,t),e.elementType=ye,e.lanes=n,e.stateNode={isHidden:!1},e}function Fl(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function Ul(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tb(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gi(0),this.expirationTimes=gi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ql(e,t,n,i,s,u,g,y,C){return e=new tb(e,t,n,y,C),t===1?(t=1,u===!0&&(t|=8)):t=0,u=xt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rl(u),e}function rb(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function Zu(e){if(!e)return Gt;e=e._reactInternals;e:{if(hr(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(tt(n))return Sd(e,n,t)}return t}function Ju(e,t,n,i,s,u,g,y,C){return e=ql(n,i,!0,e,s,u,g,y,C),e.context=Zu(null),n=e.current,i=Je(),s=ir(n),u=Ft(i,s),u.callback=t??null,rr(n,u,s),e.current.lanes=s,kn(e,s,i),at(e,i),e}function So(e,t,n,i){var s=t.current,u=Je(),g=ir(s);return n=Zu(n),t.context===null?t.context=n:t.pendingContext=n,t=Ft(u,g),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=rr(s,t,g),e!==null&&(Et(e,s,g,u),eo(e,s,g)),g}function Co(e){return e=e.current,e.child?(e.child.tag,e.child.stateNode):null}function Gu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vl(e,t){Gu(e,t),(e=e.alternate)&&Gu(e,t)}function nb(){return null}var ep=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bl(e){this._internalRoot=e}No.prototype.render=Bl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));So(e,t,null,null)},No.prototype.unmount=Bl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jr(function(){So(null,e,null,null)}),t[Tt]=null}};function No(e){this._internalRoot=e}No.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ic();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kt.length&&t!==0&&t<Kt[n].priority;n++);Kt.splice(n,0,e),n===0&&$c(e)}};function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tp(){}function ab(e,t,n,i,s){if(s){if(typeof i=="function"){var u=i;i=function(){var P=Co(g);u.call(P)}}var g=Ju(t,i,e,0,null,!1,!1,"",tp);return e._reactRootContainer=g,e[Tt]=g.current,In(e.nodeType===8?e.parentNode:e),jr(),g}for(;s=e.lastChild;)e.removeChild(s);if(typeof i=="function"){var y=i;i=function(){var P=Co(C);y.call(P)}}var C=ql(e,0,!1,null,null,!1,!1,"",tp);return e._reactRootContainer=C,e[Tt]=C.current,In(e.nodeType===8?e.parentNode:e),jr(function(){So(t,C,n,i)}),C}function _o(e,t,n,i,s){var u=n._reactRootContainer;if(u){var g=u;if(typeof s=="function"){var y=s;s=function(){var C=Co(g);y.call(C)}}So(t,g,e,s)}else g=ab(n,t,e,s,i);return Co(g)}Dc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wn(t.pendingLanes);n!==0&&(mi(t,n|1),at(t,Ae()),(Ce&6)===0&&(an=Ae()+500,er()))}break;case 13:jr(function(){var i=$t(e,1);if(i!==null){var s=Je();Et(i,e,1,s)}}),Vl(e,1)}},bi=function(e){if(e.tag===13){var t=$t(e,134217728);if(t!==null){var n=Je();Et(t,e,134217728,n)}Vl(e,134217728)}},Tc=function(e){if(e.tag===13){var t=ir(e),n=$t(e,t);if(n!==null){var i=Je();Et(n,e,t,i)}Vl(e,t)}},Ic=function(){return _e},Ac=function(e,t){var n=_e;try{return _e=e,t()}finally{_e=n}},ci=function(e,t,n){switch(t){case"input":if(ti(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var s=Ba(i);if(!s)throw Error(o(90));lc(i),ti(i,s)}}}break;case"textarea":pc(e,n);break;case"select":t=n.value,t!=null&&Tr(e,!!n.multiple,t,!1)}},wc=Il,kc=jr;var ob={usingClientEntryPoint:!1,Events:[$n,Wr,Ba,vc,yc,Il]},Gn={findFiberByHostInstance:gr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ib={bundleType:Gn.bundleType,version:Gn.version,rendererPackageName:Gn.rendererPackageName,rendererConfig:Gn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Nc(e),e===null?null:e.stateNode},findFiberByHostInstance:Gn.findFiberByHostInstance||nb,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 zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{Ca=zo.inject(ib),Rt=zo}catch{}}return ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ob,ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wl(t))throw Error(o(200));return rb(e,t,null,n)},ot.createRoot=function(e,t){if(!Wl(e))throw Error(o(299));var n=!1,i="",s=ep;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ql(e,1,!1,null,null,n,!1,i,s),e[Tt]=t.current,In(e.nodeType===8?e.parentNode:e),new Bl(t)},ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Nc(t),e=e===null?null:e.stateNode,e},ot.flushSync=function(e){return jr(e)},ot.hydrate=function(e,t,n){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!0,n)},ot.hydrateRoot=function(e,t,n){if(!Wl(e))throw Error(o(405));var i=n!=null&&n.hydratedSources||null,s=!1,u="",g=ep;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(g=n.onRecoverableError)),t=Ju(t,null,e,1,n??null,s,!1,u,g),e[Tt]=t.current,In(e),i)for(e=0;e<i.length;e++)n=i[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new No(t)},ot.render=function(e,t,n){if(!Eo(t))throw Error(o(200));return _o(null,e,t,!1,n)},ot.unmountComponentAtNode=function(e){if(!Eo(e))throw Error(o(40));return e._reactRootContainer?(jr(function(){_o(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},ot.unstable_batchedUpdates=Il,ot.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Eo(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return _o(e,t,n,!1,i)},ot.version="18.3.1-next-f1338f8080-20240426",ot}var hp;function vb(){if(hp)return Xl.exports;hp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),Xl.exports=xb(),Xl.exports}var gp;function yb(){if(gp)return Ro;gp=1;var r=vb();return Ro.createRoot=r.createRoot,Ro.hydrateRoot=r.hydrateRoot,Ro}var wb=yb();const kb=".aid-root{color-scheme:light;--background: 0 0% 100%;--background-secondary: 210, 40%, 96%;--foreground: 222.2 47.4% 11.2%;--foreground-secondary: 253, 40%, 16%;--scroll: 0, 0%, 78%;--sidebar-menu-background: 202, 100%, 18%;--sidebar: 210, 40%, 96%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 42%;--popover: 0 0% 100%;--popover-foreground: 222.2 47.4% 11.2%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--card: 0 0% 100%;--card-foreground: 222.2 47.4% 11.2%;--primary: 201, 100%, 29%;--primary-text: 201, 100%, 29%;--primary-foreground: 210, 40%, 96%;--primary-hovered: 202, 54%, 67%;--primary-pressed: 202, 100%, 18%;--disabled: 223, 8%, 18%, .15;--disabled-foreground: 223, 8%, 18%, .65;--main: 252, 39%, 16%;--main-foreground: 210, 40%, 96%;--secondary: 201, 95%, 36%, .1;--secondary-foreground: 201, 100%, 29%, 1;--secondary-hovered: 202, 54%, 67%;--secondary-pressed: 202, 100%, 18%;--accent: 223, 8%, 18%, .06;--accent-foreground: 223, 8%, 18%, 1;--destructive: 359, 84%, 50%, 1;--destructive-foreground: 0, 0%, 100%, 1;--destructive-background: 359, 84%, 50%, .1;--destructive-hovered: 359, 84%, 58%, 1;--destructive-pressed: 359, 84%, 44%, 1;--ring: 215 20.2% 65.1%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 202, 100%, 18%;--table-header-background: 223, 8%, 18%;--table-header-opacity: .02;--table-background-hover: 223, 8%, 18%;--chart-card: 210, 27%, 95%;--filled-filter: 343, 79%, 45%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359, 84%, 50%;--processing: 201.2, 100%, 29.41%;--success-background: 90, 100%, 96%;--warning-background: 50, 100%, 95%, 1;--error-background: 8, 100%, 97%, 1;--processing-background: 204, 42%, 95%, 1;--default-background: 223, 8%, 18%, .02;--transfer-hovered: 223, 8%, 18%, .04;--transfer-selected: 204, 42%, 95%;--transfer-selected-hovered: 203, 55%, 91%;--toast-background: 204, 42%, 95%;--toast-border: 202, 55%, 85%;--toast-success-background: 90, 100%, 96%;--toast-success-border: 94, 70%, 74%;--toast-error-background: 8, 100%, 97%;--toast-error-border: 5, 100%, 89%, 1;--toast-warning-background: 50, 100%, 95%;--toast-warning-border: 46, 100%, 78%;--toast-info-background: 204, 42%, 95%;--toast-info-border: 202, 55%, 85%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 0%;--gray-soft: 220, 27%, 92%;--gray-softer: 0 0% 95%}.aid-root.dark{color-scheme:dark;--background: 222 47% 11%;--background-secondary: 217, 33%, 17%;--foreground: 210 40% 98%;--foreground-secondary: 210, 40%, 90%;--scroll: 215, 14%, 34%;--sidebar-menu-background: 222, 47%, 11%;--sidebar: 217, 33%, 17%;--muted: 217 33% 17%;--muted-foreground: 215 20.2% 65.1%;--popover: 222 47% 11%;--popover-foreground: 210 40% 98%;--border: 217 33% 25%;--input: 217 33% 25%;--card: 222 47% 11%;--card-foreground: 210 40% 98%;--primary: 201, 100%, 35%;--primary-text: 201, 90%, 60%;--primary-foreground: 210, 40%, 98%;--primary-hovered: 201, 100%, 39%;--primary-pressed: 201, 100%, 29%;--disabled: 215, 14%, 34%, .2;--disabled-foreground: 210, 40%, 90%, .5;--main: 210, 40%, 90%;--main-foreground: 222, 47%, 11%;--secondary: 201, 95%, 40%, .2;--secondary-foreground: 201, 100%, 70%, 1;--secondary-hovered: 201, 90%, 75%;--secondary-pressed: 201, 100%, 60%;--accent: 210, 40%, 90%, .1;--accent-foreground: 210, 40%, 90%, 1;--destructive: 0, 100%, 65%, 1;--destructive-foreground: 210, 40%, 98%, 1;--destructive-background: 359, 100%, 65%, .1;--destructive-hovered: 0, 100%, 70%, 1;--destructive-pressed: 0, 100%, 60%, 1;--ring: 215 20.2% 50%;--radius: 12px;--header-height: 64px;--table-radius: 10px;--table-background: 222, 47%, 15%;--table-header-background: 0, 0%, 100%;--table-header-opacity: .04;--table-background-hover: 0, 0%, 100%;--chart-card: 210, 25%, 18%;--filled-filter: 343, 79%, 55%;--success: 100.24, 76.58%, 43.53%;--warning: 39.91, 95.83%, 52.94%;--error: 359.33, 100%, 65.1%;--processing: 201, 90%, 60%;--success-background: 100, 77%, 44%, .12;--warning-background: 40, 96%, 53%, .12;--error-background: 359, 100%, 65%, .12;--processing-background: 201, 90%, 60%, .12;--default-background: 0, 0%, 100%, .04;--transfer-hovered: 0, 0%, 100%, .06;--transfer-selected: 201, 95%, 40%, .2;--transfer-selected-hovered: 201, 95%, 40%, .3;--toast-background: 222, 47%, 15%;--toast-border: 217, 33%, 25%;--toast-success-background: 142, 70%, 15%;--toast-success-border: 142, 70%, 25%;--toast-error-background: 0, 70%, 15%;--toast-error-border: 0, 70%, 25%;--toast-warning-background: 48, 70%, 15%;--toast-warning-border: 48, 70%, 25%;--toast-info-background: 201, 70%, 15%;--toast-info-border: 201, 70%, 25%;--custom-magenta: 330 84% 33%;--custom-peach: 36 100% 94%;--custom-orange-soft: 18 100% 63%;--custom-orange-strong: 27, 95%, 55%;--chart-stroke: 0, 0%, 100%;--gray-soft: 217, 33%, 22%;--gray-softer: 217 33% 17%}.aid-root{--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}",Kl=25,jb={ru:"ru-RU",kk:"kk-KZ",en:"en-US"};function _t(r,a,o){return r===null?"\u2014":new Intl.NumberFormat(jb[a],{minimumFractionDigits:o,maximumFractionDigits:o}).format(r).replace(new RegExp("\\u202F","g"),"\xA0")}const Ql=r=>typeof r=="number"&&Number.isFinite(r)?r:null;function Sb(r,a,o){const l=o==="asc"?1:-1,d=a.type==="number"||a.type==="integer",p=[],f=[];for(const h of r){const m=h[a.key];((d?Ql(m)===null:m==null)?f:p).push(h)}return p.sort((h,m)=>d?l*((Ql(h[a.key])??0)-(Ql(m[a.key])??0)):l*String(h[a.key]).localeCompare(String(m[a.key]))),[...p,...f]}function Cb(r,a){let o=r.data;const l=a.query?.trim().toLowerCase();if(l){const b=r.columns.filter(j=>j.type==="string").map(j=>j.key);o=o.filter(j=>b.some(k=>String(j[k]??"").toLowerCase().includes(l)))}const d=r.columns.find(b=>b.key===a.sortKey);d&&(o=Sb(o,d,a.dir??"asc"));const p=o.length,f=Math.max(1,Math.ceil(p/Kl)),h=Math.min(Math.max(1,Math.trunc(a.page)||1),f),m=(h-1)*Kl,v=o.slice(m,m+Kl);return{rows:v,page:h,pages:f,from:p===0?0:m+1,to:m+v.length,total:p}}function Nb(r){return r.split(`
9
+ `).map(a=>{const o=a.trim();return o.startsWith("|")?/^\|[\s:|-]+\|?$/.test(o)?null:o.replace(/^\||\|$/g,"").split("|").map(l=>l.trim()).join(" \u2014 "):a}).filter(a=>a!==null).join(`
10
+ `).replace(/^\s{0,3}#+\s*/gm,"").replace(/[*_`]/g,"").trim()}function Eb(r){const a=r.blocks.find(l=>l.kind==="plan"),o=[];return a&&a.passport.length>0&&o.push(a.passport.join(`
11
+ `)),o.push(Nb(r.content)),a?.source&&o.push(`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${a.source.name}`),o.join(`
12
+
13
+ `)}function mp(r,a){return a.isLastInBranch?a.now.getTime()>Date.parse(r.expires_at)?"expired":"open":"answered"}function _b(r,a){const o=a.trim().toLowerCase();return o?r.filter(l=>l.label.toLowerCase().includes(o)):r}function ta(r){return[...new Set(r.data.map(a=>a.period))].sort((a,o)=>a.localeCompare(o,void 0,{numeric:!0}))}const bp=r=>r.value_kind!=="level",xp=(r,a)=>{const o=ta(r),l=o.indexOf(a);return l>0?o[l-1]:void 0},vp=(r,a)=>r.national?.period===a?r.national.value:null,zb=r=>{if(r.length===0)return null;const a=[...r].sort((l,d)=>l-d),o=Math.floor(a.length/2);return a.length%2?a[o]:(a[o-1]+a[o])/2},Rb=r=>[r.territory_code??r.territory_name,r.item].filter(a=>!!a).join("|"),Mb=r=>[r.territory_name??r.territory_code,r.item].filter(a=>!!a).join(", ");function Yl(r,a){const o=new Map;for(const l of r.data)l.period===a&&o.set(Rb(l),{name:Mb(l),value:l.value});return o}function Pb(r,a,o){return a===null||o===null||o===void 0?null:bp(r)?a-o:o<=0?null:(a/o-1)*100}const yp=r=>r!==null&&Number.isFinite(r)?r:null;function Lb(r,a){const o=Yl(r,a.period),l=xp(r,a.period),d=l?Yl(r,l):void 0,p=[...o.values()].map(m=>m.value).filter(m=>m!==null),f=p.reduce((m,v)=>m+v,0),h=a.base==="national"?vp(r,a.period):zb(p);return[...o].map(([m,{name:v,value:b}])=>{const j=yp(d?Pb(r,b,d.get(m)?.value):null);let k=b;a.mode==="deviation"?k=b===null||h===null?null:b-h:a.mode==="change"&&(k=j);const S=r.value_kind==="level"&&b!==null&&f!==0?b/f*100:null;return{key:m,name:v,value:b,display:yp(k),share:S,delta:j}}).sort((m,v)=>m.display===null||v.display===null?+(m.display===null)-+(v.display===null):v.display-m.display)}function Db(r,a){return{deviation:[...Yl(r,a).values()].filter(o=>o.value!==null).length>=2,national:vp(r,a)!==null,change:xp(r,a)!==void 0}}function Tb(r,a){return a==="value"?r.unit.label:bp(r)?"\u043F.\u043F.":a==="deviation"?r.unit.label:"%"}function Ib(r){const a=r.filter(Number.isFinite);if(a.length<2)return!0;const o=Math.max(...a),l=Math.min(...a);return o<=0||o===l?!0:(o-l)/o>=.2}function wp(r){switch(r){case"pdf":return"report";case"docx":return"document";case"pptx":return"presentation";case"xlsx":return"excel";case"csv":return"csv"}}const vt=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),le=r=>typeof r=="string",Vt=r=>typeof r=="number"&&Number.isFinite(r),Zl=r=>r===null||le(r),yt=(r,a)=>Array.isArray(r)&&r.every(o=>vt(o)&&a(o)),Mo=r=>Array.isArray(r)&&r.every(le),Ab=["self","regions","districts"],Ob=["string","number","integer","period"],$b=["indicator","territory","topic","period","scope","plan_confirm"];function Fb(r){const{period:a}=r;return yt(r.indicators,o=>le(o.id)&&le(o.name)&&le(o.unit))&&yt(r.alternatives,o=>le(o.id)&&le(o.name))&&yt(r.territories,o=>le(o.code)&&le(o.name))&&le(r.scope)&&Ab.includes(r.scope)&&vt(a)&&le(a.label)&&typeof a.substituted=="boolean"&&Zl(a.reason)&&le(r.breakdown)&&Mo(r.passport)&&(r.source===void 0||vt(r.source)&&le(r.source.name))&&(r.methodology===void 0||vt(r.methodology)&&le(r.methodology.title)&&le(r.methodology.url))}function Ub(r){return le(r.section_id)&&yt(r.columns,a=>le(a.key)&&le(a.title)&&le(a.type)&&Ob.includes(a.type))&&yt(r.data,()=>!0)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)}function qb(r){return le(r.topic)&&yt(r.sections,a=>le(a.id)&&Mo(a.path)&&Vt(a.count))&&yt(r.indicators,a=>le(a.entity_id)&&le(a.name)&&le(a.unit)&&le(a.years)&&le(a.section))&&Vt(r.total)&&Mo(r.examples)}function Vb(r){return le(r.id)&&le(r.type)&&$b.includes(r.type)&&le(r.slot)&&le(r.question)&&yt(r.options,a=>le(a.value)&&le(a.label)&&Zl(a.hint))&&Zl(r.default)&&typeof r.allow_free_text=="boolean"&&Vt(r.round)&&le(r.expires_at)}const Bb=["regional","trend","breakdown","multi"],Wb=["level","percent","index","rate"],Hb=["pdf","docx","pptx","xlsx","csv"],Xb=["queued","running","done","failed","expired"],kp=["territory_code","territory_name","item"],ra=r=>r==null,sn=r=>ra(r)||le(r),Kb=r=>le(r.period)&&(r.value===null||Vt(r.value))&&kp.every(a=>sn(r[a])),Qb=r=>vt(r)&&le(r.title)&&le(r.url);function Yb(r){return ra(r)?!0:!vt(r)||!sn(r.label)?!1:ra(r.editions)?!0:vt(r.editions)&&Object.values(r.editions).every(Qb)}function Zb(r){const{unit:a,national:o}=r;return le(r.id)&&le(r.title)&&le(r.shape)&&Bb.includes(r.shape)&&vt(a)&&le(a.code)&&le(a.label)&&le(r.value_kind)&&Wb.includes(r.value_kind)&&Vt(r.decimals)&&le(r.freq)&&le(r.period)&&le(r.latest_period)&&yt(r.data,Kb)&&(ra(o)||vt(o)&&le(o.period)&&Vt(o.value))&&yt(r.kpis,l=>le(l.label)&&le(l.value)&&sn(l.sub)&&sn(l.tone))&&Mo(r.findings)&&typeof r.truncated=="boolean"&&Vt(r.total_rows)&&Yb(r.methodology)&&sn(r.source_url)&&sn(r.source_name)}function Jb(r){const a={...r};for(const o of kp)a[o]===null&&delete a[o];return a}function Gb(r){if(!le(r.title)||!Array.isArray(r.sections))return;const a=r.sections.filter(o=>vt(o)&&Zb(o)).map(o=>({...o,national:o.national??null,data:o.data.map(Jb)}));if(a.length!==0)return{kind:"dashboard",title:r.title,auto_open:r.auto_open===!0,sections:a}}const jp=r=>le(r.format)&&Hb.includes(r.format)&&le(r.filename)&&le(r.title)&&le(r.download_url)&&Vt(r.size_bytes);function e0(r){const{error:a}=r;return le(r.job_id)&&le(r.status)&&Xb.includes(r.status)&&yt(r.files,jp)&&(ra(a)||vt(a)&&le(a.code)&&le(a.message))}function Sp(r){if(vt(r))switch(r.kind){case"plan":return Fb(r)?r:void 0;case"table":return Ub(r)?r:void 0;case"catalog":return qb(r)?r:void 0;case"clarification":return Vb(r)?r:void 0;case"dashboard":return Gb(r);case"export":return yt(r.files,jp)?r:void 0;case"report":return e0(r)?r:void 0;default:return}}const Jl="/chat/stream",t0=100;class Ge extends Error{constructor(a,o,l=null){super(o),ln(this,"status"),ln(this,"code"),ln(this,"body"),this.name="ApiError",this.status=a,this.code=o,this.body=l}get resetAt(){const a=this.body;if(a&&typeof a=="object"&&"reset_at"in a&&typeof a.reset_at=="string")return a.reset_at}}function r0(r,a){if(r&&typeof r=="object"){if("detail"in r&&typeof r.detail=="string"&&r.detail)return r.detail;if("errors"in r&&Array.isArray(r.errors)){const o=r.errors[0];if(o&&typeof o=="object"&&"code"in o&&typeof o.code=="string"&&o.code)return o.code}}return`http_${a}`}async function n0(r){const a=await r.text();if(!a)return null;try{return JSON.parse(a)}catch{return null}}async function Gl(r){const a=await n0(r);return new Ge(r.status,r0(a,r.status),a)}const na=r=>typeof r=="string"&&r.trim()!==""?r.trim():void 0,a0=["\u041E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435: ","\u041A\u0430\u043A \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C: "],o0="\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0434\u0438\u0430\u043B\u043E\u0433:",Cp=`
14
+ \u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441: `;function i0(r){let a=r;if(a0.some(o=>a.startsWith(o))){const o=a.indexOf(`
15
+
16
+ `);o!==-1&&(a=a.slice(o+2))}if(a.startsWith(o0)){const o=a.lastIndexOf(Cp);o!==-1&&(a=a.slice(o+Cp.length))}return a}const l0=["streaming","done","stopped","error"];function s0(r){return{...typeof r.id=="string"?{id:r.id}:{},node:typeof r.node=="string"?r.node:"",status:r.status==="running"?"running":"done",attempt:typeof r.attempt=="number"?r.attempt:1,...typeof r.durationMs=="number"?{durationMs:r.durationMs}:{},...typeof r.label=="string"?{label:r.label}:{},...typeof r.total=="number"||r.total===null?{total:r.total}:{},...na(r.detail)!==void 0?{detail:na(r.detail)}:{},...na(r.result)!==void 0?{result:na(r.result)}:{},...typeof r.startedAt=="number"?{startedAt:r.startedAt}:{}}}function Np(r){return{id:r.id,parentId:r.parent_id,role:r.role==="user"?"user":"assistant",content:r.role==="user"?i0(r.content):r.content,mode:r.mode,status:l0.find(a=>a===r.status)??"done",steps:r.steps.map(s0),durationMs:r.duration_ms,rating:r.rating,feedback:r.feedback,feedbackReason:r.feedback_reason??"",attachments:r.attachments??[],blocks:(r.blocks??[]).flatMap(a=>{const o=Sp(a);return o!=null?[o]:[]}),createdAt:r.created_at}}const c0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ep=r=>c0.test(r);class _p extends Error{constructor(a){super(a),this.name="StreamFailure"}}const d0=(r,a)=>Date.parse(r.createdAt)-Date.parse(a.createdAt)||(r.id<a.id?-1:r.id>a.id?1:0);function zp(r){const a=new Map,o=new Map;for(const l of r){a.set(l.id,l);const d=o.get(l.parentId);d?d.push(l):o.set(l.parentId,[l])}for(const l of o.values())l.sort(d0);return{byId:a,children:o}}function u0(r,a){const o=[],l=new Set;let d=r.byId.get(a);for(;d&&!l.has(d.id);)l.add(d.id),o.push(d),d=d.parentId===null?void 0:r.byId.get(d.parentId);return o.reverse()}function Rp(r,a){if(!r.byId.has(a))return null;let o=a;for(;;){const l=r.children.get(o),d=l?.[l.length-1];if(!d)return o;o=d.id}}function p0(r,a){const o=r.byId.get(a);if(!o)return{list:[],position:-1};const l=r.children.get(o.parentId)??[];return{list:l,position:l.findIndex(d=>d.id===a)}}function Mp(r,a){if(a&&r.byId.has(a))return a;const o=r.children.get(null),l=o?.[o.length-1];return l?Rp(r,l.id):null}let f0=0;const h0=r=>`temp-${r}-${Date.now().toString(36)}-${(f0++).toString(36)}`;function es(r,a,o){return{id:h0(r==="user"?"user":"stream"),parent_id:o,role:r,content:"",mode:a,status:r==="user"?"done":"streaming",steps:[],duration_ms:null,rating:null,feedback:"",created_at:new Date().toISOString()}}function g0(r){return!r||r.messages.length===0?null:Mp(zp(r.messages.map(Np)),r.current_leaf_id)}function m0(r,a){if(r.regenerateOf!=null){const d=a?.messages.find(p=>p.id===r.regenerateOf);return{assistant:es("assistant",r.mode,d?.parent_id??null)}}const o=r.parentId===void 0?g0(a):r.parentId||null,l={...es("user",r.mode,o),content:r.query,...r.file?{attachments:[{name:r.file.name,url:""}]}:{}};return{user:l,assistant:es("assistant",r.mode,l.id)}}function b0(r,a,o){const l=new Map([[a.assistantId,o.assistantMessageId]]);a.userId!=null&&l.set(a.userId,o.userMessageId);const d=p=>p!=null?l.get(p)??p:p;return{...r,id:o.threadId,current_leaf_id:d(r.current_leaf_id),messages:r.messages.map(p=>l.has(p.id)||p.parent_id!=null&&l.has(p.parent_id)?{...p,id:d(p.id)??p.id,parent_id:d(p.parent_id)}:p)}}function x0(r,a){return{...r,content:a.text,steps:a.steps.map(o=>({...o})),...a.attachments.length>0?{attachments:a.attachments}:{},...a.blocks.length>0?{blocks:a.blocks.map(o=>({...o}))}:{}}}function v0(r,a,o,l){const d={...r,status:a,duration_ms:Date.now()-l};return a==="error"&&!r.content?{...d,content:o}:d}const y0=["thread_busy","mode_overloaded","daily_limit","rate_limit","concurrency_limit","file_too_large","file_not_allowed","invalid_query","invalid_parent","mode_not_found","thread_not_found","interrupted"],w0=r=>y0.includes(r);function k0(r){if(r instanceof Ge)return r.code;if(r instanceof _p)return r.message}function Po(r){const a=k0(r);return a!=null&&w0(a)?{kind:"code",code:a}:r instanceof Ge?{kind:"status",status:r.status}:{kind:"generic"}}async function Lo(r,a,o={}){const l=o.method??"GET",d=new Headers(o.headers),p=await r.headers?.({method:l})??{};for(const[f,h]of Object.entries(p))d.set(f,h);return(r.fetch??fetch)(`${r.baseUrl}${a}`,{...o,method:l,headers:d,...r.credentials?{credentials:r.credentials}:{}})}const Pp="text/event-stream";function j0({query:r,mode:a,file:o,parentId:l,regenerateOf:d,clarification:p},f){const h=new FormData;return h.set("mode",a),d==null&&h.set("query",r),f!=null&&h.set("thread_id",f),l!==void 0&&h.set("parent_id",l),d!=null&&h.set("regenerate_of",d),o&&h.set("file",o),p&&h.set("clarification",JSON.stringify(p)),h}function S0(r,a,o){return Lo(r,Jl,{method:"POST",body:a,headers:{Accept:Pp},signal:o})}function C0(r,a,o){return Lo(r,`${Jl}/${a}`,{headers:{Accept:Pp},signal:o})}async function N0(r,a){const o=await Lo(r,`${Jl}/${a}/stop`,{method:"POST"});if(!o.ok)throw await Gl(o)}async function E0(r){if(!r.ok)throw await Gl(r);if(r.body==null)throw new Error("empty_stream");return r.body}const ts="/api/v1/widget",rs="aid_visitor",Lp=4e3,ns=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Dp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[\w-]{10,100}$/i,_0=()=>{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const r=new Uint8Array(16);crypto.getRandomValues(r),r[6]=(r[6]??0)&15|64,r[8]=(r[8]??0)&63|128;const a=Array.from(r,o=>o.toString(16).padStart(2,"0")).join("");return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20)}`},z0=(r,a)=>{if(r&&ns.test(r))return r;try{const l=a?.getItem(rs);if(l&&(ns.test(l)||Dp.test(l)))return l}catch{}const o=_0();try{a?.setItem(rs,o)}catch{}return o},R0=/\/api\/v1\/attachments\/([0-9a-f-]{36})\/?(?:[?#].*)?$/i,Do=(r,a)=>{const o=R0.exec(r);if(!o?.[1]){const l=/\/api\/v1\/widget\/attachments\/([0-9a-f-]{36})\/?$/i.exec(r);return l?.[1]?`${as(a)}/attachments/${l[1]}`:null}return`${as(a)}/attachments/${o[1]}`},as=r=>`${r.replace(/\/+$/,"")}${ts}`,M0=r=>{if(r==="")return r;let a;try{a=new URL(r)}catch{throw new TypeError(`AiDanaChat: api-url must be an absolute http(s) URL, got "${r}"`)}if(a.protocol!=="https:"&&a.protocol!=="http:")throw new TypeError(`AiDanaChat: api-url must be an http(s) URL, got "${r}"`);return r},os=r=>r&&(/^https:\/\//i.test(r)||/^\/(?!\/)/.test(r)||/^data:image\/(?:png|jpeg|webp|gif);/i.test(r))?r:void 0,To=r=>typeof r=="object"&&r!==null&&!Array.isArray(r),P0=r=>{if(!To(r)||!To(r.site)||!Array.isArray(r.modes)||!r.modes.every(a=>To(a)&&typeof a.slug=="string")||!To(r.visitor))throw new Error("bad config");return r},L0=r=>{const a={};if(!r||typeof r!="object")return a;const o=S=>{const _=r[S];return typeof _=="string"&&_?_:void 0},l=o("primary"),d=o("font"),p=os(o("logoUrl")),f=o("title"),h=o("scheme");l&&(a.primary=l),d&&(a.font=d),p&&(a.logoUrl=p),f&&(a.title=f),(h==="light"||h==="dark"||h==="auto")&&(a.scheme=h);const m=o("launcher");(m==="icon"||m==="label")&&(a.launcher=m);const v=o("launcherLabel");v&&(a.launcherLabel=v);const b=o("launcherShape");(b==="circle"||b==="rounded"||b==="square")&&(a.launcherShape=b),(typeof r.radius=="number"||typeof r.radius=="string"&&r.radius)&&(a.radius=r.radius);for(const S of["background","foreground","bubble","border"]){const _=o(S);_&&(a[S]=_)}const j=S=>{const _=r[S],E=typeof _=="number"?_:typeof _=="string"&&_?Number(_):NaN;return Number.isFinite(E)?E:void 0};for(const S of["windowWidth","windowHeight","offsetX","offsetY"]){const _=j(S);_!==void 0&&(a[S]=_)}const k=o("position");return(k==="bottom-right"||k==="bottom-left")&&(a.position=k),a},Tp=r=>{throw r instanceof Ge||r instanceof Error&&r.name==="AbortError"?r:new Ge(0,"network",null)},D0=({apiUrl:r,siteKey:a,visitorId:o,rememberVisitor:l,fetch:d})=>{let p=o;const f=M0(r),h=encodeURIComponent,m={baseUrl:as(f),headers:()=>({"X-Visitor-Id":p,...a?{"X-Widget-Key":a}:{}}),credentials:"omit",...d?{fetch:d}:{}},v=async(k,S={})=>{const _=await Lo(m,k,S).catch(Tp);if(!_.ok)throw await Gl(_);return _},b=async(k,S)=>(await v(k,S)).json(),j=(k,S)=>({method:k,headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});return{transport:m,apiUrl:f,config:async()=>P0(await b("/config")),health:()=>b("/modes/health"),threads:()=>b("/threads?limit=50"),thread:k=>b(`/threads/${h(k)}`),setLeaf:async(k,S)=>{await v(`/threads/${h(k)}`,j("PATCH",{current_leaf_id:S}))},deleteThread:async k=>{await v(`/threads/${h(k)}`,{method:"DELETE"})},rate:async(k,S)=>{await v(`/messages/${h(k)}/rating`,j("POST",{rating:S}))},feedback:async(k,S,_)=>{await v(`/messages/${h(k)}/feedback`,j("POST",_?{feedback:S,reason:_}:{feedback:S}))},stop:k=>N0(m,h(k)).catch(Tp),createReport:(k,S)=>b(`/messages/${h(k)}/report`,j("POST",{language:S})),reportStatus:k=>ns.test(k)?b(`/report-jobs/${k}`):Promise.reject(new Ge(0,"bad_job_id",null)),request:k=>v(k),attachment:async k=>{const S=Do(k,f);if(!S)throw new Ge(0,"not_attachment",null);const _=S.slice(m.baseUrl.length),E=await(await v(_)).blob();return URL.createObjectURL(E)},adoptVisitor:k=>!k||!Dp.test(k)||k===p?!1:(p=k,l?.(k),!0)}},is=["kk","ru","en"],T0=r=>is.includes(r),Ip=r=>{const a=[r,typeof document<"u"?document.documentElement.lang:void 0,typeof navigator<"u"?navigator.language:void 0];for(const o of a){const l=o?.toLowerCase().split("-")[0];if(T0(l))return l}return"ru"},Ap={title:"AI-Dana",open:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0447\u0430\u0442",unreadAnswers:"\u043D\u043E\u0432\u044B\u0445 \u043E\u0442\u0432\u0435\u0442\u043E\u0432: {count}",ask:"\u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441",close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",history:"\u0418\u0441\u0442\u043E\u0440\u0438\u044F",closeHistory:"\u0421\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E",newChat:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442",untitled:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442",historyEmpty:"\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0447\u0430\u0442\u043E\u0432",historyError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E",delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",deleteConfirm:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0430\u0442?",deleteYes:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",deleteNo:"\u041E\u0442\u043C\u0435\u043D\u0430",deleteError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0430\u0442",modeLabel:"\u0420\u0435\u0436\u0438\u043C \u043E\u0442\u0432\u0435\u0442\u0430","health.idle":"\u0421\u0432\u043E\u0431\u043E\u0434\u0435\u043D","health.busy":"\u0417\u0430\u043D\u044F\u0442","health.unavailable":"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",placeholder:"\u0417\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B",inputLabel:"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",send:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",stop:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",attach:"\u041F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0444\u0430\u0439\u043B",attachOne:"\u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u0438\u043D \u0444\u0430\u0439\u043B",attachHint:"\u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u043E\u0434\u0438\u043D \u0444\u0430\u0439\u043B: XLS, XLSX, CSV, TXT \u0438\u043B\u0438 MD \u0434\u043E {size} \u041C\u0411",disclaimer:"\u0418\u0418 \u043C\u043E\u0436\u0435\u0442 \u043E\u0448\u0438\u0431\u0430\u0442\u044C\u0441\u044F \u2014 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0439\u0442\u0435 \u0432\u0430\u0436\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",removeFile:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0444\u0430\u0439\u043B",counter:"{count} / {max}",counterLimit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043F\u0440\u0435\u0434\u0435\u043B \u0437\u043D\u0430\u043A\u043E\u0432",counterOver:"\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043F\u0440\u0435\u0434\u0435\u043B \u0437\u043D\u0430\u043A\u043E\u0432",fileTooLarge:"\u0424\u0430\u0439\u043B \xAB{name}\xBB \u0431\u043E\u043B\u044C\u0448\u0435 {size} \u041C\u0411",fileType:"\u0424\u0430\u0439\u043B \xAB{name}\xBB \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442. \u041C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C XLS, XLSX, CSV, TXT \u0438\u043B\u0438 MD",modeUnavailable:"\u0420\u0435\u0436\u0438\u043C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439",greeting:"\u0427\u0435\u043C \u043C\u043E\u0433\u0443 \u043F\u043E\u043C\u043E\u0447\u044C?",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026",configError:"\u0427\u0430\u0442 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",overloaded:"\u0421\u0435\u0440\u0432\u0438\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.",retry:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",dismiss:"\u0421\u043A\u0440\u044B\u0442\u044C",scrollDown:"\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437",settings:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438","settings.language":"\u042F\u0437\u044B\u043A","settings.theme":"\u0422\u0435\u043C\u0430","settings.themeLight":"\u0421\u0432\u0435\u0442\u043B\u0430\u044F","settings.themeDark":"\u0422\u0451\u043C\u043D\u0430\u044F","settings.themeAuto":"\u041A\u0430\u043A \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435","settings.model":"\u041C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","settings.modelHint":"\u0421 \u043D\u0435\u0451 \u043D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u043A\u0430\u0436\u0434\u044B\u0439 \u043D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442","settings.shortcuts":"\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438","shortcut.search":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0447\u0430\u0442\u0430\u043C","shortcut.newChat":"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442","shortcut.sidebar":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0441\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C","shortcut.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043E\u043A\u043D\u043E",search:"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0447\u0430\u0442\u0430\u043C",searchEmpty:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",collapseSidebar:"\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C",expandSidebar:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043D\u0430 \u0432\u0441\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",shrink:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",examples:"\u041F\u0440\u0438\u043C\u0435\u0440\u044B \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432","examples.whatCanDo":"\u0427\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C","group.pinned":"\u0417\u0430\u043A\u0440\u0435\u043F\u043B\u0451\u043D\u043D\u044B\u0435","group.today":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F","group.yesterday":"\u0412\u0447\u0435\u0440\u0430","group.week":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 7 \u0434\u043D\u0435\u0439","group.earlier":"\u0420\u0430\u043D\u0435\u0435","errors.thread_busy":"AI-Dana \u0435\u0449\u0451 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0432 \u044D\u0442\u043E\u043C \u0447\u0430\u0442\u0435. \u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u043E\u0442\u0432\u0435\u0442\u0430 \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0435\u0433\u043E.","errors.mode_overloaded":"AI-Dana \u0441\u0435\u0439\u0447\u0430\u0441 \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435","errors.daily_limit":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D","errors.rate_limit":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043E\u0434\u0440\u044F\u0434. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043C\u0438\u043D\u0443\u0442\u0443.","errors.ip_limit":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0438\u0437 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0441\u0435\u0433\u043E\u0434\u043D\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0432\u0442\u0440\u0430.","errors.concurrency_limit":"\u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430","errors.file_too_large":"\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439","errors.file_not_allowed":"\u042D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u0438\u043A\u0440\u0435\u043F\u0438\u0442\u044C. \u041F\u043E\u0434\u0445\u043E\u0434\u044F\u0442 XLS, XLSX, CSV, TXT \u0438 MD","errors.invalid_query":"\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043F\u0443\u0441\u0442\u043E\u0435 \u0438\u043B\u0438 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u043E\u0435","errors.invalid_parent":"\u042D\u0442\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C","errors.mode_not_found":"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0440\u0435\u0436\u0438\u043C.","errors.thread_not_found":"\u0427\u0430\u0442 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D","errors.interrupted":"\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0435\u0440\u0432\u0430\u043D","errors.code":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 (\u043A\u043E\u0434 {code}).","errors.generic":"\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.","errors.network":"\u041D\u0435\u0442 \u0441\u0432\u044F\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435.","errors.render":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u044D\u0442\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.","agent.thinking":"\u0414\u0443\u043C\u0430\u044E\u2026","agent.done":"\u0413\u043E\u0442\u043E\u0432\u043E","agent.stopped":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E","agent.stopping":"\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u044E\u2026","agent.interrupted":"\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0435\u0440\u0432\u0430\u043D","agent.answerStopped":"\u041E\u0442\u0432\u0435\u0442 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D. \u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0432\u043E\u043F\u0440\u043E\u0441 \u0437\u0430\u043D\u043E\u0432\u043E, \u0435\u0441\u043B\u0438 \u043D\u0443\u0436\u043D\u043E","agent.seconds":"{value} \u0441","agent.attempt":"\u043F\u043E\u043F\u044B\u0442\u043A\u0430 {count}","agent.showSteps":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0448\u0430\u0433\u0438","agent.hideSteps":"\u0421\u043A\u0440\u044B\u0442\u044C \u0448\u0430\u0433\u0438","steps.router":"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.context_builder":"\u0418\u0449\u0443 \u043D\u0443\u0436\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435","steps.sql_architect":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u0440\u0430\u0441\u0447\u0451\u0442","steps.executor":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","steps.responder":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u043E\u0442\u0432\u0435\u0442","steps.rag":"\u0418\u0449\u0443 \u0432 \u0441\u043F\u0440\u0430\u0432\u043E\u0447\u043D\u044B\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0430\u0445","steps.sql":"\u0418\u0449\u0443 \u0434\u0430\u043D\u043D\u044B\u0435 \u0432 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445","steps.document":"\u0427\u0438\u0442\u0430\u044E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","steps.understand":"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.search_law":"\u0418\u0449\u0443 \u0432 \u0437\u0430\u043A\u043E\u043D\u0430\u0445","steps.run_sql":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","steps.run_query":"\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0434\u0430\u043D\u043D\u044B\u0435","steps.data":"\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0434\u0430\u043D\u043D\u044B\u0435","steps.lookup_taxpayer":"\u0418\u0449\u0443 \u043D\u0430\u043B\u043E\u0433\u043E\u043F\u043B\u0430\u0442\u0435\u043B\u044C\u0449\u0438\u043A\u0430","steps.find_taxpayer":"\u0418\u0449\u0443 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u044E \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E","steps.ask_clarification":"\u0423\u0442\u043E\u0447\u043D\u044F\u044E \u0432\u043E\u043F\u0440\u043E\u0441","steps.answer":"\u0413\u043E\u0442\u043E\u0432\u043B\u044E \u043E\u0442\u0432\u0435\u0442","steps.think":"\u0410\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u0443\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435","steps.file":"\u0427\u0438\u0442\u0430\u044E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","waiting.router.1":"\u0412\u044B\u0431\u0438\u0440\u0430\u044E, \u0433\u0434\u0435 \u0438\u0441\u043A\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u2026","waiting.router.2":"\u0421\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E \u0432\u043E\u043F\u0440\u043E\u0441 \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u0438 \u043D\u043E\u0440\u043C\u0430\u043C\u0438\u2026","waiting.responder.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u0446\u0438\u0444\u0440\u044B \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438\u2026","waiting.responder.2":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E \u0441\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u043D\u043E\u0440\u043C\u044B\u2026","waiting.responder.3":"\u041F\u0440\u0438\u0432\u043E\u0436\u0443 \u043E\u0442\u0432\u0435\u0442 \u0432 \u043F\u043E\u0440\u044F\u0434\u043E\u043A\u2026","waiting.law.1":"\u0427\u0438\u0442\u0430\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u044C\u0438\u2026","waiting.law.2":"\u0421\u0432\u0435\u0440\u044F\u044E \u0440\u0435\u0434\u0430\u043A\u0446\u0438\u0438 \u043D\u043E\u0440\u043C\u2026","waiting.data.1":"\u0421\u0447\u0438\u0442\u0430\u044E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438\u2026","waiting.data.2":"\u0421\u0432\u0435\u0440\u044F\u044E \u0438\u0442\u043E\u0433\u0438\u2026","waiting.executor.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u0438\u0442\u043E\u0433\u0438\u2026","waiting.executor.2":"\u041F\u0440\u0438\u0432\u043E\u0436\u0443 \u0442\u0430\u0431\u043B\u0438\u0446\u0443 \u0432 \u043F\u043E\u0440\u044F\u0434\u043E\u043A\u2026","waiting.taxpayer.1":"\u0421\u043E\u0431\u0438\u0440\u0430\u044E \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443\u2026","waiting.taxpayer.2":"\u0421\u043C\u043E\u0442\u0440\u044E \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F \u043F\u043E \u0433\u043E\u0434\u0430\u043C\u2026","waiting.findCompany.1":"\u0421\u0432\u0435\u0440\u044F\u044E \u043F\u043E\u0445\u043E\u0436\u0438\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F\u2026","waiting.findCompany.2":"\u0412\u044B\u0431\u0438\u0440\u0430\u044E \u0441\u0430\u043C\u043E\u0435 \u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435\u2026","waiting.think.1":"\u0421\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441 \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u043C\u2026","waiting.think.2":"\u0420\u0435\u0448\u0430\u044E, \u0447\u0442\u043E \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0435\u0449\u0451\u2026","waiting.unknown.1":"\u0415\u0449\u0451 \u043D\u0435\u043C\u043D\u043E\u0433\u043E\u2026","waiting.unknown.2":"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u044E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u2026","steps.unknown":"\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u043D\u0430\u0434 \u043E\u0442\u0432\u0435\u0442\u043E\u043C",copy:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",copied:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E",download:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C",regenerate:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C \u0437\u0430\u043D\u043E\u0432\u043E",edit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",editLabel:"\u0422\u0435\u043A\u0441\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",cancel:"\u041E\u0442\u043C\u0435\u043D\u0430",actionsLabel:"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C",rate:"\u041E\u0446\u0435\u043D\u0438\u0442\u044C \u043D\u0430 {count} \u0438\u0437 3",ratingError:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043E\u0446\u0435\u043D\u043A\u0443",feedbackOpen:"\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0437\u044B\u0432",feedbackEdit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0442\u0437\u044B\u0432",feedbackLabel:"\u041E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u0442\u0432\u0435\u0442\u0435",feedbackPlaceholder:"\u0412\u0430\u0448 \u043E\u0442\u0437\u044B\u0432 \u043E\u0431 \u043E\u0442\u0432\u0435\u0442\u0435",save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C","branch.label":"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B","branch.prev":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442","branch.next":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442","branch.error":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442","limit.remaining":"\u0421\u0435\u0433\u043E\u0434\u043D\u044F \u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {count} \u0438\u0437 {limit} \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439","limit.exhausted":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D","limit.until":"\u041B\u0438\u043C\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D. \u041D\u043E\u0432\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u2014 \u043F\u043E\u0441\u043B\u0435 {time}.","blocks.data":"\u0414\u0430\u043D\u043D\u044B\u0435","blocks.hideData":"\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435","blocks.methodology":"\u041C\u0435\u0442\u043E\u0434\u043E\u043B\u043E\u0433\u0438\u044F","blocks.passport":"\u0427\u0442\u043E \u043F\u043E\u0441\u0447\u0438\u0442\u0430\u043D\u043E","blocks.indicator":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C","blocks.territory":"\u0422\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u044F","blocks.period":"\u041F\u0435\u0440\u0438\u043E\u0434","blocks.breakdown":"\u0420\u0430\u0437\u0440\u0435\u0437","blocks.breakdown.sex":"\u043F\u043E \u043F\u043E\u043B\u0443","blocks.breakdown.age":"\u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0443","blocks.breakdown.urban_rural":"\u0433\u043E\u0440\u043E\u0434 \u0438 \u0441\u0435\u043B\u043E","blocks.breakdown.activity":"\u043F\u043E \u0432\u0438\u0434\u0430\u043C \u0434\u0435\u044F\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438","blocks.breakdown.item":"\u043F\u043E \u0442\u043E\u0432\u0430\u0440\u0430\u043C","blocks.substituted":"\u043F\u043E\u0434\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430","blocks.alternatives":"\u041F\u043E\u0445\u043E\u0436\u0438\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","blocks.table":"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0434\u0430\u043D\u043D\u044B\u0445","blocks.tableSearch":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0442\u0430\u0431\u043B\u0438\u0446\u0435\u2026","blocks.tableEmpty":"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445","blocks.page":"{a} \u0438\u0437 {b}","blocks.prevPage":"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430","blocks.nextPage":"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430","blocks.truncated":"\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043F\u0435\u0440\u0432\u044B\u0435 {n} \u0441\u0442\u0440\u043E\u043A \u2014 \u043F\u043E\u043B\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0432 Excel","blocks.catalogMore":"\u2026\u0438 \u0435\u0449\u0451 {count} \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435","blocks.catalogExamples":"\u041C\u043E\u0436\u043D\u043E \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u044C","blocks.options":"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u043E\u0442\u0432\u0435\u0442\u0430","blocks.default":"\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","blocks.freeTextHint":"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u043B\u0438 \u043D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043E\u0439 \u0432 \u043F\u043E\u043B\u0435 \u043D\u0438\u0436\u0435","blocks.findOption":"\u041D\u0430\u0439\u0442\u0438 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435\u2026","blocks.chosen":"\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {label}","blocks.continue":"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C","blocks.cancelPlan":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C","blocks.expired":"\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043B\u043E","blocks.askAgain":"\u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441 \u0437\u0430\u043D\u043E\u0432\u043E","blocks.dashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","blocks.hideDashboard":"\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u0448\u0431\u043E\u0440\u0434","chart.kinds":"\u0412\u0438\u0434 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u044B","chart.kind.bar":"\u041F\u043E\u043B\u043E\u0441\u044B","chart.kind.column":"\u0421\u0442\u043E\u043B\u0431\u0446\u044B","chart.kind.pie":"\u041A\u0440\u0443\u0433\u043E\u0432\u0430\u044F","chart.kind.line":"\u041B\u0438\u043D\u0438\u0438","chart.kind.area":"\u041E\u0431\u043B\u0430\u0441\u0442\u0438","chart.national":"\u0420\u041A {value}","chart.top":"\u0422\u043E\u043F-{n} \u0438\u0437 {total} \u2014 \u0432\u0441\u0451 \u0432 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435","chart.label":"{title}, {period}","files.list":"\u0424\u0430\u0439\u043B\u044B","files.report":"\u0413\u043E\u0442\u043E\u0432\u044B\u0439 \u043E\u0442\u0447\u0451\u0442","files.document":"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","files.presentation":"\u041F\u0440\u0435\u0437\u0435\u043D\u0442\u0430\u0446\u0438\u044F","files.excel":"\u0414\u0430\u043D\u043D\u044B\u0435 Excel","files.csv":"\u0414\u0430\u043D\u043D\u044B\u0435 CSV","files.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u0430\u0447\u0430\u0442\u044C \u0444\u0430\u0439\u043B","report.create":"\u0421\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0447\u0451\u0442","report.pending":"\u0424\u0430\u0439\u043B\u044B \u043E\u0442\u0447\u0451\u0442\u0430 \u0444\u043E\u0440\u043C\u0438\u0440\u0443\u044E\u0442\u0441\u044F\u2026","report.failed":"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0444\u043E\u0440\u043C\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B\u044B \u043E\u0442\u0447\u0451\u0442\u0430","report.retry":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","report.expired":"\u0421\u0440\u043E\u043A \u0444\u0430\u0439\u043B\u043E\u0432 \u0438\u0441\u0442\u0451\u043A","dashboard.eyebrow":"\u0410\u043D\u0430\u043B\u0438\u0442\u0438\u043A\u0430","dashboard.label":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.sections":"\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430","dashboard.regions":"\u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432: {n}","dashboard.items":"\u043F\u043E\u0437\u0438\u0446\u0438\u0439: {n}","dashboard.openSource":"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0435","dashboard.methodology":"\u041C\u0435\u0442\u043E\u0434\u043E\u043B\u043E\u0433\u0438\u044F","dashboard.fullscreen":"\u041D\u0430 \u0432\u0435\u0441\u044C \u044D\u043A\u0440\u0430\u043D","dashboard.collapse":"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C","dashboard.close":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","dashboard.chatTab":"\u0427\u0430\u0442","dashboard.dashboardTab":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.view":"\u0427\u0430\u0442 \u0438\u043B\u0438 \u0434\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.region":"\u0420\u0435\u0433\u0438\u043E\u043D","dashboard.allRegions":"\u0412\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B","dashboard.period":"\u041F\u0435\u0440\u0438\u043E\u0434","dashboard.mode.label":"\u0420\u0435\u0436\u0438\u043C","dashboard.mode.value":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435","dashboard.mode.deviation":"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u0435","dashboard.mode.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435","dashboard.base.label":"\u0411\u0430\u0437\u0430 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F","dashboard.base.median":"\u043E\u0442 \u043C\u0435\u0434\u0438\u0430\u043D\u044B","dashboard.base.national":"\u043E\u0442 \u0420\u041A","dashboard.noPrevious":"\u041D\u0435\u0442 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043F\u0435\u0440\u0438\u043E\u0434\u0430","dashboard.noNational":"\u041D\u0435\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435 \u0437\u0430 \u044D\u0442\u043E\u0442 \u043F\u0435\u0440\u0438\u043E\u0434","dashboard.fewRegions":"\u041D\u0443\u0436\u043D\u043E \u0445\u043E\u0442\u044F \u0431\u044B \u0434\u0432\u0430 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F","dashboard.ranking":"\u0420\u0435\u0439\u0442\u0438\u043D\u0433","dashboard.trend":"\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430","dashboard.findings":"\u0412\u044B\u0432\u043E\u0434\u044B","dashboard.data":"\u0414\u0430\u043D\u043D\u044B\u0435","dashboard.kpis":"\u041A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","dashboard.table.rank":"\u2116","dashboard.table.position":"\u041F\u043E\u0437\u0438\u0446\u0438\u044F","dashboard.table.value":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435, {unit}","dashboard.table.share":"\u0414\u043E\u043B\u044F, %","dashboard.table.deviation":"\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u0435, {unit}","dashboard.table.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435, {unit}","dashboard.source":"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: {name}","dashboard.points":"\u043F.\u043F.","dashboard.kpi.national":"\u0420\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","dashboard.kpi.max":"\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C","dashboard.kpi.min":"\u041C\u0438\u043D\u0438\u043C\u0443\u043C","dashboard.kpi.median":"\u041C\u0435\u0434\u0438\u0430\u043D\u0430 \u043F\u043E \u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043C","dashboard.kpi.spread":"\u0420\u0430\u0437\u043C\u0430\u0445","dashboard.kpi.gap":"\u0420\u0430\u0437\u0440\u044B\u0432","dashboard.kpi.last":"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435","dashboard.kpi.first":"\u041D\u0430\u0447\u0430\u043B\u043E \u043F\u0435\u0440\u0438\u043E\u0434\u0430","dashboard.kpi.change":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435","dashboard.kpi.place":"\u041C\u0435\u0441\u0442\u043E","dashboard.kpi.placeOf":"{n} \u0438\u0437 {m}","dashboard.kpi.deviation":"\u041E\u0442\u043A\u043B. \u043E\u0442 \u043C\u0435\u0434\u0438\u0430\u043D\u044B","dashboard.kpi.previous":"\u041A \u043F\u0440\u043E\u0448\u043B\u043E\u043C\u0443 \u043F\u0435\u0440\u0438\u043E\u0434\u0443","steps.counter":"{done} \u0438\u0437 {total}","feedback.reason.wrong_number":"\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0446\u0438\u0444\u0440\u0430","feedback.reason.wrong_indicator":"\u041D\u0435 \u0442\u043E\u0442 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C","feedback.reason.wrong_territory":"\u041D\u0435 \u0442\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u044F","feedback.reason.wrong_period":"\u041D\u0435 \u0442\u043E\u0442 \u043F\u0435\u0440\u0438\u043E\u0434","feedback.reason.not_answered":"\u041D\u0435\u0442 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0430 \u0432\u043E\u043F\u0440\u043E\u0441","feedback.reason.language":"\u042F\u0437\u044B\u043A \u043E\u0442\u0432\u0435\u0442\u0430","feedback.reason.slow":"\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043E\u043B\u0433\u043E","feedback.reason.other":"\u0414\u0440\u0443\u0433\u043E\u0435","intro.title":"\u041F\u0435\u0440\u0435\u0434 \u043D\u0430\u0447\u0430\u043B\u043E\u043C","intro.continue":"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C",source:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: {name}","shell.siteBlocked":"\u0427\u0430\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043D\u0430 \u044D\u0442\u043E\u043C \u0441\u0430\u0439\u0442\u0435","shell.siteBlockedHint":"\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446 \u0441\u0430\u0439\u0442\u0430 \u0435\u0449\u0451 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u043B AI-Dana \u0438\u043B\u0438 \u0434\u043E\u0441\u0442\u0443\u043F \u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D.","modes.none":"\u0420\u0435\u0436\u0438\u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.","attachment.sending":"\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F","agent.steps":"\u0428\u0430\u0433\u0438","agent.unfinished":"\u043D\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D",rateGroup:"\u041E\u0446\u0435\u043D\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430","blocks.catalogTitle":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433: {topic}","blocks.catalogSections":"\u0420\u0430\u0437\u0434\u0435\u043B\u044B","blocks.catalogIndicators":"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u0438","blocks.catalogSendHint":"\u0412\u043E\u043F\u0440\u043E\u0441 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0441\u044F \u0441\u0440\u0430\u0437\u0443 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430","blocks.clarification":"\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435","files.expired":"\u0421\u0440\u043E\u043A \u0444\u0430\u0439\u043B\u0430 \u0438\u0441\u0442\u0451\u043A","files.notFound":"\u0424\u0430\u0439\u043B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D","files.unavailable":"\u0424\u0430\u0439\u043B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D"},I0={title:"AI-Dana",open:"\u0427\u0430\u0442\u0442\u044B \u0430\u0448\u0443",unreadAnswers:"\u0436\u0430\u04A3\u0430 \u0436\u0430\u0443\u0430\u043F\u0442\u0430\u0440: {count}",ask:"\u0421\u04B1\u0440\u0430\u049B \u049B\u043E\u044E",close:"\u0416\u0430\u0431\u0443",history:"\u0422\u0430\u0440\u0438\u0445",closeHistory:"\u0422\u0430\u0440\u0438\u0445\u0442\u044B \u0436\u0430\u0441\u044B\u0440\u0443",newChat:"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442",untitled:"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442",historyEmpty:"\u04D8\u0437\u0456\u0440\u0433\u0435 \u0447\u0430\u0442\u0442\u0430\u0440 \u0436\u043E\u049B",historyError:"\u0422\u0430\u0440\u0438\u0445\u0442\u044B \u0436\u04AF\u043A\u0442\u0435\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",delete:"\u0416\u043E\u044E",deleteConfirm:"\u0427\u0430\u0442\u0442\u044B \u0436\u043E\u044E \u043A\u0435\u0440\u0435\u043A \u043F\u0435?",deleteYes:"\u0416\u043E\u044E",deleteNo:"\u0411\u0430\u0441 \u0442\u0430\u0440\u0442\u0443",deleteError:"\u0427\u0430\u0442\u0442\u044B \u0436\u043E\u044E \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",modeLabel:"\u0416\u0430\u0443\u0430\u043F \u0440\u0435\u0436\u0438\u043C\u0456","health.idle":"\u0411\u043E\u0441","health.busy":"\u0411\u043E\u0441 \u0435\u043C\u0435\u0441","health.unavailable":"\u049A\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437",placeholder:"\u0421\u04B1\u0440\u0430\u049B\u0442\u0430\u0440\u044B\u04A3\u044B\u0437\u0434\u044B \u049B\u043E\u0439\u044B\u04A3\u044B\u0437",inputLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430",send:"\u0416\u0456\u0431\u0435\u0440\u0443",stop:"\u0422\u043E\u049B\u0442\u0430\u0442\u0443",attach:"\u0424\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443",attachOne:"\u0422\u0435\u043A \u0431\u0456\u0440 \u0444\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B",attachHint:"\u0411\u0456\u0440 \u0444\u0430\u0439\u043B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B: XLS, XLSX, CSV, TXT \u043D\u0435\u043C\u0435\u0441\u0435 MD, {size} \u041C\u0411-\u049B\u0430 \u0434\u0435\u0439\u0456\u043D",disclaimer:"\u0416\u0418 \u049B\u0430\u0442\u0435\u043B\u0435\u0441\u0443\u0456 \u043C\u04AF\u043C\u043A\u0456\u043D \u2014 \u043C\u0430\u04A3\u044B\u0437\u0434\u044B \u0430\u049B\u043F\u0430\u0440\u0430\u0442\u0442\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u04A3\u0456\u0437",removeFile:"\u0424\u0430\u0439\u043B\u0434\u044B \u0436\u043E\u044E",counter:"{count} / {max}",counterLimit:"\u0422\u0430\u04A3\u0431\u0430 \u0448\u0435\u0433\u0456\u043D\u0435 \u0436\u0435\u0442\u0442\u0456\u04A3\u0456\u0437",counterOver:"\u0422\u0430\u04A3\u0431\u0430 \u0448\u0435\u0433\u0456\u043D\u0435\u043D \u0430\u0441\u044B\u043F \u043A\u0435\u0442\u0442\u0456\u04A3\u0456\u0437",fileTooLarge:"\xAB{name}\xBB \u0444\u0430\u0439\u043B\u044B {size} \u041C\u0411-\u0442\u0430\u043D \u04AF\u043B\u043A\u0435\u043D",fileType:"\xAB{name}\xBB \u0444\u0430\u0439\u043B\u044B \u0436\u0430\u0440\u0430\u043C\u0430\u0439\u0434\u044B. XLS, XLSX, CSV, TXT \u043D\u0435\u043C\u0435\u0441\u0435 MD \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B",modeUnavailable:"\u0420\u0435\u0436\u0438\u043C \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437, \u0431\u0430\u0441\u049B\u0430\u0441\u044B\u043D \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437",greeting:"\u049A\u0430\u043B\u0430\u0439 \u043A\u04E9\u043C\u0435\u043A\u0442\u0435\u0441\u0435 \u0430\u043B\u0430\u043C\u044B\u043D?",loading:"\u0416\u04AF\u043A\u0442\u0435\u043B\u0443\u0434\u0435\u2026",configError:"\u0427\u0430\u0442 \u0443\u0430\u049B\u044B\u0442\u0448\u0430 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437",overloaded:"\u049A\u044B\u0437\u043C\u0435\u0442 \u049B\u0430\u0437\u0456\u0440 \u0448\u0430\u043C\u0430\u0434\u0430\u043D \u0442\u044B\u0441 \u0436\u04AF\u043A\u0442\u0435\u043B\u0433\u0435\u043D. \u041A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.",retry:"\u049A\u0430\u0439\u0442\u0430\u043B\u0430\u0443",dismiss:"\u0416\u0430\u0441\u044B\u0440\u0443",scrollDown:"\u0422\u04E9\u043C\u0435\u043D\u0433\u0435 \u0430\u0439\u043D\u0430\u043B\u0434\u044B\u0440\u0443",settings:"\u0411\u0430\u043F\u0442\u0430\u0443\u043B\u0430\u0440","settings.language":"\u0422\u0456\u043B","settings.theme":"\u0422\u0430\u049B\u044B\u0440\u044B\u043F","settings.themeLight":"\u0410\u0448\u044B\u049B","settings.themeDark":"\u049A\u0430\u0440\u0430\u04A3\u0493\u044B","settings.themeAuto":"\u0416\u04AF\u0439\u0435\u0434\u0435\u0433\u0456\u0434\u0435\u0439","settings.model":"\u04D8\u0434\u0435\u043F\u043A\u0456 \u043C\u043E\u0434\u0435\u043B\u044C","settings.modelHint":"\u04D8\u0440 \u0436\u0430\u04A3\u0430 \u0447\u0430\u0442 \u043E\u0441\u044B\u0434\u0430\u043D \u0431\u0430\u0441\u0442\u0430\u043B\u0430\u0434\u044B","settings.shortcuts":"\u0416\u044B\u043B\u0434\u0430\u043C \u043F\u0435\u0440\u043D\u0435\u043B\u0435\u0440","shortcut.search":"\u0427\u0430\u0442\u0442\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443","shortcut.newChat":"\u0416\u0430\u04A3\u0430 \u0447\u0430\u0442","shortcut.sidebar":"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u0443 \u043D\u0435 \u0436\u0430\u0441\u044B\u0440\u0443","shortcut.close":"\u0422\u0435\u0440\u0435\u0437\u0435\u043D\u0456 \u0436\u0430\u0431\u0443",search:"\u0427\u0430\u0442\u0442\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443",searchEmpty:"\u0415\u0448\u0442\u0435\u04A3\u0435 \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B",collapseSidebar:"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u0436\u0430\u0441\u044B\u0440\u0443",expandSidebar:"\u041F\u0430\u043D\u0435\u043B\u044C\u0434\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u0443",expand:"\u0411\u04AF\u043A\u0456\u043B \u0431\u0435\u0442\u043A\u0435 \u0436\u0430\u044E",shrink:"\u041A\u0456\u0448\u0456\u0440\u0435\u0439\u0442\u0443",examples:"\u0421\u04B1\u0440\u0430\u0443 \u043C\u044B\u0441\u0430\u043B\u0434\u0430\u0440\u044B","examples.whatCanDo":"\u041D\u0435 \u0456\u0441\u0442\u0435\u0439 \u0430\u043B\u0430\u0441\u044B\u0437","group.pinned":"\u0411\u0435\u043A\u0456\u0442\u0456\u043B\u0433\u0435\u043D\u0434\u0435\u0440","group.today":"\u0411\u04AF\u0433\u0456\u043D","group.yesterday":"\u041A\u0435\u0448\u0435","group.week":"\u0421\u043E\u04A3\u0493\u044B 7 \u043A\u04AF\u043D","group.earlier":"\u0411\u04B1\u0440\u044B\u043D\u044B\u0440\u0430\u049B","errors.thread_busy":"AI-Dana \u0431\u04B1\u043B \u0447\u0430\u0442\u0442\u0430 \u04D9\u043B\u0456 \u0436\u0430\u0443\u0430\u043F \u0431\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440. \u0416\u0430\u0443\u0430\u043F\u0442\u044B \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u04A3\u044B\u0437.","errors.mode_overloaded":"AI-Dana \u049B\u0430\u0437\u0456\u0440 \u0448\u0430\u043C\u0430\u0434\u0430\u043D \u0442\u044B\u0441 \u0436\u04AF\u043A\u0442\u0435\u043B\u0433\u0435\u043D, \u0441\u04D9\u043B \u043A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437","errors.daily_limit":"\u0411\u04AF\u0433\u0456\u043D\u0433\u0456 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B","errors.rate_limit":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440 \u0442\u044B\u043C \u0436\u0438\u0456 \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0434\u0456. \u0411\u0456\u0440 \u043C\u0438\u043D\u0443\u0442 \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437.","errors.ip_limit":"\u0411\u04AF\u0433\u0456\u043D \u0441\u0456\u0437\u0434\u0456\u04A3 \u0436\u0435\u043B\u0456\u04A3\u0456\u0437\u0434\u0435\u043D \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440 \u0442\u044B\u043C \u043A\u04E9\u043F \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0434\u0456. \u0415\u0440\u0442\u0435\u04A3 \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.","errors.concurrency_limit":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u0436\u0430\u0443\u0430\u043F\u0442\u044B\u04A3 \u0430\u044F\u049B\u0442\u0430\u043B\u0443\u044B\u043D \u043A\u04AF\u0442\u0456\u04A3\u0456\u0437","errors.file_too_large":"\u0424\u0430\u0439\u043B \u0442\u044B\u043C \u04AF\u043B\u043A\u0435\u043D","errors.file_not_allowed":"\u0411\u04B1\u043B \u0444\u0430\u0439\u043B\u0434\u044B \u0442\u0456\u0440\u043A\u0435\u0443\u0433\u0435 \u0431\u043E\u043B\u043C\u0430\u0439\u0434\u044B. XLS, XLSX, CSV, TXT \u0436\u04D9\u043D\u0435 MD \u0436\u0430\u0440\u0430\u0439\u0434\u044B","errors.invalid_query":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u0431\u043E\u0441 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u044B\u043C \u04B1\u0437\u044B\u043D","errors.invalid_parent":"\u0411\u04B1\u043B \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u0435\u043D\u0434\u0456 \u04E9\u0437\u0433\u0435\u0440\u0442\u0443\u0433\u0435 \u0431\u043E\u043B\u043C\u0430\u0439\u0434\u044B","errors.mode_not_found":"\u0422\u0430\u04A3\u0434\u0430\u043B\u0493\u0430\u043D \u0440\u0435\u0436\u0438\u043C \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437. \u0411\u0430\u0441\u049B\u0430 \u0440\u0435\u0436\u0438\u043C\u0434\u0456 \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437.","errors.thread_not_found":"\u0427\u0430\u0442 \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B","errors.interrupted":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0437\u0456\u043B\u0434\u0456","errors.code":"\u0416\u0430\u0443\u0430\u043F \u0430\u043B\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B (\u043A\u043E\u0434 {code}).","errors.generic":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u0436\u0456\u0431\u0435\u0440\u0443 \u043A\u0435\u0437\u0456\u043D\u0434\u0435 \u049B\u0430\u0442\u0435 \u043E\u0440\u044B\u043D \u0430\u043B\u0434\u044B.","errors.network":"\u0421\u0435\u0440\u0432\u0435\u0440\u043C\u0435\u043D \u0431\u0430\u0439\u043B\u0430\u043D\u044B\u0441 \u0436\u043E\u049B. \u049A\u043E\u0441\u044B\u043B\u044B\u043C\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u04A3\u0456\u0437.","errors.render":"\u0411\u04B1\u043B \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u043A\u04E9\u0440\u0441\u0435\u0442\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B.","agent.thinking":"\u041E\u0439\u043B\u0430\u043D\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","agent.done":"\u0414\u0430\u0439\u044B\u043D","agent.stopped":"\u0422\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0434\u044B","agent.stopping":"\u0422\u043E\u049B\u0442\u0430\u0442\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","agent.interrupted":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0437\u0456\u043B\u0434\u0456","agent.answerStopped":"\u0416\u0430\u0443\u0430\u043F \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0434\u044B. \u049A\u0430\u0436\u0435\u0442 \u0431\u043E\u043B\u0441\u0430, \u0441\u04B1\u0440\u0430\u049B\u0442\u044B \u049B\u0430\u0439\u0442\u0430 \u049B\u043E\u0439\u044B\u04A3\u044B\u0437","agent.seconds":"{value} \u0441","agent.attempt":"{count}-\u04D9\u0440\u0435\u043A\u0435\u0442","agent.showSteps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440\u0434\u044B \u043A\u04E9\u0440\u0441\u0435\u0442\u0443","agent.hideSteps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440\u0434\u044B \u0436\u0430\u0441\u044B\u0440\u0443","steps.router":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.context_builder":"\u049A\u0430\u0436\u0435\u0442 \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.sql_architect":"\u0415\u0441\u0435\u043F\u0442\u0435\u0443\u0434\u0456 \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.executor":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.responder":"\u0416\u0430\u0443\u0430\u043F \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.rag":"\u0410\u043D\u044B\u049B\u0442\u0430\u043C\u0430\u043B\u044B\u049B \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u0434\u0430\u0440\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.sql":"\u0410\u0448\u044B\u049B \u0434\u0435\u0440\u0435\u043A\u043A\u04E9\u0437\u0434\u0435\u0440\u0434\u0435\u043D \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.document":"\u049A\u04B1\u0436\u0430\u0442\u0442\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.understand":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.search_law":"\u0417\u0430\u04A3\u043D\u0430\u043C\u0430\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.run_sql":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.run_query":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0430\u043B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0430\u043B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.lookup_taxpayer":"\u0421\u0430\u043B\u044B\u049B \u0442\u04E9\u043B\u0435\u0443\u0448\u0456\u043D\u0456 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.find_taxpayer":"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F\u043D\u044B \u0430\u0442\u0430\u0443\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u0456\u0437\u0434\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.ask_clarification":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u043D\u0430\u049B\u0442\u044B\u043B\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.answer":"\u0416\u0430\u0443\u0430\u043F \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.think":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D\u0434\u044B \u0442\u0430\u043B\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","steps.file":"\u049A\u04B1\u0436\u0430\u0442\u0442\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D","waiting.router.1":"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u049B\u0430\u0439\u0434\u0430\u043D \u0456\u0437\u0434\u0435\u0443 \u043A\u0435\u0440\u0435\u0433\u0456\u043D \u0442\u0430\u04A3\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.router.2":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u043C\u0435\u043D \u0436\u04D9\u043D\u0435 \u043D\u043E\u0440\u043C\u0430\u043B\u0430\u0440\u043C\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.1":"\u0421\u0430\u043D\u0434\u0430\u0440\u0434\u044B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u043C\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.2":"\u041D\u043E\u0440\u043C\u0430\u043B\u0430\u0440\u0493\u0430 \u0441\u0456\u043B\u0442\u0435\u043C\u0435\u043B\u0435\u0440\u0434\u0456 \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.responder.3":"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u0440\u0435\u0442\u043A\u0435 \u043A\u0435\u043B\u0442\u0456\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.law.1":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D \u0431\u0430\u043F\u0442\u0430\u0440\u0434\u044B \u043E\u049B\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.law.2":"\u041D\u043E\u0440\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0446\u0438\u044F\u043B\u0430\u0440\u044B\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.data.1":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440\u0434\u0456 \u0435\u0441\u0435\u043F\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.data.2":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.executor.1":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440\u0434\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.executor.2":"\u041A\u0435\u0441\u0442\u0435\u043D\u0456 \u0440\u0435\u0442\u043A\u0435 \u043A\u0435\u043B\u0442\u0456\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.taxpayer.1":"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430\u043D\u044B \u0436\u0438\u043D\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.taxpayer.2":"\u0416\u044B\u043B\u0434\u0430\u0440 \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u0442\u04AF\u0441\u0456\u043C\u0434\u0435\u0440\u0434\u0456 \u049B\u0430\u0440\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.findCompany.1":"\u04B0\u049B\u0441\u0430\u0441 \u0430\u0442\u0430\u0443\u043B\u0430\u0440\u0434\u044B \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.findCompany.2":"\u0415\u04A3 \u0434\u04D9\u043B \u0441\u04D9\u0439\u043A\u0435\u0441\u0442\u0456\u043A\u0442\u0456 \u0442\u0430\u04A3\u0434\u0430\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.think.1":"\u0422\u0430\u0431\u044B\u043B\u0493\u0430\u043D\u0434\u044B \u0441\u04B1\u0440\u0430\u049B\u043F\u0435\u043D \u0441\u0430\u043B\u044B\u0441\u0442\u044B\u0440\u044B\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.think.2":"\u0422\u0430\u0493\u044B \u043D\u0435 \u049B\u0430\u0440\u0430\u0443 \u043A\u0435\u0440\u0435\u0433\u0456\u043D \u0448\u0435\u0448\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","waiting.unknown.1":"\u0422\u0430\u0493\u044B \u0430\u0437 \u0493\u0430\u043D\u0430\u2026","waiting.unknown.2":"\u041D\u04D9\u0442\u0438\u0436\u0435\u043D\u0456 \u0442\u0435\u043A\u0441\u0435\u0440\u0456\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D\u2026","steps.unknown":"\u0416\u0430\u0443\u0430\u043F \u04AF\u0441\u0442\u0456\u043D\u0434\u0435 \u0436\u04B1\u043C\u044B\u0441 \u0456\u0441\u0442\u0435\u043F \u0436\u0430\u0442\u044B\u0440\u043C\u044B\u043D",copy:"\u041A\u04E9\u0448\u0456\u0440\u0443",copied:"\u041A\u04E9\u0448\u0456\u0440\u0456\u043B\u0434\u0456",download:"\u0416\u04AF\u043A\u0442\u0435\u0443",regenerate:"\u049A\u0430\u0439\u0442\u0430 \u0436\u0430\u0443\u0430\u043F \u0431\u0435\u0440\u0443",edit:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B \u04E9\u0437\u0433\u0435\u0440\u0442\u0443",editLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043C\u04D9\u0442\u0456\u043D\u0456",cancel:"\u0411\u043E\u043B\u0434\u044B\u0440\u043C\u0430\u0443",actionsLabel:"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u04D9\u0440\u0435\u043A\u0435\u0442\u0442\u0435\u0440\u0456",rate:"3-\u0442\u0435\u043D {count} \u0434\u0435\u043F \u0431\u0430\u0493\u0430\u043B\u0430\u0443",ratingError:"\u0411\u0430\u0493\u0430\u043D\u044B \u0441\u0430\u049B\u0442\u0430\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B",feedbackOpen:"\u041F\u0456\u043A\u0456\u0440 \u049B\u0430\u043B\u0434\u044B\u0440\u0443",feedbackEdit:"\u041F\u0456\u043A\u0456\u0440\u0434\u0456 \u04E9\u0437\u0433\u0435\u0440\u0442\u0443",feedbackLabel:"\u0416\u0430\u0443\u0430\u043F \u0442\u0443\u0440\u0430\u043B\u044B \u043F\u0456\u043A\u0456\u0440",feedbackPlaceholder:"\u0416\u0430\u0443\u0430\u043F \u0442\u0443\u0440\u0430\u043B\u044B \u043F\u0456\u043A\u0456\u0440\u0456\u04A3\u0456\u0437",save:"\u0421\u0430\u049B\u0442\u0430\u0443","branch.label":"\u041D\u04B1\u0441\u049B\u0430\u043B\u0430\u0440","branch.prev":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043D\u04B1\u0441\u049B\u0430","branch.next":"\u041A\u0435\u043B\u0435\u0441\u0456 \u043D\u04B1\u0441\u049B\u0430","branch.error":"\u041D\u04B1\u0441\u049B\u0430\u043D\u044B \u0430\u0443\u044B\u0441\u0442\u044B\u0440\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","limit.remaining":"\u0411\u04AF\u0433\u0456\u043D {limit} \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043D\u044B\u04A3 {count} \u049B\u0430\u043B\u0434\u044B","limit.exhausted":"\u0411\u04AF\u0433\u0456\u043D\u0433\u0456 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B","limit.until":"\u0425\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430 \u043B\u0438\u043C\u0438\u0442\u0456 \u0442\u0430\u0443\u0441\u044B\u043B\u0434\u044B. \u0416\u0430\u04A3\u0430 \u0445\u0430\u0431\u0430\u0440\u043B\u0430\u043C\u0430\u043B\u0430\u0440\u0434\u044B {time} \u043A\u0435\u0439\u0456\u043D \u0436\u0456\u0431\u0435\u0440\u0443\u0433\u0435 \u0431\u043E\u043B\u0430\u0434\u044B.","blocks.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440","blocks.hideData":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0434\u0456 \u0436\u0430\u0441\u044B\u0440\u0443","blocks.methodology":"\u04D8\u0434\u0456\u0441\u0442\u0435\u043C\u0435","blocks.passport":"\u041D\u0435 \u0435\u0441\u0435\u043F\u0442\u0435\u043B\u0434\u0456","blocks.indicator":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448","blocks.territory":"\u0410\u0443\u043C\u0430\u049B","blocks.period":"\u041A\u0435\u0437\u0435\u04A3","blocks.breakdown":"\u049A\u0438\u043C\u0430","blocks.breakdown.sex":"\u0436\u044B\u043D\u044B\u0441\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.age":"\u0436\u0430\u0441\u044B \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.urban_rural":"\u049B\u0430\u043B\u0430 \u0436\u04D9\u043D\u0435 \u0430\u0443\u044B\u043B","blocks.breakdown.activity":"\u049B\u044B\u0437\u043C\u0435\u0442 \u0442\u04AF\u0440\u043B\u0435\u0440\u0456 \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.breakdown.item":"\u0442\u0430\u0443\u0430\u0440\u043B\u0430\u0440 \u0431\u043E\u0439\u044B\u043D\u0448\u0430","blocks.substituted":"\u0430\u043B\u043C\u0430\u0441\u0442\u044B\u0440\u044B\u043B\u0434\u044B","blocks.alternatives":"\u04B0\u049B\u0441\u0430\u0441 \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","blocks.table":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u043A\u0435\u0441\u0442\u0435\u0441\u0456","blocks.tableSearch":"\u041A\u0435\u0441\u0442\u0435\u0434\u0435\u043D \u0456\u0437\u0434\u0435\u0443\u2026","blocks.tableEmpty":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u0436\u043E\u049B","blocks.page":"{b} \u0456\u0448\u0456\u043D\u0435\u043D {a}","blocks.prevPage":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u0431\u0435\u0442","blocks.nextPage":"\u041A\u0435\u043B\u0435\u0441\u0456 \u0431\u0435\u0442","blocks.truncated":"\u0410\u043B\u0493\u0430\u0448\u049B\u044B {n} \u0436\u043E\u043B \u043A\u04E9\u0440\u0441\u0435\u0442\u0456\u043B\u0434\u0456 \u2014 \u0442\u043E\u043B\u044B\u049B \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440 Excel-\u0434\u0435","blocks.catalogMore":"\u2026\u0436\u04D9\u043D\u0435 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0442\u0430 \u0442\u0430\u0493\u044B {count}","blocks.catalogExamples":"\u0421\u04B1\u0440\u0430\u0443\u0493\u0430 \u0431\u043E\u043B\u0430\u0434\u044B","blocks.options":"\u0416\u0430\u0443\u0430\u043F \u043D\u04B1\u0441\u049B\u0430\u043B\u0430\u0440\u044B","blocks.default":"\u04D9\u0434\u0435\u043F\u043A\u0456","blocks.freeTextHint":"\u041D\u04B1\u0441\u049B\u0430\u043D\u044B \u0442\u0430\u04A3\u0434\u0430\u04A3\u044B\u0437 \u043D\u0435\u043C\u0435\u0441\u0435 \u0442\u04E9\u043C\u0435\u043D\u0434\u0435\u0433\u0456 \u04E9\u0440\u0456\u0441\u043A\u0435 \u04E9\u0437\u0456\u04A3\u0456\u0437\u0434\u0456\u043A\u0456\u043D \u0436\u0430\u0437\u044B\u04A3\u044B\u0437","blocks.findOption":"\u0422\u0456\u0437\u0456\u043C\u043D\u0435\u043D \u0456\u0437\u0434\u0435\u0443\u2026","blocks.chosen":"\u0422\u0430\u04A3\u0434\u0430\u043B\u0434\u044B: {label}","blocks.continue":"\u0416\u0430\u043B\u0493\u0430\u0441\u0442\u044B\u0440\u0443","blocks.cancelPlan":"\u0411\u0430\u0441 \u0442\u0430\u0440\u0442\u0443","blocks.expired":"\u041D\u0430\u049B\u0442\u044B\u043B\u0430\u0443\u0434\u044B\u04A3 \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","blocks.askAgain":"\u0421\u04B1\u0440\u0430\u049B\u0442\u044B \u049B\u0430\u0439\u0442\u0430 \u049B\u043E\u044E","blocks.dashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u044B \u0430\u0448\u0443","blocks.hideDashboard":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u044B \u0436\u0430\u0441\u044B\u0440\u0443","chart.kinds":"\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430 \u0442\u04AF\u0440\u0456","chart.kind.bar":"\u0416\u043E\u043B\u0430\u049B\u0442\u0430\u0440","chart.kind.column":"\u0411\u0430\u0493\u0430\u043D\u0434\u0430\u0440","chart.kind.pie":"\u0414\u04E9\u04A3\u0433\u0435\u043B\u0435\u043A","chart.kind.line":"\u0421\u044B\u0437\u044B\u049B\u0442\u0430\u0440","chart.kind.area":"\u0410\u0439\u043C\u0430\u049B\u0442\u0430\u0440","chart.national":"\u049A\u0420 {value}","chart.top":"\u04AE\u0437\u0434\u0456\u043A {n}, \u0431\u0430\u0440\u043B\u044B\u0493\u044B {total} \u2014 \u0442\u043E\u043B\u044B\u0493\u044B \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0442\u0430","chart.label":"{title}, {period}","files.list":"\u0424\u0430\u0439\u043B\u0434\u0430\u0440","files.report":"\u0414\u0430\u0439\u044B\u043D \u0435\u0441\u0435\u043F","files.document":"\u04E8\u04A3\u0434\u0435\u043B\u0435\u0442\u0456\u043D \u049B\u04B1\u0436\u0430\u0442","files.presentation":"\u0422\u0430\u043D\u044B\u0441\u0442\u044B\u0440\u044B\u043B\u044B\u043C","files.excel":"Excel \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0456","files.csv":"CSV \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440\u0456","files.failed":"\u0424\u0430\u0439\u043B\u0434\u044B \u0436\u04AF\u043A\u0442\u0435\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","report.create":"\u0415\u0441\u0435\u043F \u049B\u04B1\u0440\u0443","report.pending":"\u0415\u0441\u0435\u043F \u0444\u0430\u0439\u043B\u0434\u0430\u0440\u044B \u0434\u0430\u0439\u044B\u043D\u0434\u0430\u043B\u0443\u0434\u0430\u2026","report.failed":"\u0415\u0441\u0435\u043F \u0444\u0430\u0439\u043B\u0434\u0430\u0440\u044B\u043D \u049B\u04B1\u0440\u0443 \u043C\u04AF\u043C\u043A\u0456\u043D \u0431\u043E\u043B\u043C\u0430\u0434\u044B","report.retry":"\u049A\u0430\u0439\u0442\u0430\u043B\u0430\u0443","report.expired":"\u0424\u0430\u0439\u043B\u0434\u0430\u0440\u0434\u044B\u04A3 \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","dashboard.eyebrow":"\u0422\u0430\u043B\u0434\u0430\u0443","dashboard.label":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0442\u0430\u049B\u0442\u0430\u0441\u044B","dashboard.sections":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0431\u04E9\u043B\u0456\u043C\u0434\u0435\u0440\u0456","dashboard.regions":"\u04E9\u04A3\u0456\u0440\u043B\u0435\u0440: {n}","dashboard.items":"\u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043B\u0430\u0440: {n}","dashboard.openSource":"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437\u0434\u0435 \u0430\u0448\u0443","dashboard.methodology":"\u04D8\u0434\u0456\u0441\u0442\u0435\u043C\u0435","dashboard.fullscreen":"\u0422\u043E\u043B\u044B\u049B \u044D\u043A\u0440\u0430\u043D","dashboard.collapse":"\u041A\u0456\u0448\u0456\u0440\u0435\u0439\u0442\u0443","dashboard.close":"\u0416\u0430\u0431\u0443","dashboard.chatTab":"\u0421\u04B1\u0445\u0431\u0430\u0442","dashboard.dashboardTab":"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0442\u0430\u049B\u0442\u0430\u0441\u044B","dashboard.view":"\u0421\u04B1\u0445\u0431\u0430\u0442 \u043D\u0435\u043C\u0435\u0441\u0435 \u0434\u0430\u0448\u0431\u043E\u0440\u0434","dashboard.region":"\u04E8\u04A3\u0456\u0440","dashboard.allRegions":"\u0411\u0430\u0440\u043B\u044B\u049B \u04E9\u04A3\u0456\u0440\u043B\u0435\u0440","dashboard.period":"\u041A\u0435\u0437\u0435\u04A3","dashboard.mode.label":"\u041A\u04E9\u0440\u0456\u043D\u0456\u0441","dashboard.mode.value":"\u041C\u04D9\u043D","dashboard.mode.deviation":"\u0410\u0443\u044B\u0442\u049B\u0443","dashboard.mode.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441","dashboard.base.label":"\u0410\u0443\u044B\u0442\u049B\u0443 \u0431\u0430\u0437\u0430\u0441\u044B","dashboard.base.median":"\u043C\u0435\u0434\u0438\u0430\u043D\u0430\u0434\u0430\u043D","dashboard.base.national":"\u049A\u0420-\u0434\u0430\u043D","dashboard.noPrevious":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043A\u0435\u0437\u0435\u04A3 \u0436\u043E\u049B","dashboard.noNational":"\u0411\u04B1\u043B \u043A\u0435\u0437\u0435\u04A3\u0433\u0435 \u0435\u043B \u0431\u043E\u0439\u044B\u043D\u0448\u0430 \u043C\u04D9\u043D \u0436\u043E\u049B","dashboard.fewRegions":"\u041A\u0435\u043C\u0456\u043D\u0434\u0435 \u0435\u043A\u0456 \u043C\u04D9\u043D \u049B\u0430\u0436\u0435\u0442","dashboard.ranking":"\u041E\u0440\u044B\u043D\u0434\u0430\u0440 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0456","dashboard.trend":"\u0421\u0435\u0440\u043F\u0456\u043D","dashboard.findings":"\u049A\u043E\u0440\u044B\u0442\u044B\u043D\u0434\u044B\u043B\u0430\u0440","dashboard.data":"\u0414\u0435\u0440\u0435\u043A\u0442\u0435\u0440","dashboard.kpis":"\u041D\u0435\u0433\u0456\u0437\u0433\u0456 \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","dashboard.table.rank":"\u2116","dashboard.table.position":"\u0410\u0442\u0430\u0443\u044B","dashboard.table.value":"\u041C\u04D9\u043D\u0456, {unit}","dashboard.table.share":"\u04AE\u043B\u0435\u0441\u0456, %","dashboard.table.deviation":"\u0410\u0443\u044B\u0442\u049B\u0443, {unit}","dashboard.table.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441, {unit}","dashboard.source":"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437: {name}","dashboard.points":"\u043F.\u0442.","dashboard.kpi.national":"\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0420\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","dashboard.kpi.max":"\u0415\u04A3 \u0436\u043E\u0493\u0430\u0440\u044B","dashboard.kpi.min":"\u0415\u04A3 \u0442\u04E9\u043C\u0435\u043D","dashboard.kpi.median":"\u04E8\u04A3\u0456\u0440\u043B\u0435\u0440 \u043C\u0435\u0434\u0438\u0430\u043D\u0430\u0441\u044B","dashboard.kpi.spread":"\u049A\u04B1\u043B\u0430\u0448","dashboard.kpi.gap":"\u0410\u043B\u0448\u0430\u049B\u0442\u044B\u049B","dashboard.kpi.last":"\u0421\u043E\u04A3\u0493\u044B \u043C\u04D9\u043D","dashboard.kpi.first":"\u041A\u0435\u0437\u0435\u04A3 \u0431\u0430\u0441\u044B","dashboard.kpi.change":"\u04E8\u0437\u0433\u0435\u0440\u0456\u0441","dashboard.kpi.place":"\u041E\u0440\u044B\u043D","dashboard.kpi.placeOf":"{m} \u0456\u0448\u0456\u043D\u0435\u043D {n}","dashboard.kpi.deviation":"\u041C\u0435\u0434\u0438\u0430\u043D\u0430\u0434\u0430\u043D \u0430\u0443\u044B\u0442\u049B\u0443","dashboard.kpi.previous":"\u0410\u043B\u0434\u044B\u04A3\u0493\u044B \u043A\u0435\u0437\u0435\u04A3\u0433\u0435","steps.counter":"{total} \u0456\u0448\u0456\u043D\u0435\u043D {done}","feedback.reason.wrong_number":"\u0421\u0430\u043D \u049B\u0430\u0442\u0435","feedback.reason.wrong_indicator":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448 \u0431\u0430\u0441\u049B\u0430","feedback.reason.wrong_territory":"\u0410\u0443\u043C\u0430\u049B \u0431\u0430\u0441\u049B\u0430","feedback.reason.wrong_period":"\u041A\u0435\u0437\u0435\u04A3 \u0431\u0430\u0441\u049B\u0430","feedback.reason.not_answered":"\u0421\u04B1\u0440\u0430\u049B\u049B\u0430 \u0436\u0430\u0443\u0430\u043F \u0436\u043E\u049B","feedback.reason.language":"\u0416\u0430\u0443\u0430\u043F \u0442\u0456\u043B\u0456","feedback.reason.slow":"\u0422\u044B\u043C \u04B1\u0437\u0430\u049B","feedback.reason.other":"\u0411\u0430\u0441\u049B\u0430","intro.title":"\u0411\u0430\u0441\u0442\u0430\u043C\u0430\u0441 \u0431\u04B1\u0440\u044B\u043D","intro.continue":"\u0416\u0430\u043B\u0493\u0430\u0441\u0442\u044B\u0440\u0443",source:"\u0414\u0435\u0440\u0435\u043A\u043A\u04E9\u0437: {name}","shell.siteBlocked":"\u0411\u04B1\u043B \u0441\u0430\u0439\u0442\u0442\u0430 \u0447\u0430\u0442 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437","shell.siteBlockedHint":"\u0421\u0430\u0439\u0442 \u0438\u0435\u0441\u0456 AI-Dana-\u043D\u044B \u04D9\u043B\u0456 \u049B\u043E\u0441\u043F\u0430\u0493\u0430\u043D \u043D\u0435\u043C\u0435\u0441\u0435 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0434\u0456\u043B\u0456\u043A \u0442\u043E\u049B\u0442\u0430\u0442\u044B\u043B\u0493\u0430\u043D.","modes.none":"\u0416\u0430\u0443\u0430\u043F \u0440\u0435\u0436\u0438\u043C\u0434\u0435\u0440\u0456 \u049B\u0430\u0437\u0456\u0440 \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437. \u041A\u0435\u0439\u0456\u043D\u0456\u0440\u0435\u043A \u049B\u0430\u0439\u0442\u0430\u043B\u0430\u043F \u043A\u04E9\u0440\u0456\u04A3\u0456\u0437.","attachment.sending":"\u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0443\u0434\u0435","agent.steps":"\u049A\u0430\u0434\u0430\u043C\u0434\u0430\u0440","agent.unfinished":"\u0430\u044F\u049B\u0442\u0430\u043B\u043C\u0430\u0434\u044B",rateGroup:"\u0416\u0430\u0443\u0430\u043F\u0442\u044B \u0431\u0430\u0493\u0430\u043B\u0430\u0443","blocks.catalogTitle":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433: {topic}","blocks.catalogSections":"\u0411\u04E9\u043B\u0456\u043C\u0434\u0435\u0440","blocks.catalogIndicators":"\u041A\u04E9\u0440\u0441\u0435\u0442\u043A\u0456\u0448\u0442\u0435\u0440","blocks.catalogSendHint":"\u0421\u04B1\u0440\u0430\u049B \u0442\u0430\u04A3\u0434\u0430\u043B\u0493\u0430\u043D \u0431\u043E\u0439\u0434\u0430 \u0436\u0456\u0431\u0435\u0440\u0456\u043B\u0435\u0434\u0456","blocks.clarification":"\u041D\u0430\u049B\u0442\u044B\u043B\u0430\u0443","files.expired":"\u0424\u0430\u0439\u043B \u043C\u0435\u0440\u0437\u0456\u043C\u0456 \u04E9\u0442\u0442\u0456","files.notFound":"\u0424\u0430\u0439\u043B \u0442\u0430\u0431\u044B\u043B\u043C\u0430\u0434\u044B","files.unavailable":"\u0424\u0430\u0439\u043B \u049B\u043E\u043B\u0436\u0435\u0442\u0456\u043C\u0441\u0456\u0437"},A0={title:"AI-Dana",open:"Open chat",unreadAnswers:"new answers: {count}",ask:"Ask a question",close:"Close",history:"History",closeHistory:"Hide history",newChat:"New chat",untitled:"New chat",historyEmpty:"No chats yet",historyError:"Could not load the history",delete:"Delete",deleteConfirm:"Delete this chat?",deleteYes:"Delete",deleteNo:"Cancel",deleteError:"Could not delete the chat",modeLabel:"Answer mode","health.idle":"Available","health.busy":"Busy","health.unavailable":"Unavailable",placeholder:"Ask your questions",inputLabel:"Message",send:"Send",stop:"Stop",attach:"Attach file",attachOne:"Only one file can be attached",attachHint:"You can attach one file: XLS, XLSX, CSV, TXT or MD, up to {size} MB",disclaimer:"AI can make mistakes \u2014 check important information",removeFile:"Remove file",counter:"{count} / {max}",counterLimit:"Character limit reached",counterOver:"Character limit exceeded",fileTooLarge:"File \u201C{name}\u201D is larger than {size} MB",fileType:"File \u201C{name}\u201D is not supported. You can attach XLS, XLSX, CSV, TXT or MD",modeUnavailable:"This mode is unavailable right now, choose another one",greeting:"How can I help?",loading:"Loading\u2026",configError:"The chat is temporarily unavailable",overloaded:"The service is overloaded right now. Please try again later.",retry:"Retry",dismiss:"Dismiss",scrollDown:"Scroll to bottom",settings:"Settings","settings.language":"Language","settings.theme":"Theme","settings.themeLight":"Light","settings.themeDark":"Dark","settings.themeAuto":"System","settings.model":"Default model","settings.modelHint":"Every new chat starts with it","settings.shortcuts":"Keyboard shortcuts","shortcut.search":"Search chats","shortcut.newChat":"New chat","shortcut.sidebar":"Show or hide the sidebar","shortcut.close":"Close the window",search:"Search chats",searchEmpty:"Nothing found",collapseSidebar:"Hide sidebar",expandSidebar:"Show sidebar",expand:"Expand to the whole page",shrink:"Shrink",examples:"Example queries","examples.whatCanDo":"What you can do","group.pinned":"Pinned","group.today":"Today","group.yesterday":"Yesterday","group.week":"Previous 7 days","group.earlier":"Earlier","errors.thread_busy":"AI-Dana is still answering in this chat. Wait for the answer or stop it.","errors.mode_overloaded":"AI-Dana is overloaded right now, please try again a bit later","errors.daily_limit":"You have used up today's message limit","errors.rate_limit":"Too many messages in a row. Please wait a minute.","errors.ip_limit":"Too many messages from your network today. Please try again tomorrow.","errors.concurrency_limit":"Wait for the previous answer to finish","errors.file_too_large":"The file is too large","errors.file_not_allowed":"This file cannot be attached. XLS, XLSX, CSV, TXT and MD are allowed","errors.invalid_query":"The message is empty or too long","errors.invalid_parent":"This message can no longer be changed","errors.mode_not_found":"The selected mode is unavailable right now. Choose another mode.","errors.thread_not_found":"Chat not found","errors.interrupted":"The answer was interrupted","errors.code":"Could not get an answer (code {code}).","errors.generic":"Something went wrong while sending the message.","errors.network":"No connection to the server. Check your network.","errors.render":"This message could not be shown.","agent.thinking":"Thinking\u2026","agent.done":"Done","agent.stopped":"Stopped","agent.stopping":"Stopping\u2026","agent.interrupted":"Answer interrupted","agent.answerStopped":"Answer stopped. Ask again if needed","agent.seconds":"{value} s","agent.attempt":"attempt {count}","agent.showSteps":"Show steps","agent.hideSteps":"Hide steps","steps.router":"Understanding the question","steps.context_builder":"Looking for the data","steps.sql_architect":"Preparing the calculation","steps.executor":"Calculating the figures","steps.responder":"Preparing the answer","steps.rag":"Looking in reference materials","steps.sql":"Looking for data in open sources","steps.document":"Reading the document","steps.understand":"Understanding the question","steps.search_law":"Searching the law","steps.run_sql":"Calculating the figures","steps.run_query":"Getting the data","steps.data":"Getting the data","steps.lookup_taxpayer":"Looking up the taxpayer","steps.find_taxpayer":"Finding the company by name","steps.ask_clarification":"Clarifying the question","steps.answer":"Preparing the answer","steps.think":"Analysing the findings","steps.file":"Reading the document","waiting.router.1":"Choosing where to look\u2026","waiting.router.2":"Matching the question to data and law\u2026","waiting.responder.1":"Checking the figures against the data\u2026","waiting.responder.2":"Checking the references to the law\u2026","waiting.responder.3":"Tidying up the answer\u2026","waiting.law.1":"Reading the articles found\u2026","waiting.law.2":"Comparing versions of the law\u2026","waiting.data.1":"Calculating the figures\u2026","waiting.data.2":"Checking the totals\u2026","waiting.executor.1":"Checking the totals\u2026","waiting.executor.2":"Tidying up the table\u2026","waiting.taxpayer.1":"Putting the profile together\u2026","waiting.taxpayer.2":"Looking at receipts by year\u2026","waiting.findCompany.1":"Comparing similar names\u2026","waiting.findCompany.2":"Picking the closest match\u2026","waiting.think.1":"Matching the findings to the question\u2026","waiting.think.2":"Deciding what else to look at\u2026","waiting.unknown.1":"Almost there\u2026","waiting.unknown.2":"Checking the result\u2026","steps.unknown":"Working on the answer",copy:"Copy",copied:"Copied",download:"Download",regenerate:"Regenerate",edit:"Edit message",editLabel:"Message text",cancel:"Cancel",actionsLabel:"Message actions",rate:"Rate {count} out of 3",ratingError:"Could not save the rating",feedbackOpen:"Leave feedback",feedbackEdit:"Edit feedback",feedbackLabel:"Feedback on the answer",feedbackPlaceholder:"Your feedback on the answer",save:"Save","branch.label":"Versions","branch.prev":"Previous version","branch.next":"Next version","branch.error":"Could not switch the version","limit.remaining":"{count} of {limit} messages left today","limit.exhausted":"You have used up today's message limit","limit.until":"Message limit reached. You can write again after {time}.","blocks.data":"Data","blocks.hideData":"Hide data","blocks.methodology":"Methodology","blocks.passport":"What was calculated","blocks.indicator":"Indicator","blocks.territory":"Territory","blocks.period":"Period","blocks.breakdown":"Breakdown","blocks.breakdown.sex":"by sex","blocks.breakdown.age":"by age","blocks.breakdown.urban_rural":"urban and rural","blocks.breakdown.activity":"by economic activity","blocks.breakdown.item":"by item","blocks.substituted":"substituted","blocks.alternatives":"Similar indicators","blocks.table":"Data table","blocks.tableSearch":"Search the table\u2026","blocks.tableEmpty":"No data","blocks.page":"{a} of {b}","blocks.prevPage":"Previous page","blocks.nextPage":"Next page","blocks.truncated":"Showing the first {n} rows \u2014 full data in Excel","blocks.catalogMore":"\u2026and {count} more in the catalog","blocks.catalogExamples":"You can ask","blocks.options":"Answer options","blocks.default":"default","blocks.freeTextHint":"Choose an option or type your own below","blocks.findOption":"Find in the list\u2026","blocks.chosen":"Selected: {label}","blocks.continue":"Continue","blocks.cancelPlan":"Cancel","blocks.expired":"This clarification has expired","blocks.askAgain":"Ask the question again","blocks.dashboard":"Dashboard","blocks.hideDashboard":"Hide dashboard","chart.kinds":"Chart type","chart.kind.bar":"Bars","chart.kind.column":"Columns","chart.kind.pie":"Pie","chart.kind.line":"Lines","chart.kind.area":"Areas","chart.national":"KZ {value}","chart.top":"Top {n} of {total} \u2014 all in the dashboard","chart.label":"{title}, {period}","files.list":"Files","files.report":"Final report","files.document":"Editable document","files.presentation":"Presentation","files.excel":"Excel data","files.csv":"CSV data","files.failed":"Could not download the file","report.create":"Generate report","report.pending":"Report files are being prepared\u2026","report.failed":"Could not generate the report files","report.retry":"Retry","report.expired":"The files have expired","dashboard.eyebrow":"Analytics","dashboard.label":"Dashboard","dashboard.sections":"Dashboard sections","dashboard.regions":"regions: {n}","dashboard.items":"items: {n}","dashboard.openSource":"Open in source","dashboard.methodology":"Methodology","dashboard.fullscreen":"Full screen","dashboard.collapse":"Collapse","dashboard.close":"Close","dashboard.chatTab":"Chat","dashboard.dashboardTab":"Dashboard","dashboard.view":"Chat or dashboard","dashboard.region":"Region","dashboard.allRegions":"All regions","dashboard.period":"Period","dashboard.mode.label":"Mode","dashboard.mode.value":"Value","dashboard.mode.deviation":"Deviation","dashboard.mode.change":"Change","dashboard.base.label":"Deviation base","dashboard.base.median":"from median","dashboard.base.national":"from KZ","dashboard.noPrevious":"No previous period","dashboard.noNational":"No national value for this period","dashboard.fewRegions":"At least two values are needed","dashboard.ranking":"Ranking","dashboard.trend":"Trend","dashboard.findings":"Findings","dashboard.data":"Data","dashboard.kpis":"Key figures","dashboard.table.rank":"#","dashboard.table.position":"Item","dashboard.table.value":"Value, {unit}","dashboard.table.share":"Share, %","dashboard.table.deviation":"Deviation, {unit}","dashboard.table.change":"Change, {unit}","dashboard.source":"Source: {name}","dashboard.points":"p.p.","dashboard.kpi.national":"Republic of Kazakhstan","dashboard.kpi.max":"Maximum","dashboard.kpi.min":"Minimum","dashboard.kpi.median":"Regional median","dashboard.kpi.spread":"Range","dashboard.kpi.gap":"Gap","dashboard.kpi.last":"Latest value","dashboard.kpi.first":"Start of period","dashboard.kpi.change":"Change","dashboard.kpi.place":"Rank","dashboard.kpi.placeOf":"{n} of {m}","dashboard.kpi.deviation":"Deviation from median","dashboard.kpi.previous":"vs previous period","steps.counter":"{done} of {total}","feedback.reason.wrong_number":"Wrong number","feedback.reason.wrong_indicator":"Wrong indicator","feedback.reason.wrong_territory":"Wrong territory","feedback.reason.wrong_period":"Wrong period","feedback.reason.not_answered":"Question not answered","feedback.reason.language":"Answer language","feedback.reason.slow":"Too slow","feedback.reason.other":"Other","intro.title":"Before you start","intro.continue":"Continue",source:"Source: {name}","shell.siteBlocked":"The chat is not available on this site","shell.siteBlockedHint":"The site owner has not connected AI-Dana yet or access is suspended.","modes.none":"Answer modes are unavailable right now. Please try again later.","attachment.sending":"sending","agent.steps":"Steps","agent.unfinished":"not finished",rateGroup:"Rate the answer","blocks.catalogTitle":"Catalog: {topic}","blocks.catalogSections":"Sections","blocks.catalogIndicators":"Indicators","blocks.catalogSendHint":"The question is sent as soon as you pick it","blocks.clarification":"Clarification","files.expired":"The file has expired","files.notFound":"File not found","files.unavailable":"File unavailable"},O0={kk:I0,ru:Ap,en:A0},zt=(r,a,o)=>{const l=O0[r][a];return o?l.replace(/\{(\w+)\}/g,(d,p)=>String(o[p]??d)):l},ls=r=>r in Ap,aa=(r,a)=>{if(!r)return"";for(const o of[r[a],r.ru,...Object.values(r)])if(o)return o;return""},Op="aid_prefs",$0=["light","dark","auto"],$p=r=>{try{const a=JSON.parse(r?.getItem(Op)??"{}"),o={};return is.includes(a.lang)&&(o.lang=a.lang),$0.includes(a.scheme)&&(o.scheme=a.scheme),o}catch{return{}}},F0=(r,a)=>{try{r?.setItem(Op,JSON.stringify(a))}catch{}},Fp=({scheme:r})=>r?{scheme:r}:{},U0=(r,a,o)=>a?!o||r.expanded?r:{expanded:!0,byDashboard:!0}:r.byDashboard?{expanded:!1,byDashboard:!1}:r,ss=x.createContext(null),cs=()=>{const r=x.useContext(ss);if(!r)throw new Error("usePrefs outside PrefsContext");return r},Up="@dsrcjs/ai-widget",q0=/^https:\/\/cdn\.jsdelivr\.net\/npm\/@dsrcjs\/ai-widget@([^/]+)\/dist\/ai-dana-chat\.js(?:[?#].*)?$/,qp=/^\d+\.\d+\.\d+$/,V0=1500,B0=(r,a)=>{const o=r.split(".").map(Number),l=a.split(".").map(Number);for(let d=0;d<3;d++){const p=(o[d]??0)-(l[d]??0);if(p!==0)return p>0}return!1},W0=r=>`https://cdn.jsdelivr.net/npm/${Up}@${r}/dist/ai-dana-chat.js`,H0=(r,a,o=typeof document>"u"?null:document.currentScript)=>{const l=o instanceof HTMLScriptElement?o.src:"",d=q0.exec(l)?.[1];if(!d||qp.test(d)||typeof fetch!="function"){r();return}let p=!1;const f=h=>{if(!p){if(p=!0,typeof h=="string"&&qp.test(h)&&B0(h,a)){const m=document.createElement("script");m.src=W0(h),m.async=!0,m.onerror=r,document.head.append(m);return}r()}};window.setTimeout(f,V0),fetch(`https://data.jsdelivr.com/v1/packages/npm/${Up}/resolved?specifier=${encodeURIComponent(d)}`).then(h=>h.ok?h.json():null).then(h=>{f(h?.version)},()=>{f()})},X0=r=>{let a=r;const o=new Set;return{get:()=>a,set:l=>{a={...a,...l};for(const d of o)d()},subscribe:l=>(o.add(l),()=>o.delete(l))}};class ds extends x.Component{constructor(){super(...arguments),ln(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}}const K0='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--aid-c-border)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--aid-c-font);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:32px!important;padding-left:32px!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:32px;padding-left:32px}@media(min-width:1400px){.\\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-\\[3px\\]{inset:3px}.inset-y-0{top:0;bottom:0}.bottom-3{bottom:12px}.bottom-\\[3\\.2rem\\]{bottom:51.2px}.bottom-\\[calc\\(100\\%\\+6px\\)\\]{bottom:calc(100% + 6px)}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.left-\\[11px\\]{left:11px}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[calc\\(100\\%\\+6px\\)\\]{top:calc(100% + 6px)}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.m-0{margin:0}.mx-1\\.5{margin-left:6px;margin-right:6px}.mx-auto{margin-left:auto;margin-right:auto}.my-0\\.5{margin-top:2px;margin-bottom:2px}.my-4{margin-top:16px;margin-bottom:16px}.-ml-2{margin-left:-8px}.mb-2{margin-bottom:8px}.ml-0\\.5{margin-left:2px}.ml-1\\.5{margin-left:6px}.mr-1{margin-right:4px}.mr-auto{margin-right:auto}.mt-0\\.5{margin-top:2px}.mt-1{margin-top:4px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-\\[18px\\]{margin-top:18px}.mt-px{margin-top:1px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-2{width:8px;height:8px}.size-3{width:12px;height:12px}.size-3\\.5{width:14px;height:14px}.size-4{width:16px;height:16px}.size-6{width:24px;height:24px}.size-7{width:28px;height:28px}.size-8{width:32px;height:32px}.size-9{width:36px;height:36px}.size-\\[26px\\]{width:26px;height:26px}.size-\\[30px\\]{width:30px;height:30px}.size-\\[34px\\]{width:34px;height:34px}.size-\\[52px\\]{width:52px;height:52px}.h-10{height:40px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[11px\\]{height:11px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-\\[22px\\]{height:22px}.h-\\[38px\\]{height:38px}.h-full{height:100%}.h-side-head{height:var(--aid-c-side-head-height)}.h-toolbar{height:var(--aid-c-toolbar-height)}.max-h-56{max-height:224px}.max-h-\\[28rem\\]{max-height:448px}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-10{min-height:40px}.min-h-11{min-height:44px}.min-h-6{min-height:24px}.min-h-7{min-height:28px}.min-h-8{min-height:32px}.min-h-9{min-height:36px}.min-h-\\[30px\\]{min-height:30px}.min-h-\\[34px\\]{min-height:34px}.min-h-\\[76px\\]{min-height:76px}.w-1\\/2{width:50%}.w-10{width:40px}.w-\\[18px\\]{width:18px}.w-\\[340px\\]{width:340px}.w-\\[62\\%\\]{width:62%}.w-\\[7px\\]{width:7px}.w-\\[max-content\\]{width:-moz-max-content;width:max-content}.w-\\[min\\(400px\\,100\\%\\)\\]{width:min(400px,100%)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-side{width:var(--aid-c-side-width)}.w-side-over{width:var(--aid-c-side-over-width)}.min-w-0{min-width:0px}.min-w-16{min-width:64px}.min-w-24{min-width:96px}.min-w-32{min-width:128px}.min-w-4{min-width:16px}.min-w-40{min-width:160px}.min-w-5{min-width:20px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[22px\\]{min-width:22px}.min-w-\\[30px\\]{min-width:30px}.min-w-\\[480px\\]{min-width:480px}.min-w-full{min-width:100%}.max-w-60{max-width:240px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[340px\\]{max-width:340px}.max-w-\\[420px\\]{max-width:420px}.max-w-\\[440px\\]{max-width:440px}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[640px\\]{max-width:640px}.max-w-\\[78\\%\\]{max-width:78%}.max-w-\\[820px\\]{max-width:820px}.max-w-\\[844px\\]{max-width:844px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 32px)}.max-w-\\[min\\(360px\\,100\\%\\)\\]{max-width:min(360px,100%)}.max-w-\\[min\\(360px\\,80vw\\)\\]{max-width:min(360px,80vw)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[3px\\]{--tw-translate-y: 3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[repeat\\(auto-fit\\,minmax\\(9\\.5rem\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fit,minmax(152px,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:2px}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.gap-3\\.5{gap:14px}.gap-4{gap:16px}.gap-5{gap:20px}.gap-\\[22px\\]{gap:22px}.gap-\\[3px\\]{gap:3px}.gap-\\[7px\\]{gap:7px}.gap-px{gap:1px}.gap-x-3\\.5{-moz-column-gap:14px;column-gap:14px}.gap-y-1{row-gap:4px}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-x-contain{overscroll-behavior-x:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:var(--aid-c-radius)}.rounded-2xl{border-radius:16px}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[18px\\]{border-radius:18px}.rounded-\\[22\\.5\\%\\]{border-radius:22.5%}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[7px\\]{border-radius:7px}.rounded-\\[calc\\(var\\(--aid-c-radius\\)\\+6px\\)\\]{border-radius:calc(var(--aid-c-radius) + 6px)}.rounded-aid-field{border-radius:var(--aid-c-radius-field)}.rounded-aid-window{border-radius:var(--aid-c-radius-window)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--aid-c-radius)}.rounded-md{border-radius:calc(var(--aid-c-radius) - 2px)}.rounded-sm{border-radius:calc(var(--aid-c-radius) - 4px)}.rounded-xl{border-radius:12px}.rounded-br-\\[6px\\]{border-bottom-right-radius:6px}.border{border-width:1px}.border-0{border-width:0px}.border-\\[1\\.5px\\]{border-width:1.5px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-\\[3px\\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-border{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-current{border-color:currentColor}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\\/30{border-color:hsl(var(--destructive) / .3)}.border-error\\/30{border-color:hsl(var(--error),.3)}.border-error\\/35{border-color:hsl(var(--error),.35)}.border-input{border-color:hsl(var(--input))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-primary{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-primary-30{border-color:color-mix(in srgb,var(--aid-c-primary) 30%,transparent)}.border-primary-35{border-color:color-mix(in srgb,var(--aid-c-primary) 35%,transparent)}.border-primary-pressed{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-processing\\/25{border-color:hsl(var(--processing),.25)}.border-warning\\/40{border-color:hsl(var(--warning),.4)}.border-r-transparent{border-right-color:transparent}.bg-\\[\\#F3F5FA\\]{--tw-bg-opacity: 1;background-color:rgb(243 245 250 / var(--tw-bg-opacity, 1))}.bg-\\[hsl\\(var\\(--chart-card\\)\\)\\]{background-color:hsl(var(--chart-card))}.bg-accent{background-color:hsl(var(--accent))}.bg-background{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-border{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-border) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-card{background-color:hsl(var(--card))}.bg-current{background-color:currentColor}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive-background{background-color:hsla(var(--destructive-background))}.bg-destructive-pressed{background-color:hsl(var(--destructive-pressed))}.bg-error-background{background-color:hsla(var(--error-background))}.bg-file-csv{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-csv)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-doc{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-doc)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-other{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-other)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-pdf{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-pdf)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-ppt{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-ppt)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-file-xls{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--file-xls)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-foreground{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-hl{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--hl)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-busy{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-down{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-mode-idle{--tw-bg-opacity: 1;background-color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-muted-foreground\\/40{background-color:hsl(var(--muted-foreground) / .4)}.bg-muted\\/60{background-color:color-mix(in srgb,var(--aid-c-muted) 60%,transparent)}.bg-primary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-primary-pressed{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-processing-background{background-color:hsla(var(--processing-background))}.bg-scrim{background-color:var(--scrim)}.bg-secondary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-secondary) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-warning-background{background-color:hsla(var(--warning-background))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-2\\.5{padding:10px}.p-3{padding:12px}.p-3\\.5{padding:14px}.p-4{padding:16px}.p-6{padding:24px}.p-8{padding:32px}.px-0{padding-left:0;padding-right:0}.px-0\\.5{padding-left:2px;padding-right:2px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-3\\.5{padding-left:14px;padding-right:14px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[5px\\]{padding-left:5px;padding-right:5px}.px-px{padding-left:1px;padding-right:1px}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-3{padding-top:12px;padding-bottom:12px}.py-3\\.5{padding-top:14px;padding-bottom:14px}.py-6{padding-top:24px;padding-bottom:24px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.py-\\[9px\\]{padding-top:9px;padding-bottom:9px}.py-px{padding-top:1px;padding-bottom:1px}.pb-1{padding-bottom:4px}.pb-1\\.5{padding-bottom:6px}.pb-2{padding-bottom:8px}.pb-2\\.5{padding-bottom:10px}.pb-3{padding-bottom:12px}.pb-4{padding-bottom:16px}.pb-5{padding-bottom:20px}.pb-\\[18px\\]{padding-bottom:18px}.pl-0\\.5{padding-left:2px}.pl-2{padding-left:8px}.pl-2\\.5{padding-left:10px}.pl-3{padding-left:12px}.pl-3\\.5{padding-left:14px}.pl-4{padding-left:16px}.pl-5{padding-left:20px}.pl-\\[18px\\]{padding-left:18px}.pl-\\[22px\\]{padding-left:22px}.pl-\\[34px\\]{padding-left:34px}.pr-1\\.5{padding-right:6px}.pr-2{padding-right:8px}.pr-2\\.5{padding-right:10px}.pr-3{padding-right:12px}.pr-3\\.5{padding-right:14px}.pr-4{padding-right:16px}.pr-7{padding-right:28px}.pr-9{padding-right:36px}.pt-0\\.5{padding-top:2px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-14{padding-top:56px}.pt-2{padding-top:8px}.pt-3{padding-top:12px}.pt-3\\.5{padding-top:14px}.pt-7{padding-top:28px}.pt-\\[18px\\]{padding-top:18px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:var(--aid-c-font)}.text-2xl{font-size:20px}.text-2xs{font-size:12px}.text-3xl{font-size:24px}.text-\\[11px\\]{font-size:11px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.text-\\[17px\\]{font-size:17px}.text-\\[9\\.5px\\]{font-size:9.5px}.text-base{font-size:15px}.text-lg{font-size:16px}.text-sm{font-size:14px}.text-xl{font-size:18px}.text-xs{font-size:13px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-6{line-height:24px}.leading-\\[1\\.35\\]{line-height:1.35}.leading-\\[1\\.3\\]{line-height:1.3}.leading-\\[1\\.55\\]{line-height:1.55}.leading-\\[1\\.65\\]{line-height:1.65}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\\[0\\.02em\\]{letter-spacing:.02em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\\[hsl\\(var\\(--foreground\\)\\)\\]{color:hsl(var(--foreground))}.text-background{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-inherit{color:inherit}.text-mode-busy{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-busy)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-down{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-down)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-mode-idle{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--mode-idle)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\\/70{color:hsl(var(--muted-foreground) / .7)}.text-primary{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-primary-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-warn-text{--tw-text-opacity: 1;color:color-mix(in srgb,hsl(var(--warn-text)) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-warning{--tw-text-opacity: 1;color:hsl(var(--warning),var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0_0_0_3px_var\\(--aid-c-secondary\\)\\]{--tw-shadow: 0 0 0 3px var(--aid-c-secondary);--tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_var\\(--aid-c-border\\)\\]{--tw-shadow: inset 0 0 0 1px var(--aid-c-border);--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-panel{--tw-shadow: var(--aid-c-shadow-panel);--tw-shadow-colored: var(--aid-c-shadow-panel);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-pop{--tw-shadow: var(--shadow-pop);--tw-shadow-colored: var(--shadow-pop);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-side{--tw-shadow: var(--aid-c-shadow-side);--tw-shadow-colored: var(--aid-c-shadow-side);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-window{--tw-shadow: var(--aid-c-shadow-window);--tw-shadow-colored: var(--aid-c-shadow-window);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[3px\\]{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-border{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-border) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-secondary{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.ring-offset-background{--tw-ring-offset-color: color-mix(in srgb, var(--aid-c-background) 100% , transparent)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in{--tw-enter-opacity: 0}.slide-in-from-left-2{--tw-enter-translate-x: -8px}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.running{animation-play-state:running}.paused{animation-play-state:paused}:host{display:block}:host([hidden]){display:none!important}.aid-root{all:initial;display:block;width:100%;height:100%;box-sizing:border-box;--aid-d-primary-hovered: color-mix(in oklch, var(--aid-primary) 84%, white);--aid-d-primary-pressed: color-mix(in oklch, var(--aid-primary) 80%, black);--aid-d-primary-foreground: oklch(from var(--aid-primary) clamp(0, (.62 - l) * 1000, 1) 0 0);--aid-d-secondary: color-mix(in srgb, var(--aid-primary) 10%, transparent);--aid-d-ring: color-mix(in srgb, var(--aid-primary) 50%, transparent);--aid-c-primary: var(--aid-primary, hsl(var(--primary)));--aid-c-primary-hovered: var(--aid-primary-hovered, var(--aid-d-primary-hovered, hsl(var(--primary-hovered))));--aid-c-primary-pressed: var(--aid-primary-pressed, var(--aid-d-primary-pressed, hsl(var(--primary-pressed))));--aid-c-primary-foreground: var( --aid-primary-foreground, var(--aid-d-primary-foreground, hsl(var(--primary-foreground))) );--aid-c-secondary: var(--aid-secondary, var(--aid-d-secondary, hsl(var(--secondary))));--aid-c-ring: var(--aid-ring, var(--aid-d-ring, hsl(var(--ring))));--aid-c-background: var(--aid-background, hsl(var(--background)));--aid-c-foreground: var(--aid-foreground, hsl(var(--foreground)));--aid-c-muted: var(--aid-muted, hsl(var(--muted)));--aid-c-border: var(--aid-border, hsl(var(--border)));--aid-c-radius: var(--aid-radius, var(--radius));--aid-c-font: var( --aid-font, var( --aid-theme-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif ) );--aid-c-z: var(--aid-z-index, 2147483000);font-family:var(--aid-c-font);font-size:15px;line-height:1.5;color:var(--aid-c-foreground);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-align:left}.aid-root{--warning: 21, 90%, 48%;--warning-background: 27, 96%, 61%, .2;--ring: 201 100% 35%;--chart-1: 201 100% 35%;--chart-2: 174 72% 30%;--chart-3: 27 95% 46%;--chart-4: 330 70% 42%;--chart-5: 252 45% 52%;--chart-ref: 222 47% 11%;--chart-neg: 359 72% 48%;--chart-dim: 201 45% 80%;--chart-grid: 214 32% 88%;--mode-idle: 142 72% 29%;--mode-busy: 32 95% 36%;--mode-down: 359 78% 44%;--file-pdf: 0 72% 45%;--file-doc: 214 80% 44%;--file-ppt: 18 88% 44%;--file-xls: 145 63% 30%;--file-csv: 174 70% 28%;--file-other: 215 16% 42%;--warn-text: 24 90% 30%;--hl: 45 100% 55% / .45;--scrim: rgb(2 6 23 / .48);--persona-ring: 214 32% 88%;--shadow-pop: 0 10px 28px -10px rgb(15 23 42 / .28);--aid-c-radius-window: calc(var(--aid-c-radius) + 6px);--aid-c-radius-field: calc(var(--aid-c-radius) + 4px);--aid-c-radius-bubble-corner: 6px;--aid-c-side-width: 248px;--aid-c-side-over-width: 290px;--aid-c-toolbar-height: 52px;--aid-c-side-head-height: 56px;--aid-c-shadow-launcher: 0 10px 30px -8px rgb(2 6 23 / .45), 0 2px 6px rgb(2 6 23 / .2);--aid-c-shadow-launcher-drag: 0 22px 44px -10px rgb(2 6 23 / .55);--aid-c-shadow-window: 0 30px 70px -20px rgb(2 6 23 / .55);--aid-c-shadow-panel: 0 20px 50px -16px rgb(2 6 23 / .5);--aid-c-shadow-side: 12px 0 30px -12px rgb(2 6 23 / .45)}.aid-root.dark{--ring: 201 90% 60%;--chart-1: 201 90% 60%;--chart-2: 170 60% 52%;--chart-3: 30 95% 62%;--chart-4: 330 75% 70%;--chart-5: 252 75% 76%;--chart-ref: 210 40% 98%;--chart-neg: 359 92% 70%;--chart-dim: 201 30% 32%;--chart-grid: 217 33% 25%;--mode-idle: 142 60% 55%;--mode-busy: 35 95% 62%;--mode-down: 359 95% 72%;--file-pdf: 0 80% 62%;--file-doc: 214 85% 62%;--file-ppt: 20 92% 60%;--file-xls: 145 55% 48%;--file-csv: 172 55% 46%;--file-other: 215 20% 60%;--warn-text: 32 95% 66%;--hl: 45 100% 55% / .35;--scrim: rgb(0 0 0 / .6);--persona-ring: 217 33% 30%;--shadow-pop: 0 12px 32px -10px rgb(0 0 0 / .6)}:where(.aid-root svg.lucide){width:16px;height:16px;flex-shrink:0}:where(.aid-root *),:where(.aid-root *):before,:where(.aid-root *):after{border-color:var(--aid-c-border)}.aid-root[data-mode=launcher]{width:0;height:0}.aid-root{--aid-c-launcher-size: 60px}@media(max-width:639px){.aid-root{--aid-c-launcher-size: 56px}}.aid-launcher{position:fixed;z-index:var(--aid-c-z);display:inline-flex;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;min-width:var(--aid-c-launcher-size);height:var(--aid-c-launcher-size);padding:0;border:0;border-radius:9999px;background:var(--aid-c-primary);color:var(--aid-c-primary-foreground);box-shadow:var(--aid-c-shadow-launcher);font:600 15px/1 var(--aid-c-font);cursor:pointer;outline:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .12s ease-out,transform .12s ease-out,box-shadow .12s ease-out}.aid-launcher[data-variant=label]{max-width:300px;padding:0 20px 0 8px}.aid-launcher[data-shape=rounded]{border-radius:16px}.aid-launcher[data-shape=square]{border-radius:4px}@media(hover:hover){.aid-launcher:hover{background:var(--aid-c-primary-hovered);transform:translateY(-2px)}}.aid-launcher:active{transform:scale(.96)}.aid-launcher:focus-visible{outline:3px solid var(--aid-c-ring);outline-offset:3px}.aid-launcher[data-dragging=true]{transform:scale(1.06);box-shadow:var(--aid-c-shadow-launcher-drag)}@media(prefers-reduced-motion:reduce){.aid-launcher,.aid-launcher:hover,.aid-launcher:active,.aid-launcher[data-dragging=true]{transition:none;transform:none}}.aid-launcher[data-dragging=true],.aid-window-header[data-dragging=true]{cursor:grabbing}.aid-launcher-origin{position:fixed;z-index:calc(var(--aid-c-z) - 1);box-sizing:border-box;border:1.5px dashed hsl(var(--muted-foreground) / .55);border-radius:9999px;pointer-events:none}.aid-launcher-origin[data-shape=rounded]{border-radius:16px}.aid-launcher-origin[data-shape=square]{border-radius:4px}.aid-root{--aid-c-window-gap: 24px;--aid-c-overlay: var(--aid-overlay, rgb(2 6 23 / .35))}.aid-window{position:fixed;z-index:var(--aid-c-z);display:flex;flex-direction:column;overflow:hidden;transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.dana-av{position:relative;display:inline-block;flex-shrink:0;overflow:hidden}.dana-av>*{position:absolute;inset:0;width:100%;height:100%;display:block}.dana-av-body{transform-origin:50% 100%}.dana-av-dot{transform-box:fill-box;transform-origin:50% 50%}.dana-av[data-animated][data-mood=calm] .dana-av-body,.dana-av[data-animated][data-mood=listen] .dana-av-body{animation:dana-breathe 3.6s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=typing] .dana-av-body{animation:dana-bob .34s ease-in-out infinite}.dana-av[data-animated][data-mood=think] .dana-av-body{animation:dana-sway 3.4s ease-in-out infinite alternate}.dana-av[data-animated][data-mood=eureka] .dana-av-body{animation:dana-lift 1.3s cubic-bezier(.3,0,.4,1) infinite}.dana-av[data-animated][data-mood=sorry] .dana-av-body{animation:dana-slump 2.8s ease-in-out infinite}.dana-av[data-animated] .dana-av-bubble,.dana-av[data-animated] .dana-av-dots{animation:dana-float 2.2s ease-in-out infinite alternate}.dana-av[data-animated] .dana-av-dot{animation:dana-dot 1.1s ease-in-out infinite}.dana-av[data-animated] .dana-av-dot:nth-child(3n+2){animation-delay:.18s}.dana-av[data-animated] .dana-av-dot:nth-child(3n){animation-delay:.36s}.dana-av[data-animated] .dana-av-spark{transform-origin:13% 30%;animation:dana-twinkle 1.3s ease-in-out infinite}.dana-av[data-animated] .dana-av-drop{animation:dana-drip 1.8s ease-in infinite}@keyframes dana-breathe{to{transform:translateY(-.5%) scale(1.004,1.01)}}@keyframes dana-bob{50%{transform:translateY(.5%)}}@keyframes dana-sway{0%{transform:rotate(-1.2deg)}to{transform:rotate(1.2deg)}}@keyframes dana-lift{15%{transform:scale(1.02,.98)}42%{transform:translateY(-2.5%) scale(.99,1.015)}65%{transform:scale(1.01,.99)}80%{transform:none}}@keyframes dana-slump{8%{transform:translate(-.7%) rotate(-.6deg)}16%{transform:translate(.7%) rotate(.6deg)}24%{transform:none}60%{transform:translateY(1%) rotate(-.8deg)}}@keyframes dana-float{to{transform:translateY(-1.5%)}}@keyframes dana-dot{0%,60%,to{transform:translateY(0);opacity:.45}30%{transform:translateY(-40%);opacity:1}}@keyframes dana-twinkle{0%,to{transform:scale(.75);opacity:.6}45%{transform:scale(1.08) rotate(12deg);opacity:1}}@keyframes dana-drip{0%{transform:translateY(-1.5%);opacity:0}15%{opacity:1}70%{transform:translateY(3.5%);opacity:1}to{transform:translateY(5.5%);opacity:0}}@media(prefers-reduced-motion:reduce){.dana-av *{animation:none!important}}.aid-overlay{position:fixed;inset:0;z-index:var(--aid-c-z);background:var(--aid-c-overlay);transition:opacity .2s ease-out,visibility 0s linear 0s}.aid-overlay[data-state=closed]{opacity:0;visibility:hidden;transition:opacity .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window{top:var(--aid-c-window-gap);right:var(--aid-c-window-gap);bottom:var(--aid-c-window-gap);width:min(calc(100vw - 2 * var(--aid-c-window-gap)),max(720px,var(--aid-window-width, 60vw)));transition:opacity .2s ease-out,transform .26s cubic-bezier(.32,.72,0,1),width .26s cubic-bezier(.32,.72,0,1),visibility 0s linear 0s}.aid-root[data-mode=launcher] .aid-window[data-expanded=true]{width:calc(100vw - 2 * var(--aid-c-window-gap))}.aid-root .aid-window[data-state=closed]{opacity:0;transform:translateY(8px);visibility:hidden;pointer-events:none;transition:opacity .16s ease-in,transform .2s ease-in,visibility 0s linear .2s}.aid-root[data-mode=launcher] .aid-window[data-fullscreen=true]{inset:0;width:100%;border-width:0;border-radius:0;box-shadow:none}.aid-root[data-mode=window] .aid-window{position:relative;width:100%;height:100%;box-shadow:none}@media(prefers-reduced-motion:reduce){.aid-root .aid-window,.aid-root .aid-window[data-state=closed],.aid-overlay,.aid-overlay[data-state=closed]{transition:none}}.aid-launcher-badge{position:absolute;top:-4px;right:-4px;box-sizing:content-box;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:2px solid var(--aid-c-background);border-radius:9999px;background:hsl(var(--destructive));color:hsl(var(--destructive-foreground));font:700 11px/1 var(--aid-c-font)}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0px}.empty\\:hidden:empty{display:none}.focus-within\\:border-destructive:focus-within{border-color:hsl(var(--destructive))}.focus-within\\:border-primary:focus-within{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-within\\:ring-\\[3px\\]:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\\:ring-secondary:focus-within{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.hover\\:border-primary:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\\:border-primary\\/50:hover{border-color:color-mix(in srgb,var(--aid-c-primary) 50%,transparent)}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-background:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-background) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-background\\/60:hover{background-color:color-mix(in srgb,var(--aid-c-background) 60%,transparent)}.hover\\:bg-destructive-hovered:hover{background-color:hsl(var(--destructive-hovered))}.hover\\:bg-muted:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-primary-hovered:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\\:bg-secondary-hovered:hover{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-hovered),var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary-hovered:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-hovered) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\\:text-primary\\/80:hover{color:color-mix(in srgb,var(--aid-c-primary) 80%,transparent)}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-primary:focus{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus\\:ring-\\[3px\\]:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-secondary:focus{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:border-primary:focus-visible{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.focus-visible\\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset: inset}.focus-visible\\:ring-destructive:focus-visible{--tw-ring-color: hsl(var(--destructive))}.focus-visible\\:ring-primary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-primary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-ring) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-secondary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--aid-c-secondary) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\\:border-primary-pressed:active{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.active\\:bg-destructive-pressed:active{background-color:hsl(var(--destructive-pressed))}.active\\:bg-primary-pressed:active{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.active\\:bg-secondary-pressed:active{--tw-bg-opacity: 1;background-color:hsl(var(--secondary-pressed),var(--tw-bg-opacity, 1))}.active\\:text-primary-foreground:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-foreground) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.active\\:text-primary-pressed:active{--tw-text-opacity: 1;color:color-mix(in srgb,var(--aid-c-primary-pressed) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-disabled:disabled{background-color:hsl(var(--disabled))}.disabled\\:bg-muted:disabled{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--aid-c-muted) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.disabled\\:bg-transparent:disabled{background-color:transparent}.disabled\\:text-disabled-foreground:disabled{color:hsl(var(--disabled-foreground))}.disabled\\:text-muted-foreground:disabled{color:hsl(var(--muted-foreground))}.disabled\\:opacity-100:disabled{opacity:1}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.group\\/attach:focus-within .group-focus-within\\/attach\\:block{display:block}.group:focus-within .group-focus-within\\:opacity-100{opacity:1}.group\\/attach:hover .group-hover\\/attach\\:block{display:block}.group:hover .group-hover\\:opacity-100{opacity:1}.aria-disabled\\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}@media(prefers-reduced-motion:reduce){.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:transition-none{transition-property:none}}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:hidden::-webkit-search-cancel-button{display:none}.\\[\\&_a\\]\\:no-underline a{text-decoration-line:none}.\\[\\&_li\\+li\\]\\:mt-1 li+li{margin-top:4px}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_ul\\]\\:mt-1 ul{margin-top:4px}@media(hover:none){.\\[\\@media\\(hover\\:none\\)\\]\\:opacity-100{opacity:1}}',Vp=3e3,us=6*6e4,Bp={phase:"idle"},Wp={phase:"pending"},oa={phase:"failed"},Hp={phase:"expired"},Q0=new Set(["pdf","docx","pptx","xlsx","csv"]),ps=r=>{switch(r.status){case"queued":case"running":return Wp;case"done":{const a=r.files.filter(o=>Q0.has(o.format));return a.length>0?{phase:"done",files:a}:oa}case"expired":return Hp;default:return oa}},ut=new Map,Io=new Set,Y0=new Set(["done","failed","expired"]),Ao=new Set;let Er=0;const dr=(r,a)=>{const o=ut.get(r)??{view:Bp};ut.set(r,{...o,...a});for(const l of Ao)l()},Z0=r=>{const a=ut.get(r);if(a?.jobId===void 0||a.deadline===void 0||a.api===void 0)return;if(clearTimeout(a.timer),Date.now()+Vp>a.deadline){dr(r,{view:oa,timer:void 0});return}const{jobId:o,api:l}=a,d=Er,p=setTimeout(()=>{l.reportStatus(o).then(f=>{d===Er&&ut.get(r)?.jobId===o&&fs(r,f)},()=>{d===Er&&ut.get(r)?.jobId===o&&dr(r,{view:oa,timer:void 0})})},Vp);dr(r,{timer:p})},fs=(r,a)=>{const o=ps(a),l=ut.get(r)?.jobId;l!==void 0&&l!==a.job_id&&Io.add(l);const d=ut.get(r)?.deadline??Date.now()+us;dr(r,{view:o,jobId:a.job_id,deadline:d,timer:void 0}),o.phase==="pending"&&Z0(r)},ia={subscribe:r=>(Ao.add(r),()=>{Ao.delete(r)}),view:r=>ut.get(r)?.view,adopt:(r,a,o)=>{if(Io.has(a.job_id))return;const l=ut.get(r);if(l!==void 0&&(l.jobId!==void 0||l.view.phase!=="idle")){if(l.view.phase==="pending")return;const d=a.job_id===l.jobId;if(d&&(!Y0.has(a.status)||ps(a).phase===l.view.phase)||d&&l.view.phase==="expired")return}clearTimeout(l?.timer),dr(r,{deadline:Date.now()+us,timer:void 0,api:o}),fs(r,a)},start:(r,a,o)=>{const l=ut.get(r);if(l?.view.phase==="pending")return;clearTimeout(l?.timer),l?.jobId!==void 0&&Io.add(l.jobId),dr(r,{view:Wp,jobId:void 0,deadline:Date.now()+us,timer:void 0,api:a});const d=Er;a.createReport(r,o).then(p=>{d===Er&&fs(r,p)},()=>{d===Er&&dr(r,{view:oa})})},expire:r=>{ut.get(r)?.view.phase==="done"&&dr(r,{view:Hp})}},J0=()=>{Er+=1;for(const r of ut.values())clearTimeout(r.timer);ut.clear(),Io.clear();for(const r of Ao)r()},G0={calm:"idle",listen:"idle",think:"thinking",typing:"typing",eureka:"success",sorry:"fail"},ex={think:"bubble",eureka:"spark",sorry:"drop"},tx=(r,a)=>r==="error"?"sorry":r==="streaming"?a?"typing":"think":"calm",Xp=r=>`${r.replace(/\/+$/,"")}/static/avatars/dana`,rx={animated:!0,assetsBase:Xp("")},hs=x.createContext(rx),nx=()=>x.useContext(hs),Kp=({mood:r="calm",size:a=40,animated:o=!0,label:l,className:d,bare:p})=>{const{animated:f,assetsBase:h}=nx(),m=ex[r],v=b=>`${h}/${b}.webp`;return c.jsxs("span",{className:`dana-av ${p?"":"rounded-[22.5%] bg-[#F3F5FA] ring-1 ring-border"} ${d??""}`.trim(),style:{width:a,height:a},"data-mood":r,"data-animated":o&&f?"":void 0,role:l?"img":void 0,"aria-label":l,"aria-hidden":l?void 0:!0,children:[c.jsx("img",{className:"dana-av-body",src:v(G0[r]),alt:"",decoding:"async",draggable:!1}),m&&c.jsx("img",{className:`dana-av-${m}`,src:v(m),alt:"",decoding:"async",draggable:!1}),r==="typing"&&c.jsxs("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[c.jsx("rect",{x:"189",y:"32",width:"38.4",height:"18.6",rx:"9.3",fill:"#fff",stroke:"#1F3F75",strokeWidth:"1.3"}),[199.9,208.3,216.6].map(b=>c.jsx("circle",{className:"dana-av-dot",cx:b,cy:"41.3",r:"2.6",fill:"#1F3F75"},b))]}),r==="think"&&c.jsx("svg",{className:"dana-av-dots",viewBox:"0 0 240 240","aria-hidden":"true",focusable:"false",children:[26.1,34.4,43.4].map(b=>c.jsx("circle",{className:"dana-av-dot",cx:b,cy:"31.7",r:"1.8",fill:"#1C2B4A"},b))})]})},ax="data:image/webp;base64,UklGRpYIAABXRUJQVlA4IIoIAADQIwCdASpwAHAAPm0uk0akIqGhK9Y72IANiWQAxuvVyV/S/1j9kvbRsf+g5AVFELnbV+aTzb/S5/gPTA6lr0AOl7/vdBQ6Rfgygp2zwU8AJ5XaBQJV0zyK0e/or6Ffqj2D/16POXfH888gDRu18u1KNmLjeGZLr4ZqVBsgkMVoc7x041yO1f02tSm9bXIEMheVf/RC95sCsVfjmj6ZpRJaU0EfkyhyLIKL+4RI2eN+9oPYg2GHTILNrqgZdg1SBnFHnA1Smd6iSfn5pyVe3ojxs8c/LfQnYkJ+3wLZ9OdUZVABr9W6TXOW8qsrvaf/wRx85mXHieeHFKrMQw2YU2wWKYDYaMHzZ8twg9q12hBQ79ZvuvOBUZuIcnX1p+t0A3fD5ZcoLWFAAP737520S//JE2oOadP/5Q45B1okw2bCtFaM+O748Wjvux3RAtWs04/kNzKk8ppPo7yePNJ+AxmgjXPzjaeUNmvG2UQ2x8TUO0Edi4VSjdmoWQ5Vd4+xsz54cTpxyLUlHuEyUiUyryG+WmSkpXT6mxujFjRjxEG1tCbMQVVOfChvnfC8V1rItnZvA7NfHwOA75r6n02xxiv/qbe70ddBODl041drqrVudxVRWfgEhEd7DIL9ok2TdcacHsGGTrvAybKHdFfgZcykgIEHslkMSmxkTB8IoDiH613vvKir02MksykRXvJZjfut5+2IYL6xf+R4g6GNqXNiXitNngYZj/N+cE+Do2m1y2V03crdiRU/5qSn/6ZodaMpMsd3vy8mI1Q1H7rsg+AR2W8D6KaNKIZjkaeeVaB8Qmp87cnwiN6+7hTmWE37fUEcRazbLbFO748ZXg39mzeY7uTvKvoAIzjSEeGX1FzXUZJ4s3+w1IR7c9uP6ATBaNfRJzexpmKP1QVVLzOYKe2NBz8go9mrf8m9lVcADhUVr8BOXG+fMy46SWi6ny/wuDJNbhSMwtqTxcIUAQjWYa1DAE6M93iSC2DUkjdqrEyaURKLpqbowpeHHcMRqhQ3+AHoCEFi0vLc2nCoxfK4WJtPgpPlEcSKUPm7iyiKvPkL1QRHlfdBXno/05iednD/vQtgcTaL1uOdOjD/Sx6ZDh0RooGvKVW+Vttsz2xXhmKPX6Jd7Kl79psRWr7stM2zgdS8kWReL/lI/1BBTnVRzDYZ6fH+fv9lSMhM0GQW36rKIX+/FhQNOc7VR42UaQkam2KJl7HIQX1dPgJUSfnmJwRb6Uc/TUn0/ZaK6kNKrL04IeBGDGC4498SpKPVhJZJ7sjxmJcq9Eq7JCMIF9ZCBBJhT+xedmBqkQoqRomT9viuclt2H6nOtcrEfkdW1QZXwekmNNztzTFFKyjLGjZ9ZX7T9Y87Nrfq/73NX4R7yVR7uDRHH9Z+0rNEJI+peKTZYzPnz6/36AsVNtSuicFfh1b1v0NFT3j31Du9Jdk2hcaCucJwGEAC0c7IIlMXoj9Z0jIeuAwybKlAhd21JC846LajEuSjwTopQ5S7tto3ON6TVq8z5hg7OUq85HTUjcPVWKKvfJFsBljn03iJ/sfIidkMJ/uVS5CXRYuWpR/bryfsfwWdTJyj2f1uve5+qoieJcituK6wtoOXykZvpDQfJ4U9zlojaU93OYITNLrfN/AYJRQV2jcTLK0nOYgn+kvprvetp9RnfQ0VHs94F6/hng2wbFDm9b6mUAg3Hf5nYhvMlfY/Qbdh3ijqNVigPYfw+ix9GjswaLcejjxDgmhuzd4QyBoLvm7v4VT03vKwBk+Gv7ZuLsx8FaYtIYzJCA7Kl8poIDOBqYkMomDkEP5ievaDin4jO246dw4OlZIq3Y+Wira7W5xiEQeVrkuHwPP2eUM1nADmbNfuYbuP0MnNINp7eKOiznGTEThnhJwTWh0f49LlBXl2oYISvB/+X9BadPoy+evraDwmhC+Z5XYaQ6Tvv4GwsRUcjZdzdJsjJuBME2S62+TihY1X6vZMAgjp5R0d8nIy8+pLivBB0RPrqVnceBl8NMpe6yU2vDGpO0TCRd9/UqYMo6gUaVYrS1l7POCpczA0KZHXLjSV5a/fzt/5Z/LzR3dJSaJn3PsUHgXZ4P7z8M1+VF2KShO0wFRx1IZ7KKNb5S6NOUbIrT6+1pzfjwCY/RVV8O9atS1k/ceAStA4rjXzrrbpPTcd3Lk0WuYYe+U2ZOHaQwCFVPo+l0WCK8y5ihO9ync70xx+C6Lq9Df/2C4hz04w8/YyV0Q+5Wsmz0I5ExOL8f5+ji7XEjEZdPLEBLl8kdWWpuR3A0/cfEY5jr1a2o1O+V41P+m194wHcTICK7bDbBUb+/ICvLe1AcyhQ+9yaV7vYFiTy6awXdJEhy65yekSv6TfowRyEHbtJsJezXehZLybqO9HDGzsdFXRBIiVsqvZiUiPhGUejFZ+lF0nJziqfCpnCtUIC9rSN8M+aFckWUJ8vKCA6NKgGkqqVEEG4+vC40rhqgsUXRJ0H/9+y7C6ZGq1ENXqTTXJRWLD83CI8JN2nwOmAMO25yQ6cXpmxjy0inoyoUOZSVsm7MDvbO5vaSJCSvmcZtv7Uat401+l7V6/LB1RZu+iPnSqam3uw/fO44/eI4mLSfsQ7OLArFZQ1ylKfoB/HcgGo7iD+fB6acnYezP3w2NxJLvjc5UtXTlJPMuvkF0Nxyg1QbcjBtUasNt7rvvCTy9lgz8JV0CcH64235Mn4BoBcntan44xuSr8UN58yw/DcWuMjuFt7A3U8U7g2hfjIhJctCIGyLSiInT3A1rZOBW/bGVCM7U7iSdIkwMKpFvtjl/f1cfTlcmVEJolcZLmJWbYIhDbeLnCcbMt3abT1Krt8aNGIzDpLWS2ExTquZsm1ovhXMZgUce3eGDgDEvKs57tBvAZfoWOxP61pG1esNYGstg70/AoPBegAA==",Qp=({size:r,className:a})=>c.jsx("img",{src:ax,alt:"",width:r,height:r,decoding:"async",draggable:!1,className:`shrink-0 rounded-full object-cover ${a??""}`.trim()}),ox=2500,ix=(r,a)=>{const[o,l]=x.useState(!1),[d,p]=x.useState(r);return d!==r&&(p(r),d&&!r&&a==="done"&&l(!0)),x.useEffect(()=>{if(!o)return;const f=window.setTimeout(()=>{l(!1)},ox);return()=>{window.clearTimeout(f)}},[o]),o},lx=12e3,sx=5e3,Yp="aid_mode",Zp=x.createContext(null),G=()=>{const r=x.useContext(Zp);if(!r)throw new Error("useChat outside ChatProvider");return r},gs=(r,a)=>a.kind==="code"?zt(r,`errors.${a.code}`):a.kind==="status"?a.status===0?zt(r,"errors.network"):zt(r,"errors.code",{code:a.status}):zt(r,"errors.generic"),cn="temp-thread",cx=(r=null)=>({config:null,configError:!1,configErrorCode:null,health:{},mode:r,threads:[],threadsError:!1,threadsLoaded:!1,thread:null,loadingThread:null,turn:null,limit:{remaining:null,daily:null,blocked:!1,overloaded:!1},notice:null}),ms=(r,a,o)=>r&&{...r,messages:r.messages.map(l=>l.id===a?o(l):l)},dx=(r,a,o)=>{const l=new Map;for(const d of r?.steps??[])typeof d.id=="string"&&typeof d.startedAt=="number"&&l.set(d.id,d.startedAt);return{...a,steps:a.steps.map(d=>({...d,startedAt:l.get(d.id)??o}))}},ux=(r,a)=>{const o=new Date(a).toISOString();return{id:cn,title:r.query.slice(0,80),mode:r.mode,pinned:!1,created_at:o,updated_at:o,current_leaf_id:null,messages:[]}},px=r=>({id:r.id,title:r.title,mode:r.mode,pinned:r.pinned,created_at:r.created_at,updated_at:r.updated_at}),fx=["widget_unauthorized","origin_not_allowed","origin_blocked"],hx=r=>r.configError?r.limit.overloaded?"overloaded":r.configErrorCode!==null&&fx.includes(r.configErrorCode)?"siteBlocked":"unavailable":r.config?null:"loading",gx=(r,a)=>{switch(a.type){case"config":{const{config:o}=a,l=o.modes.map(f=>f.slug),d=r.mode&&l.includes(r.mode)?r.mode:l[0]??null,p=o.visitor.remaining_today;return{...r,config:o,configError:!1,configErrorCode:null,mode:d,limit:{remaining:p,daily:o.visitor.daily_limit,blocked:p<=0,overloaded:!1,...p<=0&&(o.visitor.resets_at??r.limit.resetAt)?{resetAt:o.visitor.resets_at??r.limit.resetAt}:{}}}}case"configError":return{...r,configError:!0,configErrorCode:a.code??null,...a.overloaded?{limit:{...r.limit,blocked:!0,overloaded:!0}}:{}};case"health":return{...r,health:a.health};case"mode":return{...r,mode:a.mode};case"threads":return{...r,threads:a.threads,threadsError:!1,threadsLoaded:!0};case"threadsError":return{...r,threadsError:!0,threadsLoaded:!0};case"threadLoading":return{...r,loadingThread:a.id};case"thread":{if(r.turn&&r.thread?.id===a.thread.id||r.loadingThread!==a.thread.id&&r.thread?.id!==a.thread.id)return r;const o=r.config?.modes.map(l=>l.slug)??[];return{...r,thread:a.thread,loadingThread:null,mode:o.includes(a.thread.mode)?a.thread.mode:r.mode}}case"threadFailed":return r.loadingThread===a.id?{...r,loadingThread:null,notice:{kind:"error",reason:a.reason}}:r;case"newChat":return{...r,thread:null,loadingThread:null,turn:null,notice:null};case"threadDeleted":{const o=r.thread?.id===a.id;return{...r,threads:r.threads.filter(l=>l.id!==a.id),...o?{thread:null,turn:null}:{}}}case"turnStart":{const{request:o,token:l,at:d}=a,p=r.thread??ux(o,d),{user:f,assistant:h}=m0(o,p);return{...r,notice:null,thread:{...p,current_leaf_id:h.id,messages:[...p.messages,...f?[f]:[],h]},turn:{token:l,assistantId:h.id,...f?{userId:f.id}:{},startedAt:d,adopted:!1,previousLeaf:p.current_leaf_id,optimisticIds:[h.id,...f?[f.id]:[]]}}}case"resumeStart":return{...r,turn:{token:a.token,assistantId:a.messageId,startedAt:a.at,adopted:!0,previousLeaf:r.thread?.current_leaf_id??null,optimisticIds:[]}};case"adopt":{const{turn:o,thread:l}=r;if(o?.token!==a.token||o.adopted||!l)return r;const{metadata:d}=a,p=l.id===cn,f=b0(l,{...o.userId?{userId:o.userId}:{},assistantId:o.assistantId},d),h=r.limit.remaining===null?null:Math.max(0,r.limit.remaining-1);return{...r,thread:f,threads:p?[px(f),...r.threads.filter(m=>m.id!==f.id)]:r.threads,turn:{...o,adopted:!0,assistantId:d.assistantMessageId,...o.userId?{userId:d.userMessageId}:{}},limit:{...r.limit,remaining:h}}}case"snapshot":{const{turn:o}=r;if(o?.token!==a.token)return r;const l=r.thread?.messages.find(p=>p.id===o.assistantId),d=dx(l,a.snapshot,a.at);return{...r,thread:ms(r.thread,o.assistantId,p=>x0(p,d))}}case"turnEnd":{const{turn:o}=r;if(o?.token!==a.token)return r;const l=a.status==="detached"?r.thread:ms(r.thread,o.assistantId,d=>v0(d,a.status,a.errorText,o.startedAt));return{...r,thread:l,turn:null,limit:{...r.limit,blocked:r.limit.blocked||r.limit.remaining===0}}}case"turnStopping":return r.turn?.token===a.token?{...r,turn:{...r.turn,stopping:!0}}:r;case"turnRejected":{const{turn:o,thread:l}=r;if(o?.token!==a.token)return r;const d=new Set(o.optimisticIds),p=l?.messages.filter(j=>!d.has(j.id))??[],f=l&&(l.id!==cn||p.length>0)?{...l,current_leaf_id:o.previousLeaf,messages:p}:null,{error:h}=a,m=h.status===429&&h.code==="daily_limit",v=h.status===503&&h.code==="anon_budget";let b=r.limit;return m?b={...b,remaining:0,blocked:!0,...h.resetAt?{resetAt:h.resetAt}:{}}:v&&(b={...b,blocked:!0,overloaded:!0}),{...r,thread:f,turn:null,notice:m||v?null:{kind:"error",reason:h.reason},limit:b}}case"leaf":return r.thread?{...r,thread:{...r.thread,current_leaf_id:a.leafId}}:r;case"rating":return{...r,thread:ms(r.thread,a.messageId,o=>({...o,rating:a.rating,...a.feedback!==void 0?{feedback:a.feedback}:{},...a.feedbackReason!==void 0?{feedback_reason:a.feedbackReason}:{}}))};case"notice":return{...r,notice:a.notice}}},bs=r=>{const a=r?r.messages.map(Np):[],o=zp(a),l=Mp(o,r?.current_leaf_id??null);return{index:o,path:l?u0(o,l):[]}},mx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bx=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,o,l)=>l?l.toUpperCase():o.toLowerCase()),Jp=r=>{const a=bx(r);return a.charAt(0).toUpperCase()+a.slice(1)},Gp=(...r)=>r.filter((a,o,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===o).join(" ").trim(),xx=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var vx={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 yx=x.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:d="",children:p,iconNode:f,...h},m)=>x.createElement("svg",{ref:m,...vx,width:a,height:a,stroke:r,strokeWidth:l?Number(o)*24/Number(a):o,className:Gp("lucide",d),...!p&&!xx(h)&&{"aria-hidden":"true"},...h},[...f.map(([v,b])=>x.createElement(v,b)),...Array.isArray(p)?p:[p]])),se=(r,a)=>{const o=x.forwardRef(({className:l,...d},p)=>x.createElement(yx,{ref:p,iconNode:a,className:Gp(`lucide-${mx(Jp(r))}`,`lucide-${r}`,l),...d}));return o.displayName=Jp(r),o},wx=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ef=se("arrow-down",wx),kx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],jx=se("arrow-right",kx),Sx=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Cx=se("arrow-up-down",Sx),Nx=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],tf=se("arrow-up",Nx),Ex=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Oo=se("book-open",Ex),_x=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],zx=se("bot",_x),Rx=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]],Mx=se("chart-column-big",Rx),Px=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_r=se("check",Px),Lx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dn=se("chevron-down",Lx),Dx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rf=se("chevron-left",Dx),Tx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$o=se("chevron-right",Tx),Ix=[["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"}]],zr=se("circle-alert",Ix),Ax=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],nf=se("circle-minus",Ax),Ox=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],xs=se("clock",Ox),$x=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],vs=se("copy",$x),Fx=[["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"}]],Ux=se("database",Fx),qx=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],af=se("download",qx),Vx=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ys=se("external-link",Vx),Bx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],Wx=se("file-chart-column-increasing",Bx),Hx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Xx=se("file-down",Hx),Kx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Qx=se("file-text",Kx),Yx=[["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"}]],Zx=se("globe",Yx),Jx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],of=se("info",Jx),Gx=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],ev=se("landmark",Gx),tv=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rr=se("loader-circle",tv),rv=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],lf=se("lock",rv),nv=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],av=se("map",nv),ov=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],sf=se("maximize-2",ov),iv=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lv=se("message-circle-question",iv),sv=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],cv=se("message-circle",sv),dv=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],cf=se("message-square-text",dv),uv=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],df=se("message-square",uv),pv=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],uf=se("minimize-2",pv),fv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],hv=se("panel-left-close",fv),gv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],mv=se("panel-left",gv),bv=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],xv=se("paperclip",bv),vv=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],pf=se("pen-line",vv),yv=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],wv=se("pencil",yv),kv=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],jv=se("receipt",kv),Sv=[["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"}]],ff=se("rotate-ccw",Sv),Cv=[["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"}]],hf=se("rotate-cw",Cv),Nv=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Ev=se("scale",Nv),_v=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],la=se("search",_v),zv=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Rv=se("settings",zv),Mv=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],ws=se("sparkles",Mv),Pv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],gf=se("square",Pv),Lv=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Dv=se("star",Lv),Tv=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],Iv=se("table-2",Tv),Av=[["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"}]],Ov=se("trash-2",Av),$v=[["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-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fo=se("triangle-alert",$v),Fv=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Uv=se("trending-up",Fv),qv=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Vv=se("users",qv),Bv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sa=se("x",Bv);function mf(r){var a,o,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r))for(a=0;a<r.length;a++)r[a]&&(o=mf(r[a]))&&(l&&(l+=" "),l+=o);else for(a in r)r[a]&&(l&&(l+=" "),l+=a);return l}function Wv(){for(var r,a,o=0,l="";o<arguments.length;)(r=arguments[o++])&&(a=mf(r))&&(l&&(l+=" "),l+=a);return l}const ks="-",Hv=r=>{const a=Kv(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:l}=r;return{getClassGroupId:d=>{const p=d.split(ks);return p[0]===""&&p.length!==1&&p.shift(),bf(p,a)||Xv(d)},getConflictingClassGroupIds:(d,p)=>{const f=o[d]||[];return p&&l[d]?[...f,...l[d]]:f}}},bf=(r,a)=>{if(r.length===0)return a.classGroupId;const o=r[0],l=a.nextPart.get(o),d=l?bf(r.slice(1),l):void 0;if(d)return d;if(a.validators.length===0)return;const p=r.join(ks);return a.validators.find(({validator:f})=>f(p))?.classGroupId},xf=/^\[(.+)\]$/,Xv=r=>{if(xf.test(r)){const a=xf.exec(r)[1],o=a?.substring(0,a.indexOf(":"));if(o)return"arbitrary.."+o}},Kv=r=>{const{theme:a,prefix:o}=r,l={nextPart:new Map,validators:[]};return Yv(Object.entries(r.classGroups),o).forEach(([d,p])=>{js(p,l,d,a)}),l},js=(r,a,o,l)=>{r.forEach(d=>{if(typeof d=="string"){const p=d===""?a:vf(a,d);p.classGroupId=o;return}if(typeof d=="function"){if(Qv(d)){js(d(l),a,o,l);return}a.validators.push({validator:d,classGroupId:o});return}Object.entries(d).forEach(([p,f])=>{js(f,vf(a,p),o,l)})})},vf=(r,a)=>{let o=r;return a.split(ks).forEach(l=>{o.nextPart.has(l)||o.nextPart.set(l,{nextPart:new Map,validators:[]}),o=o.nextPart.get(l)}),o},Qv=r=>r.isThemeGetter,Yv=(r,a)=>a?r.map(([o,l])=>{const d=l.map(p=>typeof p=="string"?a+p:typeof p=="object"?Object.fromEntries(Object.entries(p).map(([f,h])=>[a+f,h])):p);return[o,d]}):r,Zv=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,o=new Map,l=new Map;const d=(p,f)=>{o.set(p,f),a++,a>r&&(a=0,l=o,o=new Map)};return{get(p){let f=o.get(p);if(f!==void 0)return f;if((f=l.get(p))!==void 0)return d(p,f),f},set(p,f){o.has(p)?o.set(p,f):d(p,f)}}},yf="!",Jv=r=>{const{separator:a,experimentalParseClassName:o}=r,l=a.length===1,d=a[0],p=a.length,f=h=>{const m=[];let v=0,b=0,j;for(let M=0;M<h.length;M++){let F=h[M];if(v===0){if(F===d&&(l||h.slice(M,M+p)===a)){m.push(h.slice(b,M)),b=M+p;continue}if(F==="/"){j=M;continue}}F==="["?v++:F==="]"&&v--}const k=m.length===0?h:h.substring(b),S=k.startsWith(yf),_=S?k.substring(1):k,E=j&&j>b?j-b:void 0;return{modifiers:m,hasImportantModifier:S,baseClassName:_,maybePostfixModifierPosition:E}};return o?h=>o({className:h,parseClassName:f}):f},Gv=r=>{if(r.length<=1)return r;const a=[];let o=[];return r.forEach(l=>{l[0]==="["?(a.push(...o.sort(),l),o=[]):o.push(l)}),a.push(...o.sort()),a},e1=r=>({cache:Zv(r.cacheSize),parseClassName:Jv(r),...Hv(r)}),t1=/\s+/,r1=(r,a)=>{const{parseClassName:o,getClassGroupId:l,getConflictingClassGroupIds:d}=a,p=[],f=r.trim().split(t1);let h="";for(let m=f.length-1;m>=0;m-=1){const v=f[m],{modifiers:b,hasImportantModifier:j,baseClassName:k,maybePostfixModifierPosition:S}=o(v);let _=!!S,E=l(_?k.substring(0,S):k);if(!E){if(!_){h=v+(h.length>0?" "+h:h);continue}if(E=l(k),!E){h=v+(h.length>0?" "+h:h);continue}_=!1}const M=Gv(b).join(":"),F=j?M+yf:M,Z=F+E;if(p.includes(Z))continue;p.push(Z);const oe=d(E,_);for(let J=0;J<oe.length;++J){const ne=oe[J];p.push(F+ne)}h=v+(h.length>0?" "+h:h)}return h};function n1(){let r=0,a,o,l="";for(;r<arguments.length;)(a=arguments[r++])&&(o=wf(a))&&(l&&(l+=" "),l+=o);return l}const wf=r=>{if(typeof r=="string")return r;let a,o="";for(let l=0;l<r.length;l++)r[l]&&(a=wf(r[l]))&&(o&&(o+=" "),o+=a);return o};function a1(r,...a){let o,l,d,p=f;function f(m){const v=a.reduce((b,j)=>j(b),r());return o=e1(v),l=o.cache.get,d=o.cache.set,p=h,h(m)}function h(m){const v=l(m);if(v)return v;const b=r1(m,o);return d(m,b),b}return function(){return p(n1.apply(null,arguments))}}const Pe=r=>{const a=o=>o[r]||[];return a.isThemeGetter=!0,a},kf=/^\[(?:([a-z-]+):)?(.+)\]$/i,o1=/^\d+\/\d+$/,i1=new Set(["px","full","screen"]),l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s1=/\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$/,c1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=r=>un(r)||i1.has(r)||o1.test(r),ur=r=>pn(r,"length",v1),un=r=>!!r&&!Number.isNaN(Number(r)),Ss=r=>pn(r,"number",un),ca=r=>!!r&&Number.isInteger(Number(r)),p1=r=>r.endsWith("%")&&un(r.slice(0,-1)),we=r=>kf.test(r),pr=r=>l1.test(r),f1=new Set(["length","size","percentage"]),h1=r=>pn(r,f1,jf),g1=r=>pn(r,"position",jf),m1=new Set(["image","url"]),b1=r=>pn(r,m1,w1),x1=r=>pn(r,"",y1),da=()=>!0,pn=(r,a,o)=>{const l=kf.exec(r);return l?l[1]?typeof a=="string"?l[1]===a:a.has(l[1]):o(l[2]):!1},v1=r=>s1.test(r)&&!c1.test(r),jf=()=>!1,y1=r=>d1.test(r),w1=r=>u1.test(r),k1=()=>{const r=Pe("colors"),a=Pe("spacing"),o=Pe("blur"),l=Pe("brightness"),d=Pe("borderColor"),p=Pe("borderRadius"),f=Pe("borderSpacing"),h=Pe("borderWidth"),m=Pe("contrast"),v=Pe("grayscale"),b=Pe("hueRotate"),j=Pe("invert"),k=Pe("gap"),S=Pe("gradientColorStops"),_=Pe("gradientColorStopPositions"),E=Pe("inset"),M=Pe("margin"),F=Pe("opacity"),Z=Pe("padding"),oe=Pe("saturate"),J=Pe("scale"),ne=Pe("sepia"),$=Pe("skew"),X=Pe("space"),K=Pe("translate"),he=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ue=()=>["auto",we,a],W=()=>[we,a],Q=()=>["",Bt,ur],be=()=>["auto",un,we],Ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ve=()=>["solid","dashed","dotted","double","none"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",we],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>[un,we];return{cacheSize:500,separator:":",theme:{colors:[da],spacing:[Bt,ur],blur:["none","",pr,we],brightness:w(),borderColor:[r],borderRadius:["none","","full",pr,we],borderSpacing:W(),borderWidth:Q(),contrast:w(),grayscale:D(),hueRotate:w(),invert:D(),gap:W(),gradientColorStops:[r],gradientColorStopPositions:[p1,ur],inset:ue(),margin:ue(),opacity:w(),padding:W(),saturate:w(),scale:w(),sepia:D(),skew:w(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[pr]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:[...Ne(),we]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:he()}],"overscroll-x":[{"overscroll-x":he()}],"overscroll-y":[{"overscroll-y":he()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ca,we]}],basis:[{basis:ue()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ca,we]}],"grid-cols":[{"grid-cols":[da]}],"col-start-end":[{col:["auto",{span:["full",ca,we]},we]}],"col-start":[{"col-start":be()}],"col-end":[{"col-end":be()}],"grid-rows":[{"grid-rows":[da]}],"row-start-end":[{row:["auto",{span:[ca,we]},we]}],"row-start":[{"row-start":be()}],"row-end":[{"row-end":be()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Z]}],px:[{px:[Z]}],py:[{py:[Z]}],ps:[{ps:[Z]}],pe:[{pe:[Z]}],pt:[{pt:[Z]}],pr:[{pr:[Z]}],pb:[{pb:[Z]}],pl:[{pl:[Z]}],m:[{m:[M]}],mx:[{mx:[M]}],my:[{my:[M]}],ms:[{ms:[M]}],me:[{me:[M]}],mt:[{mt:[M]}],mr:[{mr:[M]}],mb:[{mb:[M]}],ml:[{ml:[M]}],"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",we,a]}],"min-w":[{"min-w":[we,a,"min","max","fit"]}],"max-w":[{"max-w":[we,a,"none","full","min","max","fit","prose",{screen:[pr]},pr]}],h:[{h:[we,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[we,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[we,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[we,a,"auto","min","max","fit"]}],"font-size":[{text:["base",pr,ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ss]}],"font-family":[{font:[da]}],"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",we]}],"line-clamp":[{"line-clamp":["none",un,Ss]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bt,we]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bt,ur]}],"underline-offset":[{"underline-offset":["auto",Bt,we]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],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",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ne(),g1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",h1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},b1]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[p]}],"rounded-s":[{"rounded-s":[p]}],"rounded-e":[{"rounded-e":[p]}],"rounded-t":[{"rounded-t":[p]}],"rounded-r":[{"rounded-r":[p]}],"rounded-b":[{"rounded-b":[p]}],"rounded-l":[{"rounded-l":[p]}],"rounded-ss":[{"rounded-ss":[p]}],"rounded-se":[{"rounded-se":[p]}],"rounded-ee":[{"rounded-ee":[p]}],"rounded-es":[{"rounded-es":[p]}],"rounded-tl":[{"rounded-tl":[p]}],"rounded-tr":[{"rounded-tr":[p]}],"rounded-br":[{"rounded-br":[p]}],"rounded-bl":[{"rounded-bl":[p]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...ve(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:ve()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...ve()]}],"outline-offset":[{"outline-offset":[Bt,we]}],"outline-w":[{outline:[Bt,ur]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[Bt,ur]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",pr,x1]}],"shadow-color":[{shadow:[da]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ye()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[l]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",pr,we]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[j]}],saturate:[{saturate:[oe]}],sepia:[{sepia:[ne]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[j]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[oe]}],"backdrop-sepia":[{"backdrop-sepia":[ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[f]}],"border-spacing-x":[{"border-spacing-x":[f]}],"border-spacing-y":[{"border-spacing-y":[f]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",we]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[J]}],"scale-x":[{"scale-x":[J]}],"scale-y":[{"scale-y":[J]}],rotate:[{rotate:[ca,we]}],"translate-x":[{"translate-x":[K]}],"translate-y":[{"translate-y":[K]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",we]}],accent:[{accent:["auto",r]}],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",we]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"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",we]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[Bt,ur,Ss]}],stroke:[{stroke:[r,"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"]}}},j1=a1(k1),B=(...r)=>j1(Wv(r));x.createContext(!0),x.createContext(!1);const Cs="opacity-0 transition-opacity motion-reduce:transition-none group-focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100",Sf=120,S1=200,Cf=".xls,.xlsx,.csv,.txt,.md",Ns=2e3,Nf=["wrong_number","wrong_indicator","wrong_territory","wrong_period","not_answered","language","slow","other"],Ef=[1,2,3],_f=r=>r==null?null:Math.min(r,Ef.length),fn=r=>{const a=r?.trim();if(!a)return null;if(a.startsWith("#"))return a;if(!/^https?:\/\//i.test(a))return null;try{return new URL(a),a}catch{return null}},zf=r=>r.replace(/[\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),Es=async r=>{try{return await navigator.clipboard.writeText(r),!0}catch{return C1(r)}},C1=r=>{const a=document.createElement("textarea");a.value=r,a.setAttribute("readonly",""),a.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(a),a.select();try{return document.execCommand("copy")}catch{return!1}finally{a.remove()}},N1=(r,a)=>{const o=document.createElement("a");o.href=r,o.download=a,o.rel="noopener",o.style.display="none",document.body.append(o),o.click(),o.remove(),window.setTimeout(()=>{URL.revokeObjectURL(r)},6e4)},E1=["group.pinned","group.today","group.yesterday","group.week","group.earlier"],Rf=864e5,_1=(r,a=new Date)=>{const o=new Date(a.getFullYear(),a.getMonth(),a.getDate()).getTime(),l=new Map;for(const d of r){const p=new Date(d.updated_at).getTime();let f;d.pinned?f="group.pinned":p>=o?f="group.today":p>=o-Rf?f="group.yesterday":p>=o-7*Rf?f="group.week":f="group.earlier",l.set(f,[...l.get(f)??[],d])}return E1.flatMap(d=>{const p=l.get(d);return p?[[d,p]]:[]})},Uo={text:2e5,steps:500,blocks:100,attachments:50},Mf=r=>r.text.length>Uo.text||r.steps.length>Uo.steps||r.blocks.length>Uo.blocks||r.attachments.length>Uo.attachments,z1=r=>r.code==="ip_limit"?{kind:"code",code:"ip_limit"}:Po(r),Pf=()=>{try{return window.localStorage}catch{return null}},R1=()=>{try{return Pf()?.getItem(Yp)??null}catch{return null}},M1=r=>r instanceof TypeError,P1=({api:r,lang:a,open:o,onAdminTheme:l,children:d})=>{const[p,f]=x.useReducer(gx,null,()=>cx(R1())),h=x.useRef(p),m=x.useRef(null),v=x.useRef(0),b=x.useRef(a),j=x.useRef(l);x.useLayoutEffect(()=>{h.current=p,b.current=a,j.current=l});const k=x.useCallback(()=>{r.threads().then(D=>{f({type:"threads",threads:D})},()=>{f({type:"threadsError"})})},[r]),S=x.useCallback(()=>{r.config().then(D=>{f({type:"config",config:D}),j.current(L0(D.site.theme)),r.adoptVisitor(D.visitor.token)&&k()},D=>{const T=D instanceof Ge&&D.status===503,w=D instanceof Ge?D.code:null;f({type:"configError",...T?{overloaded:T}:{},...w?{code:w}:{}})})},[r,k]),_=x.useCallback(D=>{r.thread(D).then(T=>{f({type:"thread",thread:T})},()=>{})},[r]);x.useEffect(()=>{S(),k()},[S,k]);const E=p.config!==null;x.useEffect(()=>{if(!o||!E)return;const D=()=>{typeof document<"u"&&document.visibilityState==="hidden"||r.health().then(w=>{f({type:"health",health:w})},()=>{})};D();const T=window.setInterval(D,lx);return window.addEventListener("focus",D),()=>{window.clearInterval(T),window.removeEventListener("focus",D)}},[r,o,E]);const M=x.useCallback(()=>{m.current?.controller.abort(),m.current=null},[]);x.useEffect(()=>M,[M]);const F=D=>{const T={token:++v.current,controller:new AbortController,stopRequested:!1,...D?{assistantId:D}:{}};return m.current=T,T},Z=(D,T)=>D.stopRequested?"stopped":D.tooBig?"error":D.controller.signal.aborted?"detached":T?"error":"done",oe=D=>{m.current===D&&(m.current=null)},J=(D,T,w)=>{oe(D),k(),w&&T&&T!==cn&&_(T)},ne=x.useCallback(async D=>{const T=h.current;if(T.turn||m.current||T.limit.blocked)return"busy";const w=T.thread&&T.thread.id!==cn?T.thread.id:void 0,L=F(),{token:H}=L;f({type:"turnStart",token:H,request:D,at:Date.now()});let V=w;const pe=xe=>{if(Mf(xe)){L.tooBig=!0,L.controller.abort();return}xe.metadata&&L.assistantId===void 0&&(L.assistantId=xe.metadata.assistantMessageId,V=xe.metadata.threadId,f({type:"adopt",token:H,metadata:xe.metadata})),f({type:"snapshot",token:H,snapshot:xe,at:Date.now()})};let fe,Se=!1;try{const{streamChatAnswer:xe}=await import("./stream-entry-CdtxSd08.js");await xe({transport:r.transport,request:D,...w?{threadId:w}:{},signal:L.controller.signal,onSnapshot:pe})}catch(xe){Se=!0,fe=xe}if(L.assistantId===void 0&&(fe instanceof Ge||M1(fe))){const xe=fe instanceof Ge?fe:new Ge(0,"network",null);return f({type:"turnRejected",token:H,error:{status:xe.status,code:xe.code,resetAt:xe.resetAt,reason:z1(xe)}}),oe(L),xe.status===429&&S(),"rejected"}const ke=Z(L,Se);return f({type:"turnEnd",token:H,status:ke,errorText:ke==="error"?gs(b.current,Po(fe)):""}),J(L,V,ke==="done"||ke==="stopped"),"sent"},[r,S,k,_]),$=x.useCallback(async(D,T)=>{if(m.current)return;const w=F(T),{token:L}=w;f({type:"resumeStart",token:L,messageId:T,at:Date.now()});let H,V=!1;try{const{resumeChatAnswer:fe}=await import("./stream-entry-CdtxSd08.js");await fe(r.transport,T,w.controller.signal,Se=>{if(Mf(Se)){w.tooBig=!0,w.controller.abort();return}f({type:"snapshot",token:L,snapshot:Se,at:Date.now()})})}catch(fe){V=!0,H=fe}if(H instanceof Ge){f({type:"turnEnd",token:L,status:"detached",errorText:""}),J(w,D.id,!0);return}const pe=Z(w,V);f({type:"turnEnd",token:L,status:pe,errorText:pe==="error"?gs(b.current,Po(H)):""}),J(w,D.id,pe==="done"||pe==="stopped")},[r,k,_]),X=x.useCallback(()=>{const D=m.current;if(!D)return;if(D.stopRequested=!0,f({type:"turnStopping",token:D.token}),D.assistantId===void 0){D.controller.abort();return}const T=window.setTimeout(()=>{D.controller.abort()},sx);D.controller.signal.addEventListener("abort",()=>{window.clearTimeout(T)},{once:!0}),r.stop(D.assistantId).catch(()=>{D.controller.abort()})},[r]),K=x.useCallback(D=>{h.current.thread?.id!==D&&(M(),f({type:"newChat"}),f({type:"threadLoading",id:D}),r.thread(D).then(T=>{f({type:"thread",thread:T});const{path:w}=bs(T),L=w[w.length-1];L?.role==="assistant"&&L.status==="streaming"&&$(T,L.id)},T=>{f({type:"threadFailed",id:D,reason:Po(T)})}))},[r,M,$]),he=x.useCallback(()=>{M(),f({type:"newChat"})},[M]),ee=x.useCallback(async D=>{try{await r.deleteThread(D),h.current.thread?.id===D&&M(),f({type:"threadDeleted",id:D})}catch{f({type:"notice",notice:{kind:"text",key:"deleteError"}})}},[r,M]),ue=x.useMemo(()=>bs(p.thread),[p.thread]),W=x.useCallback(D=>{const{thread:T}=h.current;if(!T||h.current.turn)return;const w=Rp(bs(T).index,D),L=T.current_leaf_id;!w||w===L||(f({type:"leaf",leafId:w}),r.setLeaf(T.id,w).catch(()=>{f({type:"leaf",leafId:L}),f({type:"notice",notice:{kind:"text",key:"branch.error"}})}))},[r]),Q=x.useCallback((D,T)=>{const w=h.current.thread?.messages.find(V=>V.id===D);if(!w)return;const L=w.rating,H=T===_f(L)?null:T;f({type:"rating",messageId:D,rating:H}),r.rate(D,H).catch(()=>{f({type:"rating",messageId:D,rating:L}),f({type:"notice",notice:{kind:"text",key:"ratingError"}})})},[r]),be=x.useCallback(async(D,T,w)=>{const L=h.current.thread?.messages.find(H=>H.id===D);try{return await r.feedback(D,T,w),f({type:"rating",messageId:D,rating:L?.rating??null,feedback:T,feedbackReason:w??""}),!0}catch{return!1}},[r]),Ne=x.useCallback(D=>{f({type:"mode",mode:D});try{Pf()?.setItem(Yp,D)}catch{}},[]),ve=x.useCallback(()=>{f({type:"notice",notice:null})},[]),ye=x.useCallback((D,T)=>zt(a,D,T),[a]),U=x.useMemo(()=>({state:p,lang:a,api:r,t:ye,path:ue.path,index:ue.index,send:ne,stop:X,openThread:K,newChat:he,deleteThread:ee,refreshThreads:k,switchBranch:W,rate:Q,saveFeedback:be,selectMode:Ne,reload:()=>{S(),k()},dismissNotice:ve}),[p,a,r,ye,ue,ne,X,K,he,ee,k,W,Q,be,Ne,S,ve]);return c.jsx(Zp.Provider,{value:U,children:d})},_s=r=>x.useSyncExternalStore(a=>{if(typeof matchMedia>"u")return()=>{};const o=matchMedia(r);return o.addEventListener("change",a),()=>{o.removeEventListener("change",a)}},()=>typeof matchMedia<"u"&&matchMedia(r).matches,()=>!1),L1=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),D1=(r,a)=>{if(r.getAttribute("tabindex")==="-1"||r.getAttribute("aria-hidden")==="true"||getComputedStyle(r).visibility==="hidden")return!1;for(let o=r;o;o=o.parentElement){if(o.hasAttribute("inert")||o.hasAttribute("hidden")||getComputedStyle(o).display==="none")return!1;if(o===a)break}return!a.closest("[inert]")},Lf=r=>Array.from(r.querySelectorAll(L1)).filter(a=>D1(a,r)),Mr=(r,a)=>{x.useLayoutEffect(()=>{r.current?.toggleAttribute("inert",a)},[r,a])},Df=r=>{const a=r.getRootNode();return a instanceof ShadowRoot||a instanceof Document?a.activeElement:null},qo=(r,a,o)=>{const l=x.useRef(o);x.useEffect(()=>{l.current=o}),x.useEffect(()=>{const d=r.current;if(!a||!d)return;const p=Df(d);(d.querySelector("[data-autofocus]")??Lf(d)[0])?.focus({preventScroll:!0});const f=h=>{if(h.key!=="Tab")return;const m=Lf(d),v=m[0],b=m[m.length-1];if(!v||!b){h.preventDefault();return}const j=Df(d);h.shiftKey&&(j===v||!d.contains(j))?(h.preventDefault(),b.focus()):!h.shiftKey&&(j===b||!d.contains(j))&&(h.preventDefault(),v.focus())};return d.addEventListener("keydown",f),()=>{d.removeEventListener("keydown",f),((p instanceof HTMLElement&&p.tagName!=="BODY"&&p.isConnected&&!d.contains(p)?p:null)??l.current?.())?.focus({preventScroll:!0})}},[r,a])},T1=8,I1=9,fr=(r,a)=>r.find(o=>o.kind===a),Tf=r=>r.filter(a=>a.kind==="report").at(-1),A1=r=>r.filter(a=>a.kind==="export").flatMap(a=>a.files),O1=(r,a)=>{const o=r.findIndex(p=>p.id===a),l=o>0?r[o-1]:void 0,d=o>=0?r[o+1]:void 0;return{question:l?.role==="user"?l.content:"",reply:d?.role==="user"?d.content:""}},$1=500,F1=(r,a,o)=>{const l=a.trim();if(l.length<1||l.length>$1)return;const d=r[r.length-1];if(d?.role!=="assistant")return;const p=fr(d.blocks,"clarification");if(p?.allow_free_text&&mp(p,{isLastInBranch:!0,now:o})==="open")return{clarification_id:p.id,slot:p.slot,value:null,free_text:l}},U1=r=>{if(!(r instanceof HTMLElement))return!1;if(r.isContentEditable)return!0;const a=r.tagName;return a==="TEXTAREA"||a==="SELECT"||a==="INPUT"&&!["button","checkbox","radio"].includes(r.type)},q1=r=>typeof r=="number"&&Number.isFinite(r)?r:null,zs=r=>typeof r=="string"?r:typeof r=="number"&&Number.isFinite(r)?String(r):"",ua={messageId:null,sectionId:null,fullscreen:!1,view:"chat"},Rs=(r,a=null)=>({messageId:r,sectionId:a,fullscreen:!1,view:"dashboard"}),If=x.createContext(null),Pr=()=>{},V1={state:ua,open:Pr,toggle:Pr,autoOpen:Pr,close:Pr,setSection:Pr,setFullscreen:Pr,setView:Pr},Lr=()=>x.useContext(If)??V1,B1=1200;function W1(r){const{state:a,setFullscreen:o,close:l}=Lr(),d=x.useRef({fullscreen:a.fullscreen,setFullscreen:o,close:l});x.useEffect(()=>{d.current={fullscreen:a.fullscreen,setFullscreen:o,close:l}}),x.useEffect(()=>{if(!r)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;f.preventDefault();const h=d.current;h.fullscreen?h.setFullscreen(!1):h.close()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r])}const H1=(r,a,o)=>r&&!a&&!o,X1=()=>{const{t:r}=G(),{state:a,setView:o}=Lr(),l=(d,p)=>c.jsx("button",{type:"button",role:"tab","aria-selected":a.view===d,onClick:()=>{o(d)},className:B("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",a.view===d?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:p});return c.jsxs("div",{part:"dashboard-tabs",role:"tablist","aria-label":r("dashboard.view"),className:"inline-flex shrink-0 gap-0.5 rounded-md border bg-background p-0.5",children:[l("chat",r("dashboard.chatTab")),l("dashboard",r("dashboard.dashboardTab"))]})},K1=({wide:r,chat:a,panel:o,onPanelFocusChange:l})=>{const{state:d}=Lr(),{view:p,fullscreen:f}=d,h=o!=null,m=h&&!r&&p==="dashboard",v=h&&!r&&p==="chat"&&!f,b=x.useRef(null);return Mr(b,h&&f),c.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[c.jsx("div",{ref:b,hidden:m,className:B("relative min-h-0 min-w-0 flex-1 flex-col",m?"hidden":"flex"),children:a}),h?c.jsx("aside",{part:"dashboard","data-fullscreen":f,hidden:v,onFocus:()=>{l?.(!0)},onBlur:j=>{j.currentTarget.contains(j.relatedTarget)||l?.(!1)},className:B("min-h-0 min-w-0 flex-col bg-background",v?"hidden":"flex",f&&"absolute inset-0 z-30",!f&&r&&"w-1/2 min-w-[480px] shrink-0 border-l",!f&&!r&&"flex-1 border-t"),children:o}):null]})};var Q1=Object.defineProperty,Ms=(r,a)=>Q1(r,"name",{value:a,configurable:!0});function Ps(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}Ms(Ps,"setRef");function Af(...r){return a=>{let o=!1;const l=r.map(d=>{const p=Ps(d,a);return!o&&typeof p=="function"&&(o=!0),p});if(o)return()=>{for(let d=0;d<l.length;d++){const p=l[d];typeof p=="function"?p():Ps(r[d],null)}}}}Ms(Af,"composeRefs");function Of(...r){return x.useCallback(Af(...r),r)}Ms(Of,"useComposedRefs");var Y1=Object.defineProperty,pt=(r,a)=>Y1(r,"name",{value:a,configurable:!0});function $f(r){const a=x.forwardRef((o,l)=>{let{children:d,...p}=o,f=null,h=!1;const m=[];d=Wf(d),x.Children.forEach(d,k=>{if(Vf(k)){h=!0;const S=k;let _="child"in S.props?S.props.child:S.props.children;for(;Ls(_)&&typeof Vo=="function";)_=Vo(_._payload);f=G1(S,_),m.push(f?.props?.children)}else m.push(k)}),f?f=x.cloneElement(f,void 0,m):!h&&x.Children.count(d)===1&&x.isValidElement(d)&&(f=d);const v=f?qf(f):void 0,b=Of(l,v);if(!f){if(d||d===0)throw new Error(h?ry(r):ty(r));return d}const j=Uf(p,f.props??{});return f.type!==x.Fragment&&(j.ref=l?b:v),x.cloneElement(f,j)});return a.displayName=`${r}.Slot`,a}pt($f,"createSlot");var Z1=$f("Slot"),Ff=Symbol.for("radix.slottable");function J1(r){const a=pt(o=>"child"in o?o.children(o.child):o.children,"Slottable");return a.displayName=`${r}.Slottable`,a.__radixId=Ff,a}pt(J1,"createSlottable");var G1=pt((r,a)=>"child"in r.props?x.isValidElement(a)?x.cloneElement(a,void 0,r.props.children(a.props.children)):null:x.isValidElement(a)?a:null,"getSlottableElementFromSlottable");function Uf(r,a){const o={...a};for(const l in a){const d=r[l],p=a[l];/^on[A-Z]/.test(l)?d&&p?o[l]=(...f)=>{const h=p(...f);return d(...f),h}:d&&(o[l]=d):l==="style"?o[l]={...d,...p}:l==="className"?o[l]=[d,p].filter(Boolean).join(" "):l==="aria-describedby"&&(o[l]=Hf(p,d))}return{...r,...o}}pt(Uf,"mergeProps");function qf(r){let a=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?r.ref:(a=Object.getOwnPropertyDescriptor(r,"ref")?.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?r.props.ref:r.props.ref||r.ref)}pt(qf,"getElementRef");function Vf(r){return x.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Ff}pt(Vf,"isSlottable");var ey=Symbol.for("react.lazy");function Ls(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===ey&&"_payload"in r&&Bf(r._payload)}pt(Ls,"isLazyComponent");function Bf(r){return typeof r=="object"&&r!==null&&"then"in r}pt(Bf,"isPromiseLike");function Wf(r){let a=r;for(;Ls(a)&&typeof Vo=="function";)a=Vo(a._payload);return a}pt(Wf,"useUnwrappedLazy");function Hf(...r){const a=new Set;for(const o of r)if(typeof o=="string")for(const l of String(o).trim().split(/\s+/))l&&a.add(l);return a.size>0?Array.from(a).join(" "):void 0}pt(Hf,"concatAriaDescribedby");var ty=pt(r=>`${r} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ry=pt(r=>`${r} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Vo=gb[" use ".trim().toString()];function Xf(r){var a,o,l="";if(typeof r=="string"||typeof r=="number")l+=r;else if(typeof r=="object")if(Array.isArray(r)){var d=r.length;for(a=0;a<d;a++)r[a]&&(o=Xf(r[a]))&&(l&&(l+=" "),l+=o)}else for(o in r)r[o]&&(l&&(l+=" "),l+=o);return l}function ny(){for(var r,a,o=0,l="",d=arguments.length;o<d;o++)(r=arguments[o])&&(a=Xf(r))&&(l&&(l+=" "),l+=a);return l}const Kf=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Qf=ny,ay=(r,a)=>o=>{var l;if(a?.variants==null)return Qf(r,o?.class,o?.className);const{variants:d,defaultVariants:p}=a,f=Object.keys(d).map(v=>{const b=o?.[v],j=p?.[v];if(b===null)return null;const k=Kf(b)||Kf(j);return d[v][k]}),h=o&&Object.entries(o).reduce((v,b)=>{let[j,k]=b;return k===void 0||(v[j]=k),v},{}),m=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((v,b)=>{let{class:j,className:k,...S}=b;return Object.entries(S).every(_=>{let[E,M]=_;return Array.isArray(M)?M.includes({...p,...h}[E]):{...p,...h}[E]===M})?[...v,j,k]:v},[]);return Qf(r,f,m,o?.class,o?.className)},Yf=ay("inline-flex items-center justify-center gap-2 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 w-[max-content] disabled:bg-disabled disabled:text-disabled-foreground overflow-hidden shrink-0 whitespace-nowrap [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hovered focus-visible:ring-primary active:bg-primary-pressed",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive-hovered focus-visible:ring-destructive active:bg-destructive-pressed",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",ghost:"hover:bg-accent hover:text-accent-foreground focus-visible:ring-primary disabled:bg-transparent",link:"overflow-visible text-primary underline-offset-4 hover:text-primary-hovered focus-visible:ring-primary active:text-primary-pressed disabled:bg-transparent",outline:"bg-secondary text-secondary-foreground hover:bg-secondary-hovered focus-visible:ring-primary active:bg-secondary-pressed hover:text-primary-foreground active:text-primary-foreground",input:"bg-background border border-input focus-visible:ring-primary hover:border-primary active:border-primary-pressed"},size:{default:"h-10 px-4 text-base",xsm:"h-5 px-1 text-xs",xs:"h-6 px-3",sm:"h-8 px-3",md:"h-9 px-4",icon:"size-8 text-base",smIcon:"size-6 rounded-full text-base",lgIcon:"size-10 text-base"},isMenu:{true:"w-full justify-start"}},defaultVariants:{variant:"default",size:"default",isMenu:!1}}),me=x.forwardRef(({className:r,variant:a,size:o,asChild:l=!1,loading:d=!1,isMenu:p=!1,type:f,...h},m)=>{const v=l?{}:{type:f??"button"};return c.jsx(l?Z1:"button",d?{className:B(Yf({variant:a,size:o,className:r,isMenu:p})),ref:m,...v,...h,disabled:!0,children:c.jsx(Rr,{className:"size-4 animate-spin min-w-16"})}:{className:B(Yf({variant:a,size:o,className:r,isMenu:p})),ref:m,...v,...h})});me.displayName="Button";function Ds(r,a,o){if(r===null)return _t(null,a);const l=_t(r,a,o);return r>0?`+${l}`:l}function Zf(r){return[r.territory_code??r.territory_name,r.item].filter(Boolean).join("|")}function Jf(r,a){return r.national?.period===a?r.national.value:null}function oy(r,a,o){const l=ta(r);return pa(r,{period:a,mode:"value",base:"median"}).filter(d=>d.value!==null).slice(0,o).map(d=>{const p=new Map(r.data.filter(f=>Zf(f)===d.key).map(f=>[f.period,f.value]));return{key:d.key,name:d.name,points:l.map(f=>({period:f,value:p.get(f)??null}))}})}function iy(r,a){if(new Set(r.data.map(l=>l.territory_code??l.territory_name??"")).size!==1||!r.data.every(l=>l.item!=null&&l.item!==""))return a;const o=new Map(r.data.map(l=>[Zf(l),l.item??""]));return a.map(l=>({...l,name:o.get(l.key)??l.name}))}function pa(r,a){return iy(r,Lb(r,a))}function Gf(r,a,o){const l=Jf(r,a);if(l===null||r.value_kind!=="level")return l;const d=o.filter(p=>p!==null&&Number.isFinite(p));return d.length===0?null:l<=Math.max(...d)*1.05?l:null}const ly=["12 76% 61%","173 58% 39%","197 37% 24%","43 74% 66%","27 87% 67%"],Ts=r=>r.clientWidth>0&&r.clientWidth<sy,sy=360;function Is(r){const a=document.createElement("span");r.appendChild(a);const o=d=>(a.style.color=d,getComputedStyle(a).color),l={series:ly.map((d,p)=>o(`hsl(var(--chart-${p+1}, ${d}))`)),text:o("hsl(var(--foreground))"),muted:o("hsl(var(--muted-foreground))"),border:o("hsl(var(--chart-grid, var(--border)))"),negative:o("hsl(var(--chart-neg, var(--destructive)))"),reference:o("hsl(var(--chart-ref, var(--foreground)))"),font:getComputedStyle(r).fontFamily,narrow:Ts(r)};return a.remove(),l}function cy({option:r,signature:a,label:o,height:l}){const d=x.useRef(null),p=x.useRef(null),f=x.useRef(r);return x.useEffect(()=>{f.current=r}),x.useEffect(()=>{const h=d.current;if(!h)return;let m=!0,v;return import("./echarts-3nlHlFS7.js").then(({init:b})=>{if(!m)return;p.current=b(h),p.current.setOption(f.current(Is(h)));let j=Ts(h);v=new ResizeObserver(()=>{Ts(h)!==j&&(j=!j,p.current?.setOption(f.current(Is(h)),!0)),p.current?.resize()}),v.observe(h)}).catch(()=>{}),()=>{m=!1,v?.disconnect(),p.current?.dispose(),p.current=null}},[]),x.useEffect(()=>{const h=d.current;h&&p.current&&p.current.setOption(f.current(Is(h)),!0)},[a]),c.jsx("div",{ref:d,role:"img","aria-label":o,style:{height:l},className:"w-full min-w-0"})}const dy=[[/товариществ[оа] с ограниченной ответственностью/giu,"\u0422\u041E\u041E"],[/республиканско(е|го) государственно(е|го) учреждени[ея]/giu,"\u0420\u0413\u0423"],[/республиканско(е|го) государственно(е|го) предприяти[ея]/giu,"\u0420\u0413\u041F"],[/государственно(е|го) учреждени[ея]/giu,"\u0413\u0423"],[/акционерно(е|го) обществ[оа]/giu,"\u0410\u041E"],[/индивидуальный предприниматель/giu,"\u0418\u041F"]],eh=r=>dy.reduce((a,[o,l])=>a.replace(o,l),r).replace(/\s+/g," ").trim(),uy=7.6,py=56,fy=160,hy=r=>Math.min(fy,Math.max(py,Math.ceil(r.reduce((a,o)=>Math.max(a,o.length),0)*uy)));function gy(r){if(r.trend)return["line","area","column"];const a=["bar","column"],o=r.rows.map(l=>l.value).filter(l=>l!==null);return!r.signed&&o.length>1&&o.every(l=>l>0)&&a.push("pie"),!r.signed&&r.periods.length>1&&r.series.length>0&&a.push("line"),a}const my=.3;function by(r,a,o,l){const{lang:d,decimals:p}=l,f=$=>typeof $=="number"?a.signed?Ds($,d,p):_t($,d,p):"\u2014",h=new Intl.NumberFormat(d,{notation:"compact",maximumFractionDigits:1}),m={color:o.muted,formatter:$=>h.format($)},v={lineStyle:{color:o.border}},b=$=>X=>{const K=eh(X);return K.length>$?`${K.slice(0,$-1)}\u2026`:K},j={color:o.muted,formatter:b(o.narrow?12:22)},k={animationDuration:400,color:o.series,textStyle:{fontFamily:o.font,color:o.text},tooltip:{trigger:r==="pie"?"item":"axis",confine:!0,valueFormatter:f}},S=a.rows.map($=>$.value).filter($=>$!==null),_=!a.signed&&S.every($=>$>0)&&!Ib(S);if(r==="pie")return{...k,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted},formatter:eh,tooltip:{show:!0}},series:[{type:"pie",radius:["40%","68%"],center:["50%","44%"],itemStyle:{borderColor:"transparent",borderRadius:4},label:{show:!1},data:a.rows.filter($=>$.value!==null).map($=>({name:$.name,value:$.value}))}]};if(a.trend||r==="line"||r==="area")return{...k,legend:{type:"scroll",bottom:0,textStyle:{color:o.muted}},grid:{left:8,right:16,top:12,bottom:32,containLabel:!0},xAxis:{type:"category",data:a.periods,axisLabel:{color:o.muted},boundaryGap:r==="column"},yAxis:{type:"value",scale:r!=="column",axisLabel:m,splitLine:v},series:a.series.map($=>({type:r==="column"?"bar":"line",name:$.name,data:a.periods.map(X=>$.points.find(K=>K.period===X)?.value??null),symbolSize:6,...r==="area"?{areaStyle:{opacity:.15}}:{}}))};const E=r==="bar",M=E?[...a.rows].reverse():a.rows,F=M.map($=>$.name),Z=a.national??null,oe=hy(M.map($=>$.value===null?"\u2014":f($.value))),J={type:"value",scale:_,axisLabel:m,splitLine:v,...o.narrow?{splitNumber:2}:{}},ne={type:"category",data:F,axisTick:{show:!1},axisLabel:E?j:{...j,formatter:b(14),rotate:30,interval:0}};return{...k,tooltip:{...k.tooltip,axisPointer:{type:"shadow"}},grid:{left:8,right:E?oe:16,top:Z===null?12:24,bottom:8,containLabel:!0},xAxis:E?J:ne,yAxis:E?ne:J,series:[{type:"bar",barMaxWidth:28,data:M.map($=>({value:$.value,itemStyle:{color:$.value!==null&&$.value<0?o.negative:o.series[0],opacity:a.highlightKey!==void 0&&$.key!==a.highlightKey?my:1,borderRadius:E?[0,4,4,0]:[4,4,0,0]}})),label:{show:E,position:"right",color:o.text,formatter:$=>f($.value)},...Z===null?{}:{markLine:{symbol:"none",silent:!0,lineStyle:{type:"dashed",color:o.reference},label:{formatter:l.nationalLabel(f(Z)),color:o.reference,position:E?"end":"insideEndTop"},data:[E?{xAxis:Z}:{yAxis:Z}]}}}]}}const xy=5,th=({section:r,period:a,rows:o,national:l=null,signed:d=!1,highlightKey:p,compact:f=!1,label:h})=>{const{lang:m,t:v}=G(),b={rows:o,series:oy(r,a,xy),periods:ta(r),trend:r.shape==="trend",national:l,signed:d,highlightKey:p},j=gy(b),[k,S]=x.useState(j[0]),_=j.includes(k)?k:j[0],E=_==="bar"&&!b.trend?Math.max(f?180:240,o.length*24+40):f?240:320;return c.jsxs("div",{part:"section-chart",className:"flex min-w-0 flex-col gap-2",children:[j.length>1?c.jsx("div",{role:"group","aria-label":v("chart.kinds"),className:"inline-flex flex-wrap gap-0.5 self-start rounded-md border bg-background p-0.5",children:j.map(M=>c.jsx("button",{type:"button","aria-pressed":M===_,onClick:()=>{S(M)},className:B("inline-flex h-7 items-center whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",M===_?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:text-foreground"),children:v(`chart.kind.${M}`)},M))}):null,c.jsx(cy,{label:h,height:E,signature:JSON.stringify([_,m,b]),option:M=>by(_,b,M,{lang:m,decimals:r.decimals,nationalLabel:F=>v("chart.national",{value:F})})})]})},rh=(r,a)=>{const{api:o,lang:l}=G(),d=x.useSyncExternalStore(ia.subscribe,()=>ia.view(r))??(a?ps(a):Bp);x.useEffect(()=>{a&&ia.adopt(r,a,o)},[r,a,o]);const p=x.useCallback(()=>{ia.start(r,o,l)},[r,o,l]),f=x.useCallback(()=>{ia.expire(r)},[r]);return{view:d,start:p,expire:f}},nh=({messageId:r,block:a,disabled:o=!1,className:l})=>{const{t:d}=G(),{view:p,start:f}=rh(r,a);return p.phase!=="idle"?null:c.jsxs(me,{part:"report",variant:"input",size:"sm",className:B("gap-1.5 text-[13px]",l),disabled:o,onClick:f,children:[c.jsx(Xx,{"aria-hidden":"true"}),d("report.create")]})},ah={pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"xls",xlsx:"xls",csv:"csv"},As=r=>{const a=r.lastIndexOf(".");return a<0?"":r.slice(a+1).toLowerCase()},oh=r=>Object.hasOwn(ah,r)?ah[r]??"other":"other",vy={pdf:"bg-file-pdf",doc:"bg-file-doc",ppt:"bg-file-ppt",xls:"bg-file-xls",csv:"bg-file-csv",other:"bg-file-other"},Os=({ext:r,className:a})=>c.jsx("span",{part:"file-type","data-kind":oh(r),"aria-hidden":"true",className:B("flex size-[34px] shrink-0 items-center justify-center rounded-lg text-[9.5px] font-bold leading-none tracking-[0.02em] text-background",vy[oh(r)],a),children:r?r.slice(0,4).toUpperCase():"FILE"}),ih=["byte","kilobyte","megabyte","gigabyte"];function $s(r,a){let o=r,l=0;for(;o>=1024&&l<ih.length-1;)o/=1024,l+=1;return new Intl.NumberFormat(a,{style:"unit",unit:ih[l]??"byte",unitDisplay:"short",maximumFractionDigits:l===0?0:1}).format(o)}const yy=/^\/api\/v1\/((?:report-jobs|messages)\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/files\/\d{1,4})$/i,lh=r=>{const a=yy.exec(r);return a?.[1]?`${ts}/${a[1]}`:null},wy=1e3,ky=async(r,a,o,l)=>{const d=lh(a);if(!d)return"unavailable";let p;try{p=await(await r.request(d.slice(ts.length))).blob()}catch(m){return m instanceof Ge&&m.status===410?"expired":m instanceof Ge&&m.status===404?"notFound":"unavailable"}const f=URL.createObjectURL(p),h=document.createElement("a");h.href=f,h.download=zf(o),h.hidden=!0,l.appendChild(h);try{h.click()}finally{h.remove(),window.setTimeout(()=>{URL.revokeObjectURL(f)},wy)}return"ok"},jy=["pdf","docx","pptx","xlsx","csv"],Sy=r=>{const a=r.getRootNode();return a instanceof ShadowRoot?a:r.parentElement??r},sh=({files:r,onExpired:a,className:o})=>{const{api:l,lang:d,t:p}=G(),[f,h]=x.useState(null),[m,v]=x.useState({}),b=x.useRef(m);x.useEffect(()=>{b.current=m});const j=r.filter(S=>jy.includes(S.format)&&lh(S.download_url)!==null);if(j.length===0)return null;const k=(S,_)=>{f===null&&(h(S.download_url),v(E=>Object.fromEntries(Object.entries(E).filter(([M])=>M!==S.download_url))),ky(l,S.download_url,S.filename,Sy(_.currentTarget)).then(E=>{if(h(null),E==="ok")return;const M={...b.current,[S.download_url]:E};v(M),j.every(F=>M[F.download_url]==="expired")&&a?.()}))};return c.jsxs("div",{part:"files",role:"group","aria-label":p("files.list"),className:B("flex flex-col gap-1.5",o),children:[c.jsx("div",{className:"text-2xs text-muted-foreground",children:p("files.list")}),c.jsx("ul",{"aria-label":p("files.list"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:j.map(S=>{const _=f===S.download_url,E=m[S.download_url];return c.jsxs("li",{"data-state":m[S.download_url]??void 0,className:B("flex min-w-0 items-center gap-3 rounded-xl border bg-card p-2",m[S.download_url]&&"border-error/35 bg-error-background"),children:[c.jsx(Os,{ext:S.format}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsx("span",{className:"truncate text-sm font-medium leading-tight",title:S.filename,children:p(`files.${wp(S.format)}`)}),c.jsxs("span",{className:"text-2xs leading-tight text-muted-foreground",children:[S.format.toUpperCase(),S.size_bytes>0?` \xB7 ${$s(S.size_bytes,d)}`:null]})]}),E?c.jsxs("span",{role:"alert",className:"flex shrink-0 items-center gap-1.5 text-[13px]",children:[c.jsx(zr,{className:"text-destructive","aria-hidden":"true"}),p(`files.${E}`)]}):c.jsxs(me,{variant:"ghost",size:"sm",className:"gap-1.5",title:S.filename,"aria-busy":_,disabled:f!==null,"aria-label":`${p("download")}: ${p(`files.${wp(S.format)}`)}`,onClick:M=>{k(S,M)},children:[_?c.jsx(Rr,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}):c.jsx(af,{"aria-hidden":"true"}),p("download")]})]},`${S.format}-${S.download_url}`)})})]})},Fs="flex items-center gap-2.5 rounded-xl border px-3 py-2.5 text-sm",ch=({messageId:r,block:a,className:o})=>{const{t:l}=G(),{view:d,start:p,expire:f}=rh(r,a);switch(d.phase){case"idle":return null;case"pending":return c.jsxs("div",{part:"report",role:"status","data-state":"pending",className:B(Fs,"border-processing/25 bg-processing-background",o),children:[c.jsx(Rr,{className:"shrink-0 animate-spin text-primary-text motion-reduce:animate-none","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:l("report.pending")})]});case"done":return c.jsx(sh,{files:d.files,onExpired:f,className:o});case"expired":return c.jsxs("div",{part:"report",role:"status","data-state":"expired",className:B(Fs,"bg-card",o),children:[c.jsx(xs,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:l("report.expired")}),c.jsx(me,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:l("report.create")})]});case"failed":return c.jsxs("div",{part:"report",role:"alert","data-state":"failed",className:B(Fs,"border-error/30 bg-error-background",o),children:[c.jsx(zr,{className:"shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:l("report.failed")}),c.jsx(me,{variant:"input",size:"sm",className:"gap-1.5 text-[13px]",onClick:p,children:l("report.retry")})]})}},Cy=4;function Bo(r,a,o){const l=Tb(r,a);return l==="\u043F.\u043F."?o("dashboard.points"):l}function dh(r){if(r.length===0)return null;const a=[...r].sort((l,d)=>l-d),o=Math.floor(a.length/2);return a.length%2?a[o]??null:((a[o-1]??0)+(a[o]??0))/2}function fa(r){const a=new Set;return r.filter(o=>!a.has(o.label)&&a.add(o.label)).slice(0,Cy)}function Ny(r,{period:a,region:o,lang:l,t:d}){if(o===void 0&&a===r.latest_period&&r.kpis.length>0)return fa(r.kpis.map(_=>({label:_.label,value:_.value,sub:_.sub??null})));const p=_=>`${_t(_,l,r.decimals)} ${r.unit.label}`,f=(_,E)=>_===null?_t(null,l):`${Ds(_,l,r.decimals)} ${E}`,h=pa(r,{period:a,mode:"value",base:"median"}).filter(_=>_.value!==null),m=h.map(_=>_.value??0),v=h[0],b=h[h.length-1];if(v===void 0||b===void 0)return[];if(o!==void 0){const _=h.findIndex(F=>F.key===o),E=h[_];if(E===void 0)return[];const M=dh(m);return fa([{label:E.name,value:p(E.value),sub:a},{label:d("dashboard.kpi.place"),value:d("dashboard.kpi.placeOf",{n:_+1,m:h.length})},{label:d("dashboard.kpi.deviation"),value:f(M===null||E.value===null?null:E.value-M,Bo(r,"deviation",d))},{label:d("dashboard.kpi.previous"),value:f(E.delta,Bo(r,"change",d))}])}if(r.shape==="trend"){const _=ta(r).filter(J=>J<=a),E=J=>r.data.find(ne=>ne.period===J&&ne.value!==null)?.value??null,M=_[0],F=E(a),Z=M===void 0?null:E(M);let oe=null;return F!==null&&Z!==null&&M!==a&&(oe=r.value_kind==="level"?Z>0?(F/Z-1)*100:null:F-Z),fa([{label:d("dashboard.kpi.last"),value:p(F),sub:a},...M!==void 0&&M!==a?[{label:d("dashboard.kpi.first"),value:p(Z),sub:M},{label:d("dashboard.kpi.change"),value:f(oe,Bo(r,"change",d))}]:[]])}if(r.shape==="breakdown")return fa([...h.slice(0,3).map(_=>({label:_.name,value:p(_.value),sub:_.share===null?a:`${_t(_.share,l,1)} %`})),...h.length>1?[{label:d("dashboard.kpi.gap"),value:p((v.value??0)-(b.value??0)),sub:`${v.name} \u2212 ${b.name}`}]:[]]);const j=Jf(r,a),k=dh(m),S=[{label:d("dashboard.kpi.max"),value:p(v.value),sub:v.name},{label:d("dashboard.kpi.min"),value:p(b.value),sub:b.name},{label:d("dashboard.kpi.median"),value:p(k),sub:a}];return fa(j!==null?[{label:d("dashboard.kpi.national"),value:p(j),sub:a},...S]:[...S,{label:d("dashboard.kpi.spread"),value:p((v.value??0)-(b.value??0)),sub:`${v.name} \u2212 ${b.name}`}])}const Ey=({kpis:r})=>{const{t:a}=G();return r.length===0?null:c.jsx("ul",{"aria-label":a("dashboard.kpis"),className:"m-0 grid list-none grid-cols-[repeat(auto-fit,minmax(9.5rem,1fr))] gap-2.5 p-0",children:r.map((o,l)=>c.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 rounded-xl border bg-card px-3.5 py-3",children:[c.jsx("span",{"data-kpi-label":"",className:"truncate text-2xs text-muted-foreground",title:o.label,children:o.label}),c.jsx("span",{className:"text-xl font-semibold tabular-nums leading-snug",children:o.value}),o.sub!=null&&o.sub!==""?c.jsx("span",{className:"truncate text-2xs text-muted-foreground",title:o.sub,children:o.sub}):null]},l))})};function uh({label:r,value:a,options:o,onChange:l}){return c.jsx("div",{role:"group","aria-label":r,className:"inline-flex gap-0.5 rounded-md border bg-background p-0.5",children:o.map(d=>{const p=d.value===a,f=d.disabledHint!==void 0;return c.jsx("button",{type:"button","aria-pressed":p,"aria-disabled":f||void 0,title:d.disabledHint,onClick:()=>{f||l(d.value)},className:B("h-7 whitespace-nowrap rounded-[7px] px-2.5 text-[13px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",p?"bg-secondary text-secondary-foreground":"text-muted-foreground",f?"cursor-not-allowed opacity-50":!p&&"hover:text-foreground"),children:d.label},d.value)})})}const ha="whitespace-nowrap px-3 py-[7px] text-[13px] font-semibold text-foreground",hn="whitespace-nowrap text-right tabular-nums",_y=({section:r,rows:a,mode:o,lang:l,highlightKey:d})=>{const{t:p}=G(),f=r.value_kind==="level",h=o==="value"?null:p(o==="change"?"dashboard.table.change":"dashboard.table.deviation",{unit:Bo(r,o,p)});return c.jsx("div",{className:"max-h-[28rem] overflow-auto overscroll-contain rounded-[10px] border bg-card",children:c.jsxs("table",{className:"w-full border-collapse text-[13.5px]",children:[c.jsx("thead",{className:"sticky top-0 bg-muted",children:c.jsxs("tr",{className:"border-b",children:[c.jsx("th",{scope:"col",className:B(ha,"w-10 text-right"),children:p("dashboard.table.rank")}),c.jsx("th",{scope:"col",className:B(ha,"text-left"),children:p("dashboard.table.position")}),c.jsx("th",{scope:"col",className:B(ha,hn),children:p("dashboard.table.value",{unit:r.unit.label})}),h!==null?c.jsx("th",{scope:"col",className:B(ha,hn),children:h}):null,f?c.jsx("th",{scope:"col",className:B(ha,hn),children:p("dashboard.table.share")}):null]})}),c.jsx("tbody",{children:a.map((m,v)=>c.jsxs("tr",{className:B("h-9 border-b last:border-b-0",m.key===d&&"bg-accent"),children:[c.jsx("td",{className:"px-3 text-right tabular-nums text-muted-foreground",children:v+1}),c.jsx("td",{className:"px-3",children:m.name}),c.jsx("td",{className:B("px-3",hn),children:_t(m.value,l,r.decimals)}),h!==null?c.jsx("td",{className:B("px-3",hn),children:Ds(m.display,l,r.decimals)}):null,f?c.jsx("td",{className:B("px-3",hn),children:_t(m.share,l,1)}):null]},m.key))})]})})},Us="__all__",qs="size-8 text-muted-foreground hover:text-foreground",zy=({message:r})=>{const{t:a}=G(),{state:o,setSection:l}=Lr(),d=fr(r.blocks,"dashboard")?.sections??[],p=d.find(h=>h.id===o.sectionId)??d[0];if(p===void 0)return null;const f=d.length>1?c.jsx("div",{role:"tablist","aria-label":a("dashboard.sections"),className:"flex gap-1 self-start overflow-x-auto rounded-md bg-secondary p-1",children:d.map(h=>{const m=h.id===p.id;return c.jsx("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>{l(h.id)},className:B("min-h-8 shrink-0 rounded-lg px-3 py-1.5 text-left text-sm font-medium leading-snug transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",m?"bg-background text-foreground shadow-sm":"text-secondary-foreground hover:text-foreground"),children:h.title},h.id)})}):null;return c.jsx("section",{"aria-label":a("dashboard.label"),className:"flex h-full min-h-0 min-w-0 flex-1 flex-col bg-background",children:c.jsx(Ry,{section:p,message:r,tabs:f},p.id)})},ph=({label:r,value:a,onChange:o,children:l,className:d})=>c.jsxs("div",{className:B("flex flex-col gap-1",d),children:[c.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),c.jsxs("span",{className:"relative inline-flex",children:[c.jsx("select",{"aria-label":r,value:a,onChange:p=>{o(p.target.value)},className:"h-8 w-full min-w-0 appearance-none truncate rounded-md border border-input bg-background py-0 pl-2.5 pr-7 text-sm text-foreground transition-colors hover:bg-muted focus-visible:border-primary focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-secondary motion-reduce:transition-none",children:l}),c.jsx(dn,{className:"pointer-events-none absolute right-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})]}),fh=({label:r,children:a})=>c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("span",{className:"text-2xs text-muted-foreground","aria-hidden":"true",children:r}),a]}),Ry=({section:r,message:a,tabs:o})=>{const{lang:l,t:d}=G(),{state:p,setFullscreen:f,close:h}=Lr(),{fullscreen:m}=p,v=ta(r),[b,j]=x.useState(()=>v.includes(r.latest_period)?r.latest_period:v.at(-1)??r.latest_period),[k,S]=x.useState(),[_,E]=x.useState("value"),[M,F]=x.useState("median"),Z=Db(r,b),oe=r.shape==="trend",J=oe||_==="change"&&!Z.change||_==="deviation"&&!Z.deviation?"value":_,ne=M==="national"&&Z.national?"national":"median",$=pa(r,{period:b,mode:J,base:ne}),X=J==="value"?$:pa(r,{period:b,mode:"value",base:ne}),K=[...X].sort((w,L)=>w.name.localeCompare(L.name,l)),he=k!==void 0&&K.some(w=>w.key===k)?k:void 0,ee=Ny(r,{period:b,region:he,lang:l,t:d}),ue=b===r.latest_period&&he===void 0?r.findings:[],W=r.shape==="regional",Q=X.filter(w=>w.value!==null).length,be=[b,r.unit.label,d(W?"dashboard.regions":"dashboard.items",{n:Q})].join(" \xB7 "),Ne=fn(r.source_url),ve=r.methodology?.editions,ye=ve?.[l]??ve?.ru,U=fn(ye?.url),D=`${d(oe?"dashboard.trend":"dashboard.ranking")}: ${r.title}, ${b}`,T=Tf(a.blocks);return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"flex shrink-0 flex-col gap-2 border-b py-3.5 pl-5 pr-4",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"min-w-0 flex-1 text-2xs font-semibold uppercase tracking-wide text-primary-text",children:d("dashboard.eyebrow")}),U!==null?c.jsx(me,{variant:"ghost",size:"icon",className:qs,asChild:!0,children:c.jsx("a",{href:U,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.methodology"),title:ye?.title??d("dashboard.methodology"),children:c.jsx(Oo,{"aria-hidden":"true"})})}):null,Ne!==null?c.jsx(me,{variant:"ghost",size:"icon",className:qs,asChild:!0,children:c.jsx("a",{href:Ne,target:"_blank",rel:"noopener noreferrer","aria-label":d("dashboard.openSource"),title:d("dashboard.openSource"),children:c.jsx(ys,{"aria-hidden":"true"})})}):null,c.jsxs(me,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground","aria-pressed":m,onClick:()=>{f(!m)},children:[m?c.jsx(uf,{"aria-hidden":"true"}):c.jsx(sf,{"aria-hidden":"true"}),d(m?"dashboard.collapse":"dashboard.fullscreen")]}),c.jsx(me,{variant:"ghost",size:"icon",className:qs,"aria-label":d("dashboard.close"),title:d("dashboard.close"),onClick:h,children:c.jsx(sa,{"aria-hidden":"true"})})]}),c.jsx("h2",{className:"m-0 text-xl font-semibold leading-snug",children:r.title}),c.jsx("span",{className:"text-xs text-muted-foreground",children:be})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3.5 overflow-y-auto overscroll-contain px-5 pb-5 pt-3.5",children:[o,c.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[W&&K.length>1?c.jsxs(ph,{label:d("dashboard.region"),value:he??Us,onChange:w=>{S(w===Us?void 0:w)},className:"min-w-40 max-w-60",children:[c.jsx("option",{value:Us,children:d("dashboard.allRegions")}),K.map(w=>c.jsx("option",{value:w.key,children:w.name},w.key))]}):null,v.length>1?c.jsx(ph,{label:d("dashboard.period"),value:b,onChange:j,className:"min-w-24",children:[...v].reverse().map(w=>c.jsx("option",{value:w,children:w},w))}):null,oe?null:c.jsx(fh,{label:d("dashboard.mode.label"),children:c.jsx(uh,{label:d("dashboard.mode.label"),value:J,onChange:E,options:[{value:"value",label:d("dashboard.mode.value")},{value:"deviation",label:d("dashboard.mode.deviation"),disabledHint:Z.deviation?void 0:d("dashboard.fewRegions")},{value:"change",label:d("dashboard.mode.change"),disabledHint:Z.change?void 0:d("dashboard.noPrevious")}]})}),J==="deviation"?c.jsx(fh,{label:d("dashboard.base.label"),children:c.jsx(uh,{label:d("dashboard.base.label"),value:ne,onChange:F,options:[{value:"median",label:d("dashboard.base.median")},{value:"national",label:d("dashboard.base.national"),disabledHint:Z.national?void 0:d("dashboard.noNational")}]})}):null]}),c.jsx(Ey,{kpis:ee}),c.jsx(Vs,{title:d(oe?"dashboard.trend":"dashboard.ranking"),card:!0,children:c.jsx(th,{section:r,period:b,label:D,rows:$.map(w=>({key:w.key,name:w.name,value:w.display})),national:J==="value"?Gf(r,b,$.map(w=>w.value)):null,signed:J!=="value",highlightKey:he})}),ue.length>0?c.jsx(Vs,{title:d("dashboard.findings"),children:c.jsx("ul",{className:"flex list-disc flex-col gap-1 pl-5 text-sm",children:ue.map((w,L)=>c.jsx("li",{children:w},L))})}):null,c.jsx(Vs,{title:d("dashboard.data"),children:c.jsx(_y,{section:r,rows:$,mode:J,lang:l,highlightKey:he})}),c.jsxs("footer",{className:"flex flex-col gap-3 border-t pt-3.5",children:[r.source_name!=null&&r.source_name!==""?c.jsx("p",{className:"text-xs text-muted-foreground",children:d("dashboard.source",{name:r.source_name})}):null,c.jsx("div",{className:"-ml-2 empty:hidden",children:c.jsx(nh,{messageId:a.id,block:T})}),c.jsx(ch,{messageId:a.id,block:T})]})]})]})},Vs=({title:r,children:a,card:o=!1})=>c.jsxs("section",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"m-0 text-sm font-semibold",children:r}),o?c.jsx("div",{className:"rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:a}):a]}),My=({threadId:r,children:a})=>{const[o,l]=x.useState(ua),[d,p]=x.useState(r);d!==r&&(p(r),d!==void 0&&l(ua));const f=x.useRef(new Set),h=x.useCallback((E,M)=>{l(Rs(E,M??null))},[]),m=x.useCallback(E=>{l(M=>M.messageId===E?ua:Rs(E))},[]),v=x.useCallback(E=>{f.current.has(E)||(f.current.add(E),l(Rs(E)))},[]),b=x.useCallback(()=>{l(ua)},[]),j=x.useCallback(E=>{l(M=>({...M,sectionId:E}))},[]),k=x.useCallback(E=>{l(M=>({...M,fullscreen:E}))},[]),S=x.useCallback(E=>{l(M=>({...M,view:E}))},[]),_=x.useMemo(()=>({state:o,open:h,toggle:m,autoOpen:v,close:b,setSection:j,setFullscreen:k,setView:S}),[o,h,m,v,b,j,k,S]);return c.jsx(If.Provider,{value:_,children:a})},hh="aid_intro_ack",Py=()=>{try{return window.localStorage.getItem(hh)!==null}catch{return!1}},Ly=({active:r=!0})=>{const{state:a,lang:o,t:l}=G(),d=aa(a.config?.intro_notice??void 0,o).trim(),[p,f]=x.useState(Py),h=r&&d!==""&&!p,m=x.useId(),v=d.split(`
17
+ `).filter(k=>k.trim()!==""),b=x.useRef(null);Mr(b,!h),qo(b,h,()=>{const k=b.current?.getRootNode();return k instanceof ShadowRoot||k instanceof Document?k.querySelector('[part="input"]'):null});const j=x.useCallback(()=>{f(!0);try{window.localStorage.setItem(hh,"1")}catch{}},[]);return x.useEffect(()=>{if(!h)return;const k=S=>{S.key==="Escape"&&(S.preventDefault(),j())};return window.addEventListener("keydown",k,!0),()=>{window.removeEventListener("keydown",k,!0)}},[h,j]),d===""?null:c.jsxs("div",{ref:b,className:B("absolute inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-150 motion-reduce:transition-none",h?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!h,children:[c.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 bg-scrim"}),c.jsxs("div",{part:"intro",role:"dialog","aria-modal":"true","aria-labelledby":m,className:B("relative flex max-h-full w-[min(400px,100%)] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",h?"translate-y-0":"translate-y-2"),children:[c.jsx("h2",{id:m,className:"m-0 py-3.5 pl-[18px] pr-3 pb-2.5 text-lg font-semibold",children:l("intro.title")}),c.jsx("div",{className:"flex min-h-0 flex-col gap-2.5 overflow-y-auto px-[18px] pt-1",children:v.map((k,S)=>c.jsx("p",{className:"text-[13px] leading-[1.55]",children:k},`${S}-${k}`))}),c.jsx("footer",{className:"flex shrink-0 justify-end px-[18px] pb-[18px] pt-3.5",children:c.jsx(me,{"data-autofocus":!0,size:"md",onClick:j,children:l("intro.continue")})})]})]})},ga=r=>r?!r.available||r.status==="down"||r.status==="overloaded"?"unavailable":r.status==="idle"?"idle":r.status==="busy"||r.status==="degraded"?"busy":"unknown":"unknown",Dy={idle:"text-mode-idle",busy:"text-mode-busy",unavailable:"text-mode-down",unknown:"text-muted-foreground"},Ty={idle:"health.idle",busy:"health.busy",unavailable:"health.unavailable"},gh=r=>Ty[r],Iy={bot:zx,"book-open":Oo,database:Ux,"file-text":Qx,globe:Zx,lock:lf,"message-circle":cv,"message-square":df,search:la,sparkles:ws},Bs=({name:r,className:a})=>{const o=Iy[r]??ws;return c.jsx(o,{className:B("size-4 shrink-0",a),"aria-hidden":"true"})},Ws=({level:r,lang:a})=>r==="unknown"?null:c.jsxs("span",{part:"mode-health","data-level":r,className:B("inline-flex shrink-0 items-center gap-1.5 text-2xs font-semibold",Dy[r]),children:[c.jsx("span",{"aria-hidden":"true",className:"size-2 shrink-0 rounded-full bg-current"}),zt(a,gh(r))]}),mh="inline-flex h-8 min-w-0 max-w-[min(360px,100%)] items-center gap-[7px] rounded-full border bg-background pl-2.5 pr-2 text-[13px] font-medium text-foreground",bh=(r,a)=>aa(r.title,a)||r.slug,xh=({modes:r,health:a,value:o,onChange:l,lang:d,label:p,variant:f="field",placement:h="top"})=>{const m=f==="pill",[v,b]=x.useState(!1),j=Math.max(0,r.findIndex(ee=>ee.slug===o)),[k,S]=x.useState(j),_=x.useId(),E=x.useRef(null),M=x.useRef(null),F=r[j],Z=ga(F?a[F.slug]:void 0),oe=x.useRef(null);x.useEffect(()=>{v&&M.current?.focus()},[v]),x.useEffect(()=>{if(!v)return;const ee=W=>{W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),b(!1),E.current?.focus())},ue=W=>{oe.current&&!W.composedPath().includes(oe.current)&&b(!1)};return window.addEventListener("keydown",ee,!0),window.addEventListener("pointerdown",ue,!0),()=>{window.removeEventListener("keydown",ee,!0),window.removeEventListener("pointerdown",ue,!0)}},[v]);const J=ee=>{b(!1),ee&&E.current?.focus()},ne=()=>{S(j),b(!0)},$=ee=>{const ue=r[ee];ue&&l(ue.slug),J(!0)},X=ee=>{switch(ee.key){case"ArrowDown":ee.preventDefault(),S(ue=>Math.min(r.length-1,ue+1));break;case"ArrowUp":ee.preventDefault(),S(ue=>Math.max(0,ue-1));break;case"Home":ee.preventDefault(),S(0);break;case"End":ee.preventDefault(),S(r.length-1);break;case"Enter":case" ":ee.preventDefault(),$(k);break;case"Tab":J(!1);break}},K=F?bh(F,d):"",he=Z==="unknown"?"":zt(d,gh(Z));return c.jsxs("div",{ref:oe,className:B(m?"min-w-0":"flex flex-col gap-1.5"),onBlur:ee=>{v&&ee.relatedTarget instanceof Node&&!ee.currentTarget.contains(ee.relatedTarget)&&b(!1)},children:[c.jsxs("button",{ref:E,part:m?"mode-select":void 0,type:"button","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":v?`${_}-list`:void 0,"aria-label":`${p}: ${K}${m&&he?`, ${he}`:""}`,onClick:()=>{v?J(!1):ne()},onKeyDown:ee=>{ee.key==="ArrowDown"&&!v&&(ee.preventDefault(),ne())},className:B(m?B(mh,"transition-colors hover:bg-muted motion-reduce:transition-none"):"inline-flex h-8 w-full items-center justify-between gap-2 rounded-md border bg-background pl-2.5 pr-2 text-xs","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",v&&"border-primary shadow-[0_0_0_3px_var(--aid-c-secondary)]"),children:[m&&F?c.jsx(Bs,{name:F.icon}):null,c.jsx("span",{className:B("truncate",m&&"min-w-0"),children:K}),m?c.jsx(Ws,{level:Z,lang:d}):null,c.jsx(dn,{className:B("size-3.5 shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",(m?h==="top"!==v:v)&&"rotate-180"),"aria-hidden":"true"})]}),v?c.jsxs("ul",{ref:M,id:`${_}-list`,part:m?"mode-list":void 0,role:"listbox",tabIndex:-1,"aria-label":p,"aria-activedescendant":`${_}-${k}`,onKeyDown:X,className:B("flex max-h-56 flex-col overflow-y-auto rounded-md border bg-background p-1 shadow-pop focus-visible:outline-none",m&&B("absolute left-0 z-20 w-[340px] max-w-full duration-150 animate-in fade-in motion-reduce:animate-none",h==="top"?"bottom-[calc(100%+6px)]":"top-[calc(100%+6px)]")),children:[m?c.jsx("li",{role:"presentation",className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:p}):null,r.map((ee,ue)=>{const W=ga(a[ee.slug]),Q=aa(ee.description,d);return c.jsxs("li",{id:`${_}-${ue}`,part:m?"mode-option":void 0,role:"option","aria-selected":ue===j,onMouseDown:be=>{be.preventDefault()},onMouseEnter:()=>{S(ue)},onClick:()=>{$(ue)},className:B("flex cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-2",ue===k&&"bg-accent",ue===j&&"bg-secondary"),children:[c.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-muted",children:c.jsx(Bs,{name:ee.icon})}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[c.jsx("span",{className:"truncate text-sm font-medium leading-[1.35]",children:bh(ee,d)}),Q?c.jsx("span",{className:"line-clamp-2 text-2xs leading-[1.35] text-muted-foreground",children:Q}):null,c.jsx(Ws,{level:W,lang:d})]}),c.jsx(_r,{className:B("mt-1 size-4 shrink-0 text-primary",ue!==j&&"invisible"),"aria-hidden":"true"})]},ee.slug)})]}):null]})},vh=(r,a)=>r===(a>=0?a:0)?0:-1,Ay={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"start",End:"end"},yh=(r,a=!1)=>{const o=Ay[r.key];if(o===void 0)return;const l=Array.from(r.currentTarget.querySelectorAll('[role="radio"]:not(:disabled)')),d=r.currentTarget.getRootNode(),p=l.findIndex(h=>h===d.activeElement);if(l.length===0)return;r.preventDefault();const f=o==="start"?0:o==="end"?l.length-1:(Math.max(p,0)+o+l.length)%l.length;l[f]?.focus(),a&&l[f]?.click()},Oy=({label:r,className:a,children:o})=>c.jsx("div",{role:"radiogroup","aria-label":r,className:a,onKeyDown:l=>{yh(l,!0)},children:o}),$y=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),Fy=["search","newChat","sidebar","close"],Uy=r=>{const a=r?"\u2318":"Ctrl",o=r?"\u21E7":"Shift",l=d=>r?[o,a,d]:[a,o,d];return{search:[a,"K"],newChat:l("O"),sidebar:l("S"),close:["Esc"]}},qy={kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English"},Wo=({title:r,hint:a,children:o})=>c.jsxs("section",{className:"flex flex-col gap-2",children:[c.jsx("h3",{className:"text-xs font-semibold text-muted-foreground",children:r}),o,a?c.jsx("p",{className:"text-xs text-muted-foreground",children:a}):null]}),wh=({value:r,options:a,onChange:o,label:l})=>{const d=a.findIndex(p=>p.value===r);return c.jsx(Oy,{label:l,className:"grid grid-cols-3 gap-2",children:a.map((p,f)=>{const h=p.value===r;return c.jsxs("button",{type:"button",role:"radio","aria-checked":h,tabIndex:vh(f,d),lang:p.lang,onClick:()=>{o(p.value)},className:B("flex min-w-0 items-center gap-2.5 rounded-md border px-3 py-2.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",h?"border-primary bg-secondary":"bg-background hover:border-primary/50"),children:[c.jsx("span",{"aria-hidden":"true",className:B("relative size-4 shrink-0 rounded-full border-[1.5px] bg-background",h?"border-primary":"border-muted-foreground"),children:h?c.jsx("span",{className:"absolute inset-[3px] rounded-full bg-primary"}):null}),c.jsx("span",{className:"truncate",children:p.label})]},p.value)})})},Vy=({children:r})=>c.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded border bg-background px-[5px] font-sans text-[11px] font-medium leading-none text-muted-foreground",children:r}),By=({open:r,onClose:a})=>{const{state:o,lang:l,t:d,selectMode:p}=G(),f=cs(),h=x.useRef(null);Mr(h,!r),qo(h,r),x.useEffect(()=>{if(!r)return;const k=S=>{S.key==="Escape"&&(h.current?.querySelector('[aria-haspopup="listbox"][aria-expanded="true"]')||(S.preventDefault(),a()))};return window.addEventListener("keydown",k,!0),()=>{window.removeEventListener("keydown",k,!0)}},[r,a]);const m=o.config?.modes??[],v=[{value:"light",label:d("settings.themeLight")},{value:"dark",label:d("settings.themeDark")},{value:"auto",label:d("settings.themeAuto")}],b=Uy($y()),j={search:d("shortcut.search"),newChat:d("shortcut.newChat"),sidebar:d("shortcut.sidebar"),close:d("shortcut.close")};return c.jsxs("div",{ref:h,className:B("absolute inset-0 z-40 flex items-start justify-center p-6 transition-opacity duration-150 motion-reduce:transition-none",r?"opacity-100":"pointer-events-none opacity-0"),"aria-hidden":!r,children:[c.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 bg-scrim",onClick:a}),c.jsxs("div",{part:"settings",role:"dialog","aria-modal":"true","aria-label":d("settings"),className:B("relative flex max-h-full w-full max-w-[520px] flex-col overflow-hidden rounded-aid-field border bg-background shadow-panel transition-transform duration-200 motion-reduce:transition-none",r?"translate-y-0":"translate-y-2"),children:[c.jsxs("header",{className:"flex shrink-0 items-center justify-between pb-2.5 pl-[18px] pr-3 pt-3.5",children:[c.jsx("h2",{className:"text-lg font-semibold",children:d("settings")}),c.jsx(me,{"data-autofocus":!0,variant:"ghost",size:"icon","aria-label":d("close"),onClick:a,children:c.jsx(sa,{"aria-hidden":"true"})})]}),c.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-[18px] pb-[18px] pt-1",children:[c.jsx(Wo,{title:d("settings.language"),children:c.jsx(wh,{label:d("settings.language"),value:l,options:is.map(k=>({value:k,label:qy[k],lang:k})),onChange:k=>{f.update({lang:k})}})}),c.jsx(Wo,{title:d("settings.theme"),children:c.jsx(wh,{label:d("settings.theme"),value:f.scheme,options:v,onChange:k=>{f.update({scheme:k})}})}),m.length>0?c.jsx(Wo,{title:d("settings.model"),hint:d("settings.modelHint"),children:c.jsx(xh,{modes:m,health:o.health,value:o.mode,onChange:p,lang:l,label:d("settings.model")})}):null,c.jsx(Wo,{title:d("settings.shortcuts"),children:c.jsx("div",{className:"flex flex-col",children:Fy.map(k=>c.jsxs("div",{className:"flex items-center justify-between py-1 text-xs",children:[c.jsx("span",{children:j[k]}),c.jsx("span",{className:"flex gap-[3px]",children:b[k].map(S=>c.jsx(Vy,{children:S},S))})]},k))})})]})]})]})},Wy={muted:"rounded-[10px] border bg-muted px-3 py-2",blocked:"rounded-[10px] border border-processing/25 bg-processing-background px-3 py-2",overloaded:"rounded-[10px] border border-warning/40 bg-warning-background px-3 py-2",hint:"px-1 pb-2 text-warn-text"},Ho=({tone:r,icon:a,children:o,role:l="status",part:d,state:p})=>c.jsxs("div",{part:d,role:l,"data-tone":r,"data-state":p,className:B("mb-2 flex items-center gap-2.5 text-xs leading-snug",Wy[r]),children:[c.jsx("span",{className:"flex shrink-0",children:a}),c.jsx("span",{className:"min-w-0 flex-1",children:o})]}),kh=({children:r,onDismiss:a,dismissLabel:o,part:l})=>c.jsxs("div",{part:l,role:"alert",className:"mb-2 flex items-center gap-2.5 rounded-[10px] border border-error/30 bg-error-background py-2 pl-3 pr-2 text-xs leading-snug text-[hsl(var(--foreground))]",children:[c.jsx(zr,{className:"shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:r}),c.jsx(me,{variant:"ghost",size:"xs",onClick:a,children:o})]}),Hy=r=>new Intl.DateTimeFormat(r,{hour:"2-digit",minute:"2-digit"}),Xy=()=>{const{state:r,lang:a,t:o}=G(),{remaining:l,daily:d,blocked:p,resetAt:f,overloaded:h}=r.limit;if(h&&r.config)return c.jsx(Ho,{tone:"overloaded",part:"limit-banner",state:"overloaded",icon:c.jsx(Fo,{"aria-hidden":"true"}),children:o("overloaded")});if(p){const m=f?new Date(f):null,v=m&&!Number.isNaN(m.getTime())?o("limit.until",{time:Hy(a).format(m)}):o("limit.exhausted");return c.jsx(Ho,{tone:"blocked",part:"limit-banner",state:"blocked",icon:c.jsx(xs,{"aria-hidden":"true"}),children:v})}return l===null||d===null||l>3?null:c.jsx(Ho,{tone:"muted",part:"limit-banner",state:"low",icon:c.jsx(of,{"aria-hidden":"true"}),children:o("limit.remaining",{count:l,limit:d})})},Ky=()=>{const{state:r,lang:a,t:o,dismissNotice:l}=G(),{notice:d}=r;if(!d)return null;const p=d.kind==="error"?gs(a,d.reason):o(d.key);return c.jsx(kh,{part:"notice",onDismiss:l,dismissLabel:o("dismiss"),children:p})},Hs=({value:r,onChange:a,onSubmit:o,maxHeight:l=S1,className:d,onKeyDown:p,...f})=>{const h=x.useRef(null),m=x.useCallback(()=>{const b=h.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,l)}px`,b.style.overflowY=b.scrollHeight>l?"auto":"hidden")},[l]);x.useLayoutEffect(m,[r,m]),x.useEffect(()=>{const b=h.current;if(!b||typeof ResizeObserver>"u")return;let j=b.clientWidth;const k=new ResizeObserver(()=>{b.clientWidth!==j&&(j=b.clientWidth,m())});return k.observe(b),()=>{k.disconnect()}},[m]);const v=b=>{p?.(b),!(b.defaultPrevented||!o)&&b.key==="Enter"&&!b.shiftKey&&!b.nativeEvent.isComposing&&(b.preventDefault(),o())};return c.jsx("textarea",{ref:h,rows:1,value:r,onChange:b=>{a(b.target.value)},onKeyDown:v,className:B("block w-full resize-none bg-transparent text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",d),...f})},Qy=({file:r,onRemove:a})=>{const{lang:o,t:l}=G();return c.jsxs("div",{part:"composer-file",className:"flex w-fit max-w-full items-center gap-2.5 self-start rounded-xl border bg-muted p-1.5",children:[c.jsx(Os,{ext:As(r.name)}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx("span",{className:"max-w-[420px] truncate text-[13px] font-medium leading-tight max-sm:max-w-[190px]",title:r.name,children:r.name}),c.jsx("span",{className:"text-2xs leading-tight text-muted-foreground",children:$s(r.size,o)})]}),c.jsx(me,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":l("removeFile"),onClick:a,children:c.jsx(sa,{"aria-hidden":"true"})})]})},Yy=({children:r,text:a,id:o})=>c.jsxs("span",{className:"group/attach inline-flex",children:[r,c.jsx("span",{id:o,role:"tooltip",className:"pointer-events-none absolute bottom-[3.2rem] left-4 z-10 hidden w-max max-w-[calc(100%-2rem)] rounded-md bg-foreground px-2 py-1 text-2xs font-medium leading-snug text-background shadow-pop group-focus-within/attach:block group-hover/attach:block",children:a})]}),Zy=({message:r,onDismiss:a})=>{const{t:o}=G();return r===null?null:c.jsx(kh,{part:"notice",dismissLabel:o("dismiss"),onDismiss:a,children:r})},Jy=.9,Gy=(r,a)=>r>a?"over":r===a?"limit":r>=a*Jy?"near":"hidden",jh=({count:r,max:a,id:o,part:l,className:d})=>{const{t:p}=G(),f=Gy(r,a);return c.jsxs(c.Fragment,{children:[c.jsx("span",{id:o,part:l,className:B("shrink-0 whitespace-nowrap px-1 text-2xs tabular-nums text-muted-foreground",f==="hidden"&&"hidden",f==="limit"&&"font-semibold text-warn-text",f==="over"&&"font-semibold text-destructive",d),children:p("counter",{count:r,max:a})}),c.jsx("span",{"aria-live":"polite",className:"sr-only",children:f==="limit"?p("counterLimit"):f==="over"?p("counterOver"):""})]})},ew=()=>{const{state:r,t:a}=G(),{config:o}=r;if(!o)return null;const l=o.modes.find(p=>p.slug===r.mode),d=o.modes.length===0?a("modes.none"):l&&ga(r.health[l.slug])==="unavailable"?a("modeUnavailable"):null;return d===null?null:c.jsx(Ho,{tone:"hint",part:"composer-hint",icon:c.jsx(Fo,{"aria-hidden":"true"}),children:d})},tw=500,rw=(r=!0)=>{const a=G().t("placeholder"),o=_s("(prefers-reduced-motion: reduce)"),l=r&&!o,[d,p]=x.useState(0);return x.useEffect(()=>{if(!l)return;const f=window.setInterval(()=>{p(h=>h+1)},tw);return()=>{window.clearInterval(f)}},[l]),a+".".repeat(l?d%3+1:3)},nw=({placement:r="top"})=>{const{state:a,lang:o,t:l,selectMode:d}=G(),p=a.config?.modes??[],f=p.find(h=>h.slug===a.mode);if(!f)return null;if(p.length<2){const h=ga(a.health[f.slug]),m=aa(f.title,o)||f.slug,v=h==="unknown"?"":l(`health.${h}`),b=`${l("modeLabel")}: ${m}${v?`, ${v}`:""}`;return c.jsxs("div",{part:"mode-select",role:"group","aria-label":b,className:mh,children:[c.jsx(Bs,{name:f.icon}),c.jsx("span",{className:"min-w-0 truncate",children:m}),c.jsx(Ws,{level:h,lang:o})]})}return c.jsx(xh,{variant:"pill",placement:r,modes:p,health:a.health,value:a.mode,onChange:d,lang:o,label:l("modeLabel")})},Sh="{name}",aw=(r,a)=>{const[o="",l=""]=r.split(Sh);return c.jsxs(c.Fragment,{children:[o,a,l]})},Ch=x.forwardRef(({onDraftChange:r},a)=>{const{state:o,lang:l,path:d,t:p,send:f,stop:h}=G(),[m,v]=x.useState(""),b=rw(m===""),j=x.useRef(null),k=x.useId(),S=x.useRef(!1),_=x.useId();x.useImperativeHandle(a,()=>({setText:V=>{v(V),setTimeout(()=>j.current?.querySelector("textarea")?.focus(),0)}}));const E=m.trim()!=="";x.useEffect(()=>{r?.(E)},[E,r]);const[M,F]=x.useState(null),[Z,oe]=x.useState(null),J=x.useRef(null),{config:ne,turn:$,limit:X}=o,K=ne?.modes.find(V=>V.slug===o.mode),he=ne?.max_query_chars??Lp,ee=K?ga(o.health[K.slug])==="unavailable":!1,ue=!!(ne?.site.allow_files&&K?.allow_files),W=$!==null,Q=$?.stopping===!0,be=!ne||X.blocked||o.loadingThread!==null,Ne=m.trim(),ve=m.length>he,ye=!be&&!W&&!ee&&!!K&&Ne.length>0&&!ve;x.useEffect(()=>{if(W)return;const V=j.current?.getRootNode(),pe=V instanceof ShadowRoot||V instanceof Document?V.activeElement:null,fe=pe===null||pe===document.body;(S.current||fe)&&j.current?.querySelector("textarea")?.focus({preventScroll:!0}),S.current=!1},[W]);const U=()=>{if(!ye||!K)return;const V=Ne,pe=M,fe=F1(d,V,new Date);v(""),F(null),f({query:V,mode:K.slug,...pe?{file:pe}:{},...fe?{clarification:fe}:{}}).then(Se=>{Se==="rejected"&&(v(ke=>ke||V),F(ke=>ke??pe))})},D=V=>{if(oe(null),!(!V||!K)){if(!Cf.split(",").includes(`.${As(V.name)}`)){oe(p("fileType",{name:V.name}));return}if(V.size>K.max_file_mb*1024*1024){oe(p("fileTooLarge",{name:V.name,size:K.max_file_mb}));return}F(V)}},T=ne?.answer_source,w=T?.[l]??T?.ru??Object.values(T??{})[0],L=fn(w?.url),H=L?c.jsxs("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary-text hover:underline",children:[w?.name,c.jsx(ys,{className:"size-3","aria-hidden":"true"})]}):w?.name;return c.jsxs("div",{part:"composer",className:"flex w-full shrink-0 flex-col",children:[c.jsx(ew,{}),c.jsx(Zy,{message:Z,onDismiss:()=>{oe(null)}}),c.jsxs("div",{ref:j,className:B("relative flex flex-col gap-2.5 rounded-aid-field border border-input bg-background py-3 pl-4 pr-2.5 shadow-sm transition-colors motion-reduce:transition-none","focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",ve&&"border-destructive focus-within:border-destructive",be&&"bg-muted"),children:[M?c.jsx(Qy,{file:M,onRemove:()=>{F(null)}}):null,c.jsx(Hs,{part:"input","data-autofocus":!0,value:m,onChange:v,onSubmit:U,disabled:be,placeholder:b,"aria-label":p("inputLabel"),"aria-invalid":ve||void 0,"aria-describedby":k,className:"block min-h-6 w-full pr-1.5 text-lg leading-6 disabled:text-muted-foreground disabled:opacity-100"}),c.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[c.jsx(nw,{placement:"top"}),ue?c.jsxs(c.Fragment,{children:[c.jsx(Yy,{id:_,text:M?p("attachOne"):p("attachHint",{size:K?.max_file_mb??0}),children:c.jsx(me,{part:"attach",variant:"ghost",size:"icon",className:"size-8 rounded-full text-muted-foreground","aria-label":p(M?"attachOne":"attach"),"aria-describedby":_,disabled:be||W||M!==null,onClick:()=>J.current?.click(),children:c.jsx(xv,{"aria-hidden":"true"})})}),c.jsx("input",{ref:J,type:"file",hidden:!0,accept:Cf,onChange:V=>{D(V.target.files?.[0]),V.target.value=""}})]}):null,c.jsx("span",{className:"flex-1"}),c.jsx(jh,{id:k,part:"counter",count:m.length,max:he}),W?c.jsx(me,{part:"stop",size:"icon",className:"size-9 rounded-full aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-label":p(Q?"agent.stopping":"stop"),title:p(Q?"agent.stopping":"stop"),"aria-disabled":Q||void 0,onFocus:()=>{S.current=!0},onBlur:V=>{V.relatedTarget&&(S.current=!1)},onClick:()=>{Q||h()},children:c.jsx(gf,{className:"size-3.5 fill-current","aria-hidden":"true"})}):c.jsx(me,{part:"send",size:"icon",className:"size-9 rounded-full","aria-label":p("send"),title:p("send"),disabled:!ye,onClick:U,children:c.jsx(tf,{"aria-hidden":"true"})})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-3.5 gap-y-1 pt-2 text-center text-2xs leading-snug text-muted-foreground",children:[c.jsx("p",{part:"disclaimer",className:"text-2xs",children:p("disclaimer")}),w?.name?c.jsx("p",{part:"source",className:"text-2xs",children:aw(p("source",{name:Sh}),H)}):null]})]})});Ch.displayName="Composer";const ow=({composerRef:r,onDraftChange:a})=>{const{state:o}=G();return c.jsxs("div",{className:"mx-auto w-full max-w-[844px] shrink-0 px-3 pb-2.5",children:[c.jsx(Xy,{}),c.jsx(Ky,{}),o.config&&!o.configError?c.jsx(Ch,{ref:r,onDraftChange:a}):null]})},Nh={receipt:jv,landmark:ev,map:av,"trending-up":Uv,scale:Ev,users:Vv,"file-chart":Wx,"alert-triangle":Fo},iw=({name:r})=>{const a=(Object.hasOwn(Nh,r)?Nh[r]:void 0)??ws;return c.jsx(a,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"})},lw=10,Eh=(r,a)=>r?.[a]??r?.ru??Object.values(r??{})[0],sw=({children:r,id:a})=>c.jsx("h2",{id:a,className:"m-0 px-0.5 text-2xs font-semibold text-muted-foreground",children:r}),cw=({example:r,onPick:a,sub:o})=>c.jsx("li",{className:"min-w-0",children:c.jsxs("button",{part:"example",type:"button",title:r.title,onClick:()=>{a(r.prompt)},className:B("flex w-full items-center gap-2.5 rounded-lg border bg-background px-3 py-2 text-left leading-snug text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",o?"min-h-9 border-dashed text-[13px]":"min-h-10 text-sm"),children:[c.jsx("span",{className:"min-w-0 flex-1",children:r.prompt}),c.jsx(jx,{className:"text-muted-foreground","aria-hidden":"true"})]})}),dw=r=>`${r.title}-${r.prompt}`,uw=({onPick:r})=>{const{state:a,lang:o,t:l}=G(),d=x.useId(),[p,f]=x.useState(null),h=Eh(a.config?.prompt_examples,o)??[],m=(Eh(a.config?.prompt_categories,o)??[]).filter(j=>h.some(k=>k.category===j.key));if(h.length===0||m.length===0)return null;const v=m.find(j=>j.key===p),b=v?h.filter(j=>j.category===v.key).slice(0,lw):[];return c.jsxs("div",{className:"flex flex-col gap-5",children:[c.jsxs("section",{className:"flex flex-col gap-1.5",children:[c.jsx(sw,{id:d,children:l("examples.whatCanDo")}),c.jsx("div",{role:"group","aria-labelledby":d,className:"flex flex-col gap-1.5",children:m.map(j=>{const k=j.key===v?.key,S=k?dn:$o;return c.jsxs(x.Fragment,{children:[c.jsxs("button",{part:"category",type:"button","aria-expanded":k,onClick:()=>{f(k?null:j.key)},className:B("flex min-h-11 w-full items-center gap-2.5 rounded-lg border bg-background px-2.5 py-1.5 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",k&&"border-primary"),children:[c.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-secondary",children:c.jsx(iw,{name:j.icon})}),c.jsx("span",{className:"min-w-0 flex-1 truncate",children:j.title}),c.jsx(S,{className:"text-muted-foreground","aria-hidden":"true"})]}),k&&b.length>0?c.jsx("ul",{"aria-label":j.title,className:"m-0 flex w-full list-none flex-col gap-1.5 pb-1.5 pl-[18px] pt-0.5",children:b.map(_=>c.jsx(cw,{example:_,onPick:r,sub:!0},dw(_)))}):null]},j.key)})})]}),null]})},pw=({wide:r,onPick:a})=>{const{state:o,lang:l,t:d}=G(),p=aa(o.config?.site.welcome,l),f=p?p.split(`
18
+ `).filter(h=>h.trim()!==""):[];return c.jsxs("div",{part:"empty",className:B("mx-auto flex w-full max-w-[640px] flex-col gap-5 px-4 pb-3",r?"pt-14":"pt-7"),children:[c.jsxs("div",{className:"flex flex-col items-center gap-2.5 text-center",children:[c.jsx("div",{part:"avatar",children:c.jsx(Qp,{size:56})}),f.length>0?c.jsx("div",{part:"welcome",className:"flex max-w-[340px] flex-col gap-1 text-[15px] leading-normal",children:f.map((h,m)=>c.jsx("p",{className:B(m===0&&"text-xl font-semibold"),children:h},`${m}-${h}`))}):c.jsx("h2",{className:"m-0 text-2xl font-semibold tracking-tight",children:d("greeting")})]}),c.jsx(uw,{onPick:a})]})},_h=()=>{const{t:r}=G();return a=>{const o=`steps.${a.node}`;return r(ls(o)?o:"steps.unknown")}},zh=r=>{const a=r?.trim();return a===""?void 0:a},Xs=r=>zh(r.detail),fw=r=>zh(r.result),hw={router:"router",understand:"router",responder:"responder",answer:"responder",search_law:"law",data:"data",run_query:"data",executor:"executor",run_sql:"executor",lookup_taxpayer:"taxpayer",find_taxpayer:"findCompany",think:"think"},gw=6e3,mw=4e3,bw=2500,Rh=r=>`${r.id??r.node}#${r.attempt}`,Mh=(r,a)=>{const o=[];for(let l=1;a(`waiting.${r}.${l}`);l+=1)o.push(`waiting.${r}.${l}`);return o},xw=(r,a)=>{const{t:o}=G(),l=r==null?"":Rh(r),[d,p]=x.useState({key:"",tick:-1});x.useEffect(()=>{if(!a||l==="")return;let b;const j=setTimeout(()=>{p({key:l,tick:0}),b=setInterval(()=>{p(k=>({key:l,tick:k.key===l?k.tick+1:0}))},mw)},gw);return()=>{clearTimeout(j),b!==void 0&&clearInterval(b)}},[l,a]);const f=a&&d.key===l?d.tick:-1;if(f<0||r==null)return null;const h=Mh(hw[r.node]??"unknown",ls),m=h.length>0?h:Mh("unknown",ls),v=m[f%m.length];return v?o(v):null},vw=(r,a)=>{const o=r.map(Rh).join("|"),l=a&&r.length>1,[d,p]=x.useState({key:"",index:0});x.useEffect(()=>{if(!l)return;const h=setInterval(()=>{p(m=>({key:o,index:m.key===o?m.index+1:1}))},bw);return()=>{clearInterval(h)}},[o,l]);const f=l&&d.key===o?d.index%r.length:0;return r[f]},Ks=({step:r,position:a})=>{const{t:o}=G(),l=_h();return c.jsxs(c.Fragment,{children:[l(r),Xs(r)!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",Xs(r)]}):null,a!=null&&r.total!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("steps.counter",{done:a,total:r.total})]}):null,r.attempt>1?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \xB7 ",o("agent.attempt",{count:r.attempt})]}):null]})},Ph=()=>c.jsx(Rr,{className:"size-3 shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true","data-testid":"step-spinner"}),yw=({steps:r,status:a,stopping:o})=>{const{t:l}=G(),d=r.filter(m=>m.status==="running"),p=a==="streaming"&&!o,f=vw(d,p),h=xw(f,p&&d.length===1&&f!=null&&Xs(f)==null);return a==="streaming"?c.jsxs(c.Fragment,{children:[c.jsx(Ph,{}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:o?l("agent.stopping"):f==null?l("agent.thinking"):h!=null?c.jsxs(c.Fragment,{children:[c.jsx("span",{"aria-hidden":"true",children:h}),c.jsx("span",{className:"sr-only",children:c.jsx(Ks,{step:f,position:r.indexOf(f)+1})})]}):c.jsx(Ks,{step:f,position:r.indexOf(f)+1})})]}):a==="stopped"?c.jsxs(c.Fragment,{children:[c.jsx(gf,{className:"size-3.5 shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.stopped")})]}):a==="error"?c.jsxs(c.Fragment,{children:[c.jsx(nf,{className:"size-3.5 shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.interrupted")})]}):c.jsxs(c.Fragment,{children:[c.jsx(_r,{className:"size-3.5 shrink-0 text-mode-idle","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:l("agent.done")})]})},ww=({steps:r,status:a,stopping:o})=>{const{t:l}=G(),d=_h();if(a==="streaming"){if(o)return l("agent.stopping");const p=r.find(f=>f.status==="running");return p?d(p):l("agent.thinking")}return l(a==="stopped"?"agent.stopped":a==="error"?"agent.interrupted":"agent.done")},Lh="inline-flex min-h-[30px] max-w-full items-center gap-2 self-start rounded-full border bg-background py-1 pl-2 pr-2.5 text-left text-[13px] text-muted-foreground",kw=x.memo(function(r){const{t:a}=G(),[o,l]=x.useState(!1),{steps:d,status:p}=r,f=p==="streaming",h=ww(r),m=c.jsx(c.Fragment,{children:c.jsx(yw,{...r})});return c.jsxs("div",{part:"steps",className:"flex flex-col gap-2 text-[13px] text-muted-foreground",children:[d.length>0?c.jsxs("button",{type:"button","aria-expanded":o,"aria-label":`${a(o?"agent.hideSteps":"agent.showSteps")}: ${h}`,onClick:()=>{l(!o)},className:B(Lh,"hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",f&&"border-primary-35"),children:[m,o?c.jsx(dn,{className:"size-3.5 shrink-0 rotate-180","aria-hidden":"true"}):c.jsx(dn,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}):c.jsx("div",{className:B(Lh,f&&"border-primary-35"),role:"status",children:m}),o&&d.length>0?c.jsx("ol",{"aria-label":a("agent.steps"),className:"m-0 flex list-none flex-col self-stretch rounded-xl border bg-background px-3.5 py-1.5",children:d.map((v,b)=>{const j=v.status==="running",k=j&&!f,S=fw(v);return c.jsxs("li",{className:"flex min-h-[34px] items-center gap-2.5 border-b border-dashed last:border-b-0",children:[c.jsx("span",{className:"flex w-[18px] shrink-0 justify-center",children:j&&f?c.jsx(Ph,{}):k?c.jsx(nf,{className:"size-3.5","aria-hidden":"true"}):c.jsx(_r,{className:"size-3.5 text-mode-idle","aria-hidden":"true"})}),c.jsxs("span",{className:B("min-w-0 flex-1 break-words py-1",k?"text-muted-foreground":"text-foreground"),children:[c.jsx(Ks,{step:v}),S!=null?c.jsxs("span",{className:"text-muted-foreground/70",children:[" \u2014 ",S]}):null]}),k?c.jsx("span",{className:"shrink-0 whitespace-nowrap",children:a("agent.unfinished")}):null]},v.id??`${v.node}-${b}`)})}):null]})}),jw=(r,a)=>{const o=(r.split(/[?#]/)[0]??"").split("/").filter(Boolean).pop();if(!o||/^[0-9a-f-]{36}$/i.test(o))return a;try{return decodeURIComponent(o)}catch{return o}},Sw=r=>{try{return new URL(r,window.location.href).host}catch{return null}},Dh=({url:r,name:a,className:o,children:l})=>{const{api:d}=G(),[p,f]=x.useState(!1);if(Do(r,d.apiUrl)===null){const h=fn(r);return h?c.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:o,children:l}):c.jsx("span",{className:o,children:l})}return c.jsx("button",{type:"button",part:"attachment",className:B(o,p&&"opacity-70"),disabled:p,onClick:()=>{f(!0),d.attachment(r).then(h=>{N1(h,a)}).catch(()=>{}).finally(()=>{f(!1)})},children:l})},Th=({attachment:r})=>{const{api:a,lang:o,t:l}=G(),d=zf(r.name||jw(r.url,"file")),p=r.url&&Do(r.url,a.apiUrl)===null?Sw(r.url):null,f="inline-flex max-w-full items-center gap-2.5 rounded-xl border bg-muted p-1.5 text-left text-foreground",h=c.jsxs(c.Fragment,{children:[c.jsx(Os,{ext:As(d)}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx("span",{className:"truncate text-[13px] font-medium leading-tight",children:d}),c.jsxs("span",{className:"flex items-center gap-1.5 text-2xs leading-tight text-muted-foreground",children:[p??(r.size?$s(r.size,o):null),r.url?null:c.jsxs(c.Fragment,{children:[r.size?c.jsx("span",{"aria-hidden":"true",children:"\xB7"}):null,c.jsx("span",{children:l("attachment.sending")}),c.jsx(Rr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"})]})]})]}),r.url&&p?c.jsx(ys,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):r.url?c.jsx(af,{className:"mr-1 size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]});return r.url?c.jsxs(Dh,{url:r.url,name:d,className:B(f,"transition-colors hover:bg-accent"),children:[p?null:c.jsxs("span",{className:"sr-only",children:[l("download"),": "]}),h]}):c.jsx("span",{className:f,children:h})},Cw=({url:r,alt:a})=>{const{api:o}=G(),[l,d]=x.useState(null),[p,f]=x.useState(!1);return x.useEffect(()=>{let h=null,m=!1;return o.attachment(r).then(v=>{m?URL.revokeObjectURL(v):(h=v,d(v))},()=>{m||f(!0)}),()=>{m=!0,h&&URL.revokeObjectURL(h)}},[o,r]),p?c.jsx("span",{className:"text-muted-foreground",children:a||r}):l?c.jsx("img",{src:l,alt:a,className:"max-w-full rounded-lg"}):c.jsx(Rr,{className:"size-4 animate-spin text-muted-foreground","aria-label":a})},Nw=8,Qs=({children:r})=>c.jsx("div",{className:"text-2xs text-muted-foreground",children:r}),Ew=({block:r,onAsk:a})=>{const{lang:o,t:l}=G(),d=Array.isArray(r.sections)?r.sections:[],p=(Array.isArray(r.indicators)?r.indicators:[]).slice(0,Nw),f=Math.max(0,r.total-p.length),h=Array.isArray(r.examples)?r.examples.filter(m=>typeof m=="string"&&m):[];return c.jsxs("section",{part:"catalog",className:"flex min-w-0 flex-col rounded-xl border bg-card",children:[r.topic?c.jsxs("h3",{className:"m-0 flex items-center gap-2 border-b px-3.5 py-2.5 text-sm font-semibold",children:[c.jsx(Oo,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),l("blocks.catalogTitle",{topic:r.topic})]}):null,c.jsxs("div",{className:"flex flex-col gap-2.5 px-3.5 py-3",children:[d.length>0?c.jsxs("div",{children:[c.jsx(Qs,{children:l("blocks.catalogSections")}),c.jsx("ul",{className:"m-0 list-none p-0",children:d.map(m=>c.jsxs("li",{className:"flex items-center gap-2 border-b py-[7px] text-[13px] last:border-b-0",children:[c.jsx($o,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1 leading-snug",children:m.path.join(" \u203A ")}),c.jsx("span",{className:"whitespace-nowrap tabular-nums text-muted-foreground",children:_t(m.count,o)})]},m.id))})]}):null,p.length>0?c.jsxs("div",{children:[c.jsx(Qs,{children:l("blocks.catalogIndicators")}),c.jsx("ul",{className:"m-0 list-none p-0",children:p.map(m=>c.jsxs("li",{className:"flex flex-col border-b py-1.5 last:border-b-0",children:[c.jsx("span",{className:"text-[13px] font-medium leading-snug",children:m.name}),m.unit||m.years?c.jsx("span",{className:"text-2xs text-muted-foreground",children:[zs(m.unit),zs(m.years)].filter(Boolean).join(" \xB7 ")}):null]},m.entity_id))}),f>0?c.jsx("p",{className:"m-0 pt-1 text-[13px] text-muted-foreground",children:l("blocks.catalogMore",{count:_t(f,o)})}):null]}):null,h.length>0?c.jsxs("div",{className:"flex flex-col gap-1.5",children:[c.jsx(Qs,{children:l("blocks.catalogExamples")}),h.map(m=>c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-[10px] border bg-background px-2.5 py-2 text-left text-[13px] leading-snug transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:()=>{a(m)},children:[c.jsx(lv,{className:"shrink-0 text-primary","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:m})]},m)),c.jsx("div",{className:"text-2xs text-muted-foreground",children:l("blocks.catalogSendHint")})]}):null]})]})},Xo=({rootRef:r,question:a,tone:o,children:l})=>{const{t:d}=G();return c.jsxs("section",{part:"clarification",ref:r,role:"group","aria-label":d("blocks.clarification"),"data-state":o,className:B("overflow-hidden rounded-[14px] border",o==="open"&&"border-primary-30 bg-card",o==="done"&&"bg-card",o==="expired"&&"bg-muted"),children:[c.jsx("div",{className:"flex items-center gap-2 px-3.5 pb-1 pt-3",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-secondary px-2 py-0.5 text-2xs font-medium text-secondary-foreground",children:[c.jsx(cf,{className:"size-3","aria-hidden":"true"}),d("blocks.clarification")]})}),c.jsx("p",{className:"m-0 px-3.5 pb-2.5 text-[15px] font-medium leading-snug",children:a}),l]})},Ih=({children:r})=>c.jsx("kbd",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded border border-current/40 px-1 font-sans text-2xs leading-none opacity-80",children:r}),Ys=({children:r})=>c.jsx("div",{className:"flex items-center gap-2 border-t px-3.5 py-2.5 text-[13px] text-muted-foreground",children:r}),_w=2**31-1,zw=(r,a)=>{const[o,l]=x.useState(()=>new Date);return x.useEffect(()=>{if(!a)return;const d=Date.parse(r)-Date.now();if(!(d>0))return;const p=window.setTimeout(()=>{l(new Date)},Math.min(d+50,_w));return()=>{window.clearTimeout(p)}},[r,a]),o},Rw=({block:r,isLastInBranch:a,question:o,reply:l,disabled:d,onAsk:p})=>{const{t:f}=G(),h=x.useRef(null),m=zw(r.expires_at,a),v=mp(r,{isLastInBranch:a,now:m}),[b,j]=x.useState(""),k=x.useRef(!1),[S,_]=x.useState(!1),E=r.options,M=d||S,F=(Q,be=Q.label)=>{if(k.current||d)return;k.current=!0,_(!0);const Ne=p(be,{clarification_id:r.id,slot:r.slot,value:Q.value,free_text:null});Promise.resolve(Ne).then(ve=>{ve===!1&&(k.current=!1,_(!1))})},Z=x.useRef(F);x.useEffect(()=>{Z.current=F});const oe=r.type==="plan_confirm",J=E.find(Q=>Q.value===r.default)??E[0],ne=E.find(Q=>Q!==J),$=oe?[...J?[{option:J,text:f("blocks.continue")}]:[],...ne?[{option:ne,text:f("blocks.cancelPlan")}]:[]]:E.slice(0,I1).map(Q=>({option:Q,text:Q.label})),X=x.useRef($);x.useEffect(()=>{X.current=$});const K=v==="open"&&!M,he=$.length;x.useEffect(()=>{if(!K||he===0)return;const Q=h.current?.getRootNode();if(!Q)return;const be=Ne=>{const ve=Ne;if(ve.defaultPrevented||ve.ctrlKey||ve.metaKey||ve.altKey||ve.repeat||U1(ve.composedPath()[0]))return;const ye=Number(ve.key),U=Number.isInteger(ye)&&ye>=1?X.current[ye-1]:void 0;U&&(ve.preventDefault(),Z.current(U.option,U.text))};return Q.addEventListener("keydown",be),()=>{Q.removeEventListener("keydown",be)}},[K,he]);const ee=v==="answered"&&o!==""&&l===o;if(v==="answered"&&!ee)return c.jsx(Xo,{rootRef:h,question:r.question,tone:"done",children:l?c.jsxs(Ys,{children:[c.jsx(_r,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.chosen",{label:l})})]}):null});if(v==="expired"||ee)return c.jsx(Xo,{rootRef:h,question:r.question,tone:"expired",children:c.jsxs(Ys,{children:[c.jsx(xs,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.expired")}),o&&!ee?c.jsxs(me,{variant:"input",size:"sm",className:"gap-1.5",disabled:d,onClick:()=>{p(o)},children:[c.jsx(hf,{"aria-hidden":"true"}),f("blocks.askAgain")]}):null]})});if(oe){const[Q,be]=$;return c.jsx(Xo,{rootRef:h,question:r.question,tone:"open",children:c.jsxs("div",{className:"flex flex-wrap gap-2 px-2.5 pb-2.5",children:[Q?c.jsxs(me,{size:"sm",disabled:M,onClick:()=>{F(Q.option,Q.text)},children:[c.jsx(Ih,{children:"1"}),Q.text]}):null,be?c.jsxs(me,{variant:"input",size:"sm",disabled:M,onClick:()=>{F(be.option,be.text)},children:[c.jsx(Ih,{children:"2"}),be.text]}):null]})})}const ue=E.length>=T1,W=ue?_b(E,b):E;return c.jsxs(Xo,{rootRef:h,question:r.question,tone:"open",children:[c.jsxs("div",{className:"flex flex-col gap-1.5 px-2.5 pb-2.5",children:[ue?c.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[c.jsx(la,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{type:"search",value:b,placeholder:f("blocks.findOption"),"aria-label":f("blocks.findOption"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:Q=>{j(Q.target.value)}})]}):null,W.length>0?c.jsx("ul",{"aria-label":f("blocks.options"),className:"m-0 flex list-none flex-col gap-1.5 p-0",children:W.map(Q=>{const be=E.indexOf(Q)+1;return c.jsx("li",{children:c.jsxs("button",{type:"button",disabled:M,className:B("flex w-full items-start gap-3 rounded-[10px] border bg-background px-3 py-[9px] text-left transition-colors motion-reduce:transition-none","hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:bg-muted disabled:text-disabled-foreground"),onClick:()=>{F(Q)},children:[c.jsx("span",{className:"mt-px flex h-[22px] min-w-[22px] shrink-0 items-center justify-center rounded-md border text-2xs font-semibold tabular-nums text-muted-foreground",children:be}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[c.jsxs("span",{className:"text-sm font-medium leading-snug",children:[Q.label,Q.value===r.default?c.jsx("span",{className:"ml-1.5 whitespace-nowrap rounded-full bg-muted px-1.5 py-px text-2xs font-normal text-muted-foreground",children:f("blocks.default")}):null]}),Q.hint?c.jsx("span",{className:"text-[13px] leading-snug text-muted-foreground",children:Q.hint}):null]})]})},Q.value)})}):c.jsx("p",{className:"px-1 py-2 text-sm text-muted-foreground",children:f("searchEmpty")})]}),r.allow_free_text?c.jsxs(Ys,{children:[c.jsx(cf,{className:"shrink-0","aria-hidden":"true"}),c.jsx("span",{className:"min-w-0 flex-1",children:f("blocks.freeTextHint")})]}):null]})},Mw=10,Pw=({section:r})=>{const{t:a}=G(),o=r.latest_period,l=r.shape==="trend",d=l?[]:pa(r,{period:o,mode:"value",base:"median"}),p=d.slice(0,Mw);return c.jsxs("div",{part:"dashboard-preview",className:"flex min-w-0 flex-col gap-3 rounded-xl bg-[hsl(var(--chart-card))] px-4 py-3.5",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold leading-snug",children:r.title}),l?null:c.jsxs("p",{className:"text-2xs text-muted-foreground",children:[o,", ",r.unit.label]})]}),c.jsx(th,{compact:!0,section:r,period:o,label:a("chart.label",{title:r.title,period:o}),rows:p,national:Gf(r,o,p.map(f=>f.value))}),d.length>p.length?c.jsx("p",{className:"text-2xs text-muted-foreground",children:a("chart.top",{n:p.length,total:d.length})}):null]})},Ko=r=>r.type==="number"||r.type==="integer",Lw=(r,a,o)=>Ko(r)?_t(q1(a),o,r.type==="integer"?0:void 0):zs(a)||"\u2014",Dw={asc:tf,desc:ef},Tw=({block:r})=>{const{lang:a,t:o}=G(),[l,d]=x.useState(),[p,f]=x.useState("asc"),[h,m]=x.useState(1),[v,b]=x.useState(""),j=Array.isArray(r.columns)?r.columns:[],k=Cb({...r,columns:j,data:Array.isArray(r.data)?r.data:[]},{...l?{sortKey:l,dir:p}:{},page:h,query:v}),S=j.some(E=>E.type==="string"),_=E=>{E===l?f(M=>M==="asc"?"desc":"asc"):(d(E),f("asc")),m(1)};return c.jsxs("div",{part:"data-table",className:"flex min-w-0 flex-col gap-2",children:[S?c.jsxs("label",{className:"flex h-8 items-center gap-2 rounded-md border border-input bg-background px-2.5 text-sm focus-within:border-primary focus-within:ring-[3px] focus-within:ring-secondary",children:[c.jsx(la,{className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{type:"search",value:v,placeholder:o("blocks.tableSearch"),"aria-label":o("blocks.tableSearch"),className:"min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",onChange:E=>{b(E.target.value),m(1)}})]}):null,c.jsxs("div",{className:"max-w-full overflow-x-auto overscroll-x-contain rounded-[10px] border bg-background",children:[c.jsxs("table",{className:"w-full border-collapse text-[13.5px]","aria-label":o("blocks.table"),children:[c.jsx("thead",{children:c.jsx("tr",{className:"border-b bg-muted",children:j.map(E=>{const M=E.key===l,F=M?Dw[p]:Cx;return c.jsx("th",{scope:"col","aria-sort":M?p==="asc"?"ascending":"descending":"none",className:B("p-0 font-semibold",Ko(E)?"text-right":"text-left"),children:c.jsxs("button",{type:"button",className:B("inline-flex w-full items-center gap-1 whitespace-nowrap px-3 py-[7px] text-[13.5px] font-semibold text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",Ko(E)&&"flex-row-reverse"),onClick:()=>{_(E.key)},children:[c.jsx("span",{children:E.title}),E.unit?c.jsxs("span",{className:"font-normal",children:[", ",E.unit]}):null,c.jsx(F,{className:B("shrink-0 text-muted-foreground",!M&&"opacity-50"),"aria-hidden":"true"})]})},E.key)})})}),c.jsx("tbody",{children:k.rows.map((E,M)=>c.jsx("tr",{className:"border-b last:border-b-0",children:j.map(F=>c.jsx("td",{className:B("px-3 py-[7px] align-top",Ko(F)?"whitespace-nowrap text-right tabular-nums":"min-w-32"),children:Lw(F,E[F.key],a)},F.key))},k.from+M))})]}),k.total===0?c.jsx("p",{className:"px-3 py-3 text-center text-sm text-muted-foreground",children:o(v?"searchEmpty":"blocks.tableEmpty")}):null]}),k.pages>1?c.jsxs("div",{className:"flex items-center justify-end gap-1 text-2xs tabular-nums text-muted-foreground",children:[c.jsx(me,{variant:"ghost",size:"icon",className:"size-7",disabled:k.page<=1,"aria-label":o("blocks.prevPage"),onClick:()=>{m(k.page-1)},children:c.jsx(rf,{"aria-hidden":"true"})}),c.jsx("span",{"aria-live":"polite",children:o("blocks.page",{a:k.page,b:k.pages})}),c.jsx(me,{variant:"ghost",size:"icon",className:"size-7",disabled:k.page>=k.pages,"aria-label":o("blocks.nextPage"),onClick:()=>{m(k.page+1)},children:c.jsx($o,{"aria-hidden":"true"})})]}):null,r.truncated?c.jsx("p",{className:"text-2xs text-muted-foreground",children:o("blocks.truncated",{n:Array.isArray(r.data)?r.data.length:0})}):null]})},Zs="inline-flex min-h-[30px] max-w-full items-center gap-1.5 rounded-lg bg-muted px-2.5 py-1 text-[13px]",Iw=["sex","age","urban_rural","activity","item"],Aw=r=>Iw.includes(r),Js=({label:r,children:a,title:o})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:r}),c.jsx("span",{className:"min-w-0 truncate font-medium",title:o,children:a})]}),Gs=({label:r,children:a,className:o})=>c.jsx("li",{className:B(Zs,o),title:r,children:c.jsx(Js,{label:r,children:a})}),Ow=({block:r,question:a,onAsk:o})=>{const{t:l}=G(),[d,p]=x.useState(!1),f=x.useId(),h=r.indicators.map(j=>j.name).join(", "),m=r.territories.map(j=>j.name).join(", "),v=r.breakdown&&Aw(r.breakdown)?l(`blocks.breakdown.${r.breakdown}`):"",b=r.alternatives.length>0&&a!=="";return c.jsxs("div",{part:"plan",role:"group","aria-label":l("blocks.passport"),className:"flex flex-col gap-1.5",children:[c.jsx("div",{className:"text-2xs text-muted-foreground",children:l("blocks.passport")}),c.jsxs("ul",{"aria-label":l("blocks.passport"),className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0",children:[h?b?c.jsxs("li",{className:"relative max-w-full",children:[c.jsxs("button",{type:"button",className:B(Zs,"border border-border bg-background transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",d&&"border-primary ring-[3px] ring-secondary"),title:h,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":f,onClick:()=>{p(j=>!j)},children:[c.jsx(Js,{label:l("blocks.indicator"),children:h}),c.jsx(dn,{className:B("shrink-0 text-muted-foreground transition-transform motion-reduce:transition-none",d&&"rotate-180"),"aria-hidden":"true"})]}),d?c.jsxs("div",{id:f,role:"menu","aria-label":l("blocks.alternatives"),className:"absolute left-0 top-full z-20 mt-1 flex min-w-[220px] max-w-[min(360px,80vw)] flex-col rounded-md border bg-background p-1 shadow-pop",children:[c.jsx("div",{className:"px-2.5 pb-1 pt-1.5 text-2xs text-muted-foreground",children:l("blocks.alternatives")}),r.alternatives.map(j=>c.jsx("button",{type:"button",role:"menuitem",className:"flex min-h-9 w-full items-center rounded-md px-2.5 py-1.5 text-left text-sm transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none motion-reduce:transition-none",onClick:()=>{p(!1),o(`${a} \u2014 ${j.name}`)},children:j.name},j.id))]}):null]}):c.jsx(Gs,{label:l("blocks.indicator"),children:h}):null,m?c.jsx(Gs,{label:l("blocks.territory"),children:m}):null,r.period.label?c.jsxs("li",{className:B(Zs,r.period.substituted&&"border border-warning/40"),title:r.period.reason??l("blocks.period"),children:[c.jsx(Js,{label:l("blocks.period"),children:r.period.label}),r.period.substituted?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"\xB7"}),c.jsx("span",{className:"text-warn-text",children:l("blocks.substituted")})]}):null]}):null,v?c.jsx(Gs,{label:l("blocks.breakdown"),children:v}):null]})]})},Ah="gap-1.5 text-[13px]",Oh="gap-1.5 text-[13px] text-muted-foreground hover:text-foreground",$w=({text:r})=>{const{t:a}=G(),[o,l]=x.useState(!1),d=x.useRef(void 0);return x.useEffect(()=>()=>{window.clearTimeout(d.current)},[]),c.jsxs(me,{part:"copy",variant:"ghost",size:"sm",className:Oh,onClick:()=>{Es(r).then(p=>{p&&(l(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{l(!1)},2e3))})},children:[o?c.jsx(_r,{"aria-hidden":"true"}):c.jsx(vs,{"aria-hidden":"true"}),a(o?"copied":"copy")]})},Fw=({message:r,isLastInBranch:a,onAsk:o,children:l,dashboardOpen:d=!1,onToggleDashboard:p})=>{const{path:f,t:h}=G(),[m,v]=x.useState(!1),{blocks:b}=r,j=fr(b,"plan"),k=fr(b,"table"),S=fr(b,"catalog"),_=fr(b,"clarification"),{question:E,reply:M}=O1(f,r.id),F=r.status==="streaming",Z=j?.methodology?fn(j.methodology.url):null,oe=b.length>0&&!F?Eb(r):"",J=!F&&r.status!=="error"&&Ep(r.id),ne=fr(b,"dashboard"),$=ne?.sections[0],X=J&&ne!==void 0,K=X?p:void 0,he=Tf(b),ee=F?[]:A1(b);return c.jsxs(c.Fragment,{children:[j?c.jsx(Ow,{block:j,question:E,onAsk:o}):null,l,S?c.jsx(Ew,{block:S,onAsk:o}):null,_?c.jsx(Rw,{block:_,isLastInBranch:a,question:E,reply:M,disabled:F,onAsk:o}):null,$?c.jsx(Pw,{section:$}):null,k&&m?c.jsx(Tw,{block:k}):null,ee.length>0?c.jsx(sh,{files:ee}):null,J?c.jsx(ch,{messageId:r.id,block:he}):null,b.length>0&&!F?c.jsxs("div",{part:"answer-actions",role:"group",className:"flex flex-wrap items-center gap-1.5",children:[k?c.jsxs(me,{part:"data-toggle",variant:"input",size:"sm",className:Ah,"aria-expanded":m,onClick:()=>{v(ue=>!ue)},children:[c.jsx(Iv,{"aria-hidden":"true"}),h(m?"blocks.hideData":"blocks.data")]}):null,K?c.jsxs(me,{part:"dashboard-toggle","data-message-id":r.id,variant:"input",size:"sm",className:B(Ah,d&&"border-primary bg-secondary text-secondary-foreground"),"aria-expanded":d,onClick:()=>{K(r.id)},children:[c.jsx(Mx,{"aria-hidden":"true"}),h(d?"blocks.hideDashboard":"blocks.dashboard")]}):null,X?c.jsx(nh,{messageId:r.id,block:he}):null,j?.methodology&&Z?c.jsx(me,{part:"methodology",variant:"ghost",size:"sm",className:Oh,asChild:!0,children:c.jsxs("a",{href:Z,target:"_blank",rel:"noopener noreferrer",title:j.methodology.title,children:[c.jsx(Oo,{"aria-hidden":"true"}),h("blocks.methodology")]})}):null,oe?c.jsx($w,{text:oe}):null]}):null]})},Uw=5e4,$h=2e5,qw=x.lazy(()=>import("./markdown-impl-7ocPztMu.js").then(r=>({default:r.MarkdownImpl}))),Vw=x.memo(function({children:r,streaming:a=!1,className:o}){const l=c.jsx("span",{className:"whitespace-pre-wrap",children:r.length>$h?`${r.slice(0,$h)}\u2026`:r});return c.jsxs("div",{part:"markdown",className:B("min-w-0 break-words text-[15px] leading-[1.65] text-foreground",o),children:[r.length>Uw?l:c.jsx(ds,{fallback:l,children:c.jsx(x.Suspense,{fallback:l,children:c.jsx(qw,{children:r})})}),a?c.jsx("span",{"aria-hidden":"true",className:"ml-0.5 inline-block h-[17px] w-[7px] translate-y-[3px] rounded-sm bg-primary animate-pulse motion-reduce:animate-none"}):null]})}),ma="size-7 shrink-0 text-muted-foreground hover:text-foreground",Fh=({messageId:r,disabled:a})=>{const{index:o,switchBranch:l,t:d}=G(),{list:p,position:f}=p0(o,r);if(p.length<2||f<0)return null;const h=p[f-1],m=p[f+1];return c.jsxs("div",{part:"branch",className:"flex items-center text-[13px] tabular-nums text-muted-foreground",role:"group","aria-label":d("branch.label"),children:[c.jsx(me,{variant:"ghost",size:"icon",className:ma,disabled:a||!h,"aria-label":d("branch.prev"),onClick:()=>{h&&l(h.id)},children:c.jsx(rf,{"aria-hidden":"true"})}),c.jsxs("span",{"aria-live":"polite",className:"min-w-[30px] text-center",children:[f+1,"/",p.length]}),c.jsx(me,{variant:"ghost",size:"icon",className:ma,disabled:a||!m,"aria-label":d("branch.next"),onClick:()=>{m&&l(m.id)},children:c.jsx($o,{"aria-hidden":"true"})})]})},Bw=({text:r})=>{const{t:a}=G(),[o,l]=x.useState(!1),d=x.useRef(void 0);x.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);const p=a(o?"copied":"copy");return c.jsx(me,{part:"copy",variant:"ghost",size:"icon",className:ma,"aria-label":p,title:p,onClick:()=>{Es(r).then(f=>{f&&(l(!0),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{l(!1)},2e3))})},children:o?c.jsx(_r,{"aria-hidden":"true"}):c.jsx(vs,{"aria-hidden":"true"})})},Ww=({message:r})=>{const{rate:a,t:o}=G(),[l,d]=x.useState(),p=_f(r.rating)??0;return c.jsx("span",{part:"rating",role:"radiogroup","aria-label":o("rateGroup"),className:"inline-flex items-center",onKeyDown:yh,onMouseLeave:()=>{d(void 0)},children:Ef.map((f,h)=>{const m=f<=p,v=!m&&p===0&&l!==void 0&&f<=l;return c.jsx("button",{type:"button",role:"radio",tabIndex:vh(h,p-1),"aria-checked":p===f,"aria-label":o("rate",{count:f}),className:B("inline-flex size-[30px] items-center justify-center rounded-md text-muted-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",(m||v)&&"text-warning"),onMouseEnter:()=>{d(f)},onClick:()=>{a(r.id,f)},children:c.jsx(Dv,{className:B("size-4",m&&"fill-current"),"aria-hidden":"true"})},f)})})},Hw=({message:r,isLast:a,busy:o,ready:l,persisted:d,canFeedback:p,feedbackOpen:f,onOpenFeedback:h})=>{const{send:m,state:v,t:b}=G(),j=r.status==="error",k=a&&l&&!o&&!v.limit.blocked;if(j&&!k)return null;const S=Nf.find(F=>F===r.feedbackReason),_=!!(r.feedback||S),E=r.blocks.length>0,M=()=>{m({query:"",mode:v.mode??r.mode,regenerateOf:r.id})};return c.jsxs("div",{part:"actions",role:"toolbar","aria-label":b("actionsLabel"),className:B("flex min-h-8 flex-wrap items-center gap-0.5",!j&&r.rating==null&&!_&&Cs),children:[l&&!j&&r.content&&!E?c.jsx(Bw,{text:r.content}):null,k?j?c.jsxs(me,{part:"regenerate",variant:"input",size:"sm",className:"gap-1.5",onClick:M,children:[c.jsx(ff,{"aria-hidden":"true"}),b("regenerate")]}):c.jsxs(me,{part:"regenerate",variant:"ghost",size:"icon",className:B(ma,"max-sm:h-8 max-sm:w-auto max-sm:gap-1.5 max-sm:px-2.5 max-sm:text-[13px]"),"aria-label":b("regenerate"),title:b("regenerate"),onClick:M,children:[c.jsx(ff,{"aria-hidden":"true"}),c.jsx("span",{className:"hidden max-sm:inline",children:b("regenerate")})]}):null,l&&!j?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mx-1.5 h-[18px] w-px bg-border","aria-hidden":"true"}),c.jsx(Ww,{message:r})]}):null,c.jsx(Fh,{messageId:r.id,disabled:o||!d}),p&&!f?c.jsx(me,{variant:"link",size:"sm",onClick:h,children:b(_?"feedbackEdit":"feedbackOpen")}):null]})},Xw=({message:r,onClose:a})=>{const{saveFeedback:o,t:l}=G(),[d,p]=x.useState(r.feedback),[f,h]=x.useState(!1),[m,v]=x.useState(!1),b=()=>{h(!0),v(!1),o(r.id,d.trim()).then(j=>{h(!1),j?a():v(!0)})};return c.jsxs("form",{part:"feedback","aria-label":l("feedbackLabel"),onSubmit:j=>{j.preventDefault()},className:"flex flex-col gap-3 rounded-[14px] border bg-background p-3.5",children:[c.jsx(Hs,{autoFocus:!0,value:d,onChange:p,placeholder:l("feedbackPlaceholder"),"aria-label":l("feedbackLabel"),maxLength:Ns,disabled:f,className:"min-h-[76px] rounded-md border border-input bg-background px-3 py-2.5 text-[15px] leading-normal focus:border-primary focus:ring-[3px] focus:ring-secondary"}),m?c.jsxs("div",{role:"alert",className:"flex items-start gap-1.5 text-[13px] text-destructive",children:[c.jsx(zr,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),c.jsx("span",{children:l("ratingError")})]}):null,c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsxs("span",{className:B("mr-auto text-2xs tabular-nums text-muted-foreground",d.length>=Ns&&"font-semibold text-warn-text"),children:[d.length,"/",Ns]}),c.jsx(me,{variant:"ghost",size:"sm",onClick:a,disabled:f,children:l("cancel")}),c.jsxs(me,{size:"sm",disabled:f,onClick:b,children:[f?c.jsx(Rr,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}):null,l("save")]})]})]})},Kw=({message:r})=>{const{t:a}=G(),o=Nf.find(l=>l===r.feedbackReason);return!o&&!r.feedback?null:c.jsxs("div",{part:"feedback-saved",className:"flex flex-col gap-1 rounded-xl bg-muted px-3 py-2.5 text-sm",children:[o?c.jsx("span",{className:"font-semibold",children:a(`feedback.reason.${o}`)}):null,r.feedback?c.jsx("span",{className:"whitespace-pre-line break-words",children:r.feedback}):null]})},Qw=60,Yw=3,Zw=.1,Jw=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function Gw(r,a){const o=r.charCodeAt(a-1);return o>=55296&&o<=56319?a+1:a}function ek(r,a){const[o]=x.useState(Jw),[l,d]=x.useState(!1);a&&!l&&!o&&d(!0);const[p,f]=x.useState(r.length),h=x.useRef(p),m=x.useRef(r);return x.useLayoutEffect(()=>{m.current=r},[r]),x.useEffect(()=>{if(!l)return;h.current>r.length&&(h.current=r.length,f(r.length));let v=0,b=null;const j=k=>{const S=m.current,_=b==null?1/60:Math.min((k-b)/1e3,Zw);b=k;const E=S.length-h.current;if(E<=0)return;const M=Math.max(1,Math.round(Math.max(Qw*_,E*Math.min(1,Yw*_))));h.current=Math.min(S.length,Gw(S,h.current+M)),f(h.current),v=requestAnimationFrame(j)};return v=requestAnimationFrame(j),()=>{cancelAnimationFrame(v)}},[r,l]),!l||p>=r.length?r:r.slice(0,p)}const tk=({message:r,isLast:a,busy:o,persisted:l,dashboardOpen:d,onToggleDashboard:p})=>{const{send:f,state:h,t:m}=G(),[v,b]=x.useState(!1),j=r.status==="streaming",k=r.status==="error",S=ek(r.content,j),_=j||S.length<r.content.length,E=ix(j,r.status),M=!j&&l,F=M&&!k,Z=!k&&(j||r.steps.length>0),oe=Date.parse(r.createdAt)||0,J=E?"eureka":tx(r.status,r.content.length>0),ne=($,X)=>f({query:$,mode:h.mode??r.mode,...X?{clarification:X}:{}}).then(K=>K==="sent");return c.jsxs("article",{part:"message","data-role":"assistant","data-status":r.status,"aria-busy":j,className:"group flex items-start gap-3",children:[c.jsx("div",{part:"avatar",className:"w-10 shrink-0 max-sm:hidden",children:c.jsx(Kp,{mood:J,size:40,animated:j||E})}),c.jsxs("div",{part:k?"bubble assistant-bubble error-bubble":"bubble assistant-bubble",className:"flex min-w-0 flex-1 flex-col gap-3",children:[Z?c.jsx(kw,{steps:r.steps,status:r.status,startedAt:oe,durationMs:r.durationMs,stopping:h.turn?.stopping===!0&&h.turn.assistantId===r.id}):null,k?c.jsxs("div",{role:"alert",className:"flex items-start gap-2.5 rounded-xl border border-error/30 bg-destructive-background px-3.5 py-3 text-sm",children:[c.jsx(zr,{className:"mt-0.5 size-4 shrink-0 text-destructive","aria-hidden":"true"}),c.jsx("span",{children:r.content||m("errors.generic")})]}):null,c.jsx(Fw,{message:r,isLastInBranch:a,onAsk:ne,dashboardOpen:d,onToggleDashboard:p,children:r.content&&!k?c.jsx(Vw,{streaming:_,children:S}):null}),r.attachments.length>0?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.attachments.map(($,X)=>c.jsx(Th,{attachment:$},$.id??`${$.name}-${X}`))}):null,r.status==="stopped"?c.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[c.jsx(of,{className:"size-4 shrink-0","aria-hidden":"true"}),c.jsx("span",{children:m("agent.answerStopped")})]}):null,j?null:c.jsx(Hw,{message:r,isLast:a,busy:o,ready:M,persisted:l,canFeedback:F,feedbackOpen:v,onOpenFeedback:()=>{b(!0)}}),F&&v?c.jsx(Xw,{message:r,onClose:()=>{b(!1)}}):null,F&&!v?c.jsx(Kw,{message:r}):null]})]})},rk=({message:r,onClose:a})=>{const{send:o,state:l,t:d}=G(),p=x.useId(),[f,h]=x.useState(r.content),m=l.mode??r.mode,v=l.config?.max_query_chars??Lp,b=f.trim(),j=b!==r.content.trim(),k=f.length>v,S=b.length>0&&j&&!k&&!l.turn&&!l.limit.blocked,_=()=>{S&&(a(),o({query:b,mode:m,parentId:r.parentId??""}))};return c.jsxs("div",{part:"edit",onKeyDown:E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),a())},className:"flex w-full max-w-[640px] flex-col gap-2 rounded-2xl border border-primary bg-background px-3 py-2.5 ring-[3px] ring-secondary",children:[c.jsx(Hs,{autoFocus:!0,value:f,onChange:h,"aria-label":d("editLabel"),"aria-invalid":k||void 0,"aria-describedby":p,className:"py-0.5 text-lg",onSubmit:_}),c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(jh,{id:p,count:f.length,max:v,className:"mr-auto px-0"}),c.jsx(me,{variant:"ghost",size:"sm",onClick:a,children:d("cancel")}),c.jsx(me,{size:"sm",disabled:!S,onClick:_,children:d("send")})]})]})},nk=({message:r,busy:a,persisted:o})=>{const{t:l}=G(),[d,p]=x.useState(!1);return c.jsx("div",{part:"message","data-role":"user",className:"group flex flex-col items-end gap-1.5",children:d?c.jsx(rk,{message:r,onClose:()=>{p(!1)}}):c.jsxs(c.Fragment,{children:[r.attachments.length>0?c.jsx("div",{className:"flex max-w-[78%] flex-wrap justify-end gap-1.5 max-sm:max-w-[88%]",children:r.attachments.map((f,h)=>c.jsx(Th,{attachment:f},f.id??`${f.name}-${h}`))}):null,c.jsx("div",{part:"bubble user-bubble",className:"max-w-[78%] whitespace-pre-wrap break-words rounded-[calc(var(--aid-c-radius)+6px)] rounded-br-[6px] bg-primary px-3.5 py-2.5 text-[15px] leading-normal text-primary-foreground max-sm:max-w-[88%]",children:r.content}),c.jsxs("div",{className:"flex min-h-7 items-center gap-0.5",children:[o?c.jsx(me,{part:"edit-button",variant:"ghost",size:"icon",className:B(ma,Cs),disabled:a,"aria-label":l("edit"),title:l("edit"),onClick:()=>{p(!0)},children:c.jsx(wv,{"aria-hidden":"true"})}):null,c.jsx(Fh,{messageId:r.id,disabled:a||!o})]})]})})},ak=x.memo(function({message:r,isLast:a,busy:o,dashboardOpen:l,onToggleDashboard:d}){const{t:p}=G(),f=Ep(r.id),h=c.jsx("p",{part:"message-error",className:"text-sm text-muted-foreground",children:p("errors.render")});return c.jsx(ds,{fallback:h,children:r.role==="user"?c.jsx(nk,{message:r,busy:o,persisted:f}):c.jsx(tk,{message:r,isLast:a,busy:o,persisted:f,dashboardOpen:l,onToggleDashboard:d})})}),Uh=r=>r.scrollHeight-r.scrollTop-r.clientHeight,ok=16,ik=({resetKey:r,followKey:a})=>{const o=x.useRef(null),l=x.useRef(null),d=x.useRef(!0),p=x.useRef(0),f=x.useRef(!1),h=x.useRef(null),[m,v]=x.useState(!0),b=x.useCallback(()=>{const S=o.current;if(!S)return;const _=S.querySelectorAll('[data-role="user"]'),E=_[_.length-1];if(!f.current&&E){const M=S.scrollTop+E.getBoundingClientRect().top-S.getBoundingClientRect().top-ok;if(M<S.scrollHeight-S.clientHeight){f.current=!0,d.current=!1,S.scrollTop=Math.max(0,M),h.current=S.scrollTop;return}}S.scrollTop=S.scrollHeight},[]),j=x.useCallback(()=>{const S=o.current;if(!S)return;d.current=!0;const _=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;S.scrollTo({top:S.scrollHeight,behavior:_?"auto":"smooth"})},[]),k=x.useCallback(()=>{const S=o.current;if(!S)return;const _=Uh(S)<Sf,E=h.current!==null&&Math.abs(S.scrollTop-h.current)<1;E||(h.current=null),_&&!E?d.current=!0:S.scrollTop<p.current-1&&(d.current=!1),p.current=S.scrollTop,v(_)},[]);return x.useLayoutEffect(()=>{d.current=!0,f.current=!1,h.current=null,b()},[r,a,b]),x.useEffect(()=>{const S=l.current,_=o.current;if(!S||!_||typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>{d.current&&b(),v(Uh(_)<Sf)});return E.observe(S),()=>{E.disconnect()}},[b]),{scrollRef:o,contentRef:l,onScroll:k,atBottom:m,scrollToBottom:j}},lk=()=>{const{state:r,path:a,t:o}=G(),{state:l,toggle:d}=Lr(),p=a.filter(S=>S.role==="user").length,{scrollRef:f,contentRef:h,onScroll:m,atBottom:v,scrollToBottom:b}=ik({resetKey:r.thread?.id??null,followKey:p}),j=r.turn!==null,k=a[a.length-1];return c.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col",children:[c.jsx("div",{ref:f,part:"messages",onScroll:m,"aria-live":"polite","aria-busy":j,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:c.jsx("div",{ref:h,className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:a.map(S=>c.jsx(ak,{message:S,isLast:S===k,busy:j,dashboardOpen:S.id===l.messageId,onToggleDashboard:d},S.id))})}),v?null:c.jsxs("button",{part:"scroll-down",type:"button",className:"absolute bottom-3 left-1/2 inline-flex h-9 -translate-x-1/2 items-center gap-1.5 whitespace-nowrap rounded-full border bg-background pl-3 pr-3.5 text-[13px] font-medium text-foreground shadow-pop transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",onClick:b,children:[c.jsx(ef,{"aria-hidden":"true"}),o("scrollDown")]})]})},sk={error:"bg-error-background text-destructive",warning:"bg-warning-background text-warn-text",lock:"bg-muted text-muted-foreground"},qh=({tone:r,children:a})=>c.jsx("span",{className:B("flex size-[52px] items-center justify-center rounded-full",sk[r]),children:a}),ck=({kind:r,onRetry:a})=>{const{t:o}=G();if(r==="loading")return c.jsxs("div",{part:"shell-status","data-state":"loading","aria-busy":"true",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx("span",{"aria-hidden":"true",className:"size-[26px] animate-spin rounded-full border-[3px] border-current border-r-transparent text-primary motion-reduce:animate-none"}),c.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:o("loading")})]});if(r==="siteBlocked")return c.jsxs("div",{part:"shell-status","data-state":"siteBlocked",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(qh,{tone:"lock",children:c.jsx(lf,{className:"size-6","aria-hidden":"true"})}),c.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o("shell.siteBlocked")}),c.jsx("p",{className:"max-w-[440px] text-xs text-muted-foreground",children:o("shell.siteBlockedHint")})]});const l=r==="overloaded";return c.jsxs("div",{part:"shell-status","data-state":l?"overloaded":"unavailable",role:"alert",className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(qh,{tone:l?"warning":"error",children:l?c.jsx(Fo,{className:"size-6","aria-hidden":"true"}):c.jsx(zr,{className:"size-6","aria-hidden":"true"})}),c.jsx("p",{className:"max-w-[300px] text-lg font-semibold",children:o(l?"overloaded":"configError")}),a?c.jsxs(me,{variant:"input",size:"sm",onClick:a,children:[c.jsx(hf,{"aria-hidden":"true"}),o("retry")]}):null]})},dk=()=>{const{state:r,reload:a}=G(),o=hx(r);return o===null?null:c.jsx(ck,{kind:o,onRetry:o==="siteBlocked"?void 0:a})},uk="h-3 rounded-md bg-muted animate-pulse motion-reduce:animate-none",pk=()=>{const{t:r}=G();return c.jsxs("div",{"aria-busy":"true",className:"min-h-0 flex-1 overflow-hidden",children:[c.jsxs("div",{className:"mx-auto flex w-full max-w-[820px] flex-col gap-[22px] px-4 pb-4 pt-[18px]",children:[c.jsx("div",{className:"flex justify-end",children:c.jsx("div",{className:"h-[38px] w-[62%] rounded-[18px] rounded-br-[6px] bg-muted animate-pulse motion-reduce:animate-none"})}),c.jsx("div",{className:"flex flex-col gap-2.5",children:[90,76,84,40].map(a=>c.jsx("div",{className:uk,style:{width:`${a}%`}},a))})]}),c.jsx("span",{role:"status",className:"sr-only",children:r("loading")})]})},fk=({composerRef:r,wide:a})=>{const{state:o,path:l}=G(),d=!!o.config&&!o.loadingThread&&!o.configError,p=d&&l.length===0,f=m=>{r&&"current"in r&&r.current?.setText(m)};let h;return d?p?h=c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:c.jsx(pw,{wide:a,onPick:f})}):h=c.jsx(lk,{}):h=o.loadingThread&&o.config&&!o.configError?c.jsx(pk,{}):c.jsx(dk,{}),c.jsxs(c.Fragment,{children:[h,c.jsx(ow,{composerRef:r})]})},ba="size-8 shrink-0 text-muted-foreground hover:text-foreground",hk=({historyHidden:r,onShowHistory:a,onOpenSettings:o,title:l,logoUrl:d,threadTitle:p,tabs:f,inert:h=!1})=>{const{t:m,newChat:v}=G(),b=cs(),j=x.useRef(null);Mr(j,h);const k=p!==void 0&&p!==""?p:r?l:"";return c.jsxs("div",{ref:j,part:"toolbar",className:"flex h-toolbar shrink-0 items-center gap-1 border-b py-0 pl-2.5 pr-2",children:[r?c.jsx(me,{part:"history-toggle",variant:"ghost",size:"icon",className:ba,"aria-expanded":!1,"aria-label":m("history"),title:m("history"),onClick:a,children:c.jsx(mv,{"aria-hidden":"true"})}):null,r&&d?c.jsx("img",{part:"logo",src:d,alt:"",referrerPolicy:"no-referrer",className:"size-6 shrink-0 rounded-md object-contain"}):null,c.jsx("span",{className:"min-w-0 flex-1 truncate px-1.5 text-sm font-semibold",children:k}),f,c.jsx(me,{variant:"ghost",size:"icon",className:ba,"aria-label":m("newChat"),title:m("newChat"),onClick:v,children:c.jsx(pf,{"aria-hidden":"true"})}),b.canExpand?c.jsx(me,{part:"expand",variant:"ghost",size:"icon",className:ba,"aria-label":b.expanded?m("shrink"):m("expand"),title:b.expanded?m("shrink"):m("expand"),onClick:()=>{b.setExpanded(!b.expanded)},children:b.expanded?c.jsx(uf,{"aria-hidden":"true"}):c.jsx(sf,{"aria-hidden":"true"})}):null,c.jsx(me,{part:"settings-button",variant:"ghost",size:"icon",className:ba,"aria-label":m("settings"),title:m("settings"),onClick:o,children:c.jsx(Rv,{"aria-hidden":"true"})}),b.close?c.jsx(me,{part:"close",variant:"ghost",size:"icon",className:ba,"aria-label":m("close"),title:m("close"),onClick:b.close,children:c.jsx(sa,{"aria-hidden":"true"})}):null]})},gk="flex shrink-0 flex-col border-r duration-200 animate-in fade-in slide-in-from-left-2 motion-reduce:animate-none",mk="w-side bg-muted",bk="absolute inset-y-0 left-0 z-30 w-side-over max-w-full bg-muted shadow-side",xk=({title:r,logoUrl:a,onHide:o})=>{const{t:l}=G();return c.jsxs("div",{part:"header",className:"flex h-side-head shrink-0 items-center gap-2.5 pl-3.5 pr-2",children:[a?c.jsx("img",{part:"logo",src:a,alt:"",referrerPolicy:"no-referrer",className:"size-7 shrink-0 rounded-lg object-cover"}):c.jsx(Qp,{size:28}),c.jsx("span",{part:"title",className:"min-w-0 flex-1 truncate text-[15px] font-bold",children:r}),c.jsx(me,{variant:"ghost",size:"icon",className:"size-8 text-muted-foreground hover:text-foreground","aria-label":l("closeHistory"),title:l("closeHistory"),onClick:o,children:c.jsx(hv,{"aria-hidden":"true"})})]})},vk=({onClick:r})=>{const{t:a}=G();return c.jsxs("button",{part:"new-chat",type:"button",onClick:r,className:"flex h-9 w-full items-center gap-2.5 rounded-md border bg-background pl-3 pr-2.5 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",children:[c.jsx(pf,{className:"size-4","aria-hidden":"true"}),a("newChat")]})},yk=({name:r,onConfirm:a,onCancel:o})=>{const{t:l}=G(),d=x.useRef(null);return x.useEffect(()=>{d.current?.querySelector("[data-cancel]")?.focus()},[]),c.jsxs("div",{ref:d,role:"alertdialog","aria-label":l("deleteConfirm"),onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),o())},className:"my-0.5 flex flex-col gap-2 rounded-[10px] border border-error/35 bg-destructive-background p-2.5",children:[c.jsx("div",{className:"text-[13px] font-semibold",children:l("deleteConfirm")}),c.jsx("div",{className:"truncate text-2xs text-muted-foreground",children:r}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(me,{variant:"destructive",size:"xs",onClick:a,children:l("deleteYes")}),c.jsx(me,{variant:"ghost",size:"xs","data-cancel":!0,onClick:o,children:l("deleteNo")})]})]})},wk=(r,a)=>{let o="";const l=[];let d=0;for(const h of r){const m=h.toLowerCase();l.push(...Array.from({length:m.length},()=>d)),o+=m,d+=h.length}l.push(d);const p=o.indexOf(a);if(p<0)return null;let f=p+a.length;for(;f<l.length&&l[f]===l[f-1];)f+=1;return[l[p]??0,l[f]??r.length]},kk=({text:r,query:a})=>{const o=a.trim().toLowerCase(),l=o?wk(r,o):null;if(!l)return c.jsx(c.Fragment,{children:r});const[d,p]=l;return c.jsxs(x.Fragment,{children:[r.slice(0,d),c.jsx("mark",{className:"rounded-[3px] bg-hl px-px text-inherit",children:r.slice(d,p)}),r.slice(p)]})},jk=({groups:r,query:a,activeId:o,confirmId:l,onOpen:d,onAskDelete:p,onCancelDelete:f,onDelete:h})=>{const{t:m}=G();return c.jsx(c.Fragment,{children:r.map(([v,b])=>c.jsxs("section",{className:"pb-1","aria-label":m(v),children:[c.jsx("h3",{className:"px-2 pb-1 pt-3.5 text-2xs font-medium text-muted-foreground",children:m(v)}),c.jsx("ul",{className:"flex flex-col gap-px",children:b.map(j=>{const k=j.id===o,S=j.title||m("untitled");return l===j.id?c.jsx("li",{children:c.jsx(yk,{name:S,onConfirm:()=>{h(j.id)},onCancel:f})},j.id):c.jsxs("li",{className:"group relative",children:[c.jsx("button",{part:"thread-item",type:"button","aria-current":k?"page":void 0,title:S,onClick:()=>{d(j.id)},className:B("flex min-h-9 w-full items-center rounded-lg py-1 pl-2.5 pr-9 text-left text-sm transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",k&&"bg-background font-medium shadow-[inset_0_0_0_1px_var(--aid-c-border)] hover:bg-background"),children:c.jsx("span",{className:"min-w-0 truncate",children:c.jsx(kk,{text:S,query:a})})}),c.jsx(me,{variant:"ghost",size:"icon",className:B("absolute right-1 top-1/2 size-7 -translate-y-1/2 text-muted-foreground",!k&&Cs),"aria-label":`${m("delete")}: ${S}`,onClick:()=>{p(j.id)},children:c.jsx(Ov,{"aria-hidden":"true"})})]},j.id)})})]},v))})},ec=({icon:r,children:a})=>c.jsxs("div",{className:"flex flex-col items-center gap-1.5 px-3 py-6 text-center text-sm text-muted-foreground",children:[r,a]}),Sk=[82,64,90,58,76,70],Ck=({query:r})=>{const{state:a,t:o,refreshThreads:l}=G();return a.threadsLoaded?r.trim()!==""?c.jsx(ec,{icon:c.jsx(la,{"aria-hidden":"true"}),children:c.jsx("span",{children:o("searchEmpty")})}):a.threadsError?c.jsxs(ec,{icon:c.jsx(zr,{"aria-hidden":"true"}),children:[c.jsx("span",{children:o("historyError")}),c.jsx(me,{variant:"input",size:"xs",onClick:l,children:o("retry")})]}):c.jsx(ec,{icon:c.jsx(df,{"aria-hidden":"true"}),children:c.jsx("span",{children:o("historyEmpty")})}):c.jsxs("div",{"aria-busy":"true",className:"flex flex-col",children:[Sk.map(d=>c.jsx("div",{className:"flex min-h-9 items-center px-2.5",children:c.jsx("span",{className:"h-[11px] animate-pulse rounded-md bg-border motion-reduce:animate-none",style:{width:`${d}%`}})},d)),c.jsx("span",{role:"status",className:"sr-only",children:o("loading")})]})},Nk=(r,a,o)=>{qo(r,a);const l=x.useRef(o);x.useEffect(()=>{l.current=o}),x.useEffect(()=>{if(!a)return;const p=f=>{if(f.key!=="Escape"||f.defaultPrevented)return;const h=f.composedPath(),m=h[0];m instanceof HTMLInputElement&&m.type==="search"&&m.value!==""||h.some(v=>v instanceof HTMLElement&&v.getAttribute("role")==="alertdialog")||(f.preventDefault(),f.stopPropagation(),l.current())};return window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}},[a]);const d=x.useRef(!1);x.useEffect(()=>{const p=r.current?.getRootNode();if(d.current&&!a){const f=window.setTimeout(()=>{p?.querySelector('[part~="history-toggle"]')?.focus()},0);return d.current=!1,()=>{window.clearTimeout(f)}}d.current=a},[a,r])},Ek=({query:r,onQuery:a,inputRef:o,autoFocus:l})=>{const{t:d}=G();return c.jsxs("label",{className:"relative flex items-center",children:[c.jsx(la,{className:"pointer-events-none absolute left-[11px] size-4 text-muted-foreground","aria-hidden":"true"}),c.jsx("input",{ref:o,part:"search",type:"search",value:r,"data-autofocus":l?"":void 0,onChange:p=>{a(p.target.value)},onKeyDown:p=>{p.key==="Escape"&&r&&(p.preventDefault(),a(""))},placeholder:d("search"),"aria-label":d("search"),className:"h-8 w-full rounded-md border border-input bg-background pl-[34px] pr-9 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-secondary [&::-webkit-search-cancel-button]:hidden"}),r?c.jsx("button",{type:"button","aria-label":d("dismiss"),className:"absolute right-2 rounded p-0.5 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>{a(""),o.current?.focus()},children:c.jsx(sa,{className:"size-3.5","aria-hidden":"true"})}):null]})},_k=({collapsed:r,onCollapsedChange:a,searchRef:o,searchSignal:l,overlay:d=!1,title:p,logoUrl:f,inert:h=!1})=>{const m=x.useRef(null);Mr(m,h);const{state:v,t:b,openThread:j,newChat:k,deleteThread:S}=G(),[_,E]=x.useState(""),[M,F]=x.useState(null),Z=d&&!r;Nk(m,Z,()=>{a(!0)});const oe=x.useMemo(()=>{const ne=_.trim().toLowerCase(),$=ne?v.threads.filter(X=>(X.title||b("untitled")).toLowerCase().includes(ne)):v.threads;return _1($)},[v.threads,_,b]);x.useEffect(()=>{l>0&&!r&&o.current?.focus()},[l,r,o]);const J=ne=>()=>{ne(),d&&a(!0)};return r?c.jsx("nav",{ref:m,part:"sidebar","data-state":"collapsed","aria-label":b("history"),hidden:!0}):c.jsxs("nav",{ref:m,part:"sidebar","data-state":"expanded","aria-label":b("history"),className:B(gk,d?bk:mk),children:[c.jsx(xk,{title:p,logoUrl:f,onHide:()=>{a(!0)}}),c.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-2.5 pb-2",children:[c.jsx(vk,{onClick:J(k)}),c.jsx(Ek,{query:_,onQuery:E,inputRef:o,autoFocus:Z})]}),c.jsxs("div",{part:"history",className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 pb-2",children:[oe.length===0?c.jsx(Ck,{query:_}):null,c.jsx(jk,{groups:oe,query:_,activeId:v.thread?.id,confirmId:M,onOpen:ne=>{J(()=>{j(ne)})()},onAskDelete:F,onCancelDelete:()=>{F(null)},onDelete:ne=>{F(null),S(ne)}})]})]})};function zk(r){const a=x.useRef(null),[o,l]=x.useState(r);return x.useLayoutEffect(()=>{const d=a.current;if(!d)return;const p=Math.round(d.getBoundingClientRect().width);if(p>0&&l(p),typeof ResizeObserver>"u")return;const f=new ResizeObserver(([h])=>{const m=Math.round(h?.contentRect.width??0);m>0&&l(m)});return f.observe(d),()=>{f.disconnect()}},[]),[a,o]}const Vh="aid_sidebar",Rk=720,Mk=r=>{try{const a=window.localStorage.getItem(Vh);return a===null?r:a==="collapsed"}catch{return r}},Pk=r=>{const{state:a}=G(),o=a.thread?.id,l=o!==void 0&&o!==cn?o:void 0;return c.jsx(My,{threadId:l,children:c.jsx(Lk,{...r})})},Lk=({open:r,title:a,logoUrl:o,compact:l})=>{const{state:d,path:p,newChat:f}=G(),h=cs(),{expandForDashboard:m}=h,[v,b]=zk(0),j=(h.canExpand&&h.expanded?Math.max(b,window.innerWidth):b)>=B1,k=Lr(),S=l||b>0&&b<Rk,[_,E]=x.useState(()=>S||Mk(!1)),[M,F]=x.useState(S);S!==M&&(F(S),S&&E(!0));const[Z,oe]=x.useState(!1),J=x.useRef(null),[ne,$]=x.useState(0),X=()=>{he(!1),$(H=>H+1)},K=x.useRef(null),he=H=>{if(E(H),!S)try{window.localStorage.setItem(Vh,H?"collapsed":"expanded")}catch{}},ee=x.useRef({collapsed:_,newChat:f,setCollapsed:he,focusSearch:X});x.useEffect(()=>{ee.current={collapsed:_,newChat:f,setCollapsed:he,focusSearch:X}}),x.useEffect(()=>{if(!r)return;const H=V=>{if(!(V.metaKey||V.ctrlKey)||V.altKey)return;const{collapsed:pe,newChat:fe,setCollapsed:Se,focusSearch:ke}=ee.current,xe=V.key.toLowerCase();if(xe==="k"&&!V.shiftKey)ke();else if(xe==="o"&&V.shiftKey)fe(),setTimeout(()=>K.current?.setText(""),0);else if(xe==="s"&&V.shiftKey)Se(!pe);else return;V.preventDefault()};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[r]);const ue=p.find(H=>H.id===k.state.messageId&&fr(H.blocks,"dashboard")!==void 0),W=ue!==void 0;x.useEffect(()=>{if(W)return m(!0),()=>{m(!1)}},[W,m]);const Q=x.useRef(null),be=x.useRef(!1),Ne=ue?.id??null,ve=x.useRef(null);x.useEffect(()=>{const H=ve.current;if(ve.current=Ne,H===null||Ne!==null||!be.current)return;be.current=!1;const V=Q.current;(Array.from(V?.querySelectorAll('[part="dashboard-toggle"]')??[]).find(pe=>pe.dataset.messageId===H)??V?.querySelector('[part="composer"] textarea'))?.focus()},[Ne]);const ye=W&&k.state.fullscreen;Mr(Q,S&&!_);const[U,D]=x.useState(r);r!==U&&(D(r),!r&&S&&E(!0));const T=H1(W,j,k.state.fullscreen);W1(r&&W&&(!T||k.state.view==="dashboard"));const w=d.thread?d.threads.find(H=>H.id===d.thread?.id)?.title:void 0,L=d.config&&!d.loadingThread&&!d.configError;return c.jsxs("div",{ref:v,className:"relative flex min-h-0 flex-1",children:[c.jsx(_k,{collapsed:_,onCollapsedChange:he,overlay:S,searchRef:J,searchSignal:ne,title:a,logoUrl:o,inert:ye}),c.jsxs("div",{ref:Q,className:"flex min-w-0 flex-1 flex-col",children:[c.jsx(hk,{historyHidden:_,onShowHistory:()=>{he(!1)},onOpenSettings:()=>{oe(!0)},title:a,logoUrl:o,threadTitle:w,tabs:T?c.jsx(X1,{}):null,inert:ye}),c.jsx(K1,{wide:j,onPanelFocusChange:H=>{be.current=H},panel:ue?c.jsx(zy,{message:ue}):null,chat:c.jsx(fk,{composerRef:K,wide:b>=720})})]}),S&&!_?c.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"absolute inset-0 z-20 bg-scrim",onClick:()=>{he(!0)}}):null,c.jsx(Ly,{active:r&&!!L}),c.jsx(By,{open:Z,onClose:()=>{oe(!1)}})]})},Bh=({open:r,title:a,logoUrl:o,fullscreen:l,expanded:d=!1,style:p,onClose:f})=>{const h=x.useRef(null);return Mr(h,!r),qo(h,r),x.useEffect(()=>{if(!r)return;const m=v=>{v.key==="Escape"&&!v.defaultPrevented&&f()};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[r,f]),c.jsx("div",{ref:h,part:"window",role:"dialog","aria-modal":l,"aria-label":a,"aria-hidden":!r,"data-state":r?"open":"closed","data-fullscreen":l,"data-expanded":d,className:"aid-window rounded-aid-window border bg-background text-foreground shadow-window",style:p,children:c.jsx(Pk,{open:r,title:a,logoUrl:o,compact:l})})},tc=60,Dk=6,Tk=8,Wh={x:20,y:20},Ik=639,Hh="aid_pos",Ak=(r,a,o=Dk)=>r*r+a*a>=o*o,Qo=(r,a,o=tc,l=Tk)=>{const d=typeof o=="number"?{width:o,height:o}:o,p=(f,h)=>Math.round(Math.min(Math.max(f,l),Math.max(l,h)));return{x:p(r.x,a.width-d.width-l),y:p(r.y,a.height-d.height-l)}},Xh=(r,a,o,l)=>({x:l==="bottom-right"?r.x-a:r.x+a,y:r.y-o}),Ok=r=>{try{const a=r?.getItem(Hh);if(!a)return null;const o=JSON.parse(a);if(typeof o=="object"&&o!==null&&typeof o.x=="number"&&typeof o.y=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y))return{x:o.x,y:o.y}}catch{}return null},$k=(r,a)=>{try{r?.setItem(Hh,JSON.stringify(a))}catch{}},Fk={width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},Uk=({size:r=24})=>c.jsx("svg",{...Fk,width:r,height:r,children:c.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Kh=()=>({width:window.innerWidth,height:window.innerHeight}),rc=r=>({width:r.offsetWidth,height:r.offsetHeight}),qk=()=>{try{return window.localStorage}catch{return null}},Qh=x.forwardRef(({open:r,lang:a,corner:o,offset:l,draggable:d,unread:p=0,variant:f,label:h,shape:m,onOffsetChange:v,onToggle:b},j)=>{const k=x.useRef(null),S=x.useRef(!1),[_,E]=x.useState(null),M=_!==null,F=X=>{!d||X.button!==0||(k.current={pointerX:X.clientX,pointerY:X.clientY,offset:l,moved:!1},X.currentTarget.setPointerCapture(X.pointerId))},Z=X=>{const K=k.current;if(!K)return;const he=X.clientX-K.pointerX,ee=X.clientY-K.pointerY;!K.moved&&!Ak(he,ee)||(K.moved||(K.moved=!0,E({offset:K.offset,...rc(X.currentTarget)})),v(Qo(Xh(K.offset,he,ee,o),Kh(),rc(X.currentTarget))))},oe=X=>{const K=k.current;if(k.current=null,X.currentTarget.hasPointerCapture(X.pointerId)&&X.currentTarget.releasePointerCapture(X.pointerId),!K?.moved)return;E(null),S.current=!0;const he=X.clientX-K.pointerX,ee=X.clientY-K.pointerY;$k(qk(),Qo(Xh(K.offset,he,ee,o),Kh(),rc(X.currentTarget)))},J=()=>{if(S.current){S.current=!1;return}b()},ne=o==="bottom-right"?"right":"left",$=f==="label"&&!r?h??zt(a,"ask"):null;return c.jsxs(c.Fragment,{children:[_?c.jsx("span",{"data-testid":"launcher-origin","aria-hidden":"true","data-shape":m??"circle",className:"aid-launcher-origin",style:{[ne]:_.offset.x,bottom:_.offset.y,width:_.width,height:_.height}}):null,c.jsxs("button",{ref:j,part:"launcher",type:"button","aria-label":`${$??zt(a,r?"close":"open")}${p>0&&!r?`, ${zt(a,"unreadAnswers",{count:p})}`:""}`,"aria-expanded":r,"data-dragging":M,"data-variant":$?"label":"icon","data-shape":m??"circle",className:"aid-launcher",style:{[ne]:l.x,bottom:l.y},onPointerDown:F,onPointerMove:Z,onPointerUp:oe,onPointerCancel:oe,onClick:J,children:[r?c.jsx(Uk,{}):c.jsx(Kp,{size:$?44:40,animated:!1,bare:!0}),$?c.jsx("span",{part:"launcher-label",className:"truncate",children:$}):null,p>0&&!r?c.jsx("span",{part:"badge",className:"aid-launcher-badge",children:p>9?"9+":p}):null]})]})});Qh.displayName="Launcher";const Vk=r=>{const{state:a}=G(),{turn:o,thread:l}=a,[d,p]=x.useState({turn:o,open:r}),[f,h]=x.useState(0);return(d.turn!==o||d.open!==r)&&(p({turn:o,open:r}),r?f!==0&&h(0):d.turn&&!o&&l?.messages.find(m=>m.id===d.turn?.assistantId)?.status==="done"&&h(f+1)),f},Yh=x.forwardRef((r,a)=>{const o=Vk(r.open);return c.jsx(Qh,{ref:a,...r,unread:o})});Yh.displayName="UnreadLauncher";const xa=(r,a,o)=>Math.min(o,Math.max(a,r)),Bk={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",orange:"#ffa500",purple:"#800080",teal:"#008080",navy:"#000080",gray:"#808080",grey:"#808080"},Zh=r=>{if(!/^[0-9a-f]+$/i.test(r)||![3,4,6,8].includes(r.length))return null;const a=r.length<=4?r.replace(/./g,l=>l+l):r,o=l=>parseInt(a.slice(l,l+2),16);return{r:o(0),g:o(2),b:o(4),a:a.length===8?o(6)/255:1}},Jh=r=>{const a=r.replace(/\//g," ").replace(/,/g," ").trim().split(/\s+/).filter(Boolean);return a.length===3||a.length===4?a:null},Yo=r=>{const a=Number(r);return r!==""&&Number.isFinite(a)?a:null},Wk=r=>{if(r===void 0)return 1;const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(r.endsWith("%")?a/100:a,0,1)},nc=r=>{const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(r.endsWith("%")?a/100*255:a,0,255)},Gh=r=>{const a=/^(-?[\d.]+)(deg|turn|rad|grad)?$/.exec(r);if(!a?.[1])return null;const o=Yo(a[1]);if(o===null)return null;const l=a[2]??"deg";return((l==="turn"?o*360:l==="rad"?o*180/Math.PI:l==="grad"?o*.9:o)%360+360)%360},Zo=r=>{const a=Yo(r.endsWith("%")?r.slice(0,-1):r);return a===null?null:xa(a,0,100)},Jo=({h:r,s:a,l:o,a:l})=>{const d=a/100,p=o/100,f=m=>(m+r/30)%12,h=m=>p-d*Math.min(p,1-p)*Math.max(-1,Math.min(f(m)-3,9-f(m),1));return{r:Math.round(h(0)*255),g:Math.round(h(8)*255),b:Math.round(h(4)*255),a:l}},Hk=({r,g:a,b:o,a:l})=>{const d=r/255,p=a/255,f=o/255,h=Math.max(d,p,f),m=Math.min(d,p,f),v=(h+m)/2,b=h-m;if(b===0)return{h:0,s:0,l:v*100,a:l};const j=b/(1-Math.abs(2*v-1));let k;return h===d?k=(p-f)/b%6:h===p?k=(f-d)/b+2:k=(d-p)/b+4,{h:(k*60+360)%360,s:j*100,l:v*100,a:l}},eg=r=>{const a=Xk(r);if(!a)return null;const o=/^hsla?\((.*)\)$/.exec(r.trim().toLowerCase()),l=o?.[1]!==void 0?Jh(o[1]):null;if(l){const[d,p,f]=[Gh(l[0]??""),Zo(l[1]??""),Zo(l[2]??"")];if(d!==null&&p!==null&&f!==null)return{h:d,s:p,l:f,a:a.a}}return Hk(a)},Xk=r=>{const a=r.trim().toLowerCase(),o=Bk[a];if(o)return Zh(o.slice(1));if(a.startsWith("#"))return Zh(a.slice(1));const l=/^(rgba?|hsla?)\((.*)\)$/.exec(a);if(!l?.[1]||l[2]===void 0)return null;const d=Jh(l[2]);if(!d)return null;const[p="",f="",h="",m]=d,v=Wk(m);if(v===null)return null;if(l[1].startsWith("rgb")){const[S,_,E]=[nc(p),nc(f),nc(h)];return S===null||_===null||E===null?null:{r:Math.round(S),g:Math.round(_),b:Math.round(E),a:v}}const[b,j,k]=[Gh(p),Zo(f),Zo(h)];return b===null||j===null||k===null?null:Jo({h:b,s:j,l:k,a:v})},tg=({r,g:a,b:o})=>{const l=d=>{const p=d/255;return p<=.03928?p/12.92:((p+.055)/1.055)**2.4};return .2126*l(r)+.7152*l(a)+.0722*l(o)},rg=(r,a)=>{const[o,l]=[tg(r),tg(a)].sort((d,p)=>p-d);return(o+.05)/(l+.05)},Go=r=>Math.round(r*10)/10,Dr=({h:r,s:a,l:o,a:l})=>`${Go(r)}, ${Go(a)}%, ${Go(o)}%${l<1?`, ${Go(l*100)/100}`:""}`,ng={h:210,s:40,l:98,a:1},ag={h:222.2,s:47.4,l:11.2,a:1},Kk=r=>{const a=eg(r);if(!a)return null;const o={...a,a:1},l={...o,l:xa(o.l>70?o.l-6:o.l+8,0,100)},d={...o,l:xa(o.l-10,0,100)},p=Jo(o),f=rg(p,Jo(ng)),h=f>=4.5||f>=rg(p,Jo(ag))?ng:ag;return{primary:Dr(o),primaryHovered:Dr(l),primaryPressed:Dr(d),primaryForeground:Dr(h),secondary:Dr({...o,a:.1}),ring:Dr({...o,a:.5})}},Qk=(...r)=>{const a={};for(const o of r)if(o)for(const[l,d]of Object.entries(o))d===void 0||d===""||(a[l]=d);return a},Yk=r=>{const a={},o=r.primary?Kk(r.primary):null;o&&(a["--primary"]=o.primary,a["--primary-text"]=o.primary,a["--primary-hovered"]=o.primaryHovered,a["--primary-pressed"]=o.primaryPressed,a["--primary-foreground"]=o.primaryForeground,a["--secondary"]=o.secondary,a["--secondary-foreground"]=o.primary,a["--ring"]=o.ring),r.radius!==void 0&&r.radius!==""&&(a["--radius"]=typeof r.radius=="number"?`${r.radius}px`:r.radius),r.font&&(a["--aid-theme-font"]=r.font);const l=v=>{const b=v?eg(v):null;return b?Dr(b):null},d=l(r.background);if(d)for(const v of["--background","--card","--popover"])a[v]=d;const p=l(r.foreground);if(p)for(const v of["--foreground","--card-foreground","--popover-foreground","--secondary-foreground"])a[v]=p;const f=l(r.bubble);if(f)for(const v of["--secondary","--muted","--accent"])a[v]=f;const h=l(r.border);if(h)for(const v of["--border","--input"])a[v]=h;const m=(v,b)=>{typeof b=="number"&&Number.isFinite(b)&&(a[v]=`${b}px`)};return m("--aid-t-window-width",r.windowWidth),m("--aid-t-window-height",r.windowHeight),m("--aid-t-offset-x",r.offsetX),m("--aid-t-offset-y",r.offsetY),a},Zk=(r,a)=>r==="dark"||r==="auto"&&a?"dark":"light",Jk=(r,a,o={})=>{for(const l of Object.keys(o))l in a||r.style.removeProperty(l);for(const[l,d]of Object.entries(a))r.style.setProperty(l,d)},Gk=(r,a)=>{r.classList.toggle("dark",a==="dark"),r.dataset.scheme=a},og=(r,a)=>{const o=parseFloat(r);return Number.isFinite(o)?o:a},ac=()=>{try{return window.localStorage}catch{return null}},ig=(r,a,o)=>og(r.getPropertyValue(`--aid-${a}`),og(r.getPropertyValue(`--aid-t-${a}`),o)),e2=r=>{const a=getComputedStyle(r);return{x:ig(a,"offset-x",Wh.x),y:ig(a,"offset-y",Wh.y)}},lg=()=>({width:window.innerWidth,height:window.innerHeight}),t2={scheme:"auto"},r2=(r,a)=>{const o=x.useSyncExternalStore(r.subscribe,()=>r.get().theme),l=x.useSyncExternalStore(r.subscribe,()=>r.get().adminTheme),d=_s("(prefers-color-scheme: dark)"),p=Qk(t2,l,o),f=Zk(p.scheme,d),h=x.useRef({}),m=JSON.stringify(Yk(p));return x.useLayoutEffect(()=>{const v=JSON.parse(m);Jk(a,v,h.current),h.current=v},[a,m]),x.useLayoutEffect(()=>{Gk(a,f)},[a,f]),p},n2=r=>{const{store:a,api:o}=r,l=x.useSyncExternalStore(a.subscribe,()=>a.get().open),d=x.useSyncExternalStore(a.subscribe,()=>a.get().lang),p=x.useCallback(f=>{a.set({adminTheme:f})},[a]);return c.jsx(P1,{api:o,lang:d,open:l,onAdminTheme:p,children:c.jsx(a2,{...r})})},a2=({store:r,root:a,mode:o,corner:l,draggable:d,api:p})=>{const f=x.useSyncExternalStore(r.subscribe,()=>r.get().open),h=x.useSyncExternalStore(r.subscribe,()=>r.get().lang),m=r2(r,a),v=l??m.position??"bottom-right",b=_s(`(max-width: ${Ik}px)`),j=x.useRef(null),[k,S]=x.useState(()=>Qo(Ok(ac())??e2(a),lg(),tc));x.useEffect(()=>{if(o!=="launcher")return;const W=()=>{const Q=j.current,be=Q?{width:Q.offsetWidth,height:Q.offsetHeight}:tc;S(Ne=>Qo(Ne,lg(),be))};return window.addEventListener("resize",W),()=>{window.removeEventListener("resize",W)}},[o]);const _=x.useCallback(()=>{r.set({open:!1})},[r]),E=x.useCallback(()=>{r.set({open:!r.get().open})},[r]),M=x.useRef(f);x.useEffect(()=>{M.current&&!f&&j.current?.focus({preventScroll:!0}),M.current=f},[f]);const F=m.title??zt(h,"title"),Z=Xp(p.apiUrl),oe=x.useMemo(()=>({animated:f,assetsBase:Z}),[f,Z]),[J,ne]=x.useState({expanded:!1,byDashboard:!1}),{expanded:$}=J,X=o==="launcher"&&!b,K=x.useCallback(W=>{ne({expanded:W,byDashboard:!1})},[]),he=x.useCallback(W=>{ne(Q=>U0(Q,W,X))},[X]),ee=m.scheme??"auto",ue=x.useMemo(()=>({lang:h,scheme:ee,expanded:$,canExpand:X,setExpanded:K,expandForDashboard:he,close:o==="launcher"?_:void 0,update:W=>{const Q={...$p(ac()),...W};F0(ac(),Q),r.set({...W.lang?{lang:W.lang}:{},theme:{...r.get().theme,...Fp(W)}})}}),[h,ee,$,X,K,he,o,_,r]);return o==="window"?c.jsx(ss.Provider,{value:ue,children:c.jsx(hs.Provider,{value:oe,children:c.jsx(Bh,{open:f,title:F,logoUrl:os(m.logoUrl),fullscreen:!1,onClose:_})})}):c.jsx(ss.Provider,{value:ue,children:c.jsxs(hs.Provider,{value:oe,children:[c.jsx("div",{part:"overlay",className:"aid-overlay","data-state":f?"open":"closed","aria-hidden":!0,onClick:_}),c.jsx(Bh,{open:f,title:F,logoUrl:os(m.logoUrl),fullscreen:b,expanded:$&&!b,onClose:_}),f?null:c.jsx(Yh,{ref:j,open:f,lang:h,corner:v,offset:k,draggable:d&&!b,variant:m.launcher,label:m.launcherLabel,shape:m.launcherShape,onOffsetChange:S,onToggle:E})]})})},sg="https://dev-ai.kgd.gov.kz",o2=`${kb}
19
+ ${K0}`,oc=(r,a,o,l)=>{const d=r.shadowRoot??r.attachShadow({mode:"open"});d.replaceChildren();const p=document.createElement("style");p.textContent=o2;const f=document.createElement("div");f.className="aid-root",f.dataset.mode=o,d.append(p,f);let h=null;try{h=window.localStorage}catch{}const m=$p(h),v=X0({open:a.defaultOpen??o==="window",lang:m.lang??Ip(a.lang),theme:{...a.theme,...Fp(m)},adminTheme:null});let b=v.get().open;const j=v.subscribe(()=>{const{open:E}=v.get();E!==b&&(b=E,a.onOpenChange?.(E))}),k=D0({apiUrl:a.apiUrl??sg,siteKey:a.siteKey,visitorId:z0(a.visitorId,h),rememberVisitor:E=>{try{h?.setItem(rs,E)}catch{}}}),S=wb.createRoot(f);S.render(c.jsx(x.StrictMode,{children:c.jsx(ds,{fallback:null,children:c.jsx(n2,{store:v,root:f,mode:o,corner:a.position,draggable:a.draggable??!0,api:k})})}));let _=!0;return{open:()=>{v.set({open:!0})},close:()=>{v.set({open:!1})},setTheme:E=>{v.set({theme:{...v.get().theme,...E}})},setLang:E=>{v.set({lang:Ip(E)})},unmount:()=>{_&&(_=!1,j(),S.unmount(),J0(),d.replaceChildren(),l?.())}}};function cg(r,a){const o=r instanceof HTMLElement?a:a??r;if(!o)throw new TypeError("AiDanaChat.mountLauncher: options are required");if(r instanceof HTMLElement)return oc(r,o,"launcher");const l=document.createElement("div");return l.setAttribute("data-ai-dana-chat",""),l.style.setProperty("all","initial"),document.body.append(l),oc(l,o,"launcher",()=>{l.remove()})}const dg=(r,a)=>oc(r,a,"window"),ug=["light","dark","auto"];class ic extends HTMLElement{constructor(){super(...arguments),ln(this,"handle")}connectedCallback(){const a=this.getAttribute("theme"),o=this.getAttribute("position"),l=this.getAttribute("site-key"),d=this.getAttribute("api-url"),p={...l?{siteKey:l}:{},...d===null?{}:{apiUrl:d},...this.getAttribute("lang")?{lang:this.getAttribute("lang")}:{},...a&&ug.includes(a)?{theme:{scheme:a}}:{},...o==="bottom-left"||o==="bottom-right"?{position:o}:{},draggable:this.getAttribute("draggable")!=="false",defaultOpen:this.hasAttribute("open"),onOpenChange:f=>this.dispatchEvent(new CustomEvent("openchange",{detail:{open:f}}))};this.handle=this.hasAttribute("launcher")?cg(this,p):dg(this,p)}disconnectedCallback(){this.handle?.unmount(),this.handle=void 0}attributeChangedCallback(a,o,l){!this.handle||o===l||(a==="lang"&&l&&this.handle.setLang(l),a==="theme"&&l&&ug.includes(l)&&this.handle.setTheme({scheme:l}))}open(){this.handle?.open()}close(){this.handle?.close()}setTheme(a){this.handle?.setTheme(a)}setLang(a){this.handle?.setLang(a)}}ln(ic,"observedAttributes",["lang","theme"]),typeof customElements<"u"&&!customElements.get("ai-dana-chat")&&H0(()=>{customElements.get("ai-dana-chat")||customElements.define("ai-dana-chat",ic)},"1.0.11");export{Cw as A,_r as C,sg as D,_p as S,t0 as a,E0 as b,j0 as c,x as d,fn as e,Dh as f,rp as g,vs as h,Es as i,c as j,ic as k,cg as l,dg as m,S0 as o,C0 as r,na as s,Sp as t,G as u,B as v,Do as w};