@tinkrapp/widget 1.0.0
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.
- package/dist/client-CExUGn7b.d.cts +147 -0
- package/dist/client-CExUGn7b.d.ts +147 -0
- package/dist/course-ai-widget.css +2 -0
- package/dist/course-ai-widget.css.map +1 -0
- package/dist/course-ai-widget.global.js +632 -0
- package/dist/course-ai-widget.global.js.map +1 -0
- package/dist/index.cjs +233 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +229 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +4857 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +165 -0
- package/dist/react.d.ts +165 -0
- package/dist/react.js +4815 -0
- package/dist/react.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,632 @@
|
|
|
1
|
+
/* Course AI Widget v1.0.0 | MIT License */
|
|
2
|
+
"use strict";var CourseAI=(()=>{var Vee=Object.create;var om=Object.defineProperty;var qee=Object.getOwnPropertyDescriptor;var Hee=Object.getOwnPropertyNames;var Wee=Object.getPrototypeOf,Zee=Object.prototype.hasOwnProperty;var t2=e=>{throw TypeError(e)};var Gee=(e,t,r)=>t in e?om(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var r2=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ft=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Et=(e,t)=>{for(var r in t)om(e,r,{get:t[r],enumerable:!0})},n2=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Hee(t))!Zee.call(e,o)&&o!==r&&om(e,o,{get:()=>t[o],enumerable:!(n=qee(t,o))||n.enumerable});return e};var S=(e,t,r)=>(r=e!=null?Vee(Wee(e)):{},n2(t||!e||!e.__esModule?om(r,"default",{value:e,enumerable:!0}):r,e)),o2=e=>n2(om({},"__esModule",{value:!0}),e);var P=(e,t,r)=>Gee(e,typeof t!="symbol"?t+"":t,r),a2=(e,t,r)=>t.has(e)||t2("Cannot "+r);var pn=(e,t,r)=>(a2(e,t,"read from private field"),r?r.call(e):t.get(e)),Zl=(e,t,r)=>t.has(e)?t2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Gl=(e,t,r,n)=>(a2(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var y2=Ft($e=>{"use strict";var am=Symbol.for("react.element"),Kee=Symbol.for("react.portal"),Jee=Symbol.for("react.fragment"),Xee=Symbol.for("react.strict_mode"),Yee=Symbol.for("react.profiler"),Qee=Symbol.for("react.provider"),ete=Symbol.for("react.context"),tte=Symbol.for("react.forward_ref"),rte=Symbol.for("react.suspense"),nte=Symbol.for("react.memo"),ote=Symbol.for("react.lazy"),i2=Symbol.iterator;function ate(e){return e===null||typeof e!="object"?null:(e=i2&&e[i2]||e["@@iterator"],typeof e=="function"?e:null)}var u2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c2=Object.assign,d2={};function Bc(e,t,r){this.props=e,this.context=t,this.refs=d2,this.updater=r||u2}Bc.prototype.isReactComponent={};Bc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Bc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f2(){}f2.prototype=Bc.prototype;function I0(e,t,r){this.props=e,this.context=t,this.refs=d2,this.updater=r||u2}var k0=I0.prototype=new f2;k0.constructor=I0;c2(k0,Bc.prototype);k0.isPureReactComponent=!0;var s2=Array.isArray,p2=Object.prototype.hasOwnProperty,C0={current:null},m2={key:!0,ref:!0,__self:!0,__source:!0};function h2(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)p2.call(t,n)&&!m2.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:am,type:e,key:a,ref:i,props:o,_owner:C0.current}}function ite(e,t){return{$$typeof:am,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _0(e){return typeof e=="object"&&e!==null&&e.$$typeof===am}function ste(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var l2=/\/+/g;function S0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ste(""+e.key):t.toString(36)}function Xx(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case am:case Kee:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+S0(i,0):n,s2(o)?(r="",e!=null&&(r=e.replace(l2,"$&/")+"/"),Xx(o,t,r,"",function(u){return u})):o!=null&&(_0(o)&&(o=ite(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(l2,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",s2(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+S0(a,s);i+=Xx(a,t,r,l,o)}else if(l=ate(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+S0(a,s++),i+=Xx(a,t,r,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Jx(e,t,r){if(e==null)return e;var n=[],o=0;return Xx(e,n,"","",function(a){return t.call(r,a,o++)}),n}function lte(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Zr={current:null},Yx={transition:null},ute={ReactCurrentDispatcher:Zr,ReactCurrentBatchConfig:Yx,ReactCurrentOwner:C0};function g2(){throw Error("act(...) is not supported in production builds of React.")}$e.Children={map:Jx,forEach:function(e,t,r){Jx(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Jx(e,function(){t++}),t},toArray:function(e){return Jx(e,function(t){return t})||[]},only:function(e){if(!_0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$e.Component=Bc;$e.Fragment=Jee;$e.Profiler=Yee;$e.PureComponent=I0;$e.StrictMode=Xee;$e.Suspense=rte;$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ute;$e.act=g2;$e.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=c2({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=C0.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)p2.call(t,l)&&!m2.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:am,type:e.type,key:o,ref:a,props:n,_owner:i}};$e.createContext=function(e){return e={$$typeof:ete,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qee,_context:e},e.Consumer=e};$e.createElement=h2;$e.createFactory=function(e){var t=h2.bind(null,e);return t.type=e,t};$e.createRef=function(){return{current:null}};$e.forwardRef=function(e){return{$$typeof:tte,render:e}};$e.isValidElement=_0;$e.lazy=function(e){return{$$typeof:ote,_payload:{_status:-1,_result:e},_init:lte}};$e.memo=function(e,t){return{$$typeof:nte,type:e,compare:t===void 0?null:t}};$e.startTransition=function(e){var t=Yx.transition;Yx.transition={};try{e()}finally{Yx.transition=t}};$e.unstable_act=g2;$e.useCallback=function(e,t){return Zr.current.useCallback(e,t)};$e.useContext=function(e){return Zr.current.useContext(e)};$e.useDebugValue=function(){};$e.useDeferredValue=function(e){return Zr.current.useDeferredValue(e)};$e.useEffect=function(e,t){return Zr.current.useEffect(e,t)};$e.useId=function(){return Zr.current.useId()};$e.useImperativeHandle=function(e,t,r){return Zr.current.useImperativeHandle(e,t,r)};$e.useInsertionEffect=function(e,t){return Zr.current.useInsertionEffect(e,t)};$e.useLayoutEffect=function(e,t){return Zr.current.useLayoutEffect(e,t)};$e.useMemo=function(e,t){return Zr.current.useMemo(e,t)};$e.useReducer=function(e,t,r){return Zr.current.useReducer(e,t,r)};$e.useRef=function(e){return Zr.current.useRef(e)};$e.useState=function(e){return Zr.current.useState(e)};$e.useSyncExternalStore=function(e,t,r){return Zr.current.useSyncExternalStore(e,t,r)};$e.useTransition=function(){return Zr.current.useTransition()};$e.version="18.3.1"});var A=Ft((NCe,x2)=>{"use strict";x2.exports=y2()});var P2=Ft(pt=>{"use strict";function E0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Qx(o,t))e[n]=t,e[r]=o,r=n;else break e}}function Oo(e){return e.length===0?null:e[0]}function tv(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var i=2*(n+1)-1,s=e[i],l=i+1,u=e[l];if(0>Qx(s,r))l<o&&0>Qx(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(l<o&&0>Qx(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function Qx(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(v2=performance,pt.unstable_now=function(){return v2.now()}):(T0=Date,b2=T0.now(),pt.unstable_now=function(){return T0.now()-b2});var v2,T0,b2,ga=[],as=[],cte=1,oo=null,$r=3,rv=!1,Kl=!1,sm=!1,I2=typeof setTimeout=="function"?setTimeout:null,k2=typeof clearTimeout=="function"?clearTimeout:null,w2=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A0(e){for(var t=Oo(as);t!==null;){if(t.callback===null)tv(as);else if(t.startTime<=e)tv(as),t.sortIndex=t.expirationTime,E0(ga,t);else break;t=Oo(as)}}function R0(e){if(sm=!1,A0(e),!Kl)if(Oo(ga)!==null)Kl=!0,$0(M0);else{var t=Oo(as);t!==null&&D0(R0,t.startTime-e)}}function M0(e,t){Kl=!1,sm&&(sm=!1,k2(lm),lm=-1),rv=!0;var r=$r;try{for(A0(t),oo=Oo(ga);oo!==null&&(!(oo.expirationTime>t)||e&&!T2());){var n=oo.callback;if(typeof n=="function"){oo.callback=null,$r=oo.priorityLevel;var o=n(oo.expirationTime<=t);t=pt.unstable_now(),typeof o=="function"?oo.callback=o:oo===Oo(ga)&&tv(ga),A0(t)}else tv(ga);oo=Oo(ga)}if(oo!==null)var a=!0;else{var i=Oo(as);i!==null&&D0(R0,i.startTime-t),a=!1}return a}finally{oo=null,$r=r,rv=!1}}var nv=!1,ev=null,lm=-1,C2=5,_2=-1;function T2(){return!(pt.unstable_now()-_2<C2)}function P0(){if(ev!==null){var e=pt.unstable_now();_2=e;var t=!0;try{t=ev(!0,e)}finally{t?im():(nv=!1,ev=null)}}else nv=!1}var im;typeof w2=="function"?im=function(){w2(P0)}:typeof MessageChannel<"u"?(L0=new MessageChannel,S2=L0.port2,L0.port1.onmessage=P0,im=function(){S2.postMessage(null)}):im=function(){I2(P0,0)};var L0,S2;function $0(e){ev=e,nv||(nv=!0,im())}function D0(e,t){lm=I2(function(){e(pt.unstable_now())},t)}pt.unstable_IdlePriority=5;pt.unstable_ImmediatePriority=1;pt.unstable_LowPriority=4;pt.unstable_NormalPriority=3;pt.unstable_Profiling=null;pt.unstable_UserBlockingPriority=2;pt.unstable_cancelCallback=function(e){e.callback=null};pt.unstable_continueExecution=function(){Kl||rv||(Kl=!0,$0(M0))};pt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C2=0<e?Math.floor(1e3/e):5};pt.unstable_getCurrentPriorityLevel=function(){return $r};pt.unstable_getFirstCallbackNode=function(){return Oo(ga)};pt.unstable_next=function(e){switch($r){case 1:case 2:case 3:var t=3;break;default:t=$r}var r=$r;$r=t;try{return e()}finally{$r=r}};pt.unstable_pauseExecution=function(){};pt.unstable_requestPaint=function(){};pt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=$r;$r=e;try{return t()}finally{$r=r}};pt.unstable_scheduleCallback=function(e,t,r){var n=pt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:cte++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,E0(as,e),Oo(ga)===null&&e===Oo(as)&&(sm?(k2(lm),lm=-1):sm=!0,D0(R0,r-n))):(e.sortIndex=o,E0(ga,e),Kl||rv||(Kl=!0,$0(M0))),e};pt.unstable_shouldYield=T2;pt.unstable_wrapCallback=function(e){var t=$r;return function(){var r=$r;$r=t;try{return e.apply(this,arguments)}finally{$r=r}}}});var E2=Ft((FCe,L2)=>{"use strict";L2.exports=P2()});var $j=Ft(Un=>{"use strict";var dte=A(),Bn=E2();function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 NF=new Set,Em={};function lu(e,t){sd(e,t),sd(e+"Capture",t)}function sd(e,t){for(Em[e]=t,e=0;e<t.length;e++)NF.add(t[e])}var si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oT=Object.prototype.hasOwnProperty,fte=/^[: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]*$/,A2={},R2={};function pte(e){return oT.call(R2,e)?!0:oT.call(A2,e)?!1:fte.test(e)?R2[e]=!0:(A2[e]=!0,!1)}function mte(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hte(e,t,r,n){if(t===null||typeof t>"u"||mte(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Jr(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kr[e]=new Jr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kr[t]=new Jr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kr[e]=new Jr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kr[e]=new Jr(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){kr[e]=new Jr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kr[e]=new Jr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kr[e]=new Jr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kr[e]=new Jr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kr[e]=new Jr(e,5,!1,e.toLowerCase(),null,!1,!1)});var JT=/[\-:]([a-z])/g;function XT(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(JT,XT);kr[t]=new Jr(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(JT,XT);kr[t]=new Jr(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(JT,XT);kr[t]=new Jr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kr[e]=new Jr(e,1,!1,e.toLowerCase(),null,!1,!1)});kr.xlinkHref=new Jr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kr[e]=new Jr(e,1,!1,e.toLowerCase(),null,!0,!0)});function YT(e,t,r,n){var o=kr.hasOwnProperty(t)?kr[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hte(t,r,o,n)&&(r=null),n||o===null?pte(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var di=dte.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ov=Symbol.for("react.element"),Vc=Symbol.for("react.portal"),qc=Symbol.for("react.fragment"),QT=Symbol.for("react.strict_mode"),aT=Symbol.for("react.profiler"),zF=Symbol.for("react.provider"),FF=Symbol.for("react.context"),eP=Symbol.for("react.forward_ref"),iT=Symbol.for("react.suspense"),sT=Symbol.for("react.suspense_list"),tP=Symbol.for("react.memo"),ss=Symbol.for("react.lazy"),BF=Symbol.for("react.offscreen"),M2=Symbol.iterator;function um(e){return e===null||typeof e!="object"?null:(e=M2&&e[M2]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,O0;function ym(e){if(O0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);O0=t&&t[1]||""}return`
|
|
3
|
+
`+O0+e}var N0=!1;function z0(e,t){if(!e||N0)return"";N0=!0;var r=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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
4
|
+
`),a=n.stack.split(`
|
|
5
|
+
`),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||o[i]!==a[s]){var l=`
|
|
6
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{N0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ym(e):""}function gte(e){switch(e.tag){case 5:return ym(e.type);case 16:return ym("Lazy");case 13:return ym("Suspense");case 19:return ym("SuspenseList");case 0:case 2:case 15:return e=z0(e.type,!1),e;case 11:return e=z0(e.type.render,!1),e;case 1:return e=z0(e.type,!0),e;default:return""}}function lT(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 qc:return"Fragment";case Vc:return"Portal";case aT:return"Profiler";case QT:return"StrictMode";case iT:return"Suspense";case sT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case FF:return(e.displayName||"Context")+".Consumer";case zF:return(e._context.displayName||"Context")+".Provider";case eP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tP:return t=e.displayName||null,t!==null?t:lT(e.type)||"Memo";case ss:t=e._payload,e=e._init;try{return lT(e(t))}catch{}}return null}function yte(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 lT(t);case 8:return t===QT?"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 ws(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jF(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xte(e){var t=jF(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function av(e){e._valueTracker||(e._valueTracker=xte(e))}function UF(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=jF(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Mv(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 uT(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function $2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ws(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function VF(e,t){t=t.checked,t!=null&&YT(e,"checked",t,!1)}function cT(e,t){VF(e,t);var r=ws(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dT(e,t.type,r):t.hasOwnProperty("defaultValue")&&dT(e,t.type,ws(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function D2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function dT(e,t,r){(t!=="number"||Mv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var xm=Array.isArray;function td(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ws(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function fT(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function O2(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(G(92));if(xm(r)){if(1<r.length)throw Error(G(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ws(r)}}function qF(e,t){var r=ws(t.value),n=ws(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function N2(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function HF(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 pT(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?HF(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var iv,WF=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(iv=iv||document.createElement("div"),iv.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=iv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Am(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var wm={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},vte=["Webkit","ms","Moz","O"];Object.keys(wm).forEach(function(e){vte.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wm[t]=wm[e]})});function ZF(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||wm.hasOwnProperty(e)&&wm[e]?(""+t).trim():t+"px"}function GF(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=ZF(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var bte=Mt({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 mT(e,t){if(t){if(bte[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function hT(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 gT=null;function rP(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yT=null,rd=null,nd=null;function z2(e){if(e=Km(e)){if(typeof yT!="function")throw Error(G(280));var t=e.stateNode;t&&(t=sb(t),yT(e.stateNode,e.type,t))}}function KF(e){rd?nd?nd.push(e):nd=[e]:rd=e}function JF(){if(rd){var e=rd,t=nd;if(nd=rd=null,z2(e),t)for(e=0;e<t.length;e++)z2(t[e])}}function XF(e,t){return e(t)}function YF(){}var F0=!1;function QF(e,t,r){if(F0)return e(t,r);F0=!0;try{return XF(e,t,r)}finally{F0=!1,(rd!==null||nd!==null)&&(YF(),JF())}}function Rm(e,t){var r=e.stateNode;if(r===null)return null;var n=sb(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(G(231,t,typeof r));return r}var xT=!1;if(si)try{jc={},Object.defineProperty(jc,"passive",{get:function(){xT=!0}}),window.addEventListener("test",jc,jc),window.removeEventListener("test",jc,jc)}catch{xT=!1}var jc;function wte(e,t,r,n,o,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Sm=!1,$v=null,Dv=!1,vT=null,Ste={onError:function(e){Sm=!0,$v=e}};function Ite(e,t,r,n,o,a,i,s,l){Sm=!1,$v=null,wte.apply(Ste,arguments)}function kte(e,t,r,n,o,a,i,s,l){if(Ite.apply(this,arguments),Sm){if(Sm){var u=$v;Sm=!1,$v=null}else throw Error(G(198));Dv||(Dv=!0,vT=u)}}function uu(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function eB(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 F2(e){if(uu(e)!==e)throw Error(G(188))}function Cte(e){var t=e.alternate;if(!t){if(t=uu(e),t===null)throw Error(G(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var a=o.alternate;if(a===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return F2(o),e;if(a===n)return F2(o),t;a=a.sibling}throw Error(G(188))}if(r.return!==n.return)r=o,n=a;else{for(var i=!1,s=o.child;s;){if(s===r){i=!0,r=o,n=a;break}if(s===n){i=!0,n=o,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,n=o;break}if(s===n){i=!0,n=a,r=o;break}s=s.sibling}if(!i)throw Error(G(189))}}if(r.alternate!==n)throw Error(G(190))}if(r.tag!==3)throw Error(G(188));return r.stateNode.current===r?e:t}function tB(e){return e=Cte(e),e!==null?rB(e):null}function rB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rB(e);if(t!==null)return t;e=e.sibling}return null}var nB=Bn.unstable_scheduleCallback,B2=Bn.unstable_cancelCallback,_te=Bn.unstable_shouldYield,Tte=Bn.unstable_requestPaint,Ht=Bn.unstable_now,Pte=Bn.unstable_getCurrentPriorityLevel,nP=Bn.unstable_ImmediatePriority,oB=Bn.unstable_UserBlockingPriority,Ov=Bn.unstable_NormalPriority,Lte=Bn.unstable_LowPriority,aB=Bn.unstable_IdlePriority,nb=null,ba=null;function Ete(e){if(ba&&typeof ba.onCommitFiberRoot=="function")try{ba.onCommitFiberRoot(nb,e,void 0,(e.current.flags&128)===128)}catch{}}var jo=Math.clz32?Math.clz32:Mte,Ate=Math.log,Rte=Math.LN2;function Mte(e){return e>>>=0,e===0?32:31-(Ate(e)/Rte|0)|0}var sv=64,lv=4194304;function vm(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 Nv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~o;s!==0?n=vm(s):(a&=i,a!==0&&(n=vm(a)))}else i=r&~o,i!==0?n=vm(i):a!==0&&(n=vm(a));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-jo(t),o=1<<r,n|=e[r],t&=~o;return n}function $te(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 Dte(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-jo(a),s=1<<i,l=o[i];l===-1?((s&r)===0||(s&n)!==0)&&(o[i]=$te(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function bT(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function iB(){var e=sv;return sv<<=1,(sv&4194240)===0&&(sv=64),e}function B0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Zm(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jo(t),e[t]=r}function Ote(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-jo(r),a=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~a}}function oP(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-jo(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Xe=0;function sB(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var lB,aP,uB,cB,dB,wT=!1,uv=[],ps=null,ms=null,hs=null,Mm=new Map,$m=new Map,us=[],Nte="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 j2(e,t){switch(e){case"focusin":case"focusout":ps=null;break;case"dragenter":case"dragleave":ms=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":Mm.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$m.delete(t.pointerId)}}function cm(e,t,r,n,o,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[o]},t!==null&&(t=Km(t),t!==null&&aP(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function zte(e,t,r,n,o){switch(t){case"focusin":return ps=cm(ps,e,t,r,n,o),!0;case"dragenter":return ms=cm(ms,e,t,r,n,o),!0;case"mouseover":return hs=cm(hs,e,t,r,n,o),!0;case"pointerover":var a=o.pointerId;return Mm.set(a,cm(Mm.get(a)||null,e,t,r,n,o)),!0;case"gotpointercapture":return a=o.pointerId,$m.set(a,cm($m.get(a)||null,e,t,r,n,o)),!0}return!1}function fB(e){var t=Yl(e.target);if(t!==null){var r=uu(t);if(r!==null){if(t=r.tag,t===13){if(t=eB(r),t!==null){e.blockedOn=t,dB(e.priority,function(){uB(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Iv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ST(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);gT=n,r.target.dispatchEvent(n),gT=null}else return t=Km(r),t!==null&&aP(t),e.blockedOn=r,!1;t.shift()}return!0}function U2(e,t,r){Iv(e)&&r.delete(t)}function Fte(){wT=!1,ps!==null&&Iv(ps)&&(ps=null),ms!==null&&Iv(ms)&&(ms=null),hs!==null&&Iv(hs)&&(hs=null),Mm.forEach(U2),$m.forEach(U2)}function dm(e,t){e.blockedOn===t&&(e.blockedOn=null,wT||(wT=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,Fte)))}function Dm(e){function t(o){return dm(o,e)}if(0<uv.length){dm(uv[0],e);for(var r=1;r<uv.length;r++){var n=uv[r];n.blockedOn===e&&(n.blockedOn=null)}}for(ps!==null&&dm(ps,e),ms!==null&&dm(ms,e),hs!==null&&dm(hs,e),Mm.forEach(t),$m.forEach(t),r=0;r<us.length;r++)n=us[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<us.length&&(r=us[0],r.blockedOn===null);)fB(r),r.blockedOn===null&&us.shift()}var od=di.ReactCurrentBatchConfig,zv=!0;function Bte(e,t,r,n){var o=Xe,a=od.transition;od.transition=null;try{Xe=1,iP(e,t,r,n)}finally{Xe=o,od.transition=a}}function jte(e,t,r,n){var o=Xe,a=od.transition;od.transition=null;try{Xe=4,iP(e,t,r,n)}finally{Xe=o,od.transition=a}}function iP(e,t,r,n){if(zv){var o=ST(e,t,r,n);if(o===null)Z0(e,t,n,Fv,r),j2(e,n);else if(zte(o,e,t,r,n))n.stopPropagation();else if(j2(e,n),t&4&&-1<Nte.indexOf(e)){for(;o!==null;){var a=Km(o);if(a!==null&&lB(a),a=ST(e,t,r,n),a===null&&Z0(e,t,n,Fv,r),a===o)break;o=a}o!==null&&n.stopPropagation()}else Z0(e,t,n,null,r)}}var Fv=null;function ST(e,t,r,n){if(Fv=null,e=rP(n),e=Yl(e),e!==null)if(t=uu(e),t===null)e=null;else if(r=t.tag,r===13){if(e=eB(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fv=e,null}function pB(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(Pte()){case nP:return 1;case oB:return 4;case Ov:case Lte:return 16;case aB:return 536870912;default:return 16}default:return 16}}var ds=null,sP=null,kv=null;function mB(){if(kv)return kv;var e,t=sP,r=t.length,n,o="value"in ds?ds.value:ds.textContent,a=o.length;for(e=0;e<r&&t[e]===o[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===o[a-n];n++);return kv=o.slice(e,1<n?1-n:void 0)}function Cv(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 cv(){return!0}function V2(){return!1}function jn(e){function t(r,n,o,a,i){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?cv:V2,this.isPropagationStopped=V2,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=cv)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=cv)},persist:function(){},isPersistent:cv}),t}var md={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lP=jn(md),Gm=Mt({},md,{view:0,detail:0}),Ute=jn(Gm),j0,U0,fm,ob=Mt({},Gm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uP,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!==fm&&(fm&&e.type==="mousemove"?(j0=e.screenX-fm.screenX,U0=e.screenY-fm.screenY):U0=j0=0,fm=e),j0)},movementY:function(e){return"movementY"in e?e.movementY:U0}}),q2=jn(ob),Vte=Mt({},ob,{dataTransfer:0}),qte=jn(Vte),Hte=Mt({},Gm,{relatedTarget:0}),V0=jn(Hte),Wte=Mt({},md,{animationName:0,elapsedTime:0,pseudoElement:0}),Zte=jn(Wte),Gte=Mt({},md,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kte=jn(Gte),Jte=Mt({},md,{data:0}),H2=jn(Jte),Xte={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yte={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"},Qte={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ere(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qte[e])?!!t[e]:!1}function uP(){return ere}var tre=Mt({},Gm,{key:function(e){if(e.key){var t=Xte[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cv(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yte[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uP,charCode:function(e){return e.type==="keypress"?Cv(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cv(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rre=jn(tre),nre=Mt({},ob,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),W2=jn(nre),ore=Mt({},Gm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uP}),are=jn(ore),ire=Mt({},md,{propertyName:0,elapsedTime:0,pseudoElement:0}),sre=jn(ire),lre=Mt({},ob,{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}),ure=jn(lre),cre=[9,13,27,32],cP=si&&"CompositionEvent"in window,Im=null;si&&"documentMode"in document&&(Im=document.documentMode);var dre=si&&"TextEvent"in window&&!Im,hB=si&&(!cP||Im&&8<Im&&11>=Im),Z2=" ",G2=!1;function gB(e,t){switch(e){case"keyup":return cre.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hc=!1;function fre(e,t){switch(e){case"compositionend":return yB(t);case"keypress":return t.which!==32?null:(G2=!0,Z2);case"textInput":return e=t.data,e===Z2&&G2?null:e;default:return null}}function pre(e,t){if(Hc)return e==="compositionend"||!cP&&gB(e,t)?(e=mB(),kv=sP=ds=null,Hc=!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 hB&&t.locale!=="ko"?null:t.data;default:return null}}var mre={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 K2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mre[e.type]:t==="textarea"}function xB(e,t,r,n){KF(n),t=Bv(t,"onChange"),0<t.length&&(r=new lP("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var km=null,Om=null;function hre(e){LB(e,0)}function ab(e){var t=Gc(e);if(UF(t))return e}function gre(e,t){if(e==="change")return t}var vB=!1;si&&(si?(fv="oninput"in document,fv||(q0=document.createElement("div"),q0.setAttribute("oninput","return;"),fv=typeof q0.oninput=="function"),dv=fv):dv=!1,vB=dv&&(!document.documentMode||9<document.documentMode));var dv,fv,q0;function J2(){km&&(km.detachEvent("onpropertychange",bB),Om=km=null)}function bB(e){if(e.propertyName==="value"&&ab(Om)){var t=[];xB(t,Om,e,rP(e)),QF(hre,t)}}function yre(e,t,r){e==="focusin"?(J2(),km=t,Om=r,km.attachEvent("onpropertychange",bB)):e==="focusout"&&J2()}function xre(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ab(Om)}function vre(e,t){if(e==="click")return ab(t)}function bre(e,t){if(e==="input"||e==="change")return ab(t)}function wre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vo=typeof Object.is=="function"?Object.is:wre;function Nm(e,t){if(Vo(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!oT.call(t,o)||!Vo(e[o],t[o]))return!1}return!0}function X2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Y2(e,t){var r=X2(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=X2(r)}}function wB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function SB(){for(var e=window,t=Mv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Mv(e.document)}return t}function dP(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 Sre(e){var t=SB(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&wB(r.ownerDocument.documentElement,r)){if(n!==null&&dP(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=Y2(r,a);var i=Y2(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ire=si&&"documentMode"in document&&11>=document.documentMode,Wc=null,IT=null,Cm=null,kT=!1;function Q2(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;kT||Wc==null||Wc!==Mv(n)||(n=Wc,"selectionStart"in n&&dP(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Cm&&Nm(Cm,n)||(Cm=n,n=Bv(IT,"onSelect"),0<n.length&&(t=new lP("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Wc)))}function pv(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Zc={animationend:pv("Animation","AnimationEnd"),animationiteration:pv("Animation","AnimationIteration"),animationstart:pv("Animation","AnimationStart"),transitionend:pv("Transition","TransitionEnd")},H0={},IB={};si&&(IB=document.createElement("div").style,"AnimationEvent"in window||(delete Zc.animationend.animation,delete Zc.animationiteration.animation,delete Zc.animationstart.animation),"TransitionEvent"in window||delete Zc.transitionend.transition);function ib(e){if(H0[e])return H0[e];if(!Zc[e])return e;var t=Zc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in IB)return H0[e]=t[r];return e}var kB=ib("animationend"),CB=ib("animationiteration"),_B=ib("animationstart"),TB=ib("transitionend"),PB=new Map,eF="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 Is(e,t){PB.set(e,t),lu(t,[e])}for(mv=0;mv<eF.length;mv++)hv=eF[mv],tF=hv.toLowerCase(),rF=hv[0].toUpperCase()+hv.slice(1),Is(tF,"on"+rF);var hv,tF,rF,mv;Is(kB,"onAnimationEnd");Is(CB,"onAnimationIteration");Is(_B,"onAnimationStart");Is("dblclick","onDoubleClick");Is("focusin","onFocus");Is("focusout","onBlur");Is(TB,"onTransitionEnd");sd("onMouseEnter",["mouseout","mouseover"]);sd("onMouseLeave",["mouseout","mouseover"]);sd("onPointerEnter",["pointerout","pointerover"]);sd("onPointerLeave",["pointerout","pointerover"]);lu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));lu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));lu("onBeforeInput",["compositionend","keypress","textInput","paste"]);lu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));lu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));lu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bm="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(" "),kre=new Set("cancel close invalid load scroll toggle".split(" ").concat(bm));function nF(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,kte(n,t,void 0,e),e.currentTarget=null}function LB(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var i=n.length-1;0<=i;i--){var s=n[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;nF(o,s,u),a=l}else for(i=0;i<n.length;i++){if(s=n[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;nF(o,s,u),a=l}}}if(Dv)throw e=vT,Dv=!1,vT=null,e}function yt(e,t){var r=t[LT];r===void 0&&(r=t[LT]=new Set);var n=e+"__bubble";r.has(n)||(EB(t,e,2,!1),r.add(n))}function W0(e,t,r){var n=0;t&&(n|=4),EB(r,e,n,t)}var gv="_reactListening"+Math.random().toString(36).slice(2);function zm(e){if(!e[gv]){e[gv]=!0,NF.forEach(function(r){r!=="selectionchange"&&(kre.has(r)||W0(r,!1,e),W0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gv]||(t[gv]=!0,W0("selectionchange",!1,t))}}function EB(e,t,r,n){switch(pB(t)){case 1:var o=Bte;break;case 4:o=jte;break;default:o=iP}r=o.bind(null,t,r,e),o=void 0,!xT||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Z0(e,t,r,n,o){var a=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;s!==null;){if(i=Yl(s),i===null)return;if(l=i.tag,l===5||l===6){n=a=i;continue e}s=s.parentNode}}n=n.return}QF(function(){var u=a,c=rP(r),d=[];e:{var f=PB.get(e);if(f!==void 0){var p=lP,m=e;switch(e){case"keypress":if(Cv(r)===0)break e;case"keydown":case"keyup":p=rre;break;case"focusin":m="focus",p=V0;break;case"focusout":m="blur",p=V0;break;case"beforeblur":case"afterblur":p=V0;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=q2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=qte;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=are;break;case kB:case CB:case _B:p=Zte;break;case TB:p=sre;break;case"scroll":p=Ute;break;case"wheel":p=ure;break;case"copy":case"cut":case"paste":p=Kte;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=W2}var h=(t&4)!==0,v=!h&&e==="scroll",g=h?f!==null?f+"Capture":null:f;h=[];for(var y=u,x;y!==null;){x=y;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,g!==null&&(b=Rm(y,g),b!=null&&h.push(Fm(y,b,x)))),v)break;y=y.return}0<h.length&&(f=new p(f,m,null,r,c),d.push({event:f,listeners:h}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==gT&&(m=r.relatedTarget||r.fromElement)&&(Yl(m)||m[li]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=u,m=m?Yl(m):null,m!==null&&(v=uu(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(h=q2,b="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(h=W2,b="onPointerLeave",g="onPointerEnter",y="pointer"),v=p==null?f:Gc(p),x=m==null?f:Gc(m),f=new h(b,y+"leave",p,r,c),f.target=v,f.relatedTarget=x,b=null,Yl(c)===u&&(h=new h(g,y+"enter",m,r,c),h.target=x,h.relatedTarget=v,b=h),v=b,p&&m)t:{for(h=p,g=m,y=0,x=h;x;x=Uc(x))y++;for(x=0,b=g;b;b=Uc(b))x++;for(;0<y-x;)h=Uc(h),y--;for(;0<x-y;)g=Uc(g),x--;for(;y--;){if(h===g||g!==null&&h===g.alternate)break t;h=Uc(h),g=Uc(g)}h=null}else h=null;p!==null&&oF(d,f,p,h,!1),m!==null&&v!==null&&oF(d,v,m,h,!0)}}e:{if(f=u?Gc(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var _=gre;else if(K2(f))if(vB)_=bre;else{_=xre;var I=yre}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=vre);if(_&&(_=_(e,u))){xB(d,_,r,c);break e}I&&I(e,f,u),e==="focusout"&&(I=f._wrapperState)&&I.controlled&&f.type==="number"&&dT(f,"number",f.value)}switch(I=u?Gc(u):window,e){case"focusin":(K2(I)||I.contentEditable==="true")&&(Wc=I,IT=u,Cm=null);break;case"focusout":Cm=IT=Wc=null;break;case"mousedown":kT=!0;break;case"contextmenu":case"mouseup":case"dragend":kT=!1,Q2(d,r,c);break;case"selectionchange":if(Ire)break;case"keydown":case"keyup":Q2(d,r,c)}var C;if(cP)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Hc?gB(e,r)&&(k="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(k="onCompositionStart");k&&(hB&&r.locale!=="ko"&&(Hc||k!=="onCompositionStart"?k==="onCompositionEnd"&&Hc&&(C=mB()):(ds=c,sP="value"in ds?ds.value:ds.textContent,Hc=!0)),I=Bv(u,k),0<I.length&&(k=new H2(k,e,null,r,c),d.push({event:k,listeners:I}),C?k.data=C:(C=yB(r),C!==null&&(k.data=C)))),(C=dre?fre(e,r):pre(e,r))&&(u=Bv(u,"onBeforeInput"),0<u.length&&(c=new H2("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=C))}LB(d,t)})}function Fm(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Bv(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=Rm(e,r),a!=null&&n.unshift(Fm(e,a,o)),a=Rm(e,t),a!=null&&n.push(Fm(e,a,o))),e=e.return}return n}function Uc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oF(e,t,r,n,o){for(var a=t._reactName,i=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,o?(l=Rm(r,a),l!=null&&i.unshift(Fm(r,l,s))):o||(l=Rm(r,a),l!=null&&i.push(Fm(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var Cre=/\r\n?/g,_re=/\u0000|\uFFFD/g;function aF(e){return(typeof e=="string"?e:""+e).replace(Cre,`
|
|
7
|
+
`).replace(_re,"")}function yv(e,t,r){if(t=aF(t),aF(e)!==t&&r)throw Error(G(425))}function jv(){}var CT=null,_T=null;function TT(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 PT=typeof setTimeout=="function"?setTimeout:void 0,Tre=typeof clearTimeout=="function"?clearTimeout:void 0,iF=typeof Promise=="function"?Promise:void 0,Pre=typeof queueMicrotask=="function"?queueMicrotask:typeof iF<"u"?function(e){return iF.resolve(null).then(e).catch(Lre)}:PT;function Lre(e){setTimeout(function(){throw e})}function G0(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Dm(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Dm(t)}function gs(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 sF(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var hd=Math.random().toString(36).slice(2),va="__reactFiber$"+hd,Bm="__reactProps$"+hd,li="__reactContainer$"+hd,LT="__reactEvents$"+hd,Ere="__reactListeners$"+hd,Are="__reactHandles$"+hd;function Yl(e){var t=e[va];if(t)return t;for(var r=e.parentNode;r;){if(t=r[li]||r[va]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=sF(e);e!==null;){if(r=e[va])return r;e=sF(e)}return t}e=r,r=e.parentNode}return null}function Km(e){return e=e[va]||e[li],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function sb(e){return e[Bm]||null}var ET=[],Kc=-1;function ks(e){return{current:e}}function xt(e){0>Kc||(e.current=ET[Kc],ET[Kc]=null,Kc--)}function mt(e,t){Kc++,ET[Kc]=e.current,e.current=t}var Ss={},zr=ks(Ss),gn=ks(!1),nu=Ss;function ld(e,t){var r=e.type.contextTypes;if(!r)return Ss;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function yn(e){return e=e.childContextTypes,e!=null}function Uv(){xt(gn),xt(zr)}function lF(e,t,r){if(zr.current!==Ss)throw Error(G(168));mt(zr,t),mt(gn,r)}function AB(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(G(108,yte(e)||"Unknown",o));return Mt({},r,n)}function Vv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ss,nu=zr.current,mt(zr,e),mt(gn,gn.current),!0}function uF(e,t,r){var n=e.stateNode;if(!n)throw Error(G(169));r?(e=AB(e,t,nu),n.__reactInternalMemoizedMergedChildContext=e,xt(gn),xt(zr),mt(zr,e)):xt(gn),mt(gn,r)}var ni=null,lb=!1,K0=!1;function RB(e){ni===null?ni=[e]:ni.push(e)}function Rre(e){lb=!0,RB(e)}function Cs(){if(!K0&&ni!==null){K0=!0;var e=0,t=Xe;try{var r=ni;for(Xe=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ni=null,lb=!1}catch(o){throw ni!==null&&(ni=ni.slice(e+1)),nB(nP,Cs),o}finally{Xe=t,K0=!1}}return null}var Jc=[],Xc=0,qv=null,Hv=0,ao=[],io=0,ou=null,oi=1,ai="";function Jl(e,t){Jc[Xc++]=Hv,Jc[Xc++]=qv,qv=e,Hv=t}function MB(e,t,r){ao[io++]=oi,ao[io++]=ai,ao[io++]=ou,ou=e;var n=oi;e=ai;var o=32-jo(n)-1;n&=~(1<<o),r+=1;var a=32-jo(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,oi=1<<32-jo(t)+o|r<<o|n,ai=a+e}else oi=1<<a|r<<o|n,ai=e}function fP(e){e.return!==null&&(Jl(e,1),MB(e,1,0))}function pP(e){for(;e===qv;)qv=Jc[--Xc],Jc[Xc]=null,Hv=Jc[--Xc],Jc[Xc]=null;for(;e===ou;)ou=ao[--io],ao[io]=null,ai=ao[--io],ao[io]=null,oi=ao[--io],ao[io]=null}var Fn=null,zn=null,kt=!1,Bo=null;function $B(e,t){var r=so(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function cF(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Fn=e,zn=gs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Fn=e,zn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ou!==null?{id:oi,overflow:ai}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=so(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Fn=e,zn=null,!0):!1;default:return!1}}function AT(e){return(e.mode&1)!==0&&(e.flags&128)===0}function RT(e){if(kt){var t=zn;if(t){var r=t;if(!cF(e,t)){if(AT(e))throw Error(G(418));t=gs(r.nextSibling);var n=Fn;t&&cF(e,t)?$B(n,r):(e.flags=e.flags&-4097|2,kt=!1,Fn=e)}}else{if(AT(e))throw Error(G(418));e.flags=e.flags&-4097|2,kt=!1,Fn=e}}}function dF(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Fn=e}function xv(e){if(e!==Fn)return!1;if(!kt)return dF(e),kt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!TT(e.type,e.memoizedProps)),t&&(t=zn)){if(AT(e))throw DB(),Error(G(418));for(;t;)$B(e,t),t=gs(t.nextSibling)}if(dF(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){zn=gs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}zn=null}}else zn=Fn?gs(e.stateNode.nextSibling):null;return!0}function DB(){for(var e=zn;e;)e=gs(e.nextSibling)}function ud(){zn=Fn=null,kt=!1}function mP(e){Bo===null?Bo=[e]:Bo.push(e)}var Mre=di.ReactCurrentBatchConfig;function pm(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(G(309));var n=r.stateNode}if(!n)throw Error(G(147,e));var o=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=o.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(G(284));if(!r._owner)throw Error(G(290,e))}return e}function vv(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fF(e){var t=e._init;return t(e._payload)}function OB(e){function t(g,y){if(e){var x=g.deletions;x===null?(g.deletions=[y],g.flags|=16):x.push(y)}}function r(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function n(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function o(g,y){return g=bs(g,y),g.index=0,g.sibling=null,g}function a(g,y,x){return g.index=x,e?(x=g.alternate,x!==null?(x=x.index,x<y?(g.flags|=2,y):x):(g.flags|=2,y)):(g.flags|=1048576,y)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function s(g,y,x,b){return y===null||y.tag!==6?(y=rT(x,g.mode,b),y.return=g,y):(y=o(y,x),y.return=g,y)}function l(g,y,x,b){var _=x.type;return _===qc?c(g,y,x.props.children,b,x.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ss&&fF(_)===y.type)?(b=o(y,x.props),b.ref=pm(g,y,x),b.return=g,b):(b=Rv(x.type,x.key,x.props,null,g.mode,b),b.ref=pm(g,y,x),b.return=g,b)}function u(g,y,x,b){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=nT(x,g.mode,b),y.return=g,y):(y=o(y,x.children||[]),y.return=g,y)}function c(g,y,x,b,_){return y===null||y.tag!==7?(y=ru(x,g.mode,b,_),y.return=g,y):(y=o(y,x),y.return=g,y)}function d(g,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=rT(""+y,g.mode,x),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ov:return x=Rv(y.type,y.key,y.props,null,g.mode,x),x.ref=pm(g,null,y),x.return=g,x;case Vc:return y=nT(y,g.mode,x),y.return=g,y;case ss:var b=y._init;return d(g,b(y._payload),x)}if(xm(y)||um(y))return y=ru(y,g.mode,x,null),y.return=g,y;vv(g,y)}return null}function f(g,y,x,b){var _=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:s(g,y,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ov:return x.key===_?l(g,y,x,b):null;case Vc:return x.key===_?u(g,y,x,b):null;case ss:return _=x._init,f(g,y,_(x._payload),b)}if(xm(x)||um(x))return _!==null?null:c(g,y,x,b,null);vv(g,x)}return null}function p(g,y,x,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(x)||null,s(y,g,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ov:return g=g.get(b.key===null?x:b.key)||null,l(y,g,b,_);case Vc:return g=g.get(b.key===null?x:b.key)||null,u(y,g,b,_);case ss:var I=b._init;return p(g,y,x,I(b._payload),_)}if(xm(b)||um(b))return g=g.get(x)||null,c(y,g,b,_,null);vv(y,b)}return null}function m(g,y,x,b){for(var _=null,I=null,C=y,k=y=0,M=null;C!==null&&k<x.length;k++){C.index>k?(M=C,C=null):M=C.sibling;var L=f(g,C,x[k],b);if(L===null){C===null&&(C=M);break}e&&C&&L.alternate===null&&t(g,C),y=a(L,y,k),I===null?_=L:I.sibling=L,I=L,C=M}if(k===x.length)return r(g,C),kt&&Jl(g,k),_;if(C===null){for(;k<x.length;k++)C=d(g,x[k],b),C!==null&&(y=a(C,y,k),I===null?_=C:I.sibling=C,I=C);return kt&&Jl(g,k),_}for(C=n(g,C);k<x.length;k++)M=p(C,g,k,x[k],b),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?k:M.key),y=a(M,y,k),I===null?_=M:I.sibling=M,I=M);return e&&C.forEach(function(j){return t(g,j)}),kt&&Jl(g,k),_}function h(g,y,x,b){var _=um(x);if(typeof _!="function")throw Error(G(150));if(x=_.call(x),x==null)throw Error(G(151));for(var I=_=null,C=y,k=y=0,M=null,L=x.next();C!==null&&!L.done;k++,L=x.next()){C.index>k?(M=C,C=null):M=C.sibling;var j=f(g,C,L.value,b);if(j===null){C===null&&(C=M);break}e&&C&&j.alternate===null&&t(g,C),y=a(j,y,k),I===null?_=j:I.sibling=j,I=j,C=M}if(L.done)return r(g,C),kt&&Jl(g,k),_;if(C===null){for(;!L.done;k++,L=x.next())L=d(g,L.value,b),L!==null&&(y=a(L,y,k),I===null?_=L:I.sibling=L,I=L);return kt&&Jl(g,k),_}for(C=n(g,C);!L.done;k++,L=x.next())L=p(C,g,k,L.value,b),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?k:L.key),y=a(L,y,k),I===null?_=L:I.sibling=L,I=L);return e&&C.forEach(function(Y){return t(g,Y)}),kt&&Jl(g,k),_}function v(g,y,x,b){if(typeof x=="object"&&x!==null&&x.type===qc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ov:e:{for(var _=x.key,I=y;I!==null;){if(I.key===_){if(_=x.type,_===qc){if(I.tag===7){r(g,I.sibling),y=o(I,x.props.children),y.return=g,g=y;break e}}else if(I.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ss&&fF(_)===I.type){r(g,I.sibling),y=o(I,x.props),y.ref=pm(g,I,x),y.return=g,g=y;break e}r(g,I);break}else t(g,I);I=I.sibling}x.type===qc?(y=ru(x.props.children,g.mode,b,x.key),y.return=g,g=y):(b=Rv(x.type,x.key,x.props,null,g.mode,b),b.ref=pm(g,y,x),b.return=g,g=b)}return i(g);case Vc:e:{for(I=x.key;y!==null;){if(y.key===I)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){r(g,y.sibling),y=o(y,x.children||[]),y.return=g,g=y;break e}else{r(g,y);break}else t(g,y);y=y.sibling}y=nT(x,g.mode,b),y.return=g,g=y}return i(g);case ss:return I=x._init,v(g,y,I(x._payload),b)}if(xm(x))return m(g,y,x,b);if(um(x))return h(g,y,x,b);vv(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(r(g,y.sibling),y=o(y,x),y.return=g,g=y):(r(g,y),y=rT(x,g.mode,b),y.return=g,g=y),i(g)):r(g,y)}return v}var cd=OB(!0),NB=OB(!1),Wv=ks(null),Zv=null,Yc=null,hP=null;function gP(){hP=Yc=Zv=null}function yP(e){var t=Wv.current;xt(Wv),e._currentValue=t}function MT(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ad(e,t){Zv=e,hP=Yc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(hn=!0),e.firstContext=null)}function uo(e){var t=e._currentValue;if(hP!==e)if(e={context:e,memoizedValue:t,next:null},Yc===null){if(Zv===null)throw Error(G(308));Yc=e,Zv.dependencies={lanes:0,firstContext:e}}else Yc=Yc.next=e;return t}var Ql=null;function xP(e){Ql===null?Ql=[e]:Ql.push(e)}function zB(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,xP(t)):(r.next=o.next,o.next=r),t.interleaved=r,ui(e,n)}function ui(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ls=!1;function vP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FB(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 ii(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ys(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ue&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,ui(e,r)}return o=n.interleaved,o===null?(t.next=t,xP(n)):(t.next=o.next,o.next=t),n.interleaved=t,ui(e,r)}function _v(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,oP(e,r)}}function pF(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?o=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?o=a=t:a=a.next=t}else o=a=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Gv(e,t,r,n){var o=e.updateQueue;ls=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=o.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,h=s;switch(f=t,p=r,h.tag){case 1:if(m=h.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Mt({},d,f);break e;case 2:ls=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);iu|=i,e.lanes=i,e.memoizedState=d}}function mF(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(G(191,o));o.call(n)}}}var Jm={},wa=ks(Jm),jm=ks(Jm),Um=ks(Jm);function eu(e){if(e===Jm)throw Error(G(174));return e}function bP(e,t){switch(mt(Um,t),mt(jm,e),mt(wa,Jm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pT(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pT(t,e)}xt(wa),mt(wa,t)}function dd(){xt(wa),xt(jm),xt(Um)}function BB(e){eu(Um.current);var t=eu(wa.current),r=pT(t,e.type);t!==r&&(mt(jm,e),mt(wa,r))}function wP(e){jm.current===e&&(xt(wa),xt(jm))}var At=ks(0);function Kv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 J0=[];function SP(){for(var e=0;e<J0.length;e++)J0[e]._workInProgressVersionPrimary=null;J0.length=0}var Tv=di.ReactCurrentDispatcher,X0=di.ReactCurrentBatchConfig,au=0,Rt=null,ir=null,gr=null,Jv=!1,_m=!1,Vm=0,$re=0;function Dr(){throw Error(G(321))}function IP(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Vo(e[r],t[r]))return!1;return!0}function kP(e,t,r,n,o,a){if(au=a,Rt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tv.current=e===null||e.memoizedState===null?zre:Fre,e=r(n,o),_m){a=0;do{if(_m=!1,Vm=0,25<=a)throw Error(G(301));a+=1,gr=ir=null,t.updateQueue=null,Tv.current=Bre,e=r(n,o)}while(_m)}if(Tv.current=Xv,t=ir!==null&&ir.next!==null,au=0,gr=ir=Rt=null,Jv=!1,t)throw Error(G(300));return e}function CP(){var e=Vm!==0;return Vm=0,e}function xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gr===null?Rt.memoizedState=gr=e:gr=gr.next=e,gr}function co(){if(ir===null){var e=Rt.alternate;e=e!==null?e.memoizedState:null}else e=ir.next;var t=gr===null?Rt.memoizedState:gr.next;if(t!==null)gr=t,ir=e;else{if(e===null)throw Error(G(310));ir=e,e={memoizedState:ir.memoizedState,baseState:ir.baseState,baseQueue:ir.baseQueue,queue:ir.queue,next:null},gr===null?Rt.memoizedState=gr=e:gr=gr.next=e}return gr}function qm(e,t){return typeof t=="function"?t(e):t}function Y0(e){var t=co(),r=t.queue;if(r===null)throw Error(G(311));r.lastRenderedReducer=e;var n=ir,o=n.baseQueue,a=r.pending;if(a!==null){if(o!==null){var i=o.next;o.next=a.next,a.next=i}n.baseQueue=o=a,r.pending=null}if(o!==null){a=o.next,n=n.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((au&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=n):l=l.next=d,Rt.lanes|=c,iu|=c}u=u.next}while(u!==null&&u!==a);l===null?i=n:l.next=s,Vo(n,t.memoizedState)||(hn=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do a=o.lane,Rt.lanes|=a,iu|=a,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Q0(e){var t=co(),r=t.queue;if(r===null)throw Error(G(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,a=t.memoizedState;if(o!==null){r.pending=null;var i=o=o.next;do a=e(a,i.action),i=i.next;while(i!==o);Vo(a,t.memoizedState)||(hn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function jB(){}function UB(e,t){var r=Rt,n=co(),o=t(),a=!Vo(n.memoizedState,o);if(a&&(n.memoizedState=o,hn=!0),n=n.queue,_P(HB.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||gr!==null&&gr.memoizedState.tag&1){if(r.flags|=2048,Hm(9,qB.bind(null,r,n,o,t),void 0,null),yr===null)throw Error(G(349));(au&30)!==0||VB(r,t,o)}return o}function VB(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function qB(e,t,r,n){t.value=r,t.getSnapshot=n,WB(t)&&ZB(e)}function HB(e,t,r){return r(function(){WB(t)&&ZB(e)})}function WB(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Vo(e,r)}catch{return!0}}function ZB(e){var t=ui(e,1);t!==null&&Uo(t,e,1,-1)}function hF(e){var t=xa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qm,lastRenderedState:e},t.queue=e,e=e.dispatch=Nre.bind(null,Rt,e),[t.memoizedState,e]}function Hm(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function GB(){return co().memoizedState}function Pv(e,t,r,n){var o=xa();Rt.flags|=e,o.memoizedState=Hm(1|t,r,void 0,n===void 0?null:n)}function ub(e,t,r,n){var o=co();n=n===void 0?null:n;var a=void 0;if(ir!==null){var i=ir.memoizedState;if(a=i.destroy,n!==null&&IP(n,i.deps)){o.memoizedState=Hm(t,r,a,n);return}}Rt.flags|=e,o.memoizedState=Hm(1|t,r,a,n)}function gF(e,t){return Pv(8390656,8,e,t)}function _P(e,t){return ub(2048,8,e,t)}function KB(e,t){return ub(4,2,e,t)}function JB(e,t){return ub(4,4,e,t)}function XB(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 YB(e,t,r){return r=r!=null?r.concat([e]):null,ub(4,4,XB.bind(null,t,e),r)}function TP(){}function QB(e,t){var r=co();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&IP(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ej(e,t){var r=co();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&IP(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function tj(e,t,r){return(au&21)===0?(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=r):(Vo(r,t)||(r=iB(),Rt.lanes|=r,iu|=r,e.baseState=!0),t)}function Dre(e,t){var r=Xe;Xe=r!==0&&4>r?r:4,e(!0);var n=X0.transition;X0.transition={};try{e(!1),t()}finally{Xe=r,X0.transition=n}}function rj(){return co().memoizedState}function Ore(e,t,r){var n=vs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},nj(e))oj(t,r);else if(r=zB(e,t,r,n),r!==null){var o=Kr();Uo(r,e,n,o),aj(r,t,n)}}function Nre(e,t,r){var n=vs(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(nj(e))oj(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,r);if(o.hasEagerState=!0,o.eagerState=s,Vo(s,i)){var l=t.interleaved;l===null?(o.next=o,xP(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=zB(e,t,o,n),r!==null&&(o=Kr(),Uo(r,e,n,o),aj(r,t,n))}}function nj(e){var t=e.alternate;return e===Rt||t!==null&&t===Rt}function oj(e,t){_m=Jv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function aj(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,oP(e,r)}}var Xv={readContext:uo,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useInsertionEffect:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useDeferredValue:Dr,useTransition:Dr,useMutableSource:Dr,useSyncExternalStore:Dr,useId:Dr,unstable_isNewReconciler:!1},zre={readContext:uo,useCallback:function(e,t){return xa().memoizedState=[e,t===void 0?null:t],e},useContext:uo,useEffect:gF,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Pv(4194308,4,XB.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Pv(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pv(4,2,e,t)},useMemo:function(e,t){var r=xa();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=xa();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Ore.bind(null,Rt,e),[n.memoizedState,e]},useRef:function(e){var t=xa();return e={current:e},t.memoizedState=e},useState:hF,useDebugValue:TP,useDeferredValue:function(e){return xa().memoizedState=e},useTransition:function(){var e=hF(!1),t=e[0];return e=Dre.bind(null,e[1]),xa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Rt,o=xa();if(kt){if(r===void 0)throw Error(G(407));r=r()}else{if(r=t(),yr===null)throw Error(G(349));(au&30)!==0||VB(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,gF(HB.bind(null,n,a,e),[e]),n.flags|=2048,Hm(9,qB.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=xa(),t=yr.identifierPrefix;if(kt){var r=ai,n=oi;r=(n&~(1<<32-jo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Vm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=$re++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Fre={readContext:uo,useCallback:QB,useContext:uo,useEffect:_P,useImperativeHandle:YB,useInsertionEffect:KB,useLayoutEffect:JB,useMemo:ej,useReducer:Y0,useRef:GB,useState:function(){return Y0(qm)},useDebugValue:TP,useDeferredValue:function(e){var t=co();return tj(t,ir.memoizedState,e)},useTransition:function(){var e=Y0(qm)[0],t=co().memoizedState;return[e,t]},useMutableSource:jB,useSyncExternalStore:UB,useId:rj,unstable_isNewReconciler:!1},Bre={readContext:uo,useCallback:QB,useContext:uo,useEffect:_P,useImperativeHandle:YB,useInsertionEffect:KB,useLayoutEffect:JB,useMemo:ej,useReducer:Q0,useRef:GB,useState:function(){return Q0(qm)},useDebugValue:TP,useDeferredValue:function(e){var t=co();return ir===null?t.memoizedState=e:tj(t,ir.memoizedState,e)},useTransition:function(){var e=Q0(qm)[0],t=co().memoizedState;return[e,t]},useMutableSource:jB,useSyncExternalStore:UB,useId:rj,unstable_isNewReconciler:!1};function zo(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function $T(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var cb={isMounted:function(e){return(e=e._reactInternals)?uu(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Kr(),o=vs(e),a=ii(n,o);a.payload=t,r!=null&&(a.callback=r),t=ys(e,a,o),t!==null&&(Uo(t,e,o,n),_v(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Kr(),o=vs(e),a=ii(n,o);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=ys(e,a,o),t!==null&&(Uo(t,e,o,n),_v(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Kr(),n=vs(e),o=ii(r,n);o.tag=2,t!=null&&(o.callback=t),t=ys(e,o,n),t!==null&&(Uo(t,e,n,r),_v(t,e,n))}};function yF(e,t,r,n,o,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,i):t.prototype&&t.prototype.isPureReactComponent?!Nm(r,n)||!Nm(o,a):!0}function ij(e,t,r){var n=!1,o=Ss,a=t.contextType;return typeof a=="object"&&a!==null?a=uo(a):(o=yn(t)?nu:zr.current,n=t.contextTypes,a=(n=n!=null)?ld(e,o):Ss),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cb,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function xF(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&cb.enqueueReplaceState(t,t.state,null)}function DT(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},vP(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=uo(a):(a=yn(t)?nu:zr.current,o.context=ld(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&($T(e,t,a,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&cb.enqueueReplaceState(o,o.state,null),Gv(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function fd(e,t){try{var r="",n=t;do r+=gte(n),n=n.return;while(n);var o=r}catch(a){o=`
|
|
8
|
+
Error generating stack: `+a.message+`
|
|
9
|
+
`+a.stack}return{value:e,source:t,stack:o,digest:null}}function eT(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function OT(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var jre=typeof WeakMap=="function"?WeakMap:Map;function sj(e,t,r){r=ii(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Qv||(Qv=!0,WT=n),OT(e,t)},r}function lj(e,t,r){r=ii(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){OT(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){OT(e,t),typeof n!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function vF(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new jre;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=tne.bind(null,e,t,r),t.then(e,e))}function bF(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 wF(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ii(-1,1),t.tag=2,ys(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Ure=di.ReactCurrentOwner,hn=!1;function Gr(e,t,r,n){t.child=e===null?NB(t,null,r,n):cd(t,e.child,r,n)}function SF(e,t,r,n,o){r=r.render;var a=t.ref;return ad(t,o),n=kP(e,t,r,n,a,o),r=CP(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ci(e,t,o)):(kt&&r&&fP(t),t.flags|=1,Gr(e,t,n,o),t.child)}function IF(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!DP(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,uj(e,t,a,n,o)):(e=Rv(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&o)===0){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:Nm,r(i,n)&&e.ref===t.ref)return ci(e,t,o)}return t.flags|=1,e=bs(a,n),e.ref=t.ref,e.return=t,t.child=e}function uj(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(Nm(a,n)&&e.ref===t.ref)if(hn=!1,t.pendingProps=n=a,(e.lanes&o)!==0)(e.flags&131072)!==0&&(hn=!0);else return t.lanes=e.lanes,ci(e,t,o)}return NT(e,t,r,n,o)}function cj(e,t,r){var n=t.pendingProps,o=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(ed,Nn),Nn|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,mt(ed,Nn),Nn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,mt(ed,Nn),Nn|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,mt(ed,Nn),Nn|=n;return Gr(e,t,o,r),t.child}function dj(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function NT(e,t,r,n,o){var a=yn(r)?nu:zr.current;return a=ld(t,a),ad(t,o),r=kP(e,t,r,n,a,o),n=CP(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ci(e,t,o)):(kt&&n&&fP(t),t.flags|=1,Gr(e,t,r,o),t.child)}function kF(e,t,r,n,o){if(yn(r)){var a=!0;Vv(t)}else a=!1;if(ad(t,o),t.stateNode===null)Lv(e,t),ij(t,r,n),DT(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=uo(u):(u=yn(r)?nu:zr.current,u=ld(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==n||l!==u)&&xF(t,i,n,u),ls=!1;var f=t.memoizedState;i.state=f,Gv(t,n,i,o),l=t.memoizedState,s!==n||f!==l||gn.current||ls?(typeof c=="function"&&($T(t,r,c,n),l=t.memoizedState),(s=ls||yF(t,r,s,n,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,FB(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:zo(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=uo(l):(l=yn(r)?nu:zr.current,l=ld(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&xF(t,i,n,l),ls=!1,f=t.memoizedState,i.state=f,Gv(t,n,i,o);var m=t.memoizedState;s!==d||f!==m||gn.current||ls?(typeof p=="function"&&($T(t,r,p,n),m=t.memoizedState),(u=ls||yF(t,r,u,n,f,m,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,m,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,m,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),i.props=n,i.state=m,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return zT(e,t,r,n,a,o)}function zT(e,t,r,n,o,a){dj(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return o&&uF(t,r,!1),ci(e,t,a);n=t.stateNode,Ure.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=cd(t,e.child,null,a),t.child=cd(t,null,s,a)):Gr(e,t,s,a),t.memoizedState=n.state,o&&uF(t,r,!0),t.child}function fj(e){var t=e.stateNode;t.pendingContext?lF(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lF(e,t.context,!1),bP(e,t.containerInfo)}function CF(e,t,r,n,o){return ud(),mP(o),t.flags|=256,Gr(e,t,r,n),t.child}var FT={dehydrated:null,treeContext:null,retryLane:0};function BT(e){return{baseLanes:e,cachePool:null,transitions:null}}function pj(e,t,r){var n=t.pendingProps,o=At.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),mt(At,o&1),e===null)return RT(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):(i=n.children,e=n.fallback,a?(n=t.mode,a=t.child,i={mode:"hidden",children:i},(n&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=i):a=pb(i,n,0,null),e=ru(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=BT(r),t.memoizedState=FT,e):PP(t,i));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Vre(e,t,i,n,s,o,r);if(a){a=n.fallback,i=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(i&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=bs(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?a=bs(s,a):(a=ru(a,i,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,i=e.child.memoizedState,i=i===null?BT(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=FT,n}return a=e.child,e=a.sibling,n=bs(a,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function PP(e,t){return t=pb({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bv(e,t,r,n){return n!==null&&mP(n),cd(t,e.child,null,r),e=PP(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vre(e,t,r,n,o,a,i){if(r)return t.flags&256?(t.flags&=-257,n=eT(Error(G(422))),bv(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=pb({mode:"visible",children:n.children},o,0,null),a=ru(a,o,i,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,(t.mode&1)!==0&&cd(t,e.child,null,i),t.child.memoizedState=BT(i),t.memoizedState=FT,a);if((t.mode&1)===0)return bv(e,t,i,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(G(419)),n=eT(a,n,void 0),bv(e,t,i,n)}if(s=(i&e.childLanes)!==0,hn||s){if(n=yr,n!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|i))!==0?0:o,o!==0&&o!==a.retryLane&&(a.retryLane=o,ui(e,o),Uo(n,e,o,-1))}return $P(),n=eT(Error(G(421))),bv(e,t,i,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=rne.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,zn=gs(o.nextSibling),Fn=t,kt=!0,Bo=null,e!==null&&(ao[io++]=oi,ao[io++]=ai,ao[io++]=ou,oi=e.id,ai=e.overflow,ou=t),t=PP(t,n.children),t.flags|=4096,t)}function _F(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),MT(e.return,t,r)}function tT(e,t,r,n,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=o)}function mj(e,t,r){var n=t.pendingProps,o=n.revealOrder,a=n.tail;if(Gr(e,t,n.children,r),n=At.current,(n&2)!==0)n=n&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&&_F(e,r,t);else if(e.tag===19)_F(e,r,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}n&=1}if(mt(At,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Kv(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),tT(t,!1,o,r,a);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Kv(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}tT(t,!0,r,null,a);break;case"together":tT(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lv(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ci(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),iu|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,r=bs(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=bs(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function qre(e,t,r){switch(t.tag){case 3:fj(t),ud();break;case 5:BB(t);break;case 1:yn(t.type)&&Vv(t);break;case 4:bP(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;mt(Wv,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(mt(At,At.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?pj(e,t,r):(mt(At,At.current&1),e=ci(e,t,r),e!==null?e.sibling:null);mt(At,At.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return mj(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),mt(At,At.current),n)break;return null;case 22:case 23:return t.lanes=0,cj(e,t,r)}return ci(e,t,r)}var hj,jT,gj,yj;hj=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};jT=function(){};gj=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,eu(wa.current);var a=null;switch(r){case"input":o=uT(e,o),n=uT(e,n),a=[];break;case"select":o=Mt({},o,{value:void 0}),n=Mt({},n,{value:void 0}),a=[];break;case"textarea":o=fT(e,o),n=fT(e,n),a=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=jv)}mT(r,n);var i;r=null;for(u in o)if(!n.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Em.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=o?.[u],n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Em.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&yt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};yj=function(e,t,r,n){r!==n&&(t.flags|=4)};function mm(e,t){if(!kt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Or(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Hre(e,t,r){var n=t.pendingProps;switch(pP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Or(t),null;case 1:return yn(t.type)&&Uv(),Or(t),null;case 3:return n=t.stateNode,dd(),xt(gn),xt(zr),SP(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Bo!==null&&(KT(Bo),Bo=null))),jT(e,t),Or(t),null;case 5:wP(t);var o=eu(Um.current);if(r=t.type,e!==null&&t.stateNode!=null)gj(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(G(166));return Or(t),null}if(e=eu(wa.current),xv(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[va]=t,n[Bm]=a,e=(t.mode&1)!==0,r){case"dialog":yt("cancel",n),yt("close",n);break;case"iframe":case"object":case"embed":yt("load",n);break;case"video":case"audio":for(o=0;o<bm.length;o++)yt(bm[o],n);break;case"source":yt("error",n);break;case"img":case"image":case"link":yt("error",n),yt("load",n);break;case"details":yt("toggle",n);break;case"input":$2(n,a),yt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},yt("invalid",n);break;case"textarea":O2(n,a),yt("invalid",n)}mT(r,a),o=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&yv(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&yv(n.textContent,s,e),o=["children",""+s]):Em.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&yt("scroll",n)}switch(r){case"input":av(n),D2(n,a,!0);break;case"textarea":av(n),N2(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=jv)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=HF(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[va]=t,e[Bm]=n,hj(e,t,!1,!1),t.stateNode=e;e:{switch(i=hT(r,n),r){case"dialog":yt("cancel",e),yt("close",e),o=n;break;case"iframe":case"object":case"embed":yt("load",e),o=n;break;case"video":case"audio":for(o=0;o<bm.length;o++)yt(bm[o],e);o=n;break;case"source":yt("error",e),o=n;break;case"img":case"image":case"link":yt("error",e),yt("load",e),o=n;break;case"details":yt("toggle",e),o=n;break;case"input":$2(e,n),o=uT(e,n),yt("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Mt({},n,{value:void 0}),yt("invalid",e);break;case"textarea":O2(e,n),o=fT(e,n),yt("invalid",e);break;default:o=n}mT(r,o),s=o;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?GF(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&WF(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Am(e,l):typeof l=="number"&&Am(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Em.hasOwnProperty(a)?l!=null&&a==="onScroll"&&yt("scroll",e):l!=null&&YT(e,a,l,i))}switch(r){case"input":av(e),D2(e,n,!1);break;case"textarea":av(e),N2(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ws(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?td(e,!!n.multiple,a,!1):n.defaultValue!=null&&td(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=jv)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Or(t),null;case 6:if(e&&t.stateNode!=null)yj(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(G(166));if(r=eu(Um.current),eu(wa.current),xv(t)){if(n=t.stateNode,r=t.memoizedProps,n[va]=t,(a=n.nodeValue!==r)&&(e=Fn,e!==null))switch(e.tag){case 3:yv(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yv(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[va]=t,t.stateNode=n}return Or(t),null;case 13:if(xt(At),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(kt&&zn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)DB(),ud(),t.flags|=98560,a=!1;else if(a=xv(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(G(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(G(317));a[va]=t}else ud(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Or(t),a=!1}else Bo!==null&&(KT(Bo),Bo=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(At.current&1)!==0?sr===0&&(sr=3):$P())),t.updateQueue!==null&&(t.flags|=4),Or(t),null);case 4:return dd(),jT(e,t),e===null&&zm(t.stateNode.containerInfo),Or(t),null;case 10:return yP(t.type._context),Or(t),null;case 17:return yn(t.type)&&Uv(),Or(t),null;case 19:if(xt(At),a=t.memoizedState,a===null)return Or(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)mm(a,!1);else{if(sr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Kv(e),i!==null){for(t.flags|=128,mm(a,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return mt(At,At.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ht()>pd&&(t.flags|=128,n=!0,mm(a,!1),t.lanes=4194304)}else{if(!n)if(e=Kv(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),mm(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!kt)return Or(t),null}else 2*Ht()-a.renderingStartTime>pd&&r!==1073741824&&(t.flags|=128,n=!0,mm(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ht(),t.sibling=null,r=At.current,mt(At,n?r&1|2:r&1),t):(Or(t),null);case 22:case 23:return MP(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Nn&1073741824)!==0&&(Or(t),t.subtreeFlags&6&&(t.flags|=8192)):Or(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function Wre(e,t){switch(pP(t),t.tag){case 1:return yn(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dd(),xt(gn),xt(zr),SP(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return wP(t),null;case 13:if(xt(At),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));ud()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xt(At),null;case 4:return dd(),null;case 10:return yP(t.type._context),null;case 22:case 23:return MP(),null;case 24:return null;default:return null}}var wv=!1,Nr=!1,Zre=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Qc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Bt(e,t,n)}else r.current=null}function UT(e,t,r){try{r()}catch(n){Bt(e,t,n)}}var TF=!1;function Gre(e,t){if(CT=zv,e=SB(),dP(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||o!==0&&d.nodeType!==3||(s=i+o),d!==a||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===o&&(s=i),f===a&&++c===n&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(_T={focusedElem:e,selectionRange:r},zv=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,v=m.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:zo(t.type,h),v);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(b){Bt(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return m=TF,TF=!1,m}function Tm(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&UT(t,r,a)}o=o.next}while(o!==n)}}function db(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function VT(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function xj(e){var t=e.alternate;t!==null&&(e.alternate=null,xj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[va],delete t[Bm],delete t[LT],delete t[Ere],delete t[Are])),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 vj(e){return e.tag===5||e.tag===3||e.tag===4}function PF(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vj(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 qT(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=jv));else if(n!==4&&(e=e.child,e!==null))for(qT(e,t,r),e=e.sibling;e!==null;)qT(e,t,r),e=e.sibling}function HT(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(HT(e,t,r),e=e.sibling;e!==null;)HT(e,t,r),e=e.sibling}var Sr=null,Fo=!1;function is(e,t,r){for(r=r.child;r!==null;)bj(e,t,r),r=r.sibling}function bj(e,t,r){if(ba&&typeof ba.onCommitFiberUnmount=="function")try{ba.onCommitFiberUnmount(nb,r)}catch{}switch(r.tag){case 5:Nr||Qc(r,t);case 6:var n=Sr,o=Fo;Sr=null,is(e,t,r),Sr=n,Fo=o,Sr!==null&&(Fo?(e=Sr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Sr.removeChild(r.stateNode));break;case 18:Sr!==null&&(Fo?(e=Sr,r=r.stateNode,e.nodeType===8?G0(e.parentNode,r):e.nodeType===1&&G0(e,r),Dm(e)):G0(Sr,r.stateNode));break;case 4:n=Sr,o=Fo,Sr=r.stateNode.containerInfo,Fo=!0,is(e,t,r),Sr=n,Fo=o;break;case 0:case 11:case 14:case 15:if(!Nr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&UT(r,t,i),o=o.next}while(o!==n)}is(e,t,r);break;case 1:if(!Nr&&(Qc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Bt(r,t,s)}is(e,t,r);break;case 21:is(e,t,r);break;case 22:r.mode&1?(Nr=(n=Nr)||r.memoizedState!==null,is(e,t,r),Nr=n):is(e,t,r);break;default:is(e,t,r)}}function LF(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Zre),t.forEach(function(n){var o=nne.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function No(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:Sr=s.stateNode,Fo=!1;break e;case 3:Sr=s.stateNode.containerInfo,Fo=!0;break e;case 4:Sr=s.stateNode.containerInfo,Fo=!0;break e}s=s.return}if(Sr===null)throw Error(G(160));bj(a,i,o),Sr=null,Fo=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){Bt(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wj(t,e),t=t.sibling}function wj(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(No(t,e),ya(e),n&4){try{Tm(3,e,e.return),db(3,e)}catch(h){Bt(e,e.return,h)}try{Tm(5,e,e.return)}catch(h){Bt(e,e.return,h)}}break;case 1:No(t,e),ya(e),n&512&&r!==null&&Qc(r,r.return);break;case 5:if(No(t,e),ya(e),n&512&&r!==null&&Qc(r,r.return),e.flags&32){var o=e.stateNode;try{Am(o,"")}catch(h){Bt(e,e.return,h)}}if(n&4&&(o=e.stateNode,o!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&VF(o,a),hT(s,i);var u=hT(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?GF(o,d):c==="dangerouslySetInnerHTML"?WF(o,d):c==="children"?Am(o,d):YT(o,c,d,u)}switch(s){case"input":cT(o,a);break;case"textarea":qF(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?td(o,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?td(o,!!a.multiple,a.defaultValue,!0):td(o,!!a.multiple,a.multiple?[]:"",!1))}o[Bm]=a}catch(h){Bt(e,e.return,h)}}break;case 6:if(No(t,e),ya(e),n&4){if(e.stateNode===null)throw Error(G(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(h){Bt(e,e.return,h)}}break;case 3:if(No(t,e),ya(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Dm(t.containerInfo)}catch(h){Bt(e,e.return,h)}break;case 4:No(t,e),ya(e);break;case 13:No(t,e),ya(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(AP=Ht())),n&4&&LF(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Nr=(u=Nr)||c,No(t,e),Nr=u):No(t,e),ya(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(ce=e,c=e.child;c!==null;){for(d=ce=c;ce!==null;){switch(f=ce,p=f.child,f.tag){case 0:case 11:case 14:case 15:Tm(4,f,f.return);break;case 1:Qc(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(h){Bt(n,r,h)}}break;case 5:Qc(f,f.return);break;case 22:if(f.memoizedState!==null){AF(d);continue}}p!==null?(p.return=f,ce=p):AF(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=ZF("display",i))}catch(h){Bt(e,e.return,h)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(h){Bt(e,e.return,h)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:No(t,e),ya(e),n&4&&LF(e);break;case 21:break;default:No(t,e),ya(e)}}function ya(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(vj(r)){var n=r;break e}r=r.return}throw Error(G(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Am(o,""),n.flags&=-33);var a=PF(e);HT(e,a,o);break;case 3:case 4:var i=n.stateNode.containerInfo,s=PF(e);qT(e,s,i);break;default:throw Error(G(161))}}catch(l){Bt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kre(e,t,r){ce=e,Sj(e,t,r)}function Sj(e,t,r){for(var n=(e.mode&1)!==0;ce!==null;){var o=ce,a=o.child;if(o.tag===22&&n){var i=o.memoizedState!==null||wv;if(!i){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Nr;s=wv;var u=Nr;if(wv=i,(Nr=l)&&!u)for(ce=o;ce!==null;)i=ce,l=i.child,i.tag===22&&i.memoizedState!==null?RF(o):l!==null?(l.return=i,ce=l):RF(o);for(;a!==null;)ce=a,Sj(a,t,r),a=a.sibling;ce=o,wv=s,Nr=u}EF(e,t,r)}else(o.subtreeFlags&8772)!==0&&a!==null?(a.return=o,ce=a):EF(e,t,r)}}function EF(e){for(;ce!==null;){var t=ce;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Nr||db(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Nr)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:zo(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&mF(t,a,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}mF(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Dm(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Nr||t.flags&512&&VT(t)}catch(f){Bt(t,t.return,f)}}if(t===e){ce=null;break}if(r=t.sibling,r!==null){r.return=t.return,ce=r;break}ce=t.return}}function AF(e){for(;ce!==null;){var t=ce;if(t===e){ce=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ce=r;break}ce=t.return}}function RF(e){for(;ce!==null;){var t=ce;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{db(4,t)}catch(l){Bt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Bt(t,o,l)}}var a=t.return;try{VT(t)}catch(l){Bt(t,a,l)}break;case 5:var i=t.return;try{VT(t)}catch(l){Bt(t,i,l)}}}catch(l){Bt(t,t.return,l)}if(t===e){ce=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ce=s;break}ce=t.return}}var Jre=Math.ceil,Yv=di.ReactCurrentDispatcher,LP=di.ReactCurrentOwner,lo=di.ReactCurrentBatchConfig,Ue=0,yr=null,Xt=null,Ir=0,Nn=0,ed=ks(0),sr=0,Wm=null,iu=0,fb=0,EP=0,Pm=null,mn=null,AP=0,pd=1/0,ri=null,Qv=!1,WT=null,xs=null,Sv=!1,fs=null,eb=0,Lm=0,ZT=null,Ev=-1,Av=0;function Kr(){return(Ue&6)!==0?Ht():Ev!==-1?Ev:Ev=Ht()}function vs(e){return(e.mode&1)===0?1:(Ue&2)!==0&&Ir!==0?Ir&-Ir:Mre.transition!==null?(Av===0&&(Av=iB()),Av):(e=Xe,e!==0||(e=window.event,e=e===void 0?16:pB(e.type)),e)}function Uo(e,t,r,n){if(50<Lm)throw Lm=0,ZT=null,Error(G(185));Zm(e,r,n),((Ue&2)===0||e!==yr)&&(e===yr&&((Ue&2)===0&&(fb|=r),sr===4&&cs(e,Ir)),xn(e,n),r===1&&Ue===0&&(t.mode&1)===0&&(pd=Ht()+500,lb&&Cs()))}function xn(e,t){var r=e.callbackNode;Dte(e,t);var n=Nv(e,e===yr?Ir:0);if(n===0)r!==null&&B2(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&B2(r),t===1)e.tag===0?Rre(MF.bind(null,e)):RB(MF.bind(null,e)),Pre(function(){(Ue&6)===0&&Cs()}),r=null;else{switch(sB(n)){case 1:r=nP;break;case 4:r=oB;break;case 16:r=Ov;break;case 536870912:r=aB;break;default:r=Ov}r=Ej(r,Ij.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ij(e,t){if(Ev=-1,Av=0,(Ue&6)!==0)throw Error(G(327));var r=e.callbackNode;if(id()&&e.callbackNode!==r)return null;var n=Nv(e,e===yr?Ir:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=tb(e,n);else{t=n;var o=Ue;Ue|=2;var a=Cj();(yr!==e||Ir!==t)&&(ri=null,pd=Ht()+500,tu(e,t));do try{Qre();break}catch(s){kj(e,s)}while(!0);gP(),Yv.current=a,Ue=o,Xt!==null?t=0:(yr=null,Ir=0,t=sr)}if(t!==0){if(t===2&&(o=bT(e),o!==0&&(n=o,t=GT(e,o))),t===1)throw r=Wm,tu(e,0),cs(e,n),xn(e,Ht()),r;if(t===6)cs(e,n);else{if(o=e.current.alternate,(n&30)===0&&!Xre(o)&&(t=tb(e,n),t===2&&(a=bT(e),a!==0&&(n=a,t=GT(e,a))),t===1))throw r=Wm,tu(e,0),cs(e,n),xn(e,Ht()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(G(345));case 2:Xl(e,mn,ri);break;case 3:if(cs(e,n),(n&130023424)===n&&(t=AP+500-Ht(),10<t)){if(Nv(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Kr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=PT(Xl.bind(null,e,mn,ri),t);break}Xl(e,mn,ri);break;case 4:if(cs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var i=31-jo(n);a=1<<i,i=t[i],i>o&&(o=i),n&=~a}if(n=o,n=Ht()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Jre(n/1960))-n,10<n){e.timeoutHandle=PT(Xl.bind(null,e,mn,ri),n);break}Xl(e,mn,ri);break;case 5:Xl(e,mn,ri);break;default:throw Error(G(329))}}}return xn(e,Ht()),e.callbackNode===r?Ij.bind(null,e):null}function GT(e,t){var r=Pm;return e.current.memoizedState.isDehydrated&&(tu(e,t).flags|=256),e=tb(e,t),e!==2&&(t=mn,mn=r,t!==null&&KT(t)),e}function KT(e){mn===null?mn=e:mn.push.apply(mn,e)}function Xre(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],a=o.getSnapshot;o=o.value;try{if(!Vo(a(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 cs(e,t){for(t&=~EP,t&=~fb,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-jo(t),n=1<<r;e[r]=-1,t&=~n}}function MF(e){if((Ue&6)!==0)throw Error(G(327));id();var t=Nv(e,0);if((t&1)===0)return xn(e,Ht()),null;var r=tb(e,t);if(e.tag!==0&&r===2){var n=bT(e);n!==0&&(t=n,r=GT(e,n))}if(r===1)throw r=Wm,tu(e,0),cs(e,t),xn(e,Ht()),r;if(r===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xl(e,mn,ri),xn(e,Ht()),null}function RP(e,t){var r=Ue;Ue|=1;try{return e(t)}finally{Ue=r,Ue===0&&(pd=Ht()+500,lb&&Cs())}}function su(e){fs!==null&&fs.tag===0&&(Ue&6)===0&&id();var t=Ue;Ue|=1;var r=lo.transition,n=Xe;try{if(lo.transition=null,Xe=1,e)return e()}finally{Xe=n,lo.transition=r,Ue=t,(Ue&6)===0&&Cs()}}function MP(){Nn=ed.current,xt(ed)}function tu(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Tre(r)),Xt!==null)for(r=Xt.return;r!==null;){var n=r;switch(pP(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Uv();break;case 3:dd(),xt(gn),xt(zr),SP();break;case 5:wP(n);break;case 4:dd();break;case 13:xt(At);break;case 19:xt(At);break;case 10:yP(n.type._context);break;case 22:case 23:MP()}r=r.return}if(yr=e,Xt=e=bs(e.current,null),Ir=Nn=t,sr=0,Wm=null,EP=fb=iu=0,mn=Pm=null,Ql!==null){for(t=0;t<Ql.length;t++)if(r=Ql[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,a=r.pending;if(a!==null){var i=a.next;a.next=o,n.next=i}r.pending=n}Ql=null}return e}function kj(e,t){do{var r=Xt;try{if(gP(),Tv.current=Xv,Jv){for(var n=Rt.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Jv=!1}if(au=0,gr=ir=Rt=null,_m=!1,Vm=0,LP.current=null,r===null||r.return===null){sr=1,Wm=t,Xt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=Ir,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if((c.mode&1)===0&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=bF(i);if(p!==null){p.flags&=-257,wF(p,i,s,a,t),p.mode&1&&vF(a,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var h=new Set;h.add(l),t.updateQueue=h}else m.add(l);break e}else{if((t&1)===0){vF(a,u,t),$P();break e}l=Error(G(426))}}else if(kt&&s.mode&1){var v=bF(i);if(v!==null){(v.flags&65536)===0&&(v.flags|=256),wF(v,i,s,a,t),mP(fd(l,s));break e}}a=l=fd(l,s),sr!==4&&(sr=2),Pm===null?Pm=[a]:Pm.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var g=sj(a,l,t);pF(a,g);break e;case 1:s=l;var y=a.type,x=a.stateNode;if((a.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(xs===null||!xs.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=lj(a,s,t);pF(a,b);break e}}a=a.return}while(a!==null)}Tj(r)}catch(_){t=_,Xt===r&&r!==null&&(Xt=r=r.return);continue}break}while(!0)}function Cj(){var e=Yv.current;return Yv.current=Xv,e===null?Xv:e}function $P(){(sr===0||sr===3||sr===2)&&(sr=4),yr===null||(iu&268435455)===0&&(fb&268435455)===0||cs(yr,Ir)}function tb(e,t){var r=Ue;Ue|=2;var n=Cj();(yr!==e||Ir!==t)&&(ri=null,tu(e,t));do try{Yre();break}catch(o){kj(e,o)}while(!0);if(gP(),Ue=r,Yv.current=n,Xt!==null)throw Error(G(261));return yr=null,Ir=0,sr}function Yre(){for(;Xt!==null;)_j(Xt)}function Qre(){for(;Xt!==null&&!_te();)_j(Xt)}function _j(e){var t=Lj(e.alternate,e,Nn);e.memoizedProps=e.pendingProps,t===null?Tj(e):Xt=t,LP.current=null}function Tj(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Hre(r,t,Nn),r!==null){Xt=r;return}}else{if(r=Wre(r,t),r!==null){r.flags&=32767,Xt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{sr=6,Xt=null;return}}if(t=t.sibling,t!==null){Xt=t;return}Xt=t=e}while(t!==null);sr===0&&(sr=5)}function Xl(e,t,r){var n=Xe,o=lo.transition;try{lo.transition=null,Xe=1,ene(e,t,r,n)}finally{lo.transition=o,Xe=n}return null}function ene(e,t,r,n){do id();while(fs!==null);if((Ue&6)!==0)throw Error(G(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(Ote(e,a),e===yr&&(Xt=yr=null,Ir=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Sv||(Sv=!0,Ej(Ov,function(){return id(),null})),a=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||a){a=lo.transition,lo.transition=null;var i=Xe;Xe=1;var s=Ue;Ue|=4,LP.current=null,Gre(e,r),wj(r,e),Sre(_T),zv=!!CT,_T=CT=null,e.current=r,Kre(r,e,o),Tte(),Ue=s,Xe=i,lo.transition=a}else e.current=r;if(Sv&&(Sv=!1,fs=e,eb=o),a=e.pendingLanes,a===0&&(xs=null),Ete(r.stateNode,n),xn(e,Ht()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(Qv)throw Qv=!1,e=WT,WT=null,e;return(eb&1)!==0&&e.tag!==0&&id(),a=e.pendingLanes,(a&1)!==0?e===ZT?Lm++:(Lm=0,ZT=e):Lm=0,Cs(),null}function id(){if(fs!==null){var e=sB(eb),t=lo.transition,r=Xe;try{if(lo.transition=null,Xe=16>e?16:e,fs===null)var n=!1;else{if(e=fs,fs=null,eb=0,(Ue&6)!==0)throw Error(G(331));var o=Ue;for(Ue|=4,ce=e.current;ce!==null;){var a=ce,i=a.child;if((ce.flags&16)!==0){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(ce=u;ce!==null;){var c=ce;switch(c.tag){case 0:case 11:case 15:Tm(8,c,a)}var d=c.child;if(d!==null)d.return=c,ce=d;else for(;ce!==null;){c=ce;var f=c.sibling,p=c.return;if(xj(c),c===u){ce=null;break}if(f!==null){f.return=p,ce=f;break}ce=p}}}var m=a.alternate;if(m!==null){var h=m.child;if(h!==null){m.child=null;do{var v=h.sibling;h.sibling=null,h=v}while(h!==null)}}ce=a}}if((a.subtreeFlags&2064)!==0&&i!==null)i.return=a,ce=i;else e:for(;ce!==null;){if(a=ce,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:Tm(9,a,a.return)}var g=a.sibling;if(g!==null){g.return=a.return,ce=g;break e}ce=a.return}}var y=e.current;for(ce=y;ce!==null;){i=ce;var x=i.child;if((i.subtreeFlags&2064)!==0&&x!==null)x.return=i,ce=x;else e:for(i=y;ce!==null;){if(s=ce,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:db(9,s)}}catch(_){Bt(s,s.return,_)}if(s===i){ce=null;break e}var b=s.sibling;if(b!==null){b.return=s.return,ce=b;break e}ce=s.return}}if(Ue=o,Cs(),ba&&typeof ba.onPostCommitFiberRoot=="function")try{ba.onPostCommitFiberRoot(nb,e)}catch{}n=!0}return n}finally{Xe=r,lo.transition=t}}return!1}function $F(e,t,r){t=fd(r,t),t=sj(e,t,1),e=ys(e,t,1),t=Kr(),e!==null&&(Zm(e,1,t),xn(e,t))}function Bt(e,t,r){if(e.tag===3)$F(e,e,r);else for(;t!==null;){if(t.tag===3){$F(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(xs===null||!xs.has(n))){e=fd(r,e),e=lj(t,e,1),t=ys(t,e,1),e=Kr(),t!==null&&(Zm(t,1,e),xn(t,e));break}}t=t.return}}function tne(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Kr(),e.pingedLanes|=e.suspendedLanes&r,yr===e&&(Ir&r)===r&&(sr===4||sr===3&&(Ir&130023424)===Ir&&500>Ht()-AP?tu(e,0):EP|=r),xn(e,t)}function Pj(e,t){t===0&&((e.mode&1)===0?t=1:(t=lv,lv<<=1,(lv&130023424)===0&&(lv=4194304)));var r=Kr();e=ui(e,t),e!==null&&(Zm(e,t,r),xn(e,r))}function rne(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Pj(e,r)}function nne(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(G(314))}n!==null&&n.delete(t),Pj(e,r)}var Lj;Lj=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)hn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return hn=!1,qre(e,t,r);hn=(e.flags&131072)!==0}else hn=!1,kt&&(t.flags&1048576)!==0&&MB(t,Hv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Lv(e,t),e=t.pendingProps;var o=ld(t,zr.current);ad(t,r),o=kP(null,t,n,e,o,r);var a=CP();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(a=!0,Vv(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,vP(t),o.updater=cb,t.stateNode=o,o._reactInternals=t,DT(t,n,e,r),t=zT(null,t,n,!0,a,r)):(t.tag=0,kt&&a&&fP(t),Gr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Lv(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=ane(n),e=zo(n,e),o){case 0:t=NT(null,t,n,e,r);break e;case 1:t=kF(null,t,n,e,r);break e;case 11:t=SF(null,t,n,e,r);break e;case 14:t=IF(null,t,n,zo(n.type,e),r);break e}throw Error(G(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:zo(n,o),NT(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:zo(n,o),kF(e,t,n,o,r);case 3:e:{if(fj(t),e===null)throw Error(G(387));n=t.pendingProps,a=t.memoizedState,o=a.element,FB(e,t),Gv(t,n,null,r);var i=t.memoizedState;if(n=i.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=fd(Error(G(423)),t),t=CF(e,t,n,r,o);break e}else if(n!==o){o=fd(Error(G(424)),t),t=CF(e,t,n,r,o);break e}else for(zn=gs(t.stateNode.containerInfo.firstChild),Fn=t,kt=!0,Bo=null,r=NB(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ud(),n===o){t=ci(e,t,r);break e}Gr(e,t,n,r)}t=t.child}return t;case 5:return BB(t),e===null&&RT(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,TT(n,o)?i=null:a!==null&&TT(n,a)&&(t.flags|=32),dj(e,t),Gr(e,t,i,r),t.child;case 6:return e===null&&RT(t),null;case 13:return pj(e,t,r);case 4:return bP(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=cd(t,null,n,r):Gr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:zo(n,o),SF(e,t,n,o,r);case 7:return Gr(e,t,t.pendingProps,r),t.child;case 8:return Gr(e,t,t.pendingProps.children,r),t.child;case 12:return Gr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,mt(Wv,n._currentValue),n._currentValue=i,a!==null)if(Vo(a.value,i)){if(a.children===o.children&&!gn.current){t=ci(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=ii(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),MT(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(G(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),MT(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Gr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,ad(t,r),o=uo(o),n=n(o),t.flags|=1,Gr(e,t,n,r),t.child;case 14:return n=t.type,o=zo(n,t.pendingProps),o=zo(n.type,o),IF(e,t,n,o,r);case 15:return uj(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:zo(n,o),Lv(e,t),t.tag=1,yn(n)?(e=!0,Vv(t)):e=!1,ad(t,r),ij(t,n,o),DT(t,n,o,r),zT(null,t,n,!0,e,r);case 19:return mj(e,t,r);case 22:return cj(e,t,r)}throw Error(G(156,t.tag))};function Ej(e,t){return nB(e,t)}function one(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function so(e,t,r,n){return new one(e,t,r,n)}function DP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ane(e){if(typeof e=="function")return DP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===eP)return 11;if(e===tP)return 14}return 2}function bs(e,t){var r=e.alternate;return r===null?(r=so(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Rv(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")DP(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case qc:return ru(r.children,o,a,t);case QT:i=8,o|=8;break;case aT:return e=so(12,r,t,o|2),e.elementType=aT,e.lanes=a,e;case iT:return e=so(13,r,t,o),e.elementType=iT,e.lanes=a,e;case sT:return e=so(19,r,t,o),e.elementType=sT,e.lanes=a,e;case BF:return pb(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zF:i=10;break e;case FF:i=9;break e;case eP:i=11;break e;case tP:i=14;break e;case ss:i=16,n=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=so(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function ru(e,t,r,n){return e=so(7,e,n,t),e.lanes=r,e}function pb(e,t,r,n){return e=so(22,e,n,t),e.elementType=BF,e.lanes=r,e.stateNode={isHidden:!1},e}function rT(e,t,r){return e=so(6,e,null,t),e.lanes=r,e}function nT(e,t,r){return t=so(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ine(e,t,r,n,o){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=B0(0),this.expirationTimes=B0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=B0(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function OP(e,t,r,n,o,a,i,s,l){return e=new ine(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=so(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vP(a),e}function sne(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Aj(e){if(!e)return Ss;e=e._reactInternals;e:{if(uu(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var r=e.type;if(yn(r))return AB(e,r,t)}return t}function Rj(e,t,r,n,o,a,i,s,l){return e=OP(r,n,!0,e,o,a,i,s,l),e.context=Aj(null),r=e.current,n=Kr(),o=vs(r),a=ii(n,o),a.callback=t??null,ys(r,a,o),e.current.lanes=o,Zm(e,o,n),xn(e,n),e}function mb(e,t,r,n){var o=t.current,a=Kr(),i=vs(o);return r=Aj(r),t.context===null?t.context=r:t.pendingContext=r,t=ii(a,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ys(o,t,i),e!==null&&(Uo(e,o,i,a),_v(e,o,i)),i}function rb(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function DF(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function NP(e,t){DF(e,t),(e=e.alternate)&&DF(e,t)}function lne(){return null}var Mj=typeof reportError=="function"?reportError:function(e){console.error(e)};function zP(e){this._internalRoot=e}hb.prototype.render=zP.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));mb(e,t,null,null)};hb.prototype.unmount=zP.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;su(function(){mb(null,e,null,null)}),t[li]=null}};function hb(e){this._internalRoot=e}hb.prototype.unstable_scheduleHydration=function(e){if(e){var t=cB();e={blockedOn:null,target:e,priority:t};for(var r=0;r<us.length&&t!==0&&t<us[r].priority;r++);us.splice(r,0,e),r===0&&fB(e)}};function FP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function OF(){}function une(e,t,r,n,o){if(o){if(typeof n=="function"){var a=n;n=function(){var u=rb(i);a.call(u)}}var i=Rj(t,n,e,0,null,!1,!1,"",OF);return e._reactRootContainer=i,e[li]=i.current,zm(e.nodeType===8?e.parentNode:e),su(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var u=rb(l);s.call(u)}}var l=OP(e,0,!1,null,null,!1,!1,"",OF);return e._reactRootContainer=l,e[li]=l.current,zm(e.nodeType===8?e.parentNode:e),su(function(){mb(t,l,r,n)}),l}function yb(e,t,r,n,o){var a=r._reactRootContainer;if(a){var i=a;if(typeof o=="function"){var s=o;o=function(){var l=rb(i);s.call(l)}}mb(t,i,e,o)}else i=une(r,t,e,o,n);return rb(i)}lB=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=vm(t.pendingLanes);r!==0&&(oP(t,r|1),xn(t,Ht()),(Ue&6)===0&&(pd=Ht()+500,Cs()))}break;case 13:su(function(){var n=ui(e,1);if(n!==null){var o=Kr();Uo(n,e,1,o)}}),NP(e,1)}};aP=function(e){if(e.tag===13){var t=ui(e,134217728);if(t!==null){var r=Kr();Uo(t,e,134217728,r)}NP(e,134217728)}};uB=function(e){if(e.tag===13){var t=vs(e),r=ui(e,t);if(r!==null){var n=Kr();Uo(r,e,t,n)}NP(e,t)}};cB=function(){return Xe};dB=function(e,t){var r=Xe;try{return Xe=e,t()}finally{Xe=r}};yT=function(e,t,r){switch(t){case"input":if(cT(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=sb(n);if(!o)throw Error(G(90));UF(n),cT(n,o)}}}break;case"textarea":qF(e,r);break;case"select":t=r.value,t!=null&&td(e,!!r.multiple,t,!1)}};XF=RP;YF=su;var cne={usingClientEntryPoint:!1,Events:[Km,Gc,sb,KF,JF,RP]},hm={findFiberByHostInstance:Yl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dne={bundleType:hm.bundleType,version:hm.version,rendererPackageName:hm.rendererPackageName,rendererConfig:hm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:di.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tB(e),e===null?null:e.stateNode},findFiberByHostInstance:hm.findFiberByHostInstance||lne,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(gm=__REACT_DEVTOOLS_GLOBAL_HOOK__,!gm.isDisabled&&gm.supportsFiber))try{nb=gm.inject(dne),ba=gm}catch{}var gm;Un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cne;Un.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!FP(t))throw Error(G(200));return sne(e,t,null,r)};Un.createRoot=function(e,t){if(!FP(e))throw Error(G(299));var r=!1,n="",o=Mj;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=OP(e,1,!1,null,null,r,!1,n,o),e[li]=t.current,zm(e.nodeType===8?e.parentNode:e),new zP(t)};Un.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(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=tB(t),e=e===null?null:e.stateNode,e};Un.flushSync=function(e){return su(e)};Un.hydrate=function(e,t,r){if(!gb(t))throw Error(G(200));return yb(null,e,t,!0,r)};Un.hydrateRoot=function(e,t,r){if(!FP(e))throw Error(G(405));var n=r!=null&&r.hydratedSources||null,o=!1,a="",i=Mj;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=Rj(t,null,e,1,r??null,o,!1,a,i),e[li]=t.current,zm(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new hb(t)};Un.render=function(e,t,r){if(!gb(t))throw Error(G(200));return yb(null,e,t,!1,r)};Un.unmountComponentAtNode=function(e){if(!gb(e))throw Error(G(40));return e._reactRootContainer?(su(function(){yb(null,null,e,!1,function(){e._reactRootContainer=null,e[li]=null})}),!0):!1};Un.unstable_batchedUpdates=RP;Un.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!gb(r))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return yb(e,t,r,!1,n)};Un.version="18.3.1-next-f1338f8080-20240426"});var cu=Ft((jCe,Oj)=>{"use strict";function Dj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dj)}catch(e){console.error(e)}}Dj(),Oj.exports=$j()});var zj=Ft(BP=>{"use strict";var Nj=cu();BP.createRoot=Nj.createRoot,BP.hydrateRoot=Nj.hydrateRoot;var UCe});var jj=Ft(bb=>{"use strict";var fne=A(),pne=Symbol.for("react.element"),mne=Symbol.for("react.fragment"),hne=Object.prototype.hasOwnProperty,gne=fne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yne={key:!0,ref:!0,__self:!0,__source:!0};function Bj(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)hne.call(t,n)&&!yne.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:pne,type:e,key:a,ref:i,props:o,_owner:gne.current}}bb.Fragment=mne;bb.jsx=Bj;bb.jsxs=Bj});var D=Ft((n_e,Uj)=>{"use strict";Uj.exports=jj()});var UP=Ft((g_e,vd)=>{"use strict";var kne=typeof Buffer<"u",Hj=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Wj=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Zj(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),kne&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let o=r&&r.protoAction||"error",a=r&&r.constructorAction||"error";if(o==="ignore"&&a==="ignore")return n;if(o!=="ignore"&&a!=="ignore"){if(Hj.test(e)===!1&&Wj.test(e)===!1)return n}else if(o!=="ignore"&&a==="ignore"){if(Hj.test(e)===!1)return n}else if(Wj.test(e)===!1)return n;return Gj(n,{protoAction:o,constructorAction:a,safe:r&&r.safe})}function Gj(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let o=[e];for(;o.length;){let a=o;o=[];for(let i of a){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(i,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete i.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor!==null&&typeof i.constructor=="object"&&Object.prototype.hasOwnProperty.call(i.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete i.constructor}for(let s in i){let l=i[s];l&&typeof l=="object"&&o.push(l)}}}return e}function jP(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return Zj(e,t,r)}finally{Error.stackTraceLimit=n}}function Cne(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return Zj(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}vd.exports=jP;vd.exports.default=jP;vd.exports.parse=jP;vd.exports.safeParse=Cne;vd.exports.scan=Gj});var sZ=Ft((Tqe,iZ)=>{"use strict";function cme(e,t){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let r,n=0;return function(...a){clearTimeout(r);let i=Date.now(),s=i-n,l=t-s;l<=0?(n=i,e.apply(this,a)):r=setTimeout(()=>{n=Date.now(),e.apply(this,a)},l)}}iZ.exports=cme});function Nk(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var zk=r2(()=>{"use strict"});var $Z=Ft(tt=>{"use strict";var br=typeof Symbol=="function"&&Symbol.for,ID=br?Symbol.for("react.element"):60103,kD=br?Symbol.for("react.portal"):60106,Bk=br?Symbol.for("react.fragment"):60107,jk=br?Symbol.for("react.strict_mode"):60108,Uk=br?Symbol.for("react.profiler"):60114,Vk=br?Symbol.for("react.provider"):60109,qk=br?Symbol.for("react.context"):60110,CD=br?Symbol.for("react.async_mode"):60111,Hk=br?Symbol.for("react.concurrent_mode"):60111,Wk=br?Symbol.for("react.forward_ref"):60112,Zk=br?Symbol.for("react.suspense"):60113,Pme=br?Symbol.for("react.suspense_list"):60120,Gk=br?Symbol.for("react.memo"):60115,Kk=br?Symbol.for("react.lazy"):60116,Lme=br?Symbol.for("react.block"):60121,Eme=br?Symbol.for("react.fundamental"):60117,Ame=br?Symbol.for("react.responder"):60118,Rme=br?Symbol.for("react.scope"):60119;function Xn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ID:switch(e=e.type,e){case CD:case Hk:case Bk:case Uk:case jk:case Zk:return e;default:switch(e=e&&e.$$typeof,e){case qk:case Wk:case Kk:case Gk:case Vk:return e;default:return t}}case kD:return t}}}function MZ(e){return Xn(e)===Hk}tt.AsyncMode=CD;tt.ConcurrentMode=Hk;tt.ContextConsumer=qk;tt.ContextProvider=Vk;tt.Element=ID;tt.ForwardRef=Wk;tt.Fragment=Bk;tt.Lazy=Kk;tt.Memo=Gk;tt.Portal=kD;tt.Profiler=Uk;tt.StrictMode=jk;tt.Suspense=Zk;tt.isAsyncMode=function(e){return MZ(e)||Xn(e)===CD};tt.isConcurrentMode=MZ;tt.isContextConsumer=function(e){return Xn(e)===qk};tt.isContextProvider=function(e){return Xn(e)===Vk};tt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ID};tt.isForwardRef=function(e){return Xn(e)===Wk};tt.isFragment=function(e){return Xn(e)===Bk};tt.isLazy=function(e){return Xn(e)===Kk};tt.isMemo=function(e){return Xn(e)===Gk};tt.isPortal=function(e){return Xn(e)===kD};tt.isProfiler=function(e){return Xn(e)===Uk};tt.isStrictMode=function(e){return Xn(e)===jk};tt.isSuspense=function(e){return Xn(e)===Zk};tt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Bk||e===Hk||e===Uk||e===jk||e===Zk||e===Pme||typeof e=="object"&&e!==null&&(e.$$typeof===Kk||e.$$typeof===Gk||e.$$typeof===Vk||e.$$typeof===qk||e.$$typeof===Wk||e.$$typeof===Eme||e.$$typeof===Ame||e.$$typeof===Rme||e.$$typeof===Lme)};tt.typeOf=Xn});var OZ=Ft((pHe,DZ)=>{"use strict";DZ.exports=$Z()});var VZ=Ft((mHe,UZ)=>{"use strict";var _D=OZ(),Mme={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},$me={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Dme={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},BZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TD={};TD[_D.ForwardRef]=Dme;TD[_D.Memo]=BZ;function NZ(e){return _D.isMemo(e)?BZ:TD[e.$$typeof]||Mme}var Ome=Object.defineProperty,Nme=Object.getOwnPropertyNames,zZ=Object.getOwnPropertySymbols,zme=Object.getOwnPropertyDescriptor,Fme=Object.getPrototypeOf,FZ=Object.prototype;function jZ(e,t,r){if(typeof t!="string"){if(FZ){var n=Fme(t);n&&n!==FZ&&jZ(e,n,r)}var o=Nme(t);zZ&&(o=o.concat(zZ(t)));for(var a=NZ(e),i=NZ(t),s=0;s<o.length;++s){var l=o[s];if(!$me[l]&&!(r&&r[l])&&!(i&&i[l])&&!(a&&a[l])){var u=zme(t,l);try{Ome(e,l,u)}catch{}}}}return e}UZ.exports=jZ});var mG=Ft((Z5e,pG)=>{"use strict";var uG=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,she=/\n/g,lhe=/^\s*/,uhe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,che=/^:\s*/,dhe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,fhe=/^[;\s]*/,phe=/^\s+|\s+$/g,mhe=`
|
|
10
|
+
`,cG="/",dG="*",Yu="",hhe="comment",ghe="declaration";function yhe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function o(m){var h=m.match(she);h&&(r+=h.length);var v=m.lastIndexOf(mhe);n=~v?m.length-v:n+m.length}function a(){var m={line:r,column:n};return function(h){return h.position=new i(m),u(),h}}function i(m){this.start=m,this.end={line:r,column:n},this.source=t.source}i.prototype.content=e;function s(m){var h=new Error(t.source+":"+r+":"+n+": "+m);if(h.reason=m,h.filename=t.source,h.line=r,h.column=n,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var v=h[0];return o(v),e=e.slice(v.length),h}}function u(){l(lhe)}function c(m){var h;for(m=m||[];h=d();)h!==!1&&m.push(h);return m}function d(){var m=a();if(!(cG!=e.charAt(0)||dG!=e.charAt(1))){for(var h=2;Yu!=e.charAt(h)&&(dG!=e.charAt(h)||cG!=e.charAt(h+1));)++h;if(h+=2,Yu===e.charAt(h-1))return s("End of comment missing");var v=e.slice(2,h-2);return n+=2,o(v),e=e.slice(h),n+=2,m({type:hhe,comment:v})}}function f(){var m=a(),h=l(uhe);if(h){if(d(),!l(che))return s("property missing ':'");var v=l(dhe),g=m({type:ghe,property:fG(h[0].replace(uG,Yu)),value:v?fG(v[0].replace(uG,Yu)):Yu});return l(fhe),g}}function p(){var m=[];c(m);for(var h;h=f();)h!==!1&&(m.push(h),c(m));return m}return u(),p()}function fG(e){return e?e.replace(phe,Yu):Yu}pG.exports=yhe});var hG=Ft(hy=>{"use strict";var xhe=hy&&hy.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hy,"__esModule",{value:!0});hy.default=bhe;var vhe=xhe(mG());function bhe(e,t){let r=null;if(!e||typeof e!="string")return r;let n=(0,vhe.default)(e),o=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;let{property:i,value:s}=a;o?t(i,s,a):s&&(r=r||{},r[i]=s)}),r}});var yG=Ft(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.camelCase=void 0;var whe=/^--[a-zA-Z0-9_-]+$/,She=/-([a-z])/g,Ihe=/^[^-]+$/,khe=/^-(webkit|moz|ms|o|khtml)-/,Che=/^-(ms)-/,_he=function(e){return!e||Ihe.test(e)||whe.test(e)},The=function(e,t){return t.toUpperCase()},gG=function(e,t){return"".concat(t,"-")},Phe=function(e,t){return t===void 0&&(t={}),_he(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Che,gG):e=e.replace(khe,gG),e.replace(She,The))};oC.camelCase=Phe});var vG=Ft((UD,xG)=>{"use strict";var Lhe=UD&&UD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ehe=Lhe(hG()),Ahe=yG();function jD(e,t){var r={};return!e||typeof e!="string"||(0,Ehe.default)(e,function(n,o){n&&o&&(r[(0,Ahe.camelCase)(n,t)]=o)}),r}jD.default=jD;xG.exports=jD});var V8=Ft((I7e,U8)=>{"use strict";var PC=Object.prototype.hasOwnProperty,j8=Object.prototype.toString,D8=Object.defineProperty,O8=Object.getOwnPropertyDescriptor,N8=function(t){return typeof Array.isArray=="function"?Array.isArray(t):j8.call(t)==="[object Array]"},z8=function(t){if(!t||j8.call(t)!=="[object Object]")return!1;var r=PC.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&PC.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var o;for(o in t);return typeof o>"u"||PC.call(t,o)},F8=function(t,r){D8&&r.name==="__proto__"?D8(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},B8=function(t,r){if(r==="__proto__")if(PC.call(t,r)){if(O8)return O8(t,r).value}else return;return t[r]};U8.exports=function e(){var t,r,n,o,a,i,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(r in t)n=B8(s,r),o=B8(t,r),s!==o&&(c&&o&&(z8(o)||(a=N8(o)))?(a?(a=!1,i=n&&N8(n)?n:[]):i=n&&z8(n)?n:{},F8(s,{name:r,newValue:e(c,i,o)})):typeof o<"u"&&F8(s,{name:r,newValue:o}));return s}});var jK={};Et(jK,{default:()=>xN});var Iwe,xN,qC=r2(()=>{"use strict";zk();Iwe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xN=Nk(function(e){return Iwe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})});var NQ=Ft(OQ=>{"use strict";var Yp=A();function vke(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bke=typeof Object.is=="function"?Object.is:vke,wke=Yp.useState,Ske=Yp.useEffect,Ike=Yp.useLayoutEffect,kke=Yp.useDebugValue;function Cke(e,t){var r=t(),n=wke({inst:{value:r,getSnapshot:t}}),o=n[0].inst,a=n[1];return Ike(function(){o.value=r,o.getSnapshot=t,Bz(o)&&a({inst:o})},[e,r,t]),Ske(function(){return Bz(o)&&a({inst:o}),e(function(){Bz(o)&&a({inst:o})})},[e]),kke(r),r}function Bz(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!bke(e,r)}catch{return!0}}function _ke(e,t){return t()}var Tke=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_ke:Cke;OQ.useSyncExternalStore=Yp.useSyncExternalStore!==void 0?Yp.useSyncExternalStore:Tke});var FQ=Ft((rvt,zQ)=>{"use strict";zQ.exports=NQ()});var Vz=Ft((Evt,x0)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(o=n(o,r(i)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var i in o)e.call(o,i)&&o[i]&&(a=n(a,i));return a}function n(o,a){return a?o?o+" "+a:o+a:o}typeof x0<"u"&&x0.exports?(t.default=t,x0.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var $Ce={};Et($Ce,{default:()=>MCe});var Gz=S(A(),1),Dee=S(zj(),1);var xb=class{constructor(){this.listeners=new Map}on(t,r){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r),()=>this.off(t,r)}off(t,r){this.listeners.get(t)?.delete(r)}emit(t,r){this.listeners.get(t)?.forEach(n=>{try{n(r)}catch(o){console.error(`Error in ${String(t)} handler:`,o)}})}clear(){this.listeners.clear()}removeAllListeners(t){t?this.listeners.delete(t):this.listeners.clear()}};var vb=class{constructor(t){this.config={baseUrl:"http://localhost:3000",userId:"",debug:!1,assistantId:t.apiKey,...t}}async createSession(){return await this.request("/sessions",{method:"POST",body:JSON.stringify({assistantId:this.config.apiKey,userId:this.config.userId})})}async sendMessage(t,r){return await this.request(`/sessions/${t}/messages`,{method:"POST",body:JSON.stringify({content:r})})}async getHistory(t){return this.request(`/sessions/${t}/messages`)}async getSessions(){return this.request("/sessions")}async getArtifacts(){return this.request("/artifacts")}async getArtifact(t){return this.request(`/artifacts/${t}`)}async createArtifact(t){return this.request("/artifacts",{method:"POST",body:JSON.stringify(t)})}async request(t,r={}){let n=`${this.config.baseUrl}${t}`;this.log("Request:",n,r);let o=await fetch(n,{...r,headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,...r.headers}});if(!o.ok){let a=await o.json().catch(()=>({}));throw new Error(a.message||`HTTP ${o.status}`)}return o.json()}log(...t){this.config.debug&&console.log("[CourseAI]",...t)}};var du=class{constructor(t){this.state={status:"idle"};this.events=new xb;this.config=t,this.api=new vb(t)}async initialize(){if(this.state.status!=="idle")throw new Error("Widget already initialized");this.setState({status:"initializing"});try{let t=await this.api.createSession();this.setState({status:"ready",session:t}),this.events.emit("session:created",{session:t})}catch(t){let r={code:"INIT_FAILED",message:t instanceof Error?t.message:"Unknown error",details:t};throw this.setState({status:"error",error:r}),this.events.emit("error",{error:r}),t}}async sendMessage(t){if(this.state.status!=="ready")throw new Error("Widget not ready. Call initialize() first.");let r={id:crypto.randomUUID(),role:"user",content:t,timestamp:Date.now()},n={...this.state.session,messages:[...this.state.session.messages,r]};this.setState({status:"ready",session:n}),this.events.emit("message:sent",{message:r}),this.setState({status:"loading"});try{let o=await this.api.sendMessage(n.id,t),a={...n,messages:[...n.messages,o]};return this.setState({status:"ready",session:a}),this.events.emit("message:received",{message:o}),o}catch(o){let a={code:"SEND_MESSAGE_FAILED",message:o instanceof Error?o.message:"Failed to send message",details:o};throw this.setState({status:"ready",session:n}),this.events.emit("error",{error:a}),o}}getState(){return this.state}getAPI(){return this.api}getConfig(){return this.config}on(t,r){return this.events.on(t,r)}off(t,r){this.events.off(t,r)}destroy(){this.events.clear(),this.setState({status:"idle"})}setState(t){let r=this.state;this.state=t,this.events.emit("state:change",{previous:r,current:t})}};var Rr=S(A(),1);var Md=S(A(),1);var Fj=e=>Array.from(e).map(r=>r.getModelContext()).sort((r,n)=>(n.priority??0)-(r.priority??0)).reduce((r,n)=>{if(n.system&&(r.system?r.system+=`
|
|
11
|
+
|
|
12
|
+
${n.system}`:r.system=n.system),n.tools)for(let[o,a]of Object.entries(n.tools)){let i=r.tools?.[o];if(i&&i!==a)throw new Error(`You tried to define a tool with the name ${o}, but it already exists.`);r.tools||(r.tools={}),r.tools[o]=a}return n.config&&(r.config={...r.config,...n.config}),n.callSettings&&(r.callSettings={...r.callSettings,...n.callSettings}),r},{});var _s=class{constructor(){P(this,"_providers",new Set);P(this,"_subscribers",new Set)}getModelContext(){return Fj(this._providers)}registerModelContextProvider(t){this._providers.add(t);let r=t.subscribe?.(()=>{this.notifySubscribers()});return this.notifySubscribers(),()=>{this._providers.delete(t),r?.(),this.notifySubscribers()}}notifySubscribers(){for(let t of this._subscribers)t()}subscribe(t){return this._subscribers.add(t),()=>this._subscribers.delete(t)}};var Ts=class{constructor(){P(this,"_contextProvider",new _s)}registerModelContextProvider(t){return this._contextProvider.registerModelContextProvider(t)}getModelContextProvider(){return this._contextProvider}};var EL=S(D(),1);var zs={};Et(zs,{AssistantRuntimeImpl:()=>As,BaseAssistantRuntimeCore:()=>Ts,CompositeContextProvider:()=>_s,DefaultThreadComposerRuntimeCore:()=>yd,MessageRepository:()=>Es,ThreadRuntimeImpl:()=>kd,fromThreadMessageLike:()=>fo,generateId:()=>fi,getAutoStatus:()=>pi,splitLocalRuntimeOptions:()=>pU,useSmooth:()=>_w,useSmoothStatus:()=>yU,useToolInvocations:()=>p4,withSmoothContextProvider:()=>hU});var Sa=class{constructor(){P(this,"_subscribers",new Set)}subscribe(t){return this._subscribers.add(t),()=>this._subscribers.delete(t)}waitForUpdate(){return new Promise(t=>{let r=this.subscribe(()=>{r(),t()})})}_notifySubscribers(){let t=[];for(let r of this._subscribers)try{r()}catch(n){t.push(n)}if(t.length>0)throw t.length===1?t[0]:new AggregateError(t)}};var xne=e=>e.status.type==="complete",gd=class extends Sa{constructor(){super(...arguments);P(this,"isEditing",!0);P(this,"_attachments",[]);P(this,"_text","");P(this,"_role","user");P(this,"_runConfig",{});P(this,"_eventSubscribers",new Map)}get attachmentAccept(){return this.getAttachmentAdapter()?.accept??"*"}get attachments(){return this._attachments}setAttachments(r){this._attachments=r,this._notifySubscribers()}get isEmpty(){return!this.text.trim()&&!this.attachments.length}get text(){return this._text}get role(){return this._role}get runConfig(){return this._runConfig}setText(r){this._text!==r&&(this._text=r,this._notifySubscribers())}setRole(r){this._role!==r&&(this._role=r,this._notifySubscribers())}setRunConfig(r){this._runConfig!==r&&(this._runConfig=r,this._notifySubscribers())}_emptyTextAndAttachments(){this._attachments=[],this._text="",this._notifySubscribers()}async _onClearAttachments(){let r=this.getAttachmentAdapter();r&&await Promise.all(this._attachments.map(n=>r.remove(n)))}async reset(){if(this._attachments.length===0&&this._text===""&&this._role==="user"&&Object.keys(this._runConfig).length===0)return;this._role="user",this._runConfig={};let r=this._onClearAttachments();this._emptyTextAndAttachments(),await r}async clearAttachments(){let r=this._onClearAttachments();this.setAttachments([]),await r}async send(){let r=this.getAttachmentAdapter(),n=r&&this.attachments.length>0?Promise.all(this.attachments.map(async i=>xne(i)?i:await r.send(i))):[],o=this.text;this._emptyTextAndAttachments();let a={createdAt:new Date,role:this.role,content:o?[{type:"text",text:o}]:[],attachments:await n,runConfig:this.runConfig,metadata:{custom:{}}};this.handleSend(a),this._notifyEventSubscribers("send")}cancel(){this.handleCancel()}async addAttachment(r){let n=this.getAttachmentAdapter();if(!n)throw new Error("Attachments are not supported");let o=i=>{let s=this._attachments.findIndex(l=>l.id===i.id);s!==-1?this._attachments=[...this._attachments.slice(0,s),i,...this._attachments.slice(s+1)]:this._attachments=[...this._attachments,i],this._notifySubscribers()},a=n.add({file:r});if(Symbol.asyncIterator in a)for await(let i of a)o(i);else o(await a);this._notifyEventSubscribers("attachment-add"),this._notifySubscribers()}async removeAttachment(r){let n=this.getAttachmentAdapter();if(!n)throw new Error("Attachments are not supported");let o=this._attachments.findIndex(i=>i.id===r);if(o===-1)throw new Error("Attachment not found");let a=this._attachments[o];await n.remove(a),this._attachments=[...this._attachments.slice(0,o),...this._attachments.slice(o+1)],this._notifySubscribers()}_notifyEventSubscribers(r){let n=this._eventSubscribers.get(r);if(n)for(let o of n)o()}unstable_on(r,n){let o=this._eventSubscribers.get(r);return o?o.add(n):this._eventSubscribers.set(r,new Set([n])),()=>{let a=this._eventSubscribers.get(r);a&&a.delete(n)}}};var yd=class extends gd{constructor(r){super();P(this,"runtime");P(this,"_canCancel",!1);this.runtime=r,this.connect()}get canCancel(){return this._canCancel}get attachments(){return super.attachments}getAttachmentAdapter(){return this.runtime.adapters?.attachments}connect(){return this.runtime.subscribe(()=>{this.canCancel!==this.runtime.capabilities.cancel&&(this._canCancel=this.runtime.capabilities.cancel,this._notifySubscribers())})}async handleSend(r){this.runtime.append({...r,parentId:this.runtime.messages.at(-1)?.id??null,sourceId:null})}async handleCancel(){this.runtime.cancelRun()}};var Vj=(e,t=21)=>(r=t)=>{let n="",o=r|0;for(;o--;)n+=e[Math.random()*e.length|0];return n};var fi=Vj("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7),vne="__optimistic__",qj=()=>`${vne}${fi()}`;var xd=Symbol("autoStatus"),bne=Object.freeze(Object.assign({type:"running"},{[xd]:!0})),wne=Object.freeze(Object.assign({type:"complete",reason:"unknown"},{[xd]:!0})),Sne=Object.freeze(Object.assign({type:"requires-action",reason:"tool-calls"},{[xd]:!0})),Ine=Object.freeze(Object.assign({type:"requires-action",reason:"interrupt"},{[xd]:!0})),wb=e=>e[xd]===!0,pi=(e,t,r,n,o)=>e&&o?Object.assign({type:"incomplete",reason:"error",error:o},{[xd]:!0}):e&&t?bne:r?Ine:n?Sne:wne;var VP=S(UP(),1);function Kj(e){let t=["ROOT"],r=-1,n=null,o=[],a;function i(){a!==void 0&&(o.push(JSON.parse(`"${a}"`)),a=void 0)}function s(d,f,p){switch(d){case'"':{r=f,t.pop(),t.push(p),t.push("INSIDE_STRING"),i();break}case"f":case"t":case"n":{r=f,n=f,t.pop(),t.push(p),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(p),t.push("INSIDE_NUMBER"),i();break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=f,t.pop(),t.push(p),t.push("INSIDE_NUMBER"),i();break}case"{":{r=f,t.pop(),t.push(p),t.push("INSIDE_OBJECT_START"),i();break}case"[":{r=f,t.pop(),t.push(p),t.push("INSIDE_ARRAY_START"),i();break}}}function l(d,f){switch(d){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=f,t.pop(),a=o.pop();break}}}function u(d,f){switch(d){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA"),a=(Number(a)+1).toString();break}case"]":{r=f,t.pop(),a=o.pop();break}}}for(let d=0;d<e.length;d++){let f=e[d];switch(t[t.length-1]){case"ROOT":s(f,d,"FINISH");break;case"INSIDE_OBJECT_START":{switch(f){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY"),a="";break}case"}":{r=d,t.pop(),a=o.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{f==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"),a="");break}case"INSIDE_OBJECT_KEY":{switch(f){case'"':{t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY");break}case"\\":{t.push("INSIDE_STRING_ESCAPE"),a+=f;break}default:{a+=f;break}}break}case"INSIDE_OBJECT_AFTER_KEY":{f===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{s(f,d,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{l(f,d);break}case"INSIDE_STRING":{switch(f){case'"':{t.pop(),r=d,a=o.pop();break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=d}break}case"INSIDE_ARRAY_START":{f==="]"?(r=d,t.pop(),a=o.pop()):(r=d,a="0",s(f,d,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(f){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA"),a=(Number(a)+1).toString();break}case"]":{r=d,t.pop(),a=o.pop();break}default:{r=d;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{s(f,d,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),t[t.length-1]==="INSIDE_STRING"?r=d:t[t.length-1]==="INSIDE_OBJECT_KEY"&&(a+=f);break}case"INSIDE_NUMBER":{switch(f){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=d;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),a=o.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&u(f,d),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&l(f,d);break}case"}":{t.pop(),a=o.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&l(f,d);break}case"]":{t.pop(),a=o.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&u(f,d);break}default:{t.pop(),a=o.pop();break}}break}case"INSIDE_LITERAL":{let m=e.substring(n,d+1);!"false".startsWith(m)&&!"true".startsWith(m)&&!"null".startsWith(m)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?l(f,d):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&u(f,d)):r=d;break}}}let c=e.slice(0,r+1);for(let d=t.length-1;d>=0;d--)switch(t[d]){case"INSIDE_STRING":{c+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{c+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{c+="]";break}case"INSIDE_LITERAL":{let p=e.substring(n,e.length);"true".startsWith(p)?c+="true".slice(p.length):"false".startsWith(p)?c+="false".slice(p.length):"null".startsWith(p)&&(c+="null".slice(p.length))}}return[c,o]}var Sb=Symbol("aui.parse-partial-json-object.meta"),_ne=e=>e?.[Sb],Ps=e=>{if(e.length===0)return{[Sb]:{state:"partial",partialPath:[]}};try{let t=VP.default.parse(e);if(typeof t!="object"||t===null)throw new Error("argsText is expected to be an object");return t[Sb]={state:"complete",partialPath:[]},t}catch{try{let[t,r]=Kj(e),n=VP.default.parse(t);if(typeof n!="object"||n===null)throw new Error("argsText is expected to be an object");return n[Sb]={state:"partial",partialPath:r},n}catch{return}}},Jj=(e,t,r)=>{if(typeof e!="object"||e===null)return t.state;if(t.state==="complete")return"complete";if(r.length===0)return t.state;let[n,...o]=r;if(!Object.prototype.hasOwnProperty.call(e,n))return"partial";let[a,...i]=t.partialPath;if(n!==a)return"complete";let s=e[n];return Jj(s,{state:"partial",partialPath:i},o)},Ls=(e,t)=>{let r=_ne(e);if(!r)throw new Error("unable to determine object state");return Jj(e,r,t.map(String))};async function*Tne(){let e=this.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;yield r}}finally{e.releaseLock()}}function Xm(e){var t;return e[t=Symbol.asyncIterator]??(e[t]=Tne),e}var Ym={toResponse(e,t){return new Response(Ym.toByteStream(e,t),{headers:t.headers??{}})},fromResponse(e,t){return Ym.fromByteStream(e.body,t)},toByteStream(e,t){return e.pipeThrough(t)},fromByteStream(e,t){return e.pipeThrough(t)}};var bd=function(){let e,t,r=new Promise((n,o)=>{e=n,t=o});if(!e||!t)throw new Error("Failed to create promise");return{promise:r,resolve:e,reject:t}};var Xj=()=>{let e=[],t=!1,r,n,o=i=>{i.promise||(i.promise=i.reader.read().then(({done:s,value:l})=>{i.promise=void 0,s?(e.splice(e.indexOf(i),1),t&&e.length===0&&r.close()):r.enqueue(l),n?.resolve(),n=void 0}).catch(s=>{console.error(s),e.forEach(l=>{l.reader.cancel()}),e.length=0,r.error(s),n?.reject(s),n=void 0}))};return{readable:new ReadableStream({start(i){r=i},pull(){return n=bd(),e.forEach(i=>{o(i)}),n.promise},cancel(){e.forEach(i=>{i.reader.cancel()}),e.length=0}}),isSealed(){return t},seal(){t=!0,e.length===0&&r.close()},addStream(i){if(t)throw new Error("Cannot add streams after the run callback has settled.");let s={reader:i.getReader()};e.push(s),o(s)},enqueue(i){this.addStream(new ReadableStream({start(s){s.enqueue(i),s.close()}}))}}};var Ib=class{constructor(t){P(this,"_controller");P(this,"_isClosed",!1);this._controller=t}append(t){return this._controller.enqueue({type:"text-delta",path:[],textDelta:t}),this}close(){this._isClosed||(this._isClosed=!0,this._controller.enqueue({type:"part-finish",path:[]}),this._controller.close())}},qP=e=>new ReadableStream({start(t){return e.start?.(new Ib(t))},pull(t){return e.pull?.(new Ib(t))},cancel(t){return e.cancel?.(t)}}),HP=()=>{let e;return[qP({start(r){e=r}}),e]};var kb=class{constructor(t){P(this,"_controller");P(this,"_isClosed",!1);P(this,"_mergeTask");P(this,"_argsTextController");this._controller=t;let r=qP({start:o=>{this._argsTextController=o}}),n=!1;this._mergeTask=r.pipeTo(new WritableStream({write:o=>{switch(o.type){case"text-delta":n=!0,this._controller.enqueue(o);break;case"part-finish":n||this._controller.enqueue({type:"text-delta",textDelta:"{}",path:[]}),this._controller.enqueue({type:"tool-call-args-text-finish",path:[]});break;default:throw new Error(`Unexpected chunk type: ${o.type}`)}}}))}get argsText(){return this._argsTextController}async setResponse(t){this._argsTextController.close(),await Promise.resolve(),this._controller.enqueue({type:"result",path:[],...t.artifact!==void 0?{artifact:t.artifact}:{},result:t.result,isError:t.isError??!1})}async close(){this._isClosed||(this._isClosed=!0,this._argsTextController.close(),await this._mergeTask,this._controller.enqueue({type:"part-finish",path:[]}),this._controller.close())}},Pne=e=>new ReadableStream({start(t){return e.start?.(new kb(t))},pull(t){return e.pull?.(new kb(t))},cancel(t){return e.cancel?.(t)}}),Yj=()=>{let e;return[Pne({start(r){e=r}}),e]};var wd=class{constructor(){P(this,"value",-1)}up(){return++this.value}};var Cb=class extends TransformStream{constructor(t){super({transform(r,n){n.enqueue({...r,path:[t,...r.path]})}})}},Qj=class extends TransformStream{constructor(t){super({transform(r,n){let{path:[o,...a]}=r;if(t!==o)throw new Error(`Path mismatch: expected ${t}, got ${o}`);n.enqueue({...r,path:a})}})}},_b=class extends TransformStream{constructor(t){let r=new wd,n=new Map;super({transform(o,a){o.type==="part-start"&&o.path.length===0&&n.set(r.up(),t.up());let[i,...s]=o.path;if(i===void 0){a.enqueue(o);return}let l=n.get(i);if(l===void 0)throw new Error("Path not found");a.enqueue({...o,path:[l,...s]})}})}};var Sd=class extends TransformStream{constructor(t){super();let r=t(super.readable);Object.defineProperty(this,"readable",{value:r,writable:!1})}};var fu=class extends TransformStream{constructor(){let t=[];super({transform(r,n){if(r.type==="part-start"){if(r.path.length!==0){n.error(new Error("Nested parts are not supported"));return}t.push(r.part),n.enqueue(r);return}if(r.type==="text-delta"||r.type==="result"||r.type==="part-finish"||r.type==="tool-call-args-text-finish"){if(r.path.length!==1){n.error(new Error(`${r.type} chunks must have a path of length 1`));return}let o=r.path[0];if(o<0||o>=t.length){n.error(new Error(`Invalid path index: ${o}`));return}let a=t[o];n.enqueue({...r,meta:a});return}n.enqueue(r)}})}};var e4=(e,t=21)=>(r=t)=>{let n="",o=r|0;for(;o--;)n+=e[Math.random()*e.length|0];return n};var Tb=e4("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);var WP=class e{constructor(t){P(this,"_state");P(this,"_parentId");this._state=t||{merger:Xj(),contentCounter:new wd}}get __internal_isClosed(){return this._state.merger.isSealed()}__internal_getReadable(){return this._state.merger.readable}__internal_subscribeToClose(t){this._state.closeSubscriber=t}_addPart(t,r){this._state.append&&(this._state.append.controller.close(),this._state.append=void 0),this.enqueue({type:"part-start",part:t,path:[]}),this._state.merger.addStream(r.pipeThrough(new Cb(this._state.contentCounter.value)))}merge(t){this._state.merger.addStream(t.pipeThrough(new _b(this._state.contentCounter)))}appendText(t){this._state.append?.kind!=="text"&&(this._state.append={kind:"text",controller:this.addTextPart()}),this._state.append.controller.append(t)}appendReasoning(t){this._state.append?.kind!=="reasoning"&&(this._state.append={kind:"reasoning",controller:this.addReasoningPart()}),this._state.append.controller.append(t)}addTextPart(){let[t,r]=HP();return this._addPart({type:"text"},t),r}addReasoningPart(){let[t,r]=HP();return this._addPart({type:"reasoning"},t),r}addToolCallPart(t){let r=typeof t=="string"?{toolName:t}:t,n=r.toolName,o=r.toolCallId??Tb(),[a,i]=Yj();return this._addPart({type:"tool-call",toolName:n,toolCallId:o,...this._parentId&&{parentId:this._parentId}},a),r.argsText!==void 0&&(i.argsText.append(r.argsText),i.argsText.close()),r.args!==void 0&&(i.argsText.append(JSON.stringify(r.args)),i.argsText.close()),r.response!==void 0&&i.setResponse(r.response),i}appendSource(t){this._addPart({...t,...this._parentId&&{parentId:this._parentId}},new ReadableStream({start(r){r.enqueue({type:"part-finish",path:[]}),r.close()}}))}appendFile(t){this._addPart(t,new ReadableStream({start(r){r.enqueue({type:"part-finish",path:[]}),r.close()}}))}enqueue(t){this._state.merger.enqueue(t),t.type==="part-start"&&t.path.length===0&&this._state.contentCounter.up()}withParentId(t){let r=new e(this._state);return r._parentId=t,r}close(){this._state.append?.controller?.close(),this._state.merger.seal(),this._state.closeSubscriber?.()}};function Pb(e){let t=new WP;return(async()=>{try{await e(t)}catch(n){throw t.__internal_isClosed||t.enqueue({type:"error",path:[],error:String(n)}),n}finally{t.__internal_isClosed||t.close()}})(),t.__internal_getReadable()}function Qm(){let{resolve:e,promise:t}=bd(),r;return[Pb(o=>(r=o,r.__internal_subscribeToClose(e),t)),r]}var Lb=class extends TransformStream{constructor(t,r,n){let[o,a]=Qm(),i;super({start(s){return i=o.pipeTo(new WritableStream({write(l){s.enqueue(l)},abort(l){s.error(l)},close(){s.terminate()}})).catch(l=>{s.error(l)}),t.start?.(a)},transform(s){return t.transform?.(s,a)},async flush(){await t.flush?.(a),a.close(),await i}},r,n)}};var fo=(e,t,r)=>{let{role:n,id:o,createdAt:a,attachments:i,status:s,metadata:l}=e,u={id:o??t,createdAt:a??new Date},c=typeof e.content=="string"?[{type:"text",text:e.content}]:e.content,d=({image:f,...p})=>f.match(/^data:image\/(png|jpeg|jpg|gif|webp);base64,(.*)$/)?{...p,image:f}:(console.warn("Invalid image data format detected"),null);if(n!=="user"&&i?.length)throw new Error("attachments are only supported for user messages");if(n!=="assistant"&&s)throw new Error("status is only supported for assistant messages");if(n!=="assistant"&&l?.steps)throw new Error("metadata.steps is only supported for assistant messages");switch(n){case"assistant":return{...u,role:n,content:c.map(f=>{let p=f.type;switch(p){case"text":case"reasoning":return f.text.trim().length===0?null:f;case"file":case"source":return f;case"image":return d(f);case"data":return f;case"tool-call":{let{parentId:m,messages:h,...v}=f,g={...v,toolCallId:f.toolCallId??`tool-${fi()}`,...m!==void 0&&{parentId:m},...h!==void 0&&{messages:h}};return f.args?{...g,args:f.args,argsText:f.argsText??JSON.stringify(f.args)}:{...g,args:Ps(f.argsText??"")??{},argsText:f.argsText??""}}default:{let m=p;throw new Error(`Unsupported assistant message part type: ${m}`)}}}).filter(f=>!!f),status:s??r,metadata:{unstable_state:l?.unstable_state??null,unstable_annotations:l?.unstable_annotations??[],unstable_data:l?.unstable_data??[],custom:l?.custom??{},steps:l?.steps??[],...l?.submittedFeedback&&{submittedFeedback:l.submittedFeedback}}};case"user":return{...u,role:n,content:c.map(f=>{let p=f.type;switch(p){case"text":case"image":case"audio":case"file":return f;default:{let m=p;throw new Error(`Unsupported user message part type: ${m}`)}}}),attachments:i??[],metadata:{custom:l?.custom??{}}};case"system":if(c.length!==1||c[0].type!=="text")throw new Error("System messages must have exactly one text message part.");return{...u,role:n,content:c,metadata:{custom:l?.custom??{}}};default:{let f=n;throw new Error(`Unknown message role: ${f}`)}}};var pu={fromArray:e=>{let t=e.map(r=>fo(r,fi(),pi(!1,!1,!1,!1,void 0)));return{messages:t.map((r,n)=>({parentId:n>0?t[n-1].id:null,message:r}))}}},Eb=e=>e.next?Eb(e.next):"current"in e?e:null,ZP=class{constructor(t){P(this,"func");P(this,"_value",null);this.func=t}get value(){return this._value===null&&(this._value=this.func()),this._value}dirty(){this._value=null}},Es=class{constructor(){P(this,"messages",new Map);P(this,"head",null);P(this,"root",{children:[],next:null});P(this,"_messages",new ZP(()=>{let t=new Array((this.head?.level??-1)+1);for(let r=this.head;r;r=r.prev)t[r.level]=r.current;return t}))}updateLevels(t,r){t.level=r;for(let n of t.children){let o=this.messages.get(n);o&&this.updateLevels(o,r+1)}}performOp(t,r,n){let o=r.prev??this.root,a=t??this.root;if(!(n==="relink"&&o===a)){if(n!=="link"&&(o.children=o.children.filter(i=>i!==r.current.id),o.next===r)){let i=o.children.at(-1),s=i?this.messages.get(i):null;if(s===void 0)throw new Error("MessageRepository(performOp/cut): Fallback sibling message not found. This is likely an internal bug in assistant-ui.");o.next=s}if(n!=="cut"){for(let s=t;s;s=s.prev)if(s.current.id===r.current.id)throw new Error("MessageRepository(performOp/link): A message with the same id already exists in the parent tree. This error occurs if the same message id is found multiple times. This is likely an internal bug in assistant-ui.");a.children=[...a.children,r.current.id],(Eb(r)===this.head||a.next===null)&&(a.next=r),r.prev=t;let i=t?t.level+1:0;this.updateLevels(r,i)}}}get headId(){return this.head?.current.id??null}getMessages(t){if(t===void 0||t===this.head?.current.id)return this._messages.value;let r=this.messages.get(t);if(!r)throw new Error("MessageRepository(getMessages): Head message not found. This is likely an internal bug in assistant-ui.");let n=new Array(r.level+1);for(let o=r;o;o=o.prev)n[o.level]=o.current;return n}addOrUpdateMessage(t,r){let n=this.messages.get(r.id),o=t?this.messages.get(t):null;if(o===void 0)throw new Error("MessageRepository(addOrUpdateMessage): Parent message not found. This is likely an internal bug in assistant-ui.");if(n){n.current=r,this.performOp(o,n,"relink"),this._messages.dirty();return}let a={prev:o,current:r,next:null,children:[],level:o?o.level+1:0};this.messages.set(r.id,a),this.performOp(o,a,"link"),this.head===o&&(this.head=a),this._messages.dirty()}getMessage(t){let r=this.messages.get(t);if(!r)throw new Error("MessageRepository(updateMessage): Message not found. This is likely an internal bug in assistant-ui.");return{parentId:r.prev?.current.id??null,message:r.current,index:r.level}}appendOptimisticMessage(t,r){let n;do n=qj();while(this.messages.has(n));return this.addOrUpdateMessage(t,fo(r,n,{type:"running"})),n}deleteMessage(t,r){let n=this.messages.get(t);if(!n)throw new Error("MessageRepository(deleteMessage): Message not found. This is likely an internal bug in assistant-ui.");let o=r===void 0?n.prev:r===null?null:this.messages.get(r);if(o===void 0)throw new Error("MessageRepository(deleteMessage): Replacement not found. This is likely an internal bug in assistant-ui.");for(let a of n.children){let i=this.messages.get(a);if(!i)throw new Error("MessageRepository(deleteMessage): Child message not found. This is likely an internal bug in assistant-ui.");this.performOp(o,i,"relink")}this.performOp(null,n,"cut"),this.messages.delete(t),this.head===n&&(this.head=Eb(o??this.root)),this._messages.dirty()}getBranches(t){let r=this.messages.get(t);if(!r)throw new Error("MessageRepository(getBranches): Message not found. This is likely an internal bug in assistant-ui.");let{children:n}=r.prev??this.root;return n}switchToBranch(t){let r=this.messages.get(t);if(!r)throw new Error("MessageRepository(switchToBranch): Branch not found. This is likely an internal bug in assistant-ui.");let n=r.prev??this.root;n.next=r,this.head=Eb(r),this._messages.dirty()}resetHead(t){if(t===null){this.clear();return}let r=this.messages.get(t);if(!r)throw new Error("MessageRepository(resetHead): Branch not found. This is likely an internal bug in assistant-ui.");if(r.children.length>0){let n=o=>{for(let a of o.children){let i=this.messages.get(a);i&&(n(i),this.messages.delete(a))}};n(r),r.children=[],r.next=null}this.head=r;for(let n=r;n;n=n.prev)n.prev&&(n.prev.next=n);this._messages.dirty()}clear(){this.messages.clear(),this.head=null,this.root={children:[],next:null},this._messages.dirty()}export(){let t=[];for(let[,r]of this.messages)t.push({message:r.current,parentId:r.prev?.current.id??null});return{headId:this.head?.current.id??null,messages:t}}import({headId:t,messages:r}){for(let{message:n,parentId:o}of r)this.addOrUpdateMessage(o,n);this.resetHead(t??r.at(-1)?.message.id??null)}};var Ia=class{constructor(){P(this,"_subscriptions",new Set);P(this,"_connection")}get isConnected(){return!!this._connection}notifySubscribers(){for(let t of this._subscriptions)t()}_updateConnection(){if(this._subscriptions.size>0){if(this._connection)return;this._connection=this._connect()}else this._connection?.(),this._connection=void 0}subscribe(t){return this._subscriptions.add(t),this._updateConnection(),()=>{this._subscriptions.delete(t),this._updateConnection()}}};var Cr=Symbol("skip-update");var mu=class extends Ia{constructor(r){super();P(this,"binding");P(this,"_previousStateDirty",!0);P(this,"_previousState");P(this,"getState",()=>{if(!this.isConnected||this._previousStateDirty){let r=this.binding.getState();r!==Cr&&(this._previousState=r),this._previousStateDirty=!1}if(this._previousState===void 0)throw new Error("Entry not available in the store");return this._previousState});this.binding=r}get path(){return this.binding.path}_connect(){let r=()=>{this._previousStateDirty=!0,this.notifySubscribers()};return this.binding.subscribe(r)}};var hu=class{constructor(t,r){P(this,"_core");P(this,"_threadListBinding");this._core=t,this._threadListBinding=r,this.__internal_bindMethods()}get path(){return this._core.path}__internal_bindMethods(){this.switchTo=this.switchTo.bind(this),this.rename=this.rename.bind(this),this.archive=this.archive.bind(this),this.unarchive=this.unarchive.bind(this),this.delete=this.delete.bind(this),this.initialize=this.initialize.bind(this),this.generateTitle=this.generateTitle.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getState=this.getState.bind(this),this.detach=this.detach.bind(this)}getState(){return this._core.getState()}switchTo(){let t=this._core.getState();return this._threadListBinding.switchToThread(t.id)}rename(t){let r=this._core.getState();return this._threadListBinding.rename(r.id,t)}archive(){let t=this._core.getState();return this._threadListBinding.archive(t.id)}unarchive(){let t=this._core.getState();return this._threadListBinding.unarchive(t.id)}delete(){let t=this._core.getState();return this._threadListBinding.delete(t.id)}initialize(){let t=this._core.getState();return this._threadListBinding.initialize(t.id)}generateTitle(){let t=this._core.getState();return this._threadListBinding.generateTitle(t.id)}unstable_on(t,r){let n=this._core.getState().isMain,o=this._core.getState().id;return this.subscribe(()=>{let a=this._core.getState(),i=a.isMain,s=a.id;n===i&&o===s||(n=i,o=s,!(t==="switched-to"&&!i)&&(t==="switched-away"&&i||r()))})}subscribe(t){return this._core.subscribe(t)}detach(){let t=this._core.getState();this._threadListBinding.detach(t.id)}__internal_getRuntime(){return this}};function t4(e,t){if(e===void 0&&t===void 0)return!0;if(e===void 0||t===void 0)return!1;for(let r of Object.keys(e)){let n=e[r],o=t[r];if(!Object.is(n,o))return!1}return!0}var _r=class extends Ia{constructor(r){super();P(this,"binding");P(this,"_previousState");P(this,"getState",()=>(this.isConnected||this._syncState(),this._previousState));this.binding=r;let n=r.getState();if(n===Cr)throw new Error("Entry not available in the store");this._previousState=n}get path(){return this.binding.path}_syncState(){let r=this.binding.getState();return r===Cr||t4(r,this._previousState)?!1:(this._previousState=r,!0)}_connect(){let r=()=>{this._syncState()&&this.notifySubscribers()};return this.binding.subscribe(r)}};var Tr=Symbol("innerMessage"),GP=Symbol("innerMessages"),KP=e=>e[Tr],Lne=[],po=e=>{let t="messages"in e?e.messages:e,r=t[GP]||t[Tr];return r?Array.isArray(r)?r:(t[GP]=[r],t[GP]):Lne};var mi=e=>e.content.filter(r=>r.type==="text").map(r=>r.text).join(`
|
|
13
|
+
|
|
14
|
+
`);var Ab=class{constructor(t){P(this,"_core");this._core=t,this.__internal_bindMethods()}get path(){return this._core.path}__internal_bindMethods(){this.getState=this.getState.bind(this),this.remove=this.remove.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this._core.getState()}subscribe(t){return this._core.subscribe(t)}},Rb=class extends Ab{constructor(r,n){super(r);P(this,"_composerApi");this._composerApi=n}remove(){let r=this._composerApi.getState();if(!r)throw new Error("Composer is not available");return r.removeAttachment(this.getState().id)}},Mb=class extends Rb{get source(){return"thread-composer"}},$b=class extends Rb{get source(){return"edit-composer"}},Db=class extends Ab{get source(){return"message"}constructor(t){super(t)}remove(){throw new Error("Message attachments cannot be removed")}};var Id=class extends Ia{constructor(r){super();P(this,"config");this.config=r}getState(){return this.config.binding.getState()}outerSubscribe(r){return this.config.binding.subscribe(r)}_connect(){let r=()=>{this.notifySubscribers()},n=this.config.binding.getState(),o=n?.unstable_on(this.config.event,r),a=()=>{let s=this.config.binding.getState();s!==n&&(n=s,o?.(),o=this.config.binding.getState()?.unstable_on(this.config.event,r))},i=this.outerSubscribe(a);return()=>{i?.(),o?.()}}};var r4=Object.freeze([]),n4=Object.freeze({}),Ene=e=>Object.freeze({type:"thread",isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,attachments:e?.attachments??r4,text:e?.text??"",role:e?.role??"user",runConfig:e?.runConfig??n4,attachmentAccept:e?.attachmentAccept??"",value:e?.text??""}),Ane=e=>Object.freeze({type:"edit",isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,text:e?.text??"",role:e?.role??"user",attachments:e?.attachments??r4,runConfig:e?.runConfig??n4,attachmentAccept:e?.attachmentAccept??"",value:e?.text??""}),Ob=class{constructor(t){P(this,"_core");P(this,"_eventSubscriptionSubjects",new Map);this._core=t}get path(){return this._core.path}__internal_bindMethods(){this.setText=this.setText.bind(this),this.setRunConfig=this.setRunConfig.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.addAttachment=this.addAttachment.bind(this),this.reset=this.reset.bind(this),this.clearAttachments=this.clearAttachments.bind(this),this.send=this.send.bind(this),this.cancel=this.cancel.bind(this),this.setRole=this.setRole.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.unstable_on=this.unstable_on.bind(this)}setText(t){let r=this._core.getState();if(!r)throw new Error("Composer is not available");r.setText(t)}setRunConfig(t){let r=this._core.getState();if(!r)throw new Error("Composer is not available");r.setRunConfig(t)}addAttachment(t){let r=this._core.getState();if(!r)throw new Error("Composer is not available");return r.addAttachment(t)}reset(){let t=this._core.getState();if(!t)throw new Error("Composer is not available");return t.reset()}clearAttachments(){let t=this._core.getState();if(!t)throw new Error("Composer is not available");return t.clearAttachments()}send(){let t=this._core.getState();if(!t)throw new Error("Composer is not available");t.send()}cancel(){let t=this._core.getState();if(!t)throw new Error("Composer is not available");t.cancel()}setRole(t){let r=this._core.getState();if(!r)throw new Error("Composer is not available");r.setRole(t)}subscribe(t){return this._core.subscribe(t)}unstable_on(t,r){let n=this._eventSubscriptionSubjects.get(t);return n||(n=new Id({event:t,binding:this._core}),this._eventSubscriptionSubjects.set(t,n)),n.subscribe(r)}},Nb=class extends Ob{constructor(r){let n=new mu({path:r.path,getState:()=>Ene(r.getState()),subscribe:o=>r.subscribe(o)});super({path:r.path,getState:()=>r.getState(),subscribe:o=>n.subscribe(o)});P(this,"_getState");this._getState=n.getState.bind(n),this.__internal_bindMethods()}get path(){return this._core.path}get type(){return"thread"}getState(){return this._getState()}getAttachmentByIndex(r){return new Mb(new _r({path:{...this.path,attachmentSource:"thread-composer",attachmentSelector:{type:"index",index:r},ref:`${this.path.ref}${this.path.ref}.attachments[${r}]`},getState:()=>{let o=this.getState().attachments[r];return o?{...o,source:"thread-composer"}:Cr},subscribe:n=>this._core.subscribe(n)}),this._core)}},zb=class extends Ob{constructor(r,n){let o=new mu({path:r.path,getState:()=>Ane(r.getState()),subscribe:a=>r.subscribe(a)});super({path:r.path,getState:()=>r.getState(),subscribe:a=>o.subscribe(a)});P(this,"_beginEdit");P(this,"_getState");this._beginEdit=n,this._getState=o.getState.bind(o),this.__internal_bindMethods()}get path(){return this._core.path}get type(){return"edit"}__internal_bindMethods(){super.__internal_bindMethods(),this.beginEdit=this.beginEdit.bind(this)}getState(){return this._getState()}beginEdit(){this._beginEdit()}getAttachmentByIndex(r){return new $b(new _r({path:{...this.path,attachmentSource:"edit-composer",attachmentSelector:{type:"index",index:r},ref:`${this.path.ref}${this.path.ref}.attachments[${r}]`},getState:()=>{let o=this.getState().attachments[r];return o?{...o,source:"edit-composer"}:Cr},subscribe:n=>this._core.subscribe(n)}),this._core)}};var Fb=class e{constructor(t=null){P(this,"_state");this._state=t}get state(){return this._state}append(t){this._state=t.reduce((r,n)=>e.apply(r,n),this._state)}static apply(t,r){let n=r.type;switch(n){case"set":return e.updatePath(t,r.path,()=>r.value);case"append-text":return e.updatePath(t,r.path,o=>{if(typeof o!="string")throw new Error(`Expected string at path [${r.path.join(", ")}]`);return o+r.value});default:{let o=n;throw new Error(`Invalid operation type: ${o}`)}}}static updatePath(t,r,n){if(r.length===0)return n(t);if(t??(t={}),typeof t!="object")throw new Error(`Invalid path: [${r.join(", ")}]`);let[o,...a]=r;if(Array.isArray(t)){let s=Number(o);if(Number.isNaN(s))throw new Error(`Expected array index at [${r.join(", ")}]`);if(s>t.length||s<0)throw new Error("Insert array index out of bounds");let l=[...t];return l[s]=this.updatePath(l[s],a,n),l}let i={...t};return i[o]=this.updatePath(i[o],a,n),i}};var Rne=({unstable_state:e=null}={})=>({role:"assistant",status:{type:"running"},parts:[],get content(){return this.parts},metadata:{unstable_state:e,unstable_data:[],unstable_annotations:[],steps:[],custom:{}}}),jb=(e,t,r)=>{if(e.parts.length===0)throw new Error("No parts available to update.");if(t.path.length!==1)throw new Error("Nested paths are not supported yet.");let n=t.path[0],o=r(e.parts[n]);return{...e,parts:[...e.parts.slice(0,n),o,...e.parts.slice(n+1)],get content(){return this.parts}}},Mne=(e,t)=>{let r=t.part;if(r.type==="text"||r.type==="reasoning"){let n={type:r.type,text:"",status:{type:"running"},...r.parentId&&{parentId:r.parentId}};return{...e,parts:[...e.parts,n],get content(){return this.parts}}}else if(r.type==="tool-call"){let n={type:"tool-call",state:"partial-call",status:{type:"running",isArgsComplete:!1},toolCallId:r.toolCallId,toolName:r.toolName,argsText:"",args:{},...r.parentId&&{parentId:r.parentId}};return{...e,parts:[...e.parts,n],get content(){return this.parts}}}else if(r.type==="source"){let n={type:"source",sourceType:r.sourceType,id:r.id,url:r.url,...r.title?{title:r.title}:void 0,...r.parentId&&{parentId:r.parentId}};return{...e,parts:[...e.parts,n],get content(){return this.parts}}}else if(r.type==="file"){let n={type:"file",mimeType:r.mimeType,data:r.data};return{...e,parts:[...e.parts,n],get content(){return this.parts}}}else throw new Error(`Unsupported part type: ${r.type}`)},$ne=(e,t)=>jb(e,t,r=>{if(r.type!=="tool-call")throw new Error("Last is not a tool call");return r.state!=="partial-call"?r:{...r,state:"call"}}),Dne=(e,t)=>jb(e,t,r=>({...r,status:{type:"complete",reason:"unknown"}})),One=(e,t)=>jb(e,t,r=>{if(r.type==="text"||r.type==="reasoning")return{...r,text:r.text+t.textDelta};if(r.type==="tool-call"){let n=r.argsText+t.textDelta,o=Ps(n)??r.args;return{...r,argsText:n,args:o}}else throw new Error("text-delta received but part is neither text nor tool-call")}),Nne=(e,t)=>jb(e,t,r=>{if(r.type==="tool-call")return{...r,state:"result",...t.artifact!==void 0?{artifact:t.artifact}:{},result:t.result,isError:t.isError??!1,status:{type:"complete",reason:"stop"}};throw new Error("Result chunk received but part is not a tool-call")}),o4=(e,t)=>{if(e.status?.type==="incomplete"&&e.status?.reason==="error")return e;let r=zne(t);return{...e,status:r}},zne=e=>e.finishReason==="tool-calls"?{type:"requires-action",reason:"tool-calls"}:e.finishReason==="stop"||e.finishReason==="unknown"?{type:"complete",reason:e.finishReason}:{type:"incomplete",reason:e.finishReason},Fne=(e,t)=>({...e,metadata:{...e.metadata,unstable_annotations:[...e.metadata.unstable_annotations,...t.annotations]}}),Bne=(e,t)=>({...e,metadata:{...e.metadata,unstable_data:[...e.metadata.unstable_data,...t.data]}}),jne=(e,t)=>({...e,metadata:{...e.metadata,steps:[...e.metadata.steps,{state:"started",messageId:t.messageId}]}}),Une=(e,t)=>{let r=e.metadata.steps.slice(),n=r.length-1;return r.length>0&&r[n]?.state==="started"?r[n]={...r[n],state:"finished",finishReason:t.finishReason,usage:t.usage,isContinued:t.isContinued}:r.push({state:"finished",messageId:Tb(),finishReason:t.finishReason,usage:t.usage,isContinued:t.isContinued}),{...e,metadata:{...e.metadata,steps:r}}},Vne=(e,t)=>({...e,status:{type:"incomplete",reason:"error",error:t.error}}),qne=(e,t)=>{let r=new Fb(e.metadata.unstable_state);return r.append(t.operations),{...e,metadata:{...e.metadata,unstable_state:r.state}}},Hne=e=>{let t=!1;return()=>{t||(t=!0,queueMicrotask(()=>{t=!1,e()}))}},Bb=class extends TransformStream{constructor({initialMessage:t,throttle:r,onError:n}={}){let o=t??Rne(),a,i=r?Hne(()=>{a?.enqueue(o)}):()=>{a?.enqueue(o)};super({start(s){a=s},transform(s){let l=s.type;switch(l){case"part-start":o=Mne(o,s);break;case"tool-call-args-text-finish":o=$ne(o,s);break;case"part-finish":o=Dne(o,s);break;case"text-delta":o=One(o,s);break;case"result":o=Nne(o,s);break;case"message-finish":o=o4(o,s);break;case"annotations":o=Fne(o,s);break;case"data":o=Bne(o,s);break;case"step-start":o=jne(o,s);break;case"step-finish":o=Une(o,s);break;case"error":o=Vne(o,s),n?.(s.error);break;case"update-state":o=qne(o,s);break;default:{let u=l;throw new Error(`Unsupported chunk type: ${u}`)}}i()},flush(s){if(o.status?.type==="running"){let l=o.parts?.some(u=>u.type==="tool-call"&&(u.state==="call"||u.state==="partial-call")&&u.result===void 0)??!1;o=o4(o,{type:"message-finish",path:[],finishReason:l?"tool-calls":"unknown",usage:{promptTokens:0,completionTokens:0}}),s.enqueue(o)}}})}};var eh=class extends Sd{constructor(){super(t=>{let r=new Lb({transform(n,o){o.appendText(n)}});return t.pipeThrough(new TextDecoderStream).pipeThrough(r)})}};var th=class e{constructor(t){P(this,"readable");this.readable=t,this.readable=t}static fromAssistantStream(t){return new e(t.pipeThrough(new Bb))}async unstable_result(){let t;for await(let r of this)t=r;return t||{role:"assistant",status:{type:"complete",reason:"unknown"},parts:[],content:[],metadata:{unstable_state:null,unstable_data:[],unstable_annotations:[],steps:[],custom:{}}}}[Symbol.asyncIterator](){let t=this.readable.getReader();return{async next(){let{done:r,value:n}=await t.read();return r?{done:!0,value:void 0}:{done:!1,value:n}}}}tee(){let[t,r]=this.readable.tee();return[new e(t),new e(r)]}};var a4=Symbol.for("aui.tool-response"),Xr=class e{constructor(t){P(this,"artifact");P(this,"result");P(this,"isError");t.artifact!==void 0&&(this.artifact=t.artifact),this.result=t.result,this.isError=t.isError??!1}get[a4](){return!0}static[Symbol.hasInstance](t){return typeof t=="object"&&t!==null&&a4 in t}static toResponse(t){return t instanceof e?t:new e({result:t===void 0?"<no result>":t})}};var s4=S(UP(),1);function i4(e,t,r){try{let n=e();if(typeof n=="object"&&n!==null&&"then"in n)return n.then(t,r);t(n)}catch(n){r(n)}}function rh(e,t){let r=e;for(let n of t){if(r==null)return;r=r[n]}return r}var JP=class{constructor(t,r,n){P(this,"resolve");P(this,"reject");P(this,"disposed",!1);P(this,"fieldPath");this.resolve=t,this.reject=r,this.fieldPath=n}update(t){if(!this.disposed)try{if(Ls(t,this.fieldPath)==="complete"){let r=rh(t,this.fieldPath);r!==void 0&&(this.resolve(r),this.dispose())}}catch(r){this.reject(r),this.dispose()}}dispose(){this.disposed=!0}},Ub=class{constructor(t,r){P(this,"controller");P(this,"disposed",!1);P(this,"fieldPath");this.controller=t,this.fieldPath=r}update(t){if(!this.disposed)try{let r=rh(t,this.fieldPath);r!==void 0&&this.controller.enqueue(r),Ls(t,this.fieldPath)==="complete"&&(this.controller.close(),this.dispose())}catch(r){this.controller.error(r),this.dispose()}}dispose(){this.disposed=!0}},Vb=class{constructor(t,r){P(this,"controller");P(this,"disposed",!1);P(this,"fieldPath");P(this,"lastValue");this.controller=t,this.fieldPath=r}update(t){if(!this.disposed)try{let r=rh(t,this.fieldPath);if(r!==void 0&&typeof r=="string"){let n=r.substring(this.lastValue?.length||0);this.lastValue=r,this.controller.enqueue(n)}Ls(t,this.fieldPath)==="complete"&&(this.controller.close(),this.dispose())}catch(r){this.controller.error(r),this.dispose()}}dispose(){this.disposed=!0}},qb=class{constructor(t,r){P(this,"controller");P(this,"disposed",!1);P(this,"fieldPath");P(this,"processedIndexes",new Set);this.controller=t,this.fieldPath=r}update(t){if(!this.disposed)try{let r=rh(t,this.fieldPath);if(!Array.isArray(r))return;for(let n=0;n<r.length;n++)if(!this.processedIndexes.has(n)){let o=[...this.fieldPath,n];Ls(t,o)==="complete"&&(this.controller.enqueue(r[n]),this.processedIndexes.add(n))}Ls(t,this.fieldPath)==="complete"&&(this.controller.close(),this.dispose())}catch(r){this.controller.error(r),this.dispose()}}dispose(){this.disposed=!0}},XP=class{constructor(t){P(this,"argTextDeltas");P(this,"handles",new Set);P(this,"args",Ps(""));this.argTextDeltas=t,this.processStream()}async processStream(){try{let t="",r=this.argTextDeltas.getReader();for(;;){let{value:n,done:o}=await r.read();if(o)break;t+=n;let a=Ps(t);if(a!==void 0){this.args=a;for(let i of this.handles)i.update(a)}}}catch(t){console.error("Error processing argument stream:",t);for(let r of this.handles)r.dispose()}}get(...t){return new Promise((r,n)=>{let o=new JP(r,n,t);if(this.args&&Ls(this.args,t)==="complete"){let a=rh(this.args,t);if(a!==void 0){r(a);return}}this.handles.add(o),o.update(this.args)})}streamValues(...t){let r=t,n=new ReadableStream({start:o=>{let a=new Ub(o,r);this.handles.add(a),a.update(this.args)},cancel:()=>{for(let o of this.handles)if(o instanceof Ub){o.dispose(),this.handles.delete(o);break}}});return Xm(n)}streamText(...t){let r=t,n=new ReadableStream({start:o=>{let a=new Vb(o,r);this.handles.add(a),a.update(this.args)},cancel:()=>{for(let o of this.handles)if(o instanceof Vb){o.dispose(),this.handles.delete(o);break}}});return Xm(n)}forEach(...t){let r=t,n=new ReadableStream({start:o=>{let a=new qb(o,r);this.handles.add(a),a.update(this.args)},cancel:()=>{for(let o of this.handles)if(o instanceof qb){o.dispose(),this.handles.delete(o);break}}});return Xm(n)}},YP=class{constructor(t){P(this,"promise");this.promise=t}get(){return this.promise}},Hb=class{constructor(){P(this,"args");P(this,"response");P(this,"writable");P(this,"resolve");P(this,"argsText","");P(this,"result",{get:async()=>(await this.response.get()).result});let t=new TransformStream;this.writable=t.writable,this.args=new XP(t.readable);let{promise:r,resolve:n}=bd();this.resolve=n,this.response=new YP(r)}async appendArgsTextDelta(t){let r=this.writable.getWriter();try{await r.write(t)}catch(n){console.warn(n)}finally{r.releaseLock()}this.argsText+=t}setResponse(t){this.resolve(t)}};var Wb=class extends Sd{constructor(t){let r=new Map,n=new Map;super(o=>{let a=new TransformStream({transform(i,s){switch((i.type!=="part-finish"||i.meta.type!=="tool-call")&&s.enqueue(i),i.type){case"part-start":if(i.part.type==="tool-call"){let u=new Hb;n.set(i.part.toolCallId,u),t.streamCall({reader:u,toolCallId:i.part.toolCallId,toolName:i.part.toolName})}break;case"text-delta":{if(i.meta.type==="tool-call"){let u=i.meta.toolCallId,c=n.get(u);if(!c)throw new Error("No controller found for tool call");c.appendArgsTextDelta(i.textDelta)}break}case"result":{if(i.meta.type!=="tool-call")break;let{toolCallId:u}=i.meta,c=n.get(u);if(!c)throw new Error("No controller found for tool call");c.setResponse(new Xr({result:i.result,artifact:i.artifact,isError:i.isError}));break}case"tool-call-args-text-finish":{if(i.meta.type!=="tool-call")break;let{toolCallId:u,toolName:c}=i.meta,d=n.get(u);if(!d)throw new Error("No controller found for tool call");let f=!1,p=i4(()=>{let m;try{m=s4.default.parse(d.argsText)}catch(v){throw new Error(`Function parameter parsing failed. ${JSON.stringify(v.message)}`)}let h=t.execute({toolCallId:u,toolName:c,args:m});return h!==void 0&&(f=!0,t.onExecutionStart?.(u,c)),h},m=>{if(f&&t.onExecutionEnd?.(u,c),m===void 0)return;let h=new Xr({artifact:m.artifact,result:m.result,isError:m.isError});d.setResponse(h),s.enqueue({type:"result",path:i.path,...h})},m=>{f&&t.onExecutionEnd?.(u,c);let h=new Xr({result:String(m),isError:!0});d.setResponse(h),s.enqueue({type:"result",path:i.path,...h})});p&&r.set(u,p);break}case"part-finish":{if(i.meta.type!=="tool-call")break;let{toolCallId:u}=i.meta,c=r.get(u);c?c.then(()=>{r.delete(u),n.delete(u),s.enqueue(i)}):s.enqueue(i)}}},async flush(){await Promise.all(r.values())}});return o.pipeThrough(new fu).pipeThrough(a)})}};var Wne=e=>typeof e=="object"&&e!==null&&"~standard"in e&&e["~standard"].version===1;function Zne(e,t,r,n){let o=e?.[r.toolName];return!o||!o.execute?void 0:(async i=>{if(t.aborted)return new Xr({result:"Tool execution was cancelled.",isError:!0});let s=i;if(Wne(o.parameters)){let c=o.parameters["~standard"].validate(r.args);c instanceof Promise&&(c=await c),c.issues&&(s=o.experimental_onSchemaValidationError??(()=>{throw new Error(`Function parameter validation failed. ${JSON.stringify(c.issues)}`)}))}let l=new Promise(c=>{let d=()=>{queueMicrotask(()=>{queueMicrotask(()=>{c(new Xr({result:"Tool execution was cancelled.",isError:!0}))})})};t.aborted?d():t.addEventListener("abort",d,{once:!0})}),u=(async()=>{let c=await s(r.args,{toolCallId:r.toolCallId,abortSignal:t,human:d=>n(r.toolCallId,d)});return Xr.toResponse(c)})();return Promise.race([u,l])})(o.execute)}function Gne(e,t,r,n,o){e?.[n.toolName]?.streamCall?.(r,{toolCallId:n.toolCallId,abortSignal:t,human:a=>o(n.toolCallId,a)})}function QP(e,t,r,n){let o=typeof e=="function"?e:()=>e,a=typeof t=="function"?t:()=>t;return new Wb({execute:i=>Zne(o(),a(),i,r),streamCall:({reader:i,...s})=>Gne(o(),a(),i,s,r),onExecutionStart:n?.onExecutionStart,onExecutionEnd:n?.onExecutionEnd})}var nh=class{constructor(t,r,n){P(this,"contentBinding");P(this,"messageApi");P(this,"threadApi");this.contentBinding=t,this.messageApi=r,this.threadApi=n,this.__internal_bindMethods()}get path(){return this.contentBinding.path}__internal_bindMethods(){this.addToolResult=this.addToolResult.bind(this),this.resumeToolCall=this.resumeToolCall.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this.contentBinding.getState()}addToolResult(t){let r=this.contentBinding.getState();if(!r)throw new Error("Message part is not available");if(r.type!=="tool-call")throw new Error("Tried to add tool result to non-tool message part");if(!this.messageApi)throw new Error("Message API is not available. This is likely a bug in assistant-ui.");if(!this.threadApi)throw new Error("Thread API is not available");let n=this.messageApi.getState();if(!n)throw new Error("Message is not available");let o=r.toolName,a=r.toolCallId,i=Xr.toResponse(t);this.threadApi.getState().addToolResult({messageId:n.id,toolName:o,toolCallId:a,result:i.result,artifact:i.artifact,isError:i.isError})}resumeToolCall(t){let r=this.contentBinding.getState();if(!r)throw new Error("Message part is not available");if(r.type!=="tool-call")throw new Error("Tried to resume tool call on non-tool message part");if(!this.threadApi)throw new Error("Thread API is not available");let n=r.toolCallId;this.threadApi.getState().resumeToolCall({toolCallId:n,payload:t})}subscribe(t){return this.contentBinding.subscribe(t)}};var hi=class extends Ia{constructor(r){super();P(this,"binding");this.binding=r}get path(){return this.binding.path}getState(){return this.binding.getState()}outerSubscribe(r){return this.binding.subscribe(r)}_connect(){let r=()=>{this.notifySubscribers()},n=this.binding.getState(),o=n?.subscribe(r),a=()=>{let s=this.binding.getState();s!==n&&(n=s,o?.(),o=this.binding.getState()?.subscribe(r),r())},i=this.outerSubscribe(a);return()=>{i?.(),o?.()}}};var Zb=Object.freeze({type:"complete"}),Kne=(e,t,r)=>{if(e.role!=="assistant")return Zb;if(r.type==="tool-call")return r.result?Zb:e.status;let n=t===Math.max(0,e.content.length-1);return e.status.type==="requires-action"?Zb:n?e.status:Zb},l4=(e,t)=>{let r=e.content[t];if(!r)return Cr;let n=Kne(e,t,r);return Object.freeze({...r,[Tr]:r[Tr],status:n})},Gb=class{constructor(t,r){P(this,"_core");P(this,"_threadBinding");P(this,"composer");P(this,"_getEditComposerRuntimeCore",()=>this._threadBinding.getState().getEditComposer(this._core.getState().id));this._core=t,this._threadBinding=r,this.composer=new zb(new hi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.composer`,composerSource:"edit"},getState:this._getEditComposerRuntimeCore,subscribe:n=>this._threadBinding.subscribe(n)}),()=>this._threadBinding.getState().beginEdit(this._core.getState().id)),this.__internal_bindMethods()}get path(){return this._core.path}__internal_bindMethods(){this.reload=this.reload.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getMessagePartByIndex=this.getMessagePartByIndex.bind(this),this.getMessagePartByToolCallId=this.getMessagePartByToolCallId.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.unstable_getCopyText=this.unstable_getCopyText.bind(this),this.speak=this.speak.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.submitFeedback=this.submitFeedback.bind(this),this.switchToBranch=this.switchToBranch.bind(this)}getState(){return this._core.getState()}reload(t={}){let r=this._getEditComposerRuntimeCore(),n=r??this._threadBinding.getState().composer,o=r??n,{runConfig:a=o.runConfig}=t,i=this._core.getState();if(i.role!=="assistant")throw new Error("Can only reload assistant messages");this._threadBinding.getState().startRun({parentId:i.parentId,sourceId:i.id,runConfig:a})}speak(){let t=this._core.getState();return this._threadBinding.getState().speak(t.id)}stopSpeaking(){let t=this._core.getState();if(this._threadBinding.getState().speech?.messageId===t.id)this._threadBinding.getState().stopSpeaking();else throw new Error("Message is not being spoken")}submitFeedback({type:t}){let r=this._core.getState();this._threadBinding.getState().submitFeedback({messageId:r.id,type:t})}switchToBranch({position:t,branchId:r}){let n=this._core.getState();if(r&&t)throw new Error("May not specify both branchId and position");if(!r&&!t)throw new Error("Must specify either branchId or position");let a=this._threadBinding.getState().getBranches(n.id),i=r;if(t==="previous"?i=a[n.branchNumber-2]:t==="next"&&(i=a[n.branchNumber]),!i)throw new Error("Branch not found");this._threadBinding.getState().switchToBranch(i)}unstable_getCopyText(){return mi(this.getState())}subscribe(t){return this._core.subscribe(t)}getMessagePartByIndex(t){if(t<0)throw new Error("Message part index must be >= 0");return new nh(new _r({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.content[${t}]`,messagePartSelector:{type:"index",index:t}},getState:()=>l4(this.getState(),t),subscribe:r=>this._core.subscribe(r)}),this._core,this._threadBinding)}getMessagePartByToolCallId(t){return new nh(new _r({path:{...this.path,ref:this.path.ref+`${this.path.ref}.content[toolCallId=${JSON.stringify(t)}]`,messagePartSelector:{type:"toolCallId",toolCallId:t}},getState:()=>{let r=this._core.getState(),n=r.content.findIndex(o=>o.type==="tool-call"&&o.toolCallId===t);return n===-1?Cr:l4(r,n)},subscribe:r=>this._core.subscribe(r)}),this._core,this._threadBinding)}getAttachmentByIndex(t){return new Db(new _r({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.attachments[${t}]`,attachmentSource:"message",attachmentSelector:{type:"index",index:t}},getState:()=>{let n=this.getState().attachments?.[t];return n?{...n,source:"message"}:Cr},subscribe:r=>this._core.subscribe(r)}))}};var Jne=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{},...e.stream?{stream:e.stream}:{}}),Xne=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{}}),Yne=(e,t)=>typeof t=="string"?{createdAt:new Date,parentId:e.at(-1)?.id??null,sourceId:null,runConfig:{},role:"user",content:[{type:"text",text:t}],attachments:[],metadata:{custom:{}}}:{createdAt:t.createdAt??new Date,parentId:t.parentId??e.at(-1)?.id??null,sourceId:t.sourceId??null,role:t.role??"user",content:t.content,attachments:t.attachments??[],metadata:t.metadata??{custom:{}},runConfig:t.runConfig??{},startRun:t.startRun},Qne=(e,t)=>{let r=e.messages.at(-1);return Object.freeze({threadId:t.id,metadata:t,capabilities:e.capabilities,isDisabled:e.isDisabled,isLoading:e.isLoading,isRunning:r?.role!=="assistant"?!1:r.status.type==="running",messages:e.messages,state:e.state,suggestions:e.suggestions,extras:e.extras,speech:e.speech})},kd=class{constructor(t,r){P(this,"_threadBinding");P(this,"composer");P(this,"_eventSubscriptionSubjects",new Map);let n=new _r({path:t.path,getState:()=>Qne(t.getState(),r.getState()),subscribe:o=>{let a=t.subscribe(o),i=r.subscribe(o);return()=>{a(),i()}}});this._threadBinding={path:t.path,getState:()=>t.getState(),getStateState:()=>n.getState(),outerSubscribe:o=>t.outerSubscribe(o),subscribe:o=>t.subscribe(o)},this.composer=new Nb(new hi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.composer`,composerSource:"thread"},getState:()=>this._threadBinding.getState().composer,subscribe:o=>this._threadBinding.subscribe(o)})),this.__internal_bindMethods()}get path(){return this._threadBinding.path}get __internal_threadBinding(){return this._threadBinding}__internal_bindMethods(){this.append=this.append.bind(this),this.unstable_resumeRun=this.unstable_resumeRun.bind(this),this.unstable_loadExternalState=this.unstable_loadExternalState.bind(this),this.startRun=this.startRun.bind(this),this.cancelRun=this.cancelRun.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.export=this.export.bind(this),this.import=this.import.bind(this),this.reset=this.reset.bind(this),this.getMessageByIndex=this.getMessageByIndex.bind(this),this.getMessageById=this.getMessageById.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getModelContext=this.getModelContext.bind(this),this.getModelConfig=this.getModelConfig.bind(this),this.getState=this.getState.bind(this)}getState(){return this._threadBinding.getStateState()}append(t){this._threadBinding.getState().append(Yne(this._threadBinding.getState().messages,t))}subscribe(t){return this._threadBinding.subscribe(t)}getModelContext(){return this._threadBinding.getState().getModelContext()}getModelConfig(){return this.getModelContext()}startRun(t){let r=t===null||typeof t=="string"?{parentId:t}:t;return this._threadBinding.getState().startRun(Xne(r))}unstable_resumeRun(t){return this._threadBinding.getState().resumeRun(Jne(t))}unstable_loadExternalState(t){this._threadBinding.getState().unstable_loadExternalState(t)}cancelRun(){this._threadBinding.getState().cancelRun()}stopSpeaking(){return this._threadBinding.getState().stopSpeaking()}export(){return this._threadBinding.getState().export()}import(t){this._threadBinding.getState().import(t)}reset(t){this._threadBinding.getState().reset(t)}getMessageByIndex(t){if(t<0)throw new Error("Message index must be >= 0");return this._getMessageRuntime({...this.path,ref:`${this.path.ref}${this.path.ref}.messages[${t}]`,messageSelector:{type:"index",index:t}},()=>{let r=this._threadBinding.getState().messages,n=r[t];if(n)return{message:n,parentId:r[t-1]?.id??null,index:t}})}getMessageById(t){return this._getMessageRuntime({...this.path,ref:this.path.ref+`${this.path.ref}.messages[messageId=${JSON.stringify(t)}]`,messageSelector:{type:"messageId",messageId:t}},()=>this._threadBinding.getState().getMessageById(t))}_getMessageRuntime(t,r){return new Gb(new _r({path:t,getState:()=>{let{message:n,parentId:o,index:a}=r()??{},{messages:i,speech:s}=this._threadBinding.getState();if(!n||o===void 0||a===void 0)return Cr;let u=this._threadBinding.getState().getBranches(n.id),c=n.metadata.submittedFeedback;return{...n,[Tr]:n[Tr],index:a,isLast:i.at(-1)?.id===n.id,parentId:o,branchNumber:u.indexOf(n.id)+1,branchCount:u.length,speech:s?.messageId===n.id?s:void 0,submittedFeedback:c}},subscribe:n=>this._threadBinding.subscribe(n)}),this._threadBinding)}unstable_on(t,r){let n=this._eventSubscriptionSubjects.get(t);return n||(n=new Id({event:t,binding:this._threadBinding}),this._eventSubscriptionSubjects.set(t,n)),n.subscribe(r)}};var eoe=e=>({mainThreadId:e.mainThreadId,newThread:e.newThreadId,threads:e.threadIds,archivedThreads:e.archivedThreadIds,isLoading:e.isLoading,threadItems:e.threadData}),Kb=(e,t)=>{if(t===void 0)return Cr;let r=e.getItemById(t);return r?{id:r.id,threadId:r.id,remoteId:r.remoteId,externalId:r.externalId,title:r.title,status:r.status,isMain:r.id===e.mainThreadId}:Cr},Jb=class{constructor(t,r=kd){P(this,"_core");P(this,"_runtimeFactory");P(this,"_getState");P(this,"_mainThreadListItemRuntime");P(this,"main");this._core=t,this._runtimeFactory=r;let n=new mu({path:{},getState:()=>eoe(t),subscribe:o=>t.subscribe(o)});this._getState=n.getState.bind(n),this._mainThreadListItemRuntime=new hu(new _r({path:{ref:"threadItems[main]",threadSelector:{type:"main"}},getState:()=>Kb(this._core,this._core.mainThreadId),subscribe:o=>this._core.subscribe(o)}),this._core),this.main=new r(new hi({path:{ref:"threads.main",threadSelector:{type:"main"}},getState:()=>t.getMainThreadRuntimeCore(),subscribe:o=>t.subscribe(o)}),this._mainThreadListItemRuntime),this.__internal_bindMethods()}__internal_bindMethods(){this.switchToThread=this.switchToThread.bind(this),this.switchToNewThread=this.switchToNewThread.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getById=this.getById.bind(this),this.getItemById=this.getItemById.bind(this),this.getItemByIndex=this.getItemByIndex.bind(this),this.getArchivedItemByIndex=this.getArchivedItemByIndex.bind(this)}switchToThread(t){return this._core.switchToThread(t)}switchToNewThread(){return this._core.switchToNewThread()}getState(){return this._getState()}subscribe(t){return this._core.subscribe(t)}get mainItem(){return this._mainThreadListItemRuntime}getById(t){return new this._runtimeFactory(new hi({path:{ref:`threads[threadId=${JSON.stringify(t)}]`,threadSelector:{type:"threadId",threadId:t}},getState:()=>this._core.getThreadRuntimeCore(t),subscribe:r=>this._core.subscribe(r)}),this.mainItem)}getItemByIndex(t){return new hu(new _r({path:{ref:`threadItems[${t}]`,threadSelector:{type:"index",index:t}},getState:()=>Kb(this._core,this._core.threadIds[t]),subscribe:r=>this._core.subscribe(r)}),this._core)}getArchivedItemByIndex(t){return new hu(new _r({path:{ref:`archivedThreadItems[${t}]`,threadSelector:{type:"archiveIndex",index:t}},getState:()=>Kb(this._core,this._core.archivedThreadIds[t]),subscribe:r=>this._core.subscribe(r)}),this._core)}getItemById(t){return new hu(new _r({path:{ref:`threadItems[threadId=${t}]`,threadSelector:{type:"threadId",threadId:t}},getState:()=>Kb(this._core,t),subscribe:r=>this._core.subscribe(r)}),this._core)}};var toe=e=>e.startsWith("image/")?"image":e.startsWith("text/")?"document":"file",oh=class{constructor(t){P(this,"cloud");P(this,"accept","*");P(this,"uploadedUrls",new Map);this.cloud=t}async*add({file:t}){let r=crypto.randomUUID(),n=toe(t.type),o={id:r,type:n,name:t.name,contentType:t.type,file:t,status:{type:"running",reason:"uploading",progress:0}};yield o;try{let{signedUrl:a,publicUrl:i}=await this.cloud.files.generatePresignedUploadUrl({filename:t.name});await fetch(a,{method:"PUT",body:t,headers:{"Content-Type":t.type},mode:"cors"}),this.uploadedUrls.set(r,i),o={...o,status:{type:"requires-action",reason:"composer-send"}},yield o}catch{o={...o,status:{type:"incomplete",reason:"error"}},yield o}}async remove(t){this.uploadedUrls.delete(t.id)}async send(t){let r=this.uploadedUrls.get(t.id);if(!r)throw new Error("Attachment not uploaded");this.uploadedUrls.delete(t.id);let n;return t.type==="image"?n=[{type:"image",image:r,filename:t.name}]:n=[{type:"file",data:r,mimeType:t.contentType,filename:t.name}],{...t,status:{type:"complete"},content:n}}};var u4=S(D(),1),ah=S(A(),1),eL=(0,ah.createContext)(null),Xb=({adapters:e,children:t})=>{let r=(0,ah.useContext)(eL);return(0,u4.jsx)(eL.Provider,{value:{...r,...e},children:t})},Yb=()=>(0,ah.useContext)(eL);var vu=S(A(),1);var gu=Object.freeze([]),yu="DEFAULT_THREAD_ID",roe=Object.freeze([yu]),d4=Object.freeze({id:yu,remoteId:void 0,externalId:void 0,status:"regular"}),noe=Promise.resolve(),c4=Object.freeze({[yu]:d4}),Qb=class{constructor(t={},r){P(this,"adapter");P(this,"threadFactory");P(this,"_mainThreadId",yu);P(this,"_threads",roe);P(this,"_archivedThreads",gu);P(this,"_threadData",c4);P(this,"_mainThread");P(this,"_subscriptions",new Set);this.adapter=t,this.threadFactory=r,this._mainThread=this.threadFactory(),this.__internal_setAdapter(t,!0)}get isLoading(){return this.adapter.isLoading??!1}get newThreadId(){}get threadIds(){return this._threads}get archivedThreadIds(){return this._archivedThreads}get threadData(){return this._threadData}getLoadThreadsPromise(){return noe}get mainThreadId(){return this._mainThreadId}getMainThreadRuntimeCore(){return this._mainThread}getThreadRuntimeCore(){throw new Error("Method not implemented.")}getItemById(t){for(let r of this.adapter.threads??[])if(r.id===t)return r;for(let r of this.adapter.archivedThreads??[])if(r.id===t)return r;if(t===yu)return d4}__internal_setAdapter(t,r=!1){let n=this.adapter;this.adapter=t;let o=t.threadId??yu,a=t.threads??gu,i=t.archivedThreads??gu,s=n.threadId??yu,l=n.threads??gu,u=n.archivedThreads??gu;!r&&s===o&&l===a&&u===i||(this._threadData={...c4,...Object.fromEntries(t.threads?.map(c=>[c.id,{...c,remoteId:c.remoteId,externalId:c.externalId,status:"regular"}])??[]),...Object.fromEntries(t.archivedThreads?.map(c=>[c.id,{...c,remoteId:c.remoteId,externalId:c.externalId,status:"archived"}])??[])},l!==a&&(this._threads=this.adapter.threads?.map(c=>c.id)??gu),u!==i&&(this._archivedThreads=this.adapter.archivedThreads?.map(c=>c.id)??gu),s!==o&&(this._mainThreadId=o,this._mainThread=this.threadFactory()),this._notifySubscribers())}async switchToThread(t){if(this._mainThreadId===t)return;let r=this.adapter.onSwitchToThread;if(!r)throw new Error("External store adapter does not support switching to thread");r(t)}async switchToNewThread(){let t=this.adapter.onSwitchToNewThread;if(!t)throw new Error("External store adapter does not support switching to new thread");t()}async rename(t,r){let n=this.adapter.onRename;if(!n)throw new Error("External store adapter does not support renaming");n(t,r)}async detach(){}async archive(t){let r=this.adapter.onArchive;if(!r)throw new Error("External store adapter does not support archiving");r(t)}async unarchive(t){let r=this.adapter.onUnarchive;if(!r)throw new Error("External store adapter does not support unarchiving");r(t)}async delete(t){let r=this.adapter.onDelete;if(!r)throw new Error("External store adapter does not support deleting");r(t)}initialize(t){return Promise.resolve({remoteId:t,externalId:void 0})}generateTitle(){throw new Error("Method not implemented.")}subscribe(t){return this._subscriptions.add(t),()=>this._subscriptions.delete(t)}_notifySubscribers(){for(let t of this._subscriptions)t()}};var xu=class{constructor(){P(this,"cache",new WeakMap)}convertMessages(t,r){return t.map((n,o)=>{let a=this.cache.get(n),i=r(a,n,o);return this.cache.set(n,i),i})}};var ew=class extends gd{constructor(r,n,{parentId:o,message:a}){super();P(this,"runtime");P(this,"endEditCallback");P(this,"_nonTextParts");P(this,"_previousText");P(this,"_parentId");P(this,"_sourceId");this.runtime=r,this.endEditCallback=n,this._parentId=o,this._sourceId=a.id,this._previousText=mi(a),this.setText(this._previousText),this.setRole(a.role),this.setAttachments(a.attachments??[]),this._nonTextParts=a.content.filter(i=>i.type!=="text"),this.setRunConfig({...r.composer.runConfig})}get canCancel(){return!0}getAttachmentAdapter(){return this.runtime.adapters?.attachments}async handleSend(r){mi(r)!==this._previousText&&this.runtime.append({...r,content:[...r.content,...this._nonTextParts],parentId:this._parentId,sourceId:this._sourceId}),this.handleCancel()}handleCancel(){this.endEditCallback(),this._notifySubscribers()}};var tw=class{constructor(t){P(this,"_contextProvider");P(this,"_subscriptions",new Set);P(this,"_isInitialized",!1);P(this,"repository",new Es);P(this,"composer",new yd(this));P(this,"_editComposers",new Map);P(this,"_stopSpeaking");P(this,"speech");P(this,"_eventSubscribers",new Map);this._contextProvider=t}get messages(){return this.repository.getMessages()}get state(){let t;for(let r of this.messages)if(r.role==="assistant"){t=r;break}return t?.metadata.unstable_state??null}getModelContext(){return this._contextProvider.getModelContext()}getEditComposer(t){return this._editComposers.get(t)}beginEdit(t){if(this._editComposers.has(t))throw new Error("Edit already in progress");this._editComposers.set(t,new ew(this,()=>this._editComposers.delete(t),this.repository.getMessage(t))),this._notifySubscribers()}getMessageById(t){try{return this.repository.getMessage(t)}catch{return}}getBranches(t){return this.repository.getBranches(t)}switchToBranch(t){this.repository.switchToBranch(t),this._notifySubscribers()}_notifySubscribers(){for(let t of this._subscriptions)t()}_notifyEventSubscribers(t){let r=this._eventSubscribers.get(t);if(r)for(let n of r)n()}subscribe(t){return this._subscriptions.add(t),()=>this._subscriptions.delete(t)}submitFeedback({messageId:t,type:r}){let n=this.adapters?.feedback;if(!n)throw new Error("Feedback adapter not configured");let{message:o,parentId:a}=this.repository.getMessage(t);if(n.submit({message:o,type:r}),o.role==="assistant"){let i={...o,metadata:{...o.metadata,submittedFeedback:{type:r}}};this.repository.addOrUpdateMessage(a,i)}this._notifySubscribers()}speak(t){let r=this.adapters?.speech;if(!r)throw new Error("Speech adapter not configured");let{message:n}=this.repository.getMessage(t);this._stopSpeaking?.();let o=r.speak(mi(n)),a=o.subscribe(()=>{o.status.type==="ended"?(this._stopSpeaking=void 0,this.speech=void 0):this.speech={messageId:t,status:o.status},this._notifySubscribers()});this.speech={messageId:t,status:o.status},this._notifySubscribers(),this._stopSpeaking=()=>{o.cancel(),a(),this.speech=void 0,this._stopSpeaking=void 0}}stopSpeaking(){if(!this._stopSpeaking)throw new Error("No message is being spoken");this._stopSpeaking(),this._notifySubscribers()}ensureInitialized(){this._isInitialized||(this._isInitialized=!0,this._notifyEventSubscribers("initialize"))}export(){return this.repository.export()}import(t){this.ensureInitialized(),this.repository.clear(),this.repository.import(t),this._notifySubscribers()}reset(t){this.import(pu.fromArray(t??[]))}unstable_on(t,r){if(t==="model-context-update")return this._contextProvider.subscribe?.(r)??(()=>{});let n=this._eventSubscribers.get(t);return n?n.add(r):this._eventSubscribers.set(t,new Set([r])),()=>{this._eventSubscribers.get(t).delete(r)}}};var ooe=Object.freeze([]),aoe=(e,t)=>e&&t[t.length-1]?.role!=="assistant",rw=class extends tw{constructor(r,n){super(r);P(this,"_assistantOptimisticId",null);P(this,"_capabilities",{switchToBranch:!1,switchBranchDuringRun:!1,edit:!1,reload:!1,cancel:!1,unstable_copy:!1,speech:!1,attachments:!1,feedback:!1});P(this,"_messages");P(this,"isDisabled");P(this,"suggestions",[]);P(this,"extras");P(this,"_converter",new xu);P(this,"_store");P(this,"updateMessages",r=>{this._store.convertMessage!==void 0?this._store.setMessages?.(r.flatMap(KP).filter(o=>o!=null)):this._store.setMessages?.(r)});this.__internal_setAdapter(n)}get capabilities(){return this._capabilities}get isLoading(){return this._store.isLoading??!1}get messages(){return this._messages}get state(){return this._store.state??super.state}get adapters(){return this._store.adapters}beginEdit(r){if(!this._store.onEdit)throw new Error("Runtime does not support editing.");super.beginEdit(r)}__internal_setAdapter(r){if(this._store===r)return;let n=r.isRunning??!1;this.isDisabled=r.isDisabled??!1;let o=this._store;this._store=r,this.extras=r.extras,this.suggestions=r.suggestions??ooe,this._capabilities={switchToBranch:this._store.setMessages!==void 0,switchBranchDuringRun:!1,edit:this._store.onEdit!==void 0,reload:this._store.onReload!==void 0,cancel:this._store.onCancel!==void 0,speech:this._store.adapters?.speech!==void 0,unstable_copy:this._store.unstable_capabilities?.copy!==!1,attachments:!!this._store.adapters?.attachments,feedback:!!this._store.adapters?.feedback};let a;if(r.messageRepository){if(o&&o.isRunning===r.isRunning&&o.messageRepository===r.messageRepository){this._notifySubscribers();return}this.repository.clear(),this._assistantOptimisticId=null,this.repository.import(r.messageRepository),a=this.repository.getMessages()}else if(r.messages){if(o){if(o.convertMessage!==r.convertMessage)this._converter=new xu;else if(o.isRunning===r.isRunning&&o.messages===r.messages){this._notifySubscribers();return}}a=r.convertMessage?this._converter.convertMessages(r.messages,(i,s,l)=>{if(!r.convertMessage)return s;let u=l===r.messages.length-1,c=pi(u,n,!1,!1,void 0);if(i&&(i.role!=="assistant"||!wb(i.status)||i.status===c))return i;let d=r.convertMessage(s,l),f=fo(d,l.toString(),c);return f[Tr]=s,f}):r.messages;for(let i=0;i<a.length;i++){let s=a[i],l=a[i-1];this.repository.addOrUpdateMessage(l?.id??null,s)}}else throw new Error("ExternalStoreAdapter must provide either 'messages' or 'messageRepository'");a.length>0&&this.ensureInitialized(),(o?.isRunning??!1)!==(r.isRunning??!1)&&(r.isRunning?this._notifyEventSubscribers("run-start"):this._notifyEventSubscribers("run-end")),this._assistantOptimisticId&&(this.repository.deleteMessage(this._assistantOptimisticId),this._assistantOptimisticId=null),aoe(n,a)&&(this._assistantOptimisticId=this.repository.appendOptimisticMessage(a.at(-1)?.id??null,{role:"assistant",content:[]})),this.repository.resetHead(this._assistantOptimisticId??a.at(-1)?.id??null),this._messages=this.repository.getMessages(),this._notifySubscribers()}switchToBranch(r){if(!this._store.setMessages)throw new Error("Runtime does not support switching branches.");this._store.isRunning||(this.repository.switchToBranch(r),this.updateMessages(this.repository.getMessages()))}async append(r){if(r.parentId!==(this.messages.at(-1)?.id??null)){if(!this._store.onEdit)throw new Error("Runtime does not support editing messages.");await this._store.onEdit(r)}else await this._store.onNew(r)}async startRun(r){if(!this._store.onReload)throw new Error("Runtime does not support reloading messages.");await this._store.onReload(r.parentId,r)}async resumeRun(r){if(!this._store.onResume)throw new Error("Runtime does not support resuming runs.");await this._store.onResume(r)}unstable_loadExternalState(r){if(!this._store.onLoadExternalState)throw new Error("Runtime does not support importing states.");this._store.onLoadExternalState(r)}cancelRun(){if(!this._store.onCancel)throw new Error("Runtime does not support cancelling runs.");this._store.onCancel(),this._assistantOptimisticId&&(this.repository.deleteMessage(this._assistantOptimisticId),this._assistantOptimisticId=null);let r=this.repository.getMessages(),n=r[r.length-1];n?.role==="user"&&n.id===r.at(-1)?.id?(this.repository.deleteMessage(n.id),this.composer.text.trim()||this.composer.setText(mi(n)),r=this.repository.getMessages()):this._notifySubscribers(),setTimeout(()=>{this.updateMessages(r)},0)}addToolResult(r){if(!this._store.onAddToolResult&&!this._store.onAddToolResult)throw new Error("Runtime does not support tool results.");this._store.onAddToolResult?.(r)}resumeToolCall(r){if(!this._store.onResumeToolCall)throw new Error("Runtime does not support resuming tool calls.");this._store.onResumeToolCall(r)}reset(r){let n=new Es;n.import(pu.fromArray(r??[])),this.updateMessages(n.getMessages())}import(r){this._assistantOptimisticId=null,super.import(r),this._store.onImport&&this._store.onImport(this.repository.getMessages())}};var f4=e=>e.adapters?.threadList??{},nw=class extends Ts{constructor(r){super();P(this,"threads");this.threads=new Qb(f4(r),()=>new rw(this._contextProvider,r))}setAdapter(r){this.threads.__internal_setAdapter(f4(r)),this.threads.getMainThreadRuntimeCore().__internal_setAdapter(r)}};var tL=e=>{let[t]=(0,vu.useState)(()=>new nw(e));(0,vu.useEffect)(()=>{t.setAdapter(e)});let{modelContext:r}=Yb()??{};return(0,vu.useEffect)(()=>{if(r)return t.registerModelContextProvider(r)},[r,t]),(0,vu.useMemo)(()=>new As(t),[t])};var mo=S(A(),1);var ioe=e=>{try{return JSON.parse(e),!0}catch{return!1}};function p4({state:e,getTools:t,onResult:r,setToolStatuses:n}){let o=(0,mo.useRef)({}),a=(0,mo.useRef)(new Map),i=(0,mo.useRef)(new AbortController),s=(0,mo.useRef)(0),l=(0,mo.useRef)([]),[u]=(0,mo.useState)(()=>{let[p,m]=Qm(),h=QP(t,()=>i.current?.signal??new AbortController().signal,(v,g)=>new Promise((y,x)=>{let b=a.current.get(v);b&&b.reject(new Error("Human input request was superseded by a new request")),a.current.set(v,{resolve:y,reject:x}),n(_=>({..._,[v]:{type:"interrupt",payload:{type:"human",payload:g}}}))}),{onExecutionStart:v=>{s.current++,n(g=>({...g,[v]:{type:"executing"}}))},onExecutionEnd:v=>{s.current--,n(g=>{let y={...g};return delete y[v],y}),s.current===0&&(l.current.forEach(g=>g()),l.current=[])}});return p.pipeThrough(h).pipeThrough(new fu).pipeTo(new WritableStream({write(v){if(v.type==="result"){if(o.current[v.meta.toolCallId]?.hasResult)return;r({type:"add-tool-result",toolCallId:v.meta.toolCallId,toolName:v.meta.toolName,result:v.result,isError:v.isError,...v.artifact&&{artifact:v.artifact}})}}})),m}),c=(0,mo.useRef)(new Set),d=(0,mo.useRef)(!0);(0,mo.useEffect)(()=>{let p=m=>{m.forEach(h=>{h.content.forEach(v=>{if(v.type==="tool-call"){if(d.current)c.current.add(v.toolCallId);else{if(c.current.has(v.toolCallId))return;let g=o.current[v.toolCallId];if(g||(g={argsText:"",hasResult:!1,argsComplete:!1,controller:u.addToolCallPart({toolName:v.toolName,toolCallId:v.toolCallId})},o.current[v.toolCallId]=g),v.argsText!==g.argsText&&!g.argsComplete){if(!v.argsText.startsWith(g.argsText))throw new Error(`Tool call argsText can only be appended, not updated: ${v.argsText} does not start with ${g.argsText}`);let y=v.argsText.slice(g.argsText.length);g.controller.argsText.append(y);let x=ioe(v.argsText);x&&g.controller.argsText.close(),o.current[v.toolCallId]={argsText:v.argsText,hasResult:g.hasResult,argsComplete:x,controller:g.controller}}v.result!==void 0&&!g.hasResult&&(g.controller.setResponse(new Xr({result:v.result,artifact:v.artifact,isError:v.isError})),g.controller.close(),o.current[v.toolCallId]={hasResult:!0,argsComplete:!0,argsText:g.argsText,controller:g.controller})}v.messages&&p(v.messages)}})})};p(e.messages),d.current&&(d.current=!1)},[e,u,r]);let f=()=>(a.current.forEach(({reject:p})=>{p(new Error("Tool execution aborted"))}),a.current.clear(),i.current.abort(),i.current=new AbortController,s.current===0?Promise.resolve():new Promise(p=>{l.current.push(p)}));return{reset:()=>{f(),d.current=!0},abort:f,resume:(p,m)=>{let h=a.current.get(p);if(h)a.current.delete(p),n(v=>({...v,[p]:{type:"executing"}})),h.resolve(m);else throw new Error(`Tool call ${p} is not waiting for human input`)}}}var ow=class{list(){return Promise.resolve({threads:[]})}rename(){return Promise.resolve()}archive(){return Promise.resolve()}unarchive(){return Promise.resolve()}delete(){return Promise.resolve()}initialize(t){return Promise.resolve({remoteId:t,externalId:void 0})}generateTitle(){return Promise.resolve(new ReadableStream)}fetch(t){return Promise.reject(new Error("Thread not found"))}};var O4=S(D(),1),$s=S(A(),1);var Ms=S(A(),1);function m4(e,t){e.commitTasks.forEach(r=>{let n=r.cellIndex,o=t.cells[n];if(o.type!=="effect")throw new Error("Cannot find effect cell");let a=!0;if(o.deps!==void 0&&r.deps!==void 0&&(a=o.deps.length!==r.deps.length||o.deps.some((i,s)=>!Object.is(i,r.deps[s]))),a){if(o.mounted){if(typeof o.deps!=typeof r.deps)throw new Error("tapEffect called with and without dependencies across re-renders");try{o.mounted&&o.cleanup&&o.cleanup()}finally{o.mounted=!1}}let i=r.effect();if(i!==void 0&&typeof i!="function")throw new Error(`An effect function must either return a cleanup function or nothing. Received: ${typeof i}`);o.mounted=!0,o.cleanup=typeof i=="function"?i:void 0,o.deps=r.deps}})}function h4(e){let t=null;for(let r=e.cells.length-1;r>=0;r--){let n=e.cells[r];if(n?.type==="effect"&&n.mounted&&n.cleanup)try{n.cleanup()}catch(o){t==null&&(t=o)}finally{n.mounted=!1}}if(t!=null)throw t}var ih=null;function g4(e,t){e.currentIndex=0;let r=ih;ih=e;try{if(t(),e.isFirstRender=!1,e.cells.length!==e.currentIndex)throw new Error(`Rendered ${e.currentIndex} hooks but expected ${e.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{ih=r}}function sh(){if(!ih)throw new Error("No resource fiber available");return ih}function aw(e,t){let r=e[rL];if(!r)throw new Error("ResourceElement.type is not a valid Resource");return r(t)}var rL=Symbol("fnSymbol");function Rs(e,t){return{resource:e,scheduleRerender:t,cells:[],currentIndex:0,renderContext:void 0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function gi(e){e.isMounted=!1,h4(e)}function yi(e,t){let r={commitTasks:[],props:t,state:void 0};return g4(e,()=>{e.renderContext=r;try{r.state=aw(e.resource,t)}finally{e.renderContext=void 0}}),r}function xi(e,t){e.isMounted=!0,e.isNeverMounted=!1,m4(t,e)}var soe=globalThis.__ASSISTANT_UI_DISABLE_LAYOUT_EFFECT__===!0,y4=soe?Ms.useEffect:Ms.useLayoutEffect;function bu(e){let[,t]=(0,Ms.useState)({}),r=(0,Ms.useMemo)(()=>Rs(e.type,()=>t({})),[e.type]),n=yi(r,e.props);return y4(()=>()=>gi(r),[r]),y4(()=>{xi(r,n)}),n.state}var qo=e=>typeof e=="string"?{scope:e.split(".")[0],event:e}:{scope:e.scope,event:e.event},ka=(e,t,r)=>t===e;var Cd,nL=()=>{if(Cd)return Cd;let e=()=>({apis:new Map,nextId:0,listeners:new Set});if(typeof window>"u")return Cd=e(),Cd;let t=window.__ASSISTANT_UI_DEVTOOLS_HOOK__;if(t)return Cd=t,t;let r=e();return window.__ASSISTANT_UI_DEVTOOLS_HOOK__=r,Cd=r,r};var vi=class vi{static register(t){let r=nL();for(let s of r.apis.values())if(s.api===t)return()=>{};let n=r.nextId++,o={api:t,logs:[]},a=t.on?.("*",s=>{let l=r.apis.get(n);l&&(l.logs.push({time:new Date,event:s.event,data:s.payload}),l.logs.length>vi.MAX_EVENT_LOGS_PER_API&&(l.logs=l.logs.slice(-vi.MAX_EVENT_LOGS_PER_API)),vi.notifyListeners(n))}),i=t.subscribe?.(()=>{vi.notifyListeners(n)});return r.apis.set(n,o),vi.notifyListeners(n),()=>{let s=nL();s.apis.get(n)&&(a?.(),i?.(),s.apis.delete(n),vi.notifyListeners(n))}}static notifyListeners(t){nL().listeners.forEach(n=>n(t))}};P(vi,"MAX_EVENT_LOGS_PER_API",200);var iw=vi;function Te(e){let t=r=>({type:t,props:r});return t[rL]=e,t}var loe=e=>{if(e.renderContext)throw new Error("Resource updated during render");if(e.isMounted)e.scheduleRerender();else if(e.isNeverMounted)throw new Error("Resource updated before mount")};function uoe(e){let t=sh(),r=t.currentIndex++;if(!t.isFirstRender&&r>=t.cells.length)throw new Error("Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.");if(!t.cells[r]){let a={type:"state",value:typeof e=="function"?e():e,set:i=>{let s=a.value,l=typeof i=="function"?i(s):i;Object.is(s,l)||(a.value=l,loe(t))}};t.cells[r]=a}let n=t.cells[r];if(n.type!=="state")throw new Error("Hook order changed between renders");return n}function lr(e){let t=uoe(e);return[t.value,t.set]}function coe(){let e=sh(),t=e.currentIndex++;if(!e.isFirstRender&&t>=e.cells.length)throw new Error("Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.");if(!e.cells[t]){let n={type:"effect",mounted:!1};e.cells[t]=n}if(e.cells[t].type!=="effect")throw new Error("Hook order changed between renders");return t}function ot(e,t){let r=sh(),n=coe();r.renderContext.commitTasks.push({effect:e,deps:t,cellIndex:n})}function Ho(e){let[t]=lr(()=>({current:e}));return t}var x4=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0};var ye=(e,t)=>{let r=Ho();return r.current||(r.current={value:e(),deps:t}),x4(r.current.deps,t)||(r.current.value=e(),r.current.deps=t),r.current.value};var v4=(e,t)=>ye(()=>e,t);function bi(e,t){let[r,n]=lr({}),o=ye(()=>Rs(e.type,()=>n({})),[e.type]),a=t?ye(()=>e.props,t):e.props,i=ye(()=>yi(o,a),[o,a,r]);return ot(()=>()=>gi(o),[o]),ot(()=>{xi(o,i)},[o,i]),i.state}function Pr(e){return aw(e.type,e.props)}function lh(e,t,r){let[n,o]=lr(0),a=v4(()=>o(u=>u+1),[]),[i]=lr(()=>new Map),s=ye(()=>t,r),l=ye(()=>{let u={remove:[],add:[],commit:[],return:{}};for(let c in e){let d=e[c],f=s(d,c),p=i.get(c);(!p||p.resource!==f.type)&&(p&&u.remove.push(c),p=Rs(f.type,a),u.add.push([c,p]));let m=yi(p,f.props);u.commit.push([c,m]),u.return[c]=m.state}if(i.size>u.commit.length-u.add.length+u.remove.length)for(let c of i.keys())c in e||u.remove.push(c);return u},[e,s,n]);return ot(()=>()=>{for(let u of i.keys())gi(i.get(u)),i.delete(u)},[]),ot(()=>{for(let u of l.remove)gi(i.get(u)),i.delete(u);for(let[u,c]of l.add)i.set(u,c);for(let[u,c]of l.commit)xi(i.get(u),c)},[l]),l.return}var Ca={schedulers:new Set([]),isScheduled:!1},sw=class{constructor(t){P(this,"_task");P(this,"_isDirty",!1);this._task=t}get isDirty(){return this._isDirty}markDirty(){this._isDirty=!0,Ca.schedulers.add(this),doe()}runTask(){this._isDirty=!1,this._task()}},doe=()=>{Ca.isScheduled||(Ca.isScheduled=!0,queueMicrotask(b4))},b4=()=>{try{let e=[],t=0;for(let r of Ca.schedulers)if(Ca.schedulers.delete(r),!!r.isDirty){if(t++,t>50)throw new Error("Maximum update depth exceeded. This can happen when a resource repeatedly calls setState inside tapEffect.");try{r.runTask()}catch(n){e.push(n)}}if(e.length>0)throw e.length===1?e[0]:new AggregateError(e,"Errors occurred during flushSync")}finally{Ca.schedulers.clear(),Ca.isScheduled=!1}},_d=e=>{let t=Ca;Ca={schedulers:new Set([]),isScheduled:!0};try{let r=e();return b4(),r}finally{Ca=t}};var foe=Te(e=>{let[,t]=lr(e.element),r=bi(e.element),n=Ho(new Set).current,o=Ho(r);return ot(()=>{r!==o.current&&(o.current=r,n.forEach(i=>i()))}),ye(()=>({getState:()=>o.current,subscribe:i=>(n.add(i),()=>n.delete(i)),render:i=>{let s=e.element!==i;e.element=i,e.onRender(s)&&t(i)},unmount:e.onUnmount}),[])}),oL=(e,{mount:t=!0}={})=>{let r=t,n,o={element:e,onRender:s=>r?s:(r=!0,_d(()=>{s&&(n=yi(i,o)),!a.isDirty&&xi(i,n)}),!1),onUnmount:()=>{if(!r)throw new Error("Resource not mounted");r=!1,gi(i)}},a=new sw(()=>{n=yi(i,o),!(a.isDirty||!r)&&xi(i,n)}),i=Rs(foe,()=>a.markDirty());return _d(()=>{a.markDirty()}),n.state};var uh=Symbol("tap.Context"),ch=e=>({[uh]:e}),dh=(e,t,r)=>{let n=e[uh];e[uh]=t;try{return r()}finally{e[uh]=n}},fh=e=>e[uh];var w4=S(A(),1);var S4=e=>{let t=Q();(0,w4.useEffect)(()=>{if(!(!e?.toolName||!e?.render))return t.tools().setToolUI(e.toolName,e.render)},[t,e?.toolName,e?.render])};var ph=e=>{let t=()=>(S4(e),null);return t.unstable_tool=e,t};var I4=e=>{let t,r=new Set,n=(u,c)=>{let d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){let f=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(p=>p(t,f))}},o=()=>t,s={setState:n,getState:o,getInitialState:()=>l,subscribe:u=>(r.add(u),()=>r.delete(u))},l=t=e(n,o,s);return s},k4=(e=>e?I4(e):I4);var mh=S(A(),1);var poe=e=>e;function moe(e,t=poe){let r=mh.default.useSyncExternalStore(e.subscribe,mh.default.useCallback(()=>t(e.getState()),[e,t]),mh.default.useCallback(()=>t(e.getInitialState()),[e,t]));return mh.default.useDebugValue(r),r}var C4=e=>{let t=k4(e),r=n=>moe(t,n);return Object.assign(r,t),r},_a=(e=>e?C4(e):C4);var T4=S(A(),1);function _4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wi(...e){return t=>{let r=!1,n=e.map(o=>{let a=_4(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():_4(e[o],null)}}}}function Ze(...e){return T4.useCallback(wi(...e),e)}var hh=Te(e=>{let t=ye(()=>oL(e,{mount:!1}),[e.type]);return ot(()=>{t.render(e)}),t});var aL=class{constructor(t){P(this,"ref");this.ref=t}get(t,r){return this.ref.current[r]}ownKeys(){return Object.keys(this.ref.current)}has(t,r){return r in this.ref.current}getOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(this.ref.current,r)}set(){return!1}setPrototypeOf(){return!1}defineProperty(){return!1}deleteProperty(){return!1}preventExtensions(){return!1}},$t=(e,t)=>{let r=Ho(e);ot(()=>{r.current=e});let n=ye(()=>new Proxy({},new aL(r)),[]),o=t?.key,a=e.getState();return ye(()=>({key:o,state:a,api:n}),[a,o])};var Vn=Te(e=>{let t=Ho(e.get);return ot(()=>{t.current=e.get}),ye(()=>xr({source:e.source,query:e.query,get:()=>t.current()}),[e.source,JSON.stringify(e.query)])}),hoe=Te(e=>{let t=bi(e.scopeElement);return ye(()=>[e.fieldName,t],[e.fieldName,t])}),P4=Te(e=>{let{on:t,subscribe:r,...n}=e,o=Ho({on:t,subscribe:r});ot(()=>{o.current={on:t,subscribe:r}});let a=lh(n,(i,s)=>hoe({fieldName:s,scopeElement:i}),[]);return ye(()=>{let i=Object.fromEntries(Object.values(a)),{on:s,subscribe:l}=o.current;return s&&(i.on=(u,c)=>s(u,c)),l&&(i.subscribe=u=>l(u)),i},[a])});var L4=ch(null),E4=(e,t)=>dh(L4,e,t),lw=()=>{let e=fh(L4);if(!e)throw new Error("Model context is not available in this context");return e};var iL=Te(({toolkit:e})=>{let[t,r]=lr(()=>({tools:{}})),n=lw();ot(()=>{if(!e)return;let a=[];for(let[l,u]of Object.entries(e))u.render&&a.push(o(l,u.render));let i=Object.entries(e).reduce((l,[u,c])=>{let{render:d,...f}=c;return l[u]=f,l},{}),s={getModelContext:()=>({tools:i})};return a.push(n.register(s)),()=>{a.forEach(l=>l())}},[e,n]);let o=(a,i)=>(r(s=>({...s,tools:{...s.tools,[a]:[...s.tools[a]??[],i]}})),()=>{r(s=>({...s,tools:{...s.tools,[a]:s.tools[a]?.filter(l=>l!==i)??[]}}))});return $t({getState:()=>t,setToolUI:o})});var sL=S(A(),1);var A4=Te(()=>ye(()=>{let t=new Map;return{on:(r,n)=>{t.has(r)||t.set(r,new Set);let o=t.get(r);return o.add(n),()=>{o.delete(n),o.size===0&&t.delete(r)}},emit:(r,n)=>{let o=t.get(r),a=t.get("*");!o&&!a||queueMicrotask(()=>{if(o)for(let i of o)i(n);if(a)for(let i of a)i({event:r,payload:n})})}}},[]));var R4=ch(null),M4=(e,t)=>dh(R4,e,t),Td=()=>{let e=fh(R4);if(!e)throw new Error("Events context is not available");return e};var $4=Te(()=>{let[e]=lr(()=>({})),t=new _s;return $t({getState:()=>e,getModelContext:()=>t.getModelContext(),subscribe:r=>t.subscribe(r),register:r=>t.registerModelContextProvider(r)})});var goe=Te(({threads:e,modelContext:t,tools:r})=>{let n=Pr(A4()),{threads:o,tools:a,modelContext:i}=M4(n,()=>{let l=bi(t??$4(),[t]);return E4(l.api,()=>({modelContext:l,tools:bi(r??iL({}),[r]),threads:bi(e,[e])}))}),s=ye(()=>({threads:o.state,tools:a.state,modelContext:i.state}),[o.state,a.state,i.state]);return $t({getState:()=>s,threads:o.api,tools:a.api,modelContext:i.api,on:n.on})}),yoe=e=>{let t=()=>e.getState().api.threads.item("main");return{threads:xr({source:"root",query:{},get:()=>e.getState().api.threads}),tools:xr({source:"root",query:{},get:()=>e.getState().api.tools}),modelContext:xr({source:"root",query:{},get:()=>e.getState().api.modelContext}),thread:xr({source:"threads",query:{type:"main"},get:()=>e.getState().api.threads.thread("main")}),threadListItem:xr({source:"threads",query:{type:"main"},get:()=>t()}),composer:xr({source:"thread",query:{},get:()=>e.getState().api.threads.thread("main").composer}),on(r,n){let{event:o,scope:a}=qo(r);if(a==="*")return e.getState().api.on(o,n);if(ka("thread",a,o)||ka("thread-list-item",a,o)||ka("composer",a,o))return e.getState().api.on(o,i=>{i.threadId===t().getState().id&&n(i)});throw new Error(`Event scope is not available in this component: ${a}`)},subscribe:e.subscribe}},D4=e=>{let t=Pd(),r=bu(hh(goe(e))),n=(0,sL.useMemo)(()=>yoe(r),[r]);return(0,sL.useMemo)(()=>lL(t,n),[t,n])};var xr=e=>{let t=e.get;return t.source=e.source,t.query=e.query,t},uw=()=>()=>{},N4=(0,$s.createContext)({threads:xr({source:null,query:{},get:()=>{throw new Error("Threads is only available inside <AssistantProvider />")}}),tools:xr({source:null,query:{},get:()=>{throw new Error("Tools is only available inside <AssistantProvider />")}}),modelContext:xr({source:null,query:{},get:()=>{throw new Error("ModelContext is only available inside <AssistantProvider />")}}),threadListItem:xr({source:null,query:{},get:()=>{throw new Error("ThreadListItem is only available inside <AssistantProvider />")}}),thread:xr({source:null,query:{},get:()=>{throw new Error("Thread is only available inside <AssistantProvider />")}}),composer:xr({source:null,query:{},get:()=>{throw new Error("Composer is only available inside <AssistantProvider />")}}),message:xr({source:null,query:{},get:()=>{throw new Error("Message is only available inside <ThreadPrimitive.Messages />")}}),part:xr({source:null,query:{},get:()=>{throw new Error("Part is only available inside <MessagePrimitive.Parts />")}}),attachment:xr({source:null,query:{},get:()=>{throw new Error("Attachment is only available inside <MessagePrimitive.Attachments /> or <ComposerPrimitive.Attachments />")}}),subscribe:uw,on:e=>{let{scope:t}=qo(e);throw new Error(`Event scope is not available in this component: ${t}`)}}),Pd=()=>(0,$s.useContext)(N4),qn=e=>{let t=Pd(),r=bu(P4(e));return(0,$s.useMemo)(()=>lL(t,r),[t,r])},xoe=e=>D4(e);function Q(e){return e?xoe(e):Pd()}var voe=(e,t)=>e===uw?t:t===uw?e:(...r)=>{let n=e(...r),o=t(...r);return()=>{n(),o()}},lL=(e,t)=>{let r=t.subscribe;return{...e,...t,subscribe:voe(e.subscribe,r??uw)}},vn=({api:e,children:t,devToolsVisible:r=!0})=>((0,$s.useEffect)(()=>{if(!(!r||!e.subscribe))return iw.register(e)},[e,r]),(0,O4.jsx)(N4.Provider,{value:e,children:t}));var Ld=S(A(),1);var ho,cw=class{constructor(t){Zl(this,ho);Gl(this,ho,t)}get threads(){return pn(this,ho).threads().getState()}get tools(){return pn(this,ho).tools().getState()}get threadListItem(){return pn(this,ho).threadListItem().getState()}get thread(){return pn(this,ho).thread().getState()}get composer(){return pn(this,ho).composer().getState()}get message(){return pn(this,ho).message().getState()}get part(){return pn(this,ho).part().getState()}get attachment(){return pn(this,ho).attachment().getState()}};ho=new WeakMap;var O=e=>{let t=Q(),r=(0,Ld.useMemo)(()=>new cw(t),[t]),n=(0,Ld.useSyncExternalStore)(t.subscribe,()=>e(r),()=>e(r));if((0,Ld.useDebugValue)(n),n instanceof cw)throw new Error("You tried to return the entire AssistantState. This is not supported due to technical limitations.");return n};var gh=S(A(),1);var yh=(e,t)=>{let r=Q(),n=(0,gh.useRef)(t);(0,gh.useEffect)(()=>{n.current=t});let{scope:o,event:a}=qo(e);(0,gh.useEffect)(()=>r.on({scope:o,event:a},i=>n.current(i)),[r,o,a])};var B4=S(A(),1);var z4=S(A(),1);function F4(e,t){function r(n){let o=(0,z4.useContext)(e);if(!n?.optional&&!o)throw new Error(`This component must be used within ${t}.`);return o}return r}function dw(e,t){function r(o){let a=e(o);return a?a[t]:null}function n(o){let a=!1,i;typeof o=="function"?i=o:o&&typeof o=="object"&&(a=!!o.optional,i=o.selector);let s=r({optional:a});return s?i?s(i):s():null}return{[t]:n,[`${t}Store`]:r}}var uL=(0,B4.createContext)(null),boe=F4(uL,"ThreadPrimitive.Viewport"),{useThreadViewport:Wo,useThreadViewportStore:Ds}=dw(boe,"useThreadViewport");var fw=S(A(),1);var j4=e=>{let t=e;t.__isBound||(t.__internal_bindMethods?.(),t.__isBound=!0)};function U4(e,t=woe){j4(e);let r=(0,fw.useSyncExternalStore)(e.subscribe,()=>t(e.getState()),()=>t(e.getState()));return(0,fw.useDebugValue)(r),r}var woe=e=>e;function xh(e){function t(r){let n=!1,o;typeof r=="function"?o=r:r&&(n=!!r.optional,o=r.selector);let a=e({optional:n});return a?U4(a,o):null}return t}function Ed(e){let t=Q(),r=O(()=>t.composer.source?t.composer().__internal_getRuntime?.()??null:null);if(!r&&!e?.optional)throw new Error("ComposerRuntime is not available");return r}var Soe=xh(Ed);function cL(e){let t=Q(),r=O(()=>t.message.source?t.message().__internal_getRuntime?.()??null:null);if(!r&&!e?.optional)throw new Error("MessageRuntime is not available");return r}var vh=xh(cL),Ioe=e=>cL(e)?.composer??null,koe=xh(Ioe);var dL=S(A(),1);var q4=e=>{let t={role:"assistant",content:[]};for(let r of e)if(r.role==="tool"){let n=t.content.findIndex(o=>o.type==="tool-call"&&o.toolCallId===r.toolCallId);if(n!==-1){let o=t.content[n];if(r.toolName!==void 0&&o.toolName!==r.toolName)throw new Error(`Tool call name ${r.toolCallId} ${r.toolName} does not match existing tool call ${o.toolName}`);t.content[n]={...o,[Tr]:[...o[Tr]??[],r],result:r.result,artifact:r.artifact,isError:r.isError,messages:r.messages}}else throw new Error(`Tool call ${r.toolCallId} ${r.toolName} not found in assistant message`)}else{let n=r.role,o=(typeof r.content=="string"?[{type:"text",text:r.content}]:r.content).map(a=>({...a,[Tr]:[r]}));switch(n){case"system":case"user":return{...r,content:o};case"assistant":t.content.length===0&&(t.id=r.id,t.createdAt??(t.createdAt=r.createdAt),t.status??(t.status=r.status),r.attachments&&(t.attachments=[...t.attachments??[],...r.attachments]),r.metadata&&(t.metadata??(t.metadata={}),r.metadata.unstable_state&&(t.metadata.unstable_state=r.metadata.unstable_state),r.metadata.unstable_annotations&&(t.metadata.unstable_annotations=[...t.metadata.unstable_annotations??[],...r.metadata.unstable_annotations]),r.metadata.unstable_data&&(t.metadata.unstable_data=[...t.metadata.unstable_data??[],...r.metadata.unstable_data]),r.metadata.steps&&(t.metadata.steps=[...t.metadata.steps??[],...r.metadata.steps]),r.metadata.custom&&(t.metadata.custom={...t.metadata.custom??{},...r.metadata.custom}),r.metadata.submittedFeedback&&(t.metadata.submittedFeedback=r.metadata.submittedFeedback))),t.content.push(...o);break;default:{let a=n;throw new Error(`Unknown message role: ${a}`)}}}return t},H4=(e,t)=>{let r=[],n=!1,o=!1,a=[],i=[],s=()=>{i.length&&r.push({inputs:a,outputs:i}),a=[],i=[],n=!1,o=!1};for(let l of e)for(let u of l.outputs)(o&&u.role!=="tool"||!n||u.role==="user"||u.role==="system")&&s(),n=u.role==="assistant"||u.role==="tool",a.at(-1)!==l.input&&a.push(l.input),i.push(u),u.role==="assistant"&&(u.convertConfig?.joinStrategy==="none"||t==="none")&&(o=!0);return s(),r},W4=(e,t,r,n)=>{let o=[];for(let i of e){let s=t(i,n),l=Array.isArray(s)?s:[s],u={input:i,outputs:l};o.push(u)}let a=H4(o);return a.map((i,s)=>{let l=s===a.length-1,u=q4(i.outputs),c=typeof u.content=="object"&&u.content.some(m=>m.type==="tool-call"&&m.result===void 0),d=typeof u.content=="object"&&u.content.some(m=>m.type==="tool-call"&&m.result===void 0),f=pi(l,r,c,d,l?n.error:void 0),p=fo(u,s.toString(),f);return p[Tr]=i.inputs,p})},Z4=({callback:e,messages:t,isRunning:r,joinStrategy:n,metadata:o})=>{let a=(0,dL.useMemo)(()=>({metadata:o??{},callback:e,callbackCache:new WeakMap,chunkCache:new WeakMap,converterCache:new xu}),[e,o]);return(0,dL.useMemo)(()=>{let i=[];for(let u of t){let c=a.callbackCache.get(u);if(!c){let d=a.callback(u,a.metadata),f=Array.isArray(d)?d:[d];c={input:u,outputs:f},a.callbackCache.set(u,c)}i.push(c)}let s=H4(i,n).map(u=>{let c=u.outputs[0];if(!c)return u;let d=a.chunkCache.get(c);return d&&V4(d.outputs,u.outputs)?d:(a.chunkCache.set(c,u),u)}),l=a.converterCache.convertMessages(s,(u,c,d)=>{let f=d===s.length-1,p=q4(c.outputs),m=typeof p.content=="object"&&p.content.some(y=>y.type==="tool-call"&&y.result===void 0),h=typeof p.content=="object"&&p.content.some(y=>y.type==="tool-call"&&y.result===void 0),v=pi(f,r,m,h,f?a.metadata.error:void 0);if(u&&(u.role!=="assistant"||!wb(u.status)||u.status===v)){let y=po(u);if(V4(y,c.inputs))return u}let g=fo(p,d.toString(),v);return g[Tr]=c.inputs,g});return l[Tr]=t,l},[a,t,r,n])},V4=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0};var bh=S(D(),1),rU=S(A(),1);var bn=e=>{let[,t]=lr(e.getState);return ot(()=>(t(e.getState()),e.subscribe(()=>{t(e.getState())})),[e]),e.getState()};var G4=Te(({runtime:e})=>{let t=bn(e),r=Td();return ot(()=>{let n=[],o=["switched-to","switched-away"];for(let a of o){let i=e.unstable_on(a,()=>{r.emit(`thread-list-item.${a}`,{threadId:e.getState().id})});n.push(i)}return()=>{for(let a of n)a()}},[e,r]),$t({getState:()=>t,switchTo:e.switchTo,rename:e.rename,archive:e.archive,unarchive:e.unarchive,delete:e.delete,generateTitle:e.generateTitle,initialize:e.initialize,detach:e.detach,__internal_getRuntime:()=>e},{key:t.id})});var Si=e=>{let t=ye(()=>Object.fromEntries(e),[e]),r=lh(t,a=>a,[]),n=ye(()=>Object.keys(r),[r]);return{state:ye(()=>{let a=new Array(n.length);for(let i=0;i<n.length;i++)a[i]=r[n[i]].state;return a},[n,r]),api:a=>{let i="index"in a?r[n[a.index]]?.api:r[a.key]?.api;if(!i)throw new Error(`tapLookupResources: Resource not found for lookup: ${JSON.stringify(a)}`);return i}}};var pw=Te(({runtime:e})=>{let t=bn(e);return $t({getState:()=>t,remove:e.remove,__internal_getRuntime:()=>e},{key:t.id})});var Coe=Te(({runtime:e,index:t})=>{let r=ye(()=>e.getAttachmentByIndex(t),[e,t]);return Pr(pw({runtime:r}))}),mw=Te(({threadIdRef:e,messageIdRef:t,runtime:r})=>{let n=bn(r),o=Td();ot(()=>{let s=[],l=["send","attachment-add"];for(let u of l){let c=r.unstable_on(u,()=>{o.emit(`composer.${u}`,{threadId:e.current,...t&&{messageId:t.current}})});s.push(c)}return()=>{for(let u of s)u()}},[r,o,e,t]);let a=Si(n.attachments.map((s,l)=>[s.id,Coe({runtime:r,index:l})])),i=ye(()=>({text:n.text,role:n.role,attachments:a.state,runConfig:n.runConfig,isEditing:n.isEditing,canCancel:n.canCancel,attachmentAccept:n.attachmentAccept,isEmpty:n.isEmpty,type:n.type??"thread"}),[n,a.state]);return $t({getState:()=>i,setText:r.setText,setRole:r.setRole,setRunConfig:r.setRunConfig,addAttachment:r.addAttachment,reset:r.reset,clearAttachments:r.clearAttachments,send:r.send,cancel:r.cancel,beginEdit:r.beginEdit??(()=>{throw new Error("beginEdit is not supported in this runtime")}),attachment:s=>"id"in s?a.api({key:s.id}):a.api(s),__internal_getRuntime:()=>r})});var K4=Te(({runtime:e})=>{let t=bn(e);return $t({getState:()=>t,addToolResult:n=>e.addToolResult(n),resumeToolCall:n=>e.resumeToolCall(n),__internal_getRuntime:()=>e},{key:t.type==="tool-call"?`toolCallId-${t.toolCallId}`:void 0})});var _oe=Te(({runtime:e,index:t})=>{let r=ye(()=>e.getAttachmentByIndex(t),[e,t]);return Pr(pw({runtime:r}))}),Toe=Te(({runtime:e,index:t})=>{let r=ye(()=>e.getMessagePartByIndex(t),[e,t]);return Pr(K4({runtime:r}))}),J4=Te(({runtime:e,threadIdRef:t})=>{let r=bn(e),[n,o]=lr(!1),[a,i]=lr(!1),s=ye(()=>({get current(){return e.getState().id}}),[e]),l=Pr(mw({runtime:e.composer,threadIdRef:t,messageIdRef:s})),u=Si(r.content.map((f,p)=>["toolCallId"in f&&f.toolCallId!=null?`toolCallId-${f.toolCallId}`:`index-${p}`,Toe({runtime:e,index:p})])),c=Si(r.attachments?.map((f,p)=>[f.id,_oe({runtime:e,index:p})])??[]),d=ye(()=>({...r,parts:u.state,composer:l.state,isCopied:n,isHovering:a}),[r,u.state,l.state,n,a]);return $t({getState:()=>d,composer:l.api,reload:f=>e.reload(f),speak:()=>e.speak(),stopSpeaking:()=>e.stopSpeaking(),submitFeedback:f=>e.submitFeedback(f),switchToBranch:f=>e.switchToBranch(f),getCopyText:()=>e.unstable_getCopyText(),part:f=>"index"in f?u.api({index:f.index}):u.api({key:`toolCallId-${f.toolCallId}`}),attachment:f=>"id"in f?c.api({key:f.id}):c.api(f),setIsCopied:o,setIsHovering:i,__internal_getRuntime:()=>e},{key:r.id})});var Poe=Te(({runtime:e,id:t,threadIdRef:r})=>{let n=ye(()=>e.getMessageById(t),[e,t]);return Pr(J4({runtime:n,threadIdRef:r}))}),X4=Te(({runtime:e})=>{let t=bn(e),r=Td();ot(()=>{let s=[],l=["run-start","run-end","initialize","model-context-update"];for(let u of l){let c=e.unstable_on(u,()=>{let d=e.getState()?.threadId||"unknown";r.emit(`thread.${u}`,{threadId:d})});s.push(c)}return()=>{for(let u of s)u()}},[e]);let n=ye(()=>({get current(){return e.getState().threadId}}),[e]),o=Pr(mw({runtime:e.composer,threadIdRef:n})),a=Si(t.messages.map(s=>[s.id,Poe({runtime:e,id:s.id,threadIdRef:n})])),i=ye(()=>({isEmpty:a.state.length===0&&!t.isLoading,isDisabled:t.isDisabled,isLoading:t.isLoading,isRunning:t.isRunning,capabilities:t.capabilities,state:t.state,suggestions:t.suggestions,extras:t.extras,speech:t.speech,composer:o.state,messages:a.state}),[t,a,o.state]);return $t({getState:()=>i,composer:o.api,append:e.append,startRun:e.startRun,unstable_resumeRun:e.unstable_resumeRun,cancelRun:e.cancelRun,getModelContext:e.getModelContext,export:e.export,import:e.import,reset:e.reset,stopSpeaking:e.stopSpeaking,startVoice:async()=>{throw new Error("startVoice is not supported in this runtime")},stopVoice:async()=>{throw new Error("stopVoice is not supported in this runtime")},message:s=>"id"in s?a.api({key:s.id}):a.api(s),__internal_getRuntime:()=>e})});var Loe=Te(({runtime:e,id:t})=>{let r=ye(()=>e.getItemById(t),[e,t]);return Pr(G4({runtime:r}))}),Y4=Te(({runtime:e,__internal_assistantRuntime:t})=>{let r=bn(e),n=Pr(X4({runtime:e.main})),o=Si(Object.keys(r.threadItems).map(i=>[i,Loe({runtime:e,id:i})])),a=ye(()=>({mainThreadId:r.mainThreadId,newThreadId:r.newThread??null,isLoading:r.isLoading,threadIds:r.threads,archivedThreadIds:r.archivedThreads,threadItems:o.state,main:n.state}),[r,o.state,n.state]);return $t({getState:()=>a,thread:()=>n.api,item:i=>{if(i==="main")return o.api({key:a.mainThreadId});if("id"in i)return o.api({key:i.id});let{index:s,archived:l=!1}=i,u=l?a.archivedThreadIds[s]:a.threadIds[s];return o.api({key:u})},switchToThread:i=>{e.switchToThread(i)},switchToNewThread:()=>{e.switchToNewThread()},__internal_getAssistantRuntime:()=>t})});var Q4=Te(e=>{let t=lw();return ot(()=>e.registerModelContextProvider(t),[e,t]),Pr(Y4({runtime:e.threads,__internal_assistantRuntime:e}))});var tU=S(D(),1),wu=S(A(),1);var fL=e=>{let t=new Map,r=()=>{let n=0;for(let o of t.values())n+=o;e(n)};return{register:()=>{let n=Symbol();return t.set(n,0),{setHeight:o=>{t.get(n)!==o&&(t.set(n,o),r())},unregister:()=>{t.delete(n),r()}}}}},eU=(e={})=>{let t=new Set,r=fL(i=>{a.setState({height:{...a.getState().height,viewport:i}})}),n=fL(i=>{a.setState({height:{...a.getState().height,inset:i}})}),o=fL(i=>{a.setState({height:{...a.getState().height,userMessage:i}})}),a=_a(()=>({isAtBottom:!0,scrollToBottom:({behavior:i="auto"}={})=>{for(let s of t)s({behavior:i})},onScrollToBottom:i=>(t.add(i),()=>{t.delete(i)}),turnAnchor:e.turnAnchor??"bottom",height:{viewport:0,inset:0,userMessage:0},registerViewport:r.register,registerContentInset:n.register,registerUserMessageHeight:o.register}));return a};var Os=e=>e;var Eoe=e=>{let t=Ds({optional:!0}),[r]=(0,wu.useState)(()=>eU(e));return(0,wu.useEffect)(()=>t?.getState().onScrollToBottom(()=>{r.getState().scrollToBottom()}),[t,r]),(0,wu.useEffect)(()=>{if(t)return r.subscribe(n=>{t.getState().isAtBottom!==n.isAtBottom&&Os(t).setState({isAtBottom:n.isAtBottom})})},[r,t]),(0,wu.useEffect)(()=>{let n={turnAnchor:e.turnAnchor??"bottom"};r.getState().turnAnchor!==n.turnAnchor&&Os(r).setState(n)},[r,e.turnAnchor]),r},Ad=({children:e,options:t={}})=>{let r=Eoe(t),[n]=(0,wu.useState)(()=>({useThreadViewport:r}));return(0,tU.jsx)(uL.Provider,{value:n,children:e})};var Aoe=e=>e._core?.RenderComponent,Roe=({children:e,runtime:t})=>{let r=Q({threads:Q4(t)}),n=Aoe(t);return(0,bh.jsxs)(vn,{api:r,children:[n&&(0,bh.jsx)(n,{}),(0,bh.jsx)(Ad,{children:e})]})},pL=(0,rU.memo)(Roe);var mL=S(D(),1);var hL=({index:e,archived:t,children:r})=>{let n=Q(),o=qn({threadListItem:Vn({source:"threads",query:{type:"index",index:e,archived:t},get:()=>n.threads().item({index:e,archived:t})}),on(a,i){let s=()=>n.threads().item({index:e,archived:t}),{event:l,scope:u}=qo(a);return ka("thread-list-item",u,l)?n.on({scope:"*",event:l},c=>{c.threadId===s().getState().id&&i(c)}):n.on(a,i)}});return(0,mL.jsx)(vn,{api:o,children:r})},gL=({id:e,children:t})=>{let r=Q(),n=qn({threadListItem:Vn({source:"threads",query:{type:"id",id:e},get:()=>r.threads().item({id:e})}),on(o,a){let i=()=>r.threads().item({id:e}),{event:s,scope:l}=qo(o);return ka("thread-list-item",l,s)?r.on({scope:"*",event:s},u=>{u.threadId===i().getState().id&&a(u)}):r.on(o,a)}});return(0,mL.jsx)(vn,{api:n,children:t})};var nU=S(D(),1);var yL=({index:e,children:t})=>{let r=Q(),n=qn({message:Vn({source:"thread",query:{type:"index",index:e},get:()=>r.thread().message({index:e})}),composer:Vn({source:"message",query:{},get:()=>r.thread().message({index:e}).composer}),on(o,a){let i=()=>r.thread().message({index:e}),{event:s,scope:l}=qo(o);return!ka("composer",l,s)&&!ka("message",l,s)?r.on(o,a):r.on({scope:"thread",event:s},u=>{u.messageId===i().getState().id&&a(u)})}});return(0,nU.jsx)(vn,{api:n,children:t})};var oU=S(D(),1);var wh=({index:e,children:t})=>{let r=Q(),n=qn({part:Vn({source:"message",query:{type:"index",index:e},get:()=>r.message().part({index:e})})});return(0,oU.jsx)(vn,{api:n,children:t})};var xL=S(D(),1);var vL=({index:e,children:t})=>{let r=Q(),n=qn({attachment:Vn({source:"message",query:{type:"index",index:e},get:()=>r.message().attachment({index:e})})});return(0,xL.jsx)(vn,{api:n,children:t})},bL=({index:e,children:t})=>{let r=Q(),n=qn({attachment:Vn({source:"composer",query:{type:"index",index:e},get:()=>r.composer().attachment({index:e})})});return(0,xL.jsx)(vn,{api:n,children:t})};var aU=S(D(),1);var Moe=Te(({text:e,isRunning:t})=>{let r=ye(()=>({type:"text",text:e,status:t?{type:"running"}:{type:"complete"}}),[e,t]);return $t({getState:()=>r,addToolResult:()=>{throw new Error("Not supported")},resumeToolCall:()=>{throw new Error("Not supported")}})}),Sh=({text:e,isRunning:t=!1,children:r})=>{let n=bu(hh(Moe({text:e,isRunning:t}))),o=qn({part:Vn({source:"root",query:{},get:()=>n.getState().api}),subscribe:n.subscribe});return(0,aU.jsx)(vn,{api:o,children:r})};var wL=e=>{let t={useThreadMessages:({messages:r,isRunning:n,joinStrategy:o,metadata:a})=>Z4({callback:e,messages:r,isRunning:n,joinStrategy:o,metadata:a}),toThreadMessages:(r,n=!1,o={})=>W4(r,e,n,o),toOriginalMessages:r=>{let n=po(r);if(n.length===0)throw new Error("No original messages found");return n},toOriginalMessage:r=>t.toOriginalMessages(r)[0],useOriginalMessage:()=>t.useOriginalMessages()[0],useOriginalMessages:()=>{let r=Q(),n=O(i=>{if(r.part.source)return po(i.part)}),o=O(({message:i})=>po(i)),a=n??o;if(a.length===0)throw new Error("No original messages found");return a}};return t};var fU=S(D(),1),Ii=S(A(),1);var iU=e=>{try{let r=e.split(".")[1];if(!r)throw new Error("Invalid JWT format");let n=r.replace(/-/g,"+").replace(/_/g,"/");for(;n.length%4!==0;)n+="=";let o=atob(n),i=JSON.parse(o).exp;if(!i||typeof i!="number")throw new Error('JWT does not contain a valid "exp" field');return i*1e3}catch(t){throw new Error(`Unable to determine the token expiry: ${t}`)}},kh,Ih=class{constructor(t){P(this,"strategy","jwt");P(this,"cachedToken",null);P(this,"tokenExpiry",null);Zl(this,kh);Gl(this,kh,t)}async getAuthHeaders(){let t=Date.now();if(this.cachedToken&&this.tokenExpiry&&this.tokenExpiry-t>30*1e3)return{Authorization:`Bearer ${this.cachedToken}`};let r=await pn(this,kh).call(this);return r?(this.cachedToken=r,this.tokenExpiry=iU(r),{Authorization:`Bearer ${r}`}):!1}readAuthHeaders(t){let r=t.get("Authorization");if(!r)return;let[n,o]=r.split(" ");if(n!=="Bearer"||!o)throw new Error("Invalid auth header received");this.cachedToken=o,this.tokenExpiry=iU(o)}};kh=new WeakMap;var Ch,_h,Th,gw=class{constructor(t,r,n){P(this,"strategy","api-key");Zl(this,Ch);Zl(this,_h);Zl(this,Th);Gl(this,Ch,t),Gl(this,_h,r),Gl(this,Th,n)}async getAuthHeaders(){return{Authorization:`Bearer ${pn(this,Ch)}`,"Aui-User-Id":pn(this,_h),"Aui-Workspace-Id":pn(this,Th)}}readAuthHeaders(){}};Ch=new WeakMap,_h=new WeakMap,Th=new WeakMap;var hw="aui:refresh_token",yw=class{constructor(t){P(this,"strategy","anon");P(this,"baseUrl");P(this,"jwtStrategy");this.baseUrl=t,this.jwtStrategy=new Ih(async()=>{let r=Date.now(),n=localStorage.getItem(hw),o=n?JSON.parse(n):void 0;if(o)if(new Date(o.expires_at).getTime()-r>30*1e3){let c=await fetch(`${this.baseUrl}/v1/auth/tokens/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:o.token})});if(c.ok){let d=await c.json(),{access_token:f,refresh_token:p}=d;return p&&localStorage.setItem(hw,JSON.stringify(p)),f}}else localStorage.removeItem(hw);let a=await fetch(`${this.baseUrl}/v1/auth/tokens/anonymous`,{method:"POST"});if(!a.ok)return null;let i=await a.json(),{access_token:s,refresh_token:l}=i;return!s||!l?null:(localStorage.setItem(hw,JSON.stringify(l)),s)})}async getAuthHeaders(){return this.jwtStrategy.getAuthHeaders()}readAuthHeaders(t){this.jwtStrategy.readAuthHeaders(t)}};var SL=class extends Error{constructor(t){super(t),this.name="APIError"}},xw=class{constructor(t){P(this,"_auth");P(this,"_baseUrl");if("authToken"in t)this._baseUrl=t.baseUrl,this._auth=new Ih(t.authToken);else if("apiKey"in t)this._baseUrl="https://backend.assistant-api.com",this._auth=new gw(t.apiKey,t.userId,t.workspaceId);else if("anonymous"in t)this._baseUrl=t.baseUrl,this._auth=new yw(t.baseUrl);else throw new Error("Invalid configuration: Must provide authToken, apiKey, or anonymous configuration")}async initializeAuth(){return!!this._auth.getAuthHeaders()}async makeRawRequest(t,r={}){let n=await this._auth.getAuthHeaders();if(!n)throw new Error("Authorization failed");let o={...n,...r.headers,"Content-Type":"application/json"},a=new URLSearchParams;if(r.query)for(let[l,u]of Object.entries(r.query))u!==!1&&(u===!0?a.set(l,"true"):a.set(l,u.toString()));let i=new URL(`${this._baseUrl}/v1${t}`);i.search=a.toString();let s=await fetch(i,{method:r.method??"GET",headers:o,body:r.body?JSON.stringify(r.body):null});if(this._auth.readAuthHeaders(s.headers),!s.ok){let l=await s.text();try{let u=JSON.parse(l);throw new SL(u.message)}catch{throw new Error(`Request failed with status ${s.status}, ${l}`)}}return s}async makeRequest(t,r={}){return(await this.makeRawRequest(t,r)).json()}};var vw=class{constructor(t){P(this,"cloud");this.cloud=t}async create(){return this.cloud.makeRequest("/auth/tokens",{method:"POST"})}};var bw=class{constructor(t){P(this,"cloud");this.cloud=t}__internal_getAssistantOptions(t){return{api:`${this.cloud._baseUrl}/v1/runs/stream`,headers:async()=>{let r=await this.cloud._auth.getAuthHeaders();if(!r)throw new Error("Authorization failed");return{...r,Accept:"text/plain"}},body:{assistant_id:t,response_format:"vercel-ai-data-stream/v1",thread_id:"unstable_todo"}}}async stream(t){let r=await this.cloud.makeRawRequest("/runs/stream",{method:"POST",headers:{Accept:"text/plain"},body:t});return Ym.fromResponse(r,new eh)}};var ww=class{constructor(t){P(this,"cloud");this.cloud=t}async list(t,r){return this.cloud.makeRequest(`/threads/${encodeURIComponent(t)}/messages`,{query:r})}async create(t,r){return this.cloud.makeRequest(`/threads/${encodeURIComponent(t)}/messages`,{method:"POST",body:r})}};var Sw=class{constructor(t){P(this,"cloud");P(this,"messages");this.cloud=t,this.messages=new ww(t)}async list(t){return this.cloud.makeRequest("/threads",{query:t})}async get(t){return this.cloud.makeRequest(`/threads/${encodeURIComponent(t)}`)}async create(t){return this.cloud.makeRequest("/threads",{method:"POST",body:t})}async update(t,r){return this.cloud.makeRequest(`/threads/${encodeURIComponent(t)}`,{method:"PUT",body:r})}async delete(t){return this.cloud.makeRequest(`/threads/${encodeURIComponent(t)}`,{method:"DELETE"})}};var Iw=class{constructor(t){P(this,"cloud");this.cloud=t}async pdfToImages(t){return this.cloud.makeRequest("/files/pdf-to-images",{method:"POST",body:t})}async generatePresignedUploadUrl(t){return this.cloud.makeRequest("/files/attachments/generate-presigned-upload-url",{method:"POST",body:t})}};var Ph=class{constructor(t){P(this,"threads");P(this,"auth");P(this,"runs");P(this,"files");let r=new xw(t);this.threads=new Sw(r),this.auth={tokens:new vw(r)},this.runs=new bw(r),this.files=new Iw(r)}};var uU=S(A(),1);function kw(e,t=0){return t>100?!1:e===null||typeof e=="string"||typeof e=="boolean"?!0:typeof e=="number"?!Number.isNaN(e)&&Number.isFinite(e):Array.isArray(e)?e.every(r=>kw(r,t+1)):typeof e=="object"?Object.entries(e).every(([r,n])=>typeof r=="string"&&kw(n,t+1)):!1}var sU=e=>({role:e.role,content:e.content.map(t=>{let r=t.type;switch(r){case"text":return{type:"text",text:t.text};case"reasoning":return{type:"reasoning",text:t.text};case"source":return{type:"source",sourceType:t.sourceType,id:t.id,url:t.url,...t.title?{title:t.title}:void 0};case"tool-call":return kw(t.result)||console.warn(`tool-call result is not JSON! ${JSON.stringify(t)}`),{type:"tool-call",toolCallId:t.toolCallId,toolName:t.toolName,...JSON.stringify(t.args)===t.argsText?{args:t.args}:{argsText:t.argsText},...t.result?{result:t.result}:{},...t.isError?{isError:!0}:{}};default:{let n=r;throw new Error(`Message part type not supported by aui/v0: ${n}`)}}}),metadata:e.metadata,...e.status?{status:e.status?.type==="running"?{type:"incomplete",reason:"cancelled"}:e.status}:void 0}),lU=e=>{let t=e.content,r=fo({id:e.id,createdAt:e.created_at,...t},e.id,{type:"complete",reason:"unknown"});return{parentId:e.parent_id,message:r}};var IL=new WeakMap,kL=class{constructor(t,r){P(this,"parent");P(this,"formatAdapter");this.parent=t,this.formatAdapter=r}async append(t){let r=this.formatAdapter.encode(t),n=this.formatAdapter.getId(t.message);return this.parent._appendWithFormat(t.parentId,n,this.formatAdapter.format,r)}async load(){return this.parent._loadWithFormat(this.formatAdapter.format,t=>this.formatAdapter.decode(t))}},CL=class{constructor(t,r){P(this,"cloudRef");P(this,"store");this.cloudRef=t,this.store=r}get _getIdForLocalId(){return IL.has(this.store.threadListItem())||IL.set(this.store.threadListItem(),{}),IL.get(this.store.threadListItem())}withFormat(t){return new kL(this,t)}async append({parentId:t,message:r}){let{remoteId:n}=await this.store.threadListItem().initialize(),o=this.cloudRef.current.threads.messages.create(n,{parent_id:t?await this._getIdForLocalId[t]??t:null,format:"aui/v0",content:sU(r)}).then(({message_id:a})=>(this._getIdForLocalId[r.id]=a,a));return this._getIdForLocalId[r.id]=o,o.then(()=>{})}async load(){let t=this.store.threadListItem().getState().remoteId;if(!t)return{messages:[]};let{messages:r}=await this.cloudRef.current.threads.messages.list(t,{format:"aui/v0"});return{messages:r.filter(o=>o.format==="aui/v0").map(lU).reverse()}}async _appendWithFormat(t,r,n,o){let{remoteId:a}=await this.store.threadListItem().initialize(),i=this.cloudRef.current.threads.messages.create(a,{parent_id:t?await this._getIdForLocalId[t]??t:null,format:n,content:o}).then(({message_id:s})=>(this._getIdForLocalId[r]=s,s));return this._getIdForLocalId[r]=i,i.then(()=>{})}async _loadWithFormat(t,r){let n=this.store.threadListItem().getState().remoteId;if(!n)return{messages:[]};let{messages:o}=await this.cloudRef.current.threads.messages.list(n,{format:t});return{messages:o.filter(a=>a.format===t).map(a=>r({id:a.id,parent_id:a.parent_id,format:a.format,content:a.content})).reverse()}}},cU=e=>{let t=Q(),[r]=(0,uU.useState)(()=>new CL(e,t));return r};var dU=typeof process<"u"&&process?.env?.NEXT_PUBLIC_ASSISTANT_BASE_URL,_L=dU?new Ph({baseUrl:dU,anonymous:!0}):void 0,TL=e=>{let t=(0,Ii.useRef)(e);(0,Ii.useEffect)(()=>{t.current=e},[e]);let r=(0,Ii.useCallback)(function({children:a}){let i=cU({get current(){return t.current.cloud??_L}}),s=t.current.cloud??_L,l=(0,Ii.useMemo)(()=>new oh(s),[s]),u=(0,Ii.useMemo)(()=>({history:i,attachments:l}),[i,l]);return(0,fU.jsx)(Xb,{adapters:u,children:a})},[]),n=e.cloud??_L;return n?{list:async()=>{let{threads:o}=await n.threads.list();return{threads:o.map(a=>({status:a.is_archived?"archived":"regular",remoteId:a.id,title:a.title,externalId:a.external_id??void 0}))}},initialize:async()=>{let a=await(e.create?.()??Promise.resolve()),i=a?a.externalId:void 0,{thread_id:s}=await n.threads.create({last_message_at:new Date,external_id:i});return{externalId:i,remoteId:s}},rename:async(o,a)=>n.threads.update(o,{title:a}),archive:async o=>n.threads.update(o,{is_archived:!0}),unarchive:async o=>n.threads.update(o,{is_archived:!1}),delete:async o=>(await e.delete?.(o),n.threads.delete(o)),generateTitle:async(o,a)=>n.runs.stream({thread_id:o,assistant_id:"system/thread_title",messages:a}),fetch:async o=>{let a=await n.threads.get(o);return{status:a.is_archived?"archived":"regular",remoteId:a.id,title:a.title,externalId:a.external_id??void 0}},unstable_Provider:r}:new ow};var As=class{constructor(t){P(this,"_core");P(this,"threads");P(this,"_thread");this._core=t,this.threads=new Jb(t.threads),this._thread=this.threads.main,this.__internal_bindMethods()}get threadList(){return this.threads}__internal_bindMethods(){this.switchToNewThread=this.switchToNewThread.bind(this),this.switchToThread=this.switchToThread.bind(this),this.registerModelContextProvider=this.registerModelContextProvider.bind(this),this.registerModelConfigProvider=this.registerModelConfigProvider.bind(this),this.reset=this.reset.bind(this)}get thread(){return this._thread}switchToNewThread(){return this._core.threads.switchToNewThread()}switchToThread(t){return this._core.threads.switchToThread(t)}registerModelContextProvider(t){return this._core.registerModelContextProvider(t)}registerModelConfigProvider(t){return this.registerModelContextProvider(t)}reset({initialMessages:t}={}){return this._core.threads.getMainThreadRuntimeCore().import(pu.fromArray(t??[]))}};var pU=e=>{let{cloud:t,initialMessages:r,maxSteps:n,adapters:o,unstable_humanToolNames:a,...i}=e;return{localRuntimeOptions:{cloud:t,initialMessages:r,maxSteps:n,adapters:o,unstable_humanToolNames:a},otherOptions:i}};var Zo=S(A(),1);var Rd=S(A(),1);function Dt(e){let t=Rd.useRef(e);return Rd.useEffect(()=>{t.current=e}),Rd.useMemo(()=>(...r)=>t.current?.(...r),[])}var Cw=S(D(),1),Ns=S(A(),1);var mU=(0,Ns.createContext)(null),$oe=e=>({useSmoothStatus:_a(()=>e)}),Doe=({children:e})=>{let t=gU({optional:!0}),r=Q(),[n]=(0,Ns.useState)(()=>$oe(r.part().getState().status));return t?e:(0,Cw.jsx)(mU.Provider,{value:n,children:e})},hU=e=>{let t=(0,Ns.forwardRef)((r,n)=>(0,Cw.jsx)(Doe,{children:(0,Cw.jsx)(e,{...r,ref:n})}));return t.displayName=e.displayName,t};function gU(e){let t=(0,Ns.useContext)(mU);if(!e?.optional&&!t)throw new Error("This component must be used within a SmoothContextProvider.");return t}var{useSmoothStatus:yU,useSmoothStatusStore:xU}=dw(gU,"useSmoothStatus");var LL=class{constructor(t,r){P(this,"currentText");P(this,"setText");P(this,"animationFrameId",null);P(this,"lastUpdateTime",Date.now());P(this,"targetText","");P(this,"animate",()=>{let t=Date.now(),n=t-this.lastUpdateTime,o=this.targetText.length-this.currentText.length,a=Math.min(5,250/o),i=0;for(;n>=a&&i<o;)i++,n-=a;i!==o?this.animationFrameId=requestAnimationFrame(this.animate):this.animationFrameId=null,i!==0&&(this.currentText=this.targetText.slice(0,this.currentText.length+i),this.lastUpdateTime=t-n,this.setText(this.currentText))});this.currentText=t,this.setText=r}start(){this.animationFrameId===null&&(this.lastUpdateTime=Date.now(),this.animate())}stop(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}},PL=Object.freeze({type:"running"}),_w=(e,t=!1)=>{let{text:r}=e,n=O(({message:c})=>c.id),o=(0,Zo.useRef)(n),[a,i]=(0,Zo.useState)(r),s=xU({optional:!0}),l=Dt(c=>{if(i(c),s){let d=a!==c||e.status.type==="running"?PL:e.status;Os(s).setState(d,!0)}});(0,Zo.useEffect)(()=>{if(s){let c=t&&(a!==r||e.status.type==="running")?PL:e.status;Os(s).setState(c,!0)}},[s,t,r,a,e.status]);let[u]=(0,Zo.useState)(new LL(r,l));return(0,Zo.useEffect)(()=>{if(!t){u.stop();return}if(o.current!==n||!r.startsWith(u.targetText)){o.current=n,l(r),u.currentText=r,u.targetText=r,u.stop();return}u.targetText=r,u.start()},[l,u,n,t,r]),(0,Zo.useEffect)(()=>()=>{u.stop()},[u]),(0,Zo.useMemo)(()=>t?{type:"text",text:a,status:r===a?e.status:PL}:e,[t,a,e,r])};var Eh=S(D(),1),ki=S(A(),1);var Tw=class extends Sa{constructor(r){super();P(this,"useRuntimeHook");P(this,"instances",new Map);P(this,"useAliveThreadsKeysChanged",_a(()=>({})));P(this,"_InnerActiveThreadProvider",({threadId:r})=>{let{useRuntime:n}=this.useRuntimeHook(),o=n(),a=o.thread.__internal_threadBinding,i=(0,ki.useCallback)(()=>{let u=this.instances.get(r);if(!u)throw new Error("Thread not found. This is a bug in assistant-ui.");u.runtime=a.getState(),this._notifySubscribers()},[r,a]),s=(0,ki.useRef)(!1);s.current||i(),(0,ki.useEffect)(()=>(s.current=!0,i(),a.outerSubscribe(i)),[a,i]);let l=Q();return(0,ki.useEffect)(()=>o.threads.main.unstable_on("initialize",()=>{if(l.threadListItem().getState().status==="new"){l.threadListItem().initialize();let c=o.thread.unstable_on("run-end",()=>{c(),l.threadListItem().generateTitle()})}}),[o,l]),null});P(this,"_OuterActiveThreadProvider",(0,ki.memo)(({threadId:r,provider:n})=>(0,Eh.jsx)(gL,{id:r,children:(0,Eh.jsx)(n,{children:(0,Eh.jsx)(this._InnerActiveThreadProvider,{threadId:r})})})));P(this,"__internal_RenderThreadRuntimes",({provider:r})=>(this.useAliveThreadsKeysChanged(),Array.from(this.instances.keys()).map(n=>(0,Eh.jsx)(this._OuterActiveThreadProvider,{threadId:n,provider:r},n))));this.useRuntimeHook=_a(()=>({useRuntime:r}))}startThreadRuntime(r){return this.instances.has(r)||(this.instances.set(r,{}),this.useAliveThreadsKeysChanged.setState({},!0)),new Promise((n,o)=>{let a=()=>{let s=this.instances.get(r);if(!s)i(),o(new Error("Thread was deleted before runtime was started"));else if(s.runtime)i(),n(s.runtime);else return},i=this.subscribe(a);a()})}getThreadRuntimeCore(r){let n=this.instances.get(r);if(n)return n.runtime}stopThreadRuntime(r){this.instances.delete(r),this.useAliveThreadsKeysChanged.setState({},!0)}setRuntimeHook(r){this.useRuntimeHook.getState().useRuntime!==r&&this.useRuntimeHook.setState({useRuntime:r},!0)}};var Yt=new Error("This is the empty thread, a placeholder for the main thread. You cannot perform any actions on this thread instance. This error is probably because you tried to call a thread method in your render function. Call the method inside a `useEffect` hook instead."),vU={getMessageById(){},getBranches(){return[]},switchToBranch(){throw Yt},append(){throw Yt},startRun(){throw Yt},resumeRun(){throw Yt},cancelRun(){throw Yt},addToolResult(){throw Yt},resumeToolCall(){throw Yt},speak(){throw Yt},stopSpeaking(){throw Yt},submitFeedback(){throw Yt},getModelContext(){return{}},unstable_loadExternalState(){throw Yt},composer:{attachments:[],attachmentAccept:"*",async addAttachment(){throw Yt},async removeAttachment(){throw Yt},isEditing:!0,canCancel:!1,isEmpty:!0,text:"",setText(){throw Yt},role:"user",setRole(){throw Yt},runConfig:{},setRunConfig(){throw Yt},async reset(){},async clearAttachments(){},send(){throw Yt},cancel(){},subscribe(){return()=>{}},unstable_on(){return()=>{}}},getEditComposer(){},beginEdit(){throw Yt},speech:void 0,capabilities:{switchToBranch:!1,switchBranchDuringRun:!1,edit:!1,reload:!1,cancel:!1,unstable_copy:!1,speech:!1,attachments:!1,feedback:!1},isDisabled:!1,isLoading:!1,messages:[],state:null,suggestions:[],extras:void 0,subscribe(){return()=>{}},import(){throw Yt},export(){return{messages:[]}},reset(){throw Yt},unstable_on(){return()=>{}}};var bU=(e,t,r)=>r.reduce((n,o)=>o?.(n,t)??n,e),Pw=class extends Sa{constructor(r){super();P(this,"_pendingTransforms",[]);P(this,"_baseValue");P(this,"_cachedValue");this._baseValue=r,this._cachedValue=r}_updateState(){this._cachedValue=this._pendingTransforms.reduce((r,n)=>bU(r,n.task,[n.loading,n.optimistic]),this._baseValue),this._notifySubscribers()}get baseValue(){return this._baseValue}get value(){return this._cachedValue}update(r){this._baseValue=r,this._updateState()}async optimisticUpdate(r){let n=r.execute(),o={...r,task:n};try{this._pendingTransforms.push(o),this._updateState();let a=await n;return this._baseValue=bU(this._baseValue,a,[r.optimistic,r.then]),a}finally{let a=this._pendingTransforms.indexOf(o);a>-1&&this._pendingTransforms.splice(a,1),this._updateState()}}};var Su=S(A(),1);var Ew=(e,t)=>{let r=e.threadIdMap[t];if(r!==void 0)return e.threadData[r]},Lw=(e,t,r)=>{let n=Ew(e,t);if(!n)return e;let{id:o,remoteId:a,status:i}=n;if(i===r)return e;let s={...e};switch(i){case"new":s.newThreadId=void 0;break;case"regular":s.threadIds=s.threadIds.filter(l=>l!==o);break;case"archived":s.archivedThreadIds=s.archivedThreadIds.filter(l=>l!==o);break;default:{let l=i;throw new Error(`Unsupported state: ${l}`)}}switch(r){case"regular":s.threadIds=[o,...s.threadIds];break;case"archived":s.archivedThreadIds=[o,...s.archivedThreadIds];break;case"deleted":s.threadData=Object.fromEntries(Object.entries(s.threadData).filter(([l])=>l!==o)),s.threadIdMap=Object.fromEntries(Object.entries(s.threadIdMap).filter(([l])=>l!==o&&l!==a));break;default:{let l=r;throw new Error(`Unsupported state: ${l}`)}}return r!=="deleted"&&(s.threadData={...s.threadData,[o]:{...n,status:r}}),s},Aw=class extends Sa{constructor(r,n){super();P(this,"contextProvider");P(this,"_options");P(this,"_hookManager");P(this,"_loadThreadsPromise");P(this,"_mainThreadId");P(this,"_state",new Pw({isLoading:!1,newThreadId:void 0,threadIds:[],archivedThreadIds:[],threadIdMap:{},threadData:{}}));P(this,"useProvider");P(this,"initialize",async r=>{if(this._state.value.newThreadId!==r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status==="new")throw new Error("Unexpected new state");return n.initializeTask}return this._state.optimisticUpdate({execute:()=>this._options.adapter.initialize(r),optimistic:n=>Lw(n,r,"regular"),loading:(n,o)=>{let a=r;return{...n,threadData:{...n.threadData,[a]:{...n.threadData[a],initializeTask:o}}}},then:(n,{remoteId:o,externalId:a})=>{let i=Ew(n,r);if(!i)return n;let s=r;return{...n,threadIdMap:{...n.threadIdMap,[o]:s},threadData:{...n.threadData,[s]:{...i,initializeTask:Promise.resolve({remoteId:o,externalId:a}),remoteId:o,externalId:a}}}}})});P(this,"generateTitle",async r=>{let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status==="new")throw new Error("Thread is not yet initialized");let{remoteId:o}=await n.initializeTask,a=this._hookManager.getThreadRuntimeCore(n.id);if(!a)return;let i=a.messages,s=await this._options.adapter.generateTitle(o,i),l=th.fromAssistantStream(s);for await(let u of l){let c=u.parts.filter(f=>f.type==="text")[0]?.text,d=this._state.baseValue;this._state.update({...d,threadData:{...d.threadData,[n.id]:{...n,title:c}}})}});P(this,"useBoundIds",_a(()=>[]));P(this,"__internal_RenderComponent",()=>{let r=(0,Su.useId)();(0,Su.useEffect)(()=>(this.useBoundIds.setState(i=>[...i,r],!0),()=>{this.useBoundIds.setState(i=>i.filter(s=>s!==r),!0)}),[r]);let n=this.useBoundIds(),{Provider:o}=this.useProvider(),a={modelContext:this.contextProvider};return(n.length===0||n[0]===r)&&(0,EL.jsx)(Xb,{adapters:a,children:(0,EL.jsx)(this._hookManager.__internal_RenderThreadRuntimes,{provider:o})})});this.contextProvider=n,this._state.subscribe(()=>this._notifySubscribers()),this._hookManager=new Tw(r.runtimeHook),this.useProvider=_a(()=>({Provider:r.adapter.unstable_Provider??Su.Fragment})),this.__internal_setOptions(r),this.switchToNewThread()}get threadData(){return this._state.value.threadData}getLoadThreadsPromise(){return this._loadThreadsPromise||(this._loadThreadsPromise=this._state.optimisticUpdate({execute:()=>this._options.adapter.list(),loading:r=>({...r,isLoading:!0}),then:(r,n)=>{let o=[],a=[],i={},s={};for(let l of n.threads){switch(l.status){case"regular":o.push(l.remoteId);break;case"archived":a.push(l.remoteId);break;default:{let c=l.status;throw new Error(`Unsupported state: ${c}`)}}let u=l.remoteId;i[l.remoteId]=u,s[u]={id:l.remoteId,remoteId:l.remoteId,externalId:l.externalId,status:l.status,title:l.title,initializeTask:Promise.resolve({remoteId:l.remoteId,externalId:l.externalId})}}return{...r,threadIds:o,archivedThreadIds:a,threadIdMap:{...r.threadIdMap,...i},threadData:{...r.threadData,...s}}}}).then(()=>{})),this._loadThreadsPromise}__internal_setOptions(r){if(this._options===r)return;this._options=r;let n=r.adapter.unstable_Provider??Su.Fragment;n!==this.useProvider.getState().Provider&&this.useProvider.setState({Provider:n},!0),this._hookManager.setRuntimeHook(r.runtimeHook)}__internal_load(){this.getLoadThreadsPromise()}get isLoading(){return this._state.value.isLoading}get threadIds(){return this._state.value.threadIds}get archivedThreadIds(){return this._state.value.archivedThreadIds}get newThreadId(){return this._state.value.newThreadId}get mainThreadId(){return this._mainThreadId}getMainThreadRuntimeCore(){let r=this._hookManager.getThreadRuntimeCore(this._mainThreadId);return r||vU}getThreadRuntimeCore(r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");let o=this._hookManager.getThreadRuntimeCore(n.id);if(!o)throw new Error("Thread not found");return o}getItemById(r){return Ew(this._state.value,r)}async switchToThread(r){let n=this.getItemById(r);if(!n){let a=await this._options.adapter.fetch(r),i=this._state.value,s=a.remoteId,l={...i.threadData,[s]:{id:s,initializeTask:Promise.resolve({remoteId:a.remoteId,externalId:a.externalId}),remoteId:a.remoteId,externalId:a.externalId,status:a.status,title:a.title}},u={...i.threadIdMap,[a.remoteId]:s},c=a.status==="regular"?[...i.threadIds,a.remoteId]:i.threadIds,d=a.status==="archived"?[...i.archivedThreadIds,a.remoteId]:i.archivedThreadIds;this._state.update({...i,threadIds:c,archivedThreadIds:d,threadIdMap:u,threadData:l}),n=this.getItemById(r)}if(!n)throw new Error("Thread not found");if(this._mainThreadId===n.id)return;let o=this._hookManager.startThreadRuntime(n.id);this.mainThreadId!==void 0?await o:o.then(()=>this._notifySubscribers()),n.status==="archived"&&await this.unarchive(n.id),this._mainThreadId=n.id,this._notifySubscribers()}async switchToNewThread(){for(;this._state.baseValue.newThreadId!==void 0&&this._state.value.newThreadId===void 0;)await this._state.waitForUpdate();let r=this._state.value,n=this._state.value.newThreadId;if(n===void 0){do n=`__LOCALID_${fi()}`;while(r.threadIdMap[n]);let o=n;this._state.update({...r,newThreadId:n,threadIdMap:{...r.threadIdMap,[n]:o},threadData:{...r.threadData,[o]:{status:"new",id:n,remoteId:void 0,externalId:void 0,title:void 0}}})}return this.switchToThread(n)}rename(r,n){let o=this.getItemById(r);if(!o)throw new Error("Thread not found");if(o.status==="new")throw new Error("Thread is not yet initialized");return this._state.optimisticUpdate({execute:async()=>{let{remoteId:a}=await o.initializeTask;return this._options.adapter.rename(a,n)},optimistic:a=>{let i=Ew(a,r);return i?{...a,threadData:{...a.threadData,[i.id]:{...i,title:n}}}:a}})}async _ensureThreadIsNotMain(r){if(r===this.newThreadId)throw new Error("Cannot ensure new thread is not main");r===this._mainThreadId&&await this.switchToNewThread()}async archive(r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status!=="regular")throw new Error("Thread is not yet initialized or already archived");return this._state.optimisticUpdate({execute:async()=>{await this._ensureThreadIsNotMain(n.id);let{remoteId:o}=await n.initializeTask;return this._options.adapter.archive(o)},optimistic:o=>Lw(o,n.id,"archived")})}unarchive(r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status!=="archived")throw new Error("Thread is not archived");return this._state.optimisticUpdate({execute:async()=>{try{let{remoteId:o}=await n.initializeTask;return await this._options.adapter.unarchive(o)}catch(o){throw await this._ensureThreadIsNotMain(n.id),o}},optimistic:o=>Lw(o,n.id,"regular")})}async delete(r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status!=="regular"&&n.status!=="archived")throw new Error("Thread is not yet initialized");return this._state.optimisticUpdate({execute:async()=>{await this._ensureThreadIsNotMain(n.id);let{remoteId:o}=await n.initializeTask;return await this._options.adapter.delete(o)},optimistic:o=>Lw(o,n.id,"deleted")})}async detach(r){let n=this.getItemById(r);if(!n)throw new Error("Thread not found");if(n.status!=="regular"&&n.status!=="archived")throw new Error("Thread is not yet initialized");await this._ensureThreadIsNotMain(n.id),this._hookManager.stopThreadRuntime(n.id)}};var AL=class extends Ts{constructor(r){super();P(this,"threads");this.threads=new Aw(r,this._contextProvider)}get RenderComponent(){return this.threads.__internal_RenderComponent}},Ooe=e=>{let[t]=(0,Md.useState)(()=>new AL(e));return(0,Md.useEffect)(()=>{t.threads.__internal_setOptions(e),t.threads.__internal_load()},[t,e]),(0,Md.useMemo)(()=>new As(t),[t])},Lh=e=>{if(Pd().threadListItem.source!==null){if(!e.allowNesting)throw new Error("useRemoteThreadListRuntime cannot be nested inside another RemoteThreadListRuntime. Set allowNesting: true to allow nesting (the inner runtime will become a no-op).");return e.runtimeHook()}return Ooe(e)};var Ci={};Et(Ci,{Copy:()=>ML,Edit:()=>NU,ExportMarkdown:()=>NL,FeedbackNegative:()=>OL,FeedbackPositive:()=>DL,Reload:()=>DU,Root:()=>RL,Speak:()=>FU,StopSpeaking:()=>$L});var TU=S(D(),1);var kU=S(A(),1),qoe=S(cu(),1);var Qt=S(A(),1);var $d=S(D(),1),Noe=Symbol.for("react.lazy"),Rw=Qt[" use ".trim().toString()];function zoe(e){return typeof e=="object"&&e!==null&&"then"in e}function wU(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Noe&&"_payload"in e&&zoe(e._payload)}function Ah(e){let t=Foe(e),r=Qt.forwardRef((n,o)=>{let{children:a,...i}=n;wU(a)&&typeof Rw=="function"&&(a=Rw(a._payload));let s=Qt.Children.toArray(a),l=s.find(joe);if(l){let u=l.props.children,c=s.map(d=>d===l?Qt.Children.count(u)>1?Qt.Children.only(null):Qt.isValidElement(u)?u.props.children:null:d);return(0,$d.jsx)(t,{...i,ref:o,children:Qt.isValidElement(u)?Qt.cloneElement(u,void 0,c):null})}return(0,$d.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Fs=Ah("Slot");function Foe(e){let t=Qt.forwardRef((r,n)=>{let{children:o,...a}=r;if(wU(o)&&typeof Rw=="function"&&(o=Rw(o._payload)),Qt.isValidElement(o)){let i=Voe(o),s=Uoe(a,o.props);return o.type!==Qt.Fragment&&(s.ref=n?wi(n,i):i),Qt.cloneElement(o,s)}return Qt.Children.count(o)>1?Qt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SU=Symbol("radix.slottable");function Boe(e){let t=({children:r})=>(0,$d.jsx)($d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=SU,t}var IU=Boe("Slottable");function joe(e){return Qt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SU}function Uoe(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Voe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var CU=S(D(),1),Hoe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ie=Hoe.reduce((e,t)=>{let r=Ah(`Primitive.${t}`),n=kU.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,CU.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});var PU=S(A(),1);var Ta;(function(e){e.Hidden="hidden",e.Floating="floating",e.Normal="normal"})(Ta||(Ta={}));var _U=({hideWhenRunning:e,autohide:t,autohideFloat:r})=>O(({thread:n,message:o})=>e&&n.isRunning?Ta.Hidden:t==="always"||t==="not-last"&&!o.isLast?o.isHovering?r==="always"||r==="single-branch"&&o.branchCount<=1?Ta.Floating:Ta.Normal:Ta.Hidden:Ta.Normal);var RL=(0,PU.forwardRef)(({hideWhenRunning:e,autohide:t,autohideFloat:r,...n},o)=>{let a=_U({hideWhenRunning:e,autohide:t,autohideFloat:r});return a===Ta.Hidden?null:(0,TU.jsx)(Ie.div,{...a===Ta.Floating?{"data-floating":"true"}:null,...n,ref:o})});RL.displayName="ActionBarPrimitive.Root";var LU=S(D(),1),EU=S(A(),1);var $$e=!!(typeof window<"u"&&window.document&&window.document.createElement);function we(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var AU=S(A(),1);var Woe=({copiedDuration:e=3e3}={})=>{let t=Q(),r=O(({message:i})=>(i.role!=="assistant"||i.status?.type!=="running")&&i.parts.some(s=>s.type==="text"&&s.text.length>0)),n=O(({composer:i})=>i.isEditing),o=O(({composer:i})=>i.text),a=(0,AU.useCallback)(()=>{let i=n?o:t.message().getCopyText();i&&navigator.clipboard.writeText(i).then(()=>{t.message().setIsCopied(!0),setTimeout(()=>t.message().setIsCopied(!1),e)})},[t,n,o,e]);return r?a:null},ML=(0,EU.forwardRef)(({copiedDuration:e,onClick:t,disabled:r,...n},o)=>{let a=O(({message:s})=>s.isCopied),i=Woe({copiedDuration:e});return(0,LU.jsx)(Ie.button,{type:"button",...a?{"data-copied":"true"}:{},...n,ref:o,disabled:r||!i,onClick:we(t,()=>{i?.()})})});ML.displayName="ActionBarPrimitive.Copy";var RU=S(D(),1),MU=S(A(),1);var Ge=(e,t,r=[])=>{let n=(0,MU.forwardRef)((o,a)=>{let i={},s={};Object.keys(o).forEach(u=>{r.includes(u)?i[u]=o[u]:s[u]=o[u]});let l=t(i)??void 0;return(0,RU.jsx)(Ie.button,{type:"button",...s,ref:a,disabled:s.disabled||!l,onClick:we(s.onClick,l)})});return n.displayName=e,n};var $U=S(A(),1);var Zoe=()=>{let e=Q(),t=O(n=>n.thread.isRunning||n.thread.isDisabled||n.message.role!=="assistant"),r=(0,$U.useCallback)(()=>{e.message().reload()},[e]);return t?null:r},DU=Ge("ActionBarPrimitive.Reload",Zoe);var OU=S(A(),1);var Goe=()=>{let e=Q(),t=O(({composer:n})=>n.isEditing),r=(0,OU.useCallback)(()=>{e.composer().beginEdit()},[e]);return t?null:r},NU=Ge("ActionBarPrimitive.Edit",Goe);var zU=S(A(),1);var Koe=()=>{let e=Q(),t=(0,zU.useCallback)(async()=>{e.message().speak()},[e]);return O(({message:n})=>(n.role!=="assistant"||n.status?.type!=="running")&&n.parts.some(o=>o.type==="text"&&o.text.length>0))?t:null},FU=Ge("ActionBarPrimitive.Speak",Koe);var jU=S(D(),1),UU=S(A(),1);var BU=S(A(),1);function Dd(e,t=globalThis?.document){let r=Dt(e);BU.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var VU=S(A(),1);var Joe=()=>{let e=Q(),t=O(({message:n})=>n.speech!=null),r=(0,VU.useCallback)(()=>{e.message().stopSpeaking()},[e]);return t?r:null},$L=(0,UU.forwardRef)((e,t)=>{let r=Joe();return Dd(n=>{r&&(n.preventDefault(),r())}),(0,jU.jsx)(Ie.button,{type:"button",disabled:!r,...e,ref:t,onClick:we(e.onClick,()=>{r?.()})})});$L.displayName="ActionBarPrimitive.StopSpeaking";var qU=S(D(),1),Mw=S(A(),1);var Xoe=()=>{let e=Q();return(0,Mw.useCallback)(()=>{e.message().submitFeedback({type:"positive"})},[e])},DL=(0,Mw.forwardRef)(({onClick:e,disabled:t,...r},n)=>{let o=O(i=>i.message.metadata.submittedFeedback?.type==="positive"),a=Xoe();return(0,qU.jsx)(Ie.button,{type:"button",...o?{"data-submitted":"true"}:{},...r,ref:n,disabled:t||!a,onClick:we(e,()=>{a?.()})})});DL.displayName="ActionBarPrimitive.FeedbackPositive";var HU=S(D(),1),WU=S(A(),1);var ZU=S(A(),1);var Yoe=()=>{let e=Q();return(0,ZU.useCallback)(()=>{e.message().submitFeedback({type:"negative"})},[e])},OL=(0,WU.forwardRef)(({onClick:e,disabled:t,...r},n)=>{let o=O(i=>i.message.metadata.submittedFeedback?.type==="negative"),a=Yoe();return(0,HU.jsx)(Ie.button,{type:"button",...o?{"data-submitted":"true"}:{},...r,ref:n,disabled:t||!a,onClick:we(e,()=>{a?.()})})});OL.displayName="ActionBarPrimitive.FeedbackNegative";var GU=S(D(),1),$w=S(A(),1);var Qoe=({filename:e,onExport:t}={})=>{let r=Q(),n=O(({message:a})=>(a.role!=="assistant"||a.status?.type!=="running")&&a.parts.some(i=>i.type==="text"&&i.text.length>0)),o=(0,$w.useCallback)(async()=>{let a=r.message().getCopyText();if(!a)return;if(t){await t(a);return}let i=new Blob([a],{type:"text/markdown"}),s=URL.createObjectURL(i),l=document.createElement("a");l.href=s,l.download=e??`message-${Date.now()}.md`,l.click(),URL.revokeObjectURL(s)},[r,e,t]);return n?o:null},NL=(0,$w.forwardRef)(({filename:e,onExport:t,onClick:r,disabled:n,...o},a)=>{let i=Qoe({filename:e,onExport:t});return(0,GU.jsx)(Ie.button,{type:"button",...o,ref:a,disabled:n||!i,onClick:we(r,()=>{i?.()})})});NL.displayName="ActionBarPrimitive.ExportMarkdown";var Ct=S(A(),1);var go=S(A(),1),zL=S(D(),1);function KU(e,t){let r=go.createContext(t),n=a=>{let{children:i,...s}=a,l=go.useMemo(()=>s,Object.values(s));return(0,zL.jsx)(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){let i=go.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Bs(e,t=[]){let r=[];function n(a,i){let s=go.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,v=go.useMemo(()=>m,Object.values(m));return(0,zL.jsx)(h.Provider,{value:v,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=go.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let o=()=>{let a=r.map(i=>go.createContext(i));return function(s){let l=s?.[e]||a;return go.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,eae(o,...t)]}function eae(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return go.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Ot=S(A(),1);var XU=S(A(),1),YU=S(cu(),1);var ur=S(A(),1);var Dw=S(D(),1);function JU(e){let t=tae(e),r=ur.forwardRef((n,o)=>{let{children:a,...i}=n,s=ur.Children.toArray(a),l=s.find(nae);if(l){let u=l.props.children,c=s.map(d=>d===l?ur.Children.count(u)>1?ur.Children.only(null):ur.isValidElement(u)?u.props.children:null:d);return(0,Dw.jsx)(t,{...i,ref:o,children:ur.isValidElement(u)?ur.cloneElement(u,void 0,c):null})}return(0,Dw.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function tae(e){let t=ur.forwardRef((r,n)=>{let{children:o,...a}=r;if(ur.isValidElement(o)){let i=aae(o),s=oae(a,o.props);return o.type!==ur.Fragment&&(s.ref=n?wi(n,i):i),ur.cloneElement(o,s)}return ur.Children.count(o)>1?ur.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rae=Symbol("radix.slottable");function nae(e){return ur.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rae}function oae(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function aae(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var QU=S(D(),1),iae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=iae.reduce((e,t)=>{let r=JU(`Primitive.${t}`),n=XU.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,QU.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function eV(e,t){e&&YU.flushSync(()=>e.dispatchEvent(t))}var BL=S(D(),1),sae="DismissableLayer",FL="dismissableLayer.update",lae="dismissableLayer.pointerDownOutside",uae="dismissableLayer.focusOutside",tV,nV=Ot.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Iu=Ot.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=Ot.useContext(nV),[c,d]=Ot.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=Ot.useState({}),m=Ze(t,C=>d(C)),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(v),y=c?h.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=y>=g,_=fae(C=>{let k=C.target,M=[...u.branches].some(L=>L.contains(k));!b||M||(o?.(C),i?.(C),C.defaultPrevented||s?.())},f),I=pae(C=>{let k=C.target;[...u.branches].some(L=>L.contains(k))||(a?.(C),i?.(C),C.defaultPrevented||s?.())},f);return Dd(C=>{y===u.layers.size-1&&(n?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},f),Ot.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tV=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),rV(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=tV)}},[c,f,r,u]),Ot.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),rV())},[c,u]),Ot.useEffect(()=>{let C=()=>p({});return document.addEventListener(FL,C),()=>document.removeEventListener(FL,C)},[]),(0,BL.jsx)(vt.div,{...l,ref:m,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,I.onFocusCapture),onBlurCapture:we(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,_.onPointerDownCapture)})});Iu.displayName=sae;var cae="DismissableLayerBranch",dae=Ot.forwardRef((e,t)=>{let r=Ot.useContext(nV),n=Ot.useRef(null),o=Ze(t,n);return Ot.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,BL.jsx)(vt.div,{...e,ref:o})});dae.displayName=cae;function fae(e,t=globalThis?.document){let r=Dt(e),n=Ot.useRef(!1),o=Ot.useRef(()=>{});return Ot.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let u=function(){oV(lae,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function pae(e,t=globalThis?.document){let r=Dt(e),n=Ot.useRef(!1);return Ot.useEffect(()=>{let o=a=>{a.target&&!n.current&&oV(uae,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function rV(){let e=new CustomEvent(FL);document.dispatchEvent(e)}function oV(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?eV(o,a):o.dispatchEvent(a)}var iV=S(A(),1),jL=0;function Ow(){iV.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aV()),document.body.insertAdjacentElement("beforeend",e[1]??aV()),jL++,()=>{jL===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jL--}},[])}function aV(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yo=S(A(),1);var dV=S(D(),1),UL="focusScope.autoFocusOnMount",VL="focusScope.autoFocusOnUnmount",sV={bubbles:!1,cancelable:!0},mae="FocusScope",Rh=yo.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=yo.useState(null),u=Dt(o),c=Dt(a),d=yo.useRef(null),f=Ze(t,h=>l(h)),p=yo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;yo.useEffect(()=>{if(n){let y=function(I){if(p.paused||!s)return;let C=I.target;s.contains(C)?d.current=C:js(d.current,{select:!0})},x=function(I){if(p.paused||!s)return;let C=I.relatedTarget;C!==null&&(s.contains(C)||js(d.current,{select:!0}))},b=function(I){if(document.activeElement===document.body)for(let k of I)k.removedNodes.length>0&&js(s)};var h=y,v=x,g=b;document.addEventListener("focusin",y),document.addEventListener("focusout",x);let _=new MutationObserver(b);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),_.disconnect()}}},[n,s,p.paused]),yo.useEffect(()=>{if(s){uV.add(p);let h=document.activeElement;if(!s.contains(h)){let g=new CustomEvent(UL,sV);s.addEventListener(UL,u),s.dispatchEvent(g),g.defaultPrevented||(hae(bae(fV(s)),{select:!0}),document.activeElement===h&&js(s))}return()=>{s.removeEventListener(UL,u),setTimeout(()=>{let g=new CustomEvent(VL,sV);s.addEventListener(VL,c),s.dispatchEvent(g),g.defaultPrevented||js(h??document.body,{select:!0}),s.removeEventListener(VL,c),uV.remove(p)},0)}}},[s,u,c,p]);let m=yo.useCallback(h=>{if(!r&&!n||p.paused)return;let v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(v&&g){let y=h.currentTarget,[x,b]=gae(y);x&&b?!h.shiftKey&&g===b?(h.preventDefault(),r&&js(x,{select:!0})):h.shiftKey&&g===x&&(h.preventDefault(),r&&js(b,{select:!0})):g===y&&h.preventDefault()}},[r,n,p.paused]);return(0,dV.jsx)(vt.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Rh.displayName=mae;function hae(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(js(n,{select:t}),document.activeElement!==r)return}function gae(e){let t=fV(e),r=lV(t,e),n=lV(t.reverse(),e);return[r,n]}function fV(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function lV(e,t){for(let r of e)if(!yae(r,{upTo:t}))return r}function yae(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xae(e){return e instanceof HTMLInputElement&&"select"in e}function js(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xae(e)&&t&&e.select()}}var uV=vae();function vae(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=cV(e,t),e.unshift(t)},remove(t){e=cV(e,t),e[0]?.resume()}}}function cV(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function bae(e){return e.filter(t=>t.tagName!=="A")}var qL=S(A(),1);var pV=S(A(),1),vr=globalThis?.document?pV.useLayoutEffect:()=>{};var wae=qL[" useId ".trim().toString()]||(()=>{}),Sae=0;function Us(e){let[t,r]=qL.useState(wae());return vr(()=>{e||r(n=>n??String(Sae++))},[e]),e||(t?`radix-${t}`:"")}var Sn=S(A(),1);var gV=["top","right","bottom","left"];var Pa=Math.min,Yr=Math.max,$h=Math.round,Dh=Math.floor,Go=e=>({x:e,y:e}),Iae={left:"right",right:"left",bottom:"top",top:"bottom"},kae={start:"end",end:"start"};function zw(e,t,r){return Yr(e,Pa(t,r))}function La(e,t){return typeof e=="function"?e(t):e}function Ea(e){return e.split("-")[0]}function ku(e){return e.split("-")[1]}function Fw(e){return e==="x"?"y":"x"}function Bw(e){return e==="y"?"height":"width"}var Cae=new Set(["top","bottom"]);function Ko(e){return Cae.has(Ea(e))?"y":"x"}function jw(e){return Fw(Ko(e))}function yV(e,t,r){r===void 0&&(r=!1);let n=ku(e),o=jw(e),a=Bw(o),i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Mh(i)),[i,Mh(i)]}function xV(e){let t=Mh(e);return[Nw(e),t,Nw(t)]}function Nw(e){return e.replace(/start|end/g,t=>kae[t])}var mV=["left","right"],hV=["right","left"],_ae=["top","bottom"],Tae=["bottom","top"];function Pae(e,t,r){switch(e){case"top":case"bottom":return r?t?hV:mV:t?mV:hV;case"left":case"right":return t?_ae:Tae;default:return[]}}function vV(e,t,r,n){let o=ku(e),a=Pae(Ea(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Nw)))),a}function Mh(e){return e.replace(/left|right|bottom|top/g,t=>Iae[t])}function Lae(e){return{top:0,right:0,bottom:0,left:0,...e}}function HL(e){return typeof e!="number"?Lae(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function bV(e,t,r){let{reference:n,floating:o}=e,a=Ko(t),i=jw(t),s=Bw(i),l=Ea(t),u=a==="y",c=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,p;switch(l){case"top":p={x:c,y:n.y-o.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ku(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var IV=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=bV(u,n,l),f=n,p={},m=0;for(let h=0;h<s.length;h++){let{name:v,fn:g}=s[h],{x:y,y:x,data:b,reset:_}=await g({x:c,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=y??c,d=x??d,p={...p,[v]:{...p[v],...b}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:c,y:d}=bV(u,f,l)),h=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Od(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=La(t,e),m=HL(p),v=s[f?d==="floating"?"reference":"floating":d],g=Cu(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),y=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),b=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},_=Cu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(g.top-_.top+m.top)/b.y,bottom:(_.bottom-g.bottom+m.bottom)/b.y,left:(g.left-_.left+m.left)/b.x,right:(_.right-g.right+m.right)/b.x}}var kV=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=La(e,t)||{};if(u==null)return{};let d=HL(c),f={x:r,y:n},p=jw(o),m=Bw(p),h=await i.getDimensions(u),v=p==="y",g=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],_=f[p]-a.reference[p],I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),C=I?I[x]:0;(!C||!await(i.isElement==null?void 0:i.isElement(I)))&&(C=s.floating[x]||a.floating[m]);let k=b/2-_/2,M=C/2-h[m]/2-1,L=Pa(d[g],M),j=Pa(d[y],M),Y=L,F=C-h[m]-j,K=C/2-h[m]/2+k,ee=zw(Y,K,F),se=!l.arrow&&ku(o)!=null&&K!==ee&&a.reference[m]/2-(K<Y?L:j)-h[m]/2<0,U=se?K<Y?K-Y:K-F:0;return{[p]:f[p]+U,data:{[p]:ee,centerOffset:K-ee-U,...se&&{alignmentOffset:U}},reset:se}}});var CV=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=La(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let g=Ea(o),y=Ko(s),x=Ea(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(x||!h?[Mh(s)]:xV(s)),I=m!=="none";!f&&I&&_.push(...vV(s,h,m,b));let C=[s,..._],k=await Od(t,v),M=[],L=((n=a.flip)==null?void 0:n.overflows)||[];if(c&&M.push(k[g]),d){let K=yV(o,i,b);M.push(k[K[0]],k[K[1]])}if(L=[...L,{placement:o,overflows:M}],!M.every(K=>K<=0)){var j,Y;let K=(((j=a.flip)==null?void 0:j.index)||0)+1,ee=C[K];if(ee&&(!(d==="alignment"?y!==Ko(ee):!1)||L.every(N=>Ko(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:K,overflows:L},reset:{placement:ee}};let se=(Y=L.filter(U=>U.overflows[0]<=0).sort((U,N)=>U.overflows[1]-N.overflows[1])[0])==null?void 0:Y.placement;if(!se)switch(p){case"bestFit":{var F;let U=(F=L.filter(N=>{if(I){let ve=Ko(N.placement);return ve===y||ve==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(ve=>ve>0).reduce((ve,T)=>ve+T,0)]).sort((N,ve)=>N[1]-ve[1])[0])==null?void 0:F[0];U&&(se=U);break}case"initialPlacement":se=s;break}if(o!==se)return{reset:{placement:se}}}return{}}}};function wV(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function SV(e){return gV.some(t=>e[t]>=0)}var _V=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=La(e,t);switch(n){case"referenceHidden":{let a=await Od(t,{...o,elementContext:"reference"}),i=wV(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:SV(i)}}}case"escaped":{let a=await Od(t,{...o,altBoundary:!0}),i=wV(a,r.floating);return{data:{escapedOffsets:i,escaped:SV(i)}}}default:return{}}}}};var TV=new Set(["left","top"]);async function Eae(e,t){let{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Ea(r),s=ku(r),l=Ko(r)==="y",u=TV.has(i)?-1:1,c=a&&l?-1:1,d=La(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var PV=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await Eae(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},LV=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=La(e,t),u={x:r,y:n},c=await Od(t,l),d=Ko(Ea(o)),f=Fw(d),p=u[f],m=u[d];if(a){let v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+c[v],x=p-c[g];p=zw(y,p,x)}if(i){let v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=m+c[v],x=m-c[g];m=zw(y,m,x)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:a,[d]:i}}}}}},EV=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=La(e,t),c={x:r,y:n},d=Ko(o),f=Fw(d),p=c[f],m=c[d],h=La(s,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let x=f==="y"?"height":"width",b=a.reference[f]-a.floating[x]+v.mainAxis,_=a.reference[f]+a.reference[x]-v.mainAxis;p<b?p=b:p>_&&(p=_)}if(u){var g,y;let x=f==="y"?"width":"height",b=TV.has(Ea(o)),_=a.reference[d]-a.floating[x]+(b&&((g=i.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),I=a.reference[d]+a.reference[x]+(b?0:((y=i.offset)==null?void 0:y[d])||0)-(b?v.crossAxis:0);m<_?m=_:m>I&&(m=I)}return{[f]:p,[d]:m}}}},AV=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=La(e,t),c=await Od(t,u),d=Ea(o),f=ku(o),p=Ko(o)==="y",{width:m,height:h}=a.floating,v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");let y=h-c.top-c.bottom,x=m-c.left-c.right,b=Pa(h-c[v],y),_=Pa(m-c[g],x),I=!t.middlewareData.shift,C=b,k=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=y),I&&!f){let L=Yr(c.left,0),j=Yr(c.right,0),Y=Yr(c.top,0),F=Yr(c.bottom,0);p?k=m-2*(L!==0||j!==0?L+j:Yr(c.left,c.right)):C=h-2*(Y!==0||F!==0?Y+F:Yr(c.top,c.bottom))}await l({...t,availableWidth:k,availableHeight:C});let M=await i.getDimensions(s.floating);return m!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function Uw(){return typeof window<"u"}function Tu(e){return MV(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jo(e){var t;return(t=(MV(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function MV(e){return Uw()?e instanceof Node||e instanceof wn(e).Node:!1}function xo(e){return Uw()?e instanceof Element||e instanceof wn(e).Element:!1}function Xo(e){return Uw()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function RV(e){return!Uw()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}var Aae=new Set(["inline","contents"]);function Nd(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Aae.has(o)}var Rae=new Set(["table","td","th"]);function $V(e){return Rae.has(Tu(e))}var Mae=[":popover-open",":modal"];function Oh(e){return Mae.some(t=>{try{return e.matches(t)}catch{return!1}})}var $ae=["transform","translate","scale","rotate","perspective"],Dae=["transform","translate","scale","rotate","perspective","filter"],Oae=["paint","layout","strict","content"];function Vw(e){let t=qw(),r=xo(e)?vo(e):e;return $ae.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Dae.some(n=>(r.willChange||"").includes(n))||Oae.some(n=>(r.contain||"").includes(n))}function DV(e){let t=_i(e);for(;Xo(t)&&!Pu(t);){if(Vw(t))return t;if(Oh(t))return null;t=_i(t)}return null}function qw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Nae=new Set(["html","body","#document"]);function Pu(e){return Nae.has(Tu(e))}function vo(e){return wn(e).getComputedStyle(e)}function Nh(e){return xo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _i(e){if(Tu(e)==="html")return e;let t=e.assignedSlot||e.parentNode||RV(e)&&e.host||Jo(e);return RV(t)?t.host:t}function OV(e){let t=_i(e);return Pu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xo(t)&&Nd(t)?t:OV(t)}function _u(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=OV(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=wn(o);if(a){let s=Hw(i);return t.concat(i,i.visualViewport||[],Nd(o)?o:[],s&&r?_u(s):[])}return t.concat(o,_u(o,[],r))}function Hw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BV(e){let t=vo(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Xo(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=$h(r)!==a||$h(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function ZL(e){return xo(e)?e:e.contextElement}function zd(e){let t=ZL(e);if(!Xo(t))return Go(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=BV(t),i=(a?$h(r.width):r.width)/n,s=(a?$h(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var zae=Go(0);function jV(e){let t=wn(e);return!qw()||!t.visualViewport?zae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fae(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wn(e)?!1:t}function Lu(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),a=ZL(e),i=Go(1);t&&(n?xo(n)&&(i=zd(n)):i=zd(e));let s=Fae(a,r,n)?jV(a):Go(0),l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){let f=wn(a),p=n&&xo(n)?wn(n):n,m=f,h=Hw(m);for(;h&&n&&p!==m;){let v=zd(h),g=h.getBoundingClientRect(),y=vo(h),x=g.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,b=g.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=x,u+=b,m=wn(h),h=Hw(m)}}return Cu({width:c,height:d,x:l,y:u})}function Ww(e,t){let r=Nh(e).scrollLeft;return t?t.left+r:Lu(Jo(e)).left+r}function UV(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ww(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Bae(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a=o==="fixed",i=Jo(n),s=t?Oh(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Go(1),c=Go(0),d=Xo(n);if((d||!d&&!a)&&((Tu(n)!=="body"||Nd(i))&&(l=Nh(n)),Xo(n))){let p=Lu(n);u=zd(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}let f=i&&!d&&!a?UV(i,l):Go(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function jae(e){return Array.from(e.getClientRects())}function Uae(e){let t=Jo(e),r=Nh(e),n=e.ownerDocument.body,o=Yr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+Ww(e),s=-r.scrollTop;return vo(n).direction==="rtl"&&(i+=Yr(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var NV=25;function Vae(e,t){let r=wn(e),n=Jo(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let c=qw();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let u=Ww(n);if(u<=0){let c=n.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-p);m<=NV&&(a-=m)}else u<=NV&&(a+=u);return{width:a,height:i,x:s,y:l}}var qae=new Set(["absolute","fixed"]);function Hae(e,t){let r=Lu(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Xo(e)?zd(e):Go(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,u=n*a.y;return{width:i,height:s,x:l,y:u}}function zV(e,t,r){let n;if(t==="viewport")n=Vae(e,r);else if(t==="document")n=Uae(Jo(e));else if(xo(t))n=Hae(t,r);else{let o=jV(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cu(n)}function VV(e,t){let r=_i(e);return r===t||!xo(r)||Pu(r)?!1:vo(r).position==="fixed"||VV(r,t)}function Wae(e,t){let r=t.get(e);if(r)return r;let n=_u(e,[],!1).filter(s=>xo(s)&&Tu(s)!=="body"),o=null,a=vo(e).position==="fixed",i=a?_i(e):e;for(;xo(i)&&!Pu(i);){let s=vo(i),l=Vw(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&qae.has(o.position)||Nd(i)&&!l&&VV(e,i))?n=n.filter(c=>c!==i):o=s,i=_i(i)}return t.set(e,n),n}function Zae(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[...r==="clippingAncestors"?Oh(t)?[]:Wae(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((u,c)=>{let d=zV(t,c,o);return u.top=Yr(d.top,u.top),u.right=Pa(d.right,u.right),u.bottom=Pa(d.bottom,u.bottom),u.left=Yr(d.left,u.left),u},zV(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gae(e){let{width:t,height:r}=BV(e);return{width:t,height:r}}function Kae(e,t,r){let n=Xo(t),o=Jo(t),a=r==="fixed",i=Lu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Go(0);function u(){l.x=Ww(o)}if(n||!n&&!a)if((Tu(t)!=="body"||Nd(o))&&(s=Nh(t)),n){let p=Lu(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&u();a&&!n&&o&&u();let c=o&&!n&&!a?UV(o,s):Go(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function WL(e){return vo(e).position==="static"}function FV(e,t){if(!Xo(e)||vo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Jo(e)===r&&(r=r.ownerDocument.body),r}function qV(e,t){let r=wn(e);if(Oh(e))return r;if(!Xo(e)){let o=_i(e);for(;o&&!Pu(o);){if(xo(o)&&!WL(o))return o;o=_i(o)}return r}let n=FV(e,t);for(;n&&$V(n)&&WL(n);)n=FV(n,t);return n&&Pu(n)&&WL(n)&&!Vw(n)?r:n||DV(e)||r}var Jae=async function(e){let t=this.getOffsetParent||qV,r=this.getDimensions,n=await r(e.floating);return{reference:Kae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Xae(e){return vo(e).direction==="rtl"}var HV={convertOffsetParentRelativeRectToViewportRelativeRect:Bae,getDocumentElement:Jo,getClippingRect:Zae,getOffsetParent:qV,getElementRects:Jae,getClientRects:jae,getDimensions:Gae,getScale:zd,isElement:xo,isRTL:Xae};function WV(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yae(e,t){let r=null,n,o=Jo(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let m=Dh(d),h=Dh(o.clientWidth-(c+f)),v=Dh(o.clientHeight-(d+p)),g=Dh(c),x={rootMargin:-m+"px "+-h+"px "+-v+"px "+-g+"px",threshold:Yr(0,Pa(1,l))||1},b=!0;function _(I){let C=I[0].intersectionRatio;if(C!==l){if(!b)return i();C?i(!1,C):n=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!WV(u,e.getBoundingClientRect())&&i(),b=!1}try{r=new IntersectionObserver(_,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,x)}r.observe(e)}return i(!0),a}function GL(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=ZL(e),c=o||a?[...u?_u(u):[],..._u(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),a&&g.addEventListener("resize",r)});let d=u&&s?Yae(u,r):null,f=-1,p=null;i&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let m,h=l?Lu(e):null;l&&v();function v(){let g=Lu(e);h&&!WV(h,g)&&r(),h=g,m=requestAnimationFrame(v)}return r(),()=>{var g;c.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var ZV=PV;var GV=LV,KV=CV,JV=AV,XV=_V,KL=kV;var YV=EV,JL=(e,t,r)=>{let n=new Map,o={platform:HV,...r},a={...o.platform,_c:n};return IV(e,t,{...o,platform:a})};var er=S(A(),1),e6=S(A(),1),t6=S(cu(),1),Qae=typeof document<"u",eie=function(){},Zw=Qae?e6.useLayoutEffect:eie;function Gw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Gw(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Gw(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function r6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QV(e,t){let r=r6(e);return Math.round(t*r)/r}function XL(e){let t=er.useRef(e);return Zw(()=>{t.current=e}),t}function n6(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=er.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=er.useState(n);Gw(f,n)||p(n);let[m,h]=er.useState(null),[v,g]=er.useState(null),y=er.useCallback(N=>{N!==I.current&&(I.current=N,h(N))},[]),x=er.useCallback(N=>{N!==C.current&&(C.current=N,g(N))},[]),b=a||m,_=i||v,I=er.useRef(null),C=er.useRef(null),k=er.useRef(c),M=l!=null,L=XL(l),j=XL(o),Y=XL(u),F=er.useCallback(()=>{if(!I.current||!C.current)return;let N={placement:t,strategy:r,middleware:f};j.current&&(N.platform=j.current),JL(I.current,C.current,N).then(ve=>{let T={...ve,isPositioned:Y.current!==!1};K.current&&!Gw(k.current,T)&&(k.current=T,t6.flushSync(()=>{d(T)}))})},[f,t,r,j,Y]);Zw(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);let K=er.useRef(!1);Zw(()=>(K.current=!0,()=>{K.current=!1}),[]),Zw(()=>{if(b&&(I.current=b),_&&(C.current=_),b&&_){if(L.current)return L.current(b,_,F);F()}},[b,_,F,L,M]);let ee=er.useMemo(()=>({reference:I,floating:C,setReference:y,setFloating:x}),[y,x]),se=er.useMemo(()=>({reference:b,floating:_}),[b,_]),U=er.useMemo(()=>{let N={position:r,left:0,top:0};if(!se.floating)return N;let ve=QV(se.floating,c.x),T=QV(se.floating,c.y);return s?{...N,transform:"translate("+ve+"px, "+T+"px)",...r6(se.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ve,top:T}},[r,s,se.floating,c.x,c.y]);return er.useMemo(()=>({...c,update:F,refs:ee,elements:se,floatingStyles:U}),[c,F,ee,se,U])}var tie=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?KL({element:n.current,padding:o}).fn(r):{}:n?KL({element:n,padding:o}).fn(r):{}}}},o6=(e,t)=>({...ZV(e),options:[e,t]}),a6=(e,t)=>({...GV(e),options:[e,t]}),i6=(e,t)=>({...YV(e),options:[e,t]}),s6=(e,t)=>({...KV(e),options:[e,t]}),l6=(e,t)=>({...JV(e),options:[e,t]});var u6=(e,t)=>({...XV(e),options:[e,t]});var c6=(e,t)=>({...tie(e),options:[e,t]});var d6=S(A(),1);var YL=S(D(),1),rie="Arrow",f6=d6.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,YL.jsx)(vt.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,YL.jsx)("polygon",{points:"0,0 30,0 15,10"})})});f6.displayName=rie;var p6=f6;var m6=S(A(),1);function h6(e){let[t,r]=m6.useState(void 0);return vr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Vs=S(D(),1);var QL="Popper",[g6,Fd]=Bs(QL),[oie,y6]=g6(QL),x6=e=>{let{__scopePopper:t,children:r}=e,[n,o]=Sn.useState(null);return(0,Vs.jsx)(oie,{scope:t,anchor:n,onAnchorChange:o,children:r})};x6.displayName=QL;var v6="PopperAnchor",b6=Sn.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=y6(v6,r),i=Sn.useRef(null),s=Ze(t,i),l=Sn.useRef(null);return Sn.useEffect(()=>{let u=l.current;l.current=n?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,Vs.jsx)(vt.div,{...o,ref:s})});b6.displayName=v6;var eE="PopperContent",[aie,iie]=g6(eE),w6=Sn.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...h}=e,v=y6(eE,r),[g,y]=Sn.useState(null),x=Ze(t,Je=>y(Je)),[b,_]=Sn.useState(null),I=h6(b),C=I?.width??0,k=I?.height??0,M=n+(a!=="center"?"-"+a:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},j=Array.isArray(u)?u:[u],Y=j.length>0,F={padding:L,boundary:j.filter(lie),altBoundary:Y},{refs:K,floatingStyles:ee,placement:se,isPositioned:U,middlewareData:N}=n6({strategy:"fixed",placement:M,whileElementsMounted:(...Je)=>GL(...Je,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[o6({mainAxis:o+k,alignmentAxis:i}),l&&a6({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?i6():void 0,...F}),l&&s6({...F}),l6({...F,apply:({elements:Je,rects:Lt,availableWidth:no,availableHeight:Mr})=>{let{width:$n,height:Dn}=Lt.reference,os=Je.floating.style;os.setProperty("--radix-popper-available-width",`${no}px`),os.setProperty("--radix-popper-available-height",`${Mr}px`),os.setProperty("--radix-popper-anchor-width",`${$n}px`),os.setProperty("--radix-popper-anchor-height",`${Dn}px`)}}),b&&c6({element:b,padding:s}),uie({arrowWidth:C,arrowHeight:k}),f&&u6({strategy:"referenceHidden",...F})]}),[ve,T]=k6(se),Ne=Dt(m);vr(()=>{U&&Ne?.()},[U,Ne]);let It=N.arrow?.x,E=N.arrow?.y,Ve=N.arrow?.centerOffset!==0,[fn,ns]=Sn.useState();return vr(()=>{g&&ns(window.getComputedStyle(g).zIndex)},[g]),(0,Vs.jsx)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:U?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fn,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Vs.jsx)(aie,{scope:r,placedSide:ve,onArrowChange:_,arrowX:It,arrowY:E,shouldHideArrow:Ve,children:(0,Vs.jsx)(vt.div,{"data-side":ve,"data-align":T,...h,ref:x,style:{...h.style,animation:U?void 0:"none"}})})})});w6.displayName=eE;var S6="PopperArrow",sie={top:"bottom",right:"left",bottom:"top",left:"right"},I6=Sn.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,a=iie(S6,n),i=sie[a.placedSide];return(0,Vs.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Vs.jsx)(p6,{...o,ref:r,style:{...o.style,display:"block"}})})});I6.displayName=S6;function lie(e){return e!==null}var uie=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=k6(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2,m="",h="";return u==="bottom"?(m=i?d:`${f}px`,h=`${-l}px`):u==="top"?(m=i?d:`${f}px`,h=`${n.floating.height+l}px`):u==="right"?(m=`${-l}px`,h=i?d:`${p}px`):u==="left"&&(m=`${n.floating.width+l}px`,h=i?d:`${p}px`),{data:{x:m,y:h}}}});function k6(e){let[t,r="center"]=e.split("-");return[t,r]}var Kw=x6,zh=b6,Jw=w6,Xw=I6;var Yw=S(A(),1),_6=S(cu(),1);var T6=S(D(),1),cie="Portal",Eu=Yw.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=Yw.useState(!1);vr(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?_6.default.createPortal((0,T6.jsx)(vt.div,{...n,ref:t}),i):null});Eu.displayName=cie;var In=S(A(),1);var P6=S(A(),1);function die(e,t){return P6.useReducer((r,n)=>t[r][n]??r,e)}var Yo=e=>{let{present:t,children:r}=e,n=fie(t),o=typeof r=="function"?r({present:n.isPresent}):In.Children.only(r),a=Ze(n.ref,pie(o));return typeof r=="function"||n.isPresent?In.cloneElement(o,{ref:a}):null};Yo.displayName="Presence";function fie(e){let[t,r]=In.useState(),n=In.useRef(null),o=In.useRef(e),a=In.useRef("none"),i=e?"mounted":"unmounted",[s,l]=die(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return In.useEffect(()=>{let u=Qw(n.current);a.current=s==="mounted"?u:"none"},[s]),vr(()=>{let u=n.current,c=o.current;if(c!==e){let f=a.current,p=Qw(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),vr(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let h=Qw(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=Qw(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:In.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Qw(e){return e?.animationName||"none"}function pie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cr=S(A(),1);var eS=S(D(),1);function L6(e){let t=mie(e),r=cr.forwardRef((n,o)=>{let{children:a,...i}=n,s=cr.Children.toArray(a),l=s.find(gie);if(l){let u=l.props.children,c=s.map(d=>d===l?cr.Children.count(u)>1?cr.Children.only(null):cr.isValidElement(u)?u.props.children:null:d);return(0,eS.jsx)(t,{...i,ref:o,children:cr.isValidElement(u)?cr.cloneElement(u,void 0,c):null})}return(0,eS.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function mie(e){let t=cr.forwardRef((r,n)=>{let{children:o,...a}=r;if(cr.isValidElement(o)){let i=xie(o),s=yie(a,o.props);return o.type!==cr.Fragment&&(s.ref=n?wi(n,i):i),cr.cloneElement(o,s)}return cr.Children.count(o)>1?cr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hie=Symbol("radix.slottable");function gie(e){return cr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hie}function yie(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function xie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bo=S(A(),1);var tS=S(A(),1);var vie=bo[" useInsertionEffect ".trim().toString()]||vr;function Bd({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=bie({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let c=bo.useRef(e!==void 0);bo.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}let u=bo.useCallback(c=>{if(s){let d=wie(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function bie({defaultProp:e,onChange:t}){let[r,n]=bo.useState(e),o=bo.useRef(r),a=bo.useRef(t);return vie(()=>{a.current=t},[t]),bo.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function wie(e){return typeof e=="function"}var Sie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jd=new WeakMap,rS=new WeakMap,nS={},tE=0,E6=function(e){return e&&(e.host||E6(e.parentNode))},Iie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=E6(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},kie=function(e,t,r,n){var o=Iie(t,Array.isArray(e)?e:[e]);nS[r]||(nS[r]=new WeakMap);var a=nS[r],i=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(n),m=p!==null&&p!=="false",h=(jd.get(f)||0)+1,v=(a.get(f)||0)+1;jd.set(f,h),a.set(f,v),i.push(f),h===1&&m&&rS.set(f,!0),v===1&&f.setAttribute(r,"true"),m||f.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return c(t),s.clear(),tE++,function(){i.forEach(function(d){var f=jd.get(d)-1,p=a.get(d)-1;jd.set(d,f),a.set(d,p),f||(rS.has(d)||d.removeAttribute(n),rS.delete(d)),p||d.removeAttribute(r)}),tE--,tE||(jd=new WeakMap,jd=new WeakMap,rS=new WeakMap,nS={})}},oS=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||Sie(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),kie(n,o,r,"aria-hidden")):function(){return null}};var kn=function(){return kn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kn.apply(this,arguments)};function aS(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function A6(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var cS=S(A());var Fr=S(A());var Au="right-scroll-bar-position",Ru="width-before-scroll-bar",rE="with-scroll-bars-hidden",nE="--removed-body-scroll-bar-size";function iS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var R6=S(A());function M6(e,t){var r=(0,R6.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var sS=S(A());var Cie=typeof window<"u"?sS.useLayoutEffect:sS.useEffect,$6=new WeakMap;function oE(e,t){var r=M6(t||null,function(n){return e.forEach(function(o){return iS(o,n)})});return Cie(function(){var n=$6.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||iS(s,null)}),a.forEach(function(s){o.has(s)||iS(s,i)})}$6.set(r,e)},[e]),r}function _ie(e){return e}function Tie(e,t){t===void 0&&(t=_ie);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return o}function aE(e){e===void 0&&(e={});var t=Tie(null);return t.options=kn({async:!0,ssr:!1},e),t}var D6=S(A()),O6=function(e){var t=e.sideCar,r=aS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D6.createElement(n,kn({},r))};O6.isSideCarExport=!0;function iE(e,t){return e.useMedium(t),O6}var lS=aE();var sE=function(){},Fh=Fr.forwardRef(function(e,t){var r=Fr.useRef(null),n=Fr.useState({onScrollCapture:sE,onWheelCapture:sE,onTouchMoveCapture:sE}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,x=e.gapMode,b=aS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,I=oE([r,t]),C=kn(kn({},b),o);return Fr.createElement(Fr.Fragment,null,c&&Fr.createElement(_,{sideCar:lS,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:x}),i?Fr.cloneElement(Fr.Children.only(s),kn(kn({},C),{ref:I})):Fr.createElement(y,kn({},C,{className:l,ref:I}),s))});Fh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fh.classNames={fullWidth:Ru,zeroRight:Au};var bt=S(A());var Vd=S(A());var F6=S(A());var N6;var z6=function(){if(N6)return N6;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Pie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=z6();return t&&e.setAttribute("nonce",t),e}function Lie(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Eie(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Pie())&&(Lie(t,r),Eie(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var uE=function(){var e=lE();return function(t,r){F6.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Bh=function(){var e=uE(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var Aie={left:0,top:0,right:0,gap:0},cE=function(e){return parseInt(e||"",10)||0},Rie=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[cE(r),cE(n),cE(o)]},dE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Aie;var t=Rie(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var Mie=Bh(),Ud="data-scroll-locked",$ie=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
15
|
+
.`.concat(rE,` {
|
|
16
|
+
overflow: hidden `).concat(n,`;
|
|
17
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
18
|
+
}
|
|
19
|
+
body[`).concat(Ud,`] {
|
|
20
|
+
overflow: hidden `).concat(n,`;
|
|
21
|
+
overscroll-behavior: contain;
|
|
22
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
23
|
+
padding-left: `.concat(o,`px;
|
|
24
|
+
padding-top: `).concat(a,`px;
|
|
25
|
+
padding-right: `).concat(i,`px;
|
|
26
|
+
margin-left:0;
|
|
27
|
+
margin-top:0;
|
|
28
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
29
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(Au,` {
|
|
33
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.`).concat(Ru,` {
|
|
37
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.`).concat(Au," .").concat(Au,` {
|
|
41
|
+
right: 0 `).concat(n,`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.`).concat(Ru," .").concat(Ru,` {
|
|
45
|
+
margin-right: 0 `).concat(n,`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
body[`).concat(Ud,`] {
|
|
49
|
+
`).concat(nE,": ").concat(s,`px;
|
|
50
|
+
}
|
|
51
|
+
`)},B6=function(){var e=parseInt(document.body.getAttribute(Ud)||"0",10);return isFinite(e)?e:0},Die=function(){Vd.useEffect(function(){return document.body.setAttribute(Ud,(B6()+1).toString()),function(){var e=B6()-1;e<=0?document.body.removeAttribute(Ud):document.body.setAttribute(Ud,e.toString())}},[])},fE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Die();var a=Vd.useMemo(function(){return dE(o)},[o]);return Vd.createElement(Mie,{styles:$ie(a,!t,o,r?"":"!important")})};var pE=!1;if(typeof window<"u")try{jh=Object.defineProperty({},"passive",{get:function(){return pE=!0,!0}}),window.addEventListener("test",jh,jh),window.removeEventListener("test",jh,jh)}catch{pE=!1}var jh,Mu=pE?{passive:!1}:!1;var Oie=function(e){return e.tagName==="TEXTAREA"},j6=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Oie(e)&&r[t]==="visible")},Nie=function(e){return j6(e,"overflowY")},zie=function(e){return j6(e,"overflowX")},mE=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=U6(e,n);if(o){var a=V6(e,n),i=a[1],s=a[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Fie=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Bie=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},U6=function(e,t){return e==="v"?Nie(t):zie(t)},V6=function(e,t){return e==="v"?Fie(t):Bie(t)},jie=function(e,t){return e==="h"&&t==="rtl"?-1:1},q6=function(e,t,r,n,o){var a=jie(e,window.getComputedStyle(t).direction),i=a*n,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=V6(e,s),m=p[0],h=p[1],v=p[2],g=h-v-a*m;(m||g)&&U6(e,s)&&(d+=g,f+=m);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&Math.abs(d)<1||!o&&i>d)||!c&&(o&&Math.abs(f)<1||!o&&-i>f))&&(u=!0),u};var uS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H6=function(e){return[e.deltaX,e.deltaY]},W6=function(e){return e&&"current"in e?e.current:e},Uie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vie=function(e){return`
|
|
52
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
53
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
54
|
+
`)},qie=0,qd=[];function Z6(e){var t=bt.useRef([]),r=bt.useRef([0,0]),n=bt.useRef(),o=bt.useState(qie++)[0],a=bt.useState(Bh)[0],i=bt.useRef(e);bt.useEffect(function(){i.current=e},[e]),bt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=A6([e.lockRef.current],(e.shards||[]).map(W6),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=bt.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var g=uS(h),y=r.current,x="deltaX"in h?h.deltaX:y[0]-g[0],b="deltaY"in h?h.deltaY:y[1]-g[1],_,I=h.target,C=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in h&&C==="h"&&I.type==="range")return!1;var k=window.getSelection(),M=k&&k.anchorNode,L=M?M===I||M.contains(I):!1;if(L)return!1;var j=mE(C,I);if(!j)return!0;if(j?_=C:(_=C==="v"?"h":"v",j=mE(C,I)),!j)return!1;if(!n.current&&"changedTouches"in h&&(x||b)&&(n.current=_),!_)return!0;var Y=n.current||_;return q6(Y,v,h,Y==="h"?x:b,!0)},[]),l=bt.useCallback(function(h){var v=h;if(!(!qd.length||qd[qd.length-1]!==a)){var g="deltaY"in v?H6(v):uS(v),y=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&Uie(_.delta,g)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(i.current.shards||[]).map(W6).filter(Boolean).filter(function(_){return _.contains(v.target)}),b=x.length>0?s(v,x[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),u=bt.useCallback(function(h,v,g,y){var x={name:h,delta:v,target:g,should:y,shadowParent:Hie(g)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),c=bt.useCallback(function(h){r.current=uS(h),n.current=void 0},[]),d=bt.useCallback(function(h){u(h.type,H6(h),h.target,s(h,e.lockRef.current))},[]),f=bt.useCallback(function(h){u(h.type,uS(h),h.target,s(h,e.lockRef.current))},[]);bt.useEffect(function(){return qd.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Mu),document.addEventListener("touchmove",l,Mu),document.addEventListener("touchstart",c,Mu),function(){qd=qd.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,Mu),document.removeEventListener("touchmove",l,Mu),document.removeEventListener("touchstart",c,Mu)}},[]);var p=e.removeScrollBar,m=e.inert;return bt.createElement(bt.Fragment,null,m?bt.createElement(a,{styles:Vie(o)}):null,p?bt.createElement(fE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var G6=iE(lS,Z6);var K6=cS.forwardRef(function(e,t){return cS.createElement(Fh,kn({},e,{ref:t,sideCar:G6}))});K6.classNames=Fh.classNames;var Uh=K6;var tr=S(D(),1),dS="Popover",[J6,QNe]=Bs(dS,[Fd]),Vh=Fd(),[Wie,qs]=J6(dS),X6=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=Vh(t),l=Ct.useRef(null),[u,c]=Ct.useState(!1),[d,f]=Bd({prop:n,defaultProp:o??!1,onChange:a,caller:dS});return(0,tr.jsx)(Kw,{...s,children:(0,tr.jsx)(Wie,{scope:t,contentId:Us(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:Ct.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:Ct.useCallback(()=>c(!0),[]),onCustomAnchorRemove:Ct.useCallback(()=>c(!1),[]),modal:i,children:r})})};X6.displayName=dS;var Y6="PopoverAnchor",Zie=Ct.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=qs(Y6,r),a=Vh(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return Ct.useEffect(()=>(i(),()=>s()),[i,s]),(0,tr.jsx)(zh,{...a,...n,ref:t})});Zie.displayName=Y6;var Q6="PopoverTrigger",e3=Ct.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=qs(Q6,r),a=Vh(r),i=Ze(t,o.triggerRef),s=(0,tr.jsx)(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":a3(o.open),...n,ref:i,onClick:we(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,tr.jsx)(zh,{asChild:!0,...a,children:s})});e3.displayName=Q6;var hE="PopoverPortal",[Gie,Kie]=J6(hE,{forceMount:void 0}),t3=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=qs(hE,t);return(0,tr.jsx)(Gie,{scope:t,forceMount:r,children:(0,tr.jsx)(Yo,{present:r||a.open,children:(0,tr.jsx)(Eu,{asChild:!0,container:o,children:n})})})};t3.displayName=hE;var Hd="PopoverContent",r3=Ct.forwardRef((e,t)=>{let r=Kie(Hd,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=qs(Hd,e.__scopePopover);return(0,tr.jsx)(Yo,{present:n||a.open,children:a.modal?(0,tr.jsx)(Xie,{...o,ref:t}):(0,tr.jsx)(Yie,{...o,ref:t})})});r3.displayName=Hd;var Jie=L6("PopoverContent.RemoveScroll"),Xie=Ct.forwardRef((e,t)=>{let r=qs(Hd,e.__scopePopover),n=Ct.useRef(null),o=Ze(t,n),a=Ct.useRef(!1);return Ct.useEffect(()=>{let i=n.current;if(i)return oS(i)},[]),(0,tr.jsx)(Uh,{as:Jie,allowPinchZoom:!0,children:(0,tr.jsx)(n3,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Yie=Ct.forwardRef((e,t)=>{let r=qs(Hd,e.__scopePopover),n=Ct.useRef(!1),o=Ct.useRef(!1);return(0,tr.jsx)(n3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),n3=Ct.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=qs(Hd,r),p=Vh(r);return Ow(),(0,tr.jsx)(Rh,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,tr.jsx)(Iu,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,tr.jsx)(Jw,{"data-state":a3(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),o3="PopoverClose",Qie=Ct.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=qs(o3,r);return(0,tr.jsx)(vt.button,{type:"button",...n,ref:t,onClick:we(e.onClick,()=>o.onOpenChange(!1))})});Qie.displayName=o3;var ese="PopoverArrow",tse=Ct.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=Vh(r);return(0,tr.jsx)(Xw,{...o,...n,ref:t})});tse.displayName=ese;function a3(e){return e?"open":"closed"}var i3=X6;var s3=e3,l3=t3,u3=r3;var Wd={};Et(Wd,{Name:()=>xE,Remove:()=>h3,Root:()=>gE,unstable_Thumb:()=>yE});var c3=S(D(),1);var d3=S(A(),1),gE=(0,d3.forwardRef)((e,t)=>(0,c3.jsx)(Ie.div,{...e,ref:t}));gE.displayName="AttachmentPrimitive.Root";var f3=S(D(),1),p3=S(A(),1);var yE=(0,p3.forwardRef)((e,t)=>{let r=O(({attachment:n})=>{let o=n.name.split(".");return o.length>1?o.pop():""});return(0,f3.jsxs)(Ie.div,{...e,ref:t,children:[".",r]})});yE.displayName="AttachmentPrimitive.Thumb";var fS=S(D(),1);var xE=()=>{let e=O(({attachment:t})=>t.name);return(0,fS.jsx)(fS.Fragment,{children:e})};xE.displayName="AttachmentPrimitive.Name";var m3=S(A(),1);var nse=()=>{let e=Q();return(0,m3.useCallback)(()=>{e.attachment().remove()},[e])},h3=Ge("AttachmentPrimitive.Remove",nse);var Ws={};Et(Ws,{Count:()=>vE,Next:()=>y3,Number:()=>bE,Previous:()=>v3,Root:()=>PE});var g3=S(A(),1);var ose=()=>{let e=Q(),t=O(({thread:n,message:o})=>!!(o.branchNumber>=o.branchCount||n.isRunning&&!n.capabilities.switchBranchDuringRun)),r=(0,g3.useCallback)(()=>{e.message().switchToBranch({position:"next"})},[e]);return t?null:r},y3=Ge("BranchPickerPrimitive.Next",ose);var x3=S(A(),1);var ase=()=>{let e=Q(),t=O(({thread:n,message:o})=>!!(o.branchNumber<=1||n.isRunning&&!n.capabilities.switchBranchDuringRun)),r=(0,x3.useCallback)(()=>{e.message().switchToBranch({position:"previous"})},[e]);return t?null:r},v3=Ge("BranchPickerPrimitive.Previous",ase);var pS=S(D(),1);var ise=()=>O(({message:t})=>t.branchCount),vE=()=>{let e=ise();return(0,pS.jsx)(pS.Fragment,{children:e})};vE.displayName="BranchPickerPrimitive.Count";var mS=S(D(),1);var sse=()=>O(({message:t})=>t.branchNumber),bE=()=>{let e=sse();return(0,mS.jsx)(mS.Fragment,{children:e})};bE.displayName="BranchPickerPrimitive.Number";var TE=S(D(),1);var $3=S(A(),1);var Ra={};Et(Ra,{AttachmentByIndex:()=>xS,Attachments:()=>kE,Content:()=>gS,Error:()=>CE,If:()=>Xh,PartByIndex:()=>Kd,Parts:()=>gS,Root:()=>IE,Unstable_PartsGrouped:()=>vS,Unstable_PartsGroupedByParentId:()=>_E});var SE=S(D(),1);var Hh=S(A(),1);var hS=S(A(),1),Aa=e=>{let t=(0,hS.useRef)(void 0);return(0,hS.useCallback)(n=>{t.current&&t.current(),n&&(t.current=e(n))},[e])};var b3=S(A(),1);var Zd=(e,t)=>{let r=(0,b3.useCallback)(n=>{if(!e)return;let o=e(),a=()=>{let s=t?t(n):n.offsetHeight;o.setHeight(s)},i=new ResizeObserver(a);return i.observe(n),a(),()=>{i.disconnect(),o.unregister()}},[e,t]);return Aa(r)};var wE=S(D(),1);var Gd=S(A(),1);var w3=(0,Gd.createContext)(!1),S3=(e,t)=>{let r=e.match(/^([\d.]+)(em|px|rem)$/);if(!r)return 0;let n=parseFloat(r[1]),o=r[2];if(o==="px")return n;if(o==="em"){let a=parseFloat(getComputedStyle(t).fontSize)||16;return n*a}if(o==="rem"){let a=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return n*a}return 0},qh=({children:e,fillClampThreshold:t="10em",fillClampOffset:r="6em"})=>{let n=O(({message:l})=>l.isLast&&l.index>=2),o=Ds({optional:!0}),a=(0,Gd.useContext)(w3),i=(0,Gd.useCallback)(l=>{if(!o||a)return;let u=()=>{let c=o.getState();if(c.turnAnchor==="top"&&n){let{viewport:d,inset:f,userMessage:p}=c.height,m=S3(t,l),h=S3(r,l),v=p<=m?p:h,g=Math.max(0,d-f-v);l.style.minHeight=`${g}px`,l.style.flexShrink="0",l.style.transition="min-height 0s"}else l.style.minHeight="",l.style.flexShrink="",l.style.transition=""};return u(),o.subscribe(u)},[o,n,a,t,r]),s=Aa(i);return(0,wE.jsx)(w3.Provider,{value:!0,children:(0,wE.jsx)(Fs,{ref:s,children:e})})};qh.displayName="ThreadPrimitive.ViewportSlack";var lse=()=>{let e=Q(),t=O(()=>e.message()),r=(0,Hh.useCallback)(n=>{let o=()=>{t.setIsHovering(!0)},a=()=>{t.setIsHovering(!1)};return n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a),n.matches(":hover")&&queueMicrotask(()=>t.setIsHovering(!0)),()=>{n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),t.setIsHovering(!1)}},[t]);return Aa(r)},use=()=>{let e=Wo(o=>o.turnAnchor),t=Wo(o=>o.registerUserMessageHeight),r=O(({thread:o,message:a})=>e==="top"&&a.role==="user"&&a.index===o.messages.length-2&&o.messages.at(-1)?.role==="assistant"),n=(0,Hh.useCallback)(o=>o.offsetHeight,[]);return Zd(r?t:null,n)},IE=(0,Hh.forwardRef)((e,t)=>{let r=lse(),n=use(),o=Ze(t,r,n);return(0,SE.jsx)(qh,{children:(0,SE.jsx)(Ie.div,{...e,ref:o})})});IE.displayName="MessagePrimitive.Root";var We=S(D(),1),Jd=S(A(),1);var I3=S(D(),1),k3=S(A(),1);var Wh=()=>O(({part:t})=>{if(t.type!=="text"&&t.type!=="reasoning")throw new Error("MessagePartText can only be used inside text or reasoning message parts.");return t});var Zh=(0,k3.forwardRef)(({smooth:e=!0,component:t="span",...r},n)=>{let{text:o,status:a}=_w(Wh(),e);return(0,I3.jsx)(t,{"data-status":a.type,...r,ref:n,children:o})});Zh.displayName="MessagePartPrimitive.Text";var _3=S(D(),1);var T3=S(A(),1);var C3=()=>O(({part:t})=>{if(t.type!=="image")throw new Error("MessagePartImage can only be used inside image message parts.");return t});var Gh=(0,T3.forwardRef)((e,t)=>{let{image:r}=C3();return(0,_3.jsx)(Ie.img,{src:r,...e,ref:t})});Gh.displayName="MessagePartPrimitive.Image";var Kh=({children:e})=>O(({part:r})=>r.status.type==="running")?e:null;Kh.displayName="MessagePartPrimitive.InProgress";var P3=e=>Symbol.iterator in e,L3=e=>"entries"in e,E3=(e,t)=>{let r=e instanceof Map?e:new Map(e.entries()),n=t instanceof Map?t:new Map(t.entries());if(r.size!==n.size)return!1;for(let[o,a]of r)if(!n.has(o)||!Object.is(a,n.get(o)))return!1;return!0},cse=(e,t)=>{let r=e[Symbol.iterator](),n=t[Symbol.iterator](),o=r.next(),a=n.next();for(;!o.done&&!a.done;){if(!Object.is(o.value,a.value))return!1;o=r.next(),a=n.next()}return!!o.done&&!!a.done};function A3(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:P3(e)&&P3(t)?L3(e)&&L3(t)?E3(e,t):cse(e,t):E3({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}var R3=S(A(),1);function Jh(e){let t=R3.default.useRef(void 0);return r=>{let n=e(r);return A3(t.current,n)?t.current:t.current=n}}var M3=e=>{let t=-1;return{startGroup:r=>{t===-1&&(t=r)},endGroup:(r,n)=>{t!==-1&&(n.push({type:e,startIndex:t,endIndex:r}),t=-1)},finalize:(r,n)=>{t!==-1&&n.push({type:e,startIndex:t,endIndex:r})}}},dse=e=>{let t=[],r=M3("toolGroup"),n=M3("reasoningGroup");for(let o=0;o<e.length;o++){let a=e[o];a==="tool-call"?(n.endGroup(o-1,t),r.startGroup(o)):a==="reasoning"?(r.endGroup(o-1,t),n.startGroup(o)):(r.endGroup(o-1,t),n.endGroup(o-1,t),t.push({type:"single",index:o}))}return r.finalize(e.length-1,t),n.finalize(e.length-1,t),t},fse=()=>{let e=O(Jh(t=>t.message.parts.map(r=>r.type)));return(0,Jd.useMemo)(()=>e.length===0?[]:dse(e),[e])},pse=({Fallback:e,...t})=>{let r=O(({tools:n})=>{let o=n.tools[t.toolName]??e;return Array.isArray(o)?o[0]??e:o});return r?(0,We.jsx)(r,{...t}):null},Ti={Text:()=>(0,We.jsxs)("p",{style:{whiteSpace:"pre-line"},children:[(0,We.jsx)(Zh,{}),(0,We.jsx)(Kh,{children:(0,We.jsx)("span",{style:{fontFamily:"revert"},children:" \u25CF"})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,We.jsx)(Gh,{}),File:()=>null,Unstable_Audio:()=>null,ToolGroup:({children:e})=>e,ReasoningGroup:({children:e})=>e},mse=({components:{Text:e=Ti.Text,Reasoning:t=Ti.Reasoning,Image:r=Ti.Image,Source:n=Ti.Source,File:o=Ti.File,Unstable_Audio:a=Ti.Unstable_Audio,tools:i={}}={}})=>{let s=Q(),l=O(({part:c})=>c),u=l.type;if(u==="tool-call"){let c=s.part().addToolResult,d=s.part().resumeToolCall;if("Override"in i)return(0,We.jsx)(i.Override,{...l,addResult:c,resume:d});let f=i.by_name?.[l.toolName]??i.Fallback;return(0,We.jsx)(pse,{...l,Fallback:f,addResult:c,resume:d})}if(l.status?.type==="requires-action")throw new Error("Encountered unexpected requires-action status");switch(u){case"text":return(0,We.jsx)(e,{...l});case"reasoning":return(0,We.jsx)(t,{...l});case"source":return(0,We.jsx)(n,{...l});case"image":return(0,We.jsx)(r,{...l});case"file":return(0,We.jsx)(o,{...l});case"audio":return(0,We.jsx)(a,{...l});case"data":return null;default:let c=u;throw new Error(`Unknown message part type: ${c}`)}},Kd=(0,Jd.memo)(({index:e,components:t})=>(0,We.jsx)(wh,{index:e,children:(0,We.jsx)(mse,{components:t})}),(e,t)=>e.index===t.index&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.ToolGroup===t.components?.ToolGroup&&e.components?.ReasoningGroup===t.components?.ReasoningGroup);Kd.displayName="MessagePrimitive.PartByIndex";var hse=({status:e,component:t})=>(0,We.jsx)(Sh,{text:"",isRunning:e.type==="running",children:(0,We.jsx)(t,{type:"text",text:"",status:e})}),gse=Object.freeze({type:"complete"}),yse=({components:e})=>{let t=O(r=>r.message.status??gse);return e?.Empty?(0,We.jsx)(e.Empty,{status:t}):(0,We.jsx)(hse,{status:t,component:e?.Text??Ti.Text})},xse=(0,Jd.memo)(yse,(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),gS=({components:e})=>{let t=O(({message:o})=>o.parts.length),r=fse(),n=(0,Jd.useMemo)(()=>t===0?(0,We.jsx)(xse,{components:e}):r.map(o=>{if(o.type==="single")return(0,We.jsx)(Kd,{index:o.index,components:e},o.index);if(o.type==="toolGroup"){let a=e?.ToolGroup??Ti.ToolGroup;return(0,We.jsx)(a,{startIndex:o.startIndex,endIndex:o.endIndex,children:Array.from({length:o.endIndex-o.startIndex+1},(i,s)=>(0,We.jsx)(Kd,{index:o.startIndex+s,components:e},s))},`tool-${o.startIndex}`)}else{let a=e?.ReasoningGroup??Ti.ReasoningGroup;return(0,We.jsx)(a,{startIndex:o.startIndex,endIndex:o.endIndex,children:Array.from({length:o.endIndex-o.startIndex+1},(i,s)=>(0,We.jsx)(Kd,{index:o.startIndex+s,components:e},s))},`reasoning-${o.startIndex}`)}}),[r,e,t]);return(0,We.jsx)(We.Fragment,{children:n})};gS.displayName="MessagePrimitive.Parts";var vse=e=>O(({message:t})=>{let{role:r,attachments:n,parts:o,branchCount:a,isLast:i,speech:s,isCopied:l,isHovering:u}=t;return!(e.hasBranches===!0&&a<2||e.user&&r!=="user"||e.assistant&&r!=="assistant"||e.system&&r!=="system"||e.lastOrHover===!0&&!u&&!i||e.last!==void 0&&e.last!==i||e.copied===!0&&!l||e.copied===!1&&l||e.speaking===!0&&s==null||e.speaking===!1&&s!=null||e.hasAttachments===!0&&(r!=="user"||!n?.length)||e.hasAttachments===!1&&r==="user"&&n?.length||e.hasContent===!0&&o.length===0||e.hasContent===!1&&o.length>0||e.submittedFeedback!==void 0&&(t.metadata.submittedFeedback?.type??null)!==e.submittedFeedback)}),Xh=({children:e,...t})=>vse(t)?e:null;Xh.displayName="MessagePrimitive.If";var Yh=S(D(),1),yS=S(A(),1);var bse=(e,t)=>{let r=t.type;switch(r){case"image":return e?.Image??e?.Attachment;case"document":return e?.Document??e?.Attachment;case"file":return e?.File??e?.Attachment;default:let n=r;throw new Error(`Unknown attachment type: ${n}`)}},wse=({components:e})=>{let t=O(({attachment:n})=>n);if(!t)return null;let r=bse(e,t);return r?(0,Yh.jsx)(r,{}):null},xS=(0,yS.memo)(({index:e,components:t})=>(0,Yh.jsx)(vL,{index:e,children:(0,Yh.jsx)(wse,{components:t})}),(e,t)=>e.index===t.index&&e.components?.Image===t.components?.Image&&e.components?.Document===t.components?.Document&&e.components?.File===t.components?.File&&e.components?.Attachment===t.components?.Attachment);xS.displayName="MessagePrimitive.AttachmentByIndex";var kE=({components:e})=>{let t=O(({message:n})=>n.role!=="user"?0:n.attachments.length);return(0,yS.useMemo)(()=>Array.from({length:t},(n,o)=>(0,Yh.jsx)(xS,{index:o,components:e},o)),[t,e])};kE.displayName="MessagePrimitive.Attachments";var CE=({children:e})=>O(({message:r})=>r.status?.type==="incomplete"&&r.status.reason==="error")?e:null;CE.displayName="MessagePrimitive.Error";var Ye=S(D(),1),Xd=S(A(),1);var Sse=e=>{let t=new Map;for(let n=0;n<e.length;n++){let i=e[n]?.parentId??`__ungrouped_${n}`,s=t.get(i)??[];s.push(n),t.set(i,s)}let r=[];for(let[n,o]of t){let a=n.startsWith("__ungrouped_")?void 0:n;r.push({groupKey:a,indices:o})}return r},Ise=e=>{let t=O(({message:r})=>r.parts);return(0,Xd.useMemo)(()=>t.length===0?[]:e(t),[t,e])},kse=({Fallback:e,...t})=>{let r=O(({tools:n})=>{let o=n.tools[t.toolName]??e;return Array.isArray(o)?o[0]??e:o});return r?(0,Ye.jsx)(r,{...t}):null},Hs={Text:()=>(0,Ye.jsxs)("p",{style:{whiteSpace:"pre-line"},children:[(0,Ye.jsx)(Zh,{}),(0,Ye.jsx)(Kh,{children:(0,Ye.jsx)("span",{style:{fontFamily:"revert"},children:" \u25CF"})})]}),Reasoning:()=>null,Source:()=>null,Image:()=>(0,Ye.jsx)(Gh,{}),File:()=>null,Unstable_Audio:()=>null,Group:({children:e})=>e},Cse=({components:{Text:e=Hs.Text,Reasoning:t=Hs.Reasoning,Image:r=Hs.Image,Source:n=Hs.Source,File:o=Hs.File,Unstable_Audio:a=Hs.Unstable_Audio,tools:i={}}={}})=>{let s=Q(),l=O(({part:c})=>c),u=l.type;if(u==="tool-call"){let c=p=>s.part().addToolResult(p),d=s.part().resumeToolCall;if("Override"in i)return(0,Ye.jsx)(i.Override,{...l,addResult:c,resume:d});let f=i.by_name?.[l.toolName]??i.Fallback;return(0,Ye.jsx)(kse,{...l,Fallback:f,addResult:c,resume:d})}if(l.status?.type==="requires-action")throw new Error("Encountered unexpected requires-action status");switch(u){case"text":return(0,Ye.jsx)(e,{...l});case"reasoning":return(0,Ye.jsx)(t,{...l});case"source":return(0,Ye.jsx)(n,{...l});case"image":return(0,Ye.jsx)(r,{...l});case"file":return(0,Ye.jsx)(o,{...l});case"audio":return(0,Ye.jsx)(a,{...l});case"data":return null;default:let c=u;throw new Error(`Unknown message part type: ${c}`)}},_se=({partIndex:e,components:t})=>(0,Ye.jsx)(wh,{index:e,children:(0,Ye.jsx)(Cse,{components:t})}),Tse=(0,Xd.memo)(_se,(e,t)=>e.partIndex===t.partIndex&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.Group===t.components?.Group),Pse=({status:e,component:t})=>(0,Ye.jsx)(Sh,{text:"",isRunning:e.type==="running",children:(0,Ye.jsx)(t,{type:"text",text:"",status:e})}),Lse=Object.freeze({type:"complete"}),Ese=({components:e})=>{let t=O(r=>r.message.status??Lse);return e?.Empty?(0,Ye.jsx)(e.Empty,{status:t}):(0,Ye.jsx)(Pse,{status:t,component:e?.Text??Hs.Text})},Ase=(0,Xd.memo)(Ese,(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),vS=({groupingFunction:e,components:t})=>{let r=O(({message:a})=>a.parts.length),n=Ise(e),o=(0,Xd.useMemo)(()=>r===0?(0,Ye.jsx)(Ase,{components:t}):n.map((a,i)=>{let s=t?.Group??Hs.Group;return(0,Ye.jsx)(s,{groupKey:a.groupKey,indices:a.indices,children:a.indices.map(l=>(0,Ye.jsx)(Tse,{partIndex:l,components:t},l))},`group-${i}-${a.groupKey??"ungrouped"}`)}),[n,t,r]);return(0,Ye.jsx)(Ye.Fragment,{children:o})};vS.displayName="MessagePrimitive.Unstable_PartsGrouped";var _E=({components:e,...t})=>(0,Ye.jsx)(vS,{...t,components:e,groupingFunction:Sse});_E.displayName="MessagePrimitive.Unstable_PartsGroupedByParentId";var PE=(0,$3.forwardRef)(({hideWhenSingleBranch:e,...t},r)=>(0,TE.jsx)(Xh,{hasBranches:e?!0:void 0,children:(0,TE.jsx)(Ie.div,{...t,ref:r})}));PE.displayName="BranchPickerPrimitive.Root";var Cn={};Et(Cn,{AddAttachment:()=>rq,AttachmentByIndex:()=>IS,AttachmentDropzone:()=>DE,Attachments:()=>$E,Cancel:()=>eq,If:()=>OE,Input:()=>ME,Root:()=>EE,Send:()=>O3});var N3=S(D(),1);var z3=S(A(),1);var D3=S(A(),1);var LE=()=>{let e=Q(),t=O(n=>n.thread.isRunning||!n.composer.isEditing||n.composer.isEmpty),r=(0,D3.useCallback)(()=>{e.composer().send()},[e]);return t?null:r},O3=Ge("ComposerPrimitive.Send",LE);var EE=(0,z3.forwardRef)(({onSubmit:e,...t},r)=>{let n=LE(),o=a=>{a.preventDefault(),n&&n()};return(0,N3.jsx)(Ie.form,{...t,ref:r,onSubmit:we(e,o)})});EE.displayName="ComposerPrimitive.Root";var Y3=S(D(),1);var Ma=S(A(),1);function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bS.apply(null,arguments)}function F3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Qo=S(A());var U3=S(A());var B3=S(A()),j3=B3.useLayoutEffect;var V3=function(t){var r=U3.default.useRef(t);return j3(function(){r.current=t}),r};var AE=S(A()),q3=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},H3=function(t,r){var n=AE.default.useRef();return AE.default.useCallback(function(o){t.current=o,n.current&&q3(n.current,null),n.current=r,r&&q3(r,o)},[r])};var W3={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Rse=function(t){Object.keys(W3).forEach(function(r){t.style.setProperty(r,W3[r],"important")})},Z3=Rse,Qr=null,G3=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Mse(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Qr||(Qr=document.createElement("textarea"),Qr.setAttribute("tabindex","-1"),Qr.setAttribute("aria-hidden","true"),Z3(Qr)),Qr.parentNode===null&&document.body.appendChild(Qr);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach(function(f){var p=f;Qr.style[p]=i[p]}),Z3(Qr),Qr.value=t;var l=G3(Qr,e);Qr.value=t,l=G3(Qr,e),Qr.value="x";var u=Qr.scrollHeight-o,c=u*r;s==="border-box"&&(c=c+o+a),l=Math.max(c,l);var d=u*n;return s==="border-box"&&(d=d+o+a),l=Math.min(d,l),[l,u]}var K3=function(){},$se=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Dse=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Ose=!!document.documentElement.currentStyle,Nse=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=$se(Dse,r),o=n.boxSizing;if(o==="")return null;Ose&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),i=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:i}},zse=Nse;function RE(e,t,r){var n=V3(r);Qo.useLayoutEffect(function(){var o=function(i){return n.current(i)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Fse=function(t,r){RE(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},Bse=function(t){RE(window,"resize",t)},jse=function(t){RE(document.fonts,"loadingdone",t)},Use=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Vse=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,a=t.minRows,i=t.onChange,s=i===void 0?K3:i,l=t.onHeightChange,u=l===void 0?K3:l,c=F3(t,Use),d=c.value!==void 0,f=Qo.useRef(null),p=H3(f,r),m=Qo.useRef(0),h=Qo.useRef(),v=function(){var x=f.current,b=n&&h.current?h.current:zse(x);if(b){h.current=b;var _=Mse(b,x.value||x.placeholder||"x",a,o),I=_[0],C=_[1];m.current!==I&&(m.current=I,x.style.setProperty("height",I+"px","important"),u(I,{rowHeight:C}))}},g=function(x){d||v(),s(x)};return Qo.useLayoutEffect(v),Fse(f,function(){if(!d){var y=f.current.value;requestAnimationFrame(function(){var x=f.current;x&&y!==x.value&&v()})}}),Bse(v),jse(v),Qo.createElement("textarea",bS({},c,{onChange:g,ref:p}))},J3=Qo.forwardRef(Vse);var X3=S(A(),1);var wS=e=>{let t=Dt(e),r=Wo(n=>n.onScrollToBottom);(0,X3.useEffect)(()=>r(t),[r,t])};var ME=(0,Ma.forwardRef)(({autoFocus:e=!1,asChild:t,disabled:r,onChange:n,onKeyDown:o,onPaste:a,submitOnEnter:i=!0,cancelOnEscape:s=!0,unstable_focusOnRunStart:l=!0,unstable_focusOnScrollToBottom:u=!0,unstable_focusOnThreadSwitched:c=!0,addAttachmentOnPaste:d=!0,...f},p)=>{let m=Q(),h=O(({composer:k})=>k.isEditing?k.text:""),v=t?Fs:J3,g=O(({thread:k})=>k.isDisabled)||r,y=(0,Ma.useRef)(null),x=Ze(p,y);Dd(k=>{if(!s||!y.current?.contains(k.target))return;let M=m.composer();M.getState().canCancel&&(M.cancel(),k.preventDefault())});let b=k=>{g||!i||k.nativeEvent.isComposing||k.key==="Enter"&&k.shiftKey===!1&&(m.thread().getState().isRunning||(k.preventDefault(),y.current?.closest("form")?.requestSubmit()))},_=async k=>{if(!d)return;let M=m.thread().getState().capabilities,L=Array.from(k.clipboardData?.files||[]);if(M.attachments&&L.length>0)try{k.preventDefault(),await Promise.all(L.map(j=>m.composer().addAttachment(j)))}catch(j){console.error("Error adding attachment:",j)}},I=e&&!g,C=(0,Ma.useCallback)(()=>{let k=y.current;!k||!I||(k.focus({preventScroll:!0}),k.setSelectionRange(k.value.length,k.value.length))},[I]);return(0,Ma.useEffect)(()=>C(),[C]),wS(()=>{m.composer().getState().type==="thread"&&u&&C()}),(0,Ma.useEffect)(()=>{if(!(m.composer().getState().type!=="thread"||!l))return m.on("thread.run-start",C)},[l,C,m]),(0,Ma.useEffect)(()=>{if(!(m.composer().getState().type!=="thread"||!c))return m.on("thread-list-item.switched-to",C)},[c,C,m]),(0,Y3.jsx)(v,{name:"input",value:h,...f,ref:x,disabled:g,onChange:we(n,k=>{m.composer().getState().isEditing&&_d(()=>{m.composer().setText(k.target.value)})}),onKeyDown:we(o,b),onPaste:we(a,_)})});ME.displayName="ComposerPrimitive.Input";var Q3=S(A(),1);var qse=()=>{let e=Q(),t=O(({composer:n})=>!n.canCancel),r=(0,Q3.useCallback)(()=>{e.composer().cancel()},[e]);return t?null:r},eq=Ge("ComposerPrimitive.Cancel",qse);var tq=S(A(),1);var Hse=({multiple:e=!0}={})=>{let t=O(({composer:o})=>!o.isEditing),r=Q(),n=(0,tq.useCallback)(()=>{let o=document.createElement("input");o.type="file",o.multiple=e,o.hidden=!0;let a=r.composer().getState().attachmentAccept;a!=="*"&&(o.accept=a),document.body.appendChild(o),o.onchange=i=>{let s=i.target.files;if(s){for(let l of s)r.composer().addAttachment(l);document.body.removeChild(o)}},o.oncancel=()=>{(!o.files||o.files.length===0)&&document.body.removeChild(o)},o.click()},[r,e]);return t?null:n},rq=Ge("ComposerPrimitive.AddAttachment",Hse,["multiple"]);var Qh=S(D(),1),SS=S(A(),1);var Wse=(e,t)=>{let r=t.type;switch(r){case"image":return e?.Image??e?.Attachment;case"document":return e?.Document??e?.Attachment;case"file":return e?.File??e?.Attachment;default:let n=r;throw new Error(`Unknown attachment type: ${n}`)}},Zse=({components:e})=>{let t=O(({attachment:n})=>n);if(!t)return null;let r=Wse(e,t);return r?(0,Qh.jsx)(r,{}):null},IS=(0,SS.memo)(({index:e,components:t})=>(0,Qh.jsx)(bL,{index:e,children:(0,Qh.jsx)(Zse,{components:t})}),(e,t)=>e.index===t.index&&e.components?.Image===t.components?.Image&&e.components?.Document===t.components?.Document&&e.components?.File===t.components?.File&&e.components?.Attachment===t.components?.Attachment);IS.displayName="ComposerPrimitive.AttachmentByIndex";var $E=({components:e})=>{let t=O(n=>n.composer.attachments.length);return(0,SS.useMemo)(()=>Array.from({length:t},(n,o)=>(0,Qh.jsx)(IS,{index:o,components:e},o)),[t,e])};$E.displayName="ComposerPrimitive.Attachments";var nq=S(D(),1),Pi=S(A(),1);var DE=(0,Pi.forwardRef)(({disabled:e,asChild:t=!1,children:r,...n},o)=>{let[a,i]=(0,Pi.useState)(!1),s=Q(),l=(0,Pi.useCallback)(m=>{e||(m.preventDefault(),i(!0))},[e]),u=(0,Pi.useCallback)(m=>{e||(m.preventDefault(),a||i(!0))},[e,a]),c=(0,Pi.useCallback)(m=>{if(e)return;m.preventDefault();let h=m.relatedTarget;h&&m.currentTarget.contains(h)||i(!1)},[e]),d=(0,Pi.useCallback)(async m=>{if(!e){m.preventDefault(),i(!1);for(let h of m.dataTransfer.files)try{await s.composer().addAttachment(h)}catch(v){console.error("Failed to add attachment:",v)}}},[e,s]);return(0,nq.jsx)(t?Fs:"div",{...a?{"data-dragging":"true"}:null,ref:o,...{onDragEnterCapture:l,onDragOverCapture:u,onDragLeaveCapture:c,onDropCapture:d},...n,children:r})});DE.displayName="ComposerPrimitive.AttachmentDropzone";var Gse=e=>O(({composer:t})=>!(e.editing===!0&&!t.isEditing||e.editing===!1&&t.isEditing)),OE=({children:e,...t})=>Gse(t)?e:null;OE.displayName="ComposerPrimitive.If";var eg={};Et(eg,{Message:()=>zE,Root:()=>NE});var oq=S(D(),1);var aq=S(A(),1),NE=(0,aq.forwardRef)((e,t)=>(0,oq.jsx)(Ie.div,{role:"alert",...e,ref:t}));NE.displayName="ErrorPrimitive.Root";var iq=S(D(),1);var sq=S(A(),1);var zE=(0,sq.forwardRef)(({children:e,...t},r)=>{let n=O(({message:o})=>o.status?.type==="incomplete"&&o.status.reason==="error"?o.status.error:void 0);return n===void 0?null:(0,iq.jsx)(Ie.span,{...t,ref:r,children:e??String(n)})});zE.displayName="ErrorPrimitive.Message";var Li={};Et(Li,{Empty:()=>BE,If:()=>jE,MessageByIndex:()=>_S,Messages:()=>yq,Root:()=>FE,ScrollToBottom:()=>vq,Suggestion:()=>wq,Viewport:()=>UE,ViewportFooter:()=>VE,ViewportProvider:()=>Ad,ViewportSlack:()=>qh});var lq=S(D(),1);var uq=S(A(),1),FE=(0,uq.forwardRef)((e,t)=>(0,lq.jsx)(Ie.div,{...e,ref:t}));FE.displayName="ThreadPrimitive.Root";var BE=({children:e})=>O(({thread:r})=>r.messages.length===0&&!r.isLoading)?e:null;BE.displayName="ThreadPrimitive.Empty";var Kse=e=>O(({thread:t})=>!(e.empty===!0&&!t.isEmpty||e.empty===!1&&t.isEmpty||e.running===!0&&!t.isRunning||e.running===!1&&t.isRunning||e.disabled===!0&&!t.isDisabled||e.disabled===!1&&t.isDisabled)),jE=({children:e,...t})=>Kse(t)?e:null;jE.displayName="ThreadPrimitive.If";var kS=S(D(),1);var tg=S(A(),1);var Yd=S(A(),1);var cq=S(A(),1);var dq=e=>{let t=Dt(e),r=(0,cq.useCallback)(n=>{let o=new ResizeObserver(()=>{t()}),a=new MutationObserver(()=>{t()});return o.observe(n),a.observe(n,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),()=>{o.disconnect(),a.disconnect()}},[t]);return Aa(r)};var fq=({autoScroll:e,scrollToBottomOnRunStart:t=!0,scrollToBottomOnInitialize:r=!0,scrollToBottomOnThreadSwitch:n=!0})=>{let o=(0,Yd.useRef)(null),a=Ds();e===void 0&&(e=a.getState().turnAnchor!=="top");let i=(0,Yd.useRef)(0),s=(0,Yd.useRef)(null),l=(0,Yd.useCallback)(p=>{let m=o.current;m&&(s.current=p,m.scrollTo({top:m.scrollHeight,behavior:p}))},[]),u=()=>{let p=o.current;if(!p)return;let m=a.getState().isAtBottom,h=Math.abs(p.scrollHeight-p.scrollTop-p.clientHeight)<1||p.scrollHeight<=p.clientHeight;!h&&i.current<p.scrollTop||(h&&(s.current=null),(h||s.current===null)&&h!==m&&Os(a).setState({isAtBottom:h})),i.current=p.scrollTop},c=dq(()=>{let p=s.current;p?l(p):e&&a.getState().isAtBottom&&l("instant"),u()}),d=Aa(p=>(p.addEventListener("scroll",u),()=>{p.removeEventListener("scroll",u)}));return wS(({behavior:p})=>{l(p)}),yh("thread.run-start",()=>{t&&(s.current="auto",requestAnimationFrame(()=>{l("auto")}))}),yh("thread.initialize",()=>{r&&(s.current="instant",requestAnimationFrame(()=>{l("instant")}))}),yh("thread-list-item.switched-to",()=>{n&&(s.current="instant",requestAnimationFrame(()=>{l("instant")}))}),Ze(c,d,o)};var Jse=()=>{let e=Wo(r=>r.registerViewport),t=(0,tg.useCallback)(r=>r.clientHeight,[]);return Zd(e,t)},pq=(0,tg.forwardRef)(({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:r,scrollToBottomOnThreadSwitch:n,children:o,...a},i)=>{let s=fq({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:r,scrollToBottomOnThreadSwitch:n}),l=Jse(),u=Ze(i,s,l);return(0,kS.jsx)(Ie.div,{...a,ref:u,children:o})});pq.displayName="ThreadPrimitive.ViewportScrollable";var UE=(0,tg.forwardRef)(({turnAnchor:e,...t},r)=>(0,kS.jsx)(Ad,{options:{turnAnchor:e},children:(0,kS.jsx)(pq,{...t,ref:r})}));UE.displayName="ThreadPrimitive.Viewport";var mq=S(D(),1);var CS=S(A(),1);var VE=(0,CS.forwardRef)((e,t)=>{let r=Wo(i=>i.registerContentInset),n=(0,CS.useCallback)(i=>{let s=parseFloat(getComputedStyle(i).marginTop)||0;return i.offsetHeight+s},[]),o=Zd(r,n),a=Ze(t,o);return(0,mq.jsx)(Ie.div,{...e,ref:a})});VE.displayName="ThreadPrimitive.ViewportFooter";var rg=S(D(),1),ng=S(A(),1);var hq=(e,t)=>e.Message===t.Message&&e.EditComposer===t.EditComposer&&e.UserEditComposer===t.UserEditComposer&&e.AssistantEditComposer===t.AssistantEditComposer&&e.SystemEditComposer===t.SystemEditComposer&&e.UserMessage===t.UserMessage&&e.AssistantMessage===t.AssistantMessage&&e.SystemMessage===t.SystemMessage,Xse=()=>null,Yse=(e,t,r)=>{switch(t){case"user":return r?e.UserEditComposer??e.EditComposer??e.UserMessage??e.Message:e.UserMessage??e.Message;case"assistant":return r?e.AssistantEditComposer??e.EditComposer??e.AssistantMessage??e.Message:e.AssistantMessage??e.Message;case"system":return r?e.SystemEditComposer??e.EditComposer??e.SystemMessage??e.Message:e.SystemMessage??Xse;default:let n=t;throw new Error(`Unknown message role: ${n}`)}},Qse=({components:e})=>{let t=O(({message:o})=>o.role),r=O(({message:o})=>o.composer.isEditing),n=Yse(e,t,r);return(0,rg.jsx)(n,{})},_S=(0,ng.memo)(({index:e,components:t})=>(0,rg.jsx)(yL,{index:e,children:(0,rg.jsx)(Qse,{components:t})}),(e,t)=>e.index===t.index&&hq(e.components,t.components));_S.displayName="ThreadPrimitive.MessageByIndex";var gq=({components:e})=>{let t=O(({thread:n})=>n.messages.length);return(0,ng.useMemo)(()=>t===0?null:Array.from({length:t},(n,o)=>(0,rg.jsx)(_S,{index:o,components:e},o)),[t,e])};gq.displayName="ThreadPrimitive.Messages";var yq=(0,ng.memo)(gq,(e,t)=>hq(e.components,t.components));var xq=S(A(),1);var ele=({behavior:e}={})=>{let t=Wo(o=>o.isAtBottom),r=Ds(),n=(0,xq.useCallback)(()=>{r.getState().scrollToBottom({behavior:e})},[r,e]);return t?null:n},vq=Ge("ThreadPrimitive.ScrollToBottom",ele,["behavior"]);var bq=S(A(),1);var tle=({prompt:e,send:t,clearComposer:r=!0,autoSend:n,method:o})=>{let a=Q(),i=O(({thread:u})=>u.isDisabled),s=t??n??!1,l=(0,bq.useCallback)(()=>{let u=a.thread().getState().isRunning;if(s&&!u)a.thread().append(e),r&&a.composer().setText("");else if(r)a.composer().setText(e);else{let c=a.composer().getState().text;a.composer().setText(c.trim()?`${c} ${e}`:e)}},[a,s,r,e]);return i?null:l},wq=Ge("ThreadPrimitive.Suggestion",tle,["prompt","send","clearComposer","autoSend","method"]);var $u={};Et($u,{ItemByIndex:()=>LS,Items:()=>HE,New:()=>qE,Root:()=>WE});var Sq=S(D(),1),Iq=S(A(),1);var qE=(0,Iq.forwardRef)(({onClick:e,disabled:t,...r},n)=>{let o=O(({threads:i})=>i.newThreadId===i.mainThreadId),a=Q();return(0,Sq.jsx)(Ie.button,{type:"button",...o?{"data-active":"true","aria-current":"true"}:null,...r,ref:n,disabled:t,onClick:we(e,()=>{a.threads().switchToNewThread()})})});qE.displayName="ThreadListPrimitive.New";var TS=S(D(),1),PS=S(A(),1);var LS=(0,PS.memo)(({index:e,archived:t=!1,components:r})=>{let n=r.ThreadListItem;return(0,TS.jsx)(hL,{index:e,archived:t,children:(0,TS.jsx)(n,{})})},(e,t)=>e.index===t.index&&e.archived===t.archived&&e.components.ThreadListItem===t.components.ThreadListItem);LS.displayName="ThreadListPrimitive.ItemByIndex";var HE=({archived:e=!1,components:t})=>{let r=O(({threads:o})=>e?o.archivedThreadIds.length:o.threadIds.length);return(0,PS.useMemo)(()=>Array.from({length:r},(o,a)=>(0,TS.jsx)(LS,{index:a,archived:e,components:t},a)),[r,e,t])};HE.displayName="ThreadListPrimitive.Items";var kq=S(D(),1);var Cq=S(A(),1),WE=(0,Cq.forwardRef)((e,t)=>(0,kq.jsx)(Ie.div,{...e,ref:t}));WE.displayName="ThreadListPrimitive.Root";var Hn={};Et(Hn,{Archive:()=>Lq,Delete:()=>Mq,Root:()=>ZE,Title:()=>GE,Trigger:()=>Dq,Unarchive:()=>Aq});var _q=S(D(),1);var Tq=S(A(),1);var ZE=(0,Tq.forwardRef)((e,t)=>{let r=O(({threads:n,threadListItem:o})=>n.mainThreadId===o.id);return(0,_q.jsx)(Ie.div,{...r?{"data-active":"true","aria-current":"true"}:null,...e,ref:t})});ZE.displayName="ThreadListItemPrimitive.Root";var Pq=S(A(),1),rle=()=>{let e=Q();return(0,Pq.useCallback)(()=>{e.threadListItem().archive()},[e])},Lq=Ge("ThreadListItemPrimitive.Archive",rle);var Eq=S(A(),1),nle=()=>{let e=Q();return(0,Eq.useCallback)(()=>{e.threadListItem().unarchive()},[e])},Aq=Ge("ThreadListItemPrimitive.Unarchive",nle);var Rq=S(A(),1),ole=()=>{let e=Q();return(0,Rq.useCallback)(()=>{e.threadListItem().delete()},[e])},Mq=Ge("ThreadListItemPrimitive.Delete",ole);var $q=S(A(),1),ale=()=>{let e=Q();return(0,$q.useCallback)(()=>{e.threadListItem().switchTo()},[e])},Dq=Ge("ThreadListItemPrimitive.Trigger",ale);var ES=S(D(),1);var GE=({fallback:e})=>{let t=O(({threadListItem:r})=>r.title);return(0,ES.jsx)(ES.Fragment,{children:t||e})};GE.displayName="ThreadListItemPrimitive.Title";var ile=e=>O(e.condition),Zs=({children:e,condition:t})=>ile({condition:t})?e:null;Zs.displayName="AssistantIf";var Yg=S(A(),1);var cH="vercel.ai.error",sle=Symbol.for(cH),Oq,Nq,Qe=class dH extends(Nq=Error,Oq=sle,Nq){constructor({name:t,message:r,cause:n}){super(r),this[Oq]=!0,this.name=t,this.cause=n}static isInstance(t){return dH.hasMarker(t,cH)}static hasMarker(t,r){let n=Symbol.for(r);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}},fH="AI_APICallError",pH=`vercel.ai.error.${fH}`,lle=Symbol.for(pH),zq,Fq,Mje=class extends(Fq=Qe,zq=lle,Fq){constructor({message:e,url:t,requestBodyValues:r,statusCode:n,responseHeaders:o,responseBody:a,cause:i,isRetryable:s=n!=null&&(n===408||n===409||n===429||n>=500),data:l}){super({name:fH,message:e,cause:i}),this[zq]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=n,this.responseHeaders=o,this.responseBody=a,this.isRetryable=s,this.data=l}static isInstance(e){return Qe.hasMarker(e,pH)}},mH="AI_EmptyResponseBodyError",hH=`vercel.ai.error.${mH}`,ule=Symbol.for(hH),Bq,jq,$je=class extends(jq=Qe,Bq=ule,jq){constructor({message:e="Empty response body"}={}){super({name:mH,message:e}),this[Bq]=!0}static isInstance(e){return Qe.hasMarker(e,hH)}};function gH(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var yH="AI_InvalidArgumentError",xH=`vercel.ai.error.${yH}`,cle=Symbol.for(xH),Uq,Vq,vH=class extends(Vq=Qe,Uq=cle,Vq){constructor({message:e,cause:t,argument:r}){super({name:yH,message:e,cause:t}),this[Uq]=!0,this.argument=r}static isInstance(e){return Qe.hasMarker(e,xH)}},bH="AI_InvalidPromptError",wH=`vercel.ai.error.${bH}`,dle=Symbol.for(wH),qq,Hq,Dje=class extends(Hq=Qe,qq=dle,Hq){constructor({prompt:e,message:t,cause:r}){super({name:bH,message:`Invalid prompt: ${t}`,cause:r}),this[qq]=!0,this.prompt=e}static isInstance(e){return Qe.hasMarker(e,wH)}},SH="AI_InvalidResponseDataError",IH=`vercel.ai.error.${SH}`,fle=Symbol.for(IH),Wq,Zq,Oje=class extends(Zq=Qe,Wq=fle,Zq){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:SH,message:t}),this[Wq]=!0,this.data=e}static isInstance(e){return Qe.hasMarker(e,IH)}},kH="AI_JSONParseError",CH=`vercel.ai.error.${kH}`,ple=Symbol.for(CH),Gq,Kq,JE=class extends(Kq=Qe,Gq=ple,Kq){constructor({text:e,cause:t}){super({name:kH,message:`JSON parsing failed: Text: ${e}.
|
|
55
|
+
Error message: ${gH(t)}`,cause:t}),this[Gq]=!0,this.text=e}static isInstance(e){return Qe.hasMarker(e,CH)}},_H="AI_LoadAPIKeyError",TH=`vercel.ai.error.${_H}`,mle=Symbol.for(TH),Jq,Xq,Nje=class extends(Xq=Qe,Jq=mle,Xq){constructor({message:e}){super({name:_H,message:e}),this[Jq]=!0}static isInstance(e){return Qe.hasMarker(e,TH)}},PH="AI_LoadSettingError",LH=`vercel.ai.error.${PH}`,hle=Symbol.for(LH),Yq,Qq,zje=class extends(Qq=Qe,Yq=hle,Qq){constructor({message:e}){super({name:PH,message:e}),this[Yq]=!0}static isInstance(e){return Qe.hasMarker(e,LH)}},EH="AI_NoContentGeneratedError",AH=`vercel.ai.error.${EH}`,gle=Symbol.for(AH),eH,tH,Fje=class extends(tH=Qe,eH=gle,tH){constructor({message:e="No content generated."}={}){super({name:EH,message:e}),this[eH]=!0}static isInstance(e){return Qe.hasMarker(e,AH)}},RH="AI_NoSuchModelError",MH=`vercel.ai.error.${RH}`,yle=Symbol.for(MH),rH,nH,Bje=class extends(nH=Qe,rH=yle,nH){constructor({errorName:e=RH,modelId:t,modelType:r,message:n=`No such ${r}: ${t}`}){super({name:e,message:n}),this[rH]=!0,this.modelId=t,this.modelType=r}static isInstance(e){return Qe.hasMarker(e,MH)}},$H="AI_TooManyEmbeddingValuesForCallError",DH=`vercel.ai.error.${$H}`,xle=Symbol.for(DH),oH,aH,jje=class extends(aH=Qe,oH=xle,aH){constructor(e){super({name:$H,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[oH]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return Qe.hasMarker(e,DH)}},OH="AI_TypeValidationError",NH=`vercel.ai.error.${OH}`,vle=Symbol.for(NH),iH,sH,Du=class KE extends(sH=Qe,iH=vle,sH){constructor({value:t,cause:r}){super({name:OH,message:`Type validation failed: Value: ${JSON.stringify(t)}.
|
|
56
|
+
Error message: ${gH(r)}`,cause:r}),this[iH]=!0,this.value=t}static isInstance(t){return Qe.hasMarker(t,NH)}static wrap({value:t,cause:r}){return KE.isInstance(r)&&r.value===t?r:new KE({value:t,cause:r})}},zH="AI_UnsupportedFunctionalityError",FH=`vercel.ai.error.${zH}`,ble=Symbol.for(FH),lH,uH,Uje=class extends(uH=Qe,lH=ble,uH){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:zH,message:t}),this[lH]=!0,this.functionality=e}static isInstance(e){return Qe.hasMarker(e,FH)}};var AS=class extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function XE(e){}function BH(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=XE,onError:r=XE,onRetry:n=XE,onComment:o}=e,a="",i=!0,s,l="",u="";function c(h){let v=i?h.replace(/^\xEF\xBB\xBF/,""):h,[g,y]=wle(`${a}${v}`);for(let x of g)d(x);a=y,i=!1}function d(h){if(h===""){p();return}if(h.startsWith(":")){o&&o(h.slice(h.startsWith(": ")?2:1));return}let v=h.indexOf(":");if(v!==-1){let g=h.slice(0,v),y=h[v+1]===" "?2:1,x=h.slice(v+y);f(g,x,h);return}f(h,"",h)}function f(h,v,g){switch(h){case"event":u=v;break;case"data":l=`${l}${v}
|
|
57
|
+
`;break;case"id":s=v.includes("\0")?void 0:v;break;case"retry":/^\d+$/.test(v)?n(parseInt(v,10)):r(new AS(`Invalid \`retry\` value: "${v}"`,{type:"invalid-retry",value:v,line:g}));break;default:r(new AS(`Unknown field "${h.length>20?`${h.slice(0,20)}\u2026`:h}"`,{type:"unknown-field",field:h,value:v,line:g}));break}}function p(){l.length>0&&t({id:s,event:u||void 0,data:l.endsWith(`
|
|
58
|
+
`)?l.slice(0,-1):l}),s=void 0,l="",u=""}function m(h={}){a&&h.consume&&d(a),i=!0,s=void 0,l="",u="",a=""}return{feed:c,reset:m}}function wle(e){let t=[],r="",n=0;for(;n<e.length;){let o=e.indexOf("\r",n),a=e.indexOf(`
|
|
59
|
+
`,n),i=-1;if(o!==-1&&a!==-1?i=Math.min(o,a):o!==-1?o===e.length-1?i=-1:i=o:a!==-1&&(i=a),i===-1){r=e.slice(n);break}else{let s=e.slice(n,i);t.push(s),n=i+1,e[n-1]==="\r"&&e[n]===`
|
|
60
|
+
`&&n++}}return[t,r]}var RS=class extends TransformStream{constructor({onError:t,onRetry:r,onComment:n}={}){let o;super({start(a){o=BH({onEvent:i=>{a.enqueue(i)},onError(i){t==="terminate"?a.error(i):typeof t=="function"&&t(i)},onRetry:r,onComment:n})},transform(a){o.feed(a)}})}};var w={};Et(w,{$brand:()=>MS,$input:()=>yR,$output:()=>gR,NEVER:()=>YE,TimePrecision:()=>wR,ZodAny:()=>u$,ZodArray:()=>p$,ZodBase64:()=>ak,ZodBase64URL:()=>ik,ZodBigInt:()=>Ef,ZodBigIntFormat:()=>uk,ZodBoolean:()=>Lf,ZodCIDRv4:()=>nk,ZodCIDRv6:()=>ok,ZodCUID:()=>JI,ZodCUID2:()=>XI,ZodCatch:()=>D$,ZodCodec:()=>yk,ZodCustom:()=>Og,ZodCustomStringFormat:()=>Tf,ZodDate:()=>Ag,ZodDefault:()=>L$,ZodDiscriminatedUnion:()=>h$,ZodE164:()=>sk,ZodEmail:()=>ZI,ZodEmoji:()=>GI,ZodEnum:()=>Cf,ZodError:()=>Kce,ZodExactOptional:()=>_$,ZodFile:()=>k$,ZodFirstPartyTypeKind:()=>Z$,ZodFunction:()=>q$,ZodGUID:()=>_g,ZodIPv4:()=>tk,ZodIPv6:()=>rk,ZodISODate:()=>jI,ZodISODateTime:()=>BI,ZodISODuration:()=>VI,ZodISOTime:()=>UI,ZodIntersection:()=>g$,ZodIssueCode:()=>Xce,ZodJWT:()=>lk,ZodKSUID:()=>ek,ZodLazy:()=>j$,ZodLiteral:()=>I$,ZodMAC:()=>r$,ZodMap:()=>w$,ZodNaN:()=>N$,ZodNanoID:()=>KI,ZodNever:()=>d$,ZodNonOptional:()=>hk,ZodNull:()=>s$,ZodNullable:()=>P$,ZodNumber:()=>Pf,ZodNumberFormat:()=>Vu,ZodObject:()=>Mg,ZodOptional:()=>mk,ZodPipe:()=>gk,ZodPrefault:()=>A$,ZodPromise:()=>V$,ZodReadonly:()=>z$,ZodRealError:()=>Pn,ZodRecord:()=>Dg,ZodSet:()=>S$,ZodString:()=>_f,ZodStringFormat:()=>it,ZodSuccess:()=>$$,ZodSymbol:()=>a$,ZodTemplateLiteral:()=>B$,ZodTransform:()=>C$,ZodTuple:()=>x$,ZodType:()=>ke,ZodULID:()=>YI,ZodURL:()=>Eg,ZodUUID:()=>Na,ZodUndefined:()=>i$,ZodUnion:()=>$g,ZodUnknown:()=>c$,ZodVoid:()=>f$,ZodXID:()=>QI,ZodXor:()=>m$,_ZodString:()=>WI,_default:()=>E$,_function:()=>v9,any:()=>XW,array:()=>Rg,base64:()=>$W,base64url:()=>DW,bigint:()=>WW,boolean:()=>o$,catch:()=>O$,check:()=>b9,cidrv4:()=>RW,cidrv6:()=>MW,clone:()=>en,codec:()=>g9,coerce:()=>G$,config:()=>jt,core:()=>Ri,cuid:()=>kW,cuid2:()=>CW,custom:()=>w9,date:()=>QW,decode:()=>KM,decodeAsync:()=>XM,describe:()=>S9,discriminatedUnion:()=>a9,e164:()=>OW,email:()=>mW,emoji:()=>SW,encode:()=>GM,encodeAsync:()=>JM,endsWith:()=>mf,enum:()=>fk,exactOptional:()=>T$,file:()=>f9,flattenError:()=>fg,float32:()=>UW,float64:()=>VW,formatError:()=>pg,fromJSONSchema:()=>L9,function:()=>v9,getErrorMap:()=>Qce,globalRegistry:()=>Lr,gt:()=>Da,gte:()=>tn,guid:()=>hW,hash:()=>jW,hex:()=>BW,hostname:()=>FW,httpUrl:()=>wW,includes:()=>ff,instanceof:()=>k9,int:()=>HI,int32:()=>qW,int64:()=>ZW,intersection:()=>y$,ipv4:()=>LW,ipv6:()=>AW,iso:()=>kf,json:()=>_9,jwt:()=>NW,keyof:()=>e9,ksuid:()=>PW,lazy:()=>U$,length:()=>ju,literal:()=>d9,locales:()=>wg,looseObject:()=>n9,looseRecord:()=>s9,lowercase:()=>cf,lt:()=>$a,lte:()=>Zn,mac:()=>EW,map:()=>l9,maxLength:()=>Bu,maxSize:()=>el,meta:()=>I9,mime:()=>hf,minLength:()=>Ai,minSize:()=>Oa,multipleOf:()=>Qs,nan:()=>h9,nanoid:()=>IW,nativeEnum:()=>c9,negative:()=>AI,never:()=>ck,nonnegative:()=>MI,nonoptional:()=>M$,nonpositive:()=>RI,normalize:()=>gf,null:()=>l$,nullable:()=>Pg,nullish:()=>p9,number:()=>n$,object:()=>t9,optional:()=>Tg,overwrite:()=>ta,parse:()=>HM,parseAsync:()=>WM,partialRecord:()=>i9,pipe:()=>Lg,positive:()=>EI,prefault:()=>R$,preprocess:()=>T9,prettifyError:()=>cA,promise:()=>x9,property:()=>$I,readonly:()=>F$,record:()=>b$,refine:()=>H$,regex:()=>uf,regexes:()=>So,registry:()=>uI,safeDecode:()=>QM,safeDecodeAsync:()=>t$,safeEncode:()=>YM,safeEncodeAsync:()=>e$,safeParse:()=>ZM,safeParseAsync:()=>Cg,set:()=>u9,setErrorMap:()=>Yce,size:()=>Fu,slugify:()=>bf,startsWith:()=>pf,strictObject:()=>r9,string:()=>qI,stringFormat:()=>zW,stringbool:()=>C9,success:()=>m9,superRefine:()=>W$,symbol:()=>KW,templateLiteral:()=>y9,toJSONSchema:()=>If,toLowerCase:()=>xf,toUpperCase:()=>vf,transform:()=>pk,treeifyError:()=>uA,trim:()=>yf,tuple:()=>v$,uint32:()=>HW,uint64:()=>GW,ulid:()=>_W,undefined:()=>JW,union:()=>dk,unknown:()=>Uu,uppercase:()=>df,url:()=>bW,util:()=>W,uuid:()=>gW,uuidv4:()=>yW,uuidv6:()=>xW,uuidv7:()=>vW,void:()=>YW,xid:()=>TW,xor:()=>o9});var Ri={};Et(Ri,{$ZodAny:()=>z1,$ZodArray:()=>V1,$ZodAsyncError:()=>ea,$ZodBase64:()=>P1,$ZodBase64URL:()=>L1,$ZodBigInt:()=>rI,$ZodBigIntFormat:()=>$1,$ZodBoolean:()=>yg,$ZodCIDRv4:()=>C1,$ZodCIDRv6:()=>_1,$ZodCUID:()=>p1,$ZodCUID2:()=>m1,$ZodCatch:()=>sR,$ZodCheck:()=>ct,$ZodCheckBigIntFormat:()=>VA,$ZodCheckEndsWith:()=>t1,$ZodCheckGreaterThan:()=>KS,$ZodCheckIncludes:()=>QA,$ZodCheckLengthEquals:()=>KA,$ZodCheckLessThan:()=>GS,$ZodCheckLowerCase:()=>XA,$ZodCheckMaxLength:()=>ZA,$ZodCheckMaxSize:()=>qA,$ZodCheckMimeType:()=>n1,$ZodCheckMinLength:()=>GA,$ZodCheckMinSize:()=>HA,$ZodCheckMultipleOf:()=>jA,$ZodCheckNumberFormat:()=>UA,$ZodCheckOverwrite:()=>o1,$ZodCheckProperty:()=>r1,$ZodCheckRegex:()=>JA,$ZodCheckSizeEquals:()=>WA,$ZodCheckStartsWith:()=>e1,$ZodCheckStringFormat:()=>sf,$ZodCheckUpperCase:()=>YA,$ZodCodec:()=>vg,$ZodCustom:()=>hR,$ZodCustomStringFormat:()=>R1,$ZodDate:()=>U1,$ZodDefault:()=>nR,$ZodDiscriminatedUnion:()=>W1,$ZodE164:()=>E1,$ZodEmail:()=>u1,$ZodEmoji:()=>d1,$ZodEncodeError:()=>Gs,$ZodEnum:()=>X1,$ZodError:()=>dg,$ZodExactOptional:()=>tR,$ZodFile:()=>Q1,$ZodFunction:()=>fR,$ZodGUID:()=>s1,$ZodIPv4:()=>S1,$ZodIPv6:()=>I1,$ZodISODate:()=>v1,$ZodISODateTime:()=>x1,$ZodISODuration:()=>w1,$ZodISOTime:()=>b1,$ZodIntersection:()=>Z1,$ZodJWT:()=>A1,$ZodKSUID:()=>y1,$ZodLazy:()=>mR,$ZodLiteral:()=>Y1,$ZodMAC:()=>k1,$ZodMap:()=>K1,$ZodNaN:()=>lR,$ZodNanoID:()=>f1,$ZodNever:()=>B1,$ZodNonOptional:()=>aR,$ZodNull:()=>N1,$ZodNullable:()=>rR,$ZodNumber:()=>tI,$ZodNumberFormat:()=>M1,$ZodObject:()=>p5,$ZodObjectJIT:()=>q1,$ZodOptional:()=>oI,$ZodPipe:()=>uR,$ZodPrefault:()=>oR,$ZodPromise:()=>pR,$ZodReadonly:()=>cR,$ZodRealError:()=>Tn,$ZodRecord:()=>G1,$ZodRegistry:()=>lI,$ZodSet:()=>J1,$ZodString:()=>zu,$ZodStringFormat:()=>at,$ZodSuccess:()=>iR,$ZodSymbol:()=>D1,$ZodTemplateLiteral:()=>dR,$ZodTransform:()=>eR,$ZodTuple:()=>nI,$ZodType:()=>xe,$ZodULID:()=>h1,$ZodURL:()=>c1,$ZodUUID:()=>l1,$ZodUndefined:()=>O1,$ZodUnion:()=>xg,$ZodUnknown:()=>F1,$ZodVoid:()=>j1,$ZodXID:()=>g1,$ZodXor:()=>H1,$brand:()=>MS,$constructor:()=>R,$input:()=>yR,$output:()=>gR,Doc:()=>gg,JSONSchema:()=>fW,JSONSchemaGenerator:()=>zI,NEVER:()=>YE,TimePrecision:()=>wR,_any:()=>UR,_array:()=>KR,_base64:()=>_I,_base64url:()=>TI,_bigint:()=>DR,_boolean:()=>MR,_catch:()=>jce,_check:()=>dW,_cidrv4:()=>kI,_cidrv6:()=>CI,_coercedBigint:()=>OR,_coercedBoolean:()=>$R,_coercedDate:()=>ZR,_coercedNumber:()=>TR,_coercedString:()=>vR,_cuid:()=>yI,_cuid2:()=>xI,_custom:()=>XR,_date:()=>WR,_decode:()=>FS,_decodeAsync:()=>jS,_default:()=>zce,_discriminatedUnion:()=>_ce,_e164:()=>PI,_email:()=>cI,_emoji:()=>hI,_encode:()=>zS,_encodeAsync:()=>BS,_endsWith:()=>mf,_enum:()=>Rce,_file:()=>JR,_float32:()=>LR,_float64:()=>ER,_gt:()=>Da,_gte:()=>tn,_guid:()=>Sg,_includes:()=>ff,_int:()=>PR,_int32:()=>AR,_int64:()=>NR,_intersection:()=>Tce,_ipv4:()=>SI,_ipv6:()=>II,_isoDate:()=>IR,_isoDateTime:()=>SR,_isoDuration:()=>CR,_isoTime:()=>kR,_jwt:()=>LI,_ksuid:()=>wI,_lazy:()=>Hce,_length:()=>ju,_literal:()=>$ce,_lowercase:()=>cf,_lt:()=>$a,_lte:()=>Zn,_mac:()=>bR,_map:()=>Ece,_max:()=>Zn,_maxLength:()=>Bu,_maxSize:()=>el,_mime:()=>hf,_min:()=>tn,_minLength:()=>Ai,_minSize:()=>Oa,_multipleOf:()=>Qs,_nan:()=>GR,_nanoid:()=>gI,_nativeEnum:()=>Mce,_negative:()=>AI,_never:()=>qR,_nonnegative:()=>MI,_nonoptional:()=>Fce,_nonpositive:()=>RI,_normalize:()=>gf,_null:()=>jR,_nullable:()=>Nce,_number:()=>_R,_optional:()=>Oce,_overwrite:()=>ta,_parse:()=>rf,_parseAsync:()=>nf,_pipe:()=>Uce,_positive:()=>EI,_promise:()=>Wce,_property:()=>$I,_readonly:()=>Vce,_record:()=>Lce,_refine:()=>YR,_regex:()=>uf,_safeDecode:()=>VS,_safeDecodeAsync:()=>HS,_safeEncode:()=>US,_safeEncodeAsync:()=>qS,_safeParse:()=>of,_safeParseAsync:()=>af,_set:()=>Ace,_size:()=>Fu,_slugify:()=>bf,_startsWith:()=>pf,_string:()=>xR,_stringFormat:()=>wf,_stringbool:()=>rM,_success:()=>Bce,_superRefine:()=>QR,_symbol:()=>FR,_templateLiteral:()=>qce,_toLowerCase:()=>xf,_toUpperCase:()=>vf,_transform:()=>Dce,_trim:()=>yf,_tuple:()=>Pce,_uint32:()=>RR,_uint64:()=>zR,_ulid:()=>vI,_undefined:()=>BR,_union:()=>kce,_unknown:()=>VR,_uppercase:()=>df,_url:()=>Ig,_uuid:()=>dI,_uuidv4:()=>fI,_uuidv6:()=>pI,_uuidv7:()=>mI,_void:()=>HR,_xid:()=>bI,_xor:()=>Cce,clone:()=>en,config:()=>jt,createStandardJSONSchemaMethod:()=>Sf,createToJSONSchemaMethod:()=>nM,decode:()=>Kle,decodeAsync:()=>Xle,describe:()=>eM,encode:()=>Gle,encodeAsync:()=>Jle,extractDefs:()=>rl,finalize:()=>nl,flattenError:()=>fg,formatError:()=>pg,globalConfig:()=>og,globalRegistry:()=>Lr,initializeContext:()=>tl,isValidBase64:()=>T1,isValidBase64URL:()=>u5,isValidJWT:()=>c5,locales:()=>wg,meta:()=>tM,parse:()=>OS,parseAsync:()=>NS,prettifyError:()=>cA,process:()=>Ke,regexes:()=>So,registry:()=>uI,safeDecode:()=>Qle,safeDecodeAsync:()=>tue,safeEncode:()=>Yle,safeEncodeAsync:()=>eue,safeParse:()=>dA,safeParseAsync:()=>fA,toDotPath:()=>HH,toJSONSchema:()=>If,treeifyError:()=>uA,util:()=>W,version:()=>a1});var YE=Object.freeze({status:"aborted"});function R(e,t,r){function n(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:i,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let u=i.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){let f=c[d];f in s||(s[f]=u[f].bind(s))}}let o=r?.Parent??Object;class a extends o{}Object.defineProperty(a,"name",{value:e});function i(s){var l;let u=r?.Parent?new a:this;n(u,s),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}var MS=Symbol("zod_brand"),ea=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Gs=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},og={};function jt(e){return e&&Object.assign(og,e),og}var W={};Et(W,{BIGINT_FORMAT_RANGES:()=>lA,Class:()=>eA,NUMBER_FORMAT_RANGES:()=>sA,aborted:()=>Ys,allowsEval:()=>nA,assert:()=>_le,assertEqual:()=>Sle,assertIs:()=>kle,assertNever:()=>Cle,assertNotEqual:()=>Ile,assignProp:()=>Js,base64ToUint8Array:()=>UH,base64urlToUint8Array:()=>Vle,cached:()=>ef,captureStackTrace:()=>DS,cleanEnum:()=>Ule,cleanRegex:()=>sg,clone:()=>en,cloneDef:()=>Ple,createTransparentProxy:()=>$le,defineLazy:()=>Pe,esc:()=>$S,escapeRegex:()=>wo,extend:()=>Nle,finalizeIssue:()=>_n,floatSafeRemainder:()=>tA,getElementAtPath:()=>Lle,getEnumValues:()=>ig,getLengthableOrigin:()=>cg,getParsedType:()=>Mle,getSizableOrigin:()=>ug,hexToUint8Array:()=>Hle,isObject:()=>Ou,isPlainObject:()=>Xs,issue:()=>tf,joinValues:()=>$,jsonStringifyReplacer:()=>Qd,merge:()=>Fle,mergeDefs:()=>Ei,normalizeParams:()=>X,nullish:()=>Ks,numKeys:()=>Rle,objectClone:()=>Tle,omit:()=>Ole,optionalKeys:()=>iA,parsedType:()=>H,partial:()=>Ble,pick:()=>Dle,prefixIssues:()=>Wn,primitiveTypes:()=>aA,promiseAllObject:()=>Ele,propertyKeyTypes:()=>lg,randomString:()=>Ale,required:()=>jle,safeExtend:()=>zle,shallowClone:()=>oA,slugify:()=>rA,stringifyPrimitive:()=>V,uint8ArrayToBase64:()=>VH,uint8ArrayToBase64url:()=>qle,uint8ArrayToHex:()=>Wle,unwrapMessage:()=>ag});function Sle(e){return e}function Ile(e){return e}function kle(e){}function Cle(e){throw new Error("Unexpected value in exhaustive check")}function _le(e){}function ig(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function $(e,t="|"){return e.map(r=>V(r)).join(t)}function Qd(e,t){return typeof t=="bigint"?t.toString():t}function ef(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ks(e){return e==null}function sg(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function tA(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){let l=n.match(/\d?e-(\d?)/);l?.[1]&&(o=Number.parseInt(l[1]))}let a=r>o?r:o,i=Number.parseInt(e.toFixed(a).replace(".","")),s=Number.parseInt(t.toFixed(a).replace(".",""));return i%s/10**a}var jH=Symbol("evaluating");function Pe(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==jH)return n===void 0&&(n=jH,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Tle(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Js(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ei(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Ple(e){return Ei(e._zod.def)}function Lle(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Ele(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let a=0;a<t.length;a++)o[t[a]]=n[a];return o})}function Ale(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function $S(e){return JSON.stringify(e)}function rA(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var DS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ou(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var nA=ef(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Xs(e){if(Ou(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ou(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function oA(e){return Xs(e)?{...e}:Array.isArray(e)?[...e]:e}function Rle(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Mle=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},lg=new Set(["string","number","symbol"]),aA=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function en(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function X(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function $le(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,a){return t??(t=e()),Reflect.set(t,n,o,a)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function V(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function iA(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var sA={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lA={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Dle(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=Ei(e._zod.def,{get shape(){let i={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(i[s]=r.shape[s])}return Js(this,"shape",i),i},checks:[]});return en(e,a)}function Ole(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=Ei(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete i[s]}return Js(this,"shape",i),i},checks:[]});return en(e,a)}function Nle(e,t){if(!Xs(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let a=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(a,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Ei(e._zod.def,{get shape(){let a={...e._zod.def.shape,...t};return Js(this,"shape",a),a}});return en(e,o)}function zle(e,t){if(!Xs(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ei(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Js(this,"shape",n),n}});return en(e,r)}function Fle(e,t){let r=Ei(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Js(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return en(e,r)}function Ble(e,t,r){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let i=Ei(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(r)for(let u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(l[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)l[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return Js(this,"shape",l),l},checks:[]});return en(t,i)}function jle(e,t,r){let n=Ei(t._zod.def,{get shape(){let o=t._zod.def.shape,a={...o};if(r)for(let i in r){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(a[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)a[i]=new e({type:"nonoptional",innerType:o[i]});return Js(this,"shape",a),a}});return en(t,n)}function Ys(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Wn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ag(e){return typeof e=="string"?e:e?.message}function _n(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=ag(e.inst?._zod.def?.error?.(e))??ag(t?.error?.(e))??ag(r.customError?.(e))??ag(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function ug(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function H(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function tf(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function Ule(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function UH(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function VH(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Vle(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return UH(t+r)}function qle(e){return VH(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Hle(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function Wle(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var eA=class{constructor(...t){}};var qH=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Qd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dg=R("$ZodError",qH),Tn=R("$ZodError",qH,{Parent:Error});function fg(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function pg(e,t=r=>r.message){let r={_errors:[]},n=o=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>n({issues:i}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)r._errors.push(t(a));else{let i=r,s=0;for(;s<a.path.length;){let l=a.path[s];s===a.path.length-1?(i[l]=i[l]||{_errors:[]},i[l]._errors.push(t(a))):i[l]=i[l]||{_errors:[]},i=i[l],s++}}};return n(e),r}function uA(e,t=r=>r.message){let r={errors:[]},n=(o,a=[])=>{var i,s;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>n({issues:u},l.path));else if(l.code==="invalid_key")n({issues:l.issues},l.path);else if(l.code==="invalid_element")n({issues:l.issues},l.path);else{let u=[...a,...l.path];if(u.length===0){r.errors.push(t(l));continue}let c=r,d=0;for(;d<u.length;){let f=u[d],p=d===u.length-1;typeof f=="string"?(c.properties??(c.properties={}),(i=c.properties)[f]??(i[f]={errors:[]}),c=c.properties[f]):(c.items??(c.items=[]),(s=c.items)[f]??(s[f]={errors:[]}),c=c.items[f]),p&&c.errors.push(t(l)),d++}}};return n(e),r}function HH(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function cA(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${HH(n.path)}`);return t.join(`
|
|
61
|
+
`)}var rf=e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:r,issues:[]},a);if(i instanceof Promise)throw new ea;if(i.issues.length){let s=new(o?.Err??e)(i.issues.map(l=>_n(l,a,jt())));throw DS(s,o?.callee),s}return i.value},OS=rf(Tn),nf=e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){let s=new(o?.Err??e)(i.issues.map(l=>_n(l,a,jt())));throw DS(s,o?.callee),s}return i.value},NS=nf(Tn),of=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new ea;return a.issues.length?{success:!1,error:new(e??dg)(a.issues.map(i=>_n(i,o,jt())))}:{success:!0,data:a.value}},dA=of(Tn),af=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>_n(i,o,jt())))}:{success:!0,data:a.value}},fA=af(Tn),zS=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return rf(e)(t,r,o)},Gle=zS(Tn),FS=e=>(t,r,n)=>rf(e)(t,r,n),Kle=FS(Tn),BS=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return nf(e)(t,r,o)},Jle=BS(Tn),jS=e=>async(t,r,n)=>nf(e)(t,r,n),Xle=jS(Tn),US=e=>(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return of(e)(t,r,o)},Yle=US(Tn),VS=e=>(t,r,n)=>of(e)(t,r,n),Qle=VS(Tn),qS=e=>async(t,r,n)=>{let o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return af(e)(t,r,o)},eue=qS(Tn),HS=e=>async(t,r,n)=>af(e)(t,r,n),tue=HS(Tn);var So={};Et(So,{base64:()=>PA,base64url:()=>WS,bigint:()=>$A,boolean:()=>OA,browserEmail:()=>uue,cidrv4:()=>_A,cidrv6:()=>TA,cuid:()=>pA,cuid2:()=>mA,date:()=>EA,datetime:()=>RA,domain:()=>fue,duration:()=>vA,e164:()=>LA,email:()=>wA,emoji:()=>SA,extendedDuration:()=>rue,guid:()=>bA,hex:()=>pue,hostname:()=>due,html5Email:()=>iue,idnEmail:()=>lue,integer:()=>DA,ipv4:()=>IA,ipv6:()=>kA,ksuid:()=>yA,lowercase:()=>FA,mac:()=>CA,md5_base64:()=>hue,md5_base64url:()=>gue,md5_hex:()=>mue,nanoid:()=>xA,null:()=>NA,number:()=>ZS,rfc5322Email:()=>sue,sha1_base64:()=>xue,sha1_base64url:()=>vue,sha1_hex:()=>yue,sha256_base64:()=>wue,sha256_base64url:()=>Sue,sha256_hex:()=>bue,sha384_base64:()=>kue,sha384_base64url:()=>Cue,sha384_hex:()=>Iue,sha512_base64:()=>Tue,sha512_base64url:()=>Pue,sha512_hex:()=>_ue,string:()=>MA,time:()=>AA,ulid:()=>hA,undefined:()=>zA,unicodeEmail:()=>WH,uppercase:()=>BA,uuid:()=>Nu,uuid4:()=>nue,uuid6:()=>oue,uuid7:()=>aue,xid:()=>gA});var pA=/^[cC][^\s-]{8,}$/,mA=/^[0-9a-z]+$/,hA=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gA=/^[0-9a-vA-V]{20}$/,yA=/^[A-Za-z0-9]{27}$/,xA=/^[a-zA-Z0-9_-]{21}$/,vA=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rue=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,bA=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Nu=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nue=Nu(4),oue=Nu(6),aue=Nu(7),wA=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iue=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,sue=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,WH=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,lue=WH,uue=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function SA(){return new RegExp(cue,"u")}var IA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,CA=e=>{let t=wo(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},_A=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,TA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,PA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WS=/^[A-Za-z0-9_-]*$/,due=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,fue=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,LA=/^\+[1-9]\d{6,14}$/,ZH="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",EA=new RegExp(`^${ZH}$`);function GH(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function AA(e){return new RegExp(`^${GH(e)}$`)}function RA(e){let t=GH({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${ZH}T(?:${n})$`)}var MA=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},$A=/^-?\d+n?$/,DA=/^-?\d+$/,ZS=/^-?\d+(?:\.\d+)?$/,OA=/^(?:true|false)$/i,NA=/^null$/i;var zA=/^undefined$/i;var FA=/^[^A-Z]*$/,BA=/^[^a-z]*$/,pue=/^[0-9a-fA-F]*$/;function mg(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function hg(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var mue=/^[0-9a-fA-F]{32}$/,hue=mg(22,"=="),gue=hg(22),yue=/^[0-9a-fA-F]{40}$/,xue=mg(27,"="),vue=hg(27),bue=/^[0-9a-fA-F]{64}$/,wue=mg(43,"="),Sue=hg(43),Iue=/^[0-9a-fA-F]{96}$/,kue=mg(64,""),Cue=hg(64),_ue=/^[0-9a-fA-F]{128}$/,Tue=mg(86,"=="),Pue=hg(86);var ct=R("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),JH={number:"number",bigint:"bigint",object:"date"},GS=R("$ZodCheckLessThan",(e,t)=>{ct.init(e,t);let r=JH[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),KS=R("$ZodCheckGreaterThan",(e,t)=>{ct.init(e,t);let r=JH[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jA=R("$ZodCheckMultipleOf",(e,t)=>{ct.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):tA(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),UA=R("$ZodCheckNumberFormat",(e,t)=>{ct.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,a]=sA[t.format];e._zod.onattach.push(i=>{let s=i._zod.bag;s.format=t.format,s.minimum=o,s.maximum=a,r&&(s.pattern=DA)}),e._zod.check=i=>{let s=i.value;if(r){if(!Number.isInteger(s)){i.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?i.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):i.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&i.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>a&&i.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),VA=R("$ZodCheckBigIntFormat",(e,t)=>{ct.init(e,t);let[r,n]=lA[t.format];e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,a.minimum=r,a.maximum=n}),e._zod.check=o=>{let a=o.value;a<r&&o.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>n&&o.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),qA=R("$ZodCheckMaxSize",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:ug(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),HA=R("$ZodCheckMinSize",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:ug(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),WA=R("$ZodCheckSizeEquals",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.size!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=n=>{let o=n.value,a=o.size;if(a===t.size)return;let i=a>t.size;n.issues.push({origin:ug(o),...i?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ZA=R("$ZodCheckMaxLength",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let i=cg(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),GA=R("$ZodCheckMinLength",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let i=cg(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KA=R("$ZodCheckLengthEquals",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Ks(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,a=o.length;if(a===t.length)return;let i=cg(o),s=a>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sf=R("$ZodCheckStringFormat",(e,t)=>{var r,n;ct.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),JA=R("$ZodCheckRegex",(e,t)=>{sf.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),XA=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=FA),sf.init(e,t)}),YA=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=BA),sf.init(e,t)}),QA=R("$ZodCheckIncludes",(e,t)=>{ct.init(e,t);let r=wo(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),e1=R("$ZodCheckStartsWith",(e,t)=>{ct.init(e,t);let r=new RegExp(`^${wo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),t1=R("$ZodCheckEndsWith",(e,t)=>{ct.init(e,t);let r=new RegExp(`.*${wo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function KH(e,t,r){e.issues.length&&t.issues.push(...Wn(r,e.issues))}var r1=R("$ZodCheckProperty",(e,t)=>{ct.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>KH(o,r,t.property));KH(n,r,t.property)}}),n1=R("$ZodCheckMimeType",(e,t)=>{ct.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),o1=R("$ZodCheckOverwrite",(e,t)=>{ct.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var gg=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
62
|
+
`).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),a=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(let i of a)this.content.push(i)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...r,o.join(`
|
|
63
|
+
`))}};var a1={major:4,minor:3,patch:5};var xe=R("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=a1;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(i,s,l)=>{let u=Ys(i),c;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(i))continue}else if(u)continue;let f=i.issues.length,p=d._zod.check(i);if(p instanceof Promise&&l?.async===!1)throw new ea;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,i.issues.length!==f&&(u||(u=Ys(i,f)))});else{if(i.issues.length===f)continue;u||(u=Ys(i,f))}}return c?c.then(()=>i):i},a=(i,s,l)=>{if(Ys(i))return i.aborted=!0,i;let u=o(s,n,l);if(u instanceof Promise){if(l.async===!1)throw new ea;return u.then(c=>e._zod.parse(c,l))}return e._zod.parse(u,l)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if(s.direction==="backward"){let u=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(c=>a(c,i,s)):a(u,i,s)}let l=e._zod.parse(i,s);if(l instanceof Promise){if(s.async===!1)throw new ea;return l.then(u=>o(u,n,s))}return o(l,n,s)}}Pe(e,"~standard",()=>({validate:o=>{try{let a=dA(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return fA(e,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),zu=R("$ZodString",(e,t)=>{xe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??MA(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),at=R("$ZodStringFormat",(e,t)=>{sf.init(e,t),zu.init(e,t)}),s1=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=bA),at.init(e,t)}),l1=R("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Nu(n))}else t.pattern??(t.pattern=Nu());at.init(e,t)}),u1=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wA),at.init(e,t)}),c1=R("$ZodURL",(e,t)=>{at.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),d1=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=SA()),at.init(e,t)}),f1=R("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=xA),at.init(e,t)}),p1=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pA),at.init(e,t)}),m1=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=mA),at.init(e,t)}),h1=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=hA),at.init(e,t)}),g1=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=gA),at.init(e,t)}),y1=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=yA),at.init(e,t)}),x1=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=RA(t)),at.init(e,t)}),v1=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=EA),at.init(e,t)}),b1=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=AA(t)),at.init(e,t)}),w1=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=vA),at.init(e,t)}),S1=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=IA),at.init(e,t),e._zod.bag.format="ipv4"}),I1=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=kA),at.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),k1=R("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=CA(t.delimiter)),at.init(e,t),e._zod.bag.format="mac"}),C1=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_A),at.init(e,t)}),_1=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=TA),at.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[o,a]=n;if(!a)throw new Error;let i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function T1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var P1=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=PA),at.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{T1(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function u5(e){if(!WS.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return T1(r)}var L1=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=WS),at.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{u5(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),E1=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=LA),at.init(e,t)});function c5(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var A1=R("$ZodJWT",(e,t)=>{at.init(e,t),e._zod.check=r=>{c5(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),R1=R("$ZodCustomStringFormat",(e,t)=>{at.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),tI=R("$ZodNumber",(e,t)=>{xe.init(e,t),e._zod.pattern=e._zod.bag.pattern??ZS,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}}),M1=R("$ZodNumberFormat",(e,t)=>{UA.init(e,t),tI.init(e,t)}),yg=R("$ZodBoolean",(e,t)=>{xe.init(e,t),e._zod.pattern=OA,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),rI=R("$ZodBigInt",(e,t)=>{xe.init(e,t),e._zod.pattern=$A,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),$1=R("$ZodBigIntFormat",(e,t)=>{VA.init(e,t),rI.init(e,t)}),D1=R("$ZodSymbol",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),O1=R("$ZodUndefined",(e,t)=>{xe.init(e,t),e._zod.pattern=zA,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),N1=R("$ZodNull",(e,t)=>{xe.init(e,t),e._zod.pattern=NA,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),z1=R("$ZodAny",(e,t)=>{xe.init(e,t),e._zod.parse=r=>r}),F1=R("$ZodUnknown",(e,t)=>{xe.init(e,t),e._zod.parse=r=>r}),B1=R("$ZodNever",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),j1=R("$ZodVoid",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),U1=R("$ZodDate",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function YH(e,t,r){e.issues.length&&t.issues.push(...Wn(r,e.issues)),t.value[r]=e.value}var V1=R("$ZodArray",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let a=[];for(let i=0;i<o.length;i++){let s=o[i],l=t.element._zod.run({value:s,issues:[]},n);l instanceof Promise?a.push(l.then(u=>YH(u,r,i))):YH(l,r,i)}return a.length?Promise.all(a).then(()=>r):r}});function eI(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Wn(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function d5(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=iA(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function f5(e,t,r,n,o,a){let i=[],s=o.keySet,l=o.catchall._zod,u=l.def.type,c=l.optout==="optional";for(let d in t){if(s.has(d))continue;if(u==="never"){i.push(d);continue}let f=l.run({value:t[d],issues:[]},n);f instanceof Promise?e.push(f.then(p=>eI(p,r,d,t,c))):eI(f,r,d,t,c)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}var p5=R("$ZodObject",(e,t)=>{if(xe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}let n=ef(()=>d5(t));Pe(e._zod,"propValues",()=>{let s=t.shape,l={};for(let u in s){let c=s[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(let d of c.values)l[u].add(d)}}return l});let o=Ou,a=t.catchall,i;e._zod.parse=(s,l)=>{i??(i=n.value);let u=s.value;if(!o(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let c=[],d=i.shape;for(let f of i.keys){let p=d[f],m=p._zod.optout==="optional",h=p._zod.run({value:u[f],issues:[]},l);h instanceof Promise?c.push(h.then(v=>eI(v,s,f,u,m))):eI(h,s,f,u,m)}return a?f5(c,u,s,l,n.value,e):c.length?Promise.all(c).then(()=>s):s}}),q1=R("$ZodObjectJIT",(e,t)=>{p5.init(e,t);let r=e._zod.parse,n=ef(()=>d5(t)),o=f=>{let p=new gg(["shape","payload","ctx"]),m=n.value,h=x=>{let b=$S(x);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};p.write("const input = payload.value;");let v=Object.create(null),g=0;for(let x of m.keys)v[x]=`key_${g++}`;p.write("const newResult = {};");for(let x of m.keys){let b=v[x],_=$S(x),C=f[x]?._zod?.optout==="optional";p.write(`const ${b} = ${h(x)};`),C?p.write(`
|
|
64
|
+
if (${b}.issues.length) {
|
|
65
|
+
if (${_} in input) {
|
|
66
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
67
|
+
...iss,
|
|
68
|
+
path: iss.path ? [${_}, ...iss.path] : [${_}]
|
|
69
|
+
})));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (${b}.value === undefined) {
|
|
74
|
+
if (${_} in input) {
|
|
75
|
+
newResult[${_}] = undefined;
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
newResult[${_}] = ${b}.value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
`):p.write(`
|
|
82
|
+
if (${b}.issues.length) {
|
|
83
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
84
|
+
...iss,
|
|
85
|
+
path: iss.path ? [${_}, ...iss.path] : [${_}]
|
|
86
|
+
})));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (${b}.value === undefined) {
|
|
90
|
+
if (${_} in input) {
|
|
91
|
+
newResult[${_}] = undefined;
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
newResult[${_}] = ${b}.value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");let y=p.compile();return(x,b)=>y(f,x,b)},a,i=Ou,s=!og.jitless,u=s&&nA.value,c=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=n.value);let m=f.value;return i(m)?s&&u&&p?.async===!1&&p.jitless!==!0?(a||(a=o(t.shape)),f=a(f,p),c?f5([],m,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function QH(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!Ys(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(i=>_n(i,n,jt())))}),t)}var xg=R("$ZodUnion",(e,t)=>{xe.init(e,t),Pe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Pe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Pe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Pe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>sg(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let i=!1,s=[];for(let l of t.options){let u=l._zod.run({value:o.value,issues:[]},a);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(l=>QH(l,o,e,a)):QH(s,o,e,a)}});function e5(e,t,r,n){let o=e.filter(a=>a.issues.length===0);return o.length===1?(t.value=o[0].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(i=>_n(i,n,jt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var H1=R("$ZodXor",(e,t)=>{xg.init(e,t),t.inclusive=!1;let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let i=!1,s=[];for(let l of t.options){let u=l._zod.run({value:o.value,issues:[]},a);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(l=>e5(l,o,e,a)):e5(s,o,e,a)}}),W1=R("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,xg.init(e,t);let r=e._zod.parse;Pe(e._zod,"propValues",()=>{let o={};for(let a of t.options){let i=a._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[s,l]of Object.entries(i)){o[s]||(o[s]=new Set);for(let u of l)o[s].add(u)}}return o});let n=ef(()=>{let o=t.options,a=new Map;for(let i of o){let s=i._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let l of s){if(a.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);a.set(l,i)}}return a});e._zod.parse=(o,a)=>{let i=o.value;if(!Ou(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;let s=n.value.get(i?.[t.discriminator]);return s?s._zod.run(o,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:i,path:[t.discriminator],inst:e}),o)}}),Z1=R("$ZodIntersection",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,a=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([l,u])=>t5(r,l,u)):t5(r,a,i)}});function i1(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Xs(e)&&Xs(t)){let r=Object.keys(t),n=Object.keys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(let a of n){let i=i1(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};o[a]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],a=t[n],i=i1(o,a);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function t5(e,t,r){let n=new Map,o;for(let s of t.issues)if(s.code==="unrecognized_keys"){o??(o=s);for(let l of s.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else e.issues.push(s);let a=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&o&&e.issues.push({...o,keys:a}),Ys(e))return e;let i=i1(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var nI=R("$ZodTuple",(e,t)=>{xe.init(e,t);let r=t.items;e._zod.parse=(n,o)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let i=[],s=[...r].reverse().findIndex(c=>c._zod.optin!=="optional"),l=s===-1?0:r.length-s;if(!t.rest){let c=a.length>r.length,d=a.length<l-1;if(c||d)return n.issues.push({...c?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:a,inst:e,origin:"array"}),n}let u=-1;for(let c of r){if(u++,u>=a.length&&u>=l)continue;let d=c._zod.run({value:a[u],issues:[]},o);d instanceof Promise?i.push(d.then(f=>JS(f,n,u))):JS(d,n,u)}if(t.rest){let c=a.slice(r.length);for(let d of c){u++;let f=t.rest._zod.run({value:d,issues:[]},o);f instanceof Promise?i.push(f.then(p=>JS(p,n,u))):JS(f,n,u)}}return i.length?Promise.all(i).then(()=>n):n}});function JS(e,t,r){e.issues.length&&t.issues.push(...Wn(r,e.issues)),t.value[r]=e.value}var G1=R("$ZodRecord",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Xs(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],i=t.keyType._zod.values;if(i){r.value={};let s=new Set;for(let u of i)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let c=t.valueType._zod.run({value:o[u],issues:[]},n);c instanceof Promise?a.push(c.then(d=>{d.issues.length&&r.issues.push(...Wn(u,d.issues)),r.value[u]=d.value})):(c.issues.length&&r.issues.push(...Wn(u,c.issues)),r.value[u]=c.value)}let l;for(let u in o)s.has(u)||(l=l??[],l.push(u));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let l=t.keyType._zod.run({value:s,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ZS.test(s)&&l.issues.length&&l.issues.some(d=>d.code==="invalid_type"&&d.expected==="number")){let d=t.keyType._zod.run({value:Number(s),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){t.mode==="loose"?r.value[s]=o[s]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>_n(d,n,jt())),input:s,path:[s],inst:e});continue}let c=t.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?a.push(c.then(d=>{d.issues.length&&r.issues.push(...Wn(s,d.issues)),r.value[l.value]=d.value})):(c.issues.length&&r.issues.push(...Wn(s,c.issues)),r.value[l.value]=c.value)}}return a.length?Promise.all(a).then(()=>r):r}}),K1=R("$ZodMap",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),r;let a=[];r.value=new Map;for(let[i,s]of o){let l=t.keyType._zod.run({value:i,issues:[]},n),u=t.valueType._zod.run({value:s,issues:[]},n);l instanceof Promise||u instanceof Promise?a.push(Promise.all([l,u]).then(([c,d])=>{r5(c,d,r,i,o,e,n)})):r5(l,u,r,i,o,e,n)}return a.length?Promise.all(a).then(()=>r):r}});function r5(e,t,r,n,o,a,i){e.issues.length&&(lg.has(typeof n)?r.issues.push(...Wn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:a,issues:e.issues.map(s=>_n(s,i,jt()))})),t.issues.length&&(lg.has(typeof n)?r.issues.push(...Wn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:a,key:n,issues:t.issues.map(s=>_n(s,i,jt()))})),r.value.set(e.value,t.value)}var J1=R("$ZodSet",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let i of o){let s=t.valueType._zod.run({value:i,issues:[]},n);s instanceof Promise?a.push(s.then(l=>n5(l,r))):n5(s,r)}return a.length?Promise.all(a).then(()=>r):r}});function n5(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var X1=R("$ZodEnum",(e,t)=>{xe.init(e,t);let r=ig(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>lg.has(typeof o)).map(o=>typeof o=="string"?wo(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),Y1=R("$ZodLiteral",(e,t)=>{if(xe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?wo(n):n?wo(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}}),Q1=R("$ZodFile",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),eR=R("$ZodTransform",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gs(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new ea;return r.value=o,r}});function o5(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var oI=R("$ZodOptional",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Pe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sg(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>o5(a,r.value)):o5(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),tR=R("$ZodExactOptional",(e,t)=>{oI.init(e,t),Pe(e._zod,"values",()=>t.innerType._zod.values),Pe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),rR=R("$ZodNullable",(e,t)=>{xe.init(e,t),Pe(e._zod,"optin",()=>t.innerType._zod.optin),Pe(e._zod,"optout",()=>t.innerType._zod.optout),Pe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sg(r.source)}|null)$`):void 0}),Pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),nR=R("$ZodDefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>a5(a,t)):a5(o,t)}});function a5(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var oR=R("$ZodPrefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),aR=R("$ZodNonOptional",(e,t)=>{xe.init(e,t),Pe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>i5(a,e)):i5(o,e)}});function i5(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var iR=R("$ZodSuccess",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gs("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>(r.value=a.issues.length===0,r)):(r.value=o.issues.length===0,r)}}),sR=R("$ZodCatch",(e,t)=>{xe.init(e,t),Pe(e._zod,"optin",()=>t.innerType._zod.optin),Pe(e._zod,"optout",()=>t.innerType._zod.optout),Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(i=>_n(i,n,jt()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>_n(a,n,jt()))},input:r.value}),r.issues=[]),r)}}),lR=R("$ZodNaN",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),uR=R("$ZodPipe",(e,t)=>{xe.init(e,t),Pe(e._zod,"values",()=>t.in._zod.values),Pe(e._zod,"optin",()=>t.in._zod.optin),Pe(e._zod,"optout",()=>t.out._zod.optout),Pe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(i=>XS(i,t.in,n)):XS(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>XS(a,t.out,n)):XS(o,t.out,n)}});function XS(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var vg=R("$ZodCodec",(e,t)=>{xe.init(e,t),Pe(e._zod,"values",()=>t.in._zod.values),Pe(e._zod,"optin",()=>t.in._zod.optin),Pe(e._zod,"optout",()=>t.out._zod.optout),Pe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let a=t.in._zod.run(r,n);return a instanceof Promise?a.then(i=>YS(i,t,n)):YS(a,t,n)}else{let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(i=>YS(i,t,n)):YS(a,t,n)}}});function YS(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(a=>QS(e,a,t.out,r)):QS(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(a=>QS(e,a,t.in,r)):QS(e,o,t.in,r)}}function QS(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var cR=R("$ZodReadonly",(e,t)=>{xe.init(e,t),Pe(e._zod,"propValues",()=>t.innerType._zod.propValues),Pe(e._zod,"values",()=>t.innerType._zod.values),Pe(e._zod,"optin",()=>t.innerType?._zod?.optin),Pe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s5):s5(o)}});function s5(e){return e.value=Object.freeze(e.value),e}var dR=R("$ZodTemplateLiteral",(e,t)=>{xe.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let a=o.startsWith("^")?1:0,i=o.endsWith("$")?o.length-1:o.length;r.push(o.slice(a,i))}else if(n===null||aA.has(typeof n))r.push(wo(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),fR=R("$ZodFunction",(e,t)=>(xe.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let o=e._def.input?OS(e._def.input,n):n,a=Reflect.apply(r,this,o);return e._def.output?OS(e._def.output,a):a}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let o=e._def.input?await NS(e._def.input,n):n,a=await Reflect.apply(r,this,o);return e._def.output?await NS(e._def.output,a):a}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new nI({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),pR=R("$ZodPromise",(e,t)=>{xe.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),mR=R("$ZodLazy",(e,t)=>{xe.init(e,t),Pe(e._zod,"innerType",()=>t.getter()),Pe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Pe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Pe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Pe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),hR=R("$ZodCustom",(e,t)=>{ct.init(e,t),xe.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(a=>l5(a,r,n,e));l5(o,r,n,e)}});function l5(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(tf(o))}}var wg={};Et(wg,{ar:()=>m5,az:()=>h5,be:()=>y5,bg:()=>x5,ca:()=>v5,cs:()=>b5,da:()=>w5,de:()=>S5,en:()=>aI,eo:()=>I5,es:()=>k5,fa:()=>C5,fi:()=>_5,fr:()=>T5,frCA:()=>P5,he:()=>L5,hu:()=>E5,hy:()=>R5,id:()=>M5,is:()=>$5,it:()=>D5,ja:()=>O5,ka:()=>N5,kh:()=>z5,km:()=>iI,ko:()=>F5,lt:()=>j5,mk:()=>U5,ms:()=>V5,nl:()=>q5,no:()=>H5,ota:()=>W5,pl:()=>G5,ps:()=>Z5,pt:()=>K5,ru:()=>X5,sl:()=>Y5,sv:()=>Q5,ta:()=>eW,th:()=>tW,tr:()=>rW,ua:()=>nW,uk:()=>sI,ur:()=>oW,uz:()=>aW,vi:()=>iW,yo:()=>uW,zhCN:()=>sW,zhTW:()=>lW});var Eue=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${a}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${V(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${o.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${o.minimum.toString()} ${i.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:a.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${a.suffix}"`:a.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${a.includes}"`:a.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${a.pattern}`:`${r[a.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${$(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function m5(){return{localeError:Eue()}}var Aue=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${a}, daxil olan ${s}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${V(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${a}${o.maximum.toString()} ${i.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${a}${o.minimum.toString()} ${i.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[a.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function h5(){return{localeError:Aue()}}function g5(e,t,r,n){let o=Math.abs(e),a=o%10,i=o%100;return i>=11&&i<=19?n:a===1?t:a>=2&&a<=4?r:n}var Rue=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${a}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${V(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);if(i){let s=Number(o.maximum),l=g5(s,i.unit.one,i.unit.few,i.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${a}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);if(i){let s=Number(o.minimum),l=g5(s,i.unit.one,i.unit.few,i.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${i.verb} ${a}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[a.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${$(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function y5(){return{localeError:Rue()}}var Mue=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${V(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;if(a.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${a.prefix}"`;if(a.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${a.suffix}"`;if(a.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${a.includes}"`;if(a.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${a.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return a.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),a.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[a.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${$(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function x5(){return{localeError:Mue()}}var $ue=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${a}, s'ha rebut ${s}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${V(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${$(o.values," o ")}`;case"too_big":{let a=o.inclusive?"com a m\xE0xim":"menys de",i=t(o.origin);return i?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${a} ${o.maximum.toString()} ${i.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${a} ${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?"com a m\xEDnim":"m\xE9s de",i=t(o.origin);return i?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${a} ${o.minimum.toString()} ${i.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${a} ${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${r[a.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function v5(){return{localeError:$ue()}}var Due=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${a}, obdr\u017Eeno ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${V(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${a}${o.maximum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${a}${o.minimum.toString()} ${i.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${r[a.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${$(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function b5(){return{localeError:Due()}}var Oue=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${s}`:`Ugyldigt input: forventede ${a}, fik ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${V(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin),s=n[o.origin]??o.origin;return i?`For stor: forventede ${s??"value"} ${i.verb} ${a} ${o.maximum.toString()} ${i.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${a} ${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin),s=n[o.origin]??o.origin;return i?`For lille: forventede ${s} ${i.verb} ${a} ${o.minimum.toString()} ${i.unit}`:`For lille: forventede ${s} havde ${a} ${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${$(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function w5(){return{localeError:Oue()}}var Nue=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${a}, erhalten ${s}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${V(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${a}${o.maximum.toString()} ${i.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${a}${o.maximum.toString()} ist`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Zu klein: erwartet, dass ${o.origin} ${a}${o.minimum.toString()} ${i.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${a}${o.minimum.toString()} ist`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${r[a.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${$(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function S5(){return{localeError:Nue()}}var zue=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return`Invalid input: expected ${a}, received ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${V(o.values[0])}`:`Invalid option: expected one of ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function aI(){return{localeError:zue()}}var Fue=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${a}, ricevi\u011Dis ${s}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${V(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${a}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${a}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${r[a.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function I5(){return{localeError:Fue()}}var Bue=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${a}, recibido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${V(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin),s=n[o.origin]??o.origin;return i?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${a}${o.maximum.toString()} ${i.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin),s=n[o.origin]??o.origin;return i?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${a}${o.minimum.toString()} ${i.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${r[a.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function k5(){return{localeError:Bue()}}var jue=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${a} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${V(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${$(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${o.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${a}${o.minimum.toString()} ${i.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${a}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[a.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${$(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function C5(){return{localeError:jue()}}var Uue=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${a}, oli ${s}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${V(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Liian suuri: ${i.subject} t\xE4ytyy olla ${a}${o.maximum.toString()} ${i.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Liian pieni: ${i.subject} t\xE4ytyy olla ${a}${o.minimum.toString()} ${i.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${r[a.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${$(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function _5(){return{localeError:Uue()}}var Vue=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN",number:"nombre",array:"tableau"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instanceof ${o.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${a} attendu, ${s} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${V(o.values[0])} attendu`:`Option invalide : une valeur parmi ${$(o.values,"|")} attendue`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Trop grand : ${o.origin??"valeur"} doit ${i.verb} ${a}${o.maximum.toString()} ${i.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o.origin??"valeur"} doit \xEAtre ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Trop petit : ${o.origin} doit ${i.verb} ${a}${o.minimum.toString()} ${i.unit}`:`Trop petit : ${o.origin} doit \xEAtre ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${r[a.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${$(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function T5(){return{localeError:Vue()}}var que=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${a}, re\xE7u ${s}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${V(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"\u2264":"<",i=t(o.origin);return i?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${a}${o.maximum.toString()} ${i.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?"\u2265":">",i=t(o.origin);return i?`Trop petit : attendu que ${o.origin} ait ${a}${o.minimum.toString()} ${i.unit}`:`Trop petit : attendu que ${o.origin} soit ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${r[a.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${$(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function P5(){return{localeError:que()}}var Hue=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=u=>u?e[u]:void 0,n=u=>{let c=r(u);return c?c.label:u??e.unknown.label},o=u=>`\u05D4${n(u)}`,a=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",i=u=>u?t[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let c=u.expected,d=l[c??""]??n(c),f=H(u.input),p=l[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${V(u.values[0])}`;let c=u.values.map(p=>V(p));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let d=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let c=i(u.origin),d=o(u.origin??"value");if(u.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?"<=":"<",p=a(u.origin??"value");return c?.unit?`${c.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${c.unit}`:`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let c=i(u.origin),d=o(u.origin??"value");if(u.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let v=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`}let h=u.inclusive?`${u.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=u.inclusive?">=":">",p=a(u.origin??"value");return c?.unit?`${c.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${c.unit}`:`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let c=u;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let d=s[c.format],f=d?.label??c.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${$(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function L5(){return{localeError:Hue()}}var Wue=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${a}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${V(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${o.maximum.toString()} ${i.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${a}${o.minimum.toString()} ${i.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[a.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function E5(){return{localeError:Wue()}}function A5(e,t,r){return Math.abs(e)===1?t:r}function lf(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Zue=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${a}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${V(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);if(i){let s=Number(o.maximum),l=A5(s,i.unit.one,i.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lf(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lf(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);if(i){let s=Number(o.minimum),l=A5(s,i.unit.one,i.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lf(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${lf(o.origin)} \u056C\u056B\u0576\u056B ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${a.prefix}"-\u0578\u057E`:a.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${a.suffix}"-\u0578\u057E`:a.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${a.includes}"`:a.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${a.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[a.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${$(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${lf(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${lf(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function R5(){return{localeError:Zue()}}var Gue=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${a}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${V(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${a}${o.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Terlalu kecil: diharapkan ${o.origin} memiliki ${a}${o.minimum.toString()} ${i.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${r[a.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function M5(){return{localeError:Gue()}}var Kue=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${a}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${V(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${a}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${a}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${a.prefix}"`:a.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${a.suffix}"`:a.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${a.includes}"`:a.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${a.pattern}`:`Rangt ${r[a.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${$(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function $5(){return{localeError:Kue()}}var Jue=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${s}`:`Input non valido: atteso ${a}, ricevuto ${s}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${V(o.values[0])}`:`Opzione non valida: atteso uno tra ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Troppo grande: ${o.origin??"valore"} deve avere ${a}${o.maximum.toString()} ${i.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Troppo piccolo: ${o.origin} deve avere ${a}${o.minimum.toString()} ${i.unit}`:`Troppo piccolo: ${o.origin} deve essere ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${$(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function D5(){return{localeError:Jue()}}var Xue=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${a}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${V(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${$(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",i=t(o.origin);return i?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",i=t(o.origin);return i?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[a.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${$(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function O5(){return{localeError:Xue()}}var Yue=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${a}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${V(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${$(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${a}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${a}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.prefix}"-\u10D8\u10D7`:a.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.suffix}"-\u10D8\u10D7`:a.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${a.includes}"-\u10E1`:a.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${a.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${$(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function N5(){return{localeError:Yue()}}var Que=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${V(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${o.maximum.toString()} ${i.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${a} ${o.minimum.toString()} ${i.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${a} ${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${a.prefix}"`:a.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${a.suffix}"`:a.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${a.includes}"`:a.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${$(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function iI(){return{localeError:Que()}}function z5(){return iI()}var ece=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${a}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${V(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${$(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",i=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${a}${i}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${a}${i}`}case"too_small":{let a=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",i=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${a}${i}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${a}${i}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[a.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${$(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function F5(){return{localeError:ece()}}var bg=e=>e.charAt(0).toUpperCase()+e.slice(1);function B5(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var tce=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,a,i,s){let l=e[o]??null;return l===null?l:{unit:l.unit[a],verb:l.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${a}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${V(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${$(o.values,"|")} pasirinkim\u0173`;case"too_big":{let a=n[o.origin]??o.origin,i=t(o.origin,B5(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${bg(a??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${bg(a??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{let a=n[o.origin]??o.origin,i=t(o.origin,B5(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${bg(a??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${bg(a??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${a.prefix}"`:a.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${a.includes}"`:a.format==="regex"?`Eilut\u0117 privalo atitikti ${a.pattern}`:`Neteisingas ${r[a.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${$(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let a=n[o.origin]??o.origin;return`${bg(a??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function j5(){return{localeError:tce()}}var rce=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${V(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${a}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${a}${o.minimum.toString()} ${i.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${$(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function U5(){return{localeError:rce()}}var nce=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${s}`:`Input tidak sah: dijangka ${a}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${V(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Terlalu besar: dijangka ${o.origin??"nilai"} ${i.verb} ${a}${o.maximum.toString()} ${i.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Terlalu kecil: dijangka ${o.origin} ${i.verb} ${a}${o.minimum.toString()} ${i.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${r[a.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${$(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function V5(){return{localeError:nce()}}var oce=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${a}, ontving ${s}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${V(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin),s=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return i?`Te ${s}: verwacht dat ${o.origin??"waarde"} ${a}${o.maximum.toString()} ${i.unit??"elementen"} ${i.verb}`:`Te ${s}: verwacht dat ${o.origin??"waarde"} ${a}${o.maximum.toString()} is`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin),s=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return i?`Te ${s}: verwacht dat ${o.origin} ${a}${o.minimum.toString()} ${i.unit} ${i.verb}`:`Te ${s}: verwacht dat ${o.origin} ${a}${o.minimum.toString()} is`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${r[a.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function q5(){return{localeError:oce()}}var ace=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${s}`:`Ugyldig input: forventet ${a}, fikk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${V(o.values[0])}`:`Ugyldig valg: forventet en av ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${a}${o.maximum.toString()} ${i.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`For lite(n): forventet ${o.origin} til \xE5 ha ${a}${o.minimum.toString()} ${i.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${$(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function H5(){return{localeError:ace()}}var ice=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${a}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${V(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${a}${o.maximum.toString()} ${i.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${a}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${a}${o.minimum.toString()} ${i.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${a}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=o;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[a.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function W5(){return{localeError:ice()}}var sce=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${a} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${V(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${$(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${o.maximum.toString()} ${i.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${a}${o.minimum.toString()} ${i.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${a}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[a.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${$(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Z5(){return{localeError:sce()}}var lce=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${a}, otrzymano ${s}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${V(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${o.maximum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${o.minimum.toString()} ${i.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[a.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function G5(){return{localeError:lce()}}var uce=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(o){return e[o]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Tipo inv\xE1lido: esperado instanceof ${o.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${a}, recebido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${V(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${a}${o.maximum.toString()} ${i.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Muito pequeno: esperado que ${o.origin} tivesse ${a}${o.minimum.toString()} ${i.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${r[a.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${$(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}};function K5(){return{localeError:uce()}}function J5(e,t,r,n){let o=Math.abs(e),a=o%10,i=o%100;return i>=11&&i<=19?n:a===1?t:a>=2&&a<=4?r:n}var cce=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${V(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);if(i){let s=Number(o.maximum),l=J5(s,i.unit.one,i.unit.few,i.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);if(i){let s=Number(o.minimum),l=J5(s,i.unit.one,i.unit.few,i.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${$(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function X5(){return{localeError:cce()}}var dce=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${a}, prejeto ${s}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${V(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${a}${o.maximum.toString()} ${i.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${a}${o.minimum.toString()} ${i.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${r[a.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${$(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function Y5(){return{localeError:dce()}}var fce=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${a}, fick ${s}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${V(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${a}${o.maximum.toString()} ${i.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${a}${o.minimum.toString()} ${i.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${r[a.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${$(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Q5(){return{localeError:fce()}}var pce=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${$(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${o.maximum.toString()} ${i.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${a}${o.minimum.toString()} ${i.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${a}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function eW(){return{localeError:pce()}}var mce=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${a} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${V(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",i=t(o.origin);return i?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${o.maximum.toString()} ${i.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",i=t(o.origin);return i?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${o.minimum.toString()} ${i.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${a.prefix}"`:a.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${a.suffix}"`:a.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[a.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${$(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function tW(){return{localeError:mce()}}var hce=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${a}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${V(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${a}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${a}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Ge\xE7ersiz metin: "${a.prefix}" ile ba\u015Flamal\u0131`:a.format==="ends_with"?`Ge\xE7ersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Ge\xE7ersiz metin: "${a.includes}" i\xE7ermeli`:a.format==="regex"?`Ge\xE7ersiz metin: ${a.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[a.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function rW(){return{localeError:hce()}}var gce=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${a}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${V(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${i.verb} ${a}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${i.verb} ${a}${o.minimum.toString()} ${i.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${$(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function sI(){return{localeError:gce()}}function nW(){return sI()}var yce=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${a} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${V(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${$(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${o.maximum.toString()} ${i.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${a}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${a}${o.minimum.toString()} ${i.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${a}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${$(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function oW(){return{localeError:yce()}}var xce=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${a}, qabul qilingan ${s}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${V(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Juda katta: kutilgan ${o.origin??"qiymat"} ${a}${o.maximum.toString()} ${i.unit} ${i.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Juda kichik: kutilgan ${o.origin} ${a}${o.minimum.toString()} ${i.unit} ${i.verb}`:`Juda kichik: kutilgan ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${a.prefix}" bilan boshlanishi kerak`:a.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${a.suffix}" bilan tugashi kerak`:a.format==="includes"?`Noto\u2018g\u2018ri satr: "${a.includes}" ni o\u2018z ichiga olishi kerak`:a.format==="regex"?`Noto\u2018g\u2018ri satr: ${a.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[a.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function aW(){return{localeError:xce()}}var vce=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${a}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${V(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i.verb} ${a}${o.maximum.toString()} ${i.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i.verb} ${a}${o.minimum.toString()} ${i.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${r[a.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${$(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function iW(){return{localeError:vce()}}var bce=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${a}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${V(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${a}${o.maximum.toString()} ${i.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${a}${o.minimum.toString()} ${i.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${r[a.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${$(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function sW(){return{localeError:bce()}}var wce=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${a}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${V(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${a}${o.maximum.toString()} ${i.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${a}${o.maximum.toString()}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${a}${o.minimum.toString()} ${i.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${r[a.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${$(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function lW(){return{localeError:wce()}}var Sce=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let a=n[o.expected]??o.expected,i=H(o.input),s=n[i]??i;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${a}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${V(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${$(o.values,"|")}`;case"too_big":{let a=o.inclusive?"<=":"<",i=t(o.origin);return i?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${i.verb} ${a}${o.maximum} ${i.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${o.maximum}`}case"too_small":{let a=o.inclusive?">=":">",i=t(o.origin);return i?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${i.verb} ${a}${o.minimum} ${i.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${o.minimum}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${a.prefix}"`:a.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${a.suffix}"`:a.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${a.includes}"`:a.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${a.pattern}`:`A\u1E63\xEC\u1E63e: ${r[a.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${$(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function uW(){return{localeError:Sce()}}var cW,gR=Symbol("ZodOutput"),yR=Symbol("ZodInput"),lI=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function uI(){return new lI}(cW=globalThis).__zod_globalRegistry??(cW.__zod_globalRegistry=uI());var Lr=globalThis.__zod_globalRegistry;function xR(e,t){return new e({type:"string",...X(t)})}function vR(e,t){return new e({type:"string",coerce:!0,...X(t)})}function cI(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function Sg(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function dI(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function fI(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function pI(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function mI(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function Ig(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function hI(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function gI(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function yI(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function xI(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function vI(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function bI(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function wI(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function SI(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function II(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function bR(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...X(t)})}function kI(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function CI(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function _I(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function TI(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function PI(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function LI(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}var wR={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function SR(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function IR(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function kR(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function CR(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function _R(e,t){return new e({type:"number",checks:[],...X(t)})}function TR(e,t){return new e({type:"number",coerce:!0,checks:[],...X(t)})}function PR(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(t)})}function LR(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...X(t)})}function ER(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...X(t)})}function AR(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...X(t)})}function RR(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...X(t)})}function MR(e,t){return new e({type:"boolean",...X(t)})}function $R(e,t){return new e({type:"boolean",coerce:!0,...X(t)})}function DR(e,t){return new e({type:"bigint",...X(t)})}function OR(e,t){return new e({type:"bigint",coerce:!0,...X(t)})}function NR(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...X(t)})}function zR(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...X(t)})}function FR(e,t){return new e({type:"symbol",...X(t)})}function BR(e,t){return new e({type:"undefined",...X(t)})}function jR(e,t){return new e({type:"null",...X(t)})}function UR(e){return new e({type:"any"})}function VR(e){return new e({type:"unknown"})}function qR(e,t){return new e({type:"never",...X(t)})}function HR(e,t){return new e({type:"void",...X(t)})}function WR(e,t){return new e({type:"date",...X(t)})}function ZR(e,t){return new e({type:"date",coerce:!0,...X(t)})}function GR(e,t){return new e({type:"nan",...X(t)})}function $a(e,t){return new GS({check:"less_than",...X(t),value:e,inclusive:!1})}function Zn(e,t){return new GS({check:"less_than",...X(t),value:e,inclusive:!0})}function Da(e,t){return new KS({check:"greater_than",...X(t),value:e,inclusive:!1})}function tn(e,t){return new KS({check:"greater_than",...X(t),value:e,inclusive:!0})}function EI(e){return Da(0,e)}function AI(e){return $a(0,e)}function RI(e){return Zn(0,e)}function MI(e){return tn(0,e)}function Qs(e,t){return new jA({check:"multiple_of",...X(t),value:e})}function el(e,t){return new qA({check:"max_size",...X(t),maximum:e})}function Oa(e,t){return new HA({check:"min_size",...X(t),minimum:e})}function Fu(e,t){return new WA({check:"size_equals",...X(t),size:e})}function Bu(e,t){return new ZA({check:"max_length",...X(t),maximum:e})}function Ai(e,t){return new GA({check:"min_length",...X(t),minimum:e})}function ju(e,t){return new KA({check:"length_equals",...X(t),length:e})}function uf(e,t){return new JA({check:"string_format",format:"regex",...X(t),pattern:e})}function cf(e){return new XA({check:"string_format",format:"lowercase",...X(e)})}function df(e){return new YA({check:"string_format",format:"uppercase",...X(e)})}function ff(e,t){return new QA({check:"string_format",format:"includes",...X(t),includes:e})}function pf(e,t){return new e1({check:"string_format",format:"starts_with",...X(t),prefix:e})}function mf(e,t){return new t1({check:"string_format",format:"ends_with",...X(t),suffix:e})}function $I(e,t,r){return new r1({check:"property",property:e,schema:t,...X(r)})}function hf(e,t){return new n1({check:"mime_type",mime:e,...X(t)})}function ta(e){return new o1({check:"overwrite",tx:e})}function gf(e){return ta(t=>t.normalize(e))}function yf(){return ta(e=>e.trim())}function xf(){return ta(e=>e.toLowerCase())}function vf(){return ta(e=>e.toUpperCase())}function bf(){return ta(e=>rA(e))}function KR(e,t,r){return new e({type:"array",element:t,...X(r)})}function kce(e,t,r){return new e({type:"union",options:t,...X(r)})}function Cce(e,t,r){return new e({type:"union",options:t,inclusive:!1,...X(r)})}function _ce(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...X(n)})}function Tce(e,t,r){return new e({type:"intersection",left:t,right:r})}function Pce(e,t,r,n){let o=r instanceof xe,a=o?n:r,i=o?r:null;return new e({type:"tuple",items:t,rest:i,...X(a)})}function Lce(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...X(n)})}function Ece(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...X(n)})}function Ace(e,t,r){return new e({type:"set",valueType:t,...X(r)})}function Rce(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...X(r)})}function Mce(e,t,r){return new e({type:"enum",entries:t,...X(r)})}function $ce(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...X(r)})}function JR(e,t){return new e({type:"file",...X(t)})}function Dce(e,t){return new e({type:"transform",transform:t})}function Oce(e,t){return new e({type:"optional",innerType:t})}function Nce(e,t){return new e({type:"nullable",innerType:t})}function zce(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():oA(r)}})}function Fce(e,t,r){return new e({type:"nonoptional",innerType:t,...X(r)})}function Bce(e,t){return new e({type:"success",innerType:t})}function jce(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Uce(e,t,r){return new e({type:"pipe",in:t,out:r})}function Vce(e,t){return new e({type:"readonly",innerType:t})}function qce(e,t,r){return new e({type:"template_literal",parts:t,...X(r)})}function Hce(e,t){return new e({type:"lazy",getter:t})}function Wce(e,t){return new e({type:"promise",innerType:t})}function XR(e,t,r){let n=X(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function YR(e,t,r){return new e({type:"custom",check:"custom",fn:t,...X(r)})}function QR(e){let t=dW(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(tf(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(tf(o))}},e(r.value,r)));return t}function dW(e,t){let r=new ct({check:"custom",...X(t)});return r._zod.check=e,r}function eM(e){let t=new ct({check:"describe"});return t._zod.onattach=[r=>{let n=Lr.get(r)??{};Lr.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function tM(e){let t=new ct({check:"meta"});return t._zod.onattach=[r=>{let n=Lr.get(r)??{};Lr.add(r,{...n,...e})}],t._zod.check=()=>{},t}function rM(e,t){let r=X(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),o=o.map(p=>typeof p=="string"?p.toLowerCase():p));let a=new Set(n),i=new Set(o),s=e.Codec??vg,l=e.Boolean??yg,u=e.String??zu,c=new u({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:c,out:d,transform:((p,m)=>{let h=p;return r.case!=="sensitive"&&(h=h.toLowerCase()),a.has(h)?!0:i.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...i],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?n[0]||"true":o[0]||"false"),error:r.error});return f}function wf(e,t,r,n={}){let o=X(n),a={...X(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(a.pattern=r),new e(a)}function tl(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Lr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ke(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,a=t.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);let s=e._zod.toJSONSchema?.();if(s)i.schema=s;else{let c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,c);else{let f=i.schema,p=t.processors[o.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);p(e,t,f,c)}let d=e._zod.parent;d&&(i.ref||(i.ref=d),Ke(d,t,c),t.seen.get(d).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(i.schema,l),t.io==="input"&&rn(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&i.schema._prefault&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function rl(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let i of e.seen.entries()){let s=e.metadataRegistry.get(i[0])?.id;if(s){let l=n.get(s);if(l&&l!==i[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,i[0])}}let o=i=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(i[0])?.id,f=e.external.uri??(m=>m);if(d)return{ref:f(d)};let p=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${p}`}}if(i[1]===r)return{ref:"#"};let u=`#/${s}/`,c=i[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},a=i=>{if(i[1].schema.$ref)return;let s=i[1],{ref:l,defId:u}=o(i);s.def={...s.schema},u&&(s.defId=u);let c=s.schema;for(let d in c)delete c[d];c.$ref=l};if(e.cycles==="throw")for(let i of e.seen.entries()){let s=i[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
98
|
+
|
|
99
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let s=i[1];if(t===i[0]){a(i);continue}if(e.external){let u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(s.cycle){a(i);continue}if(s.count>1&&e.reused==="ref"){a(i);continue}}}function nl(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=i=>{let s=e.seen.get(i);if(s.ref===null)return;let l=s.def??s.schema,u={...l},c=s.ref;if(s.ref=null,c){n(c);let f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,u),i._zod.parent===c)for(let h in l)h==="$ref"||h==="allOf"||h in u||delete l[h];if(p.$ref)for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}let d=i._zod.parent;if(d&&d!==c){n(d);let f=e.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}e.override({zodSchema:i,jsonSchema:l,path:s.path??[]})};for(let i of[...e.seen.entries()].reverse())n(i[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let i=e.external.registry.get(t)?.id;if(!i)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(i)}Object.assign(o,r.def??r.schema);let a=e.external?.defs??{};for(let i of e.seen.entries()){let s=i[1];s.def&&s.defId&&(a[s.defId]=s.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let i=JSON.parse(JSON.stringify(o));return Object.defineProperty(i,"~standard",{value:{...t["~standard"],jsonSchema:{input:Sf(t,"input",e.processors),output:Sf(t,"output",e.processors)}},enumerable:!1,writable:!1}),i}catch{throw new Error("Error converting schema to JSON.")}}function rn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return rn(n.element,r);if(n.type==="set")return rn(n.valueType,r);if(n.type==="lazy")return rn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return rn(n.innerType,r);if(n.type==="intersection")return rn(n.left,r)||rn(n.right,r);if(n.type==="record"||n.type==="map")return rn(n.keyType,r)||rn(n.valueType,r);if(n.type==="pipe")return rn(n.in,r)||rn(n.out,r);if(n.type==="object"){for(let o in n.shape)if(rn(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(rn(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(rn(o,r))return!0;return!!(n.rest&&rn(n.rest,r))}return!1}var nM=(e,t={})=>r=>{let n=tl({...r,processors:t});return Ke(e,n),rl(n,e),nl(n,e)},Sf=(e,t,r={})=>n=>{let{libraryOptions:o,target:a}=n??{},i=tl({...o??{},target:a,io:t,processors:r});return Ke(e,i),rl(i,e),nl(i,e)};var Zce={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oM=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:a,maximum:i,format:s,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof i=="number"&&(o.maxLength=i),s&&(o.format=Zce[s]??s,o.format===""&&delete o.format,s==="time"&&delete o.format),u&&(o.contentEncoding=u),l&&l.size>0){let c=[...l];c.length===1?o.pattern=c[0].source:c.length>1&&(o.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},aM=(e,t,r,n)=>{let o=r,{minimum:a,maximum:i,format:s,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof s=="string"&&s.includes("int")?o.type="integer":o.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c),typeof a=="number"&&(o.minimum=a,typeof c=="number"&&t.target!=="draft-04"&&(c>=a?delete o.minimum:delete o.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u),typeof i=="number"&&(o.maximum=i,typeof u=="number"&&t.target!=="draft-04"&&(u<=i?delete o.maximum:delete o.exclusiveMaximum)),typeof l=="number"&&(o.multipleOf=l)},iM=(e,t,r,n)=>{r.type="boolean"},sM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},lM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},uM=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},cM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},dM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},fM=(e,t,r,n)=>{r.not={}},pM=(e,t,r,n)=>{},mM=(e,t,r,n)=>{},hM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},gM=(e,t,r,n)=>{let o=e._zod.def,a=ig(o.entries);a.every(i=>typeof i=="number")&&(r.type="number"),a.every(i=>typeof i=="string")&&(r.type="string"),r.enum=a},yM=(e,t,r,n)=>{let o=e._zod.def,a=[];for(let i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(i))}else a.push(i);if(a.length!==0)if(a.length===1){let i=a[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else a.every(i=>typeof i=="number")&&(r.type="number"),a.every(i=>typeof i=="string")&&(r.type="string"),a.every(i=>typeof i=="boolean")&&(r.type="boolean"),a.every(i=>i===null)&&(r.type="null"),r.enum=a},xM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},vM=(e,t,r,n)=>{let o=r,a=e._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=a.source},bM=(e,t,r,n)=>{let o=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:s,mime:l}=e._zod.bag;i!==void 0&&(a.minLength=i),s!==void 0&&(a.maxLength=s),l?l.length===1?(a.contentMediaType=l[0],Object.assign(o,a)):(Object.assign(o,a),o.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(o,a)},wM=(e,t,r,n)=>{r.type="boolean"},SM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},IM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},kM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},CM=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},_M=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},TM=(e,t,r,n)=>{let o=r,a=e._zod.def,{minimum:i,maximum:s}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=Ke(a.element,t,{...n,path:[...n.path,"items"]})},PM=(e,t,r,n)=>{let o=r,a=e._zod.def;o.type="object",o.properties={};let i=a.shape;for(let u in i)o.properties[u]=Ke(i[u],t,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(i)),l=new Set([...s].filter(u=>{let c=a.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));l.size>0&&(o.required=Array.from(l)),a.catchall?._zod.def.type==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=Ke(a.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},OI=(e,t,r,n)=>{let o=e._zod.def,a=o.inclusive===!1,i=o.options.map((s,l)=>Ke(s,t,{...n,path:[...n.path,a?"oneOf":"anyOf",l]}));a?r.oneOf=i:r.anyOf=i},LM=(e,t,r,n)=>{let o=e._zod.def,a=Ke(o.left,t,{...n,path:[...n.path,"allOf",0]}),i=Ke(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,l=[...s(a)?a.allOf:[a],...s(i)?i.allOf:[i]];r.allOf=l},EM=(e,t,r,n)=>{let o=r,a=e._zod.def;o.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=a.items.map((f,p)=>Ke(f,t,{...n,path:[...n.path,i,p]})),u=a.rest?Ke(a.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[a.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=l,u&&(o.items=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},u&&o.items.anyOf.push(u),o.minItems=l.length,u||(o.maxItems=l.length)):(o.items=l,u&&(o.additionalItems=u));let{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(o.minItems=c),typeof d=="number"&&(o.maxItems=d)},AM=(e,t,r,n)=>{let o=r,a=e._zod.def;o.type="object";let i=a.keyType,l=i._zod.bag?.patterns;if(a.mode==="loose"&&l&&l.size>0){let c=Ke(a.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let d of l)o.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Ke(a.keyType,t,{...n,path:[...n.path,"propertyNames"]})),o.additionalProperties=Ke(a.valueType,t,{...n,path:[...n.path,"additionalProperties"]});let u=i._zod.values;if(u){let c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(o.required=c)}},RM=(e,t,r,n)=>{let o=e._zod.def,a=Ke(o.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},MM=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType},$M=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},DM=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},OM=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},NM=(e,t,r,n)=>{let o=e._zod.def,a=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ke(a,t,n);let i=t.seen.get(e);i.ref=a},zM=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType,r.readOnly=!0},FM=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType},NI=(e,t,r,n)=>{let o=e._zod.def;Ke(o.innerType,t,n);let a=t.seen.get(e);a.ref=o.innerType},BM=(e,t,r,n)=>{let o=e._zod.innerType;Ke(o,t,n);let a=t.seen.get(e);a.ref=o},DI={string:oM,number:aM,boolean:iM,bigint:sM,symbol:lM,null:uM,undefined:cM,void:dM,never:fM,any:pM,unknown:mM,date:hM,enum:gM,literal:yM,nan:xM,template_literal:vM,file:bM,success:wM,custom:SM,function:IM,transform:kM,map:CM,set:_M,array:TM,object:PM,union:OI,intersection:LM,tuple:EM,record:AM,nullable:RM,nonoptional:MM,default:$M,prefault:DM,catch:OM,pipe:NM,readonly:zM,promise:FM,optional:NI,lazy:BM};function If(e,t){if("_idmap"in e){let n=e,o=tl({...t,processors:DI}),a={};for(let l of n._idmap.entries()){let[u,c]=l;Ke(c,o)}let i={},s={registry:n,uri:t?.uri,defs:a};o.external=s;for(let l of n._idmap.entries()){let[u,c]=l;rl(o,c),i[u]=nl(o,c)}if(Object.keys(a).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[l]:a}}return{schemas:i}}let r=tl({...t,processors:DI});return Ke(e,r),rl(r,e),nl(r,e)}var zI=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=tl({processors:DI,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Ke(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),rl(this.ctx,t);let n=nl(this.ctx,t),{"~standard":o,...a}=n;return a}};var fW={};var kg={};Et(kg,{ZodAny:()=>u$,ZodArray:()=>p$,ZodBase64:()=>ak,ZodBase64URL:()=>ik,ZodBigInt:()=>Ef,ZodBigIntFormat:()=>uk,ZodBoolean:()=>Lf,ZodCIDRv4:()=>nk,ZodCIDRv6:()=>ok,ZodCUID:()=>JI,ZodCUID2:()=>XI,ZodCatch:()=>D$,ZodCodec:()=>yk,ZodCustom:()=>Og,ZodCustomStringFormat:()=>Tf,ZodDate:()=>Ag,ZodDefault:()=>L$,ZodDiscriminatedUnion:()=>h$,ZodE164:()=>sk,ZodEmail:()=>ZI,ZodEmoji:()=>GI,ZodEnum:()=>Cf,ZodExactOptional:()=>_$,ZodFile:()=>k$,ZodFunction:()=>q$,ZodGUID:()=>_g,ZodIPv4:()=>tk,ZodIPv6:()=>rk,ZodIntersection:()=>g$,ZodJWT:()=>lk,ZodKSUID:()=>ek,ZodLazy:()=>j$,ZodLiteral:()=>I$,ZodMAC:()=>r$,ZodMap:()=>w$,ZodNaN:()=>N$,ZodNanoID:()=>KI,ZodNever:()=>d$,ZodNonOptional:()=>hk,ZodNull:()=>s$,ZodNullable:()=>P$,ZodNumber:()=>Pf,ZodNumberFormat:()=>Vu,ZodObject:()=>Mg,ZodOptional:()=>mk,ZodPipe:()=>gk,ZodPrefault:()=>A$,ZodPromise:()=>V$,ZodReadonly:()=>z$,ZodRecord:()=>Dg,ZodSet:()=>S$,ZodString:()=>_f,ZodStringFormat:()=>it,ZodSuccess:()=>$$,ZodSymbol:()=>a$,ZodTemplateLiteral:()=>B$,ZodTransform:()=>C$,ZodTuple:()=>x$,ZodType:()=>ke,ZodULID:()=>YI,ZodURL:()=>Eg,ZodUUID:()=>Na,ZodUndefined:()=>i$,ZodUnion:()=>$g,ZodUnknown:()=>c$,ZodVoid:()=>f$,ZodXID:()=>QI,ZodXor:()=>m$,_ZodString:()=>WI,_default:()=>E$,_function:()=>v9,any:()=>XW,array:()=>Rg,base64:()=>$W,base64url:()=>DW,bigint:()=>WW,boolean:()=>o$,catch:()=>O$,check:()=>b9,cidrv4:()=>RW,cidrv6:()=>MW,codec:()=>g9,cuid:()=>kW,cuid2:()=>CW,custom:()=>w9,date:()=>QW,describe:()=>S9,discriminatedUnion:()=>a9,e164:()=>OW,email:()=>mW,emoji:()=>SW,enum:()=>fk,exactOptional:()=>T$,file:()=>f9,float32:()=>UW,float64:()=>VW,function:()=>v9,guid:()=>hW,hash:()=>jW,hex:()=>BW,hostname:()=>FW,httpUrl:()=>wW,instanceof:()=>k9,int:()=>HI,int32:()=>qW,int64:()=>ZW,intersection:()=>y$,ipv4:()=>LW,ipv6:()=>AW,json:()=>_9,jwt:()=>NW,keyof:()=>e9,ksuid:()=>PW,lazy:()=>U$,literal:()=>d9,looseObject:()=>n9,looseRecord:()=>s9,mac:()=>EW,map:()=>l9,meta:()=>I9,nan:()=>h9,nanoid:()=>IW,nativeEnum:()=>c9,never:()=>ck,nonoptional:()=>M$,null:()=>l$,nullable:()=>Pg,nullish:()=>p9,number:()=>n$,object:()=>t9,optional:()=>Tg,partialRecord:()=>i9,pipe:()=>Lg,prefault:()=>R$,preprocess:()=>T9,promise:()=>x9,readonly:()=>F$,record:()=>b$,refine:()=>H$,set:()=>u9,strictObject:()=>r9,string:()=>qI,stringFormat:()=>zW,stringbool:()=>C9,success:()=>m9,superRefine:()=>W$,symbol:()=>KW,templateLiteral:()=>y9,transform:()=>pk,tuple:()=>v$,uint32:()=>HW,uint64:()=>GW,ulid:()=>_W,undefined:()=>JW,union:()=>dk,unknown:()=>Uu,url:()=>bW,uuid:()=>gW,uuidv4:()=>yW,uuidv6:()=>xW,uuidv7:()=>vW,void:()=>YW,xid:()=>TW,xor:()=>o9});var FI={};Et(FI,{endsWith:()=>mf,gt:()=>Da,gte:()=>tn,includes:()=>ff,length:()=>ju,lowercase:()=>cf,lt:()=>$a,lte:()=>Zn,maxLength:()=>Bu,maxSize:()=>el,mime:()=>hf,minLength:()=>Ai,minSize:()=>Oa,multipleOf:()=>Qs,negative:()=>AI,nonnegative:()=>MI,nonpositive:()=>RI,normalize:()=>gf,overwrite:()=>ta,positive:()=>EI,property:()=>$I,regex:()=>uf,size:()=>Fu,slugify:()=>bf,startsWith:()=>pf,toLowerCase:()=>xf,toUpperCase:()=>vf,trim:()=>yf,uppercase:()=>df});var kf={};Et(kf,{ZodISODate:()=>jI,ZodISODateTime:()=>BI,ZodISODuration:()=>VI,ZodISOTime:()=>UI,date:()=>UM,datetime:()=>jM,duration:()=>qM,time:()=>VM});var BI=R("ZodISODateTime",(e,t)=>{x1.init(e,t),it.init(e,t)});function jM(e){return SR(BI,e)}var jI=R("ZodISODate",(e,t)=>{v1.init(e,t),it.init(e,t)});function UM(e){return IR(jI,e)}var UI=R("ZodISOTime",(e,t)=>{b1.init(e,t),it.init(e,t)});function VM(e){return kR(UI,e)}var VI=R("ZodISODuration",(e,t)=>{w1.init(e,t),it.init(e,t)});function qM(e){return CR(VI,e)}var pW=(e,t)=>{dg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>pg(e,r)},flatten:{value:r=>fg(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Qd,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Qd,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kce=R("ZodError",pW),Pn=R("ZodError",pW,{Parent:Error});var HM=rf(Pn),WM=nf(Pn),ZM=of(Pn),Cg=af(Pn),GM=zS(Pn),KM=FS(Pn),JM=BS(Pn),XM=jS(Pn),YM=US(Pn),QM=VS(Pn),e$=qS(Pn),t$=HS(Pn);var ke=R("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Sf(e,"input"),output:Sf(e,"output")}}),e.toJSONSchema=nM(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(W.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>en(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>HM(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>ZM(e,r,n),e.parseAsync=async(r,n)=>WM(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Cg(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>GM(e,r,n),e.decode=(r,n)=>KM(e,r,n),e.encodeAsync=async(r,n)=>JM(e,r,n),e.decodeAsync=async(r,n)=>XM(e,r,n),e.safeEncode=(r,n)=>YM(e,r,n),e.safeDecode=(r,n)=>QM(e,r,n),e.safeEncodeAsync=async(r,n)=>e$(e,r,n),e.safeDecodeAsync=async(r,n)=>t$(e,r,n),e.refine=(r,n)=>e.check(H$(r,n)),e.superRefine=r=>e.check(W$(r)),e.overwrite=r=>e.check(ta(r)),e.optional=()=>Tg(e),e.exactOptional=()=>T$(e),e.nullable=()=>Pg(e),e.nullish=()=>Tg(Pg(e)),e.nonoptional=r=>M$(e,r),e.array=()=>Rg(e),e.or=r=>dk([e,r]),e.and=r=>y$(e,r),e.transform=r=>Lg(e,pk(r)),e.default=r=>E$(e,r),e.prefault=r=>R$(e,r),e.catch=r=>O$(e,r),e.pipe=r=>Lg(e,r),e.readonly=()=>F$(e),e.describe=r=>{let n=e.clone();return Lr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Lr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Lr.get(e);let n=e.clone();return Lr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),WI=R("_ZodString",(e,t)=>{zu.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,o,a)=>oM(e,n,o,a);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(uf(...n)),e.includes=(...n)=>e.check(ff(...n)),e.startsWith=(...n)=>e.check(pf(...n)),e.endsWith=(...n)=>e.check(mf(...n)),e.min=(...n)=>e.check(Ai(...n)),e.max=(...n)=>e.check(Bu(...n)),e.length=(...n)=>e.check(ju(...n)),e.nonempty=(...n)=>e.check(Ai(1,...n)),e.lowercase=n=>e.check(cf(n)),e.uppercase=n=>e.check(df(n)),e.trim=()=>e.check(yf()),e.normalize=(...n)=>e.check(gf(...n)),e.toLowerCase=()=>e.check(xf()),e.toUpperCase=()=>e.check(vf()),e.slugify=()=>e.check(bf())}),_f=R("ZodString",(e,t)=>{zu.init(e,t),WI.init(e,t),e.email=r=>e.check(cI(ZI,r)),e.url=r=>e.check(Ig(Eg,r)),e.jwt=r=>e.check(LI(lk,r)),e.emoji=r=>e.check(hI(GI,r)),e.guid=r=>e.check(Sg(_g,r)),e.uuid=r=>e.check(dI(Na,r)),e.uuidv4=r=>e.check(fI(Na,r)),e.uuidv6=r=>e.check(pI(Na,r)),e.uuidv7=r=>e.check(mI(Na,r)),e.nanoid=r=>e.check(gI(KI,r)),e.guid=r=>e.check(Sg(_g,r)),e.cuid=r=>e.check(yI(JI,r)),e.cuid2=r=>e.check(xI(XI,r)),e.ulid=r=>e.check(vI(YI,r)),e.base64=r=>e.check(_I(ak,r)),e.base64url=r=>e.check(TI(ik,r)),e.xid=r=>e.check(bI(QI,r)),e.ksuid=r=>e.check(wI(ek,r)),e.ipv4=r=>e.check(SI(tk,r)),e.ipv6=r=>e.check(II(rk,r)),e.cidrv4=r=>e.check(kI(nk,r)),e.cidrv6=r=>e.check(CI(ok,r)),e.e164=r=>e.check(PI(sk,r)),e.datetime=r=>e.check(jM(r)),e.date=r=>e.check(UM(r)),e.time=r=>e.check(VM(r)),e.duration=r=>e.check(qM(r))});function qI(e){return xR(_f,e)}var it=R("ZodStringFormat",(e,t)=>{at.init(e,t),WI.init(e,t)}),ZI=R("ZodEmail",(e,t)=>{u1.init(e,t),it.init(e,t)});function mW(e){return cI(ZI,e)}var _g=R("ZodGUID",(e,t)=>{s1.init(e,t),it.init(e,t)});function hW(e){return Sg(_g,e)}var Na=R("ZodUUID",(e,t)=>{l1.init(e,t),it.init(e,t)});function gW(e){return dI(Na,e)}function yW(e){return fI(Na,e)}function xW(e){return pI(Na,e)}function vW(e){return mI(Na,e)}var Eg=R("ZodURL",(e,t)=>{c1.init(e,t),it.init(e,t)});function bW(e){return Ig(Eg,e)}function wW(e){return Ig(Eg,{protocol:/^https?$/,hostname:So.domain,...W.normalizeParams(e)})}var GI=R("ZodEmoji",(e,t)=>{d1.init(e,t),it.init(e,t)});function SW(e){return hI(GI,e)}var KI=R("ZodNanoID",(e,t)=>{f1.init(e,t),it.init(e,t)});function IW(e){return gI(KI,e)}var JI=R("ZodCUID",(e,t)=>{p1.init(e,t),it.init(e,t)});function kW(e){return yI(JI,e)}var XI=R("ZodCUID2",(e,t)=>{m1.init(e,t),it.init(e,t)});function CW(e){return xI(XI,e)}var YI=R("ZodULID",(e,t)=>{h1.init(e,t),it.init(e,t)});function _W(e){return vI(YI,e)}var QI=R("ZodXID",(e,t)=>{g1.init(e,t),it.init(e,t)});function TW(e){return bI(QI,e)}var ek=R("ZodKSUID",(e,t)=>{y1.init(e,t),it.init(e,t)});function PW(e){return wI(ek,e)}var tk=R("ZodIPv4",(e,t)=>{S1.init(e,t),it.init(e,t)});function LW(e){return SI(tk,e)}var r$=R("ZodMAC",(e,t)=>{k1.init(e,t),it.init(e,t)});function EW(e){return bR(r$,e)}var rk=R("ZodIPv6",(e,t)=>{I1.init(e,t),it.init(e,t)});function AW(e){return II(rk,e)}var nk=R("ZodCIDRv4",(e,t)=>{C1.init(e,t),it.init(e,t)});function RW(e){return kI(nk,e)}var ok=R("ZodCIDRv6",(e,t)=>{_1.init(e,t),it.init(e,t)});function MW(e){return CI(ok,e)}var ak=R("ZodBase64",(e,t)=>{P1.init(e,t),it.init(e,t)});function $W(e){return _I(ak,e)}var ik=R("ZodBase64URL",(e,t)=>{L1.init(e,t),it.init(e,t)});function DW(e){return TI(ik,e)}var sk=R("ZodE164",(e,t)=>{E1.init(e,t),it.init(e,t)});function OW(e){return PI(sk,e)}var lk=R("ZodJWT",(e,t)=>{A1.init(e,t),it.init(e,t)});function NW(e){return LI(lk,e)}var Tf=R("ZodCustomStringFormat",(e,t)=>{R1.init(e,t),it.init(e,t)});function zW(e,t,r={}){return wf(Tf,e,t,r)}function FW(e){return wf(Tf,"hostname",So.hostname,e)}function BW(e){return wf(Tf,"hex",So.hex,e)}function jW(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=So[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return wf(Tf,n,o,t)}var Pf=R("ZodNumber",(e,t)=>{tI.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,o,a)=>aM(e,n,o,a),e.gt=(n,o)=>e.check(Da(n,o)),e.gte=(n,o)=>e.check(tn(n,o)),e.min=(n,o)=>e.check(tn(n,o)),e.lt=(n,o)=>e.check($a(n,o)),e.lte=(n,o)=>e.check(Zn(n,o)),e.max=(n,o)=>e.check(Zn(n,o)),e.int=n=>e.check(HI(n)),e.safe=n=>e.check(HI(n)),e.positive=n=>e.check(Da(0,n)),e.nonnegative=n=>e.check(tn(0,n)),e.negative=n=>e.check($a(0,n)),e.nonpositive=n=>e.check(Zn(0,n)),e.multipleOf=(n,o)=>e.check(Qs(n,o)),e.step=(n,o)=>e.check(Qs(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function n$(e){return _R(Pf,e)}var Vu=R("ZodNumberFormat",(e,t)=>{M1.init(e,t),Pf.init(e,t)});function HI(e){return PR(Vu,e)}function UW(e){return LR(Vu,e)}function VW(e){return ER(Vu,e)}function qW(e){return AR(Vu,e)}function HW(e){return RR(Vu,e)}var Lf=R("ZodBoolean",(e,t)=>{yg.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>iM(e,r,n,o)});function o$(e){return MR(Lf,e)}var Ef=R("ZodBigInt",(e,t)=>{rI.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,o,a)=>sM(e,n,o,a),e.gte=(n,o)=>e.check(tn(n,o)),e.min=(n,o)=>e.check(tn(n,o)),e.gt=(n,o)=>e.check(Da(n,o)),e.gte=(n,o)=>e.check(tn(n,o)),e.min=(n,o)=>e.check(tn(n,o)),e.lt=(n,o)=>e.check($a(n,o)),e.lte=(n,o)=>e.check(Zn(n,o)),e.max=(n,o)=>e.check(Zn(n,o)),e.positive=n=>e.check(Da(BigInt(0),n)),e.negative=n=>e.check($a(BigInt(0),n)),e.nonpositive=n=>e.check(Zn(BigInt(0),n)),e.nonnegative=n=>e.check(tn(BigInt(0),n)),e.multipleOf=(n,o)=>e.check(Qs(n,o));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function WW(e){return DR(Ef,e)}var uk=R("ZodBigIntFormat",(e,t)=>{$1.init(e,t),Ef.init(e,t)});function ZW(e){return NR(uk,e)}function GW(e){return zR(uk,e)}var a$=R("ZodSymbol",(e,t)=>{D1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lM(e,r,n,o)});function KW(e){return FR(a$,e)}var i$=R("ZodUndefined",(e,t)=>{O1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cM(e,r,n,o)});function JW(e){return BR(i$,e)}var s$=R("ZodNull",(e,t)=>{N1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uM(e,r,n,o)});function l$(e){return jR(s$,e)}var u$=R("ZodAny",(e,t)=>{z1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pM(e,r,n,o)});function XW(){return UR(u$)}var c$=R("ZodUnknown",(e,t)=>{F1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mM(e,r,n,o)});function Uu(){return VR(c$)}var d$=R("ZodNever",(e,t)=>{B1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fM(e,r,n,o)});function ck(e){return qR(d$,e)}var f$=R("ZodVoid",(e,t)=>{j1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dM(e,r,n,o)});function YW(e){return HR(f$,e)}var Ag=R("ZodDate",(e,t)=>{U1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,o,a)=>hM(e,n,o,a),e.min=(n,o)=>e.check(tn(n,o)),e.max=(n,o)=>e.check(Zn(n,o));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function QW(e){return WR(Ag,e)}var p$=R("ZodArray",(e,t)=>{V1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>TM(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(Ai(r,n)),e.nonempty=r=>e.check(Ai(1,r)),e.max=(r,n)=>e.check(Bu(r,n)),e.length=(r,n)=>e.check(ju(r,n)),e.unwrap=()=>e.element});function Rg(e,t){return KR(p$,e,t)}function e9(e){let t=e._zod.def.shape;return fk(Object.keys(t))}var Mg=R("ZodObject",(e,t)=>{q1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>PM(e,r,n,o),W.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>fk(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Uu()}),e.loose=()=>e.clone({...e._zod.def,catchall:Uu()}),e.strict=()=>e.clone({...e._zod.def,catchall:ck()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>W.extend(e,r),e.safeExtend=r=>W.safeExtend(e,r),e.merge=r=>W.merge(e,r),e.pick=r=>W.pick(e,r),e.omit=r=>W.omit(e,r),e.partial=(...r)=>W.partial(mk,e,r[0]),e.required=(...r)=>W.required(hk,e,r[0])});function t9(e,t){let r={type:"object",shape:e??{},...W.normalizeParams(t)};return new Mg(r)}function r9(e,t){return new Mg({type:"object",shape:e,catchall:ck(),...W.normalizeParams(t)})}function n9(e,t){return new Mg({type:"object",shape:e,catchall:Uu(),...W.normalizeParams(t)})}var $g=R("ZodUnion",(e,t)=>{xg.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>OI(e,r,n,o),e.options=t.options});function dk(e,t){return new $g({type:"union",options:e,...W.normalizeParams(t)})}var m$=R("ZodXor",(e,t)=>{$g.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(r,n,o)=>OI(e,r,n,o),e.options=t.options});function o9(e,t){return new m$({type:"union",options:e,inclusive:!1,...W.normalizeParams(t)})}var h$=R("ZodDiscriminatedUnion",(e,t)=>{$g.init(e,t),W1.init(e,t)});function a9(e,t,r){return new h$({type:"union",options:t,discriminator:e,...W.normalizeParams(r)})}var g$=R("ZodIntersection",(e,t)=>{Z1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>LM(e,r,n,o)});function y$(e,t){return new g$({type:"intersection",left:e,right:t})}var x$=R("ZodTuple",(e,t)=>{nI.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>EM(e,r,n,o),e.rest=r=>e.clone({...e._zod.def,rest:r})});function v$(e,t,r){let n=t instanceof xe,o=n?r:t,a=n?t:null;return new x$({type:"tuple",items:e,rest:a,...W.normalizeParams(o)})}var Dg=R("ZodRecord",(e,t)=>{G1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>AM(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function b$(e,t,r){return new Dg({type:"record",keyType:e,valueType:t,...W.normalizeParams(r)})}function i9(e,t,r){let n=en(e);return n._zod.values=void 0,new Dg({type:"record",keyType:n,valueType:t,...W.normalizeParams(r)})}function s9(e,t,r){return new Dg({type:"record",keyType:e,valueType:t,mode:"loose",...W.normalizeParams(r)})}var w$=R("ZodMap",(e,t)=>{K1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>CM(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Oa(...r)),e.nonempty=r=>e.check(Oa(1,r)),e.max=(...r)=>e.check(el(...r)),e.size=(...r)=>e.check(Fu(...r))});function l9(e,t,r){return new w$({type:"map",keyType:e,valueType:t,...W.normalizeParams(r)})}var S$=R("ZodSet",(e,t)=>{J1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_M(e,r,n,o),e.min=(...r)=>e.check(Oa(...r)),e.nonempty=r=>e.check(Oa(1,r)),e.max=(...r)=>e.check(el(...r)),e.size=(...r)=>e.check(Fu(...r))});function u9(e,t){return new S$({type:"set",valueType:e,...W.normalizeParams(t)})}var Cf=R("ZodEnum",(e,t)=>{X1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,o,a)=>gM(e,n,o,a),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let a={};for(let i of n)if(r.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Cf({...t,checks:[],...W.normalizeParams(o),entries:a})},e.exclude=(n,o)=>{let a={...t.entries};for(let i of n)if(r.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Cf({...t,checks:[],...W.normalizeParams(o),entries:a})}});function fk(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Cf({type:"enum",entries:r,...W.normalizeParams(t)})}function c9(e,t){return new Cf({type:"enum",entries:e,...W.normalizeParams(t)})}var I$=R("ZodLiteral",(e,t)=>{Y1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yM(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function d9(e,t){return new I$({type:"literal",values:Array.isArray(e)?e:[e],...W.normalizeParams(t)})}var k$=R("ZodFile",(e,t)=>{Q1.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bM(e,r,n,o),e.min=(r,n)=>e.check(Oa(r,n)),e.max=(r,n)=>e.check(el(r,n)),e.mime=(r,n)=>e.check(hf(Array.isArray(r)?r:[r],n))});function f9(e){return JR(k$,e)}var C$=R("ZodTransform",(e,t)=>{eR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kM(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Gs(e.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(W.issue(a,r.value,t));else{let i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(W.issue(i))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(a=>(r.value=a,r)):(r.value=o,r)}});function pk(e){return new C$({type:"transform",transform:e})}var mk=R("ZodOptional",(e,t)=>{oI.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>NI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Tg(e){return new mk({type:"optional",innerType:e})}var _$=R("ZodExactOptional",(e,t)=>{tR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>NI(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function T$(e){return new _$({type:"optional",innerType:e})}var P$=R("ZodNullable",(e,t)=>{rR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>RM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pg(e){return new P$({type:"nullable",innerType:e})}function p9(e){return Tg(Pg(e))}var L$=R("ZodDefault",(e,t)=>{nR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$M(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function E$(e,t){return new L$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}var A$=R("ZodPrefault",(e,t)=>{oR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>DM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function R$(e,t){return new A$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():W.shallowClone(t)}})}var hk=R("ZodNonOptional",(e,t)=>{aR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>MM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function M$(e,t){return new hk({type:"nonoptional",innerType:e,...W.normalizeParams(t)})}var $$=R("ZodSuccess",(e,t)=>{iR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function m9(e){return new $$({type:"success",innerType:e})}var D$=R("ZodCatch",(e,t)=>{sR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>OM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function O$(e,t){return new D$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var N$=R("ZodNaN",(e,t)=>{lR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xM(e,r,n,o)});function h9(e){return GR(N$,e)}var gk=R("ZodPipe",(e,t)=>{uR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>NM(e,r,n,o),e.in=t.in,e.out=t.out});function Lg(e,t){return new gk({type:"pipe",in:e,out:t})}var yk=R("ZodCodec",(e,t)=>{gk.init(e,t),vg.init(e,t)});function g9(e,t,r){return new yk({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var z$=R("ZodReadonly",(e,t)=>{cR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function F$(e){return new z$({type:"readonly",innerType:e})}var B$=R("ZodTemplateLiteral",(e,t)=>{dR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vM(e,r,n,o)});function y9(e,t){return new B$({type:"template_literal",parts:e,...W.normalizeParams(t)})}var j$=R("ZodLazy",(e,t)=>{mR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>BM(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function U$(e){return new j$({type:"lazy",getter:e})}var V$=R("ZodPromise",(e,t)=>{pR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>FM(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function x9(e){return new V$({type:"promise",innerType:e})}var q$=R("ZodFunction",(e,t)=>{fR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>IM(e,r,n,o)});function v9(e){return new q$({type:"function",input:Array.isArray(e?.input)?v$(e?.input):e?.input??Rg(Uu()),output:e?.output??Uu()})}var Og=R("ZodCustom",(e,t)=>{hR.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,n,o)=>SM(e,r,n,o)});function b9(e){let t=new ct({check:"custom"});return t._zod.check=e,t}function w9(e,t){return XR(Og,e??(()=>!0),t)}function H$(e,t={}){return YR(Og,e,t)}function W$(e){return QR(e)}var S9=eM,I9=tM;function k9(e,t={}){let r=new Og({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...W.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var C9=(...e)=>rM({Codec:yk,Boolean:Lf,String:_f},...e);function _9(e){let t=U$(()=>dk([qI(e),n$(),o$(),l$(),Rg(t),b$(qI(),t)]));return t}function T9(e,t){return Lg(pk(e),t)}var Xce={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Yce(e){jt({customError:e})}function Qce(){return jt().customError}var Z$;Z$||(Z$={});var ne={...kg,...FI,iso:kf},ede=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function tde(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function rde(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function P9(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ne.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return ne.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let a=rde(o,t),i=Br(a,t);return t.refs.set(o,i),t.processing.delete(o),i}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return ne.null();if(o.length===0)return ne.never();if(o.length===1)return ne.literal(o[0]);if(o.every(i=>typeof i=="string"))return ne.enum(o);let a=o.map(i=>ne.literal(i));return a.length<2?a[0]:ne.union([a[0],a[1],...a.slice(2)])}if(e.const!==void 0)return ne.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(a=>{let i={...e,type:a};return P9(i,t)});return o.length===0?ne.never():o.length===1?o[0]:ne.union(o)}if(!r)return ne.any();let n;switch(r){case"string":{let o=ne.string();if(e.format){let a=e.format;a==="email"?o=o.check(ne.email()):a==="uri"||a==="uri-reference"?o=o.check(ne.url()):a==="uuid"||a==="guid"?o=o.check(ne.uuid()):a==="date-time"?o=o.check(ne.iso.datetime()):a==="date"?o=o.check(ne.iso.date()):a==="time"?o=o.check(ne.iso.time()):a==="duration"?o=o.check(ne.iso.duration()):a==="ipv4"?o=o.check(ne.ipv4()):a==="ipv6"?o=o.check(ne.ipv6()):a==="mac"?o=o.check(ne.mac()):a==="cidr"?o=o.check(ne.cidrv4()):a==="cidr-v6"?o=o.check(ne.cidrv6()):a==="base64"?o=o.check(ne.base64()):a==="base64url"?o=o.check(ne.base64url()):a==="e164"?o=o.check(ne.e164()):a==="jwt"?o=o.check(ne.jwt()):a==="emoji"?o=o.check(ne.emoji()):a==="nanoid"?o=o.check(ne.nanoid()):a==="cuid"?o=o.check(ne.cuid()):a==="cuid2"?o=o.check(ne.cuid2()):a==="ulid"?o=o.check(ne.ulid()):a==="xid"?o=o.check(ne.xid()):a==="ksuid"&&(o=o.check(ne.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?ne.number().int():ne.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=ne.boolean();break}case"null":{n=ne.null();break}case"object":{let o={},a=e.properties||{},i=new Set(e.required||[]);for(let[l,u]of Object.entries(a)){let c=Br(u,t);o[l]=i.has(l)?c:c.optional()}if(e.propertyNames){let l=Br(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Br(e.additionalProperties,t):ne.any();if(Object.keys(o).length===0){n=ne.record(l,u);break}let c=ne.object(o).passthrough(),d=ne.looseRecord(l,u);n=ne.intersection(c,d);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),c=[];for(let f of u){let p=Br(l[f],t),m=ne.string().regex(new RegExp(f));c.push(ne.looseRecord(m,p))}let d=[];if(Object.keys(o).length>0&&d.push(ne.object(o).passthrough()),d.push(...c),d.length===0)n=ne.object({}).passthrough();else if(d.length===1)n=d[0];else{let f=ne.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=ne.intersection(f,d[p]);n=f}break}let s=ne.object(o);e.additionalProperties===!1?n=s.strict():typeof e.additionalProperties=="object"?n=s.catchall(Br(e.additionalProperties,t)):n=s.passthrough();break}case"array":{let o=e.prefixItems,a=e.items;if(o&&Array.isArray(o)){let i=o.map(l=>Br(l,t)),s=a&&typeof a=="object"&&!Array.isArray(a)?Br(a,t):void 0;s?n=ne.tuple(i).rest(s):n=ne.tuple(i),typeof e.minItems=="number"&&(n=n.check(ne.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(ne.maxLength(e.maxItems)))}else if(Array.isArray(a)){let i=a.map(l=>Br(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Br(e.additionalItems,t):void 0;s?n=ne.tuple(i).rest(s):n=ne.tuple(i),typeof e.minItems=="number"&&(n=n.check(ne.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(ne.maxLength(e.maxItems)))}else if(a!==void 0){let i=Br(a,t),s=ne.array(i);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=ne.array(ne.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(n=n.describe(e.description)),e.default!==void 0&&(n=n.default(e.default)),n}function Br(e,t){if(typeof e=="boolean")return e?ne.any():ne.never();let r=P9(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>Br(u,t)),l=ne.union(s);r=n?ne.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>Br(u,t)),l=ne.xor(s);r=n?ne.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:ne.any();else{let s=n?r:Br(e.allOf[0],t),l=n?0:1;for(let u=l;u<e.allOf.length;u++)s=ne.intersection(s,Br(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ne.nullable(r)),e.readOnly===!0&&(r=ne.readonly(r));let o={},a=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of a)s in e&&(o[s]=e[s]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let s of i)s in e&&(o[s]=e[s]);for(let s of Object.keys(e))ede.has(s)||(o[s]=e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),r}function L9(e,t){if(typeof e=="boolean")return e?ne.any():ne.never();let r=tde(e,t?.defaultTarget),n=e.$defs||e.definitions||{},o={version:r,defs:n,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Lr};return Br(e,o)}var G$={};Et(G$,{bigint:()=>ide,boolean:()=>ade,date:()=>sde,number:()=>ode,string:()=>nde});function nde(e){return vR(_f,e)}function ode(e){return TR(Pf,e)}function ade(e){return $R(Lf,e)}function ide(e){return OR(Ef,e)}function sde(e){return ZR(Ag,e)}jt(aI());var De;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let a={};for(let i of o)a[i]=i;return a},e.getValidEnumValues=o=>{let a=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),i={};for(let s of a)i[s]=o[s];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(a){return o[a]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let a=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&a.push(i);return a},e.find=(o,a)=>{for(let i of o)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,a=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(o,a)=>typeof a=="bigint"?a.toString():a})(De||(De={}));var E9;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(E9||(E9={}));var le=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Mi=e=>{switch(typeof e){case"undefined":return le.undefined;case"string":return le.string;case"number":return Number.isNaN(e)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(e)?le.array:e===null?le.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?le.promise:typeof Map<"u"&&e instanceof Map?le.map:typeof Set<"u"&&e instanceof Set?le.set:typeof Date<"u"&&e instanceof Date?le.date:le.object;default:return le.unknown}};var q=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Gn=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(a){return a.message},n={_errors:[]},o=a=>{for(let i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let s=n,l=0;for(;l<i.path.length;){let u=i.path[l];l===i.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(i))):s[u]=s[u]||{_errors:[]},s=s[u],l++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),n=[];for(let o of this.issues)if(o.path.length>0){let a=o.path[0];r[a]=r[a]||[],r[a].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Gn.create=e=>new Gn(e);var ude=(e,t)=>{let r;switch(e.code){case q.invalid_type:e.received===le.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case q.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case q.unrecognized_keys:r=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case q.invalid_union:r="Invalid input";break;case q.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case q.invalid_enum_value:r=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case q.invalid_arguments:r="Invalid function arguments";break;case q.invalid_return_type:r="Invalid function return type";break;case q.invalid_date:r="Invalid date";break;case q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:De.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case q.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case q.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case q.custom:r="Invalid input";break;case q.invalid_intersection_types:r="Intersection results could not be merged";break;case q.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case q.not_finite:r="Number must be finite";break;default:r=t.defaultError,De.assertNever(e)}return{message:r}},ol=ude;var cde=ol;function Ng(){return cde}var xk=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,a=[...r,...o.path||[]],i={...o,path:a};if(o.message!==void 0)return{...o,path:a,message:o.message};let s="",l=n.filter(u=>!!u).slice().reverse();for(let u of l)s=u(i,{data:t,defaultError:s}).message;return{...o,path:a,message:s}};function oe(e,t){let r=Ng(),n=xk({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ol?void 0:ol].filter(o=>!!o)});e.common.issues.push(n)}var jr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return ge;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let a=await o.key,i=await o.value;n.push({key:a,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:a,value:i}=o;if(a.status==="aborted"||i.status==="aborted")return ge;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[a.value]=i.value)}return{status:t.value,value:n}}},ge=Object.freeze({status:"aborted"}),Af=e=>({status:"dirty",value:e}),nn=e=>({status:"valid",value:e}),K$=e=>e.status==="aborted",J$=e=>e.status==="dirty",qu=e=>e.status==="valid",zg=e=>typeof Promise<"u"&&e instanceof Promise;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(pe||(pe={}));var Io=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},A9=(e,t)=>{if(qu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Gn(e.common.issues);return this._error=r,this._error}}};function Ce(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,s)=>{let{message:l}=e;return i.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:o}}var Ee=class{get description(){return this._def.description}_getType(t){return Mi(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jr,ctx:{common:t.parent.common,data:t.data,parsedType:Mi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(zg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parseSync({data:t,path:n.path,parent:n});return A9(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return qu(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>qu(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Mi(t)},o=this._parse({data:t,path:n.path,parent:n}),a=await(zg(o)?o:Promise.resolve(o));return A9(n,a)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,a)=>{let i=t(o),s=()=>a.addIssue({code:q.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new na({schema:this,typeName:J.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ra.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return il.create(this)}promise(){return Hu.create(this,this._def)}or(t){return Of.create([this,t],this._def)}and(t){return Nf.create(this,t,this._def)}transform(t){return new na({...Ce(this._def),schema:this,typeName:J.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Uf({...Ce(this._def),innerType:this,defaultValue:r,typeName:J.ZodDefault})}brand(){return new vk({typeName:J.ZodBranded,type:this,...Ce(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Vf({...Ce(this._def),innerType:this,catchValue:r,typeName:J.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return bk.create(this,t)}readonly(){return qf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},dde=/^c[^\s-]{8,}$/i,fde=/^[0-9a-z]+$/,pde=/^[0-9A-HJKMNP-TV-Z]{26}$/i,mde=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,hde=/^[a-z0-9_-]{21}$/i,gde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yde=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xde=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vde="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",X$,bde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Sde=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ide=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cde=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,R9="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",_de=new RegExp(`^${R9}$`);function M9(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Tde(e){return new RegExp(`^${M9(e)}$`)}function Pde(e){let t=`${R9}T${M9(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Lde(e,t){return!!((t==="v4"||!t)&&bde.test(e)||(t==="v6"||!t)&&Sde.test(e))}function Ede(e,t){if(!gde.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Ade(e,t){return!!((t==="v4"||!t)&&wde.test(e)||(t==="v6"||!t)&&Ide.test(e))}var Mf=class e extends Ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==le.string){let a=this._getOrReturnCtx(t);return oe(a,{code:q.invalid_type,expected:le.string,received:a.parsedType}),ge}let n=new jr,o;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let i=t.data.length>a.value,s=t.data.length<a.value;(i||s)&&(o=this._getOrReturnCtx(t,o),i?oe(o,{code:q.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&oe(o,{code:q.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")xde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"email",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")X$||(X$=new RegExp(vde,"u")),X$.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"emoji",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")mde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"uuid",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")hde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"nanoid",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")dde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")fde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cuid2",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")pde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ulid",code:q.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),oe(o,{validation:"url",code:q.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"regex",code:q.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Pde(a).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?_de.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Tde(a).test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{code:q.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?yde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"duration",code:q.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Lde(t.data,a.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"ip",code:q.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Ede(t.data,a.alg)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"jwt",code:q.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Ade(t.data,a.version)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"cidr",code:q.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?kde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64",code:q.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?Cde.test(t.data)||(o=this._getOrReturnCtx(t,o),oe(o,{validation:"base64url",code:q.invalid_string,message:a.message}),n.dirty()):De.assertNever(a);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:q.invalid_string,...pe.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...pe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...pe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...pe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...pe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...pe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...pe.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...pe.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...pe.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...pe.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...pe.errToObj(r)})}nonempty(t){return this.min(1,pe.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Mf.create=e=>new Mf({checks:[],typeName:J.ZodString,coerce:e?.coerce??!1,...Ce(e)});function Rde(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,a=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return a%i/10**o}var Fg=class e extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==le.number){let a=this._getOrReturnCtx(t);return oe(a,{code:q.invalid_type,expected:le.number,received:a.parsedType}),ge}let n,o=new jr;for(let a of this._def.checks)a.kind==="int"?De.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),oe(n,{code:q.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?Rde(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),oe(n,{code:q.not_finite,message:a.message}),o.dirty()):De.assertNever(a);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,pe.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:pe.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&De.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Fg.create=e=>new Fg({checks:[],typeName:J.ZodNumber,coerce:e?.coerce||!1,...Ce(e)});var Bg=class e extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==le.bigint)return this._getInvalidInput(t);let n,o=new jr;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),oe(n,{code:q.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):De.assertNever(a);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return oe(r,{code:q.invalid_type,expected:le.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,!0,pe.toString(r))}gt(t,r){return this.setLimit("min",t,!1,pe.toString(r))}lte(t,r){return this.setLimit("max",t,!0,pe.toString(r))}lt(t,r){return this.setLimit("max",t,!1,pe.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:pe.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Bg.create=e=>new Bg({checks:[],typeName:J.ZodBigInt,coerce:e?.coerce??!1,...Ce(e)});var jg=class extends Ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==le.boolean){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.boolean,received:n.parsedType}),ge}return nn(t.data)}};jg.create=e=>new jg({typeName:J.ZodBoolean,coerce:e?.coerce||!1,...Ce(e)});var Ug=class e extends Ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==le.date){let a=this._getOrReturnCtx(t);return oe(a,{code:q.invalid_type,expected:le.date,received:a.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return oe(a,{code:q.invalid_date}),ge}let n=new jr,o;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:q.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(o=this._getOrReturnCtx(t,o),oe(o,{code:q.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):De.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:pe.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ug.create=e=>new Ug({checks:[],coerce:e?.coerce||!1,typeName:J.ZodDate,...Ce(e)});var Vg=class extends Ee{_parse(t){if(this._getType(t)!==le.symbol){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.symbol,received:n.parsedType}),ge}return nn(t.data)}};Vg.create=e=>new Vg({typeName:J.ZodSymbol,...Ce(e)});var $f=class extends Ee{_parse(t){if(this._getType(t)!==le.undefined){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.undefined,received:n.parsedType}),ge}return nn(t.data)}};$f.create=e=>new $f({typeName:J.ZodUndefined,...Ce(e)});var Df=class extends Ee{_parse(t){if(this._getType(t)!==le.null){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.null,received:n.parsedType}),ge}return nn(t.data)}};Df.create=e=>new Df({typeName:J.ZodNull,...Ce(e)});var qg=class extends Ee{constructor(){super(...arguments),this._any=!0}_parse(t){return nn(t.data)}};qg.create=e=>new qg({typeName:J.ZodAny,...Ce(e)});var al=class extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return nn(t.data)}};al.create=e=>new al({typeName:J.ZodUnknown,...Ce(e)});var za=class extends Ee{_parse(t){let r=this._getOrReturnCtx(t);return oe(r,{code:q.invalid_type,expected:le.never,received:r.parsedType}),ge}};za.create=e=>new za({typeName:J.ZodNever,...Ce(e)});var Hg=class extends Ee{_parse(t){if(this._getType(t)!==le.undefined){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.void,received:n.parsedType}),ge}return nn(t.data)}};Hg.create=e=>new Hg({typeName:J.ZodVoid,...Ce(e)});var il=class e extends Ee{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==le.array)return oe(r,{code:q.invalid_type,expected:le.array,received:r.parsedType}),ge;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(i||s)&&(oe(r,{code:i?q.too_big:q.too_small,minimum:s?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(oe(r,{code:q.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(oe(r,{code:q.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,s)=>o.type._parseAsync(new Io(r,i,r.path,s)))).then(i=>jr.mergeArray(n,i));let a=[...r.data].map((i,s)=>o.type._parseSync(new Io(r,i,r.path,s)));return jr.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:pe.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:pe.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:pe.toString(r)}})}nonempty(t){return this.min(1,t)}};il.create=(e,t)=>new il({type:e,minLength:null,maxLength:null,exactLength:null,typeName:J.ZodArray,...Ce(t)});function Rf(e){if(e instanceof Kn){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=ra.create(Rf(n))}return new Kn({...e._def,shape:()=>t})}else return e instanceof il?new il({...e._def,type:Rf(e.element)}):e instanceof ra?ra.create(Rf(e.unwrap())):e instanceof Oi?Oi.create(Rf(e.unwrap())):e instanceof Di?Di.create(e.items.map(t=>Rf(t))):e}var Kn=class e extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=De.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==le.object){let u=this._getOrReturnCtx(t);return oe(u,{code:q.invalid_type,expected:le.object,received:u.parsedType}),ge}let{status:n,ctx:o}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof za&&this._def.unknownKeys==="strip"))for(let u in o.data)i.includes(u)||s.push(u);let l=[];for(let u of i){let c=a[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Io(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof za){let u=this._def.unknownKeys;if(u==="passthrough")for(let c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")s.length>0&&(oe(o,{code:q.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let c of s){let d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Io(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let c of l){let d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>jr.mergeObjectSync(n,u)):jr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:pe.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:J.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of De.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of De.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Rf(this)}partial(t){let r={};for(let n of De.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of De.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof ra;)a=a._def.innerType;r[n]=a}return new e({...this._def,shape:()=>r})}keyof(){return $9(De.objectKeys(this.shape))}};Kn.create=(e,t)=>new Kn({shape:()=>e,unknownKeys:"strip",catchall:za.create(),typeName:J.ZodObject,...Ce(t)});Kn.strictCreate=(e,t)=>new Kn({shape:()=>e,unknownKeys:"strict",catchall:za.create(),typeName:J.ZodObject,...Ce(t)});Kn.lazycreate=(e,t)=>new Kn({shape:e,unknownKeys:"strip",catchall:za.create(),typeName:J.ZodObject,...Ce(t)});var Of=class extends Ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let i=a.map(s=>new Gn(s.ctx.common.issues));return oe(r,{code:q.invalid_union,unionErrors:i}),ge}if(r.common.async)return Promise.all(n.map(async a=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let a,i=[];for(let l of n){let u={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(l=>new Gn(l));return oe(r,{code:q.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}};Of.create=(e,t)=>new Of({options:e,typeName:J.ZodUnion,...Ce(t)});var $i=e=>e instanceof zf?$i(e.schema):e instanceof na?$i(e.innerType()):e instanceof Ff?[e.value]:e instanceof Bf?e.options:e instanceof jf?De.objectValues(e.enum):e instanceof Uf?$i(e._def.innerType):e instanceof $f?[void 0]:e instanceof Df?[null]:e instanceof ra?[void 0,...$i(e.unwrap())]:e instanceof Oi?[null,...$i(e.unwrap())]:e instanceof vk||e instanceof qf?$i(e.unwrap()):e instanceof Vf?$i(e._def.innerType):[],Y$=class e extends Ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==le.object)return oe(r,{code:q.invalid_type,expected:le.object,received:r.parsedType}),ge;let n=this.discriminator,o=r.data[n],a=this.optionsMap.get(o);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(oe(r,{code:q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let a of r){let i=$i(a.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of i){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,a)}}return new e({typeName:J.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Ce(n)})}};function Q$(e,t){let r=Mi(e),n=Mi(t);if(e===t)return{valid:!0,data:e};if(r===le.object&&n===le.object){let o=De.objectKeys(t),a=De.objectKeys(e).filter(s=>o.indexOf(s)!==-1),i={...e,...t};for(let s of a){let l=Q$(e[s],t[s]);if(!l.valid)return{valid:!1};i[s]=l.data}return{valid:!0,data:i}}else if(r===le.array&&n===le.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let a=0;a<e.length;a++){let i=e[a],s=t[a],l=Q$(i,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return r===le.date&&n===le.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Nf=class extends Ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(a,i)=>{if(K$(a)||K$(i))return ge;let s=Q$(a.value,i.value);return s.valid?((J$(a)||J$(i))&&r.dirty(),{status:r.value,value:s.data}):(oe(n,{code:q.invalid_intersection_types}),ge)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>o(a,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Nf.create=(e,t,r)=>new Nf({left:e,right:t,typeName:J.ZodIntersection,...Ce(r)});var Di=class e extends Ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.array)return oe(n,{code:q.invalid_type,expected:le.array,received:n.parsedType}),ge;if(n.data.length<this._def.items.length)return oe(n,{code:q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&n.data.length>this._def.items.length&&(oe(n,{code:q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...n.data].map((i,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new Io(n,i,n.path,s)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>jr.mergeArray(r,i)):jr.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Di.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Di({items:e,typeName:J.ZodTuple,rest:null,...Ce(t)})};var eD=class e extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.object)return oe(n,{code:q.invalid_type,expected:le.object,received:n.parsedType}),ge;let o=[],a=this._def.keyType,i=this._def.valueType;for(let s in n.data)o.push({key:a._parse(new Io(n,s,n.path,s)),value:i._parse(new Io(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?jr.mergeObjectAsync(r,o):jr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ee?new e({keyType:t,valueType:r,typeName:J.ZodRecord,...Ce(n)}):new e({keyType:Mf.create(),valueType:t,typeName:J.ZodRecord,...Ce(r)})}},Wg=class extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.map)return oe(n,{code:q.invalid_type,expected:le.map,received:n.parsedType}),ge;let o=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([s,l],u)=>({key:o._parse(new Io(n,s,n.path,[u,"key"])),value:a._parse(new Io(n,l,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of i){let u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let l of i){let u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&r.dirty(),s.set(u.value,c.value)}return{status:r.value,value:s}}}};Wg.create=(e,t,r)=>new Wg({valueType:t,keyType:e,typeName:J.ZodMap,...Ce(r)});var Zg=class e extends Ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==le.set)return oe(n,{code:q.invalid_type,expected:le.set,received:n.parsedType}),ge;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(oe(n,{code:q.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(oe(n,{code:q.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let a=this._def.valueType;function i(l){let u=new Set;for(let c of l){if(c.status==="aborted")return ge;c.status==="dirty"&&r.dirty(),u.add(c.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((l,u)=>a._parse(new Io(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>i(l)):i(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:pe.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:pe.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Zg.create=(e,t)=>new Zg({valueType:e,minSize:null,maxSize:null,typeName:J.ZodSet,...Ce(t)});var tD=class e extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==le.function)return oe(r,{code:q.invalid_type,expected:le.function,received:r.parsedType}),ge;function n(s,l){return xk({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ng(),ol].filter(u=>!!u),issueData:{code:q.invalid_arguments,argumentsError:l}})}function o(s,l){return xk({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ng(),ol].filter(u=>!!u),issueData:{code:q.invalid_return_type,returnTypeError:l}})}let a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Hu){let s=this;return nn(async function(...l){let u=new Gn([]),c=await s._def.args.parseAsync(l,a).catch(p=>{throw u.addIssue(n(l,p)),u}),d=await Reflect.apply(i,this,c);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw u.addIssue(o(d,p)),u})})}else{let s=this;return nn(function(...l){let u=s._def.args.safeParse(l,a);if(!u.success)throw new Gn([n(l,u.error)]);let c=Reflect.apply(i,this,u.data),d=s._def.returns.safeParse(c,a);if(!d.success)throw new Gn([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Di.create(t).rest(al.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Di.create([]).rest(al.create()),returns:r||al.create(),typeName:J.ZodFunction,...Ce(n)})}},zf=class extends Ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};zf.create=(e,t)=>new zf({getter:e,typeName:J.ZodLazy,...Ce(t)});var Ff=class extends Ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return oe(r,{received:r.data,code:q.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ff.create=(e,t)=>new Ff({value:e,typeName:J.ZodLiteral,...Ce(t)});function $9(e,t){return new Bf({values:e,typeName:J.ZodEnum,...Ce(t)})}var Bf=class e extends Ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return oe(r,{expected:De.joinValues(n),received:r.parsedType,code:q.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return oe(r,{received:r.data,code:q.invalid_enum_value,options:n}),ge}return nn(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Bf.create=$9;var jf=class extends Ee{_parse(t){let r=De.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==le.string&&n.parsedType!==le.number){let o=De.objectValues(r);return oe(n,{expected:De.joinValues(o),received:n.parsedType,code:q.invalid_type}),ge}if(this._cache||(this._cache=new Set(De.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=De.objectValues(r);return oe(n,{received:n.data,code:q.invalid_enum_value,options:o}),ge}return nn(t.data)}get enum(){return this._def.values}};jf.create=(e,t)=>new jf({values:e,typeName:J.ZodNativeEnum,...Ce(t)});var Hu=class extends Ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==le.promise&&r.common.async===!1)return oe(r,{code:q.invalid_type,expected:le.promise,received:r.parsedType}),ge;let n=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return nn(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Hu.create=(e,t)=>new Hu({type:e,typeName:J.ZodPromise,...Ce(t)});var na=class extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===J.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,a={addIssue:i=>{oe(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),o.type==="preprocess"){let i=o.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async s=>{if(r.value==="aborted")return ge;let l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?ge:l.status==="dirty"?Af(l.value):r.value==="dirty"?Af(l.value):l});{if(r.value==="aborted")return ge;let s=this._def.schema._parseSync({data:i,path:n.path,parent:n});return s.status==="aborted"?ge:s.status==="dirty"?Af(s.value):r.value==="dirty"?Af(s.value):s}}if(o.type==="refinement"){let i=s=>{let l=o.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ge:(s.status==="dirty"&&r.dirty(),i(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?ge:(s.status==="dirty"&&r.dirty(),i(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!qu(i))return ge;let s=o.transform(i.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>qu(i)?Promise.resolve(o.transform(i.value,a)).then(s=>({status:r.value,value:s})):ge);De.assertNever(o)}};na.create=(e,t,r)=>new na({schema:e,typeName:J.ZodEffects,effect:t,...Ce(r)});na.createWithPreprocess=(e,t,r)=>new na({schema:t,effect:{type:"preprocess",transform:e},typeName:J.ZodEffects,...Ce(r)});var ra=class extends Ee{_parse(t){return this._getType(t)===le.undefined?nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ra.create=(e,t)=>new ra({innerType:e,typeName:J.ZodOptional,...Ce(t)});var Oi=class extends Ee{_parse(t){return this._getType(t)===le.null?nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:J.ZodNullable,...Ce(t)});var Uf=class extends Ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===le.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Uf.create=(e,t)=>new Uf({innerType:e,typeName:J.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ce(t)});var Vf=class extends Ee{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return zg(o)?o.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Gn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Vf.create=(e,t)=>new Vf({innerType:e,typeName:J.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ce(t)});var Gg=class extends Ee{_parse(t){if(this._getType(t)!==le.nan){let n=this._getOrReturnCtx(t);return oe(n,{code:q.invalid_type,expected:le.nan,received:n.parsedType}),ge}return{status:"valid",value:t.data}}};Gg.create=e=>new Gg({typeName:J.ZodNaN,...Ce(e)});var vk=class extends Ee{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},bk=class e extends Ee{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ge:a.status==="dirty"?(r.dirty(),Af(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?ge:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:J.ZodPipeline})}},qf=class extends Ee{_parse(t){let r=this._def.innerType._parse(t),n=o=>(qu(o)&&(o.value=Object.freeze(o.value)),o);return zg(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};qf.create=(e,t)=>new qf({innerType:e,typeName:J.ZodReadonly,...Ce(t)});var m6e={object:Kn.lazycreate},J;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(J||(J={}));var h6e=Mf.create,g6e=Fg.create,y6e=Gg.create,x6e=Bg.create,v6e=jg.create,b6e=Ug.create,w6e=Vg.create,S6e=$f.create,I6e=Df.create,k6e=qg.create,C6e=al.create,_6e=za.create,T6e=Hg.create,P6e=il.create,L6e=Kn.create,E6e=Kn.strictCreate,A6e=Of.create,R6e=Y$.create,M6e=Nf.create,$6e=Di.create,D6e=eD.create,O6e=Wg.create,N6e=Zg.create,z6e=tD.create,F6e=zf.create,B6e=Ff.create,j6e=Bf.create,U6e=jf.create,V6e=Hu.create,q6e=na.create,H6e=ra.create,W6e=Oi.create,Z6e=na.createWithPreprocess,G6e=bk.create;var Fa=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{let o=()=>{let a=r.length,i=new Array(t);for(let s=0;s<t;s++)i[s]=r[Math.random()*a|0];return i.join("")};if(e==null)return o;if(r.includes(n))throw new vH({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return()=>`${e}${n}${o()}`},Kg=Fa();function iD(e=globalThis){var t,r,n;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(n=(r=e.process)==null?void 0:r.versions)!=null&&n.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function sl(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((r,n)=>{t[n.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(let[r,n]of e)n!=null&&(t[r.toLowerCase()]=n)}return t}function Jg(e,...t){let r=new Headers(sl(e)),n=r.get("user-agent")||"";return r.set("user-agent",[n,...t].filter(Boolean).join(" ")),Object.fromEntries(r.entries())}var $de=/"__proto__"\s*:/,Dde=/"constructor"\s*:/;function D9(e){let t=JSON.parse(e);return t===null||typeof t!="object"||$de.test(e)===!1&&Dde.test(e)===!1?t:Ode(t)}function Ode(e){let t=[e];for(;t.length;){let r=t;t=[];for(let n of r){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let o in n){let a=n[o];a&&typeof a=="object"&&t.push(a)}}}return e}function Nde(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return D9(e)}try{return D9(e)}finally{Error.stackTraceLimit=t}}var Sk=Symbol.for("vercel.ai.validator");function zde(e){return{[Sk]:!0,validate:e}}function Fde(e){return typeof e=="object"&&e!==null&&Sk in e&&e[Sk]===!0&&"validate"in e}function Ik(e){let t;return()=>(t==null&&(t=e()),t)}function Bde(e){return Fde(e)?e:typeof e=="function"?e():jde(e)}function jde(e){return zde(async t=>{let r=await e["~standard"].validate(t);return r.issues==null?{success:!0,value:r.value}:{success:!1,error:new Du({value:t,cause:r.issues})}})}async function kk({value:e,schema:t}){let r=await Ck({value:e,schema:t});if(!r.success)throw Du.wrap({value:e,cause:r.error});return r.value}async function Ck({value:e,schema:t}){let r=Bde(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let n=await r.validate(e);return n.success?{success:!0,value:n.value,rawValue:e}:{success:!1,error:Du.wrap({value:e,cause:n.error}),rawValue:e}}catch(n){return{success:!1,error:Du.wrap({value:e,cause:n}),rawValue:e}}}async function Hf({text:e,schema:t}){try{let r=Nde(e);return t==null?{success:!0,value:r,rawValue:r}:await Ck({value:r,schema:t})}catch(r){return{success:!1,error:JE.isInstance(r)?r:new JE({text:e,cause:r}),rawValue:void 0}}}function sD({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new RS).pipeThrough(new TransformStream({async transform({data:r},n){r!=="[DONE]"&&n.enqueue(await Hf({text:r,schema:t}))}}))}async function Wu(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}function wk(e){if(e.type==="object"){e.additionalProperties=!1;let t=e.properties;if(t!=null)for(let r in t)t[r]=wk(t[r])}return e.type==="array"&&e.items!=null&&(Array.isArray(e.items)?e.items=e.items.map(t=>wk(t)):e.items=wk(e.items)),e}var Ude=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")},Vde=Symbol("Let zodToJsonSchema decide on which parser to use"),O9={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},qde=e=>typeof e=="string"?{...O9,name:e}:{...O9,...e};function Jn(){return{}}function Hde(e,t){var r,n,o;let a={type:"array"};return(r=e.type)!=null&&r._def&&((o=(n=e.type)==null?void 0:n._def)==null?void 0:o.typeName)!==J.ZodAny&&(a.items=et(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}function Wde(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Zde(){return{type:"boolean"}}function z9(e,t){return et(e.type._def,t)}var Gde=(e,t)=>et(e.innerType._def,t);function F9(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,a)=>F9(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Kde(e)}}var Kde=e=>{let t={type:"integer",format:"unix-time"};for(let r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function Jde(e,t){return{...et(e.innerType._def,t),default:e.defaultValue()}}function Xde(e,t){return t.effectStrategy==="input"?et(e.schema._def,t):Jn()}function Yde(e){return{type:"string",enum:Array.from(e.values)}}var Qde=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function efe(e,t){let r=[et(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),et(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(o=>!!o),n=[];return r.forEach(o=>{if(Qde(o))n.push(...o.allOf);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:i,...s}=o;a=s}n.push(a)}}),n.length?{allOf:n}:void 0}function tfe(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var rD=void 0,oa={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(rD===void 0&&(rD=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rD),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function B9(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":aa(r,"email",n.message,t);break;case"format:idn-email":aa(r,"idn-email",n.message,t);break;case"pattern:zod":on(r,oa.email,n.message,t);break}break;case"url":aa(r,"uri",n.message,t);break;case"uuid":aa(r,"uuid",n.message,t);break;case"regex":on(r,n.regex,n.message,t);break;case"cuid":on(r,oa.cuid,n.message,t);break;case"cuid2":on(r,oa.cuid2,n.message,t);break;case"startsWith":on(r,RegExp(`^${nD(n.value,t)}`),n.message,t);break;case"endsWith":on(r,RegExp(`${nD(n.value,t)}$`),n.message,t);break;case"datetime":aa(r,"date-time",n.message,t);break;case"date":aa(r,"date",n.message,t);break;case"time":aa(r,"time",n.message,t);break;case"duration":aa(r,"duration",n.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"includes":{on(r,RegExp(nD(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&aa(r,"ipv4",n.message,t),n.version!=="v4"&&aa(r,"ipv6",n.message,t);break}case"base64url":on(r,oa.base64url,n.message,t);break;case"jwt":on(r,oa.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&on(r,oa.ipv4Cidr,n.message,t),n.version!=="v4"&&on(r,oa.ipv6Cidr,n.message,t);break}case"emoji":on(r,oa.emoji(),n.message,t);break;case"ulid":{on(r,oa.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{aa(r,"binary",n.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{on(r,oa.base64,n.message,t);break}}break}case"nanoid":on(r,oa.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function nD(e,t){return t.patternStrategy==="escape"?nfe(e):e}var rfe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function nfe(e){let t="";for(let r=0;r<e.length;r++)rfe.has(e[r])||(t+="\\"),t+=e[r];return t}function aa(e,t,r,n){var o;e.format||(o=e.anyOf)!=null&&o.some(a=>a.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function on(e,t,r,n){var o;e.pattern||(o=e.allOf)!=null&&o.some(a=>a.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:N9(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=N9(t,n)}function N9(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=n.i?e.source.toLowerCase():e.source,a="",i=!1,s=!1,l=!1;for(let u=0;u<o.length;u++){if(i){a+=o[u],i=!1;continue}if(n.i){if(s){if(o[u].match(/[a-z]/)){l?(a+=o[u],a+=`${o[u-2]}-${o[u]}`.toUpperCase(),l=!1):o[u+1]==="-"&&((r=o[u+2])!=null&&r.match(/[a-z]/))?(a+=o[u],l=!0):a+=`${o[u]}${o[u].toUpperCase()}`;continue}}else if(o[u].match(/[a-z]/)){a+=`[${o[u]}${o[u].toUpperCase()}]`;continue}}if(n.m){if(o[u]==="^"){a+=`(^|(?<=[\r
|
|
100
|
+
]))`;continue}else if(o[u]==="$"){a+=`($|(?=[\r
|
|
101
|
+
]))`;continue}}if(n.s&&o[u]==="."){a+=s?`${o[u]}\r
|
|
102
|
+
`:`[${o[u]}\r
|
|
103
|
+
]`;continue}a+=o[u],o[u]==="\\"?i=!0:s&&o[u]==="]"?s=!1:!s&&o[u]==="["&&(s=!0)}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function j9(e,t){var r,n,o,a,i,s;let l={type:"object",additionalProperties:(r=et(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===J.ZodString&&((o=e.keyType._def.checks)!=null&&o.length)){let{type:u,...c}=B9(e.keyType._def,t);return{...l,propertyNames:c}}else{if(((a=e.keyType)==null?void 0:a._def.typeName)===J.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===J.ZodBranded&&e.keyType._def.type._def.typeName===J.ZodString&&((s=e.keyType._def.type._def.checks)!=null&&s.length)){let{type:u,...c}=z9(e.keyType._def,t);return{...l,propertyNames:c}}}return l}function ofe(e,t){if(t.mapStrategy==="record")return j9(e,t);let r=et(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Jn(),n=et(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Jn();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function afe(e){let t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),o=Array.from(new Set(n.map(a=>typeof a)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}function ife(){return{not:Jn()}}function sfe(){return{type:"null"}}var oD={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function lfe(e,t){let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in oD&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,a)=>{let i=oD[a._def.typeName];return i&&!o.includes(i)?[...o,i]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,a)=>{let i=typeof a._def.value;switch(i){case"string":case"number":case"boolean":return[...o,i];case"bigint":return[...o,"integer"];case"object":if(a._def.value===null)return[...o,"null"];default:return o}},[]);if(n.length===r.length){let o=n.filter((a,i,s)=>s.indexOf(a)===i);return{type:o.length>1?o:o[0],enum:r.reduce((a,i)=>a.includes(i._def.value)?a:[...a,i._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(a=>!n.includes(a))],[])};return ufe(e,t)}var ufe=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>et(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function cfe(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[oD[e.innerType._def.typeName],"null"]};let r=et(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function dfe(e){let t={type:"number"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function ffe(e,t){let r={type:"object",properties:{}},n=[],o=e.shape();for(let i in o){let s=o[i];if(s===void 0||s._def===void 0)continue;let l=mfe(s),u=et(s._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});u!==void 0&&(r.properties[i]=u,l||n.push(i))}n.length&&(r.required=n);let a=pfe(e,t);return a!==void 0&&(r.additionalProperties=a),r}function pfe(e,t){if(e.catchall._def.typeName!=="ZodNever")return et(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function mfe(e){try{return e.isOptional()}catch{return!0}}var hfe=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return et(e.innerType._def,t);let n=et(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Jn()},n]}:Jn()},gfe=(e,t)=>{if(t.pipeStrategy==="input")return et(e.in._def,t);if(t.pipeStrategy==="output")return et(e.out._def,t);let r=et(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=et(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}};function yfe(e,t){return et(e.type._def,t)}function xfe(e,t){let n={type:"array",uniqueItems:!0,items:et(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function vfe(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>et(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:et(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>et(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function bfe(){return{not:Jn()}}function wfe(){return Jn()}var Sfe=(e,t)=>et(e.innerType._def,t),Ife=(e,t,r)=>{switch(t){case J.ZodString:return B9(e,r);case J.ZodNumber:return dfe(e);case J.ZodObject:return ffe(e,r);case J.ZodBigInt:return Wde(e);case J.ZodBoolean:return Zde();case J.ZodDate:return F9(e,r);case J.ZodUndefined:return bfe();case J.ZodNull:return sfe();case J.ZodArray:return Hde(e,r);case J.ZodUnion:case J.ZodDiscriminatedUnion:return lfe(e,r);case J.ZodIntersection:return efe(e,r);case J.ZodTuple:return vfe(e,r);case J.ZodRecord:return j9(e,r);case J.ZodLiteral:return tfe(e);case J.ZodEnum:return Yde(e);case J.ZodNativeEnum:return afe(e);case J.ZodNullable:return cfe(e,r);case J.ZodOptional:return hfe(e,r);case J.ZodMap:return ofe(e,r);case J.ZodSet:return xfe(e,r);case J.ZodLazy:return()=>e.getter()._def;case J.ZodPromise:return yfe(e,r);case J.ZodNaN:case J.ZodNever:return ife();case J.ZodEffects:return Xde(e,r);case J.ZodAny:return Jn();case J.ZodUnknown:return wfe();case J.ZodDefault:return Jde(e,r);case J.ZodBranded:return z9(e,r);case J.ZodReadonly:return Sfe(e,r);case J.ZodCatch:return Gde(e,r);case J.ZodPipeline:return gfe(e,r);case J.ZodFunction:case J.ZodVoid:case J.ZodSymbol:return;default:return(n=>{})(t)}};function et(e,t,r=!1){var n;let o=t.seen.get(e);if(t.override){let l=(n=t.override)==null?void 0:n.call(t,e,t,o,r);if(l!==Vde)return l}if(o&&!r){let l=kfe(o,t);if(l!==void 0)return l}let a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);let i=Ife(e,e.typeName,t),s=typeof i=="function"?et(i(),t):i;if(s&&Cfe(e,t,s),t.postProcess){let l=t.postProcess(s,e,t);return a.jsonSchema=s,l}return a.jsonSchema=s,s}var kfe=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ude(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Jn()):t.$refStrategy==="seen"?Jn():void 0}},Cfe=(e,t,r)=>(e.description&&(r.description=e.description),r),_fe=e=>{let t=qde(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},Tfe=(e,t)=>{var r;let n=_fe(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((u,[c,d])=>{var f;return{...u,[c]:(f=et(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?f:Jn()}},{}):void 0,a=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(r=et(e._def,a===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1))!=null?r:Jn(),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s);let l=a===void 0?o?{...i,[n.definitionPath]:o}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...o,[a]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l},Pfe=Tfe;function Lfe(e,t){var r;let n=(r=t?.useReferences)!=null?r:!1;return _k(()=>Pfe(e,{$refStrategy:n?"root":"none"}),{validate:async o=>{let a=await e.safeParseAsync(o);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function Efe(e,t){var r;let n=(r=t?.useReferences)!=null?r:!1;return _k(()=>wk(If(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async o=>{let a=await Cg(e,o);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function Afe(e){return"_zod"in e}function Wf(e,t){return Afe(e)?Efe(e,t):Lfe(e,t)}var aD=Symbol.for("vercel.ai.schema");function _k(e,{validate:t}={}){return{[aD]:!0,_type:void 0,[Sk]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function Rfe(e){return typeof e=="object"&&e!==null&&aD in e&&e[aD]===!0&&"jsonSchema"in e&&"validate"in e}function lD(e){return e==null?_k({properties:{},additionalProperties:!1}):Rfe(e)?e:typeof e=="function"?e():Wf(e)}var{btoa:f3e,atob:p3e}=globalThis;var uD=w;var $fe=Object.defineProperty,Dfe=(e,t)=>{for(var r in t)$fe(e,r,{get:t[r],enumerable:!0})},Ofe="AI_NoOutputSpecifiedError",Nfe=`vercel.ai.error.${Ofe}`,zfe=Symbol.for(Nfe),Ffe;Ffe=zfe;var Bfe="AI_InvalidArgumentError",jfe=`vercel.ai.error.${Bfe}`,Ufe=Symbol.for(jfe),Vfe;Vfe=Ufe;var qfe="AI_InvalidStreamPartError",Hfe=`vercel.ai.error.${qfe}`,Wfe=Symbol.for(Hfe),Zfe;Zfe=Wfe;var Gfe="AI_InvalidToolInputError",Kfe=`vercel.ai.error.${Gfe}`,Jfe=Symbol.for(Kfe),Xfe;Xfe=Jfe;var Yfe="AI_NoImageGeneratedError",Qfe=`vercel.ai.error.${Yfe}`,epe=Symbol.for(Qfe),tpe;tpe=epe;var W9="AI_NoObjectGeneratedError",Z9=`vercel.ai.error.${W9}`,rpe=Symbol.for(Z9),G9,U9=class extends Qe{constructor({message:e="No object generated.",cause:t,text:r,response:n,usage:o,finishReason:a}){super({name:W9,message:e,cause:t}),this[G9]=!0,this.text=r,this.response=n,this.usage=o,this.finishReason=a}static isInstance(e){return Qe.hasMarker(e,Z9)}};G9=rpe;var npe="AI_NoOutputGeneratedError",ope=`vercel.ai.error.${npe}`,ape=Symbol.for(ope),ipe;ipe=ape;var spe="AI_NoSuchToolError",lpe=`vercel.ai.error.${spe}`,upe=Symbol.for(lpe),cpe;cpe=upe;var dpe="AI_ToolCallRepairError",fpe=`vercel.ai.error.${dpe}`,ppe=Symbol.for(fpe),mpe;mpe=ppe;var hpe="AI_InvalidDataContentError",gpe=`vercel.ai.error.${hpe}`,ype=Symbol.for(gpe),xpe;xpe=ype;var vpe="AI_InvalidMessageRoleError",bpe=`vercel.ai.error.${vpe}`,wpe=Symbol.for(bpe),Spe;Spe=wpe;var Ipe="AI_MessageConversionError",kpe=`vercel.ai.error.${Ipe}`,Cpe=Symbol.for(kpe),_pe;_pe=Cpe;var Tpe="AI_DownloadError",Ppe=`vercel.ai.error.${Tpe}`,Lpe=Symbol.for(Ppe),Epe;Epe=Lpe;var Ape="AI_RetryError",Rpe=`vercel.ai.error.${Ape}`,Mpe=Symbol.for(Rpe),$pe;$pe=Mpe;var V9="5.0.121";var K9=w.union([w.string(),w.instanceof(Uint8Array),w.instanceof(ArrayBuffer),w.custom(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]);var Xg=w.lazy(()=>w.union([w.null(),w.string(),w.number(),w.boolean(),w.record(w.string(),Xg),w.array(Xg)])),Fe=w.record(w.string(),w.record(w.string(),Xg)),J9=w.object({type:w.literal("text"),text:w.string(),providerOptions:Fe.optional()}),Dpe=w.object({type:w.literal("image"),image:w.union([K9,w.instanceof(URL)]),mediaType:w.string().optional(),providerOptions:Fe.optional()}),X9=w.object({type:w.literal("file"),data:w.union([K9,w.instanceof(URL)]),filename:w.string().optional(),mediaType:w.string(),providerOptions:Fe.optional()}),Ope=w.object({type:w.literal("reasoning"),text:w.string(),providerOptions:Fe.optional()}),Npe=w.object({type:w.literal("tool-call"),toolCallId:w.string(),toolName:w.string(),input:w.unknown(),providerOptions:Fe.optional(),providerExecuted:w.boolean().optional()}),zpe=w.discriminatedUnion("type",[w.object({type:w.literal("text"),value:w.string()}),w.object({type:w.literal("json"),value:Xg}),w.object({type:w.literal("error-text"),value:w.string()}),w.object({type:w.literal("error-json"),value:Xg}),w.object({type:w.literal("content"),value:w.array(w.union([w.object({type:w.literal("text"),text:w.string()}),w.object({type:w.literal("media"),data:w.string(),mediaType:w.string()})]))})]),Y9=w.object({type:w.literal("tool-result"),toolCallId:w.string(),toolName:w.string(),output:zpe,providerOptions:Fe.optional()}),Fpe=w.object({role:w.literal("system"),content:w.string(),providerOptions:Fe.optional()});var Bpe=w.object({role:w.literal("user"),content:w.union([w.string(),w.array(w.union([J9,Dpe,X9]))]),providerOptions:Fe.optional()});var jpe=w.object({role:w.literal("assistant"),content:w.union([w.string(),w.array(w.union([J9,X9,Ope,Npe,Y9]))]),providerOptions:Fe.optional()});var Upe=w.object({role:w.literal("tool"),content:w.array(Y9),providerOptions:Fe.optional()});var R3e=w.union([Fpe,Bpe,jpe,Upe]);var M3e=Fa({prefix:"aitxt",size:24});var D3e=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
|
|
104
|
+
|
|
105
|
+
`)},flush(e){e.enqueue(`data: [DONE]
|
|
106
|
+
|
|
107
|
+
`)}})}};var Vpe=Ik(()=>Wf(w.union([w.strictObject({type:w.literal("text-start"),id:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("text-delta"),id:w.string(),delta:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("text-end"),id:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("error"),errorText:w.string()}),w.strictObject({type:w.literal("tool-input-start"),toolCallId:w.string(),toolName:w.string(),providerExecuted:w.boolean().optional(),dynamic:w.boolean().optional()}),w.strictObject({type:w.literal("tool-input-delta"),toolCallId:w.string(),inputTextDelta:w.string()}),w.strictObject({type:w.literal("tool-input-available"),toolCallId:w.string(),toolName:w.string(),input:w.unknown(),providerExecuted:w.boolean().optional(),providerMetadata:Fe.optional(),dynamic:w.boolean().optional()}),w.strictObject({type:w.literal("tool-input-error"),toolCallId:w.string(),toolName:w.string(),input:w.unknown(),providerExecuted:w.boolean().optional(),providerMetadata:Fe.optional(),dynamic:w.boolean().optional(),errorText:w.string()}),w.strictObject({type:w.literal("tool-output-available"),toolCallId:w.string(),output:w.unknown(),providerExecuted:w.boolean().optional(),dynamic:w.boolean().optional(),preliminary:w.boolean().optional()}),w.strictObject({type:w.literal("tool-output-error"),toolCallId:w.string(),errorText:w.string(),providerExecuted:w.boolean().optional(),dynamic:w.boolean().optional()}),w.strictObject({type:w.literal("reasoning-start"),id:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("reasoning-delta"),id:w.string(),delta:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("reasoning-end"),id:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("source-url"),sourceId:w.string(),url:w.string(),title:w.string().optional(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("source-document"),sourceId:w.string(),mediaType:w.string(),title:w.string(),filename:w.string().optional(),providerMetadata:Fe.optional()}),w.strictObject({type:w.literal("file"),url:w.string(),mediaType:w.string(),providerMetadata:Fe.optional()}),w.strictObject({type:w.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:w.string().optional(),data:w.unknown(),transient:w.boolean().optional()}),w.strictObject({type:w.literal("start-step")}),w.strictObject({type:w.literal("finish-step")}),w.strictObject({type:w.literal("start"),messageId:w.string().optional(),messageMetadata:w.unknown().optional()}),w.strictObject({type:w.literal("finish"),finishReason:w.enum(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:w.unknown().optional()}),w.strictObject({type:w.literal("abort")}),w.strictObject({type:w.literal("message-metadata"),messageMetadata:w.unknown()})])));function qpe(e){return e.type.startsWith("data-")}function Q9(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let r={...e};for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let o=t[n];if(o===void 0)continue;let a=n in e?e[n]:void 0,i=o!==null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp),s=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);i&&s?r[n]=Q9(a,o):r[n]=o}return r}function Hpe(e){let t=["ROOT"],r=-1,n=null;function o(l,u,c){switch(l){case'"':{r=u,t.pop(),t.push(c),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=u,n=u,t.pop(),t.push(c),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=u,t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"{":{r=u,t.pop(),t.push(c),t.push("INSIDE_OBJECT_START");break}case"[":{r=u,t.pop(),t.push(c),t.push("INSIDE_ARRAY_START");break}}}function a(l,u){switch(l){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=u,t.pop();break}}}function i(l,u){switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=u,t.pop();break}}}for(let l=0;l<e.length;l++){let u=e[l];switch(t[t.length-1]){case"ROOT":o(u,l,"FINISH");break;case"INSIDE_OBJECT_START":{switch(u){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{r=l,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{u==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{u===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{o(u,l,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{a(u,l);break}case"INSIDE_STRING":{switch(u){case'"':{t.pop(),r=l;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=l}break}case"INSIDE_ARRAY_START":{u==="]"?(r=l,t.pop()):(r=l,o(u,l,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=l,t.pop();break}default:{r=l;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{o(u,l,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),r=l;break}case"INSIDE_NUMBER":{switch(u){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=l;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,l),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(u,l);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(u,l);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,l);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{let d=e.substring(n,l+1);!"false".startsWith(d)&&!"true".startsWith(d)&&!"null".startsWith(d)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(u,l):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(u,l)):r=l;break}}}let s=e.slice(0,r+1);for(let l=t.length-1;l>=0;l--)switch(t[l]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{let c=e.substring(n,e.length);"true".startsWith(c)?s+="true".slice(c.length):"false".startsWith(c)?s+="false".slice(c.length):"null".startsWith(c)&&(s+="null".slice(c.length))}}return s}async function eZ(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Hf({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Hf({text:Hpe(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function ll(e){return e.type.startsWith("tool-")}function Wpe(e){return e.type==="dynamic-tool"}function q9(e){return ll(e)||Wpe(e)}function H9(e){return e.type.split("-").slice(1).join("-")}function Zpe({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Gpe({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:o,onToolCall:a,onData:i}){return e.pipeThrough(new TransformStream({async transform(s,l){await n(async({state:u,write:c})=>{var d,f,p,m;function h(b){let I=u.message.parts.filter(ll).find(C=>C.toolCallId===b);if(I==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return I}function v(b){let I=u.message.parts.filter(C=>C.type==="dynamic-tool").find(C=>C.toolCallId===b);if(I==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return I}function g(b){var _;let I=u.message.parts.find(M=>ll(M)&&M.toolCallId===b.toolCallId),C=b,k=I;I!=null?(I.state=b.state,k.input=C.input,k.output=C.output,k.errorText=C.errorText,k.rawInput=C.rawInput,k.preliminary=C.preliminary,k.providerExecuted=(_=C.providerExecuted)!=null?_:I.providerExecuted,C.providerMetadata!=null&&I.state==="input-available"&&(I.callProviderMetadata=C.providerMetadata)):u.message.parts.push({type:`tool-${b.toolName}`,toolCallId:b.toolCallId,state:b.state,input:C.input,output:C.output,rawInput:C.rawInput,errorText:C.errorText,providerExecuted:C.providerExecuted,preliminary:C.preliminary,...C.providerMetadata!=null?{callProviderMetadata:C.providerMetadata}:{}})}function y(b){var _,I;let C=u.message.parts.find(L=>L.type==="dynamic-tool"&&L.toolCallId===b.toolCallId),k=b,M=C;C!=null?(C.state=b.state,M.toolName=b.toolName,M.input=k.input,M.output=k.output,M.errorText=k.errorText,M.rawInput=(_=k.rawInput)!=null?_:M.rawInput,M.preliminary=k.preliminary,M.providerExecuted=(I=k.providerExecuted)!=null?I:C.providerExecuted,k.providerMetadata!=null&&C.state==="input-available"&&(C.callProviderMetadata=k.providerMetadata)):u.message.parts.push({type:"dynamic-tool",toolName:b.toolName,toolCallId:b.toolCallId,state:b.state,input:k.input,output:k.output,errorText:k.errorText,preliminary:k.preliminary,providerExecuted:k.providerExecuted,...k.providerMetadata!=null?{callProviderMetadata:k.providerMetadata}:{}})}async function x(b){if(b!=null){let _=u.message.metadata!=null?Q9(u.message.metadata,b):b;t!=null&&await kk({value:_,schema:t}),u.message.metadata=_}}switch(s.type){case"text-start":{let b={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};u.activeTextParts[s.id]=b,u.message.parts.push(b),c();break}case"text-delta":{let b=u.activeTextParts[s.id];b.text+=s.delta,b.providerMetadata=(d=s.providerMetadata)!=null?d:b.providerMetadata,c();break}case"text-end":{let b=u.activeTextParts[s.id];b.state="done",b.providerMetadata=(f=s.providerMetadata)!=null?f:b.providerMetadata,delete u.activeTextParts[s.id],c();break}case"reasoning-start":{let b={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};u.activeReasoningParts[s.id]=b,u.message.parts.push(b),c();break}case"reasoning-delta":{let b=u.activeReasoningParts[s.id];b.text+=s.delta,b.providerMetadata=(p=s.providerMetadata)!=null?p:b.providerMetadata,c();break}case"reasoning-end":{let b=u.activeReasoningParts[s.id];b.providerMetadata=(m=s.providerMetadata)!=null?m:b.providerMetadata,b.state="done",delete u.activeReasoningParts[s.id],c();break}case"file":{u.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url}),c();break}case"source-url":{u.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),c();break}case"source-document":{u.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),c();break}case"tool-input-start":{let b=u.message.parts.filter(ll);u.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:b.length,dynamic:s.dynamic},s.dynamic?y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}):g({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}),c();break}case"tool-input-delta":{let b=u.partialToolCalls[s.toolCallId];b.text+=s.inputTextDelta;let{value:_}=await eZ(b.text);b.dynamic?y({toolCallId:s.toolCallId,toolName:b.toolName,state:"input-streaming",input:_}):g({toolCallId:s.toolCallId,toolName:b.toolName,state:"input-streaming",input:_}),c();break}case"tool-input-available":{s.dynamic?y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):g({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),c(),a&&!s.providerExecuted&&await a({toolCall:s});break}case"tool-input-error":{s.dynamic?y({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):g({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),c();break}case"tool-output-available":{if(s.dynamic){let b=v(s.toolCallId);y({toolCallId:s.toolCallId,toolName:b.toolName,state:"output-available",input:b.input,output:s.output,preliminary:s.preliminary})}else{let b=h(s.toolCallId);g({toolCallId:s.toolCallId,toolName:H9(b),state:"output-available",input:b.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary})}c();break}case"tool-output-error":{if(s.dynamic){let b=v(s.toolCallId);y({toolCallId:s.toolCallId,toolName:b.toolName,state:"output-error",input:b.input,errorText:s.errorText,providerExecuted:s.providerExecuted})}else{let b=h(s.toolCallId);g({toolCallId:s.toolCallId,toolName:H9(b),state:"output-error",input:b.input,rawInput:b.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted})}c();break}case"start-step":{u.message.parts.push({type:"step-start"});break}case"finish-step":{u.activeTextParts={},u.activeReasoningParts={};break}case"start":{s.messageId!=null&&(u.message.id=s.messageId),await x(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&c();break}case"finish":{s.finishReason!=null&&(u.finishReason=s.finishReason),await x(s.messageMetadata),s.messageMetadata!=null&&c();break}case"message-metadata":{await x(s.messageMetadata),s.messageMetadata!=null&&c();break}case"error":{o?.(new Error(s.errorText));break}default:if(qpe(s)){r?.[s.type]!=null&&await kk({value:s.data,schema:r[s.type]});let b=s;if(b.transient){i?.(b);break}let _=b.id!=null?u.message.parts.find(I=>b.type===I.type&&b.id===I.id):void 0;_!=null?_.data=b.data:u.message.parts.push(b),i?.(b),c()}}l.enqueue(s)})}}))}async function Kpe({stream:e,onError:t}){let r=e.getReader();try{for(;;){let{done:n}=await r.read();if(n)break}}catch(n){t?.(n)}finally{r.releaseLock()}}var B3e=Fa({prefix:"aitxt",size:24});var U3e=Fa({prefix:"aiobj",size:24});var Jpe=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){r(n)}}),this.processQueue()})}};var q3e=Fa({prefix:"aiobj",size:24});var Xpe={};Dfe(Xpe,{object:()=>Qpe,text:()=>Ype});var Ype=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:e}){return{partial:e}},async parseOutput({text:e}){return e}}),Qpe=({schema:e})=>{let t=lD(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:r}){let n=await eZ(r);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:n.value};default:{let o=n.state;throw new Error(`Unsupported parse state: ${o}`)}}},async parseOutput({text:r},n){let o=await Hf({text:r});if(!o.success)throw new U9({message:"No object generated: could not parse the response.",cause:o.error,text:r,response:n.response,usage:n.usage,finishReason:n.finishReason});let a=await Ck({value:o.value,schema:t});if(!a.success)throw new U9({message:"No object generated: response did not match schema.",cause:a.error,text:r,response:n.response,usage:n.usage,finishReason:n.finishReason});return a.value}}};var eme="AI_NoSuchProviderError",tme=`vercel.ai.error.${eme}`,rme=Symbol.for(tme),nme;nme=rme;async function ome(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{let{name:r,type:n}=t,o=await new Promise((a,i)=>{let s=new FileReader;s.onload=l=>{var u;a((u=l.target)==null?void 0:u.result)},s.onerror=l=>i(l),s.readAsDataURL(t)});return{type:"file",mediaType:n,filename:r,url:o}}))}var ame=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:o,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:i}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=o,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=i}async sendMessages({abortSignal:e,...t}){var r,n,o,a,i;let s=await Wu(this.body),l=await Wu(this.headers),u=await Wu(this.credentials),c={...sl(l),...sl(t.headers)},d=await((r=this.prepareSendMessagesRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...s,...t.body},headers:c,credentials:u,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),f=(n=d?.api)!=null?n:this.api,p=d?.headers!==void 0?sl(d.headers):c,m=d?.body!==void 0?d.body:{...s,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},h=(o=d?.credentials)!=null?o:u,g=await((a=this.fetch)!=null?a:globalThis.fetch)(f,{method:"POST",headers:Jg({"Content-Type":"application/json",...p},`ai-sdk/${V9}`,iD()),body:JSON.stringify(m),credentials:h,signal:e});if(!g.ok)throw new Error((i=await g.text())!=null?i:"Failed to fetch the chat response.");if(!g.body)throw new Error("The response body is empty.");return this.processResponseStream(g.body)}async reconnectToStream(e){var t,r,n,o,a;let i=await Wu(this.body),s=await Wu(this.headers),l=await Wu(this.credentials),u={...sl(s),...sl(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...i,...e.body},headers:u,credentials:l,requestMetadata:e.metadata})),d=(r=c?.api)!=null?r:`${this.api}/${e.chatId}/stream`,f=c?.headers!==void 0?sl(c.headers):u,p=(n=c?.credentials)!=null?n:l,h=await((o=this.fetch)!=null?o:globalThis.fetch)(d,{method:"GET",headers:Jg(f,`ai-sdk/${V9}`,iD()),credentials:p});if(h.status===204)return null;if(!h.ok)throw new Error((a=await h.text())!=null?a:"Failed to fetch the chat response.");if(!h.body)throw new Error("The response body is empty.");return this.processResponseStream(h.body)}},cD=class extends ame{constructor(e={}){super(e)}processResponseStream(e){return sD({stream:e,schema:Vpe}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},tZ=class{constructor({generateId:e=Kg,id:t=e(),transport:r=new cD,messageMetadataSchema:n,dataPartSchemas:o,state:a,onError:i,onToolCall:s,onFinish:l,onData:u,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new Jpe,this.sendMessage=async(d,f)=>{var p,m,h,v;if(d==null){await this.makeRequest({trigger:"submit-message",messageId:(p=this.lastMessage)==null?void 0:p.id,...f});return}let g;if("text"in d||"files"in d?g={parts:[...Array.isArray(d.files)?d.files:await ome(d.files),..."text"in d&&d.text!=null?[{type:"text",text:d.text}]:[]]}:g=d,d.messageId!=null){let y=this.state.messages.findIndex(x=>x.id===d.messageId);if(y===-1)throw new Error(`message with id ${d.messageId} not found`);if(this.state.messages[y].role!=="user")throw new Error(`message with id ${d.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,y+1),this.state.replaceMessage(y,{...g,id:d.messageId,role:(m=g.role)!=null?m:"user",metadata:d.metadata})}else this.state.pushMessage({...g,id:(h=g.id)!=null?h:this.generateId(),role:(v=g.role)!=null?v:"user",metadata:d.metadata});await this.makeRequest({trigger:"submit-message",messageId:d.messageId,...f})},this.regenerate=async({messageId:d,...f}={})=>{let p=d==null?this.state.messages.length-1:this.state.messages.findIndex(m=>m.id===d);if(p===-1)throw new Error(`message ${d} not found`);this.state.messages=this.state.messages.slice(0,this.messages[p].role==="assistant"?p:p+1),await this.makeRequest({trigger:"regenerate-message",messageId:d,...f})},this.resumeStream=async(d={})=>{await this.makeRequest({trigger:"resume-stream",...d})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:d="output-available",tool:f,toolCallId:p,output:m,errorText:h})=>this.jobExecutor.run(async()=>{var v,g;let y=this.state.messages,x=y[y.length-1];this.state.replaceMessage(y.length-1,{...x,parts:x.parts.map(b=>q9(b)&&b.toolCallId===p?{...b,state:d,output:m,errorText:h}:b)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(b=>q9(b)&&b.toolCallId===p?{...b,state:d,output:m,errorText:h}:b)),this.status!=="streaming"&&this.status!=="submitted"&&((v=this.sendAutomaticallyWhen)!=null&&v.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(g=this.lastMessage)==null?void 0:g.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var d;this.status!=="streaming"&&this.status!=="submitted"||(d=this.activeResponse)!=null&&d.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=o,this.state=a,this.onError=i,this.onToolCall=s,this.onFinish=l,this.onData=u,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:r,body:n,messageId:o}){var a,i,s,l;this.setStatus({status:"submitted",error:void 0});let u=this.lastMessage,c=!1,d=!1,f=!1;try{let p={state:Zpe({lastMessage:this.state.snapshot(u),messageId:this.generateId()}),abortController:new AbortController};p.abortController.signal.addEventListener("abort",()=>{c=!0}),this.activeResponse=p;let m;if(e==="resume-stream"){let v=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:r,body:n});if(v==null){this.setStatus({status:"ready"});return}m=v}else m=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:p.abortController.signal,metadata:t,headers:r,body:n,trigger:e,messageId:o});let h=v=>this.jobExecutor.run(()=>v({state:p.state,write:()=>{var g;this.setStatus({status:"streaming"}),p.state.message.id===((g=this.lastMessage)==null?void 0:g.id)?this.state.replaceMessage(this.state.messages.length-1,p.state.message):this.state.pushMessage(p.state.message)}}));await Kpe({stream:Gpe({stream:m,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:h,onError:v=>{throw v}}),onError:v=>{throw v}}),this.setStatus({status:"ready"})}catch(p){if(c||p.name==="AbortError")return c=!0,this.setStatus({status:"ready"}),null;f=!0,p instanceof TypeError&&(p.message.toLowerCase().includes("fetch")||p.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p})}finally{try{(i=this.onFinish)==null||i.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:d,isError:f,finishReason:(a=this.activeResponse)==null?void 0:a.state.finishReason})}catch(p){console.error(p)}this.activeResponse=void 0}(s=this.sendAutomaticallyWhen)!=null&&s.call(this,{messages:this.state.messages})&&!f&&await this.makeRequest({trigger:"submit-message",messageId:(l=this.lastMessage)==null?void 0:l.id,metadata:t,headers:r,body:n})}};var X3e=Ik(()=>Wf(w.array(w.object({id:w.string(),role:w.enum(["system","user","assistant"]),metadata:w.unknown().optional(),parts:w.array(w.union([w.object({type:w.literal("text"),text:w.string(),state:w.enum(["streaming","done"]).optional(),providerMetadata:Fe.optional()}),w.object({type:w.literal("reasoning"),text:w.string(),state:w.enum(["streaming","done"]).optional(),providerMetadata:Fe.optional()}),w.object({type:w.literal("source-url"),sourceId:w.string(),url:w.string(),title:w.string().optional(),providerMetadata:Fe.optional()}),w.object({type:w.literal("source-document"),sourceId:w.string(),mediaType:w.string(),title:w.string(),filename:w.string().optional(),providerMetadata:Fe.optional()}),w.object({type:w.literal("file"),mediaType:w.string(),filename:w.string().optional(),url:w.string(),providerMetadata:Fe.optional()}),w.object({type:w.literal("step-start")}),w.object({type:w.string().startsWith("data-"),id:w.string().optional(),data:w.unknown()}),w.object({type:w.literal("dynamic-tool"),toolName:w.string(),toolCallId:w.string(),state:w.literal("input-streaming"),input:w.unknown().optional(),providerExecuted:w.boolean().optional(),output:w.never().optional(),errorText:w.never().optional()}),w.object({type:w.literal("dynamic-tool"),toolName:w.string(),toolCallId:w.string(),state:w.literal("input-available"),input:w.unknown(),providerExecuted:w.boolean().optional(),output:w.never().optional(),errorText:w.never().optional(),callProviderMetadata:Fe.optional()}),w.object({type:w.literal("dynamic-tool"),toolName:w.string(),toolCallId:w.string(),state:w.literal("output-available"),input:w.unknown(),providerExecuted:w.boolean().optional(),output:w.unknown(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),preliminary:w.boolean().optional()}),w.object({type:w.literal("dynamic-tool"),toolName:w.string(),toolCallId:w.string(),state:w.literal("output-error"),input:w.unknown(),providerExecuted:w.boolean().optional(),output:w.never().optional(),errorText:w.string(),callProviderMetadata:Fe.optional()}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("input-streaming"),providerExecuted:w.boolean().optional(),input:w.unknown().optional(),output:w.never().optional(),errorText:w.never().optional(),approval:w.never().optional()}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("input-available"),providerExecuted:w.boolean().optional(),input:w.unknown(),output:w.never().optional(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),approval:w.never().optional()}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("approval-requested"),input:w.unknown(),providerExecuted:w.boolean().optional(),output:w.never().optional(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),approval:w.object({id:w.string(),approved:w.never().optional(),reason:w.never().optional()})}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("approval-responded"),input:w.unknown(),providerExecuted:w.boolean().optional(),output:w.never().optional(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),approval:w.object({id:w.string(),approved:w.boolean(),reason:w.string().optional()})}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("output-available"),providerExecuted:w.boolean().optional(),input:w.unknown(),output:w.unknown(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),preliminary:w.boolean().optional(),approval:w.object({id:w.string(),approved:w.literal(!0),reason:w.string().optional()}).optional()}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("output-error"),providerExecuted:w.boolean().optional(),input:w.unknown(),output:w.never().optional(),errorText:w.string(),callProviderMetadata:Fe.optional(),approval:w.object({id:w.string(),approved:w.literal(!0),reason:w.string().optional()}).optional()}),w.object({type:w.string().startsWith("tool-"),toolCallId:w.string(),state:w.literal("output-denied"),providerExecuted:w.boolean().optional(),input:w.unknown(),output:w.never().optional(),errorText:w.never().optional(),callProviderMetadata:Fe.optional(),approval:w.object({id:w.string(),approved:w.literal(!1),reason:w.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var dD=(e,t)=>{if(t==null)return[];let r=e.findIndex(n=>n.id===t);if(r===-1)throw new Error("useVercelAIThreadState: Message not found. This is likely an internal bug in assistant-ui.");for(;e[r+1]?.role==="assistant";)r++;return e.slice(0,r+1)};var fD=e=>{let r=[...e.content.filter(n=>n.type!=="file"),...e.attachments?.flatMap(n=>n.content.map(o=>({...o,filename:n.name})))??[]].map(n=>{switch(n.type){case"text":return{type:"text",text:n.text};case"image":return{type:"file",url:n.image,...n.filename&&{filename:n.filename},mediaType:"image/png"};case"file":return{type:"file",url:n.data,mediaType:n.mimeType,...n.filename&&{filename:n.filename}};default:throw new Error(`Unsupported part type: ${n.type}`)}});return{role:e.role,parts:r}};var ime=e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>t(n.result),n.onerror=o=>r(o),n.readAsDataURL(e)}),rZ={accept:"image/*, text/plain, text/html, text/markdown, text/csv, text/xml, text/json, text/css",async add({file:e}){return{id:Kg(),type:e.type.startsWith("image/")?"image":"file",name:e.name,file:e,contentType:e.type,content:[],status:{type:"requires-action",reason:"composer-send"}}},async send(e){return{...e,status:{type:"complete"},content:[{type:"file",mimeType:e.contentType,filename:e.name,data:await ime(e.file)}]}},async remove(){}};var pD=e=>po(e);function sme(e){return e.replace(/[}\]"]+$/,"")}var mD=(e,t)=>!e.parts||e.parts.length===0?[]:e.parts.filter(r=>r.type!=="step-start"&&r.type!=="file").map(r=>{let n=r.type;if(n==="text")return{type:"text",text:r.text};if(n==="reasoning")return{type:"reasoning",text:r.text};if(ll(r)){let o=n.replace("tool-",""),a=r.toolCallId,i={},s,l=!1;r.state==="input-streaming"||r.state==="input-available"?i=r.input||{}:r.state==="output-available"?(i=r.input||{},s=r.output):r.state==="output-error"&&(i=r.input||{},l=!0,s={error:r.errorText});let u=JSON.stringify(i);r.state==="input-streaming"&&(u=sme(u));let c=t.toolStatuses?.[a];return{type:"tool-call",toolName:o,toolCallId:a,argsText:u,args:i,result:s,isError:l,...c?.type==="interrupt"&&{interrupt:c.payload,status:{type:"requires-action",reason:"interrupt"}}}}if(n==="dynamic-tool"){let o=r.toolName,a=r.toolCallId,i={},s,l=!1;r.state==="input-streaming"||r.state==="input-available"?i=r.input||{}:r.state==="output-available"?(i=r.input||{},s=r.output):r.state==="output-error"&&(i=r.input||{},l=!0,s={error:r.errorText});let u=t.toolStatuses?.[a];return{type:"tool-call",toolName:o,toolCallId:a,argsText:JSON.stringify(i),args:i,result:s,isError:l,...u?.type==="interrupt"&&{interrupt:u.payload,status:{type:"requires-action",reason:"interrupt"}}}}return n==="source-url"?{type:"source",sourceType:"url",id:r.sourceId,url:r.url,title:r.title||""}:n==="source-document"?(console.warn(`Source document part type ${n} is not yet supported in conversion`),null):n.startsWith("data-")?{type:"data",name:n.substring(5),data:r.data}:(console.warn(`Unsupported message part type: ${n}`),null)}).filter(Boolean),hD=wL((e,t)=>{let r=new Date;switch(e.role){case"user":return{role:"user",id:e.id,createdAt:r,content:mD(e,t),attachments:e.parts?.filter(n=>n.type==="file").map((n,o)=>({id:o.toString(),type:n.mediaType.startsWith("image/")?"image":"file",name:n.filename??"file",content:[n.mediaType.startsWith("image/")?{type:"image",image:n.url,filename:n.filename}:{type:"file",filename:n.filename,data:n.url,mimeType:n.mediaType}],contentType:n.mediaType??"unknown/unknown",status:{type:"complete"}}))};case"system":return{role:"system",id:e.id,createdAt:r,content:mD(e,t)};case"assistant":return{role:"assistant",id:e.id,createdAt:r,content:mD(e,t),metadata:{unstable_annotations:e.annotations,unstable_data:Array.isArray(e.data)?e.data:e.data?[e.data]:void 0,custom:{}}};default:return console.warn(`Unsupported message role: ${e.role}`),[]}});var nZ={format:"ai-sdk/v5",encode({message:{id:e,parts:t,...r}}){return{...r,parts:t.filter(n=>n.type!=="file")}},decode(e){return{parentId:e.parent_id,message:{id:e.id,...e.content}}},getId(e){return e.id}};var ko=S(A(),1),{MessageRepository:lme}=zs,ume=(e,t)=>({headId:t.headId,messages:t.messages.map(r=>{let n=e([r.message])[0];return{...r,message:n}})}),oZ=(e,t,r,n,o)=>{let a=(0,ko.useRef)(!1),i=Q(),s=(0,ko.useCallback)(()=>i.threadListItem.source?i.threadListItem():null,[i]),[l,u]=(0,ko.useState)(!1),c=(0,ko.useRef)(new Set),d=(0,ko.useRef)(()=>o);return(0,ko.useEffect)(()=>{d.current=o}),(0,ko.useEffect)(()=>{if(!t||a.current)return;let f=async()=>{u(!0);try{let p=await t.withFormat?.(n).load();if(p&&p.messages.length>0){let m=ume(r,p);e.current.thread.import(m);let h=new lme;h.import(m);let v=h.getMessages();d.current(v.map(po).flat()),c.current=new Set(m.messages.map(g=>g.message.id))}}catch(p){console.error("Failed to load message history:",p)}finally{u(!1)}};if(!a.current){if(a.current=!0,!s()?.getState().remoteId){u(!1);return}f()}},[i,t,n,r,e,s]),(0,ko.useEffect)(()=>e.current.thread.subscribe(async()=>{let{messages:f,isRunning:p}=e.current.thread.getState();if(!p)for(let m=0;m<f.length;m++){let h=f[m];if(h.status===void 0||h.status.type==="complete"||h.status.type==="incomplete"){if(c.current.has(h.id))continue;c.current.add(h.id);let v=m>0?f[m-1].id:null;await t?.withFormat?.(n).append({parentId:v,message:po(h)[0]})}}}),[t,n,e]),l};var aZ=(e,{adapters:t,toCreateMessage:r,cancelPendingToolCallsOnSend:n=!0}={})=>{let o=Yb(),[a,i]=(0,Yg.useState)({}),s=Object.values(a).some(h=>h?.type==="executing"),l=e.status==="submitted"||e.status==="streaming"||s,u=hD.useThreadMessages({isRunning:l,messages:e.messages,metadata:(0,Yg.useMemo)(()=>({toolStatuses:a,...e.error&&{error:e.error.message}}),[a,e.error])}),[c]=(0,Yg.useState)(()=>({get current(){return m}})),d=zs.useToolInvocations({state:{messages:u,isRunning:l},getTools:()=>c.current.thread.getModelContext().tools,onResult:h=>{h.type==="add-tool-result"&&e.addToolResult({tool:h.toolName,toolCallId:h.toolCallId,output:h.result})},setToolStatuses:i}),f=oZ(c,t?.history??o?.history,hD.toThreadMessages,nZ,h=>{e.setMessages(h)}),p=async()=>{n&&(await d.abort(),e.setMessages(h=>{let v=h.at(-1);if(v?.role!=="assistant")return h;let g=!1,y=v.parts?.map(x=>!ll(x)||x.state==="output-available"||x.state==="output-error"?x:(g=!0,{...x,state:"output-error",errorText:"User cancelled tool call by sending a new message."}));return g?[...h.slice(0,-1),{...v,parts:y}]:h}))},m=tL({isRunning:l,messages:u,setMessages:h=>e.setMessages(h.map(pD).filter(Boolean).flat()),onImport:h=>e.setMessages(h.map(pD).filter(Boolean).flat()),onCancel:async()=>{e.stop(),await d.abort()},onNew:async h=>{await p();let v=(r??fD)(h);await e.sendMessage(v,{metadata:h.runConfig})},onEdit:async h=>{let v=dD(e.messages,h.parentId);e.setMessages(v);let g=(r??fD)(h);await e.sendMessage(g,{metadata:h.runConfig})},onReload:async(h,v)=>{let g=dD(e.messages,h);e.setMessages(g),await e.regenerate({metadata:v.runConfig})},onAddToolResult:({toolCallId:h,result:v,isError:g})=>{g?e.addToolOutput({state:"output-error",tool:h,toolCallId:h,errorText:typeof v=="string"?v:JSON.stringify(v)}):e.addToolOutput({state:"output-available",tool:h,toolCallId:h,output:v})},onResumeToolCall:h=>d.resume(h.toolCallId,h.payload),adapters:{attachments:rZ,...o,...t},isLoading:f});return m};var ia=S(A(),1);var cZ=S(sZ(),1);var ry=S(A(),1);var Lk=S(A(),1);var uZ=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},wt=(e,t,r)=>(uZ(e,t,"read from private field"),r?r.call(e):t.get(e)),Ba=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ul=(e,t,r,n)=>(uZ(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function dme(e,t){return t!=null?(0,cZ.default)(e,t):e}var Co,Tk,Pk,Qg,ey,ty,Zf,gD,yD,fme=class{constructor(e=[]){Ba(this,Co,void 0),Ba(this,Tk,"ready"),Ba(this,Pk,void 0),Ba(this,Qg,new Set),Ba(this,ey,new Set),Ba(this,ty,new Set),this.pushMessage=t=>{ul(this,Co,wt(this,Co).concat(t)),wt(this,Zf).call(this)},this.popMessage=()=>{ul(this,Co,wt(this,Co).slice(0,-1)),wt(this,Zf).call(this)},this.replaceMessage=(t,r)=>{ul(this,Co,[...wt(this,Co).slice(0,t),this.snapshot(r),...wt(this,Co).slice(t+1)]),wt(this,Zf).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{let n=r?dme(t,r):t;return wt(this,Qg).add(n),()=>{wt(this,Qg).delete(n)}},this["~registerStatusCallback"]=t=>(wt(this,ey).add(t),()=>{wt(this,ey).delete(t)}),this["~registerErrorCallback"]=t=>(wt(this,ty).add(t),()=>{wt(this,ty).delete(t)}),Ba(this,Zf,()=>{wt(this,Qg).forEach(t=>t())}),Ba(this,gD,()=>{wt(this,ey).forEach(t=>t())}),Ba(this,yD,()=>{wt(this,ty).forEach(t=>t())}),ul(this,Co,e)}get status(){return wt(this,Tk)}set status(e){ul(this,Tk,e),wt(this,gD).call(this)}get error(){return wt(this,Pk)}set error(e){ul(this,Pk,e),wt(this,yD).call(this)}get messages(){return wt(this,Co)}set messages(e){ul(this,Co,[...e]),wt(this,Zf).call(this)}};Co=new WeakMap;Tk=new WeakMap;Pk=new WeakMap;Qg=new WeakMap;ey=new WeakMap;ty=new WeakMap;Zf=new WeakMap;gD=new WeakMap;yD=new WeakMap;var Gf,lZ=class extends tZ{constructor({messages:e,...t}){let r=new fme(e);super({...t,state:r}),Ba(this,Gf,void 0),this["~registerMessagesCallback"]=(n,o)=>wt(this,Gf)["~registerMessagesCallback"](n,o),this["~registerStatusCallback"]=n=>wt(this,Gf)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>wt(this,Gf)["~registerErrorCallback"](n),ul(this,Gf,r)}};Gf=new WeakMap;function dZ({experimental_throttle:e,resume:t=!1,...r}={}){let n=(0,ia.useRef)("chat"in r?r.chat:new lZ(r));("chat"in r&&r.chat!==n.current||"id"in r&&n.current.id!==r.id)&&(n.current="chat"in r?r.chat:new lZ(r));let a=(0,ia.useCallback)(c=>n.current["~registerMessagesCallback"](c,e),[e,n.current.id]),i=(0,ia.useSyncExternalStore)(a,()=>n.current.messages,()=>n.current.messages),s=(0,ia.useSyncExternalStore)(n.current["~registerStatusCallback"],()=>n.current.status,()=>n.current.status),l=(0,ia.useSyncExternalStore)(n.current["~registerErrorCallback"],()=>n.current.error,()=>n.current.error),u=(0,ia.useCallback)(c=>{typeof c=="function"&&(c=c(n.current.messages)),n.current.messages=c},[n]);return(0,ia.useEffect)(()=>{t&&n.current.resumeStream()},[t,n]),{id:n.current.id,messages:i,setMessages:u,sendMessage:n.current.sendMessage,regenerate:n.current.regenerate,clearError:n.current.clearError,stop:n.current.stop,error:l,resumeStream:n.current.resumeStream,status:s,addToolResult:n.current.addToolOutput,addToolOutput:n.current.addToolOutput}}var pme=e=>Object.fromEntries(Object.entries(e).map(([t,r])=>[t,{...r.description?{description:r.description}:void 0,parameters:r.parameters instanceof uD.ZodType?uD.toJSONSchema(r.parameters):r.parameters}])),mme=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>!t.disabled&&t.type!=="backend")),cl=class extends cD{constructor(r){super({...r,prepareSendMessagesRequest:async n=>{let o=this.runtime?.thread.getModelContext(),a=(await this.runtime?.threads.mainItem.initialize())?.remoteId??n.id,i={...n,body:{callSettings:o?.callSettings,system:o?.system,tools:pme(mme(o?.tools??{})),...n?.body}},s=await r?.prepareSendMessagesRequest?.(i);return{...s,body:s?.body??{...i.body,id:a,messages:n.messages,trigger:n.trigger,messageId:n.messageId,metadata:n.requestMetadata}}}});P(this,"runtime")}setRuntime(r){this.runtime=r}};var Kf=S(A(),1),hme=e=>{let t=(0,Kf.useRef)(e);return(0,Kf.useEffect)(()=>{t.current=e}),(0,Kf.useMemo)(()=>new Proxy(t.current,{get(n,o){let a=t.current[o];return typeof a=="function"?a.bind(t.current):a}}),[])},gme=e=>{let{adapters:t,transport:r,toCreateMessage:n,...o}=e??{},a=hme(r??new cl),i=O(({threadListItem:u})=>u.id),s=dZ({...o,id:i,transport:a}),l=aZ(s,{adapters:t,...n&&{toCreateMessage:n}});return a instanceof cl&&a.setRuntime(l),l},xD=({cloud:e,...t}={})=>{let r=TL({cloud:e});return Lh({runtimeHook:function(){return gme(t)},adapter:r,allowNesting:!0})};var Ln=S(A()),Xk=S(A());var yme=!1;function xme(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function vme(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fZ=(function(){function e(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!yme:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(vme(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=xme(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})();var Er="-ms-",ny="-moz-",qe="-webkit-",Ek="comm",Jf="rule",Xf="decl";var pZ="@import";var Ak="@keyframes";var mZ="@layer";var hZ=Math.abs,Zu=String.fromCharCode,gZ=Object.assign;function yZ(e,t){return Wt(e,0)^45?(((t<<2^Wt(e,0))<<2^Wt(e,1))<<2^Wt(e,2))<<2^Wt(e,3):0}function Rk(e){return e.trim()}function vD(e,t){return(e=t.exec(e))?e[0]:e}function Be(e,t,r){return e.replace(t,r)}function oy(e,t){return e.indexOf(t)}function Wt(e,t){return e.charCodeAt(t)|0}function dl(e,t,r){return e.slice(t,r)}function an(e){return e.length}function Yf(e){return e.length}function Qf(e,t){return t.push(e),e}function bD(e,t){return e.map(t).join("")}var Mk=1,ep=1,xZ=0,sn=0,rr=0,rp="";function ay(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Mk,column:ep,length:i,return:""}}function np(e,t){return gZ(ay("",null,null,"",null,null,0),e,{length:-e.length},t)}function vZ(){return rr}function bZ(){return rr=sn>0?Wt(rp,--sn):0,ep--,rr===10&&(ep=1,Mk--),rr}function ln(){return rr=sn<xZ?Wt(rp,sn++):0,ep++,rr===10&&(ep=1,Mk++),rr}function _o(){return Wt(rp,sn)}function iy(){return sn}function op(e,t){return dl(rp,e,t)}function tp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $k(e){return Mk=ep=1,xZ=an(rp=e),sn=0,[]}function Dk(e){return rp="",e}function ap(e){return Rk(op(sn-1,wD(e===91?e+2:e===40?e+1:e)))}function wZ(e){for(;(rr=_o())&&rr<33;)ln();return tp(e)>2||tp(rr)>3?"":" "}function SZ(e,t){for(;--t&&ln()&&!(rr<48||rr>102||rr>57&&rr<65||rr>70&&rr<97););return op(e,iy()+(t<6&&_o()==32&&ln()==32))}function wD(e){for(;ln();)switch(rr){case e:return sn;case 34:case 39:e!==34&&e!==39&&wD(rr);break;case 40:e===41&&wD(e);break;case 92:ln();break}return sn}function IZ(e,t){for(;ln()&&e+rr!==57;)if(e+rr===84&&_o()===47)break;return"/*"+op(t,sn-1)+"*"+Zu(e===47?e:ln())}function kZ(e){for(;!tp(_o());)ln();return op(e,sn)}function TZ(e){return Dk(Ok("",null,null,null,[""],e=$k(e),0,[0],e))}function Ok(e,t,r,n,o,a,i,s,l){for(var u=0,c=0,d=i,f=0,p=0,m=0,h=1,v=1,g=1,y=0,x="",b=o,_=a,I=n,C=x;v;)switch(m=y,y=ln()){case 40:if(m!=108&&Wt(C,d-1)==58){oy(C+=Be(ap(y),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:C+=ap(y);break;case 9:case 10:case 13:case 32:C+=wZ(m);break;case 92:C+=SZ(iy()-1,7);continue;case 47:switch(_o()){case 42:case 47:Qf(bme(IZ(ln(),iy()),t,r),l);break;default:C+="/"}break;case 123*h:s[u++]=an(C)*g;case 125*h:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:g==-1&&(C=Be(C,/\f/g,"")),p>0&&an(C)-d&&Qf(p>32?_Z(C+";",n,r,d-1):_Z(Be(C," ","")+";",n,r,d-2),l);break;case 59:C+=";";default:if(Qf(I=CZ(C,t,r,u,c,o,s,x,b=[],_=[],d),a),y===123)if(c===0)Ok(C,t,I,I,b,a,d,s,_);else switch(f===99&&Wt(C,3)===110?100:f){case 100:case 108:case 109:case 115:Ok(e,I,I,n&&Qf(CZ(e,I,I,0,0,o,s,x,o,b=[],d),_),o,_,d,s,n?b:_);break;default:Ok(C,I,I,I,[""],_,0,s,_)}}u=c=p=0,h=g=1,x=C="",d=i;break;case 58:d=1+an(C),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&bZ()==125)continue}switch(C+=Zu(y),y*h){case 38:g=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(an(C)-1)*g,g=1;break;case 64:_o()===45&&(C+=ap(ln())),f=_o(),c=d=an(x=C+=kZ(iy())),y++;break;case 45:m===45&&an(C)==2&&(h=0)}}return a}function CZ(e,t,r,n,o,a,i,s,l,u,c){for(var d=o-1,f=o===0?a:[""],p=Yf(f),m=0,h=0,v=0;m<n;++m)for(var g=0,y=dl(e,d+1,d=hZ(h=i[m])),x=e;g<p;++g)(x=Rk(h>0?f[g]+" "+y:Be(y,/&\f/g,f[g])))&&(l[v++]=x);return ay(e,t,r,o===0?Jf:s,l,u,c)}function bme(e,t,r){return ay(e,t,r,Ek,Zu(vZ()),dl(e,2,-2),0)}function _Z(e,t,r,n){return ay(e,t,r,Xf,dl(e,0,n),dl(e,n+1,-1),n)}function Gu(e,t){for(var r="",n=Yf(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function PZ(e,t,r,n){switch(e.type){case mZ:if(e.children.length)break;case pZ:case Xf:return e.return=e.return||e.value;case Ek:return"";case Ak:return e.return=e.value+"{"+Gu(e.children,n)+"}";case Jf:e.value=e.props.join(",")}return an(r=Gu(e.children,n))?e.return=e.value+"{"+r+"}":""}function LZ(e){var t=Yf(e);return function(r,n,o,a){for(var i="",s=0;s<t;s++)i+=e[s](r,n,o,a)||"";return i}}function EZ(e){return function(t){t.root||(t=t.return)&&e(t)}}var SD=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=t(n);return r.set(n,o),o}};zk();var wme=function(t,r,n){for(var o=0,a=0;o=a,a=_o(),o===38&&a===12&&(r[n]=1),!tp(a);)ln();return op(t,sn)},Sme=function(t,r){var n=-1,o=44;do switch(tp(o)){case 0:o===38&&_o()===12&&(r[n]=1),t[n]+=wme(sn-1,r,n);break;case 2:t[n]+=ap(o);break;case 4:if(o===44){t[++n]=_o()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Zu(o)}while(o=ln());return t},Ime=function(t,r){return Dk(Sme($k(t),r))},AZ=new WeakMap,kme=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!AZ.get(n))&&!o){AZ.set(t,!0);for(var a=[],i=Ime(r,a),s=n.props,l=0,u=0;l<i.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=a[l]?i[l].replace(/&\f/g,s[c]):s[c]+" "+i[l]}}},Cme=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function RZ(e,t){switch(yZ(e,t)){case 5103:return qe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return qe+e+ny+e+Er+e+e;case 6828:case 4268:return qe+e+Er+e+e;case 6165:return qe+e+Er+"flex-"+e+e;case 5187:return qe+e+Be(e,/(\w+).+(:[^]+)/,qe+"box-$1$2"+Er+"flex-$1$2")+e;case 5443:return qe+e+Er+"flex-item-"+Be(e,/flex-|-self/,"")+e;case 4675:return qe+e+Er+"flex-line-pack"+Be(e,/align-content|flex-|-self/,"")+e;case 5548:return qe+e+Er+Be(e,"shrink","negative")+e;case 5292:return qe+e+Er+Be(e,"basis","preferred-size")+e;case 6060:return qe+"box-"+Be(e,"-grow","")+qe+e+Er+Be(e,"grow","positive")+e;case 4554:return qe+Be(e,/([^-])(transform)/g,"$1"+qe+"$2")+e;case 6187:return Be(Be(Be(e,/(zoom-|grab)/,qe+"$1"),/(image-set)/,qe+"$1"),e,"")+e;case 5495:case 3959:return Be(e,/(image-set\([^]*)/,qe+"$1$`$1");case 4968:return Be(Be(e,/(.+:)(flex-)?(.*)/,qe+"box-pack:$3"+Er+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+qe+e+e;case 4095:case 3583:case 4068:case 2532:return Be(e,/(.+)-inline(.+)/,qe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(an(e)-1-t>6)switch(Wt(e,t+1)){case 109:if(Wt(e,t+4)!==45)break;case 102:return Be(e,/(.+:)(.+)-([^]+)/,"$1"+qe+"$2-$3$1"+ny+(Wt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~oy(e,"stretch")?RZ(Be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Wt(e,t+1)!==115)break;case 6444:switch(Wt(e,an(e)-3-(~oy(e,"!important")&&10))){case 107:return Be(e,":",":"+qe)+e;case 101:return Be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+qe+(Wt(e,14)===45?"inline-":"")+"box$3$1"+qe+"$2$3$1"+Er+"$2box$3")+e}break;case 5936:switch(Wt(e,t+11)){case 114:return qe+e+Er+Be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return qe+e+Er+Be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return qe+e+Er+Be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return qe+e+Er+e+e}return e}var _me=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Xf:t.return=RZ(t.value,t.length);break;case Ak:return Gu([np(t,{value:Be(t.value,"@","@"+qe)})],o);case Jf:if(t.length)return bD(t.props,function(a){switch(vD(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Gu([np(t,{props:[Be(a,/:(read-\w+)/,":"+ny+"$1")]})],o);case"::placeholder":return Gu([np(t,{props:[Be(a,/:(plac\w+)/,":"+qe+"input-$1")]}),np(t,{props:[Be(a,/:(plac\w+)/,":"+ny+"$1")]}),np(t,{props:[Be(a,/:(plac\w+)/,Er+"input-$1")]})],o)}return""})}},Tme=[_me],Fk=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||Tme,a={},i,s=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),g=1;g<v.length;g++)a[v[g]]=!0;s.push(h)});var l,u=[kme,Cme];{var c,d=[PZ,EZ(function(h){c.insert(h)})],f=LZ(u.concat(o,d)),p=function(v){return Gu(TZ(v),f)};l=function(v,g,y,x){c=y,p(v?v+"{"+g.styles+"}":g.styles),x&&(m.inserted[g.name]=!0)}}var m={key:r,sheet:new fZ({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return m.sheet.hydrate(s),m};function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ip.apply(null,arguments)}var Bme=!0;function sy(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var sp=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Bme===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},ly=function(t,r,n){sp(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function qZ(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var HZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};zk();var jme=!1,Ume=/[A-Z]|^ms/g,Vme=/_EMO_([^_]+?)_([^]*?)_EMO_/g,KZ=function(t){return t.charCodeAt(1)===45},WZ=function(t){return t!=null&&typeof t!="boolean"},PD=Nk(function(e){return KZ(e)?e:e.replace(Ume,"-$&").toLowerCase()}),ZZ=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Vme,function(n,o,a){return ja={name:o,styles:a,next:ja},o})}return HZ[t]!==1&&!KZ(t)&&typeof r=="number"&&r!==0?r+"px":r},qme="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function uy(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return ja={name:o.name,styles:o.styles,next:ja},o.name;var a=r;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)ja={name:i.name,styles:i.styles,next:ja},i=i.next;var s=a.styles+";";return s}return Hme(e,t,r)}case"function":{if(e!==void 0){var l=ja,u=r(e);return ja=l,uy(e,t,u)}break}}var c=r;if(t==null)return c;var d=t[c];return d!==void 0?d:c}function Hme(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=uy(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object"){var s=i;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":WZ(s)&&(n+=PD(a)+":"+ZZ(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&jme)throw new Error(qme);if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)WZ(i[l])&&(n+=PD(a)+":"+ZZ(a,i[l])+";");else{var u=uy(e,t,i);switch(a){case"animation":case"animationName":{n+=PD(a)+":"+u+";";break}default:n+=a+"{"+u+"}"}}}}return n}var GZ=/label:\s*([^\s;{]+)\s*(;|$)/g,ja;function cy(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";ja=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,o+=uy(r,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=uy(r,t,e[s]),n){var l=a;o+=l[s]}GZ.lastIndex=0;for(var u="",c;(c=GZ.exec(o))!==null;)u+="-"+c[1];var d=qZ(o)+u;return{name:d,styles:o,next:ja}}var Jk=S(A()),Wme=function(t){return t()},Zme=Jk.useInsertionEffect?Jk.useInsertionEffect:!1,dy=Zme||Wme;var JZ=!1,XZ=Ln.createContext(typeof HTMLElement<"u"?Fk({key:"css"}):null),ED=XZ.Provider;var fy=function(t){return(0,Xk.forwardRef)(function(r,n){var o=(0,Xk.useContext)(XZ);return t(r,o,n)})},Ku=Ln.createContext({});var Gme=function(t,r){if(typeof r=="function"){var n=r(t);return n}return ip({},t,r)},Kme=SD(function(e){return SD(function(t){return Gme(e,t)})}),AD=function(t){var r=Ln.useContext(Ku);return t.theme!==r&&(r=Kme(r)(t.theme)),Ln.createElement(Ku.Provider,{value:r},t.children)};var Yk={}.hasOwnProperty,LD="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",YZ=function(t,r){var n={};for(var o in r)Yk.call(r,o)&&(n[o]=r[o]);return n[LD]=t,n},Jme=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return sp(r,n,o),dy(function(){return ly(r,n,o)}),null},Xme=fy(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[LD],a=[n],i="";typeof e.className=="string"?i=sy(t.registered,a,e.className):e.className!=null&&(i=e.className+" ");var s=cy(a,void 0,Ln.useContext(Ku));i+=t.key+"-"+s.name;var l={};for(var u in e)Yk.call(e,u)&&u!=="css"&&u!==LD&&!JZ&&(l[u]=e[u]);return l.className=i,r&&(l.ref=r),Ln.createElement(Ln.Fragment,null,Ln.createElement(Jme,{cache:t,serialized:s,isStringTag:typeof o=="string"}),Ln.createElement(o,l))}),QZ=Xme;var lp=S(A());var jHe=S(VZ()),eG=function(t,r){var n=arguments;if(r==null||!Yk.call(r,"css"))return lp.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=QZ,a[1]=YZ(t,r);for(var i=2;i<o;i++)a[i]=n[i];return lp.createElement.apply(null,a)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(eG||(eG={}));function tG(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var Yme=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qme=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ehe={};function Qk(e,t){return((t||ehe).jsx?Qme:Yme).test(e)}var the=/[ \t\n\f\r]/g;function RD(e){return typeof e=="object"?e.type==="text"?rG(e.value):!1:rG(e)}function rG(e){return e.replace(the,"")===""}var Ni=class{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}};Ni.prototype.normal={};Ni.prototype.property={};Ni.prototype.space=void 0;function MD(e,t){let r={},n={};for(let o of e)Object.assign(r,o.property),Object.assign(n,o.normal);return new Ni(r,n,t)}function py(e){return e.toLowerCase()}var wr=class{constructor(t,r){this.attribute=r,this.property=t}};wr.prototype.attribute="";wr.prototype.booleanish=!1;wr.prototype.boolean=!1;wr.prototype.commaOrSpaceSeparated=!1;wr.prototype.commaSeparated=!1;wr.prototype.defined=!1;wr.prototype.mustUseProperty=!1;wr.prototype.number=!1;wr.prototype.overloadedBoolean=!1;wr.prototype.property="";wr.prototype.spaceSeparated=!1;wr.prototype.space=void 0;var my={};Et(my,{boolean:()=>Se,booleanish:()=>Ut,commaOrSpaceSeparated:()=>En,commaSeparated:()=>fl,number:()=>Z,overloadedBoolean:()=>eC,spaceSeparated:()=>rt});var rhe=0,Se=Ju(),Ut=Ju(),eC=Ju(),Z=Ju(),rt=Ju(),fl=Ju(),En=Ju();function Ju(){return 2**++rhe}var $D=Object.keys(my),Xu=class extends wr{constructor(t,r,n,o){let a=-1;if(super(t,r),nG(this,"space",o),typeof n=="number")for(;++a<$D.length;){let i=$D[a];nG(this,$D[a],(n&my[i])===my[i])}}};Xu.prototype.defined=!0;function nG(e,t,r){r&&(e[t]=r)}function To(e){let t={},r={};for(let[n,o]of Object.entries(e.properties)){let a=new Xu(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[py(n)]=n,r[py(a.attribute)]=n}return new Ni(t,r,e.space)}var DD=To({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:rt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:Z,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:rt,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Ut,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function tC(e,t){return t in e?e[t]:t}function rC(e,t){return tC(e,t.toLowerCase())}var oG=To({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fl,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:Se,allowPaymentRequest:Se,allowUserMedia:Se,alt:null,as:null,async:Se,autoCapitalize:null,autoComplete:rt,autoFocus:Se,autoPlay:Se,blocking:rt,capture:null,charSet:null,checked:Se,cite:null,className:rt,cols:Z,colSpan:null,content:null,contentEditable:Ut,controls:Se,controlsList:rt,coords:Z|fl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Se,defer:Se,dir:null,dirName:null,disabled:Se,download:eC,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Se,formTarget:null,headers:rt,height:Z,hidden:eC,high:Z,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:Se,inputMode:null,integrity:null,is:null,isMap:Se,itemId:null,itemProp:rt,itemRef:rt,itemScope:Se,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Se,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:Se,muted:Se,name:null,nonce:null,noModule:Se,noValidate:Se,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Se,optimum:Z,pattern:null,ping:rt,placeholder:null,playsInline:Se,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Se,referrerPolicy:null,rel:rt,required:Se,reversed:Se,rows:Z,rowSpan:Z,sandbox:rt,scope:null,scoped:Se,seamless:Se,selected:Se,shadowRootClonable:Se,shadowRootDelegatesFocus:Se,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:Se,useMap:null,value:Ut,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Se,declare:Se,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:Se,noHref:Se,noShade:Se,noWrap:Se,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Se,disableRemotePlayback:Se,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:rC});var aG=To({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:En,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:rt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:Se,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fl,g2:fl,glyphName:fl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tC});var OD=To({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var ND=To({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rC});var zD=To({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var FD={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var nhe=/[A-Z]/g,iG=/-[a-z]/g,ohe=/^data[-\w.:]+$/i;function BD(e,t){let r=py(t),n=t,o=wr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ohe.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(iG,ihe);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!iG.test(a)){let i=a.replace(nhe,ahe);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Xu}return new o(n,t)}function ahe(e){return"-"+e.toLowerCase()}function ihe(e){return e.charAt(1).toUpperCase()}var sG=MD([DD,oG,OD,ND,zD],"html"),nC=MD([DD,aG,OD,ND,zD],"svg");function lG(e){return e.join(" ").trim()}var IG=S(vG(),1);var aC=bG("end"),up=bG("start");function bG(e){return t;function t(r){let n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function VD(e){let t=up(e),r=aC(e);if(t&&r)return{start:t,end:r}}function pl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wG(e.position):"start"in e||"end"in e?wG(e):"line"in e||"column"in e?qD(e):""}function qD(e){return SG(e&&e.line)+":"+SG(e&&e.column)}function wG(e){return qD(e&&e.start)+"-"+qD(e&&e.end)}function SG(e){return e&&typeof e=="number"?e:1}var Zt=class extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?o=t:!a.cause&&t&&(i=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=pl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;var HD={}.hasOwnProperty,Rhe=new Map,Mhe=/[A-Z]/g,$he=new Set(["table","tbody","thead","tfoot","tr"]),Dhe=new Set(["td","th"]),kG="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function WD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Vhe(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=Uhe(r,t.jsx,t.jsxs)}let o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nC:sG,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=CG(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function CG(e,t,r){if(t.type==="element")return Ohe(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Nhe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Fhe(e,t,r);if(t.type==="mdxjsEsm")return zhe(e,t);if(t.type==="root")return Bhe(e,t,r);if(t.type==="text")return jhe(e,t)}function Ohe(e,t,r){let n=e.schema,o=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=nC,e.schema=o),e.ancestors.push(t);let a=TG(e,t.tagName,!1),i=qhe(e,t),s=GD(e,t);return $he.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!RD(l):!0})),_G(e,i,a,t),ZD(i,s),e.ancestors.pop(),e.schema=n,e.create(t,a,i,r)}function Nhe(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}gy(e,t.position)}function zhe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gy(e,t.position)}function Fhe(e,t,r){let n=e.schema,o=n;t.name==="svg"&&n.space==="html"&&(o=nC,e.schema=o),e.ancestors.push(t);let a=t.name===null?e.Fragment:TG(e,t.name,!0),i=Hhe(e,t),s=GD(e,t);return _G(e,i,a,t),ZD(i,s),e.ancestors.pop(),e.schema=n,e.create(t,a,i,r)}function Bhe(e,t,r){let n={};return ZD(n,GD(e,t)),e.create(t,e.Fragment,n,r)}function jhe(e,t){return t.value}function _G(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function ZD(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function Uhe(e,t,r){return n;function n(o,a,i,s){let u=Array.isArray(i.children)?r:t;return s?u(a,i,s):u(a,i)}}function Vhe(e,t){return r;function r(n,o,a,i){let s=Array.isArray(a.children),l=up(n);return t(o,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function qhe(e,t){let r={},n,o;for(o in t.properties)if(o!=="children"&&HD.call(t.properties,o)){let a=Whe(e,o,t.properties[o]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&Dhe.has(t.tagName)?n=s:r[i]=s}}if(n){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Hhe(e,t){let r={};for(let n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){let a=n.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else gy(e,t.position);else{let o=n.name,a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){let s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else gy(e,t.position);else a=n.value===null?!0:n.value;r[o]=a}return r}function GD(e,t){let r=[],n=-1,o=e.passKeys?new Map:Rhe;for(;++n<t.children.length;){let a=t.children[n],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let u=o.get(l)||0;i=l+"-"+u,o.set(l,u+1)}}let s=CG(e,a,i);s!==void 0&&r.push(s)}return r}function Whe(e,t,r){let n=BD(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?tG(r):lG(r)),n.property==="style"){let o=typeof r=="object"?r:Zhe(e,String(r));return e.stylePropertyNameCase==="css"&&(o=Ghe(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?FD[n.property]||n.property:n.attribute,r]}}function Zhe(e,t){try{return(0,IG.default)(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};let n=r,o=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=kG+"#cannot-parse-style-attribute",o}}function TG(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){let o=t.split("."),a=-1,i;for(;++a<o.length;){let s=Qk(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}n=i}else n=Qk(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){let o=n.value;return HD.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);gy(e)}function gy(e,t){let r=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=kG+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Ghe(e){let t={},r;for(r in e)HD.call(e,r)&&(t[Khe(r)]=e[r]);return t}function Khe(e){let t=e.replace(Mhe,Jhe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jhe(e){return"-"+e.toLowerCase()}var yy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var mp=S(D(),1),Q8=S(A(),1);var Xhe={};function Qu(e,t){let r=t||Xhe,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return LG(e,n,o)}function LG(e,t,r){if(Yhe(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return PG(e.children,t,r)}return Array.isArray(e)?PG(e,t,r):""}function PG(e,t,r){let n=[],o=-1;for(;++o<e.length;)n[o]=LG(e[o],t,r);return n.join("")}function Yhe(e){return!!(e&&typeof e=="object")}var EG=document.createElement("i");function cp(e){let t="&"+e+";";EG.innerHTML=t;let r=EG.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Gt(e,t,r,n){let o=e.length,a=0,i;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)i=Array.from(n),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<n.length;)i=n.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function un(e,t){return e.length>0?(Gt(e,e.length,0,t),e):t}var AG={}.hasOwnProperty;function iC(e){let t={},r=-1;for(;++r<e.length;)Qhe(t,e[r]);return t}function Qhe(e,t){let r;for(r in t){let o=(AG.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){AG.call(o,i)||(o[i]=[]);let s=a[i];ege(o[i],Array.isArray(s)?s:s?[s]:[])}}}function ege(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Gt(e,0,0,n)}function sC(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function Ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var dr=ml(/[A-Za-z]/),Vt=ml(/[\dA-Za-z]/),RG=ml(/[#-'*+\--9=?A-Z^-~]/);function ec(e){return e!==null&&(e<32||e===127)}var xy=ml(/\d/),MG=ml(/[\dA-Fa-f]/),$G=ml(/[!-/:-@[-`{-~]/);function ie(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}var tc=ml(/\p{P}|\p{S}/u),Ua=ml(/\s/);function ml(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Po(e){let t=[],r=-1,n=0,o=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&Vt(e.charCodeAt(r+1))&&Vt(e.charCodeAt(r+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),o=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+o+1,i=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function me(e,t,r,n){let o=n?n-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return he(l)?(e.enter(r),s(l)):t(l)}function s(l){return he(l)&&a++<o?(e.consume(l),s):(e.exit(r),t(l))}}var DG={tokenize:tge};function tge(e){let t=e.attempt(this.parser.constructs.contentInitial,n,o),r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ie(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var NG={tokenize:rge},OG={tokenize:nge};function rge(e){let t=this,r=[],n=0,o,a,i;return s;function s(x){if(n<r.length){let b=r[n];return t.containerState=b[1],e.attempt(b[0].continuation,l,u)(x)}return u(x)}function l(x){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&y();let b=t.events.length,_=b,I;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){I=t.events[_][1].end;break}g(n);let C=b;for(;C<t.events.length;)t.events[C][1].end={...I},C++;return Gt(t.events,_+1,0,t.events.slice(b)),t.events.length=C,u(x)}return s(x)}function u(x){if(n===r.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return m(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(OG,c,d)(x)}function c(x){return o&&y(),g(n),f(x)}function d(x){return t.parser.lazy[t.now().line]=n!==r.length,i=t.now().offset,m(x)}function f(x){return t.containerState={},e.attempt(OG,p,m)(x)}function p(x){return n++,r.push([t.currentConstruct,t.containerState]),f(x)}function m(x){if(x===null){o&&y(),g(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),h(x)}function h(x){if(x===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(x);return}return ie(x)?(e.consume(x),v(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(x),h)}function v(x,b){let _=t.sliceStream(x);if(b&&_.push(null),x.previous=a,a&&(a.next=x),a=x,o.defineSkip(x.start),o.write(_),t.parser.lazy[x.start.line]){let I=o.events.length;for(;I--;)if(o.events[I][1].start.offset<i&&(!o.events[I][1].end||o.events[I][1].end.offset>i))return;let C=t.events.length,k=C,M,L;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){if(M){L=t.events[k][1].end;break}M=!0}for(g(n),I=C;I<t.events.length;)t.events[I][1].end={...L},I++;Gt(t.events,k+1,0,t.events.slice(C)),t.events.length=I}}function g(x){let b=r.length;for(;b-- >x;){let _=r[b];t.containerState=_[1],_[0].exit.call(t,e)}r.length=x}function y(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function nge(e,t,r){return me(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zi(e){if(e===null||Me(e)||Ua(e))return 1;if(tc(e))return 2}function hl(e,t,r){let n=[],o=-1;for(;++o<e.length;){let a=e[o].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}var vy={name:"attention",resolveAll:oge,tokenize:age};function oge(e,t){let r=-1,n,o,a,i,s,l,u,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[r][1].start};zG(d,-l),zG(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:f},a={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},o={type:l>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[n][1].end={...i.start},e[r][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=un(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=un(u,[["enter",o,t],["enter",i,t],["exit",i,t],["enter",a,t]]),u=un(u,hl(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=un(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,u=un(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,Gt(e,n-1,r-n+3,u),r=n+u.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function age(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=zi(n),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let u=e.exit("attentionSequence"),c=zi(l),d=!c||c===2&&o||r.includes(l),f=!o||o===2&&c||r.includes(n);return u._open=!!(a===42?d:d&&(o||!f)),u._close=!!(a===42?f:f&&(c||!d)),t(l)}}function zG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var KD={name:"autolink",tokenize:ige};function ige(e,t,r){let n=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return dr(p)?(e.consume(p),i):p===64?r(p):u(p)}function i(p){return p===43||p===45||p===46||Vt(p)?(n=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||Vt(p))&&n++<32?(e.consume(p),s):(n=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ec(p)?r(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),c):RG(p)?(e.consume(p),u):r(p)}function c(p){return Vt(p)?d(p):r(p)}function d(p){return p===46?(e.consume(p),n=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Vt(p))&&n++<63){let m=p===45?f:d;return e.consume(p),m}return r(p)}}var Va={partial:!0,tokenize:sge};function sge(e,t,r){return n;function n(a){return he(a)?me(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ie(a)?t(a):r(a)}}var lC={continuation:{tokenize:uge},exit:cge,name:"blockQuote",tokenize:lge};function lge(e,t,r){let n=this;return o;function o(i){if(i===62){let s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return he(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function uge(e,t,r){let n=this;return o;function o(i){return he(i)?me(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(lC,t,r)(i)}}function cge(e){e.exit("blockQuote")}var uC={name:"characterEscape",tokenize:dge};function dge(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return $G(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var cC={name:"characterReference",tokenize:fge};function fge(e,t,r){let n=this,o=0,a,i;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,i=Vt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=MG,c):(e.enter("characterReferenceValue"),a=7,i=xy,c(d))}function c(d){if(d===59&&o){let f=e.exit("characterReferenceValue");return i===Vt&&!cp(n.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&o++<a?(e.consume(d),c):r(d)}}var FG={partial:!0,tokenize:mge},dC={concrete:!0,name:"codeFenced",tokenize:pge};function pge(e,t,r){let n=this,o={partial:!0,tokenize:_},a=0,i=0,s;return l;function l(I){return u(I)}function u(I){let C=n.events[n.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(I)}function c(I){return I===s?(i++,e.consume(I),c):i<3?r(I):(e.exit("codeFencedFenceSequence"),he(I)?me(e,d,"whitespace")(I):d(I))}function d(I){return I===null||ie(I)?(e.exit("codeFencedFence"),n.interrupt?t(I):e.check(FG,h,b)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(I))}function f(I){return I===null||ie(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(I)):he(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,p,"whitespace")(I)):I===96&&I===s?r(I):(e.consume(I),f)}function p(I){return I===null||ie(I)?d(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(I))}function m(I){return I===null||ie(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(I)):I===96&&I===s?r(I):(e.consume(I),m)}function h(I){return e.attempt(o,b,v)(I)}function v(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g}function g(I){return a>0&&he(I)?me(e,y,"linePrefix",a+1)(I):y(I)}function y(I){return I===null||ie(I)?e.check(FG,h,b)(I):(e.enter("codeFlowValue"),x(I))}function x(I){return I===null||ie(I)?(e.exit("codeFlowValue"),y(I)):(e.consume(I),x)}function b(I){return e.exit("codeFenced"),t(I)}function _(I,C,k){let M=0;return L;function L(ee){return I.enter("lineEnding"),I.consume(ee),I.exit("lineEnding"),j}function j(ee){return I.enter("codeFencedFence"),he(ee)?me(I,Y,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):Y(ee)}function Y(ee){return ee===s?(I.enter("codeFencedFenceSequence"),F(ee)):k(ee)}function F(ee){return ee===s?(M++,I.consume(ee),F):M>=i?(I.exit("codeFencedFenceSequence"),he(ee)?me(I,K,"whitespace")(ee):K(ee)):k(ee)}function K(ee){return ee===null||ie(ee)?(I.exit("codeFencedFence"),C(ee)):k(ee)}}}function mge(e,t,r){let n=this;return o;function o(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return n.parser.lazy[n.now().line]?r(i):t(i)}}var by={name:"codeIndented",tokenize:gge},hge={partial:!0,tokenize:yge};function gge(e,t,r){let n=this;return o;function o(u){return e.enter("codeIndented"),me(e,a,"linePrefix",5)(u)}function a(u){let c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(u):r(u)}function i(u){return u===null?l(u):ie(u)?e.attempt(hge,i,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||ie(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function yge(e,t,r){let n=this;return o;function o(i){return n.parser.lazy[n.now().line]?r(i):ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),o):me(e,a,"linePrefix",5)(i)}function a(i){let s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):ie(i)?o(i):r(i)}}var JD={name:"codeText",previous:vge,resolve:xge,tokenize:bge};function xge(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function vge(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bge(e,t,r){let n=this,o=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),o++,l):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(i=e.enter("codeTextSequence"),a=0,d(f)):ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ie(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),a++,d):a===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var fC=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){let o=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return n&&wy(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wy(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wy(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);wy(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wy(this.left,r.reverse())}}};function wy(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function pC(e){let t={},r=-1,n,o,a,i,s,l,u,c=new fC(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,wge(c,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,o=void 0;a--;)if(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(o&&(c.get(o)[1].type="lineEndingBlank"),i[1].type="lineEnding",o=a);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;o&&(n[1].end={...c.get(o)[1].start},s=c.slice(o,r),s.unshift(n),c.splice(o,r-o+1,s))}}return Gt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function wge(e,t){let r=e.get(t)[1],n=e.get(t)[2],o=t-1,a=[],i=r._tokenizer;i||(i=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));let s=i.events,l=[],u={},c,d,f=-1,p=r,m=0,h=0,v=[h];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(c=n.sliceStream(p),p.next||c.push(null),d&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,v.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),f=v.length;f--;){let g=s.slice(v[f],v[f+1]),y=a.pop();l.push([y,y+g.length-1]),e.splice(y,2,g)}for(l.reverse(),f=-1;++f<l.length;)u[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return u}var XD={resolve:Ige,tokenize:kge},Sge={partial:!0,tokenize:Cge};function Ige(e){return pC(e),e}function kge(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?a(s):ie(s)?e.check(Sge,i,a)(s):(e.consume(s),o)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function Cge(e,t,r){let n=this;return o;function o(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),me(e,a,"linePrefix")}function a(i){if(i===null||ie(i))return r(i);let s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}}function mC(e,t,r,n,o,a,i,s,l){let u=l||Number.POSITIVE_INFINITY,c=0;return d;function d(g){return g===60?(e.enter(n),e.enter(o),e.enter(a),e.consume(g),e.exit(a),f):g===null||g===32||g===41||ec(g)?r(g):(e.enter(n),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(g))}function f(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||ie(g)?r(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function h(g){return!c&&(g===null||g===41||Me(g))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(n),t(g)):c<u&&g===40?(e.consume(g),c++,h):g===41?(e.consume(g),c--,h):g===null||g===32||g===40||ec(g)?r(g):(e.consume(g),g===92?v:h)}function v(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function hC(e,t,r,n,o,a){let i=this,s=0,l;return u;function u(p){return e.enter(n),e.enter(o),e.consume(p),e.exit(o),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(p):p===93?(e.exit(a),e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||ie(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!he(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function gC(e,t,r,n,o,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(n),e.enter(o),e.consume(f),e.exit(o),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(o),e.consume(f),e.exit(o),e.exit(n),t):(e.enter(a),u(f))}function u(f){return f===i?(e.exit(a),l(i)):f===null?r(f):ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),me(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||ie(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===i||f===92?(e.consume(f),c):c(f)}}function rc(e,t){let r;return n;function n(o){return ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):he(o)?me(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}var YD={name:"definition",tokenize:Tge},_ge={partial:!0,tokenize:Pge};function Tge(e,t,r){let n=this,o;return a;function a(p){return e.enter("definition"),i(p)}function i(p){return hC.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Ur(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):r(p)}function l(p){return Me(p)?rc(e,u)(p):u(p)}function u(p){return mC(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(_ge,d,d)(p)}function d(p){return he(p)?me(e,f,"whitespace")(p):f(p)}function f(p){return p===null||ie(p)?(e.exit("definition"),n.parser.defined.push(o),t(p)):r(p)}}function Pge(e,t,r){return n;function n(s){return Me(s)?rc(e,o)(s):r(s)}function o(s){return gC(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return he(s)?me(e,i,"whitespace")(s):i(s)}function i(s){return s===null||ie(s)?t(s):r(s)}}var QD={name:"hardBreakEscape",tokenize:Lge};function Lge(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ie(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var eO={name:"headingAtx",resolve:Ege,tokenize:Age};function Ege(e,t){let r=e.length-2,n=3,o,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Gt(e,n,r-n+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Age(e,t,r){let n=0;return o;function o(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&n++<6?(e.consume(c),i):c===null||Me(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ie(c)?(e.exit("atxHeading"),t(c)):he(c)?me(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Me(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}var BG=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tO=["pre","script","style","textarea"];var rO={concrete:!0,name:"htmlFlow",resolveTo:$ge,tokenize:Dge},Rge={partial:!0,tokenize:Nge},Mge={partial:!0,tokenize:Oge};function $ge(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Dge(e,t,r){let n=this,o,a,i,s,l;return u;function u(E){return c(E)}function c(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),d}function d(E){return E===33?(e.consume(E),f):E===47?(e.consume(E),a=!0,h):E===63?(e.consume(E),o=3,n.interrupt?t:T):dr(E)?(e.consume(E),i=String.fromCharCode(E),v):r(E)}function f(E){return E===45?(e.consume(E),o=2,p):E===91?(e.consume(E),o=5,s=0,m):dr(E)?(e.consume(E),o=4,n.interrupt?t:T):r(E)}function p(E){return E===45?(e.consume(E),n.interrupt?t:T):r(E)}function m(E){let Ve="CDATA[";return E===Ve.charCodeAt(s++)?(e.consume(E),s===Ve.length?n.interrupt?t:Y:m):r(E)}function h(E){return dr(E)?(e.consume(E),i=String.fromCharCode(E),v):r(E)}function v(E){if(E===null||E===47||E===62||Me(E)){let Ve=E===47,fn=i.toLowerCase();return!Ve&&!a&&tO.includes(fn)?(o=1,n.interrupt?t(E):Y(E)):BG.includes(i.toLowerCase())?(o=6,Ve?(e.consume(E),g):n.interrupt?t(E):Y(E)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(E):a?y(E):x(E))}return E===45||Vt(E)?(e.consume(E),i+=String.fromCharCode(E),v):r(E)}function g(E){return E===62?(e.consume(E),n.interrupt?t:Y):r(E)}function y(E){return he(E)?(e.consume(E),y):L(E)}function x(E){return E===47?(e.consume(E),L):E===58||E===95||dr(E)?(e.consume(E),b):he(E)?(e.consume(E),x):L(E)}function b(E){return E===45||E===46||E===58||E===95||Vt(E)?(e.consume(E),b):_(E)}function _(E){return E===61?(e.consume(E),I):he(E)?(e.consume(E),_):x(E)}function I(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),l=E,C):he(E)?(e.consume(E),I):k(E)}function C(E){return E===l?(e.consume(E),l=null,M):E===null||ie(E)?r(E):(e.consume(E),C)}function k(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||Me(E)?_(E):(e.consume(E),k)}function M(E){return E===47||E===62||he(E)?x(E):r(E)}function L(E){return E===62?(e.consume(E),j):r(E)}function j(E){return E===null||ie(E)?Y(E):he(E)?(e.consume(E),j):r(E)}function Y(E){return E===45&&o===2?(e.consume(E),se):E===60&&o===1?(e.consume(E),U):E===62&&o===4?(e.consume(E),Ne):E===63&&o===3?(e.consume(E),T):E===93&&o===5?(e.consume(E),ve):ie(E)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Rge,It,F)(E)):E===null||ie(E)?(e.exit("htmlFlowData"),F(E)):(e.consume(E),Y)}function F(E){return e.check(Mge,K,It)(E)}function K(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),ee}function ee(E){return E===null||ie(E)?F(E):(e.enter("htmlFlowData"),Y(E))}function se(E){return E===45?(e.consume(E),T):Y(E)}function U(E){return E===47?(e.consume(E),i="",N):Y(E)}function N(E){if(E===62){let Ve=i.toLowerCase();return tO.includes(Ve)?(e.consume(E),Ne):Y(E)}return dr(E)&&i.length<8?(e.consume(E),i+=String.fromCharCode(E),N):Y(E)}function ve(E){return E===93?(e.consume(E),T):Y(E)}function T(E){return E===62?(e.consume(E),Ne):E===45&&o===2?(e.consume(E),T):Y(E)}function Ne(E){return E===null||ie(E)?(e.exit("htmlFlowData"),It(E)):(e.consume(E),Ne)}function It(E){return e.exit("htmlFlow"),t(E)}}function Oge(e,t,r){let n=this;return o;function o(i){return ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return n.parser.lazy[n.now().line]?r(i):t(i)}}function Nge(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Va,t,r)}}var nO={name:"htmlText",tokenize:zge};function zge(e,t,r){let n=this,o,a,i;return s;function s(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),l}function l(T){return T===33?(e.consume(T),u):T===47?(e.consume(T),_):T===63?(e.consume(T),x):dr(T)?(e.consume(T),k):r(T)}function u(T){return T===45?(e.consume(T),c):T===91?(e.consume(T),a=0,m):dr(T)?(e.consume(T),y):r(T)}function c(T){return T===45?(e.consume(T),p):r(T)}function d(T){return T===null?r(T):T===45?(e.consume(T),f):ie(T)?(i=d,U(T)):(e.consume(T),d)}function f(T){return T===45?(e.consume(T),p):d(T)}function p(T){return T===62?se(T):T===45?f(T):d(T)}function m(T){let Ne="CDATA[";return T===Ne.charCodeAt(a++)?(e.consume(T),a===Ne.length?h:m):r(T)}function h(T){return T===null?r(T):T===93?(e.consume(T),v):ie(T)?(i=h,U(T)):(e.consume(T),h)}function v(T){return T===93?(e.consume(T),g):h(T)}function g(T){return T===62?se(T):T===93?(e.consume(T),g):h(T)}function y(T){return T===null||T===62?se(T):ie(T)?(i=y,U(T)):(e.consume(T),y)}function x(T){return T===null?r(T):T===63?(e.consume(T),b):ie(T)?(i=x,U(T)):(e.consume(T),x)}function b(T){return T===62?se(T):x(T)}function _(T){return dr(T)?(e.consume(T),I):r(T)}function I(T){return T===45||Vt(T)?(e.consume(T),I):C(T)}function C(T){return ie(T)?(i=C,U(T)):he(T)?(e.consume(T),C):se(T)}function k(T){return T===45||Vt(T)?(e.consume(T),k):T===47||T===62||Me(T)?M(T):r(T)}function M(T){return T===47?(e.consume(T),se):T===58||T===95||dr(T)?(e.consume(T),L):ie(T)?(i=M,U(T)):he(T)?(e.consume(T),M):se(T)}function L(T){return T===45||T===46||T===58||T===95||Vt(T)?(e.consume(T),L):j(T)}function j(T){return T===61?(e.consume(T),Y):ie(T)?(i=j,U(T)):he(T)?(e.consume(T),j):M(T)}function Y(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),o=T,F):ie(T)?(i=Y,U(T)):he(T)?(e.consume(T),Y):(e.consume(T),K)}function F(T){return T===o?(e.consume(T),o=void 0,ee):T===null?r(T):ie(T)?(i=F,U(T)):(e.consume(T),F)}function K(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Me(T)?M(T):(e.consume(T),K)}function ee(T){return T===47||T===62||Me(T)?M(T):r(T)}function se(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function U(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),N}function N(T){return he(T)?me(e,ve,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ve(T)}function ve(T){return e.enter("htmlTextData"),i(T)}}var nc={name:"labelEnd",resolveAll:Uge,resolveTo:Vge,tokenize:qge},Fge={tokenize:Hge},Bge={tokenize:Wge},jge={tokenize:Zge};function Uge(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){let o=n.type==="labelImage"?4:2;n.type="data",t+=o}}return e.length!==r.length&&Gt(e,0,e.length,r),e}function Vge(e,t){let r=e.length,n=0,o,a,i,s;for(;r--;)if(o=e[r][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=un(s,e.slice(a+1,a+n+3)),s=un(s,[["enter",c,t]]),s=un(s,hl(t.parser.constructs.insideSpan.null,e.slice(a+n+4,i-3),t)),s=un(s,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),s=un(s,e.slice(i+1)),s=un(s,[["exit",l,t]]),Gt(e,a,e.length,s),e}function qge(e,t,r){let n=this,o=n.events.length,a,i;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){a=n.events[o][1];break}return s;function s(f){return a?a._inactive?d(f):(i=n.parser.defined.includes(Ur(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(Fge,c,i?c:d)(f):f===91?e.attempt(Bge,c,i?u:d)(f):i?c(f):d(f)}function u(f){return e.attempt(jge,c,d)(f)}function c(f){return t(f)}function d(f){return a._balanced=!0,r(f)}}function Hge(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return Me(d)?rc(e,a)(d):a(d)}function a(d){return d===41?c(d):mC(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return Me(d)?rc(e,l)(d):c(d)}function s(d){return r(d)}function l(d){return d===34||d===39||d===40?gC(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Me(d)?rc(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function Wge(e,t,r){let n=this;return o;function o(s){return hC.call(n,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(Ur(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function Zge(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var oO={name:"labelStartImage",resolveAll:nc.resolveAll,tokenize:Gge};function Gge(e,t,r){let n=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var aO={name:"labelStartLink",resolveAll:nc.resolveAll,tokenize:Kge};function Kge(e,t,r){let n=this;return o;function o(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(i):t(i)}}var Sy={name:"lineEnding",tokenize:Jge};function Jge(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),me(e,t,"linePrefix")}}var oc={name:"thematicBreak",tokenize:Xge};function Xge(e,t,r){let n=0,o;return a;function a(u){return e.enter("thematicBreak"),i(u)}function i(u){return o=u,s(u)}function s(u){return u===o?(e.enter("thematicBreakSequence"),l(u)):n>=3&&(u===null||ie(u))?(e.exit("thematicBreak"),t(u)):r(u)}function l(u){return u===o?(e.consume(u),n++,l):(e.exit("thematicBreakSequence"),he(u)?me(e,s,"whitespace")(u):s(u))}}var Vr={continuation:{tokenize:tye},exit:nye,name:"list",tokenize:eye},Yge={partial:!0,tokenize:oye},Qge={partial:!0,tokenize:rye};function eye(e,t,r){let n=this,o=n.events[n.events.length-1],a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,i=0;return s;function s(p){let m=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:xy(p)){if(n.containerState.type||(n.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(oc,r,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return r(p)}function l(p){return xy(p)&&++i<10?(e.consume(p),l):(!n.interrupt||i<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):r(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Va,n.interrupt?r:c,e.attempt(Yge,f,d))}function c(p){return n.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return he(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):r(p)}function f(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function tye(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Va,o,a);function o(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,me(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!he(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Qge,t,i)(s))}function i(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,me(e,e.attempt(Vr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function rye(e,t,r){let n=this;return me(e,o,"listItemIndent",n.containerState.size+1);function o(a){let i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(a):r(a)}}function nye(e){e.exit(this.containerState.type)}function oye(e,t,r){let n=this;return me(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){let i=n.events[n.events.length-1];return!he(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var yC={name:"setextUnderline",resolveTo:aye,tokenize:iye};function aye(e,t){let r=e.length,n,o,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i,e.push(["exit",i,t]),e}function iye(e,t,r){let n=this,o;return a;function a(u){let c=n.events.length,d;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){d=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),o=u,i(u)):r(u)}function i(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===o?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),he(u)?me(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ie(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}var jG={tokenize:sye};function sye(e){let t=this,r=e.attempt(Va,n,e.attempt(this.parser.constructs.flowInitial,o,me(e,e.attempt(this.parser.constructs.flow,o,e.attempt(XD,o)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var UG={resolveAll:WG()},VG=HG("string"),qG=HG("text");function HG(e){return{resolveAll:WG(e==="text"?lye:void 0),tokenize:t};function t(r){let n=this,o=this.parser.constructs[e],a=r.attempt(o,i,s);return i;function i(c){return u(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return u(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function u(c){if(c===null)return!0;let d=o[c],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function WG(e){return t;function t(r,n){let o=-1,a;for(;++o<=r.length;)a===void 0?r[o]&&r[o][1].type==="data"&&(a=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==a+2&&(r[a][1].end=r[o-1][1].end,r.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(r,n):r}}function lye(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],o=t.sliceStream(n),a=o.length,i=-1,s=0,l;for(;a--;){let u=o[a];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(u===-2)l=!0,s++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){let u={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?i:n.start._bufferIndex+i,_index:n.start._index+a,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}var iO={};Et(iO,{attentionMarkers:()=>gye,contentInitial:()=>cye,disable:()=>yye,document:()=>uye,flow:()=>fye,flowInitial:()=>dye,insideSpan:()=>hye,string:()=>pye,text:()=>mye});var uye={42:Vr,43:Vr,45:Vr,48:Vr,49:Vr,50:Vr,51:Vr,52:Vr,53:Vr,54:Vr,55:Vr,56:Vr,57:Vr,62:lC},cye={91:YD},dye={[-2]:by,[-1]:by,32:by},fye={35:eO,42:oc,45:[yC,oc],60:rO,61:yC,95:oc,96:dC,126:dC},pye={38:cC,92:uC},mye={[-5]:Sy,[-4]:Sy,[-3]:Sy,33:oO,38:cC,42:vy,60:[KD,nO],91:aO,92:[QD,uC],93:nc,95:vy,96:JD},hye={null:[vy,UG]},gye={null:[42,95]},yye={null:[]};function ZG(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},o={},a=[],i=[],s=[],l=!0,u={attempt:M(C),check:M(k),consume:b,enter:_,exit:I,interrupt:M(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:v,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:p},d=t.tokenize.call(c,u),f;return t.resolveAll&&a.push(t),c;function p(F){return i=un(i,F),y(),i[i.length-1]!==null?[]:(L(t,0),c.events=hl(a,c.events,c),c.events)}function m(F,K){return vye(h(F),K)}function h(F){return xye(i,F)}function v(){let{_bufferIndex:F,_index:K,line:ee,column:se,offset:U}=n;return{_bufferIndex:F,_index:K,line:ee,column:se,offset:U}}function g(F){o[F.line]=F.column,Y()}function y(){let F;for(;n._index<i.length;){let K=i[n._index];if(typeof K=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<K.length;)x(K.charCodeAt(n._bufferIndex));else x(K)}}function x(F){l=void 0,f=F,d=d(F)}function b(F){ie(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,Y()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=F,l=!0}function _(F,K){let ee=K||{};return ee.type=F,ee.start=v(),c.events.push(["enter",ee,c]),s.push(ee),ee}function I(F){let K=s.pop();return K.end=v(),c.events.push(["exit",K,c]),K}function C(F,K){L(F,K.from)}function k(F,K){K.restore()}function M(F,K){return ee;function ee(se,U,N){let ve,T,Ne,It;return Array.isArray(se)?Ve(se):"tokenize"in se?Ve([se]):E(se);function E(Lt){return no;function no(Mr){let $n=Mr!==null&&Lt[Mr],Dn=Mr!==null&&Lt.null,os=[...Array.isArray($n)?$n:$n?[$n]:[],...Array.isArray(Dn)?Dn:Dn?[Dn]:[]];return Ve(os)(Mr)}}function Ve(Lt){return ve=Lt,T=0,Lt.length===0?N:fn(Lt[T])}function fn(Lt){return no;function no(Mr){return It=j(),Ne=Lt,Lt.partial||(c.currentConstruct=Lt),Lt.name&&c.parser.constructs.disable.null.includes(Lt.name)?Je(Mr):Lt.tokenize.call(K?Object.assign(Object.create(c),K):c,u,ns,Je)(Mr)}}function ns(Lt){return l=!0,F(Ne,It),U}function Je(Lt){return l=!0,It.restore(),++T<ve.length?fn(ve[T]):N}}}function L(F,K){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Gt(c.events,K,c.events.length-K,F.resolve(c.events.slice(K),c)),F.resolveTo&&(c.events=F.resolveTo(c.events,c))}function j(){let F=v(),K=c.previous,ee=c.currentConstruct,se=c.events.length,U=Array.from(s);return{from:se,restore:N};function N(){n=F,c.previous=K,c.currentConstruct=ee,c.events.length=se,s=U,Y()}}function Y(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function xye(e,t){let r=t.start._index,n=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex,i;if(r===o)i=[e[r].slice(n,a)];else{if(i=e.slice(r,o),n>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(n):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}function vye(e,t){let r=-1,n=[],o;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
|
|
108
|
+
`;break}case-3:{i=`\r
|
|
109
|
+
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&o)continue;i=" ";break}default:i=String.fromCharCode(a)}o=a===-2,n.push(i)}return n.join("")}function sO(e){let n={constructs:iC([iO,...(e||{}).extensions||[]]),content:o(DG),defined:[],document:o(NG),flow:o(jG),lazy:{},string:o(VG),text:o(qG)};return n;function o(a){return i;function i(s){return ZG(n,a,s)}}}function lO(e){for(;!pC(e););return e}var GG=/[\0\t\n\r]/g;function uO(){let e=1,t="",r=!0,n;return o;function o(a,i,s){let l=[],u,c,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(GG.lastIndex=d,u=GG.exec(a),f=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(f),!u){t=a.slice(d);break}if(p===10&&d===f&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),d<f&&(l.push(a.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return s&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}var bye=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KG(e){return e.replace(bye,wye)}function wye(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let o=r.charCodeAt(1),a=o===120||o===88;return sC(r.slice(a?2:1),a?16:10)}return cp(r)||e}var XG={}.hasOwnProperty;function cO(e,t,r){return typeof t!="string"&&(r=t,t=void 0),Sye(r)(lO(sO(r).document().write(uO()(e,t,!0))))}function Sye(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Qz),autolinkProtocol:M,autolinkEmail:M,atxHeading:a(Jz),blockQuote:a(Mr),characterEscape:M,characterReference:M,codeFenced:a($n),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a($n,i),codeText:a(Dn,i),codeTextData:M,data:M,codeFlowValue:M,definition:a(os),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Oee),hardBreakEscape:a(Xz),hardBreakTrailing:a(Xz),htmlFlow:a(Yz,i),htmlFlowData:M,htmlText:a(Yz,i),htmlTextData:M,image:a(Nee),label:i,link:a(Qz),listItem:a(zee),listItemValue:f,listOrdered:a(e2,d),listUnordered:a(e2),paragraph:a(Fee),reference:E,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Jz),strong:a(Bee),thematicBreak:a(Uee)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:no,autolinkProtocol:Lt,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:fn,characterReferenceMarkerNumeric:fn,characterReferenceValue:ns,characterReference:Je,codeFenced:l(v),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:L,codeIndented:l(g),codeText:l(ee),codeTextData:L,data:L,definition:l(),definitionDestinationString:b,definitionLabelString:y,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(Y),hardBreakTrailing:l(Y),htmlFlow:l(F),htmlFlowData:L,htmlText:l(K),htmlTextData:L,image:l(U),label:ve,labelText:N,lineEnding:j,link:l(se),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ve,resourceDestinationString:T,resourceTitleString:Ne,resource:It,setextHeading:l(k),setextHeadingLineSequence:C,setextHeadingText:I,strong:l(),thematicBreak:l()}};YG(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(z){let te={type:"root",children:[]},be={stack:[te],tokenStack:[],config:t,enter:s,exit:u,buffer:i,resume:c,data:r},ze=[],ut=-1;for(;++ut<z.length;)if(z[ut][1].type==="listOrdered"||z[ut][1].type==="listUnordered")if(z[ut][0]==="enter")ze.push(ut);else{let Do=ze.pop();ut=o(z,Do,ut)}for(ut=-1;++ut<z.length;){let Do=t[z[ut][0]];XG.call(Do,z[ut][1].type)&&Do[z[ut][1].type].call(Object.assign({sliceSerialize:z[ut][2].sliceSerialize},be),z[ut][1])}if(be.tokenStack.length>0){let Do=be.tokenStack[be.tokenStack.length-1];(Do[1]||JG).call(be,void 0,Do[0])}for(te.position={start:gl(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:gl(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<t.transforms.length;)te=t.transforms[ut](te)||te;return te}function o(z,te,be){let ze=te-1,ut=-1,Do=!1,Wl,ei,rm,nm;for(;++ze<=be;){let On=z[ze];switch(On[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{On[0]==="enter"?ut++:ut--,nm=void 0;break}case"lineEndingBlank":{On[0]==="enter"&&(Wl&&!nm&&!ut&&!rm&&(rm=ze),nm=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nm=void 0}if(!ut&&On[0]==="enter"&&On[1].type==="listItemPrefix"||ut===-1&&On[0]==="exit"&&(On[1].type==="listUnordered"||On[1].type==="listOrdered")){if(Wl){let Fc=ze;for(ei=void 0;Fc--;){let ti=z[Fc];if(ti[1].type==="lineEnding"||ti[1].type==="lineEndingBlank"){if(ti[0]==="exit")continue;ei&&(z[ei][1].type="lineEndingBlank",Do=!0),ti[1].type="lineEnding",ei=Fc}else if(!(ti[1].type==="linePrefix"||ti[1].type==="blockQuotePrefix"||ti[1].type==="blockQuotePrefixWhitespace"||ti[1].type==="blockQuoteMarker"||ti[1].type==="listItemIndent"))break}rm&&(!ei||rm<ei)&&(Wl._spread=!0),Wl.end=Object.assign({},ei?z[ei][1].start:On[1].end),z.splice(ei||ze,0,["exit",Wl,On[2]]),ze++,be++}if(On[1].type==="listItemPrefix"){let Fc={type:"listItem",_spread:!1,start:Object.assign({},On[1].start),end:void 0};Wl=Fc,z.splice(ze,0,["enter",Fc,On[2]]),ze++,be++,rm=void 0,nm=!0}}}return z[te][1]._spread=Do,be}function a(z,te){return be;function be(ze){s.call(this,z(ze),ze),te&&te.call(this,ze)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(z,te,be){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([te,be||void 0]),z.position={start:gl(te.start),end:void 0}}function l(z){return te;function te(be){z&&z.call(this,be),u.call(this,be)}}function u(z,te){let be=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==z.type&&(te?te.call(this,z,ze[0]):(ze[1]||JG).call(this,z,ze[0]));else throw new Error("Cannot close `"+z.type+"` ("+pl({start:z.start,end:z.end})+"): it\u2019s not open");be.position.end=gl(z.end)}function c(){return Qu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(z){if(this.data.expectingFirstListItemValue){let te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function p(){let z=this.resume(),te=this.stack[this.stack.length-1];te.lang=z}function m(){let z=this.resume(),te=this.stack[this.stack.length-1];te.meta=z}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){let z=this.resume(),te=this.stack[this.stack.length-1];te.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){let z=this.resume(),te=this.stack[this.stack.length-1];te.value=z.replace(/(\r?\n|\r)$/g,"")}function y(z){let te=this.resume(),be=this.stack[this.stack.length-1];be.label=te,be.identifier=Ur(this.sliceSerialize(z)).toLowerCase()}function x(){let z=this.resume(),te=this.stack[this.stack.length-1];te.title=z}function b(){let z=this.resume(),te=this.stack[this.stack.length-1];te.url=z}function _(z){let te=this.stack[this.stack.length-1];if(!te.depth){let be=this.sliceSerialize(z).length;te.depth=be}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function C(z){let te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function M(z){let be=this.stack[this.stack.length-1].children,ze=be[be.length-1];(!ze||ze.type!=="text")&&(ze=jee(),ze.position={start:gl(z.start),end:void 0},be.push(ze)),this.stack.push(ze)}function L(z){let te=this.stack.pop();te.value+=this.sliceSerialize(z),te.position.end=gl(z.end)}function j(z){let te=this.stack[this.stack.length-1];if(this.data.atHardBreak){let be=te.children[te.children.length-1];be.position.end=gl(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(te.type)&&(M.call(this,z),L.call(this,z))}function Y(){this.data.atHardBreak=!0}function F(){let z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function K(){let z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function ee(){let z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function se(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let te=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=te,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let te=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=te,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function N(z){let te=this.sliceSerialize(z),be=this.stack[this.stack.length-2];be.label=KG(te),be.identifier=Ur(te).toLowerCase()}function ve(){let z=this.stack[this.stack.length-1],te=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){let ze=z.children;be.children=ze}else be.alt=te}function T(){let z=this.resume(),te=this.stack[this.stack.length-1];te.url=z}function Ne(){let z=this.resume(),te=this.stack[this.stack.length-1];te.title=z}function It(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Ve(z){let te=this.resume(),be=this.stack[this.stack.length-1];be.label=te,be.identifier=Ur(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function fn(z){this.data.characterReferenceType=z.type}function ns(z){let te=this.sliceSerialize(z),be=this.data.characterReferenceType,ze;be?(ze=sC(te,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=cp(te);let ut=this.stack[this.stack.length-1];ut.value+=ze}function Je(z){let te=this.stack.pop();te.position.end=gl(z.end)}function Lt(z){L.call(this,z);let te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(z)}function no(z){L.call(this,z);let te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(z)}function Mr(){return{type:"blockquote",children:[]}}function $n(){return{type:"code",lang:null,meta:null,value:""}}function Dn(){return{type:"inlineCode",value:""}}function os(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Oee(){return{type:"emphasis",children:[]}}function Jz(){return{type:"heading",depth:0,children:[]}}function Xz(){return{type:"break"}}function Yz(){return{type:"html",value:""}}function Nee(){return{type:"image",title:null,url:"",alt:null}}function Qz(){return{type:"link",title:null,url:"",children:[]}}function e2(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function zee(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Fee(){return{type:"paragraph",children:[]}}function Bee(){return{type:"strong",children:[]}}function jee(){return{type:"text",value:""}}function Uee(){return{type:"thematicBreak"}}}function gl(e){return{line:e.line,column:e.column,offset:e.offset}}function YG(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?YG(e,n):Iye(e,n)}}function Iye(e,t){let r;for(r in t)if(XG.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n);break}}}function JG(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pl({start:t.start,end:t.end})+") is still open")}function xC(e){let t=this;t.parser=r;function r(n){return cO(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function QG(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function e8(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
110
|
+
`}]}function t8(e,t){let r=t.value?t.value+`
|
|
111
|
+
`:"",n={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(n.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function r8(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function n8(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function o8(e,t){let r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),o=Po(n.toLowerCase()),a=e.footnoteOrder.indexOf(n),i,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),i=e.footnoteOrder.length):i=a+1,s+=1,e.footnoteCounts.set(n,s);let l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);let u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function a8(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function i8(e,t){if(e.options.allowDangerousHtml){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function vC(e,t){let r=t.referenceType,n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];let o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});let i=o[o.length-1];return i&&i.type==="text"?i.value+=n:o.push({type:"text",value:n}),o}function s8(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return vC(e,t);let o={src:Po(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(o.title=n.title);let a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function l8(e,t){let r={src:Po(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function u8(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function c8(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return vC(e,t);let o={href:Po(n.url||"")};n.title!==null&&n.title!==void 0&&(o.title=n.title);let a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function d8(e,t){let r={href:Po(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function f8(e,t,r){let n=e.all(t),o=r?kye(r):p8(t),a={},i=[];if(typeof t.checked=="boolean"){let c=n[0],d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){let c=n[s];(o||s!==0||c.type!=="element"||c.tagName!=="p")&&i.push({type:"text",value:`
|
|
112
|
+
`}),c.type==="element"&&c.tagName==="p"&&!o?i.push(...c.children):i.push(c)}let l=n[n.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&i.push({type:"text",value:`
|
|
113
|
+
`});let u={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,u),e.applyData(t,u)}function kye(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n<r.length;)t=p8(r[n])}return t}function p8(e){let t=e.spread;return t??e.children.length>1}function m8(e,t){let r={},n=e.all(t),o=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++o<n.length;){let i=n[o];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function h8(e,t){let r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function g8(e,t){let r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function y8(e,t){let r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function x8(e,t){let r=e.all(t),n=r.shift(),o=[];if(n){let i={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],i),o.push(i)}if(r.length>0){let i={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=up(t.children[1]),l=aC(t.children[t.children.length-1]);s&&l&&(i.position={start:s,end:l}),o.push(i)}let a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function v8(e,t,r){let n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",i=r&&r.type==="table"?r.align:void 0,s=i?i.length:t.children.length,l=-1,u=[];for(;++l<s;){let d=t.children[l],f={},p=i?i[l]:void 0;p&&(f.align=p);let m={type:"element",tagName:a,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function b8(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function S8(e){let t=String(e),r=/\r?\n|\r/g,n=r.exec(t),o=0,a=[];for(;n;)a.push(w8(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return a.push(w8(t.slice(o),o>0,!1)),a.join("")}function w8(e,t,r){let n=0,o=e.length;if(t){let a=e.codePointAt(n);for(;a===9||a===32;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(o-1);for(;a===9||a===32;)o--,a=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}function I8(e,t){let r={type:"text",value:S8(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function k8(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}var C8={blockquote:QG,break:e8,code:t8,delete:r8,emphasis:n8,footnoteReference:o8,heading:a8,html:i8,imageReference:s8,image:l8,inlineCode:u8,linkReference:c8,link:d8,listItem:f8,list:m8,paragraph:h8,root:g8,strong:y8,table:x8,tableCell:b8,tableRow:v8,text:I8,thematicBreak:k8,toml:bC,yaml:bC,definition:bC,footnoteDefinition:bC};function bC(){}var _8=typeof self=="object"?self:globalThis,Pye=(e,t)=>{let r=(o,a)=>(e.set(a,o),o),n=o=>{if(e.has(o))return e.get(o);let[a,i]=t[o];switch(a){case 0:case-1:return r(i,o);case 1:{let s=r([],o);for(let l of i)s.push(n(l));return s}case 2:{let s=r({},o);for(let[l,u]of i)s[n(l)]=n(u);return s}case 3:return r(new Date(i),o);case 4:{let{source:s,flags:l}=i;return r(new RegExp(s,l),o)}case 5:{let s=r(new Map,o);for(let[l,u]of i)s.set(n(l),n(u));return s}case 6:{let s=r(new Set,o);for(let l of i)s.add(n(l));return s}case 7:{let{name:s,message:l}=i;return r(new _8[s](l),o)}case 8:return r(BigInt(i),o);case"BigInt":return r(Object(BigInt(i)),o);case"ArrayBuffer":return r(new Uint8Array(i).buffer,i);case"DataView":{let{buffer:s}=new Uint8Array(i);return r(new DataView(s),i)}}return r(new _8[a](i),o)};return n},pO=e=>Pye(new Map,e)(0);var dp="",{toString:Lye}={},{keys:Eye}=Object,Iy=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let r=Lye.call(e).slice(8,-1);switch(r){case"Array":return[1,dp];case"Object":return[2,dp];case"Date":return[3,dp];case"RegExp":return[4,dp];case"Map":return[5,dp];case"Set":return[6,dp];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},SC=([e,t])=>e===0&&(t==="function"||t==="symbol"),Aye=(e,t,r,n)=>{let o=(i,s)=>{let l=n.push(i)-1;return r.set(s,l),l},a=i=>{if(r.has(i))return r.get(i);let[s,l]=Iy(i);switch(s){case 0:{let c=i;switch(l){case"bigint":s=8,c=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return o([-1],i)}return o([s,c],i)}case 1:{if(l){let f=i;return l==="DataView"?f=new Uint8Array(i.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(i)),o([l,[...f]],i)}let c=[],d=o([s,c],i);for(let f of i)c.push(a(f));return d}case 2:{if(l)switch(l){case"BigInt":return o([l,i.toString()],i);case"Boolean":case"Number":case"String":return o([l,i.valueOf()],i)}if(t&&"toJSON"in i)return a(i.toJSON());let c=[],d=o([s,c],i);for(let f of Eye(i))(e||!SC(Iy(i[f])))&&c.push([a(f),a(i[f])]);return d}case 3:return o([s,i.toISOString()],i);case 4:{let{source:c,flags:d}=i;return o([s,{source:c,flags:d}],i)}case 5:{let c=[],d=o([s,c],i);for(let[f,p]of i)(e||!(SC(Iy(f))||SC(Iy(p))))&&c.push([a(f),a(p)]);return d}case 6:{let c=[],d=o([s,c],i);for(let f of i)(e||!SC(Iy(f)))&&c.push(a(f));return d}}let{message:u}=i;return o([s,{name:l,message:u}],i)};return a},mO=(e,{json:t,lossy:r}={})=>{let n=[];return Aye(!(t||r),!!t,new Map,n)(e),n};var fp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?pO(mO(e,t)):structuredClone(e):(e,t)=>pO(mO(e,t));function Rye(e,t){let r=[{type:"text",value:"\u21A9"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function Mye(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function A8(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Rye,n=e.options.footnoteBackLabel||Mye,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],l=-1;for(;++l<e.footnoteOrder.length;){let u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;let c=e.all(u),d=String(u.identifier).toUpperCase(),f=Po(d.toLowerCase()),p=0,m=[],h=e.footnoteCounts.get(d);for(;h!==void 0&&++p<=h;){m.length>0&&m.push({type:"text",value:" "});let y=typeof r=="string"?r:r(l,p);typeof y=="string"&&(y={type:"text",value:y}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,p),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}let v=c[c.length-1];if(v&&v.type==="element"&&v.tagName==="p"){let y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else c.push(...m);let g={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...fp(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
114
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
115
|
+
`}]}}var yl=(function(e){if(e==null)return Nye;if(typeof e=="function")return IC(e);if(typeof e=="object")return Array.isArray(e)?$ye(e):Dye(e);if(typeof e=="string")return Oye(e);throw new Error("Expected function, string, or object as test")});function $ye(e){let t=[],r=-1;for(;++r<e.length;)t[r]=yl(e[r]);return IC(n);function n(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function Dye(e){let t=e;return IC(r);function r(n){let o=n,a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function Oye(e){return IC(t);function t(r){return r&&r.type===e}}function IC(e){return t;function t(r,n,o){return!!(zye(r)&&e.call(this,r,typeof n=="number"?n:void 0,o||void 0))}}function Nye(){return!0}function zye(e){return e!==null&&typeof e=="object"&&"type"in e}var R8=[],kC=!0,ac=!1,CC="skip";function ky(e,t,r,n){let o;typeof t=="function"&&typeof r!="function"?(n=r,r=t):o=t;let a=yl(o),i=n?-1:1;s(e,void 0,[])();function s(l,u,c){let d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){let p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=R8,m,h,v;if((!t||a(l,u,c[c.length-1]||void 0))&&(p=Fye(r(l,c)),p[0]===ac))return p;if("children"in l&&l.children){let g=l;if(g.children&&p[0]!==CC)for(h=(n?g.children.length:-1)+i,v=c.concat(g);h>-1&&h<g.children.length;){let y=g.children[h];if(m=s(y,h,v)(),m[0]===ac)return m;h=typeof m[1]=="number"?m[1]:h+i}}return p}}}function Fye(e){return Array.isArray(e)?e:typeof e=="number"?[kC,e]:e==null?R8:[e]}function ic(e,t,r,n){let o,a,i;typeof t=="function"&&typeof r!="function"?(a=void 0,i=t,o=r):(a=t,i=r,o=n),ky(e,a,s,o);function s(l,u){let c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return i(l,d,c)}}var hO={}.hasOwnProperty,Bye={};function $8(e,t){let r=t||Bye,n=new Map,o=new Map,a=new Map,i={...C8,...r.handlers},s={all:u,applyData:Uye,definitionById:n,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:l,options:r,patch:jye,wrap:qye};return ic(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){let d=c.type==="definition"?n:o,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),s;function l(c,d){let f=c.type,p=s.handlers[f];if(hO.call(s.handlers,f)&&p)return p(s,c,d);if(s.options.passThrough&&s.options.passThrough.includes(f)){if("children"in c){let{children:h,...v}=c,g=fp(v);return g.children=s.all(c),g}return fp(c)}return(s.options.unknownHandler||Vye)(s,c,d)}function u(c){let d=[];if("children"in c){let f=c.children,p=-1;for(;++p<f.length;){let m=s.one(f[p],c);if(m){if(p&&f[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=M8(m.value)),!Array.isArray(m)&&m.type==="element")){let h=m.children[0];h&&h.type==="text"&&(h.value=M8(h.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function jye(e,t){e.position&&(t.position=VD(e))}function Uye(e,t){let r=t;if(e&&e.data){let n=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{let i="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:i}}r.type==="element"&&a&&Object.assign(r.properties,fp(a)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Vye(e,t){let r=t.data||{},n="value"in t&&!(hO.call(r,"hProperties")||hO.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qye(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:`
|
|
116
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
117
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
118
|
+
`}),r}function M8(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function _C(e,t){let r=$8(e,t),n=r.one(e,void 0),o=A8(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return o&&("children"in a,a.children.push({type:"text",value:`
|
|
119
|
+
`},o)),a}function TC(e,t){return e&&"run"in e?async function(r,n){let o=_C(r,{file:n,...t});await e.run(o,n)}:function(r,n){return _C(r,{file:n,...e||t})}}function gO(e){if(e)throw e}var EC=S(V8(),1);function Cy(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yO(){let e=[],t={run:r,use:n};return t;function r(...o){let a=-1,i=o.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...o);function s(l,...u){let c=e[++a],d=-1;if(l){i(l);return}for(;++d<o.length;)(u[d]===null||u[d]===void 0)&&(u[d]=o[d]);o=u,c?q8(c,s)(...u):i(null,...u)}}function n(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function q8(e,t){let r;return n;function n(...i){let s=e.length>i.length,l;s&&i.push(o);try{l=e.apply(this,i)}catch(u){let c=u;if(s&&r)throw c;return o(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,o):l instanceof Error?o(l):a(l))}function o(i,...s){r||(r=!0,t(i,...s))}function a(i){o(null,i)}}var sa={basename:Hye,dirname:Wye,extname:Zye,join:Gye,sep:"/"};function Hye(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_y(e);let r=0,n=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){r=o+1;break}}else n<0&&(a=!0,n=o+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){r=o+1;break}}else i<0&&(a=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(n=o):(s=-1,n=i));return r===n?n=i:n<0&&(n=e.length),e.slice(r,n)}function Wye(e){if(_y(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Zye(e){_y(e);let t=e.length,r=-1,n=0,o=-1,a=0,i;for(;t--;){let s=e.codePointAt(t);if(s===47){if(i){n=t+1;break}continue}r<0&&(i=!0,r=t+1),s===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||r<0||a===0||a===1&&o===r-1&&o===n+1?"":e.slice(o,r)}function Gye(...e){let t=-1,r;for(;++t<e.length;)_y(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Kye(r)}function Kye(e){_y(e);let t=e.codePointAt(0)===47,r=Jye(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Jye(e,t){let r="",n=0,o=-1,a=0,i=-1,s,l;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(o===i-1||a===1))if(o!==i-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=i,a=0;continue}}else if(r.length>0){r="",n=0,o=i,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(o+1,i):r=e.slice(o+1,i),n=i-o-1;o=i,a=0}else s===46&&a>-1?a++:a=-1}return r}function _y(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var H8={cwd:Xye};function Xye(){return"/"}function pp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W8(e){if(typeof e=="string")e=new URL(e);else if(!pp(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Yye(e)}function Yye(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){let n=t.codePointAt(r+2);if(n===70||n===102){let o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}var xO=["history","path","basename","stem","extname","dirname"],sc=class{constructor(t){let r;t?pp(t)?r={path:t}:typeof t=="string"||Qye(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":H8.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<xO.length;){let a=xO[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let o;for(o in r)xO.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?sa.basename(this.path):void 0}set basename(t){bO(t,"basename"),vO(t,"basename"),this.path=sa.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sa.dirname(this.path):void 0}set dirname(t){Z8(this.basename,"dirname"),this.path=sa.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sa.extname(this.path):void 0}set extname(t){if(vO(t,"extname"),Z8(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sa.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pp(t)&&(t=W8(t)),bO(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sa.basename(this.path,this.extname):void 0}set stem(t){bO(t,"stem"),vO(t,"stem"),this.path=sa.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){let o=this.message(t,r,n);throw o.fatal=!0,o}info(t,r,n){let o=this.message(t,r,n);return o.fatal=void 0,o}message(t,r,n){let o=new Zt(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}};function vO(e,t){if(e&&e.includes(sa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sa.sep+"`")}function bO(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Z8(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Qye(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var G8=(function(e){let n=this.constructor.prototype,o=n[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,n),a});var exe={}.hasOwnProperty,kO=class e extends G8{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=yO()}copy(){let t=new e,r=-1;for(;++r<this.attachers.length;){let n=this.attachers[r];t.use(...n)}return t.data((0,EC.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(IO("data",this.frozen),this.namespace[t]=r,this):exe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(IO("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let o=r.call(t,...n);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let r=LC(t),n=this.parser||this.Parser;return wO("parse",n),n(String(r),r)}process(t,r){let n=this;return this.freeze(),wO("process",this.parser||this.Parser),SO("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(a,i){let s=LC(t),l=n.parse(s);n.run(l,s,function(c,d,f){if(c||!d||!f)return u(c);let p=d,m=n.stringify(p,f);rxe(m)?f.value=m:f.result=m,u(c,f)});function u(c,d){c||!d?i(c):a?a(d):r(void 0,d)}}}processSync(t){let r=!1,n;return this.freeze(),wO("processSync",this.parser||this.Parser),SO("processSync",this.compiler||this.Compiler),this.process(t,o),J8("processSync","process",r),n;function o(a,i){r=!0,gO(a),n=i}}run(t,r,n){K8(t),this.freeze();let o=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(i,s){let l=LC(r);o.run(t,l,u);function u(c,d,f){let p=d||t;c?s(c):i?i(p):n(void 0,p,f)}}}runSync(t,r){let n=!1,o;return this.run(t,r,a),J8("runSync","run",n),o;function a(i,s){gO(i),o=s,n=!0}}stringify(t,r){this.freeze();let n=LC(r),o=this.compiler||this.Compiler;return SO("stringify",o),K8(t),o(t,n)}use(t,...r){let n=this.attachers,o=this.namespace;if(IO("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...d]=u;l(c,d)}else i(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function i(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(o.settings=(0,EC.default)(!0,o.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let d=u[c];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,f=-1;for(;++d<n.length;)if(n[d][0]===u){f=d;break}if(f===-1)n.push([u,...c]);else if(c.length>0){let[p,...m]=c,h=n[f][1];Cy(h)&&Cy(p)&&(p=(0,EC.default)(!0,h,p)),n[f]=[u,p,...m]}}}},CO=new kO().freeze();function wO(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function SO(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function IO(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function K8(e){if(!Cy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function J8(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function LC(e){return txe(e)?e:new sc(e)}function txe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rxe(e){return typeof e=="string"||nxe(e)}function nxe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var oxe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",X8=[],Y8={allowDangerousHtml:!0},axe=/^(https?|ircs?|mailto|xmpp)$/i,ixe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ty(e){let t=sxe(e),r=lxe(e);return uxe(t.runSync(t.parse(r),r),e)}function sxe(e){let t=e.rehypePlugins||X8,r=e.remarkPlugins||X8,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Y8}:Y8;return CO().use(xC).use(r).use(TC,n).use(t)}function lxe(e){let t=e.children||"",r=new sc;return typeof t=="string"?r.value=t:(""+t,void 0),r}function uxe(e,t){let r=t.allowedElements,n=t.allowElement,o=t.components,a=t.disallowedElements,i=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||e7;for(let c of ixe)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+oxe+c.id,void 0);return r&&a&&void 0,ic(e,u),WD(e,{Fragment:mp.Fragment,components:o,ignoreInvalidStyle:!0,jsx:mp.jsx,jsxs:mp.jsxs,passKeys:!0,passNode:!0});function u(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return i?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in yy)if(Object.hasOwn(yy,p)&&Object.hasOwn(c.properties,p)){let m=c.properties[p],h=yy[p];(h===null||h.includes(c.tagName))&&(c.properties[p]=l(String(m||""),p,c))}}if(c.type==="element"){let p=r?!r.includes(c.tagName):a?a.includes(c.tagName):!1;if(!p&&n&&typeof d=="number"&&(p=!n(c,d,f)),p&&f&&typeof d=="number")return s&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function e7(e){let t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||n!==-1&&t>n||axe.test(e.slice(0,t))?e:""}function _O(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function TO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function PO(e,t,r){let o=yl((r||{}).ignore||[]),a=cxe(t),i=-1;for(;++i<a.length;)ky(e,"text",s);function s(u,c){let d=-1,f;for(;++d<c.length;){let p=c[d],m=f?f.children:void 0;if(o(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return l(u,c)}function l(u,c){let d=c[c.length-1],f=a[i][0],p=a[i][1],m=0,v=d.children.indexOf(u),g=!1,y=[];f.lastIndex=0;let x=f.exec(u.value);for(;x;){let b=x.index,_={index:x.index,input:x.input,stack:[...c,u]},I=p(...x,_);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?f.lastIndex=b+1:(m!==b&&y.push({type:"text",value:u.value.slice(m,b)}),Array.isArray(I)?y.push(...I):I&&y.push(I),m=b+x[0].length,g=!0),!f.global)break;x=f.exec(u.value)}return g?(m<u.value.length&&y.push({type:"text",value:u.value.slice(m)}),d.children.splice(v,1,...y)):y=[u],v+y.length}}function cxe(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let o=r[n];t.push([dxe(o[0]),fxe(o[1])])}return t}function dxe(e){return typeof e=="string"?new RegExp(TO(e),"g"):e}function fxe(e){return typeof e=="function"?e:function(){return e}}var LO="phrasing",EO=["autolink","link","image","label"];function RO(){return{transforms:[xxe],enter:{literalAutolink:pxe,literalAutolinkEmail:AO,literalAutolinkHttp:AO,literalAutolinkWww:AO},exit:{literalAutolink:yxe,literalAutolinkEmail:gxe,literalAutolinkHttp:mxe,literalAutolinkWww:hxe}}}function MO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:LO,notInConstruct:EO},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:LO,notInConstruct:EO},{character:":",before:"[ps]",after:"\\/",inConstruct:LO,notInConstruct:EO}]}}function pxe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function AO(e){this.config.enter.autolinkProtocol.call(this,e)}function mxe(e){this.config.exit.autolinkProtocol.call(this,e)}function hxe(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function gxe(e){this.config.exit.autolinkEmail.call(this,e)}function yxe(e){this.exit(e)}function xxe(e){PO(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vxe],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,bxe]],{ignore:["link","linkReference"]})}function vxe(e,t,r,n,o){let a="";if(!t7(o)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!wxe(r)))return!1;let i=Sxe(r+n);if(!i[0])return!1;let s={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function bxe(e,t,r,n){return!t7(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function wxe(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Sxe(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),o=_O(e,"("),a=_O(e,")");for(;n!==-1&&o>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function t7(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ua(r)||tc(r))&&(!t||r!==47)}r7.peek=Axe;function Ixe(){this.buffer()}function kxe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Cxe(){this.buffer()}function _xe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Txe(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Pxe(e){this.exit(e)}function Lxe(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),r.label=t}function Exe(e){this.exit(e)}function Axe(){return"["}function r7(e,t,r,n){let o=r.createTracker(n),a=o.move("[^"),i=r.enter("footnoteReference"),s=r.enter("reference");return a+=o.move(r.safe(r.associationId(e),{after:"]",before:a})),s(),i(),a+=o.move("]"),a}function $O(){return{enter:{gfmFootnoteCallString:Ixe,gfmFootnoteCall:kxe,gfmFootnoteDefinitionLabelString:Cxe,gfmFootnoteDefinition:_xe},exit:{gfmFootnoteCallString:Txe,gfmFootnoteCall:Pxe,gfmFootnoteDefinitionLabelString:Lxe,gfmFootnoteDefinition:Exe}}}function DO(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:r7},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,o,a,i){let s=a.createTracker(i),l=s.move("[^"),u=a.enter("footnoteDefinition"),c=a.enter("label");return l+=s.move(a.safe(a.associationId(n),{before:l,after:"]"})),c(),l+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
120
|
+
`:" ")+a.indentLines(a.containerFlow(n,s.current()),t?n7:Rxe))),u(),l}}function Rxe(e,t,r){return t===0?e:n7(e,t,r)}function n7(e,t,r){return(r?"":" ")+e}var Mxe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];o7.peek=Oxe;function OO(){return{canContainEols:["delete"],enter:{strikethrough:$xe},exit:{strikethrough:Dxe}}}function NO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Mxe}],handlers:{delete:o7}}}function $xe(e){this.enter({type:"delete",children:[]},e)}function Dxe(e){this.exit(e)}function o7(e,t,r,n){let o=r.createTracker(n),a=r.enter("strikethrough"),i=o.move("~~");return i+=r.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function Oxe(){return"~"}function Nxe(e){return e.length}function i7(e,t){let r=t||{},n=(r.align||[]).concat(),o=r.stringLength||Nxe,a=[],i=[],s=[],l=[],u=0,c=-1;for(;++c<e.length;){let h=[],v=[],g=-1;for(e[c].length>u&&(u=e[c].length);++g<e[c].length;){let y=zxe(e[c][g]);if(r.alignDelimiters!==!1){let x=o(y);v[g]=x,(l[g]===void 0||x>l[g])&&(l[g]=x)}h.push(y)}i[c]=h,s[c]=v}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<u;)a[d]=a7(n[d]);else{let h=a7(n);for(;++d<u;)a[d]=h}d=-1;let f=[],p=[];for(;++d<u;){let h=a[d],v="",g="";h===99?(v=":",g=":"):h===108?v=":":h===114&&(g=":");let y=r.alignDelimiters===!1?1:Math.max(1,l[d]-v.length-g.length),x=v+"-".repeat(y)+g;r.alignDelimiters!==!1&&(y=v.length+y+g.length,y>l[d]&&(l[d]=y),p[d]=y),f[d]=x}i.splice(1,0,f),s.splice(1,0,p),c=-1;let m=[];for(;++c<i.length;){let h=i[c],v=s[c];d=-1;let g=[];for(;++d<u;){let y=h[d]||"",x="",b="";if(r.alignDelimiters!==!1){let _=l[d]-(v[d]||0),I=a[d];I===114?x=" ".repeat(_):I===99?_%2?(x=" ".repeat(_/2+.5),b=" ".repeat(_/2-.5)):(x=" ".repeat(_/2),b=x):b=" ".repeat(_)}r.delimiterStart!==!1&&!d&&g.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&y==="")&&(r.delimiterStart!==!1||d)&&g.push(" "),r.alignDelimiters!==!1&&g.push(x),g.push(y),r.alignDelimiters!==!1&&g.push(b),r.padding!==!1&&g.push(" "),(r.delimiterEnd!==!1||d!==u-1)&&g.push("|")}m.push(r.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
|
|
121
|
+
`)}function zxe(e){return e==null?"":String(e)}function a7(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function s7(e,t,r,n){let o=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);let i=r.indentLines(r.containerFlow(e,a.current()),Fxe);return o(),i}function Fxe(e,t,r){return">"+(r?"":" ")+e}function u7(e,t){return l7(e,t.inConstruct,!0)&&!l7(e,t.notInConstruct,!1)}function l7(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function zO(e,t,r,n){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
122
|
+
`&&u7(r.stack,r.unsafe[o]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
123
|
+
`}function c7(e,t){let r=String(e),n=r.indexOf(t),o=n,a=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===o?++a>i&&(i=a):a=1,o=n+t.length,n=r.indexOf(t,o);return i}function d7(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function f7(e){let t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function p7(e,t,r,n){let o=f7(r),a=e.value||"",i=o==="`"?"GraveAccent":"Tilde";if(d7(e,r)){let d=r.enter("codeIndented"),f=r.indentLines(a,Bxe);return d(),f}let s=r.createTracker(n),l=o.repeat(Math.max(c7(a,o)+1,3)),u=r.enter("codeFenced"),c=s.move(l);if(e.lang){let d=r.enter(`codeFencedLang${i}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){let d=r.enter(`codeFencedMeta${i}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
|
|
124
|
+
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
125
|
+
`),a&&(c+=s.move(a+`
|
|
126
|
+
`)),c+=s.move(l),u(),c}function Bxe(e,t,r){return(r?"":" ")+e}function hp(e){let t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function m7(e,t,r,n){let o=hp(r),a=o==='"'?"Quote":"Apostrophe",i=r.enter("definition"),s=r.enter("label"),l=r.createTracker(n),u=l.move("[");return u+=l.move(r.safe(r.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":`
|
|
127
|
+
`,...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+o),u+=l.move(r.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),i(),u}function h7(e){let t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function gp(e,t,r){let n=zi(e),o=zi(t);return n===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}FO.peek=jxe;function FO(e,t,r,n){let o=h7(r),a=r.enter("emphasis"),i=r.createTracker(n),s=i.move(o),l=i.move(r.containerPhrasing(e,{after:o,before:s,...i.current()})),u=l.charCodeAt(0),c=gp(n.before.charCodeAt(n.before.length-1),u,o);c.inside&&(l=xl(u)+l.slice(1));let d=l.charCodeAt(l.length-1),f=gp(n.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+xl(d));let p=i.move(o);return a(),r.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}function jxe(e,t,r){return r.options.emphasis||"*"}function g7(e,t){let r=!1;return ic(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,ac}),!!((!e.depth||e.depth<3)&&Qu(e)&&(t.options.setext||r))}function y7(e,t,r,n){let o=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(g7(e,r)){let c=r.enter("headingSetext"),d=r.enter("phrasing"),f=r.containerPhrasing(e,{...a.current(),before:`
|
|
128
|
+
`,after:`
|
|
129
|
+
`});return d(),c(),f+`
|
|
130
|
+
`+(o===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
131
|
+
`))+1))}let i="#".repeat(o),s=r.enter("headingAtx"),l=r.enter("phrasing");a.move(i+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
|
|
132
|
+
`,...a.current()});return/^[\t ]/.test(u)&&(u=xl(u.charCodeAt(0))+u.slice(1)),u=u?i+" "+u:i,r.options.closeAtx&&(u+=" "+i),l(),s(),u}BO.peek=Uxe;function BO(e){return e.value||""}function Uxe(){return"<"}jO.peek=Vxe;function jO(e,t,r,n){let o=hp(r),a=o==='"'?"Quote":"Apostrophe",i=r.enter("image"),s=r.enter("label"),l=r.createTracker(n),u=l.move("![");return u+=l.move(r.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=l.move(" "+o),u+=l.move(r.safe(e.title,{before:u,after:o,...l.current()})),u+=l.move(o),s()),u+=l.move(")"),i(),u}function Vxe(){return"!"}UO.peek=qxe;function UO(e,t,r,n){let o=e.referenceType,a=r.enter("imageReference"),i=r.enter("label"),s=r.createTracker(n),l=s.move("!["),u=r.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),i();let c=r.stack;r.stack=[],i=r.enter("reference");let d=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return i(),r.stack=c,a(),o==="full"||!u||u!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function qxe(){return"!"}VO.peek=Hxe;function VO(e,t,r){let n=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(n);)o+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){let i=r.unsafe[a],s=r.compilePattern(i),l;if(i.atBreak)for(;l=s.exec(n);){let u=l.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(l.index+1)}}return o+n+o}function Hxe(){return"`"}function qO(e,t){let r=Qu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}HO.peek=Wxe;function HO(e,t,r,n){let o=hp(r),a=o==='"'?"Quote":"Apostrophe",i=r.createTracker(n),s,l;if(qO(e,r)){let c=r.stack;r.stack=[],s=r.enter("autolink");let d=i.move("<");return d+=i.move(r.containerPhrasing(e,{before:d,after:">",...i.current()})),d+=i.move(">"),s(),r.stack=c,d}s=r.enter("link"),l=r.enter("label");let u=i.move("[");return u+=i.move(r.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(r.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(l=r.enter("destinationRaw"),u+=i.move(r.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=i.move(" "+o),u+=i.move(r.safe(e.title,{before:u,after:o,...i.current()})),u+=i.move(o),l()),u+=i.move(")"),s(),u}function Wxe(e,t,r){return qO(e,r)?"<":"["}WO.peek=Zxe;function WO(e,t,r,n){let o=e.referenceType,a=r.enter("linkReference"),i=r.enter("label"),s=r.createTracker(n),l=s.move("["),u=r.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),i();let c=r.stack;r.stack=[],i=r.enter("reference");let d=r.safe(r.associationId(e),{before:l,after:"]",...s.current()});return i(),r.stack=c,a(),o==="full"||!u||u!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Zxe(){return"["}function yp(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function x7(e){let t=yp(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function v7(e){let t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function AC(e){let t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function b7(e,t,r,n){let o=r.enter("list"),a=r.bulletCurrent,i=e.ordered?v7(r):yp(r),s=e.ordered?i==="."?")":".":x7(r),l=t&&r.bulletLastUsed?i===r.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),AC(r)===i&&c){let d=-1;for(;++d<e.children.length;){let f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(i=s),r.bulletCurrent=i;let u=r.containerFlow(e,n);return r.bulletLastUsed=i,r.bulletCurrent=a,o(),u}function w7(e){let t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function S7(e,t,r,n){let o=w7(r),a=r.bulletCurrent||yp(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);let s=r.createTracker(n);s.move(a+" ".repeat(i-a.length)),s.shift(i);let l=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),c);return l(),u;function c(d,f,p){return f?(p?"":" ".repeat(i))+d:(p?a:a+" ".repeat(i-a.length))+d}}function I7(e,t,r,n){let o=r.enter("paragraph"),a=r.enter("phrasing"),i=r.containerPhrasing(e,n);return a(),o(),i}var ZO=yl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function k7(e,t,r,n){return(e.children.some(function(i){return ZO(i)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function C7(e){let t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GO.peek=Gxe;function GO(e,t,r,n){let o=C7(r),a=r.enter("strong"),i=r.createTracker(n),s=i.move(o+o),l=i.move(r.containerPhrasing(e,{after:o,before:s,...i.current()})),u=l.charCodeAt(0),c=gp(n.before.charCodeAt(n.before.length-1),u,o);c.inside&&(l=xl(u)+l.slice(1));let d=l.charCodeAt(l.length-1),f=gp(n.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+xl(d));let p=i.move(o+o);return a(),r.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},s+l+p}function Gxe(e,t,r){return r.options.strong||"*"}function _7(e,t,r,n){return r.safe(e.value,n)}function T7(e){let t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function P7(e,t,r){let n=(AC(r)+(r.options.ruleSpaces?" ":"")).repeat(T7(r));return r.options.ruleSpaces?n.slice(0,-1):n}var Py={blockquote:s7,break:zO,code:p7,definition:m7,emphasis:FO,hardBreak:zO,heading:y7,html:BO,image:jO,imageReference:UO,inlineCode:VO,link:HO,linkReference:WO,list:b7,listItem:S7,paragraph:I7,root:k7,strong:GO,text:_7,thematicBreak:P7};function JO(){return{enter:{table:Kxe,tableData:L7,tableHeader:L7,tableRow:Xxe},exit:{codeText:Yxe,table:Jxe,tableData:KO,tableHeader:KO,tableRow:KO}}}function Kxe(e){let t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function Jxe(e){this.exit(e),this.data.inTable=void 0}function Xxe(e){this.enter({type:"tableRow",children:[]},e)}function KO(e){this.exit(e)}function L7(e){this.enter({type:"tableCell",children:[]},e)}function Yxe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qxe));let r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Qxe(e,t){return t==="|"?t:e}function XO(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,o=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
133
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:i,tableCell:l,tableRow:s}};function i(p,m,h,v){return u(c(p,h,v),p.align)}function s(p,m,h,v){let g=d(p,h,v),y=u([g]);return y.slice(0,y.indexOf(`
|
|
134
|
+
`))}function l(p,m,h,v){let g=h.enter("tableCell"),y=h.enter("phrasing"),x=h.containerPhrasing(p,{...v,before:a,after:a});return y(),g(),x}function u(p,m){return i7(p,{align:m,alignDelimiters:n,padding:r,stringLength:o})}function c(p,m,h){let v=p.children,g=-1,y=[],x=m.enter("table");for(;++g<v.length;)y[g]=d(v[g],m,h);return x(),y}function d(p,m,h){let v=p.children,g=-1,y=[],x=m.enter("tableRow");for(;++g<v.length;)y[g]=l(v[g],p,m,h);return x(),y}function f(p,m,h){let v=Py.inlineCode(p,m,h);return h.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function YO(){return{exit:{taskListCheckValueChecked:E7,taskListCheckValueUnchecked:E7,paragraph:eve}}}function QO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tve}}}function E7(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function eve(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let n=r.children[0];if(n&&n.type==="text"){let o=t.children,a=-1,i;for(;++a<o.length;){let s=o[a];if(s.type==="paragraph"){i=s;break}}i===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function tve(e,t,r,n){let o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(i);let l=Py.listItem(e,t,r,{...n,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+i}}function eN(){return[RO(),$O(),OO(),JO(),YO()]}function tN(e){return{extensions:[MO(),DO(e),NO(),XO(e),QO()]}}var rve={tokenize:sve,partial:!0},A7={tokenize:lve,partial:!0},R7={tokenize:uve,partial:!0},M7={tokenize:cve,partial:!0},nve={tokenize:dve,partial:!0},$7={name:"wwwAutolink",tokenize:ave,previous:O7},D7={name:"protocolAutolink",tokenize:ive,previous:N7},Fi={name:"emailAutolink",tokenize:ove,previous:z7},qa={};function nN(){return{text:qa}}var lc=48;for(;lc<123;)qa[lc]=Fi,lc++,lc===58?lc=65:lc===91&&(lc=97);qa[43]=Fi;qa[45]=Fi;qa[46]=Fi;qa[95]=Fi;qa[72]=[Fi,D7];qa[104]=[Fi,D7];qa[87]=[Fi,$7];qa[119]=[Fi,$7];function ove(e,t,r){let n=this,o,a;return i;function i(d){return!rN(d)||!z7.call(n,n.previous)||oN(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return rN(d)?(e.consume(d),s):d===64?(e.consume(d),l):r(d)}function l(d){return d===46?e.check(nve,c,u)(d):d===45||d===95||Vt(d)?(a=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),o=!0,l}function c(d){return a&&o&&dr(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function ave(e,t,r){let n=this;return o;function o(i){return i!==87&&i!==119||!O7.call(n,n.previous)||oN(n.events)?r(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rve,e.attempt(A7,e.attempt(R7,a),r),r)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function ive(e,t,r){let n=this,o="",a=!1;return i;function i(d){return(d===72||d===104)&&N7.call(n,n.previous)&&!oN(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(dr(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){let f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return r(d)}function l(d){return d===47?(e.consume(d),a?u:(a=!0,l)):r(d)}function u(d){return d===null||ec(d)||Me(d)||Ua(d)||tc(d)?r(d):e.attempt(A7,e.attempt(R7,c),r)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function sve(e,t,r){let n=0;return o;function o(i){return(i===87||i===119)&&n<3?(n++,e.consume(i),o):i===46&&n===3?(e.consume(i),a):r(i)}function a(i){return i===null?r(i):t(i)}}function lve(e,t,r){let n,o,a;return i;function i(u){return u===46||u===95?e.check(M7,l,s)(u):u===null||Me(u)||Ua(u)||u!==45&&tc(u)?l(u):(a=!0,e.consume(u),i)}function s(u){return u===95?n=!0:(o=n,n=void 0),e.consume(u),i}function l(u){return o||n||!a?r(u):t(u)}}function uve(e,t){let r=0,n=0;return o;function o(i){return i===40?(r++,e.consume(i),o):i===41&&n<r?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(M7,t,a)(i):i===null||Me(i)||Ua(i)?t(i):(e.consume(i),o)}function a(i){return i===41&&n++,e.consume(i),o}}function cve(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),a):s===93?(e.consume(s),o):s===60||s===null||Me(s)||Ua(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||Me(s)||Ua(s)?t(s):n(s)}function a(s){return dr(s)?i(s):r(s)}function i(s){return s===59?(e.consume(s),n):dr(s)?(e.consume(s),i):r(s)}}function dve(e,t,r){return n;function n(a){return e.consume(a),o}function o(a){return Vt(a)?r(a):t(a)}}function O7(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function N7(e){return!dr(e)}function z7(e){return!(e===47||rN(e))}function rN(e){return e===43||e===45||e===46||e===95||Vt(e)}function oN(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var fve={tokenize:vve,partial:!0};function aN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gve,continuation:{tokenize:yve},exit:xve}},text:{91:{name:"gfmFootnoteCall",tokenize:hve},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pve,resolveTo:mve}}}}function pve(e,t,r){let n=this,o=n.events.length,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),i;for(;o--;){let l=n.events[o][1];if(l.type==="labelImage"){i=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!i||!i._balanced)return r(l);let u=Ur(n.sliceSerialize({start:i.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function mve(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;let i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...l),e}function hve(e,t,r){let n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a=0,i;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!i||d===null||d===91||Me(d))return r(d);if(d===93){e.exit("chunkString");let f=e.exit("gfmFootnoteCallString");return o.includes(Ur(n.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return Me(d)||(i=!0),a++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function gve(e,t,r){let n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),a,i=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(m)}function c(m){if(i>999||m===93&&!s||m===null||m===91||Me(m))return r(m);if(m===93){e.exit("chunkString");let h=e.exit("gfmFootnoteDefinitionLabelString");return a=Ur(n.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Me(m)||(s=!0),i++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),i++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(a)||o.push(a),me(e,p,"gfmFootnoteDefinitionWhitespace")):r(m)}function p(m){return t(m)}}function yve(e,t,r){return e.check(Va,t,e.attempt(fve,t,r))}function xve(e){e.exit("gfmFootnoteDefinition")}function vve(e,t,r){let n=this;return me(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){let i=n.events[n.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):r(a)}}function iN(e){let r=(e||{}).singleTilde,n={name:"strikethrough",tokenize:a,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let u=l;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[l][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[l][1].end)},d={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[l][1].start)},f=[["enter",c,s],["enter",i[u][1],s],["exit",i[u][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&Gt(f,f.length,0,hl(p,i.slice(u+1,l),s)),Gt(f,f.length,0,[["exit",d,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",c,s]]),Gt(i,u-1,l-u+3,f),l=u+f.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type="data");return i}function a(i,s,l){let u=this.previous,c=this.events,d=0;return f;function f(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(i.enter("strikethroughSequenceTemporary"),p(m))}function p(m){let h=zi(u);if(m===126)return d>1?l(m):(i.consume(m),d++,p);if(d<2&&!r)return l(m);let v=i.exit("strikethroughSequenceTemporary"),g=zi(m);return v._open=!g||g===2&&!!h,v._close=!h||h===2&&!!g,s(m)}}}var RC=class{constructor(){this.map=[]}add(t,r,n){bve(this,t,r,n)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let o=n.pop();for(;o;){for(let a of o)t.push(a);o=n.pop()}this.map.length=0}};function bve(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function F7(e,t){let r=!1,n=[];for(;t<e.length;){let o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function sN(){return{flow:{null:{name:"table",tokenize:wve,resolveAll:Sve}}}}function wve(e,t,r){let n=this,o=0,a=0,i;return s;function s(L){let j=n.events.length-1;for(;j>-1;){let K=n.events[j][1].type;if(K==="lineEnding"||K==="linePrefix")j--;else break}let Y=j>-1?n.events[j][1].type:null,F=Y==="tableHead"||Y==="tableRow"?I:l;return F===I&&n.parser.lazy[n.now().line]?r(L):F(L)}function l(L){return e.enter("tableHead"),e.enter("tableRow"),u(L)}function u(L){return L===124||(i=!0,a+=1),c(L)}function c(L){return L===null?r(L):ie(L)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),p):r(L):he(L)?me(e,c,"whitespace")(L):(a+=1,i&&(i=!1,o+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),d(L)))}function d(L){return L===null||L===124||Me(L)?(e.exit("data"),c(L)):(e.consume(L),L===92?f:d)}function f(L){return L===92||L===124?(e.consume(L),d):d(L)}function p(L){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(L):(e.enter("tableDelimiterRow"),i=!1,he(L)?me(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):m(L))}function m(L){return L===45||L===58?v(L):L===124?(i=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),h):_(L)}function h(L){return he(L)?me(e,v,"whitespace")(L):v(L)}function v(L){return L===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),g):L===45?(a+=1,g(L)):L===null||ie(L)?b(L):_(L)}function g(L){return L===45?(e.enter("tableDelimiterFiller"),y(L)):_(L)}function y(L){return L===45?(e.consume(L),y):L===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(L))}function x(L){return he(L)?me(e,b,"whitespace")(L):b(L)}function b(L){return L===124?m(L):L===null||ie(L)?!i||o!==a?_(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):_(L)}function _(L){return r(L)}function I(L){return e.enter("tableRow"),C(L)}function C(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),C):L===null||ie(L)?(e.exit("tableRow"),t(L)):he(L)?me(e,C,"whitespace")(L):(e.enter("data"),k(L))}function k(L){return L===null||L===124||Me(L)?(e.exit("data"),C(L)):(e.consume(L),L===92?M:k)}function M(L){return L===92||L===124?(e.consume(L),k):k(L)}}function Sve(e,t){let r=-1,n=!0,o=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,l=0,u,c,d,f=new RC;for(;++r<e.length;){let p=e[r],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(B7(f,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(r,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,d=void 0,a=[0,0,0,0],i=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(r,0,[["enter",c,t]])),o=m.type==="tableDelimiterRow"?2:c?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],d=MC(f,t,a,o,void 0,d),a=[0,0,0,0]),i[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(i[0]=i[1],d=MC(f,t,a,o,void 0,d)),a=i,i=[a[1],r,0,0])):m.type==="tableHead"?(s=!0,l=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=r,a[1]!==0?(i[0]=i[1],d=MC(f,t,a,o,r,d)):i[1]!==0&&(d=MC(f,t,i,o,r,d)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(i[3]=r)}for(l!==0&&B7(f,t,l,u,c),f.consume(t.events),r=-1;++r<t.events.length;){let p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=F7(t.events,r))}return e}function MC(e,t,r,n,o,a){let i=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},xp(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));let l=xp(t.events,r[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){let u=xp(t.events,r[2]),c=xp(t.events,r[3]),d={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){let f=t.events[r[2]],p=t.events[r[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,h=r[3]-r[2]-1;e.add(m,h,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(a.end=Object.assign({},xp(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function B7(e,t,r,n,o){let a=[],i=xp(t.events,r);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),n.end=Object.assign({},i),a.push(["exit",n,t]),e.add(r+1,0,a)}function xp(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var Ive={name:"tasklistCheck",tokenize:kve};function lN(){return{text:{91:Ive}}}function kve(e,t,r){let n=this;return o;function o(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Me(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):r(l)}function i(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(l)}function s(l){return ie(l)?t(l):he(l)?e.check({tokenize:Cve},t,r)(l):r(l)}}function Cve(e,t,r){return me(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function j7(e){return iC([nN(),aN(),iN(e),sN(),lN()])}var _ve={};function vp(e){let t=this,r=e||_ve,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(j7(r)),a.push(eN()),i.push(tN(r))}var VC=S(A(),1);var DC=S(A());var U7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tve=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),uN=e=>{let t=Tve(e);return t.charAt(0).toUpperCase()+t.slice(1)},$C=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),V7=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ly=S(A());var q7={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"};var H7=(0,Ly.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,Ly.createElement)("svg",{ref:l,...q7,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:$C("lucide",o),...!a&&!V7(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Ly.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var re=(e,t)=>{let r=(0,DC.forwardRef)(({className:n,...o},a)=>(0,DC.createElement)(H7,{ref:a,iconNode:t,className:$C(`lucide-${U7(uN(e))}`,`lucide-${e}`,n),...o}));return r.displayName=uN(e),r};var Pve=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],Ey=re("archive-restore",Pve);var Lve=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],bp=re("archive",Lve);var Eve=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ay=re("arrow-down",Eve);var Ave=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ry=re("arrow-up",Ave);var Rve=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],My=re("at-sign",Rve);var Mve=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["line",{x1:"12",x2:"12.01",y1:"17",y2:"17",key:"io3f8k"}]],vl=re("badge-question-mark",Mve);var $ve=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],bl=re("chart-column",$ve);var Dve=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],la=re("check",Dve);var Ove=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uc=re("chevron-down",Ove);var Nve=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],$y=re("chevron-left",Nve);var zve=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Dy=re("chevron-right",zve);var Fve=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Oy=re("chevron-up",Fve);var Bve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["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"}]],ua=re("circle-question-mark",Bve);var jve=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],wl=re("circle-x",jve);var Uve=[["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"}]],Bi=re("copy",Uve);var Vve=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],cc=re("download",Vve);var qve=[["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"}]],dc=re("external-link",qve);var Hve=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Yn=re("file-text",Hve);var Wve=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ji=re("file",Wve);var Zve=[["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"}]],Ny=re("globe",Zve);var Gve=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],wp=re("headphones",Gve);var Kve=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Sl=re("layers",Kve);var Jve=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],fc=re("link",Jve);var Xve=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ha=re("loader-circle",Xve);var Yve=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],zy=re("loader",Yve);var Qve=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],Fy=re("message-square-text",Qve);var ebe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],By=re("message-square",ebe);var tbe=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],jy=re("network",tbe);var rbe=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Uy=re("paperclip",rbe);var nbe=[["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"}]],Vy=re("pencil",nbe);var obe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qy=re("plus",obe);var abe=[["path",{d:"M13 17a1 1 0 1 0-2 0l.5 4.5a0.5 0.5 0 0 0 1 0z",fill:"currentColor",key:"x1mxqr"}],["path",{d:"M16.85 18.58a9 9 0 1 0-9.7 0",key:"d71mpg"}],["path",{d:"M8 14a5 5 0 1 1 8 0",key:"fc81rn"}],["circle",{cx:"12",cy:"11",r:"1",fill:"currentColor",key:"vqiwd"}]],Hy=re("podcast",abe);var ibe=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Wy=re("presentation",ibe);var sbe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Zy=re("refresh-cw",sbe);var lbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Gy=re("square",lbe);var ube=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sp=re("trash-2",ube);var cbe=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Ui=re("video",cbe);var dbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]],Ky=re("wallet-cards",dbe);var fbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vi=re("x",fbe);function W7(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=W7(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function OC(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=W7(e))&&(n&&(n+=" "),n+=t);return n}var pbe=(e,t)=>{let r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},mbe=(e,t)=>({classGroupId:e,validator:t}),X7=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r});var Z7=[],hbe="arbitrary..",gbe=e=>{let t=xbe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ybe(i);let s=i.split("-"),l=s[0]===""&&s.length>1?1:0;return Y7(s,l,t)},getConflictingClassGroupIds:(i,s)=>{if(s){let l=n[i],u=r[i];return l?u?pbe(u,l):l:u||Z7}return r[i]||Z7}}},Y7=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;let o=e[t],a=r.nextPart.get(o);if(a){let u=Y7(e,t+1,a);if(u)return u}let i=r.validators;if(i===null)return;let s=t===0?e.join("-"):e.slice(t).join("-"),l=i.length;for(let u=0;u<l;u++){let c=i[u];if(c.validator(s))return c.classGroupId}},ybe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?hbe+n:void 0})(),xbe=e=>{let{theme:t,classGroups:r}=e;return vbe(r,t)},vbe=(e,t)=>{let r=X7();for(let n in e){let o=e[n];fN(o,r,n,t)}return r},fN=(e,t,r,n)=>{let o=e.length;for(let a=0;a<o;a++){let i=e[a];bbe(i,t,r,n)}},bbe=(e,t,r,n)=>{if(typeof e=="string"){wbe(e,t,r);return}if(typeof e=="function"){Sbe(e,t,r,n);return}Ibe(e,t,r,n)},wbe=(e,t,r)=>{let n=e===""?t:Q7(t,e);n.classGroupId=r},Sbe=(e,t,r,n)=>{if(kbe(e)){fN(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(mbe(r,e))},Ibe=(e,t,r,n)=>{let o=Object.entries(e),a=o.length;for(let i=0;i<a;i++){let[s,l]=o[i];fN(l,Q7(t,s),r,n)}},Q7=(e,t)=>{let r=e,n=t.split("-"),o=n.length;for(let a=0;a<o;a++){let i=n[a],s=r.nextPart.get(i);s||(s=X7(),r.nextPart.set(i,s)),r=s}return r},kbe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Cbe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),o=(a,i)=>{r[a]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=n[a])!==void 0)return o(a,i),i},set(a,i){a in r?r[a]=i:o(a,i)}}};var _be=[],G7=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Tbe=e=>{let{prefix:t,experimentalParseClassName:r}=e,n=o=>{let a=[],i=0,s=0,l=0,u,c=o.length;for(let h=0;h<c;h++){let v=o[h];if(i===0&&s===0){if(v===":"){a.push(o.slice(l,h)),l=h+1;continue}if(v==="/"){u=h;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}let d=a.length===0?o:o.slice(l),f=d,p=!1;d.endsWith("!")?(f=d.slice(0,-1),p=!0):d.startsWith("!")&&(f=d.slice(1),p=!0);let m=u&&u>l?u-l:void 0;return G7(a,p,f,m)};if(t){let o=t+":",a=n;n=i=>i.startsWith(o)?a(i.slice(o.length)):G7(_be,!1,i,void 0,!0)}if(r){let o=n;n=a=>r({className:a,parseClassName:o})}return n},Pbe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{let n=[],o=[];for(let a=0;a<r.length;a++){let i=r[a],s=i[0]==="[",l=t.has(i);s||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Lbe=e=>({cache:Cbe(e.cacheSize),parseClassName:Tbe(e),sortModifiers:Pbe(e),...gbe(e)}),Ebe=/\s+/,Abe=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(Ebe),l="";for(let u=s.length-1;u>=0;u-=1){let c=s[u],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let v=!!h,g=n(v?m.substring(0,h):m);if(!g){if(!v){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}v=!1}let y=f.length===0?"":f.length===1?f[0]:a(f).join(":"),x=p?y+"!":y,b=x+g;if(i.indexOf(b)>-1)continue;i.push(b);let _=o(g,v);for(let I=0;I<_.length;++I){let C=_[I];i.push(x+C)}l=c+(l.length>0?" "+l:l)}return l},Rbe=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=eK(r))&&(o&&(o+=" "),o+=n);return o},eK=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=eK(e[n]))&&(r&&(r+=" "),r+=t);return r},Mbe=(e,...t)=>{let r,n,o,a,i=l=>{let u=t.reduce((c,d)=>d(c),e());return r=Lbe(u),n=r.cache.get,o=r.cache.set,a=s,s(l)},s=l=>{let u=n(l);if(u)return u;let c=Abe(l,r);return o(l,c),c};return a=i,(...l)=>a(Rbe(...l))},$be=[],fr=e=>{let t=r=>r[e]||$be;return t.isThemeGetter=!0,t},tK=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rK=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dbe=/^\d+\/\d+$/,Obe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Nbe=/\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$/,zbe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fbe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bbe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ip=e=>Dbe.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),Il=e=>!!e&&Number.isInteger(Number(e)),cN=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),qi=e=>Obe.test(e),jbe=()=>!0,Ube=e=>Nbe.test(e)&&!zbe.test(e),nK=()=>!1,Vbe=e=>Fbe.test(e),qbe=e=>Bbe.test(e),Hbe=e=>!de(e)&&!fe(e),Wbe=e=>kp(e,iK,nK),de=e=>tK.test(e),pc=e=>kp(e,sK,Ube),dN=e=>kp(e,Xbe,Ae),K7=e=>kp(e,oK,nK),Zbe=e=>kp(e,aK,qbe),NC=e=>kp(e,lK,Vbe),fe=e=>rK.test(e),Jy=e=>Cp(e,sK),Gbe=e=>Cp(e,Ybe),J7=e=>Cp(e,oK),Kbe=e=>Cp(e,iK),Jbe=e=>Cp(e,aK),zC=e=>Cp(e,lK,!0),kp=(e,t,r)=>{let n=tK.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Cp=(e,t,r=!1)=>{let n=rK.exec(e);return n?n[1]?t(n[1]):r:!1},oK=e=>e==="position"||e==="percentage",aK=e=>e==="image"||e==="url",iK=e=>e==="length"||e==="size"||e==="bg-size",sK=e=>e==="length",Xbe=e=>e==="number",Ybe=e=>e==="family-name",lK=e=>e==="shadow";var Qbe=()=>{let e=fr("color"),t=fr("font"),r=fr("text"),n=fr("font-weight"),o=fr("tracking"),a=fr("leading"),i=fr("breakpoint"),s=fr("container"),l=fr("spacing"),u=fr("radius"),c=fr("shadow"),d=fr("inset-shadow"),f=fr("text-shadow"),p=fr("drop-shadow"),m=fr("blur"),h=fr("perspective"),v=fr("aspect"),g=fr("ease"),y=fr("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...b(),fe,de],I=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],k=()=>[fe,de,l],M=()=>[Ip,"full","auto",...k()],L=()=>[Il,"none","subgrid",fe,de],j=()=>["auto",{span:["full",Il,fe,de]},Il,fe,de],Y=()=>[Il,"auto",fe,de],F=()=>["auto","min","max","fr",fe,de],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],se=()=>["auto",...k()],U=()=>[Ip,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,fe,de],ve=()=>[...b(),J7,K7,{position:[fe,de]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ne=()=>["auto","cover","contain",Kbe,Wbe,{size:[fe,de]}],It=()=>[cN,Jy,pc],E=()=>["","none","full",u,fe,de],Ve=()=>["",Ae,Jy,pc],fn=()=>["solid","dashed","dotted","double"],ns=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Je=()=>[Ae,cN,J7,K7],Lt=()=>["","none",m,fe,de],no=()=>["none",Ae,fe,de],Mr=()=>["none",Ae,fe,de],$n=()=>[Ae,fe,de],Dn=()=>[Ip,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qi],breakpoint:[qi],color:[jbe],container:[qi],"drop-shadow":[qi],ease:["in","out","in-out"],font:[Hbe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qi],shadow:[qi],spacing:["px",Ae],text:[qi],"text-shadow":[qi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ip,de,fe,v]}],container:["container"],columns:[{columns:[Ae,de,fe,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Il,"auto",fe,de]}],basis:[{basis:[Ip,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Ip,"auto","initial","none",de]}],grow:[{grow:["",Ae,fe,de]}],shrink:[{shrink:["",Ae,fe,de]}],order:[{order:[Il,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:se()}],mx:[{mx:se()}],my:[{my:se()}],ms:[{ms:se()}],me:[{me:se()}],mt:[{mt:se()}],mr:[{mr:se()}],mb:[{mb:se()}],ml:[{ml:se()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[s,"screen",...U()]}],"min-w":[{"min-w":[s,"screen","none",...U()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,Jy,pc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,fe,dN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cN,de]}],"font-family":[{font:[Gbe,de,t]}],"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:[o,fe,de]}],"line-clamp":[{"line-clamp":[Ae,"none",fe,dN]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",fe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fn(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",fe,pc]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Ae,"auto",fe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:Ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Il,fe,de],radial:["",fe,de],conic:[Il,fe,de]},Jbe,Zbe]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:It()}],"gradient-via-pos":[{via:It()}],"gradient-to-pos":[{to:It()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:E()}],"rounded-s":[{"rounded-s":E()}],"rounded-e":[{"rounded-e":E()}],"rounded-t":[{"rounded-t":E()}],"rounded-r":[{"rounded-r":E()}],"rounded-b":[{"rounded-b":E()}],"rounded-l":[{"rounded-l":E()}],"rounded-ss":[{"rounded-ss":E()}],"rounded-se":[{"rounded-se":E()}],"rounded-ee":[{"rounded-ee":E()}],"rounded-es":[{"rounded-es":E()}],"rounded-tl":[{"rounded-tl":E()}],"rounded-tr":[{"rounded-tr":E()}],"rounded-br":[{"rounded-br":E()}],"rounded-bl":[{"rounded-bl":E()}],"border-w":[{border:Ve()}],"border-w-x":[{"border-x":Ve()}],"border-w-y":[{"border-y":Ve()}],"border-w-s":[{"border-s":Ve()}],"border-w-e":[{"border-e":Ve()}],"border-w-t":[{"border-t":Ve()}],"border-w-r":[{"border-r":Ve()}],"border-w-b":[{"border-b":Ve()}],"border-w-l":[{"border-l":Ve()}],"divide-x":[{"divide-x":Ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fn(),"hidden","none"]}],"divide-style":[{divide:[...fn(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...fn(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,fe,de]}],"outline-w":[{outline:["",Ae,Jy,pc]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",c,zC,NC]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,zC,NC]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Ae,pc]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":Ve()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",f,zC,NC]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Ae,fe,de]}],"mix-blend":[{"mix-blend":[...ns(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ns()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":Je()}],"mask-image-linear-to-pos":[{"mask-linear-to":Je()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":Je()}],"mask-image-t-to-pos":[{"mask-t-to":Je()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":Je()}],"mask-image-r-to-pos":[{"mask-r-to":Je()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":Je()}],"mask-image-b-to-pos":[{"mask-b-to":Je()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":Je()}],"mask-image-l-to-pos":[{"mask-l-to":Je()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":Je()}],"mask-image-x-to-pos":[{"mask-x-to":Je()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":Je()}],"mask-image-y-to-pos":[{"mask-y-to":Je()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[fe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":Je()}],"mask-image-radial-to-pos":[{"mask-radial-to":Je()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":Je()}],"mask-image-conic-to-pos":[{"mask-conic-to":Je()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:Ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,de]}],filter:[{filter:["","none",fe,de]}],blur:[{blur:Lt()}],brightness:[{brightness:[Ae,fe,de]}],contrast:[{contrast:[Ae,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",p,zC,NC]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",Ae,fe,de]}],"hue-rotate":[{"hue-rotate":[Ae,fe,de]}],invert:[{invert:["",Ae,fe,de]}],saturate:[{saturate:[Ae,fe,de]}],sepia:[{sepia:["",Ae,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":Lt()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",Ae,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",fe,de]}],ease:[{ease:["linear","initial",g,fe,de]}],delay:[{delay:[Ae,fe,de]}],animate:[{animate:["none",y,fe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,fe,de]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:no()}],"rotate-x":[{"rotate-x":no()}],"rotate-y":[{"rotate-y":no()}],"rotate-z":[{"rotate-z":no()}],scale:[{scale:Mr()}],"scale-x":[{"scale-x":Mr()}],"scale-y":[{"scale-y":Mr()}],"scale-z":[{"scale-z":Mr()}],"scale-3d":["scale-3d"],skew:[{skew:$n()}],"skew-x":[{"skew-x":$n()}],"skew-y":[{"skew-y":$n()}],transform:[{transform:[fe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Dn()}],"translate-x":[{"translate-x":Dn()}],"translate-y":[{"translate-y":Dn()}],"translate-z":[{"translate-z":Dn()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",fe,de]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",fe,de]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[Ae,Jy,pc,dN]}],stroke:[{stroke:["none",...N()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var uK=Mbe(Qbe);function ue(...e){return uK(OC(e))}var DK=S(A(),1);var _e=S(A(),1);var Xy=S(A(),1);var FC=S(D(),1);var ewe=Symbol("radix.slottable");function cK(e){let t=({children:r})=>(0,FC.jsx)(FC.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ewe,t}var dK=S(A(),1);var fK=S(D(),1),twe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rwe="VisuallyHidden",pK=dK.forwardRef((e,t)=>(0,fK.jsx)(vt.span,{...e,ref:t,style:{...twe,...e.style}}));pK.displayName=rwe;var mK=pK;var nr=S(D(),1),[BC,ctt]=Bs("Tooltip",[Fd]),jC=Fd(),hK="TooltipProvider",owe=700,pN="tooltip.open",[awe,hN]=BC(hK),gK=e=>{let{__scopeTooltip:t,delayDuration:r=owe,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=_e.useRef(!0),s=_e.useRef(!1),l=_e.useRef(0);return _e.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,nr.jsx)(awe,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:_e.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:_e.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:_e.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};gK.displayName=hK;var Yy="Tooltip",[iwe,Qy]=BC(Yy),yK=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=hN(Yy,e.__scopeTooltip),u=jC(t),[c,d]=_e.useState(null),f=Us(),p=_e.useRef(0),m=i??l.disableHoverableContent,h=s??l.delayDuration,v=_e.useRef(!1),[g,y]=Bd({prop:n,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(pN))):l.onClose(),a?.(C)},caller:Yy}),x=_e.useMemo(()=>g?v.current?"delayed-open":"instant-open":"closed",[g]),b=_e.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,y(!0)},[y]),_=_e.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),I=_e.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,y(!0),p.current=0},h)},[h,y]);return _e.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,nr.jsx)(Kw,{...u,children:(0,nr.jsx)(iwe,{scope:t,contentId:f,open:g,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:_e.useCallback(()=>{l.isOpenDelayedRef.current?I():b()},[l.isOpenDelayedRef,I,b]),onTriggerLeave:_e.useCallback(()=>{m?_():(window.clearTimeout(p.current),p.current=0)},[_,m]),onOpen:b,onClose:_,disableHoverableContent:m,children:r})})};yK.displayName=Yy;var mN="TooltipTrigger",xK=_e.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=Qy(mN,r),a=hN(mN,r),i=jC(r),s=_e.useRef(null),l=Ze(t,s,o.onTriggerChange),u=_e.useRef(!1),c=_e.useRef(!1),d=_e.useCallback(()=>u.current=!1,[]);return _e.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,nr.jsx)(zh,{asChild:!0,...i,children:(0,nr.jsx)(vt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:we(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:we(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:we(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:we(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:we(e.onBlur,o.onClose),onClick:we(e.onClick,o.onClose)})})});xK.displayName=mN;var gN="TooltipPortal",[swe,lwe]=BC(gN,{forceMount:void 0}),vK=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Qy(gN,t);return(0,nr.jsx)(swe,{scope:t,forceMount:r,children:(0,nr.jsx)(Yo,{present:r||a.open,children:(0,nr.jsx)(Eu,{asChild:!0,container:o,children:n})})})};vK.displayName=gN;var _p="TooltipContent",bK=_e.forwardRef((e,t)=>{let r=lwe(_p,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Qy(_p,e.__scopeTooltip);return(0,nr.jsx)(Yo,{present:n||i.open,children:i.disableHoverableContent?(0,nr.jsx)(wK,{side:o,...a,ref:t}):(0,nr.jsx)(uwe,{side:o,...a,ref:t})})}),uwe=_e.forwardRef((e,t)=>{let r=Qy(_p,e.__scopeTooltip),n=hN(_p,e.__scopeTooltip),o=_e.useRef(null),a=Ze(t,o),[i,s]=_e.useState(null),{trigger:l,onClose:u}=r,c=o.current,{onPointerInTransitChange:d}=n,f=_e.useCallback(()=>{s(null),d(!1)},[d]),p=_e.useCallback((m,h)=>{let v=m.currentTarget,g={x:m.clientX,y:m.clientY},y=pwe(g,v.getBoundingClientRect()),x=mwe(g,y),b=hwe(h.getBoundingClientRect()),_=ywe([...x,...b]);s(_),d(!0)},[d]);return _e.useEffect(()=>()=>f(),[f]),_e.useEffect(()=>{if(l&&c){let m=v=>p(v,c),h=v=>p(v,l);return l.addEventListener("pointerleave",m),c.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",h)}}},[l,c,p,f]),_e.useEffect(()=>{if(i){let m=h=>{let v=h.target,g={x:h.clientX,y:h.clientY},y=l?.contains(v)||c?.contains(v),x=!gwe(g,i);y?f():x&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,c,i,u,f]),(0,nr.jsx)(wK,{...e,ref:a})}),[cwe,dwe]=BC(Yy,{isInside:!1}),fwe=cK("TooltipContent"),wK=_e.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Qy(_p,r),u=jC(r),{onClose:c}=l;return _e.useEffect(()=>(document.addEventListener(pN,c),()=>document.removeEventListener(pN,c)),[c]),_e.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,nr.jsx)(Iu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,nr.jsxs)(Jw,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,nr.jsx)(fwe,{children:n}),(0,nr.jsx)(cwe,{scope:r,isInside:!0,children:(0,nr.jsx)(mK,{id:l.contentId,role:"tooltip",children:o||n})})]})})});bK.displayName=_p;var SK="TooltipArrow",IK=_e.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=jC(r);return dwe(SK,r).isInside?null:(0,nr.jsx)(Xw,{...o,...n,ref:t})});IK.displayName=SK;function pwe(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function mwe(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function hwe(e){let{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function gwe(e,t){let{x:r,y:n}=e,o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(o=!o)}return o}function ywe(e){let t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),xwe(t)}function xwe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let o=e[n];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();let r=[];for(let n=e.length-1;n>=0;n--){let o=e[n];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var kK=gK,CK=yK,_K=xK,TK=vK,PK=bK,LK=IK;var Hi=S(D(),1);function bwe({delayDuration:e=0,...t}){return(0,Hi.jsx)(kK,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function kl({...e}){return(0,Hi.jsx)(bwe,{children:(0,Hi.jsx)(CK,{"data-slot":"tooltip",...e})})}function Cl({...e}){return(0,Hi.jsx)(_K,{"data-slot":"tooltip-trigger",...e})}function _l({className:e,sideOffset:t=0,children:r,...n}){return(0,Hi.jsx)(TK,{children:(0,Hi.jsxs)(PK,{"data-slot":"tooltip-content",sideOffset:t,className:ue("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,(0,Hi.jsx)(LK,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var MK=S(A(),1);var EK=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AK=OC,RK=(e,t)=>r=>{var n;if(t?.variants==null)return AK(e,r?.class,r?.className);let{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{let c=r?.[u],d=a?.[u];if(c===null)return null;let f=EK(c)||EK(d);return o[u][f]}),s=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[h,v]=m;return Array.isArray(v)?v.includes({...a,...s}[h]):{...a,...s}[h]===v})?[...u,d,f]:u},[]);return AK(e,i,l,r?.class,r?.className)};var $K=S(D(),1),wwe=RK("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Tl=MK.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},a)=>(0,$K.jsx)(n?Fs:"button",{ref:a,"data-slot":"button","data-variant":t,"data-size":r,className:ue(wwe({variant:t,size:r,className:e})),...o}));Tl.displayName="Button";var Pl=S(D(),1),ht=(0,DK.forwardRef)(({children:e,tooltip:t,side:r="bottom",className:n,...o},a)=>(0,Pl.jsxs)(kl,{children:[(0,Pl.jsx)(Cl,{asChild:!0,children:(0,Pl.jsxs)(Tl,{variant:"ghost",size:"icon-sm",...o,ref:a,children:[(0,Pl.jsx)(IU,{children:e}),(0,Pl.jsx)("span",{className:"aui-sr-only sr-only",children:t})]})}),(0,Pl.jsx)(_l,{side:r,children:t})]}));ht.displayName="TooltipIconButton";var Ll=S(A(),1);var qr=S(D(),1),UC=({title:e,subtitle:t,isStreaming:r,isError:n=!1,icon:o,persistentContent:a,children:i,footer:s})=>{let[l,u]=(0,Ll.useState)(null),c=(0,Ll.useRef)(r),d=(0,Ll.useRef)(null),f=l??r;(0,Ll.useEffect)(()=>{r&&!c.current&&u(null),c.current=r},[r]),(0,Ll.useEffect)(()=>{r&&d.current&&(d.current.scrollTop=d.current.scrollHeight)});let p=()=>{if(o)return o;let h=ue("h-4 w-4",r&&"animate-spin");return r?(0,qr.jsx)(Ha,{className:h}):n?(0,qr.jsx)(wl,{className:"h-4 w-4 text-red-400"}):(0,qr.jsx)(la,{className:"h-4 w-4"})},m=()=>{r||u(h=>h===null?!0:!h)};return(0,qr.jsxs)("div",{className:"my-2 overflow-hidden rounded-xl border border-border shadow-sm",children:[(0,qr.jsxs)("div",{className:ue("flex items-center gap-2 p-2 cursor-pointer transition-colors text-white bg-primary-foreground",!r&&"hover:opacity-90"),onClick:m,children:[(0,qr.jsx)("div",{className:"flex items-center justify-center",children:p()}),(0,qr.jsxs)("div",{className:"flex-1 min-w-0",children:[t&&(0,qr.jsx)("p",{className:"font-medium opacity-80 leading-tight text-xs text-muted-foreground",children:t}),(0,qr.jsx)("h4",{className:"truncate font-semibold leading-tight text-sm text-muted-foreground",children:e})]}),(0,qr.jsx)("button",{className:"p-1 rounded hover:bg-white/20 transition-colors","aria-label":f?"Collapse":"Expand",onClick:h=>{h.stopPropagation(),m()},children:f?(0,qr.jsx)(Oy,{className:"h-4 w-4"}):(0,qr.jsx)(uc,{className:"h-4 w-4"})})]}),a,f&&(0,qr.jsx)("div",{ref:d,className:"p-2 max-h-[400px] overflow-y-auto bg-secondary",children:i}),f&&s&&(0,qr.jsx)("div",{className:"flex items-center justify-end gap-2 border-t border-white/10 p-2 bg-primary-foreground/80",children:s})]})};var st=S(D(),1),Swe=({copiedDuration:e=3e3}={})=>{let[t,r]=(0,VC.useState)(!1);return{isCopied:t,copyToClipboard:o=>{o&&navigator.clipboard.writeText(o).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},OK=(0,VC.memo)(({content:e})=>(0,st.jsx)("div",{className:"aui-md max-w-none text-white",children:(0,st.jsx)(Ty,{remarkPlugins:[vp],components:{h1:({className:t,...r})=>(0,st.jsx)("h1",{className:ue("mb-2 font-extrabold tracking-tight last:mb-0 text-white",t),style:{fontSize:"12px"},...r}),h2:({className:t,...r})=>(0,st.jsx)("h2",{className:ue("mt-3 mb-1.5 font-semibold tracking-tight first:mt-0 last:mb-0 text-white",t),style:{fontSize:"10px"},...r}),h3:({className:t,...r})=>(0,st.jsx)("h3",{className:ue("mt-2 mb-1 font-semibold tracking-tight first:mt-0 last:mb-0 text-white",t),style:{fontSize:"9px"},...r}),p:({className:t,...r})=>(0,st.jsx)("p",{className:ue("mt-1.5 mb-1.5 leading-relaxed first:mt-0 last:mb-0 text-white/90",t),...r}),ul:({className:t,...r})=>(0,st.jsx)("ul",{className:ue("my-1.5 ml-3 list-disc [&>li]:mt-0.5 text-white/90",t),...r}),ol:({className:t,...r})=>(0,st.jsx)("ol",{className:ue("my-1.5 ml-3 list-decimal [&>li]:mt-0.5 text-white/90",t),...r}),blockquote:({className:t,...r})=>(0,st.jsx)("blockquote",{className:ue("border-l-2 border-white/30 pl-2 italic text-white/70",t),...r}),pre:({className:t,...r})=>(0,st.jsx)("pre",{className:ue("overflow-x-auto rounded bg-black/30 p-1.5 text-white/90 my-1.5",t),...r}),code:({className:t,...r})=>{let n=!t?.includes("language-");return(0,st.jsx)("code",{className:ue(n&&"rounded bg-black/30 px-0.5 py-0.5 font-mono text-white/90",t),...r})},a:({className:t,...r})=>(0,st.jsx)("a",{className:ue("font-medium text-blue-300 underline underline-offset-2",t),target:"_blank",rel:"noopener noreferrer",...r}),hr:({className:t,...r})=>(0,st.jsx)("hr",{className:ue("my-2 border-b border-white/20",t),...r})},children:e})}));OK.displayName="MarkdownContent";var NK=ph({toolName:"generateDetailedAnswer",render:function({args:t,result:r,status:n}){let{isCopied:o,copyToClipboard:a}=Swe(),i=n.type==="running",s=n.type==="incomplete",l=r?.title||t.title||"Generating...",u=r?.content||t.content||"",c=r?.summary||t.summary||"";return(0,st.jsx)(UC,{title:l,isStreaming:i,isError:s,icon:!i&&!s?(0,st.jsx)(Yn,{className:"h-4 w-4"}):void 0,persistentContent:c?(0,st.jsx)("div",{className:"p-2 text-white/80 border-b border-white/10 bg-primary-foreground text-xs",children:c}):void 0,footer:u?(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(ht,{tooltip:o?"Copied!":"Copy markdown",onClick:()=>{u&&a(u)},className:"flex items-center justify-center rounded-md p-1.5 text-white/70 hover:bg-white/10 transition-colors",children:o?(0,st.jsx)(la,{className:"h-3.5 w-3.5"}):(0,st.jsx)(Bi,{className:"h-3.5 w-3.5"})}),(0,st.jsx)(ht,{tooltip:"Open in new window",onClick:()=>{let h=window.open("","_blank");h&&(h.document.write(`
|
|
135
|
+
<!DOCTYPE html>
|
|
136
|
+
<html>
|
|
137
|
+
<head>
|
|
138
|
+
<title>${l}</title>
|
|
139
|
+
<meta charset="utf-8">
|
|
140
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
141
|
+
<style>
|
|
142
|
+
body {
|
|
143
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
144
|
+
max-width: 800px;
|
|
145
|
+
margin: 0 auto;
|
|
146
|
+
padding: 2rem;
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
color: #1a1a1a;
|
|
149
|
+
}
|
|
150
|
+
h1 { border-bottom: 1px solid #eee; padding-bottom: 0.5rem; }
|
|
151
|
+
pre { background: #f5f5f5; padding: 1rem; overflow-x: auto; border-radius: 4px; }
|
|
152
|
+
code { background: #f5f5f5; padding: 0.2em 0.4em; border-radius: 3px; font-size: 0.9em; }
|
|
153
|
+
pre code { background: none; padding: 0; }
|
|
154
|
+
blockquote { border-left: 4px solid #ddd; margin: 0; padding-left: 1rem; color: #666; }
|
|
155
|
+
</style>
|
|
156
|
+
</head>
|
|
157
|
+
<body>
|
|
158
|
+
<h1>${l}</h1>
|
|
159
|
+
<div id="content">${u.replace(/</g,"<").replace(/>/g,">")}</div>
|
|
160
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"><\/script>
|
|
161
|
+
<script>
|
|
162
|
+
document.getElementById('content').innerHTML = marked.parse(${JSON.stringify(u)});
|
|
163
|
+
<\/script>
|
|
164
|
+
</body>
|
|
165
|
+
</html>
|
|
166
|
+
`),h.document.close())},className:"flex items-center justify-center rounded-md p-1.5 text-white/70 hover:bg-white/10 transition-colors",children:(0,st.jsx)(dc,{className:"h-3.5 w-3.5"})})]}):void 0,children:u?(0,st.jsx)(OK,{content:u}):(0,st.jsx)("p",{className:"text-muted-foreground italic",children:"Generating content..."})})}});var Lo=S(A(),1),BK=S(D(),1),zK=(0,Lo.createContext)(null);function FK({children:e}){let[t,r]=(0,Lo.useState)([]),n=(0,Lo.useCallback)(l=>{console.log("[MessageContext] Adding context item:",l.id,l.title),r(u=>u.some(c=>c.id===l.id)?(console.log("[MessageContext] Item already exists, skipping"),u):(console.log("[MessageContext] Context items count:",u.length+1),[...u,l]))},[]),o=(0,Lo.useCallback)(l=>{r(u=>u.filter(c=>c.id!==l))},[]),a=(0,Lo.useCallback)(()=>{console.log("[MessageContext] Clearing context"),r([])},[]),i=(0,Lo.useCallback)(l=>{r(l)},[]),s=(0,Lo.useCallback)(()=>{let l=t;return console.log("[MessageContext] Consuming context:",l.length,"items"),l},[t]);return(0,BK.jsx)(zK.Provider,{value:{selectedContext:t,addContextItem:n,removeContextItem:o,clearContext:a,setContext:i,consumeContext:s},children:e})}function Tp(){let e=(0,Lo.useContext)(zK);if(!e)throw new Error("useMessageContext must be used within a MessageContextProvider");return e}var ex={colors:{background:{primary:"#1a1a1a",secondary:"#2a2a2a",tertiary:"#3a3a3a"},accent:{primary:"#c9a227",hover:"#d4af37",muted:"rgba(201, 162, 39, 0.4)"},text:{primary:"#ffffff",secondary:"#888888",tertiary:"#cccccc",inverse:"#1a1a1a"},border:"#2a2a2a",shadow:"rgba(0, 0, 0, 0.4)"},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},radii:{sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem",full:"50%"},typography:{fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.7}},zIndex:{widget:9999,overlay:9998},shadows:{sm:"0 2px 8px rgba(0, 0, 0, 0.2)",md:"0 4px 16px rgba(0, 0, 0, 0.3)",lg:"0 8px 32px rgba(0, 0, 0, 0.4)",accent:"0 4px 16px rgba(201, 162, 39, 0.4)",accentHover:"0 6px 20px rgba(201, 162, 39, 0.5)"},transitions:{fast:"0.15s ease",normal:"0.2s ease",slow:"0.3s ease"}};var yN=Fk({key:"la-widget",prepend:!0});var El=S(A());qC();var kwe=!1,Cwe=xN,_we=function(t){return t!=="theme"},UK=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Cwe:_we},VK=function(t,r,n){var o;if(r){var a=r.shouldForwardProp;o=t.__emotion_forwardProp&&a?function(i){return t.__emotion_forwardProp(i)&&a(i)}:a}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Twe=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return sp(r,n,o),dy(function(){return ly(r,n,o)}),null},qK=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,a,i;r!==void 0&&(a=r.label,i=r.target);var s=VK(t,r,n),l=s||UK(o),u=!l("as");return function(){var c=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push("label:"+a+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{var f=c[0];d.push(f[0]);for(var p=c.length,m=1;m<p;m++)d.push(c[m],f[m])}var h=fy(function(v,g,y){var x=u&&v.as||o,b="",_=[],I=v;if(v.theme==null){I={};for(var C in v)I[C]=v[C];I.theme=El.useContext(Ku)}typeof v.className=="string"?b=sy(g.registered,_,v.className):v.className!=null&&(b=v.className+" ");var k=cy(d.concat(_),g.registered,I);b+=g.key+"-"+k.name,i!==void 0&&(b+=" "+i);var M=u&&s===void 0?UK(x):l,L={};for(var j in v)u&&j==="as"||M(j)&&(L[j]=v[j]);return L.className=b,y&&(L.ref=y),El.createElement(El.Fragment,null,El.createElement(Twe,{cache:g,serialized:k,isStringTag:typeof x=="string"}),El.createElement(x,L))});return h.displayName=a!==void 0?a:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return i===void 0&&kwe?"NO_COMPONENT_SELECTOR":"."+i}}),h.withComponent=function(v,g){var y=e(v,ip({},r,g,{shouldForwardProp:VK(h,g,!0)}));return y.apply(void 0,d)},h}};var Ytt=S(A());qC();var Pwe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],je=qK.bind(null);Pwe.forEach(function(e){je[e]=je(e)});var jx=S(D(),1),pa=S(A(),1);var HK=S(A(),1),Pp=(0,HK.createContext)({});var WK=S(A(),1);function Lp(e){let t=(0,WK.useRef)(null);return t.current===null&&(t.current=e()),t.current}var WC=S(A(),1);var HC=typeof window<"u";var ZC=HC?WC.useLayoutEffect:WC.useEffect;var kz=S(D(),1),oY=S(A(),1),Fx=S(A(),1);var ZK=S(A(),1),Al=(0,ZK.createContext)(null);var rY=S(D(),1);function mc(e,t){e.indexOf(t)===-1&&e.push(t)}function hc(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var or=(e,t,r)=>r>t?t:r<e?e:r;var Wi=()=>{},Eo=()=>{};var Hr={};var tx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function rx(e){return typeof e=="object"&&e!==null}var nx=e=>/^0[^.\s]+$/u.test(e);function gc(e){let t;return()=>(t===void 0&&(t=e()),t)}var Nt=e=>e;var Lwe=(e,t)=>r=>t(e(r)),ca=(...e)=>e.reduce(Lwe);var Wa=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Zi=class{constructor(){this.subscriptions=[]}add(t){return mc(this.subscriptions,t),()=>hc(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Ar=e=>e*1e3,pr=e=>e/1e3;function ox(e,t){return t?e*(1e3/t):0}var GK=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Ewe=1e-7,Awe=12;function Rwe(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=GK(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>Ewe&&++s<Awe);return i}function Rl(e,t,r,n){if(e===t&&r===n)return Nt;let o=a=>Rwe(a,0,1,e,r);return a=>a===0||a===1?a:GK(o(a),t,n)}var GC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var KC=e=>t=>1-e(1-t);var JC=Rl(.33,1.53,.69,.99),Ep=KC(JC),ax=GC(Ep);var ix=e=>(e*=2)<1?.5*Ep(e):.5*(2-Math.pow(2,-10*(e-1)));var sx=e=>1-Math.sin(Math.acos(e)),lx=KC(sx),ux=GC(sx);var vN=Rl(.42,0,1,1),bN=Rl(0,0,.58,1),cx=Rl(.42,0,.58,1);var wN=e=>Array.isArray(e)&&typeof e[0]!="number";var dx=e=>Array.isArray(e)&&typeof e[0]=="number";var KK={linear:Nt,easeIn:vN,easeInOut:cx,easeOut:bN,circIn:sx,circInOut:ux,circOut:lx,backIn:Ep,backInOut:ax,backOut:JC,anticipate:ix},Mwe=e=>typeof e=="string",XC=e=>{if(dx(e)){Eo(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return Rl(t,r,n,o)}else if(Mwe(e))return Eo(KK[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),KK[e];return e};var fx=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Qn={value:null,addProjectionMetrics:null};function JK(e,t){let r=new Set,n=new Set,o=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(s)}let c={schedule:(d,f=!1,p=!1)=>{let h=p&&o?r:n;return f&&i.add(d),h.has(d)||h.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(s=d,o){a=!0;return}o=!0,[r,n]=[n,r],r.forEach(u),t&&Qn.value&&Qn.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,c.process(d))}};return c}var $we=40;function YC(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=fx.reduce((x,b)=>(x[b]=JK(a,t?b:void 0),x),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:m}=i,h=()=>{let x=Hr.useManualTiming?o.timestamp:performance.now();r=!1,Hr.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,$we),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),p.process(o),m.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(h))},v=()=>{r=!0,n=!0,o.isProcessing||e(h)};return{schedule:fx.reduce((x,b)=>{let _=i[b];return x[b]=(I,C=!1,k=!1)=>(r||v(),_.schedule(I,C,k)),x},{}),cancel:x=>{for(let b=0;b<fx.length;b++)i[fx[b]].cancel(x)},state:o,steps:i}}var{schedule:Le,cancel:An,state:qt,steps:px}=YC(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nt,!0);var QC;function Dwe(){QC=void 0}var zt={now:()=>(QC===void 0&&zt.set(qt.isProcessing||Hr.useManualTiming?qt.timestamp:performance.now()),QC),set:e=>{QC=e,queueMicrotask(Dwe)}};var Za={layout:0,mainThread:0,waapi:0};var XK=e=>t=>typeof t=="string"&&t.startsWith(e),e_=XK("--"),Owe=XK("var(--"),Ap=e=>Owe(e)?Nwe.test(e.split("/*")[0].trim()):!1,Nwe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function SN(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var Ga={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gi={...Ga,transform:e=>or(0,1,e)},mx={...Ga,default:1};var Ml=e=>Math.round(e*1e5)/1e5;var Rp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function YK(e){return e==null}var QK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Mp=(e,t)=>r=>!!(typeof r=="string"&&QK.test(r)&&r.startsWith(e)||t&&!YK(r)&&Object.prototype.hasOwnProperty.call(r,t)),t_=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(Rp);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var zwe=e=>or(0,255,e),IN={...Ga,transform:e=>Math.round(zwe(e))},Ka={test:Mp("rgb","red"),parse:t_("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+IN.transform(e)+", "+IN.transform(t)+", "+IN.transform(r)+", "+Ml(Gi.transform(n))+")"};function Fwe(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var hx={test:Mp("#"),parse:Fwe,transform:Ka.transform};var gx=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),da=gx("deg"),Wr=gx("%"),ae=gx("px"),kN=gx("vh"),CN=gx("vw"),r_={...Wr,parse:e=>Wr.parse(e)/100,transform:e=>Wr.transform(e*100)};var $l={test:Mp("hsl","hue"),parse:t_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Wr.transform(Ml(t))+", "+Wr.transform(Ml(r))+", "+Ml(Gi.transform(n))+")"};var _t={test:e=>Ka.test(e)||hx.test(e)||$l.test(e),parse:e=>Ka.test(e)?Ka.parse(e):$l.test(e)?$l.parse(e):hx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ka.transform(e):$l.transform(e),getAnimatableNone:e=>{let t=_t.parse(e);return t.alpha=0,_t.transform(t)}};var eJ=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Bwe(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rp)?.length||0)+(e.match(eJ)?.length||0)>0}var rJ="number",nJ="color",jwe="var",Uwe="var(",tJ="${}",Vwe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function yc(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(Vwe,l=>(_t.test(l)?(n.color.push(a),o.push(nJ),r.push(_t.parse(l))):l.startsWith(Uwe)?(n.var.push(a),o.push(jwe),r.push(l)):(n.number.push(a),o.push(rJ),r.push(parseFloat(l))),++a,tJ)).split(tJ);return{values:r,split:s,indexes:n,types:o}}function oJ(e){return yc(e).values}function aJ(e){let{split:t,types:r}=yc(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===rJ?a+=Ml(o[i]):s===nJ?a+=_t.transform(o[i]):a+=o[i]}return a}}var qwe=e=>typeof e=="number"?0:_t.test(e)?_t.getAnimatableNone(e):e;function Hwe(e){let t=oJ(e);return aJ(e)(t.map(qwe))}var cn={test:Bwe,parse:oJ,createTransformer:aJ,getAnimatableNone:Hwe};function _N(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function iJ({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=_N(l,s,e+1/3),a=_N(l,s,e),i=_N(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function $p(e,t){return r=>r>0?t:e}var Oe=(e,t,r)=>e+(t-e)*r;var TN=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},Wwe=[hx,Ka,$l],Zwe=e=>Wwe.find(t=>t.test(e));function sJ(e){let t=Zwe(e);if(Wi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===$l&&(r=iJ(r)),r}var PN=(e,t)=>{let r=sJ(e),n=sJ(t);if(!r||!n)return $p(e,t);let o={...r};return a=>(o.red=TN(r.red,n.red,a),o.green=TN(r.green,n.green,a),o.blue=TN(r.blue,n.blue,a),o.alpha=Oe(r.alpha,n.alpha,a),Ka.transform(o))};var n_=new Set(["none","hidden"]);function lJ(e,t){return n_.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Gwe(e,t){return r=>Oe(e,t,r)}function o_(e){return typeof e=="number"?Gwe:typeof e=="string"?Ap(e)?$p:_t.test(e)?PN:Xwe:Array.isArray(e)?uJ:typeof e=="object"?_t.test(e)?PN:Kwe:$p}function uJ(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>o_(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function Kwe(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=o_(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function Jwe(e,t){let r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let a=t.types[o],i=e.indexes[a][n[a]],s=e.values[i]??0;r[o]=s,n[a]++}return r}var Xwe=(e,t)=>{let r=cn.createTransformer(t),n=yc(e),o=yc(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?n_.has(e)&&!o.values.length||n_.has(t)&&!n.values.length?lJ(e,t):ca(uJ(Jwe(n,o),o.values),r):(Wi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),$p(e,t))};function a_(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Oe(e,t,r):o_(e)(e,t)}var cJ=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Le.update(t,r),stop:()=>An(t),now:()=>qt.isProcessing?qt.timestamp:zt.now()}};var i_=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function Dp(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function dJ(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(Dp(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:pr(o)}}var Ywe=5;function s_(e,t,r){let n=Math.max(t-Ywe,0);return ox(r-e(n),t-n)}var St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var EN=.001;function fJ({duration:e=St.duration,bounce:t=St.bounce,velocity:r=St.velocity,mass:n=St.mass}){let o,a;Wi(e<=Ar(St.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=or(St.minDamping,St.maxDamping,i),e=or(St.minDuration,St.maxDuration,pr(e)),i<1?(o=u=>{let c=u*i,d=c*e,f=c-r,p=l_(u,i),m=Math.exp(-d);return EN-f/p*m},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,m=Math.exp(-d),h=l_(Math.pow(u,2),i);return(-o(u)+EN>0?-1:1)*((f-p)*m)/h}):(o=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-EN+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=eSe(o,a,s);if(e=Ar(e),isNaN(l))return{stiffness:St.stiffness,damping:St.damping,duration:e};{let u=Math.pow(l,2)*n;return{stiffness:u,damping:i*2*Math.sqrt(n*u),duration:e}}}var Qwe=12;function eSe(e,t,r){let n=r;for(let o=1;o<Qwe;o++)n=n-e(n)/t(n);return n}function l_(e,t){return e*Math.sqrt(1-t*t)}var tSe=["duration","bounce"],rSe=["stiffness","damping","mass"];function pJ(e,t){return t.some(r=>e[r]!==void 0)}function nSe(e){let t={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...e};if(!pJ(e,rSe)&&pJ(e,tSe))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:St.mass,stiffness:o,damping:a}}else{let r=fJ(e);t={...t,...r,mass:St.mass},t.isResolvedFromDuration=!0}return t}function Op(e=St.visualDuration,t=St.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=nSe({...r,velocity:-pr(r.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*c)),v=i-a,g=pr(Math.sqrt(l/c)),y=Math.abs(v)<5;n||(n=y?St.restSpeed.granular:St.restSpeed.default),o||(o=y?St.restDelta.granular:St.restDelta.default);let x;if(h<1){let _=l_(g,h);x=I=>{let C=Math.exp(-h*g*I);return i-C*((m+h*g*v)/_*Math.sin(_*I)+v*Math.cos(_*I))}}else if(h===1)x=_=>i-Math.exp(-g*_)*(v+(m+g*v)*_);else{let _=g*Math.sqrt(h*h-1);x=I=>{let C=Math.exp(-h*g*I),k=Math.min(_*I,300);return i-C*((m+h*g*v)*Math.sinh(k)+_*v*Math.cosh(k))/_}}let b={calculatedDuration:p&&d||null,next:_=>{let I=x(_);if(p)s.done=_>=d;else{let C=_===0?m:0;h<1&&(C=_===0?Ar(m):s_(x,_,I));let k=Math.abs(C)<=n,M=Math.abs(i-I)<=o;s.done=k&&M}return s.value=s.done?i:I,s},toString:()=>{let _=Math.min(Dp(b),2e4),I=i_(C=>b.next(_*C).value,_,30);return _+"ms "+I},toTransition:()=>{}};return b}Op.applyToOptions=e=>{let t=dJ(e,100,Op);return e.ease=t.ease,e.duration=Ar(t.duration),e.type="keyframes",e};function yx({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,m=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l,h=r*t,v=d+h,g=i===void 0?v:i(v);g!==v&&(h=g-d);let y=k=>-h*Math.exp(-k/n),x=k=>g+y(k),b=k=>{let M=y(k),L=x(k);f.done=Math.abs(M)<=u,f.value=f.done?g:L},_,I,C=k=>{p(f.value)&&(_=k,I=Op({keyframes:[f.value,m(f.value)],velocity:s_(x,k,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:k=>{let M=!1;return!I&&_===void 0&&(M=!0,b(k),C(k)),_!==void 0&&k>=_?I.next(k-_):(!M&&b(k),f)}}}function oSe(e,t,r){let n=[],o=r||Hr.mix||a_,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||Nt:t;s=ca(l,s)}n.push(s)}return n}function mJ(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Eo(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=oSe(t,n,o),l=s.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Wa(e[d],e[d+1],c);return s[d](f)};return r?c=>u(or(e[0],e[a-1],c)):u}function hJ(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Wa(0,t,n);e.push(Oe(r,1,o))}}function gJ(e){let t=[0];return hJ(t,e.length-1),t}function yJ(e,t){return e.map(r=>r*t)}function aSe(e,t){return e.map(()=>t||cx).splice(0,e.length-1)}function xc({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=wN(n)?n.map(XC):XC(n),a={done:!1,value:t[0]},i=yJ(r&&r.length===t.length?r:gJ(t),e),s=mJ(i,t,{ease:Array.isArray(o)?o:aSe(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var iSe=e=>e!==null;function Np(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(iSe),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var sSe={decay:yx,inertia:yx,tween:xc,keyframes:xc,spring:Op};function u_(e){typeof e.type=="string"&&(e.type=sSe[e.type])}var Dl=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var lSe=e=>e/100,Ol=class extends Dl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==zt.now()&&this.tick(zt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Za.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;u_(t);let{type:r=xc,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||xc;l!==xc&&typeof s[0]!="number"&&(this.mixKeyframes=ca(lSe,a_(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Dp(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:o,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,b=n;if(d){let k=Math.min(this.currentTime,o)/s,M=Math.floor(k),L=k%1;!L&&k>=1&&(L=1),L===1&&M--,M=Math.min(M,d+1),M%2&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(b=i)),x=or(0,1,L)*s}let _=y?{done:!1,value:c[0]}:b.next(x);a&&(_.value=a(_.value));let{done:I}=_;!y&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return C&&m!==yx&&(_.value=Np(c,this.options,v,this.speed)),h&&h(_.value),C&&this.finish(),_}then(t,r){return this.finished.then(t,r)}get duration(){return pr(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(this.currentTime)}set time(t){t=Ar(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(zt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=pr(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=cJ,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(zt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Za.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function xJ(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var vc=e=>e*180/Math.PI,AN=e=>{let t=vc(Math.atan2(e[1],e[0]));return RN(t)},uSe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:AN,rotateZ:AN,skewX:e=>vc(Math.atan(e[1])),skewY:e=>vc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},RN=e=>(e=e%360,e<0&&(e+=360),e),vJ=AN,bJ=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),wJ=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),cSe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bJ,scaleY:wJ,scale:e=>(bJ(e)+wJ(e))/2,rotateX:e=>RN(vc(Math.atan2(e[6],e[5]))),rotateY:e=>RN(vc(Math.atan2(-e[2],e[0]))),rotateZ:vJ,rotate:vJ,skewX:e=>vc(Math.atan(e[4])),skewY:e=>vc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function c_(e){return e.includes("scale")?1:0}function d_(e,t){if(!e||e==="none")return c_(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=cSe,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=uSe,o=s}if(!o)return c_(t);let a=n[t],i=o[1].split(",").map(dSe);return typeof a=="function"?a(i):i[a]}var SJ=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return d_(r,t)};function dSe(e){return parseFloat(e.trim())}var Ja=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ao=new Set(Ja);var MN=e=>e===Ga||e===ae,fSe=new Set(["x","y","z"]),pSe=Ja.filter(e=>!fSe.has(e));function IJ(e){let t=[];return pSe.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var Ki={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>d_(t,"x"),y:(e,{transform:t})=>d_(t,"y")};Ki.translateX=Ki.x;Ki.translateY=Ki.y;var bc=new Set,$N=!1,DN=!1,ON=!1;function kJ(){if(DN){let e=Array.from(bc).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=IJ(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{n.getValue(a)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}DN=!1,$N=!1,bc.forEach(e=>e.complete(ON)),bc.clear()}function CJ(){bc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(DN=!0)})}function _J(){ON=!0,CJ(),kJ(),ON=!1}var Nl=class{constructor(t,r,n,o,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(bc.add(this),$N||($N=!0,Le.read(CJ),Le.resolveKeyframes(kJ))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){let a=o?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){let s=n.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),o&&a===void 0&&o.set(t[0])}xJ(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),bc.delete(this)}cancel(){this.state==="scheduled"&&(bc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var TJ=e=>e.startsWith("--");function PJ(e,t,r){TJ(t)?e.style.setProperty(t,r):e.style[t]=r}var LJ=gc(()=>window.ScrollTimeline!==void 0);var EJ={};function AJ(e,t){let r=gc(e);return()=>EJ[t]??r()}var f_=AJ(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var wc=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var NN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wc([0,.65,.55,1]),circOut:wc([.55,0,1,.45]),backIn:wc([.31,.01,.66,-.59]),backOut:wc([.33,1.53,.69,.99])};function zN(e,t){if(e)return typeof e=="function"?f_()?i_(e,t):"ease-out":dx(e)?wc(e):Array.isArray(e)?e.map(r=>zN(r,t)||NN.easeOut):NN[e]}function RJ(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let d=zN(s,o);Array.isArray(d)&&(c.easing=d),Qn.value&&Za.waapi++;let f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(c,f);return Qn.value&&p.finished.finally(()=>{Za.waapi--}),p}function p_(e){return typeof e=="function"&&"applyToOptions"in e}function MJ({type:e,...t}){return p_(e)&&f_()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var m_=class extends Dl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:r,name:n,keyframes:o,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Eo(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=MJ(t);this.animation=RJ(r,n,o,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=Np(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):PJ(r,n,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return pr(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+pr(t)}get time(){return pr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ar(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&LJ()?(this.animation.timeline=t,Nt):r(this)}};var $J={anticipate:ix,backInOut:ax,circInOut:ux};function mSe(e){return e in $J}function DJ(e){typeof e.ease=="string"&&mSe(e.ease)&&(e.ease=$J[e.ease])}var FN=10,h_=class extends m_{constructor(t){DJ(t),u_(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:o,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new Ol({...i,autoplay:!1}),l=Math.max(FN,zt.now()-this.startTime),u=or(0,FN,l-FN);r.setWithVelocity(s.sample(Math.max(0,l-u)).value,s.sample(l).value,u),s.stop()}};var BN=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(cn.test(e)||e==="0")&&!e.startsWith("url("));function hSe(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function OJ(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=BN(o,t),s=BN(a,t);return Wi(i===s,`You are trying to animate ${t} from "${o}" to "${a}". "${i?a:o}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:hSe(e)||(r==="spring"||p_(r))&&n}function xx(e){e.duration=0,e.type="keyframes"}var gSe=new Set(["opacity","clipPath","filter","transform"]),ySe=gc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function NJ(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ySe()&&r&&gSe.has(r)&&(r!=="transform"||!u)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var xSe=40,g_=class extends Dl{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=zt.now();let f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Nl;this.keyframeResolver=new p(s,(m,h,v)=>this.onKeyframesResolved(m,h,f,!v),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=zt.now(),OJ(t,a,i,s)||((Hr.instantAnimations||!l)&&c?.(Np(t,n,r)),t[0]=t[t.length-1],xx(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>xSe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!u&&NJ(f)?new h_({...f,element:f.motionValue.owner.current}):new Ol(f);p.finished.then(()=>this.notifyFinished()).catch(Nt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),_J()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var vSe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bSe(e){let t=vSe.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var wSe=4;function jN(e,t,r=1){Eo(r<=wSe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=bSe(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return tx(i)?parseFloat(i):i}return Ap(o)?jN(o,t,r+1):o}function zp(e,t){return e?.[t]??e?.default??e}var SSe={type:"spring",stiffness:500,damping:25,restSpeed:10},ISe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kSe={type:"keyframes",duration:.8},CSe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zJ=(e,{keyframes:t})=>t.length>2?kSe:Ao.has(e)?e.startsWith("scale")?ISe(t[1]):SSe:CSe;function FJ({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var _Se=e=>e!==null;function BJ(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(_Se),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}function y_(e,t,r,n=0,o=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*n;return typeof r=="function"?r(a,i):o===1?a*n:s-a*n}var Sc=(e,t,r,n={},o,a)=>i=>{let s=zp(n,e)||{},l=s.delay||n.delay||0,{elapsed:u=0}=n;u=u-Ar(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};FJ(s)||Object.assign(c,zJ(e,c)),c.duration&&(c.duration=Ar(c.duration)),c.repeatDelay&&(c.repeatDelay=Ar(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(xx(c),c.delay===0&&(d=!0)),(Hr.instantAnimations||Hr.skipAnimations)&&(d=!0,xx(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=BJ(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new Ol(c):new g_(c)};var x_=new Set(["width","height","top","left","right","bottom",...Ja]);var jJ=30,TSe=e=>!isNaN(parseFloat(e)),UJ={current:void 0},UN=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=zt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=zt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=TSe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Zi);let n=this.events[t].add(r);return t==="change"?()=>{n(),Le.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return UJ.current&&UJ.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jJ)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,jJ);return ox(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fa(e,t){return new UN(e,t)}function VJ(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Ic(e,t,r,n){if(typeof t=="function"){let[o,a]=VJ(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=VJ(n);t=t(r!==void 0?r:e.custom,o,a)}return t}function Xa(e,t,r){let n=e.getProps();return Ic(n,t,r!==void 0?r:n.custom,e)}var vx=e=>Array.isArray(e);function PSe(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,fa(r))}function LSe(e){return vx(e)?e[e.length-1]||0:e}function qJ(e,t){let r=Xa(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=LSe(a[i]);PSe(e,i,s)}}var dt=e=>!!(e&&e.getVelocity);function HJ(e){return!!(dt(e)&&e.add)}function Fp(e,t){let r=e.getValue("willChange");if(HJ(r))return r.add(t);if(!r&&Hr.WillChange){let n=new Hr.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function Bp(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var WJ="framerAppearId",bx="data-"+Bp(WJ);function v_(e){return e.props[bx]}function ESe({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function b_(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;n&&(a=n);let l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let c in s){let d=e.getValue(c,e.latestValues[c]??null),f=s[c];if(f===void 0||u&&ESe(u,c))continue;let p={delay:r,...zp(a||{},c)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let g=v_(e);if(g){let y=window.MotionHandoffAnimation(g,c,Le);y!==null&&(p.startTime=y,h=!0)}}Fp(e,c),d.start(Sc(c,d,f,e.shouldReduceMotion&&x_.has(c)?{type:!1}:p,e,h));let v=d.animation;v&&l.push(v)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&qJ(e,i)})}),l}function w_(e,t,r={}){let n=Xa(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);let a=n?()=>Promise.all(b_(e,n,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=o;return ASe(e,t,l,u,c,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(r.delay)])}function ASe(e,t,r=0,n=0,o=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(w_(l,t,{...i,delay:r+(typeof n=="function"?0:n)+y_(e.variantChildren,l,n,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function ZJ(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>w_(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=w_(e,t,r);else{let o=typeof t=="function"?Xa(e,t,r.custom):t;n=Promise.all(b_(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var GJ={test:e=>e==="auto",parse:e=>e};var S_=e=>t=>t.test(e);var VN=[Ga,ae,Wr,da,CN,kN,GJ],qN=e=>VN.find(S_(e));function KJ(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||nx(e):!0}var RSe=new Set(["brightness","contrast","saturate","opacity"]);function MSe(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(Rp)||[];if(!n)return e;let o=r.replace(n,""),a=RSe.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var $Se=/\b([a-z-]*)\(.*?\)/gu,wx={...cn,getAnimatableNone:e=>{let t=e.match($Se);return t?t.map(MSe).join(" "):e}};var HN={...Ga,transform:Math.round};var JJ={rotate:da,rotateX:da,rotateY:da,rotateZ:da,scale:mx,scaleX:mx,scaleY:mx,scaleZ:mx,skew:da,skewX:da,skewY:da,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Gi,originX:r_,originY:r_,originZ:ae};var jp={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,inset:ae,insetBlock:ae,insetBlockStart:ae,insetBlockEnd:ae,insetInline:ae,insetInlineStart:ae,insetInlineEnd:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,paddingBlock:ae,paddingBlockStart:ae,paddingBlockEnd:ae,paddingInline:ae,paddingInlineStart:ae,paddingInlineEnd:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,marginBlock:ae,marginBlockStart:ae,marginBlockEnd:ae,marginInline:ae,marginInlineStart:ae,marginInlineEnd:ae,backgroundPositionX:ae,backgroundPositionY:ae,...JJ,zIndex:HN,fillOpacity:Gi,strokeOpacity:Gi,numOctaves:HN};var DSe={...jp,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:wx,WebkitFilter:wx},I_=e=>DSe[e];function k_(e,t){let r=I_(e);return r!==wx&&(r=cn),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var OSe=new Set(["auto","none","0"]);function XJ(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!OSe.has(a)&&yc(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=k_(r,o)}var C_=class extends Nl{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Ap(d))){let f=jN(d,r.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!x_.has(n)||t.length!==2)return;let[o,a]=t,i=qN(o),s=qN(a),l=SN(o),u=SN(a);if(l!==u&&Ki[n]){this.needsMeasurement=!0;return}if(i!==s)if(MN(i)&&MN(s))for(let c=0;c<t.length;c++){let d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else Ki[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||KJ(t[o]))&&n.push(o);n.length&&XJ(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ki[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);let a=n.length-1,i=n[a];n[a]=Ki[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function YJ(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}var __=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Sx(e){return rx(e)&&"offsetHeight"in e}var{schedule:kc,cancel:NSe}=YC(queueMicrotask,!1);var Ro={x:!1,y:!1};function T_(){return Ro.x||Ro.y}function WN(e){return e==="x"||e==="y"?Ro[e]?null:(Ro[e]=!0,()=>{Ro[e]=!1}):Ro.x||Ro.y?null:(Ro.x=Ro.y=!0,()=>{Ro.x=Ro.y=!1})}function P_(e,t){let r=YJ(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function QJ(e){return!(e.pointerType==="touch"||T_())}function ZN(e,t,r={}){let[n,o,a]=P_(e,r),i=s=>{if(!QJ(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{QJ(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var GN=(e,t)=>t?e===t?!0:GN(e,t.parentElement):!1;var Cc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var zSe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ix(e){return zSe.has(e.tagName)||e.isContentEditable===!0}var Up=new WeakSet;function eX(e){return t=>{t.key==="Enter"&&e(t)}}function KN(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tX=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=eX(()=>{if(Up.has(r))return;KN(r,"down");let o=eX(()=>{KN(r,"up")}),a=()=>KN(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function rX(e){return Cc(e)&&!T_()}function JN(e,t,r={}){let[n,o,a]=P_(e,r),i=s=>{let l=s.currentTarget;if(!rX(s))return;Up.add(l);let u=t(l,s),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Up.has(l)&&Up.delete(l),rX(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||GN(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),Sx(s)&&(s.addEventListener("focus",u=>tX(u,o)),!Ix(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function L_(e){return rx(e)&&"ownerSVGElement"in e}function nX(e){return L_(e)&&e.tagName==="svg"}var FSe=[...VN,_t,cn],oX=e=>FSe.find(S_(e));var XN=()=>({translate:0,scale:1,origin:0,originPoint:0}),zl=()=>({x:XN(),y:XN()}),YN=()=>({min:0,max:0}),Tt=()=>({x:YN(),y:YN()});var kx={current:null},E_={current:!1};var BSe=typeof window<"u";function aX(){if(E_.current=!0,!!BSe)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kx.current=e.matches;e.addEventListener("change",t),t()}else kx.current=!1}var iX=new WeakMap;function Ji(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ya(e){return typeof e=="string"||Array.isArray(e)}var A_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cx=["initial",...A_];function Fl(e){return Ji(e.animate)||Cx.some(t=>Ya(e[t]))}function _x(e){return!!(Fl(e)||e.variants)}function sX(e,t,r){for(let n in t){let o=t[n],a=r[n];if(dt(o))e.addValue(n,o);else if(dt(a))e.addValue(n,fa(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,fa(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var lX=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],R_={};function Px(e){R_=e}function QN(){return R_}var Tx=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=zt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Le.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Fl(r),this.isVariantNode=_x(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&dt(p)&&p.set(l[f])}}mount(t){this.current=t,iX.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(E_.current||aX(),this.shouldReduceMotion=kx.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),An(this.notifyUpdate),An(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=Ao.has(t);n&&this.onBindTransform&&this.onBindTransform();let o=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),a&&a(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in R_){let r=R_[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<lX.length;n++){let o=lX[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=sX(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=fa(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(tx(n)||nx(n))?n=parseFloat(n):!oX(n)&&cn.test(r)&&(n=k_(t,r)),this.setBaseTarget(t,dt(n)?n.get():n)),dt(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let a=Ic(this.props,r,this.presenceContext?.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;let o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!dt(o)?o:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Zi),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){kc.render(this.render)}};var mr=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Vp=class extends Tx{constructor(){super(...arguments),this.KeyframeResolver=C_}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;dt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function Lx({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function ez({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tz(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function rz(e){return e===void 0||e===1}function M_({scale:e,scaleX:t,scaleY:r}){return!rz(e)||!rz(t)||!rz(r)}function Xi(e){return M_(e)||nz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nz(e){return uX(e.x)||uX(e.y)}function uX(e){return e&&e!=="0%"}function Ex(e,t,r){let n=e-r,o=t*n;return r+o}function cX(e,t,r,n,o){return o!==void 0&&(e=Ex(e,o,n)),Ex(e,r,n)+t}function oz(e,t=0,r=1,n,o){e.min=cX(e.min,t,r,n,o),e.max=cX(e.max,t,r,n,o)}function az(e,{x:t,y:r}){oz(e.x,t.translate,t.scale,t.originPoint),oz(e.y,r.translate,r.scale,r.originPoint)}var dX=.999999999999,fX=1.0000000000001;function mX(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&_c(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,az(e,i)),n&&Xi(a.latestValues)&&_c(e,a.latestValues))}t.x<fX&&t.x>dX&&(t.x=1),t.y<fX&&t.y>dX&&(t.y=1)}function Bl(e,t){e.min=e.min+t,e.max=e.max+t}function pX(e,t,r,n,o=.5){let a=Oe(e.min,e.max,o);oz(e,t,r,a,n)}function _c(e,t){pX(e.x,t.x,t.scaleX,t.scale,t.originX),pX(e.y,t.y,t.scaleY,t.scale,t.originY)}function $_(e,t){return Lx(tz(e.getBoundingClientRect(),t))}function iz(e,t,r){let n=$_(e,r),{scroll:o}=t;return o&&(Bl(n.x,o.offset.x),Bl(n.y,o.offset.y)),n}var jSe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},USe=Ja.length;function hX(e,t,r){let n="",o=!0;for(let a=0;a<USe;a++){let i=Ja[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let u=__(s,jp[i]);if(!l){o=!1;let c=jSe[i]||i;n+=`${c}(${u}) `}r&&(t[i]=u)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function Tc(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(Ao.has(l)){i=!0;continue}else if(e_(l)){o[l]=u;continue}else{let c=__(u,jp[l]);l.startsWith("origin")?(s=!0,a[l]=c):n[l]=c}}if(t.transform||(i||r?n.transform=hX(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;n.transformOrigin=`${l} ${u} ${c}`}}function D_(e,{style:t,vars:r},n,o){let a=e.style,i;for(i in t)a[i]=t[i];o?.applyProjectionStyles(a,n);for(i in r)a.setProperty(i,r[i])}function gX(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var qp={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;let r=gX(e,t.target.x),n=gX(e,t.target.y);return`${r}% ${n}%`}};var yX={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=cn.parse(e);if(o.length>5)return n;let a=cn.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let u=Oe(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),a(o)}};var Ax={borderRadius:{...qp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qp,borderTopRightRadius:qp,borderBottomLeftRadius:qp,borderBottomRightRadius:qp,boxShadow:yX};function Rx(e,{layout:t,layoutId:r}){return Ao.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ax[e]||e==="opacity")}function Pc(e,t,r){let n=e.style,o=t?.style,a={};if(!n)return a;for(let i in n)(dt(n[i])||o&&dt(o[i])||Rx(i,e)||r?.getValue(i)?.liveStyle!==void 0)&&(a[i]=n[i]);return a}function VSe(e){return window.getComputedStyle(e)}var Mx=class extends Vp{constructor(){super(...arguments),this.type="html",this.renderInstance=D_}readValueFromInstance(t,r){if(Ao.has(r))return this.projection?.isProjecting?c_(r):SJ(t,r);{let n=VSe(t),o=(e_(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return $_(t,r)}build(t,r,n){Tc(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Pc(t,r,n)}};var qSe={offset:"stroke-dashoffset",array:"stroke-dasharray"},HSe={offset:"strokeDashoffset",array:"strokeDasharray"};function xX(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?qSe:HSe;e[a.offset]=ae.transform(-n);let i=ae.transform(t),s=ae.transform(r);e[a.array]=`${i} ${s}`}var WSe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function $x(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Tc(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox);for(let p of WSe)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),o!==void 0&&xX(d,o,a,i,!1)}var O_=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var Dx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vX(e,t,r,n){D_(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(O_.has(o)?o:Bp(o),t.attrs[o])}function Ox(e,t,r){let n=Pc(e,t,r);for(let o in e)if(dt(e[o])||dt(t[o])){let a=Ja.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}var Nx=class extends Vp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ao.has(r)){let n=I_(r);return n&&n.default||0}return r=O_.has(r)?r:Bp(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return Ox(t,r,n)}build(t,r,n){$x(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,o){vX(t,r,n,o)}mount(t){this.isSVGTag=Dx(t.tagName),super.mount(t)}};var ZSe=Cx.length;function sz(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?sz(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<ZSe;r++){let n=Cx[r],o=e.props[n];(Ya(o)||o===!1)&&(t[n]=o)}return t}function lz(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var GSe=[...A_].reverse(),KSe=A_.length;function JSe(e){return t=>Promise.all(t.map(({animation:r,options:n})=>ZJ(e,r,n)))}function uz(e){let t=JSe(e),r=bX(),n=!0,o=l=>(u,c)=>{let d=Xa(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=sz(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let v=0;v<KSe;v++){let g=GSe[v],y=r[g],x=u[g]!==void 0?u[g]:c[g],b=Ya(x),_=g===l?y.isActive:null;_===!1&&(m=v);let I=x===c[g]&&x!==u[g]&&b;if(I&&n&&e.manuallyAnimateOnMount&&(I=!1),y.protectedKeys={...p},!y.isActive&&_===null||!x&&!y.prevProp||Ji(x)||typeof x=="boolean")continue;let C=wX(y.prevProp,x),k=C||g===l&&y.isActive&&!I&&b||v>m&&b,M=!1,L=Array.isArray(x)?x:[x],j=L.reduce(o(g),{});_===!1&&(j={});let{prevResolvedValues:Y={}}=y,F={...Y,...j},K=U=>{k=!0,f.has(U)&&(M=!0,f.delete(U)),y.needsAnimating[U]=!0;let N=e.getValue(U);N&&(N.liveStyle=!1)};for(let U in F){let N=j[U],ve=Y[U];if(p.hasOwnProperty(U))continue;let T=!1;vx(N)&&vx(ve)?T=!lz(N,ve):T=N!==ve,T?N!=null?K(U):f.add(U):N!==void 0&&f.has(U)?K(U):y.protectedKeys[U]=!0}y.prevProp=x,y.prevResolvedValues=j,y.isActive&&(p={...p,...j}),n&&e.blockInitialAnimation&&(k=!1);let ee=I&&C;k&&(!ee||M)&&d.push(...L.map(U=>{let N={type:g};if(typeof U=="string"&&n&&!ee&&e.manuallyAnimateOnMount&&e.parent){let{parent:ve}=e,T=Xa(ve,U);if(ve.enteringChildren&&T){let{delayChildren:Ne}=T.transition||{};N.delay=y_(ve.enteringChildren,e,Ne)}}return{animation:U,options:N}}))}if(f.size){let v={};if(typeof u.initial!="boolean"){let g=Xa(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(v.transition=g.transition)}f.forEach(g=>{let y=e.getBaseTarget(g),x=e.getValue(g);x&&(x.liveStyle=!0),v[g]=y??null}),d.push({animation:v})}let h=!!d.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function s(l,u){if(r[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),r[l].isActive=u;let c=i(l);for(let d in r)r[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=bX()}}}function wX(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!lz(t,e):!1}function Lc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bX(){return{animate:Lc(!0),whileInView:Lc(),whileHover:Lc(),whileTap:Lc(),whileDrag:Lc(),whileFocus:Lc(),exit:Lc()}}var SX=1e-4,XSe=1-SX,YSe=1+SX,IX=.01,QSe=0-IX,eIe=0+IX;function ar(e){return e.max-e.min}function pz(e,t,r){return Math.abs(e-t)<=r}function cz(e,t,r,n=.5){e.origin=n,e.originPoint=Oe(t.min,t.max,e.origin),e.scale=ar(r)/ar(t),e.translate=Oe(r.min,r.max,e.origin)-e.originPoint,(e.scale>=XSe&&e.scale<=YSe||isNaN(e.scale))&&(e.scale=1),(e.translate>=QSe&&e.translate<=eIe||isNaN(e.translate))&&(e.translate=0)}function Ec(e,t,r,n){cz(e.x,t.x,r.x,n?n.originX:void 0),cz(e.y,t.y,r.y,n?n.originY:void 0)}function dz(e,t,r){e.min=r.min+t.min,e.max=e.min+ar(t)}function mz(e,t,r){dz(e.x,t.x,r.x),dz(e.y,t.y,r.y)}function fz(e,t,r){e.min=t.min-r.min,e.max=e.min+ar(t)}function Hp(e,t,r){fz(e.x,t.x,r.x),fz(e.y,t.y,r.y)}function kX(e,t,r,n,o){return e-=t,e=Ex(e,1/r,n),o!==void 0&&(e=Ex(e,1/o,n)),e}function tIe(e,t=0,r=1,n=.5,o,a=e,i=e){if(Wr.test(t)&&(t=parseFloat(t),t=Oe(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Oe(a.min,a.max,n);e===a&&(s-=t),e.min=kX(e.min,t,r,s,o),e.max=kX(e.max,t,r,s,o)}function CX(e,t,[r,n,o],a,i){tIe(e,t[r],t[n],t[o],t.scale,a,i)}var rIe=["x","scaleX","originX"],nIe=["y","scaleY","originY"];function hz(e,t,r,n){CX(e.x,t,rIe,r?r.x:void 0,n?n.x:void 0),CX(e.y,t,nIe,r?r.y:void 0,n?n.y:void 0)}function _X(e,t){e.min=t.min,e.max=t.max}function Mo(e,t){_X(e.x,t.x),_X(e.y,t.y)}function gz(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function TX(e){return e.translate===0&&e.scale===1}function yz(e){return TX(e.x)&&TX(e.y)}function PX(e,t){return e.min===t.min&&e.max===t.max}function EX(e,t){return PX(e.x,t.x)&&PX(e.y,t.y)}function LX(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xz(e,t){return LX(e.x,t.x)&&LX(e.y,t.y)}function vz(e){return ar(e.x)/ar(e.y)}function bz(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function dn(e){return[e("x"),e("y")]}function AX(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var DX=["TopLeft","TopRight","BottomLeft","BottomRight"],oIe=DX.length,RX=e=>typeof e=="string"?parseFloat(e):e,MX=e=>typeof e=="number"||ae.test(e);function OX(e,t,r,n,o,a){o?(e.opacity=Oe(0,r.opacity??1,aIe(n)),e.opacityExit=Oe(t.opacity??1,0,iIe(n))):a&&(e.opacity=Oe(t.opacity??1,r.opacity??1,n));for(let i=0;i<oIe;i++){let s=`border${DX[i]}Radius`,l=$X(t,s),u=$X(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||MX(l)===MX(u)?(e[s]=Math.max(Oe(RX(l),RX(u),n),0),(Wr.test(u)||Wr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=Oe(t.rotate||0,r.rotate||0,n))}function $X(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var aIe=NX(0,.5,lx),iIe=NX(.5,.95,Nt);function NX(e,t,r){return n=>n<e?0:n>t?1:r(Wa(e,t,n))}function zX(e,t){let r=zt.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(An(n),e(a-t))};return Le.setup(n,!0),()=>An(n)}function Qa(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Ac(e){return dt(e)?e.get():e}function FX(e,t,r){let n=dt(e)?e:fa(e);return n.start(Sc("",n,t,r)),n.animation}var BX=(e,t)=>e.depth-t.depth;var N_=class{constructor(){this.children=[],this.isDirty=!1}add(t){mc(this.children,t),this.isDirty=!0}remove(t){hc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(BX),this.isDirty=!1,this.children.forEach(t)}};var z_=class{constructor(){this.members=[]}add(t){mc(this.members,t),t.scheduleRender()}remove(t){if(hc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};var Rc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var Mc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wz=["","X","Y","Z"],sIe=1e3,lIe=0;function Sz(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function KX(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=v_(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Le,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&KX(n)}function F_({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=lIe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Qn.value&&(Mc.nodes=Mc.calculatedTargetDeltas=Mc.calculatedProjections=0),this.nodes.forEach(dIe),this.nodes.forEach(hIe),this.nodes.forEach(gIe),this.nodes.forEach(fIe),Qn.addProjectionMetrics&&Qn.addProjectionMetrics(Mc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new N_)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Zi),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=L_(i)&&!nX(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=zX(f,250),Rc.hasAnimatedSinceResize&&(Rc.hasAnimatedSinceResize=!1,this.nodes.forEach(VX)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let m=this.options.transition||u.getDefaultTransition()||wIe,{onLayoutAnimationStart:h,onLayoutAnimationComplete:v}=u.getProps(),g=!this.targetLayout||!xz(this.targetLayout,p),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let x={...zp(m,"layout"),onPlay:h,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,y)}else d||VX(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),An(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yIe),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&KX(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jX);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(UX);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mIe),this.nodes.forEach(uIe),this.nodes.forEach(cIe)):this.nodes.forEach(UX),this.clearAllSnapshots();let s=zt.now();qt.delta=or(0,1e3/60,s-qt.timestamp),qt.timestamp=s,qt.isProcessing=!0,px.update.process(qt),px.preRender.process(qt),px.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pIe),this.sharedNodes.forEach(xIe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ar(this.snapshot.measuredBox.x)&&!ar(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Tt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!yz(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Xi(this.latestValues)||c)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),SIe(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Tt();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(IIe))){let{scroll:u}=this.root;u&&(Bl(s.x,u.offset.x),Bl(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Tt();if(Mo(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&Mo(s,i),Bl(s.x,c.offset.x),Bl(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Tt();Mo(l,i);for(let u=0;u<this.path.length;u++){let c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&_c(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Xi(c.latestValues)&&_c(l,c.latestValues)}return Xi(this.latestValues)&&_c(l,this.latestValues),l}removeTransform(i){let s=Tt();Mo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Xi(u.latestValues))continue;M_(u.latestValues)&&u.updateSnapshot();let c=Tt(),d=u.measurePageBox();Mo(c,d),hz(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Xi(this.latestValues)&&hz(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=qt.timestamp;let f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mz(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Mo(this.target,this.layout.layoutBox),az(this.target,this.targetDelta)):Mo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0),Qn.value&&Mc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||M_(this.parent.latestValues)||nz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,s,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),Hp(this.relativeTargetOrigin,s,l),Mo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Mo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;mX(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Tt());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gz(this.prevProjectionDelta.x,this.projectionDelta.x),gz(this.prevProjectionDelta.y,this.projectionDelta.y)),Ec(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!bz(this.projectionDelta.x,this.prevProjectionDelta.x)||!bz(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Qn.value&&Mc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zl(),this.projectionDelta=zl(),this.projectionDeltaWithTransform=zl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=zl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Tt(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,v=this.getStack(),g=!v||v.members.length<=1,y=!!(h&&!g&&this.options.crossfade===!0&&!this.path.some(bIe));this.animationProgress=0;let x;this.mixTargetDelta=b=>{let _=b/1e3;qX(d.x,i.x,_),qX(d.y,i.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hp(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vIe(this.relativeTarget,this.relativeTargetOrigin,f,_),x&&EX(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Tt()),Mo(x,this.relativeTarget)),h&&(this.animationValues=c,OX(c,u,this.latestValues,_,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(An(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Rc.hasAnimatedSinceResize=!0,Za.layout++,this.motionValue||(this.motionValue=fa(0)),this.currentAnimation=FX(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{Za.layout--},onComplete:()=>{Za.layout--,i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(sIe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&JX(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Tt();let d=ar(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=ar(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Mo(s,l),_c(s,c),Ec(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new z_),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&Sz("z",i,u,this.animationValues);for(let c=0;c<wz.length;c++)Sz(`rotate${wz[c]}`,i,u,this.animationValues),Sz(`skew${wz[c]}`,i,u,this.animationValues);i.render();for(let c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Ac(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Ac(s?.pointerEvents)||""),this.hasProjected&&!Xi(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=AX(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let m in Ax){if(c[m]===void 0)continue;let{correct:h,applyTo:v,isCSSVariable:g}=Ax[m],y=d==="none"?c[m]:h(c[m],u);if(v){let x=v.length;for(let b=0;b<x;b++)i[v[b]]=y}else g?this.options.visualElement.renderState.vars[m]=y:i[m]=y}this.options.layoutId&&(i.pointerEvents=u===this?Ac(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(jX),this.root.sharedNodes.clear()}}}function uIe(e){e.updateLayout()}function cIe(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?dn(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=ar(d);d.min=r[c].min,d.max=d.min+f}):JX(o,t.layoutBox,r)&&dn(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=ar(r[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=zl();Ec(i,r,t.layoutBox);let s=zl();a?Ec(s,e.applyTransform(n,!0),t.measuredBox):Ec(s,r,t.layoutBox);let l=!yz(i),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let p=Tt();Hp(p,t.layoutBox,d.layoutBox);let m=Tt();Hp(m,r,f.layoutBox),xz(p,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function dIe(e){Qn.value&&Mc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function fIe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pIe(e){e.clearSnapshot()}function jX(e){e.clearMeasurements()}function UX(e){e.isLayoutDirty=!1}function mIe(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function VX(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hIe(e){e.resolveTargetDelta()}function gIe(e){e.calcProjection()}function yIe(e){e.resetSkewAndRotation()}function xIe(e){e.removeLeadSnapshot()}function qX(e,t,r){e.translate=Oe(t.translate,0,r),e.scale=Oe(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function HX(e,t,r,n){e.min=Oe(t.min,r.min,n),e.max=Oe(t.max,r.max,n)}function vIe(e,t,r,n){HX(e.x,t.x,r.x,n),HX(e.y,t.y,r.y,n)}function bIe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var wIe={duration:.45,ease:[.4,0,.1,1]},WX=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ZX=WX("applewebkit/")&&!WX("chrome/")?Math.round:Nt;function GX(e){e.min=ZX(e.min),e.max=ZX(e.max)}function SIe(e){GX(e.x),GX(e.y)}function JX(e,t,r){return e==="position"||e==="preserve-aspect"&&!pz(vz(t),vz(r),.2)}function IIe(e){return e!==e.root&&e.scroll?.wasRoot}var XX=F_({attachResizeListener:(e,t)=>Qa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var B_={current:void 0},zx=F_({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!B_.current){let e=new XX({});e.mount(window),e.setOptions({layoutScroll:!0}),B_.current=e}return B_.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var j_=S(A(),1),Yi=S(A(),1);var YX=S(A(),1),Wp=(0,YX.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var eY=S(A(),1);function QX(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kIe(...e){return t=>{let r=!1,n=e.map(o=>{let a=QX(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():QX(e[o],null)}}}}function tY(...e){return eY.useCallback(kIe(...e),e)}var Iz=class extends j_.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=Sx(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function nY({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,Yi.useId)(),a=(0,Yi.useRef)(null),i=(0,Yi.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Yi.useContext)(Wp),l=e.props?.ref??e?.ref,u=tY(a,l);return(0,Yi.useInsertionEffect)(()=>{let{width:c,height:d,top:f,left:p,right:m}=i.current;if(t||!a.current||!c||!d)return;let h=r==="left"?`left: ${p}`:`right: ${m}`;a.current.dataset.motionPopId=o;let v=document.createElement("style");s&&(v.nonce=s);let g=n??document.head;return g.appendChild(v),v.sheet&&v.sheet.insertRule(`
|
|
167
|
+
[data-motion-pop-id="${o}"] {
|
|
168
|
+
position: absolute !important;
|
|
169
|
+
width: ${c}px !important;
|
|
170
|
+
height: ${d}px !important;
|
|
171
|
+
${h}px !important;
|
|
172
|
+
top: ${f}px !important;
|
|
173
|
+
}
|
|
174
|
+
`),()=>{g.contains(v)&&g.removeChild(v)}},[t]),(0,rY.jsx)(Iz,{isPresent:t,childRef:a,sizeRef:i,children:j_.cloneElement(e,{ref:u})})}var aY=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=Lp(CIe),c=(0,Fx.useId)(),d=!0,f=(0,Fx.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:o,onExitComplete:p=>{u.set(p,!0);for(let m of u.values())if(!m)return;n&&n()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,n]);return a&&d&&(f={...f}),(0,Fx.useMemo)(()=>{u.forEach((p,m)=>u.set(m,!1))},[r]),oY.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,kz.jsx)(nY,{isPresent:r,anchorX:s,root:l,children:e})),(0,kz.jsx)(Al.Provider,{value:f,children:e})};function CIe(){return new Map}var jl=S(A(),1);function U_(e=!0){let t=(0,jl.useContext)(Al);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,jl.useId)();(0,jl.useEffect)(()=>{if(e)return o(a)},[e]);let i=(0,jl.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var V_=S(A(),1),Bx=e=>e.key||"";function Cz(e){let t=[];return V_.Children.forEach(e,r=>{(0,V_.isValidElement)(r)&&t.push(r)}),t}var _z=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=U_(i),d=(0,pa.useMemo)(()=>Cz(e),[e]),f=i&&!u?[]:d.map(Bx),p=(0,pa.useRef)(!0),m=(0,pa.useRef)(d),h=Lp(()=>new Map),v=(0,pa.useRef)(new Set),[g,y]=(0,pa.useState)(d),[x,b]=(0,pa.useState)(d);ZC(()=>{p.current=!1,m.current=d;for(let C=0;C<x.length;C++){let k=Bx(x[C]);f.includes(k)?(h.delete(k),v.current.delete(k)):h.get(k)!==!0&&h.set(k,!1)}},[x,f.length,f.join("-")]);let _=[];if(d!==g){let C=[...d];for(let k=0;k<x.length;k++){let M=x[k],L=Bx(M);f.includes(L)||(C.splice(k,0,M),_.push(M))}return a==="wait"&&_.length&&(C=_),b(Cz(C)),y(d),null}let{forceRender:I}=(0,pa.useContext)(Pp);return(0,jx.jsx)(jx.Fragment,{children:x.map(C=>{let k=Bx(C),M=i&&!u?!1:d===x||f.includes(k),L=()=>{if(v.current.has(k))return;if(v.current.add(k),h.has(k))h.set(k,!0);else return;let j=!0;h.forEach(Y=>{Y||(j=!1)}),j&&(I?.(),b(m.current),i&&c?.(),n&&n())};return(0,jx.jsx)(aY,{isPresent:M,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:l,onExitComplete:M?void 0:L,anchorX:s,children:C},k)})})};var iY=S(A(),1),q_=(0,iY.createContext)({strict:!1});var sY={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},lY=!1;function _Ie(){if(lY)return;let e={};for(let t in sY)e[t]={isEnabled:r=>sY[t].some(n=>!!r[n])};Px(e),lY=!0}function H_(){return _Ie(),QN()}function uY(e){let t=H_();for(let r in e)t[r]={...t[r],...e[r]};Px(t)}var TIe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ux(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||TIe.has(e)}var cY=e=>!Ux(e);function PIe(e){typeof e=="function"&&(cY=t=>t.startsWith("on")?!Ux(t):e(t))}try{PIe((qC(),o2(jK)).default)}catch{}function dY(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(cY(o)||r===!0&&Ux(o)||!t&&!Ux(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}var J_=S(D(),1);var Jp=S(A(),1);var fY=S(A(),1),Ul=(0,fY.createContext)({});var W_=S(A(),1);function pY(e,t){if(Fl(e)){let{initial:r,animate:n}=e;return{initial:r===!1||Ya(r)?r:void 0,animate:Ya(n)?n:void 0}}return e.inherit!==!1?t:{}}function hY(e){let{initial:t,animate:r}=pY(e,(0,W_.useContext)(Ul));return(0,W_.useMemo)(()=>({initial:t,animate:r}),[mY(t),mY(r)])}function mY(e){return Array.isArray(e)?e.join(" "):e}var Kp=S(A(),1);var gY=S(A(),1);var Zp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tz(e,t,r){for(let n in t)!dt(t[n])&&!Rx(n,r)&&(e[n]=t[n])}function LIe({transformTemplate:e},t){return(0,gY.useMemo)(()=>{let r=Zp();return Tc(r,t,e),Object.assign({},r.vars,r.style)},[t])}function EIe(e,t){let r=e.style||{},n={};return Tz(n,r,e),Object.assign(n,LIe(e,t)),n}function yY(e,t){let r={},n=EIe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var xY=S(A(),1);var Z_=()=>({...Zp(),attrs:{}});function vY(e,t,r,n){let o=(0,xY.useMemo)(()=>{let a=Z_();return $x(a,t,Dx(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};Tz(a,e.style,e),o.style={...a,...o.style}}return o}var bY=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gp(e){return typeof e!="string"||e.includes("-")?!1:!!(bY.indexOf(e)>-1||/[A-Z]/u.test(e))}function wY(e,t,r,{latestValues:n},o,a=!1,i){let l=(i??Gp(e)?vY:yY)(t,n,o,e),u=dY(t,typeof e=="string",a),c=e!==Kp.Fragment?{...u,...l,ref:r}:{},{children:d}=t,f=(0,Kp.useMemo)(()=>dt(d)?d.get():d,[d]);return(0,Kp.createElement)(e,{...c,children:f})}var Pz=S(A(),1);function AIe({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:RIe(r,n,o,e),renderState:t()}}function RIe(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=Ac(a[f]);let{initial:i,animate:s}=e,l=Fl(e),u=_x(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!Ji(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=Ic(e,f[p]);if(m){let{transitionEnd:h,transition:v,...g}=m;for(let y in g){let x=g[y];if(Array.isArray(x)){let b=c?x.length-1:0;x=x[b]}x!==null&&(o[y]=x)}for(let y in h)o[y]=h[y]}}}return o}var G_=e=>(t,r)=>{let n=(0,Pz.useContext)(Ul),o=(0,Pz.useContext)(Al),a=()=>AIe(e,t,n,o);return r?a():Lp(a)};var SY=G_({scrapeMotionValuesFromProps:Pc,createRenderState:Zp});var IY=G_({scrapeMotionValuesFromProps:Ox,createRenderState:Z_});var kY=Symbol.for("motionComponentSymbol");var $c=S(A(),1);function CY(e,t,r){let n=(0,$c.useRef)(r);(0,$c.useInsertionEffect)(()=>{n.current=r});let o=(0,$c.useRef)(null);return(0,$c.useCallback)(a=>{a&&e.onMount?.(a),t&&(a?t.mount(a):t.unmount());let i=n.current;if(typeof i=="function")if(a){let s=i(a);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):i(a);else i&&(i.current=a)},[t])}var Rn=S(A(),1);var _Y=S(A(),1),K_=(0,_Y.createContext)({});function Dc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function TY(e,t,r,n,o,a){let{visualElement:i}=(0,Rn.useContext)(Ul),s=(0,Rn.useContext)(q_),l=(0,Rn.useContext)(Al),u=(0,Rn.useContext)(Wp).reducedMotion,c=(0,Rn.useRef)(null);n=n||s.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:i,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,isSVG:a}));let d=c.current,f=(0,Rn.useContext)(K_);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&MIe(c.current,r,o,f);let p=(0,Rn.useRef)(!1);(0,Rn.useInsertionEffect)(()=>{d&&p.current&&d.update(r,l)});let m=r[bx],h=(0,Rn.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ZC(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),h.current&&d.animationState&&d.animationState.animateChanges())}),(0,Rn.useEffect)(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),h.current=!1),d.enteringChildren=void 0)}),d}function MIe(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:PY(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&Dc(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:c,layoutScroll:l,layoutRoot:u})}function PY(e){if(e)return e.options.allowProjection!==!1?e.projection:PY(e.parent)}function X_(e,{forwardMotionProps:t=!1,type:r}={},n,o){n&&uY(n);let a=r?r==="svg":Gp(e),i=a?IY:SY;function s(u,c){let d,f={...(0,Jp.useContext)(Wp),...u,layoutId:$Ie(u)},{isStatic:p}=f,m=hY(u),h=i(u,p);if(!p&&HC){DIe(f,n);let v=OIe(f);d=v.MeasureLayout,m.visualElement=TY(e,h,f,o,v.ProjectionNode,a)}return(0,J_.jsxs)(Ul.Provider,{value:m,children:[d&&m.visualElement?(0,J_.jsx)(d,{visualElement:m.visualElement,...f}):null,wY(e,u,CY(h,m.visualElement,c),h,p,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let l=(0,Jp.forwardRef)(s);return l[kY]=e,l}function $Ie({layoutId:e}){let t=(0,Jp.useContext)(Pp).id;return t&&e!==void 0?t+"-"+e:e}function DIe(e,t){let r=(0,Jp.useContext)(q_).strict}function OIe(e){let t=H_(),{drag:r,layout:n}=t;if(!r&&!n)return{};let o={...r,...n};return{MeasureLayout:r?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function LY(e,t){if(typeof Proxy>"u")return X_;let r=new Map,n=(a,i)=>X_(a,i,e,t),o=(a,i)=>n(a,i);return new Proxy(o,{get:(a,i)=>i==="create"?n:(r.has(i)||r.set(i,X_(i,void 0,e,t)),r.get(i))})}var EY=S(A(),1);var AY=(e,t)=>t.isSVG??Gp(e)?new Nx(t):new Mx(t,{allowProjection:e!==EY.Fragment});var Y_=class extends mr{constructor(t){super(t),t.animationState||(t.animationState=uz(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Ji(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var NIe=0,Q_=class extends mr{constructor(){super(...arguments),this.id=NIe++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var RY={animation:{Feature:Y_},exit:{Feature:Q_}};function Qi(e){return{point:{x:e.pageX,y:e.pageY}}}var MY=e=>t=>Cc(t)&&e(t,Qi(t));function Vl(e,t,r,n){return Qa(e,t,MY(r),n)}var e0=({current:e})=>e?e.ownerDocument.defaultView:null;var $Y=(e,t)=>Math.abs(e-t);function DY(e,t){let r=$Y(e.x,t.x),n=$Y(e.y,t.y);return Math.sqrt(r**2+n**2)}var OY=new Set(["auto","scroll"]),Xp=class{constructor(t,r,{transformPagePoint:n,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let p=Ez(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,h=DY(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!h)return;let{point:v}=p,{timestamp:g}=qt;this.history.push({...v,timestamp:g});let{onStart:y,onMove:x}=this.handlers;m||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Lz(m,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();let{onEnd:h,onSessionEnd:v,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let y=Ez(p.type==="pointercancel"?this.lastMoveEventInfo:Lz(m,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,y),v&&v(p,y)},!Cc(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=o||window;let l=Qi(t),u=Lz(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=qt;this.history=[{...c,timestamp:d}];let{onSessionStart:f}=r;f&&f(t,Ez(u,this.history)),this.removeListeners=ca(Vl(this.contextWindow,"pointermove",this.handlePointerMove),Vl(this.contextWindow,"pointerup",this.handlePointerUp),Vl(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){let n=getComputedStyle(r);(OY.has(n.overflowX)||OY.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let r=this.scrollPositions.get(t);if(!r)return;let n=t===window,o=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:o.x-r.x,y:o.y-r.y};a.x===0&&a.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,o),Le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),An(this.updatePoint)}};function Lz(e,t){return t?{point:t(e.point)}:e}function NY(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ez({point:e},t){return{point:e,delta:NY(e,zY(t)),offset:NY(e,zIe(t)),velocity:FIe(t,.1)}}function zIe(e){return e[0]}function zY(e){return e[e.length-1]}function FIe(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=zY(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Ar(t)));)r--;if(!n)return{x:0,y:0};let a=pr(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function VY(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Oe(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Oe(r,e,n.max):Math.min(e,r)),e}function FY(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function qY(e,{top:t,left:r,bottom:n,right:o}){return{x:FY(e.x,r,o),y:FY(e.y,t,n)}}function BY(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function HY(e,t){return{x:BY(e.x,t.x),y:BY(e.y,t.y)}}function WY(e,t){let r=.5,n=ar(e),o=ar(t);return o>n?r=Wa(t.min,t.max-n,e.min):n>o&&(r=Wa(e.min,e.max-o,t.min)),or(0,1,r)}function ZY(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var t0=.35;function GY(e=t0){return e===!1?e=0:e===!0&&(e=t0),{x:jY(e,"left","right"),y:jY(e,"top","bottom")}}function jY(e,t,r){return{min:UY(e,t),max:UY(e,r)}}function UY(e,t){return typeof e=="number"?e:e[t]||0}var BIe=new WeakMap,n0=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Tt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;let a=d=>{r?(this.stopAnimation(),this.snapToCursor(Qi(d).point)):this.pauseAnimation()},i=(d,f)=>{this.stopAnimation();let{drag:p,dragPropagation:m,onDragStart:h}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=WN(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(g=>{let y=this.getAxisMotionValue(g).get()||0;if(Wr.test(y)){let{projection:x}=this.visualElement;if(x&&x.layout){let b=x.layout.layoutBox[g];b&&(y=ar(b)*(parseFloat(y)/100))}}this.originPoint[g]=y}),h&&Le.postRender(()=>h(d,f)),Fp(this.visualElement,"transform");let{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:m,onDirectionLock:h,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=jIe(g),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),v&&v(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>dn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xp(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:e0(this.visualElement),element:this.visualElement.current})}stop(t,r){let n=t||this.latestPointerEvent,o=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!n)return;let{velocity:i}=o;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&Le.postRender(()=>s(n,o))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!r0(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=VY(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Dc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=qY(n.layoutBox,t):this.constraints=!1,this.elastic=GY(r),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&dn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=ZY(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Dc(t))return!1;let n=t.current;Eo(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let a=iz(n,o.root,this.visualElement.getTransformPagePoint()),i=HY(o.layout.layoutBox,a);if(r){let s=r(ez(i));this.hasMutatedConstraints=!!s,s&&(i=Lx(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=dn(c=>{if(!r0(c,r,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return Fp(this.visualElement,t),n.start(Sc(t,n,0,r,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){dn(r=>{let{drag:n}=this.getProps();if(!r0(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r],l=a.get()||0;a.set(t[r]-Oe(i,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Dc(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};dn(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=WY({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),dn(i=>{if(!r0(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(Oe(l,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;BIe.set(this.visualElement,this);let t=this.visualElement.current,r=Vl(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&!Ix(l.target)&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();Dc(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Le.read(n);let i=Qa(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(dn(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=t0,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function r0(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function jIe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var o0=class extends mr{constructor(t){super(t),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new n0(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}update(){let{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}};var KY=e=>(t,r)=>{e&&Le.postRender(()=>e(t,r))},a0=class extends mr{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(t){this.session=new Xp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e0(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:KY(t),onStart:KY(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&Le.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=Vl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var JY=S(D(),1);var Vx=S(A(),1);var Az=!1,Rz=class extends Vx.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),Az&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Rc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,{projection:i}=n;return i&&(i.isPresent=a,Az=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Le.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;Az=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function i0(e){let[t,r]=U_(),n=(0,Vx.useContext)(Pp);return(0,JY.jsx)(Rz,{...e,layoutGroup:n,switchLayoutGroup:(0,Vx.useContext)(K_),isPresent:t,safeToRemove:r})}var XY={pan:{Feature:a0},drag:{Feature:o0,ProjectionNode:zx,MeasureLayout:i0}};function YY(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&Le.postRender(()=>a(t,Qi(t)))}var s0=class extends mr{mount(){let{current:t}=this.node;t&&(this.unmount=ZN(t,(r,n)=>(YY(this.node,n,"Start"),o=>YY(this.node,o,"End"))))}unmount(){}};var l0=class extends mr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ca(Qa(this.node.current,"focus",()=>this.onFocus()),Qa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function QY(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&Le.postRender(()=>a(t,Qi(t)))}var u0=class extends mr{mount(){let{current:t}=this.node;t&&(this.unmount=JN(t,(r,n)=>(QY(this.node,n,"Start"),(o,{success:a})=>QY(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var $z=new WeakMap,Mz=new WeakMap,UIe=e=>{let t=$z.get(e.target);t&&t(e)},VIe=e=>{e.forEach(UIe)};function qIe({root:e,...t}){let r=e||document;Mz.has(r)||Mz.set(r,{});let n=Mz.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(VIe,{root:e,...t})),n[o]}function eQ(e,t,r){let n=qIe(t);return $z.set(e,r),n.observe(e),()=>{$z.delete(e),n.unobserve(e)}}var HIe={some:0,all:1},c0=class extends mr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:HIe[o]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return eQ(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(WIe(t,r))&&this.startObserver()}unmount(){}};function WIe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var tQ={inView:{Feature:c0},tap:{Feature:u0},focus:{Feature:l0},hover:{Feature:s0}};var rQ={layout:{ProjectionNode:zx,MeasureLayout:i0}};var nQ={...RY,...tQ,...XY,...rQ};var ql=LY(nQ,AY);var Dyt=je.div`
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
height: 100%;
|
|
178
|
+
background-color: ${({theme:e})=>e.colors.background.primary};
|
|
179
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
180
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
181
|
+
`,Oyt=je.div`
|
|
182
|
+
flex: 1;
|
|
183
|
+
overflow-y: auto;
|
|
184
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
185
|
+
|
|
186
|
+
&::-webkit-scrollbar {
|
|
187
|
+
width: 6px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&::-webkit-scrollbar-track {
|
|
191
|
+
background: transparent;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&::-webkit-scrollbar-thumb {
|
|
195
|
+
background: ${({theme:e})=>e.colors.background.tertiary};
|
|
196
|
+
border-radius: ${({theme:e})=>e.radii.full};
|
|
197
|
+
}
|
|
198
|
+
`,Nyt=je.div`
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: ${({direction:e="row"})=>e};
|
|
201
|
+
align-items: ${({align:e="stretch"})=>e};
|
|
202
|
+
justify-content: ${({justify:e="flex-start"})=>e};
|
|
203
|
+
gap: ${({theme:e,gap:t})=>t?e.spacing[t]:0};
|
|
204
|
+
flex-wrap: ${({wrap:e})=>e?"wrap":"nowrap"};
|
|
205
|
+
`,zyt=je.div`
|
|
206
|
+
display: grid;
|
|
207
|
+
grid-template-columns: ${({columns:e=1})=>typeof e=="number"?`repeat(${e}, 1fr)`:e};
|
|
208
|
+
gap: ${({theme:e,gap:t="md"})=>e.spacing[t]};
|
|
209
|
+
`,Fyt=je.div`
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
justify-content: space-between;
|
|
213
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
214
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
215
|
+
background-color: ${({theme:e})=>e.colors.background.primary};
|
|
216
|
+
`,Byt=je.h2`
|
|
217
|
+
margin: 0;
|
|
218
|
+
font-size: ${({theme:e})=>e.typography.fontSize.md};
|
|
219
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
|
|
220
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
221
|
+
`,jyt=je.button`
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
226
|
+
padding: ${({theme:e,size:t="md"})=>({sm:`${e.spacing.sm} ${e.spacing.md}`,md:`${e.spacing.md} ${e.spacing.lg}`,lg:`${e.spacing.lg} ${e.spacing.xl}`})[t]};
|
|
227
|
+
width: ${({fullWidth:e})=>e?"100%":"auto"};
|
|
228
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
229
|
+
font-size: ${({theme:e})=>e.typography.fontSize.sm};
|
|
230
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
|
|
231
|
+
border-radius: ${({theme:e})=>e.radii.sm};
|
|
232
|
+
border: none;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
transition: all ${({theme:e})=>e.transitions.fast};
|
|
235
|
+
|
|
236
|
+
${({theme:e,variant:t="primary"})=>{switch(t){case"primary":return`
|
|
237
|
+
background-color: ${e.colors.accent.primary};
|
|
238
|
+
color: ${e.colors.text.inverse};
|
|
239
|
+
&:hover:not(:disabled) {
|
|
240
|
+
background-color: ${e.colors.accent.hover};
|
|
241
|
+
}
|
|
242
|
+
`;case"secondary":return`
|
|
243
|
+
background-color: ${e.colors.background.secondary};
|
|
244
|
+
color: ${e.colors.text.primary};
|
|
245
|
+
&:hover:not(:disabled) {
|
|
246
|
+
background-color: ${e.colors.background.tertiary};
|
|
247
|
+
}
|
|
248
|
+
`;case"ghost":return`
|
|
249
|
+
background: none;
|
|
250
|
+
color: ${e.colors.text.secondary};
|
|
251
|
+
&:hover:not(:disabled) {
|
|
252
|
+
color: ${e.colors.text.primary};
|
|
253
|
+
background-color: ${e.colors.background.secondary};
|
|
254
|
+
}
|
|
255
|
+
`}}}
|
|
256
|
+
|
|
257
|
+
&:disabled {
|
|
258
|
+
opacity: 0.5;
|
|
259
|
+
cursor: not-allowed;
|
|
260
|
+
}
|
|
261
|
+
`,Uyt=je.button`
|
|
262
|
+
display: inline-flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
padding: ${({theme:e})=>e.spacing.xs};
|
|
266
|
+
background: none;
|
|
267
|
+
border: none;
|
|
268
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
269
|
+
font-size: ${({size:e="md"})=>({sm:"1rem",md:"1.25rem",lg:"1.5rem"})[e]};
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
transition: color ${({theme:e})=>e.transitions.fast};
|
|
272
|
+
line-height: 1;
|
|
273
|
+
|
|
274
|
+
&:hover {
|
|
275
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
276
|
+
}
|
|
277
|
+
`,Vyt=je(ql.button)`
|
|
278
|
+
width: 48px;
|
|
279
|
+
height: 48px;
|
|
280
|
+
border-radius: 50%;
|
|
281
|
+
background-color: ${({theme:e})=>e.colors.background.primary};
|
|
282
|
+
border: none;
|
|
283
|
+
box-shadow: ${({theme:e})=>e.shadows.sm};
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
display: flex;
|
|
286
|
+
align-items: center;
|
|
287
|
+
justify-content: center;
|
|
288
|
+
font-size: 1.25rem;
|
|
289
|
+
color: white;
|
|
290
|
+
transition: box-shadow ${({theme:e})=>e.transitions.fast};
|
|
291
|
+
position: relative;
|
|
292
|
+
overflow: hidden;
|
|
293
|
+
|
|
294
|
+
&:hover {
|
|
295
|
+
box-shadow: ${({theme:e})=>e.shadows.md};
|
|
296
|
+
}
|
|
297
|
+
`,qyt=je.input`
|
|
298
|
+
width: 100%;
|
|
299
|
+
padding: ${({theme:e})=>`${e.spacing.md} ${e.spacing.md}`};
|
|
300
|
+
background-color: ${({theme:e})=>e.colors.background.secondary};
|
|
301
|
+
border: none;
|
|
302
|
+
border-radius: ${({theme:e})=>e.radii.sm};
|
|
303
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
304
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
305
|
+
font-size: ${({theme:e})=>e.typography.fontSize.sm};
|
|
306
|
+
outline: none;
|
|
307
|
+
transition: background-color ${({theme:e})=>e.transitions.fast};
|
|
308
|
+
|
|
309
|
+
&::placeholder {
|
|
310
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&:focus {
|
|
314
|
+
background-color: ${({theme:e})=>e.colors.background.tertiary};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
&:disabled {
|
|
318
|
+
opacity: 0.5;
|
|
319
|
+
cursor: not-allowed;
|
|
320
|
+
}
|
|
321
|
+
`,Hyt=je.textarea`
|
|
322
|
+
width: 100%;
|
|
323
|
+
min-height: 150px;
|
|
324
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
325
|
+
background-color: ${({theme:e})=>e.colors.background.secondary};
|
|
326
|
+
border: none;
|
|
327
|
+
border-radius: ${({theme:e})=>e.radii.sm};
|
|
328
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
329
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
330
|
+
font-size: ${({theme:e})=>e.typography.fontSize.sm};
|
|
331
|
+
line-height: ${({theme:e})=>e.typography.lineHeight.normal};
|
|
332
|
+
resize: vertical;
|
|
333
|
+
outline: none;
|
|
334
|
+
|
|
335
|
+
&::placeholder {
|
|
336
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&:focus {
|
|
340
|
+
background-color: ${({theme:e})=>e.colors.background.tertiary};
|
|
341
|
+
}
|
|
342
|
+
`,Wyt=je.button`
|
|
343
|
+
display: flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
gap: ${({theme:e})=>e.spacing.md};
|
|
346
|
+
width: 100%;
|
|
347
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
348
|
+
background-color: ${({theme:e,selected:t})=>t?e.colors.background.tertiary:e.colors.background.secondary};
|
|
349
|
+
border: 2px solid
|
|
350
|
+
${({theme:e,selected:t})=>t?e.colors.accent.primary:"transparent"};
|
|
351
|
+
border-radius: ${({theme:e})=>e.radii.sm};
|
|
352
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
353
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
354
|
+
text-align: left;
|
|
355
|
+
cursor: ${({interactive:e=!0})=>e?"pointer":"default"};
|
|
356
|
+
transition: all ${({theme:e})=>e.transitions.fast};
|
|
357
|
+
|
|
358
|
+
&:hover {
|
|
359
|
+
background-color: ${({theme:e,interactive:t=!0})=>t?e.colors.background.tertiary:e.colors.background.secondary};
|
|
360
|
+
}
|
|
361
|
+
`,Zyt=je.div`
|
|
362
|
+
flex: 1;
|
|
363
|
+
min-width: 0;
|
|
364
|
+
`,Gyt=je.div`
|
|
365
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
|
|
366
|
+
margin-bottom: ${({theme:e})=>e.spacing.xs};
|
|
367
|
+
white-space: nowrap;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
text-overflow: ellipsis;
|
|
370
|
+
`,Kyt=je.div`
|
|
371
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
372
|
+
font-size: ${({theme:e})=>e.typography.fontSize.xs};
|
|
373
|
+
`,Jyt=je.button`
|
|
374
|
+
display: flex;
|
|
375
|
+
flex-direction: column;
|
|
376
|
+
align-items: center;
|
|
377
|
+
justify-content: center;
|
|
378
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
379
|
+
background-color: ${({theme:e})=>e.colors.background.secondary};
|
|
380
|
+
border: none;
|
|
381
|
+
border-radius: ${({theme:e})=>e.radii.sm};
|
|
382
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
383
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
384
|
+
font-size: ${({theme:e})=>e.typography.fontSize.xs};
|
|
385
|
+
gap: ${({theme:e})=>e.spacing.xs};
|
|
386
|
+
cursor: pointer;
|
|
387
|
+
transition: background-color ${({theme:e})=>e.transitions.fast};
|
|
388
|
+
|
|
389
|
+
&:hover {
|
|
390
|
+
background-color: ${({theme:e})=>e.colors.background.tertiary};
|
|
391
|
+
}
|
|
392
|
+
`,Xyt=je.span`
|
|
393
|
+
font-size: 1.25rem;
|
|
394
|
+
`,Yyt=je.div`
|
|
395
|
+
width: ${({size:e="md"})=>({sm:"40px",md:"64px",lg:"80px"})[e]};
|
|
396
|
+
height: ${({size:e="md"})=>({sm:"40px",md:"64px",lg:"80px"})[e]};
|
|
397
|
+
border-radius: ${({theme:e})=>e.radii.full};
|
|
398
|
+
background-color: ${({theme:e})=>e.colors.background.secondary};
|
|
399
|
+
display: flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: center;
|
|
402
|
+
font-size: ${({size:e="md"})=>({sm:"1rem",md:"1.5rem",lg:"2rem"})[e]};
|
|
403
|
+
`,Qyt=je.h1`
|
|
404
|
+
margin: 0;
|
|
405
|
+
font-size: ${({theme:e,size:t="md"})=>({sm:e.typography.fontSize.lg,md:e.typography.fontSize.xl,lg:e.typography.fontSize["2xl"]})[t]};
|
|
406
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.medium};
|
|
407
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
408
|
+
`,ext=je.p`
|
|
409
|
+
margin: 0;
|
|
410
|
+
font-size: ${({theme:e,size:t="md"})=>e.typography.fontSize[t]};
|
|
411
|
+
color: ${({theme:e,color:t="primary"})=>t==="accent"?e.colors.accent.primary:e.colors.text[t]};
|
|
412
|
+
line-height: ${({theme:e})=>e.typography.lineHeight.normal};
|
|
413
|
+
`,txt=je.button`
|
|
414
|
+
background: none;
|
|
415
|
+
border: none;
|
|
416
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
417
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
418
|
+
font-size: ${({theme:e})=>e.typography.fontSize.sm};
|
|
419
|
+
text-decoration: underline;
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
padding: 0;
|
|
422
|
+
|
|
423
|
+
&:hover {
|
|
424
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
425
|
+
}
|
|
426
|
+
`,rxt=je.div`
|
|
427
|
+
width: 100%;
|
|
428
|
+
height: 1px;
|
|
429
|
+
background-color: ${({theme:e})=>e.colors.border};
|
|
430
|
+
`,nxt=je.button`
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-direction: column;
|
|
433
|
+
width: 100%;
|
|
434
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
435
|
+
background: transparent;
|
|
436
|
+
border: none;
|
|
437
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
438
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
439
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
440
|
+
text-align: left;
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
transition: background-color ${({theme:e})=>e.transitions.fast};
|
|
443
|
+
|
|
444
|
+
&:hover {
|
|
445
|
+
background-color: ${({theme:e})=>e.colors.background.secondary};
|
|
446
|
+
}
|
|
447
|
+
`,oxt=je.div`
|
|
448
|
+
position: fixed;
|
|
449
|
+
bottom: 20px;
|
|
450
|
+
${({position:e})=>e==="bottom-right"?"right: 20px;":"left: 20px;"}
|
|
451
|
+
z-index: ${({theme:e})=>e.zIndex.widget};
|
|
452
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
453
|
+
`,axt=je(ql.div)`
|
|
454
|
+
width: 400px;
|
|
455
|
+
height: 700px;
|
|
456
|
+
border-radius: ${({theme:e})=>e.radii.xl};
|
|
457
|
+
overflow: hidden;
|
|
458
|
+
box-shadow: ${({theme:e})=>e.shadows.lg};
|
|
459
|
+
background-color: ${({theme:e})=>e.colors.background.primary};
|
|
460
|
+
display: flex;
|
|
461
|
+
flex-direction: column;
|
|
462
|
+
`,ixt=je.div`
|
|
463
|
+
display: flex;
|
|
464
|
+
align-items: center;
|
|
465
|
+
justify-content: space-between;
|
|
466
|
+
padding: ${({theme:e})=>`${e.spacing.sm} ${e.spacing.md}`};
|
|
467
|
+
background-color: ${({theme:e})=>e.colors.background.primary};
|
|
468
|
+
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
469
|
+
flex-shrink: 0;
|
|
470
|
+
min-width: 0;
|
|
471
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
472
|
+
`,sxt=je.div`
|
|
473
|
+
flex: 1;
|
|
474
|
+
overflow: hidden;
|
|
475
|
+
display: flex;
|
|
476
|
+
flex-direction: column;
|
|
477
|
+
`,lxt=je.div`
|
|
478
|
+
max-width: 80%;
|
|
479
|
+
padding: ${({theme:e})=>`${e.spacing.md} ${e.spacing.md}`};
|
|
480
|
+
border-radius: ${({theme:e})=>e.radii.md};
|
|
481
|
+
background-color: ${({theme:e,isUser:t})=>t?e.colors.accent.primary:e.colors.background.secondary};
|
|
482
|
+
color: ${({theme:e,isUser:t})=>t?e.colors.text.inverse:e.colors.text.primary};
|
|
483
|
+
`,uxt=je.span`
|
|
484
|
+
font-size: ${({theme:e})=>e.typography.fontSize.xs};
|
|
485
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
486
|
+
margin-top: ${({theme:e})=>e.spacing.xs};
|
|
487
|
+
`,cxt=je.form`
|
|
488
|
+
display: flex;
|
|
489
|
+
gap: ${({theme:e})=>e.spacing.sm};
|
|
490
|
+
padding: ${({theme:e})=>e.spacing.md};
|
|
491
|
+
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
492
|
+
`,dxt=je.div`
|
|
493
|
+
display: flex;
|
|
494
|
+
align-items: center;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
height: 100%;
|
|
497
|
+
color: ${({theme:e})=>e.colors.text.secondary};
|
|
498
|
+
text-align: center;
|
|
499
|
+
padding: ${({theme:e})=>e.spacing.xl};
|
|
500
|
+
`;var es=S(D(),1),Dz=(0,Rr.createContext)(null);function ZIe(){return crypto.randomUUID()}function Oz(e,t){return{"Content-Type":"application/json","X-User-Id":e,"X-Assistant-Id":t}}function GIe(e,t,r){let n=Oz(t,r);return{async list(){try{let o=await fetch(`${e}/api/widget/threads`,{headers:n});return o.ok?{threads:(await o.json()).threads||[]}:(console.error("[Threads] List failed:",o.status),{threads:[]})}catch(o){return console.error("[Threads] List error:",o),{threads:[]}}},async fetch(o){let a=await fetch(`${e}/api/widget/threads/${o}`,{headers:n});if(!a.ok)throw new Error(`Failed to fetch thread: ${a.status}`);let i=await a.json();return{remoteId:i.remoteId,status:i.status,title:i.title}},async initialize(o){try{let a=await fetch(`${e}/api/widget/threads`,{method:"POST",headers:n,body:JSON.stringify({localId:o})});if(!a.ok)throw new Error(`Failed to create thread: ${a.status}`);let i=await a.json();return{remoteId:i.remoteId,externalId:i.externalId}}catch(a){throw console.error("[Threads] Initialize error:",a),a}},async rename(o,a){try{await fetch(`${e}/api/widget/threads/${o}`,{method:"PATCH",headers:n,body:JSON.stringify({title:a})})}catch(i){console.error("[Threads] Rename error:",i)}},async archive(o){try{await fetch(`${e}/api/widget/threads/${o}/archive`,{method:"POST",headers:n})}catch(a){console.error("[Threads] Archive error:",a)}},async unarchive(o){try{await fetch(`${e}/api/widget/threads/${o}/unarchive`,{method:"POST",headers:n})}catch(a){console.error("[Threads] Unarchive error:",a)}},async delete(o){try{await fetch(`${e}/api/widget/threads/${o}`,{method:"DELETE",headers:n})}catch(a){console.error("[Threads] Delete error:",a)}},async generateTitle(o,a){return Pb(async i=>{try{let s=await fetch(`${e}/api/widget/threads/${o}/title`,{method:"POST",headers:n,body:JSON.stringify({messages:a})});if(!s.ok)throw new Error(`Title generation failed: ${s.status}`);let l=await s.json();i.appendText(l.title),i.close()}catch(s){console.error("[Threads] Title generation error:",s),i.appendText("New Chat"),i.close()}})}}}async function KIe(e,t,r,n,o){try{let a=await fetch(`${e}/api/widget/threads/${n}/messages/sync`,{method:"POST",headers:Oz(t,r),body:JSON.stringify({messages:o})});a.ok||console.error("[Messages] Sync failed:",a.status)}catch(a){console.error("[Messages] Sync error:",a)}}function JIe(e,t,r,n){let o=Oz(t,r);return{async load(){if(console.log("[History] load() called, remoteId:",n),!n)return{headId:null,messages:[]};try{let a=await fetch(`${e}/api/widget/threads/${n}/messages`,{headers:o});if(!a.ok)return console.error("[History] Failed to load messages:",a.status),{headId:null,messages:[]};let{messages:i}=await a.json();console.log("[History] Loaded messages:",i.length);let s=i.map((l,u)=>({parentId:u>0?i[u-1].id:null,message:{id:l.id,role:l.role,parts:l.content,metadata:l.metadata,createdAt:new Date(l.createdAt)}}));return console.log("[History] Formatted messages:",s.length),{headId:i.length>0?i[i.length-1].id:null,messages:s}}catch(a){return console.error("[History] Load error:",a),{headId:null,messages:[]}}},async append(a){console.log("[History] append() called")},withFormat(a){return console.log("[History.withFormat] called, remoteId:",n),{async load(){if(!n)return{headId:null,messages:[]};try{let i=await fetch(`${e}/api/widget/threads/${n}/messages`,{headers:o});if(!i.ok)return console.error("[History.withFormat] Failed:",i.status),{headId:null,messages:[]};let{messages:s}=await i.json();console.log("[History.withFormat] Loaded:",s.length);let l=s.map((u,c)=>({parentId:c>0?s[c-1].id:null,message:{id:u.id,role:u.role,parts:u.content,metadata:u.metadata,createdAt:new Date(u.createdAt)}}));return{headId:s.length>0?s[s.length-1].id:null,messages:l}}catch(i){return console.error("[History.withFormat] Error:",i),{headId:null,messages:[]}}},async append(i){}}}}}function XIe({config:e,userId:t,children:r}){let n=e.baseUrl||"http://localhost:3000",o=e.apiKey,{consumeContext:a,clearContext:i}=Tp(),s=(0,Rr.useRef)(a);s.current=a;let l=(0,Rr.useRef)(i);l.current=i;let u=(0,Rr.useMemo)(()=>GIe(n,t,o),[n,t,o]),c=Lh({runtimeHook:function(){let f=O(({threadListItem:g})=>g?.remoteId??void 0),p=(0,Rr.useRef)(f);p.current=f;let m=(0,Rr.useMemo)(()=>JIe(n,t,o,f),[f]),h=(0,Rr.useMemo)(()=>(console.log("[Widget] Creating transport for threadId:",f),new cl({api:`${n}/api/widget/chat`,headers:{"X-User-Id":t,"X-Assistant-Id":o},body:()=>{let g=s.current(),y=g.map(b=>b.id),x=g.map(b=>({id:b.id,type:b.type,title:b.title}));return console.log("[Widget] Transport body - contextIds:",y.length,"threadId:",f),y.length>0&&setTimeout(()=>l.current(),0),{assistantId:o,threadId:f,...y.length>0&&{contextIds:y,contextMetadata:x}}}})),[f]);return xD({transport:h,adapters:{history:m},onFinish:({message:g,messages:y})=>{let x=p.current;console.log("[Widget] onFinish - threadId:",x,"messages:",y.length),x&&y.length>0&&KIe(n,t,o,x,y)}})},adapter:u});return(0,es.jsxs)(pL,{runtime:c,children:[(0,es.jsx)(NK,{}),r]})}function oQ({config:e,children:t,autoInitialize:r=!0}){let[n]=(0,Rr.useState)(()=>e.userId||ZIe()),[o]=(0,Rr.useState)(()=>new du(e)),[a,i]=(0,Rr.useState)(o.getState());(0,Rr.useEffect)(()=>{let l=o.on("state:change",({current:u})=>{i(u)});return r&&a.status==="idle"&&o.initialize().catch(console.error),()=>{l(),o.destroy()}},[o,r,a.status]);let s=(0,Rr.useMemo)(()=>({client:o,state:a,userId:n}),[o,a,n]);return(0,es.jsx)(ED,{value:yN,children:(0,es.jsx)(AD,{theme:ex,children:(0,es.jsx)(Dz.Provider,{value:s,children:(0,es.jsx)(FK,{children:(0,es.jsx)(XIe,{config:e,userId:n,children:t})})})})})}var g0=S(A(),1);var gt=S(A(),1);var hr=S(A(),1);var d0=S(D(),1);function aQ(e){let t=YIe(e),r=hr.forwardRef((n,o)=>{let{children:a,...i}=n,s=hr.Children.toArray(a),l=s.find(eke);if(l){let u=l.props.children,c=s.map(d=>d===l?hr.Children.count(u)>1?hr.Children.only(null):hr.isValidElement(u)?u.props.children:null:d);return(0,d0.jsx)(t,{...i,ref:o,children:hr.isValidElement(u)?hr.cloneElement(u,void 0,c):null})}return(0,d0.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function YIe(e){let t=hr.forwardRef((r,n)=>{let{children:o,...a}=r;if(hr.isValidElement(o)){let i=rke(o),s=tke(a,o.props);return o.type!==hr.Fragment&&(s.ref=n?wi(n,i):i),hr.cloneElement(o,s)}return hr.Children.count(o)>1?hr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QIe=Symbol("radix.slottable");function eke(e){return hr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QIe}function tke(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function rke(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lt=S(D(),1),p0="Dialog",[iQ,Wxt]=Bs(p0),[nke,ma]=iQ(p0),sQ=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=gt.useRef(null),l=gt.useRef(null),[u,c]=Bd({prop:n,defaultProp:o??!1,onChange:a,caller:p0});return(0,lt.jsx)(nke,{scope:t,triggerRef:s,contentRef:l,contentId:Us(),titleId:Us(),descriptionId:Us(),open:u,onOpenChange:c,onOpenToggle:gt.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};sQ.displayName=p0;var lQ="DialogTrigger",uQ=gt.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ma(lQ,r),a=Ze(t,o.triggerRef);return(0,lt.jsx)(vt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Fz(o.open),...n,ref:a,onClick:we(e.onClick,o.onOpenToggle)})});uQ.displayName=lQ;var Nz="DialogPortal",[oke,cQ]=iQ(Nz,{forceMount:void 0}),dQ=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=ma(Nz,t);return(0,lt.jsx)(oke,{scope:t,forceMount:r,children:gt.Children.map(n,i=>(0,lt.jsx)(Yo,{present:r||a.open,children:(0,lt.jsx)(Eu,{asChild:!0,container:o,children:i})}))})};dQ.displayName=Nz;var f0="DialogOverlay",fQ=gt.forwardRef((e,t)=>{let r=cQ(f0,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ma(f0,e.__scopeDialog);return a.modal?(0,lt.jsx)(Yo,{present:n||a.open,children:(0,lt.jsx)(ike,{...o,ref:t})}):null});fQ.displayName=f0;var ake=aQ("DialogOverlay.RemoveScroll"),ike=gt.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ma(f0,r);return(0,lt.jsx)(Uh,{as:ake,allowPinchZoom:!0,shards:[o.contentRef],children:(0,lt.jsx)(vt.div,{"data-state":Fz(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Oc="DialogContent",pQ=gt.forwardRef((e,t)=>{let r=cQ(Oc,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=ma(Oc,e.__scopeDialog);return(0,lt.jsx)(Yo,{present:n||a.open,children:a.modal?(0,lt.jsx)(ske,{...o,ref:t}):(0,lt.jsx)(lke,{...o,ref:t})})});pQ.displayName=Oc;var ske=gt.forwardRef((e,t)=>{let r=ma(Oc,e.__scopeDialog),n=gt.useRef(null),o=Ze(t,r.contentRef,n);return gt.useEffect(()=>{let a=n.current;if(a)return oS(a)},[]),(0,lt.jsx)(mQ,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:we(e.onFocusOutside,a=>a.preventDefault())})}),lke=gt.forwardRef((e,t)=>{let r=ma(Oc,e.__scopeDialog),n=gt.useRef(!1),o=gt.useRef(!1);return(0,lt.jsx)(mQ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),mQ=gt.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=ma(Oc,r),l=gt.useRef(null),u=Ze(t,l);return Ow(),(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)(Rh,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,lt.jsx)(Iu,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Fz(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)(cke,{titleId:s.titleId}),(0,lt.jsx)(fke,{contentRef:l,descriptionId:s.descriptionId})]})]})}),zz="DialogTitle",hQ=gt.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ma(zz,r);return(0,lt.jsx)(vt.h2,{id:o.titleId,...n,ref:t})});hQ.displayName=zz;var gQ="DialogDescription",uke=gt.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ma(gQ,r);return(0,lt.jsx)(vt.p,{id:o.descriptionId,...n,ref:t})});uke.displayName=gQ;var yQ="DialogClose",xQ=gt.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=ma(yQ,r);return(0,lt.jsx)(vt.button,{type:"button",...n,ref:t,onClick:we(e.onClick,()=>o.onOpenChange(!1))})});xQ.displayName=yQ;function Fz(e){return e?"open":"closed"}var vQ="DialogTitleWarning",[Zxt,bQ]=KU(vQ,{contentName:Oc,titleName:zz,docsSlug:"dialog"}),cke=({titleId:e})=>{let t=bQ(vQ),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
501
|
+
|
|
502
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
503
|
+
|
|
504
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return gt.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},dke="DialogDescriptionWarning",fke=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bQ(dke).contentName}}.`;return gt.useEffect(()=>{let o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},wQ=sQ,SQ=uQ,IQ=dQ,kQ=fQ,CQ=pQ,_Q=hQ;var TQ=xQ;var eo=S(D(),1);function PQ({...e}){return(0,eo.jsx)(wQ,{"data-slot":"dialog",...e})}function LQ({...e}){return(0,eo.jsx)(SQ,{"data-slot":"dialog-trigger",...e})}function mke({...e}){return(0,eo.jsx)(IQ,{"data-slot":"dialog-portal",...e})}function hke({className:e,...t}){return(0,eo.jsx)(kQ,{"data-slot":"dialog-overlay",className:ue("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function EQ({className:e,children:t,showCloseButton:r=!0,...n}){return(0,eo.jsxs)(mke,{"data-slot":"dialog-portal",children:[(0,eo.jsx)(hke,{}),(0,eo.jsxs)(CQ,{"data-slot":"dialog-content",className:ue("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...n,children:[t,r&&(0,eo.jsxs)(TQ,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,eo.jsx)(Vi,{}),(0,eo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function AQ({className:e,...t}){return(0,eo.jsx)(_Q,{"data-slot":"dialog-title",className:ue("text-lg leading-none font-semibold",e),...t})}var $o=S(A(),1);var ts=S(A(),1),RQ=S(D(),1);function MQ(e,t=[]){let r=[];function n(a,i){let s=ts.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,v=ts.useMemo(()=>m,Object.values(m));return(0,RQ.jsx)(h.Provider,{value:v,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,m=ts.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let o=()=>{let a=r.map(i=>ts.createContext(i));return function(s){let l=s?.[e]||a;return ts.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,gke(o,...t)]}function gke(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return ts.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var $Q=S(A(),1),yke=S(cu(),1);var DQ=S(D(),1),xke=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],m0=xke.reduce((e,t)=>{let r=Ah(`Primitive.${t}`),n=$Q.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,DQ.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});var BQ=S(FQ(),1);function jQ(){return(0,BQ.useSyncExternalStore)(Pke,()=>!0,()=>!1)}function Pke(){return()=>{}}var qx=S(D(),1),jz="Avatar",[Lke,uvt]=MQ(jz),[Eke,VQ]=Lke(jz),qQ=$o.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=$o.useState("idle");return(0,qx.jsx)(Eke,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,qx.jsx)(m0.span,{...n,ref:t})})});qQ.displayName=jz;var HQ="AvatarImage",WQ=$o.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=VQ(HQ,r),s=Ake(n,a),l=Dt(u=>{o(u),i.onImageLoadingStatusChange(u)});return vr(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,qx.jsx)(m0.img,{...a,ref:t,src:n}):null});WQ.displayName=HQ;var ZQ="AvatarFallback",GQ=$o.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=VQ(ZQ,r),[i,s]=$o.useState(n===void 0);return $o.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,qx.jsx)(m0.span,{...o,ref:t}):null});GQ.displayName=ZQ;function UQ(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Ake(e,{referrerPolicy:t,crossOrigin:r}){let n=jQ(),o=$o.useRef(null),a=n?(o.current||(o.current=new window.Image),o.current):null,[i,s]=$o.useState(()=>UQ(a,e));return vr(()=>{s(UQ(a,e))},[a,e]),vr(()=>{let l=d=>()=>{s(d)};if(!a)return;let u=l("loaded"),c=l("error");return a.addEventListener("load",u),a.addEventListener("error",c),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,r,t]),i}var KQ=qQ,JQ=WQ,XQ=GQ;var h0=S(D(),1);function YQ({className:e,...t}){return(0,h0.jsx)(KQ,{"data-slot":"avatar",className:ue("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function QQ({className:e,...t}){return(0,h0.jsx)(JQ,{"data-slot":"avatar-image",className:ue("aspect-square size-full",e),...t})}function eee({className:e,...t}){return(0,h0.jsx)(XQ,{"data-slot":"avatar-fallback",className:ue("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var He=S(D(),1),Mke=e=>{let[t,r]=(0,g0.useState)(void 0);return(0,g0.useEffect)(()=>{if(!e){r(void 0);return}let n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n)}},[e]),t},tee=()=>{let{file:e,src:t}=O(Jh(({attachment:r})=>{if(r.type!=="image")return{};if(r.file)return{file:r.file};let n=r.content?.filter(o=>o.type==="image")[0]?.image;return n?{src:n}:{}}));return Mke(e)??t},$ke=({src:e})=>(0,He.jsx)("img",{src:e,alt:"Image Preview",className:"aui-attachment-preview-image-loaded block h-auto max-h-[80vh] w-auto max-w-full object-contain"}),Dke=({children:e})=>{let t=tee();return t?(0,He.jsxs)(PQ,{children:[(0,He.jsx)(LQ,{className:"aui-attachment-preview-trigger cursor-pointer transition-colors hover:bg-accent/50",asChild:!0,children:e}),(0,He.jsxs)(EQ,{className:"aui-attachment-preview-dialog-content p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:bg-foreground/60 [&>button]:p-1 [&>button]:opacity-100 [&>button]:ring-0! [&_svg]:text-background [&>button]:hover:[&_svg]:text-destructive",children:[(0,He.jsx)(AQ,{className:"aui-sr-only sr-only",children:"Image Attachment Preview"}),(0,He.jsx)("div",{className:"aui-attachment-preview relative mx-auto flex max-h-[80dvh] w-full items-center justify-center overflow-hidden bg-background",children:(0,He.jsx)($ke,{src:t})})]})]}):e},Oke=()=>{let e=O(({attachment:r})=>r.type==="image"),t=tee();return(0,He.jsxs)(YQ,{className:"aui-attachment-tile-avatar h-full w-full rounded-none",children:[(0,He.jsx)(QQ,{src:t,alt:"Attachment preview",className:"aui-attachment-tile-image object-cover"}),(0,He.jsx)(eee,{delayMs:e?200:0,children:(0,He.jsx)(Yn,{className:"aui-attachment-tile-fallback-icon size-8 text-muted-foreground"})})]})},ree=()=>{let t=Q().attachment.source==="composer",r=O(({attachment:o})=>o.type==="image"),n=O(({attachment:o})=>{switch(o.type){case"image":return"Image";case"document":return"Document";case"file":return"File";default:return"File"}});return(0,He.jsxs)(kl,{children:[(0,He.jsxs)(Wd.Root,{className:ue("aui-attachment-root relative",r&&"aui-attachment-root-composer only:[&>#attachment-tile]:size-24"),children:[(0,He.jsx)(Dke,{children:(0,He.jsx)(Cl,{asChild:!0,children:(0,He.jsx)("div",{className:ue("aui-attachment-tile size-14 cursor-pointer overflow-hidden rounded-[14px] border bg-muted transition-opacity hover:opacity-75",t&&"aui-attachment-tile-composer border-foreground/20"),role:"button",id:"attachment-tile","aria-label":`${n} attachment`,children:(0,He.jsx)(Oke,{})})})}),t&&(0,He.jsx)(Nke,{})]}),(0,He.jsx)(_l,{side:"top",children:(0,He.jsx)(Wd.Name,{})})]})},Nke=()=>(0,He.jsx)(Wd.Remove,{asChild:!0,children:(0,He.jsx)(ht,{tooltip:"Remove file",className:"aui-attachment-tile-remove absolute top-1.5 right-1.5 size-3.5 rounded-full bg-white text-muted-foreground opacity-100 shadow-sm hover:bg-white! [&_svg]:text-black hover:[&_svg]:text-destructive",side:"top",children:(0,He.jsx)(Vi,{className:"aui-attachment-remove-icon size-3 dark:stroke-[2.5px]"})})}),nee=()=>(0,He.jsx)("div",{className:"aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2",children:(0,He.jsx)(Ra.Attachments,{components:{Attachment:ree}})}),oee=()=>(0,He.jsx)("div",{className:"aui-composer-attachments mb-2 flex w-full flex-row items-center gap-2 overflow-x-auto px-1.5 pt-0.5 pb-1 empty:hidden",children:(0,He.jsx)(Cn.Attachments,{components:{Attachment:ree}})}),aee=()=>(0,He.jsx)(Cn.AddAttachment,{asChild:!0,children:(0,He.jsx)(ht,{tooltip:"Add Attachment",side:"bottom",variant:"ghost",size:"icon",className:"aui-composer-add-attachment size-[34px] rounded-full p-1 font-semibold text-xs hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30","aria-label":"Add Attachment",children:(0,He.jsx)(Uy,{className:"aui-attachment-add-icon size-5 stroke-[1.5px]"})})});var Gx=S(D(),1);var tm=S(A(),1);var lee=S(D(),1),Qp=S(A(),1);var iee=S(D(),1),see=S(A(),1),zke=(e,t)=>typeof e=="string"?e===t:JSON.stringify(e)===JSON.stringify(t),Fke=(e,t)=>{if(!e||!t)return!1;let r=n=>{let{position:o,data:a,...i}=n||{};return i};return JSON.stringify(r(e.properties))===JSON.stringify(r(t.properties))&&zke(e.children,t.children)},Hx=(e,t)=>Fke(e.node,t.node),Uz=(e={})=>Object.fromEntries(Object.entries(e??{}).map(([t,r])=>{if(!r)return[t,r];let n=r;return[t,(0,see.memo)(({node:a,...i})=>(0,iee.jsx)(n,{...i}),Hx)]}));var y0=(0,Qp.createContext)(null),Wx=()=>(0,Qp.useContext)(y0)!==null,Bke=({children:e,...t})=>(0,lee.jsx)(y0.Provider,{value:t,children:e}),uee=(0,Qp.memo)(Bke,Hx);var Zx=S(D(),1),cee=({node:e,...t})=>(0,Zx.jsx)("pre",{...t}),dee=({node:e,...t})=>(0,Zx.jsx)("code",{...t}),em=({node:e,components:{Pre:t,Code:r},code:n})=>(0,Zx.jsx)(t,{children:(0,Zx.jsx)(r,{node:e,children:n})}),fee=()=>null;var zc=S(D(),1),v0=S(A(),1);var Nc=S(D(),1),pee=S(A(),1);var mee=({node:e,components:{Pre:t,Code:r,SyntaxHighlighter:n,CodeHeader:o},language:a,code:i})=>{let s=(0,pee.useMemo)(()=>({Pre:t,Code:r}),[t,r]),l=a?n:em;return(0,Nc.jsxs)(Nc.Fragment,{children:[(0,Nc.jsx)(o,{node:e,language:a,code:i}),(0,Nc.jsx)(l,{node:e,components:s,language:a??"unknown",code:i})]})};var hee=S(Vz(),1),qz=({className:e,...t})=>({className:r,...n})=>({className:(0,hee.default)(e,r),...t,...n});var jke=({node:e,components:{Pre:t,Code:r,SyntaxHighlighter:n,CodeHeader:o},componentsByLanguage:a={},children:i,...s})=>{let l=(0,v0.useContext)(y0),u=qz(l),c=Dt(v=>(0,zc.jsx)(t,{...u(v)})),d=qz(s),f=Dt(v=>(0,zc.jsx)(r,{...d(v)})),p=/language-(\w+)/.exec(s.className||"")?.[1]??"";if(typeof i!="string")return(0,zc.jsx)(em,{node:e,components:{Pre:c,Code:f},code:i});let m=a[p]?.SyntaxHighlighter??n,h=a[p]?.CodeHeader??o;return(0,zc.jsx)(mee,{node:e,components:{Pre:c,Code:f,SyntaxHighlighter:m,CodeHeader:h},language:p||"unknown",code:i})},Uke=({node:e,components:t,componentsByLanguage:r,...n})=>Wx()?(0,zc.jsx)(jke,{node:e,components:t,componentsByLanguage:r,...n}):(0,zc.jsx)(t.Code,{...n}),gee=(0,v0.memo)(Uke,(e,t)=>e.components===t.components&&e.componentsByLanguage===t.componentsByLanguage&&Hx(e,t));var yee=S(Vz(),1),{useSmooth:Vke,useSmoothStatus:qke,withSmoothContextProvider:Hke}=zs,Wke=({components:e,componentsByLanguage:t,smooth:r=!0,preprocess:n,...o})=>{let a=Wh(),i=(0,tm.useMemo)(()=>n?{...a,text:n(a.text)}:a,[a,n]),{text:s}=Vke(i,r),{pre:l=cee,code:u=dee,SyntaxHighlighter:c=em,CodeHeader:d=fee}=e??{},f=(0,tm.useMemo)(()=>({Pre:l,Code:u,SyntaxHighlighter:c,CodeHeader:d}),[l,u,c,d]),p=Dt(h=>(0,Gx.jsx)(gee,{components:f,componentsByLanguage:t,...h})),m=(0,tm.useMemo)(()=>{let{pre:h,code:v,SyntaxHighlighter:g,CodeHeader:y,...x}=e??{};return{...x,pre:uee,code:p}},[p,e]);return(0,Gx.jsx)(Ty,{components:m,...o,children:s})},xee=(0,tm.forwardRef)(({className:e,containerProps:t,containerComponent:r="div",...n},o)=>{let a=qke();return(0,Gx.jsx)(r,{"data-status":a.type,...t,className:(0,yee.default)(e,t?.className),ref:o,children:(0,Gx.jsx)(Wke,{...n})})});xee.displayName="MarkdownTextPrimitive";var Hz=Hke(xee);var b0=S(A(),1);var ft=S(D(),1),Zke=()=>(0,ft.jsx)(Hz,{remarkPlugins:[vp],className:"aui-md",components:Jke}),vee=(0,b0.memo)(Zke),Gke=({language:e,code:t})=>{let{isCopied:r,copyToClipboard:n}=Kke();return(0,ft.jsxs)("div",{className:"aui-code-header-root mt-4 flex items-center justify-between gap-4 rounded-t-lg bg-muted-foreground/15 px-4 py-2 font-semibold text-foreground text-sm dark:bg-muted-foreground/20",children:[(0,ft.jsx)("span",{className:"aui-code-header-language lowercase [&>span]:text-xs",children:e}),(0,ft.jsxs)(ht,{tooltip:"Copy",onClick:()=>{!t||r||n(t)},children:[!r&&(0,ft.jsx)(Bi,{}),r&&(0,ft.jsx)(la,{})]})]})},Kke=({copiedDuration:e=3e3}={})=>{let[t,r]=(0,b0.useState)(!1);return{isCopied:t,copyToClipboard:o=>{o&&navigator.clipboard.writeText(o).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},Jke=Uz({h1:({className:e,...t})=>(0,ft.jsx)("h1",{className:ue("aui-md-h1 mb-8 scroll-m-20 font-extrabold text-4xl tracking-tight last:mb-0",e),...t}),h2:({className:e,...t})=>(0,ft.jsx)("h2",{className:ue("aui-md-h2 mt-8 mb-4 scroll-m-20 font-semibold text-3xl tracking-tight first:mt-0 last:mb-0",e),...t}),h3:({className:e,...t})=>(0,ft.jsx)("h3",{className:ue("aui-md-h3 mt-6 mb-4 scroll-m-20 font-semibold text-2xl tracking-tight first:mt-0 last:mb-0",e),...t}),h4:({className:e,...t})=>(0,ft.jsx)("h4",{className:ue("aui-md-h4 mt-6 mb-4 scroll-m-20 font-semibold text-xl tracking-tight first:mt-0 last:mb-0",e),...t}),h5:({className:e,...t})=>(0,ft.jsx)("h5",{className:ue("aui-md-h5 my-4 font-semibold text-lg first:mt-0 last:mb-0",e),...t}),h6:({className:e,...t})=>(0,ft.jsx)("h6",{className:ue("aui-md-h6 my-4 font-semibold first:mt-0 last:mb-0",e),...t}),p:({className:e,...t})=>(0,ft.jsx)("p",{className:ue("aui-md-p mt-5 mb-5 leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>(0,ft.jsx)("a",{className:ue("aui-md-a font-medium text-primary underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>(0,ft.jsx)("blockquote",{className:ue("aui-md-blockquote border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>(0,ft.jsx)("ul",{className:ue("aui-md-ul my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>(0,ft.jsx)("ol",{className:ue("aui-md-ol my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>(0,ft.jsx)("hr",{className:ue("aui-md-hr my-5 border-b",e),...t}),table:({className:e,...t})=>(0,ft.jsx)("table",{className:ue("aui-md-table my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>(0,ft.jsx)("th",{className:ue("aui-md-th bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [[align=center]]:text-center [[align=right]]:text-right",e),...t}),td:({className:e,...t})=>(0,ft.jsx)("td",{className:ue("aui-md-td border-b border-l px-4 py-2 text-left last:border-r [[align=center]]:text-center [[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>(0,ft.jsx)("tr",{className:ue("aui-md-tr m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>(0,ft.jsx)("sup",{className:ue("aui-md-sup [&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>(0,ft.jsx)("pre",{className:ue("aui-md-pre overflow-x-auto rounded-t-none! rounded-b-lg bg-black p-4 text-white",e),...t}),code:function({className:t,...r}){let n=Wx();return(0,ft.jsx)("code",{className:ue(!n&&"aui-md-inline-code rounded border bg-muted font-semibold",t),...r})},CodeHeader:Gke});var to=S(D(),1),bee=({toolName:e,argsText:t,result:r,status:n})=>{let o=n?.type==="running",a=n?.type==="incomplete",i=n?.type==="incomplete"&&n.reason==="cancelled",s=i&&n.error?typeof n.error=="string"?n.error:JSON.stringify(n.error):null;return(0,to.jsx)(UC,{title:`${i?"Cancelled: ":o?"Running: ":""}${e}`,isStreaming:o,isError:a,children:(0,to.jsxs)("div",{className:"flex flex-col gap-2 text-white",children:[s&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"font-semibold text-white/70 mb-0.5",children:"Cancelled reason:"}),(0,to.jsx)("p",{className:"text-white/60",children:s})]}),(0,to.jsxs)("div",{className:ue(i&&"opacity-60"),children:[(0,to.jsx)("p",{className:"font-semibold text-white/70 mb-0.5",children:"Arguments:"}),(0,to.jsx)("pre",{className:"whitespace-pre-wrap bg-black/20 p-1.5 rounded text-white/80",children:t})]}),!i&&r!==void 0&&(0,to.jsxs)("div",{className:"border-t border-white/10 pt-2",children:[(0,to.jsx)("p",{className:"font-semibold text-white/70 mb-0.5",children:"Result:"}),(0,to.jsx)("pre",{className:"whitespace-pre-wrap bg-black/20 p-1.5 rounded text-white/80",children:typeof r=="string"?r:JSON.stringify(r,null,2)})]})]})})};var rs=S(D(),1),wee=({label:e,onRemove:t,readonly:r=!1,className:n})=>{let o=!r&&t;return(0,rs.jsxs)(kl,{children:[(0,rs.jsx)(Cl,{asChild:!0,children:(0,rs.jsxs)("div",{className:ue("group flex items-center gap-1 rounded-md border border-muted-foreground py-1 px-1.5 text-xs","max-w-[200px] cursor-default",n),children:[o&&(0,rs.jsx)("button",{onClick:t,"aria-label":`Remove ${e}`,className:"shrink-0 hover:text-destructive transition-colors",children:(0,rs.jsx)(Vi,{className:"size-3"})}),(0,rs.jsx)("span",{className:"truncate",children:e})]})}),(0,rs.jsx)(_l,{side:"top",sideOffset:4,children:e})]})};var w0=S(A(),1);var Kx=S(D(),1);function See({modal:e=!1,...t}){return(0,Kx.jsx)(i3,{modal:e,...t})}function Iee({...e}){return(0,Kx.jsx)(s3,{...e})}function kee({className:e,align:t="start",sideOffset:r=4,...n}){return(0,Kx.jsx)(l3,{children:(0,Kx.jsx)(u3,{align:t,sideOffset:r,className:ue("z-[10000] w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),style:{zIndex:1e4,borderColor:ex.colors.border,...n.style},...n})})}var Kt=S(D(),1),Xke={attachment:ji,description:Yn,caption:Ui,link:fc},Cee=({isOpen:e,onOpenChange:t,categories:r,isLoading:n,activeIndex:o,flattenedItems:a,onSelectItem:i,onActiveIndexChange:s,getCategoryLabel:l,trigger:u,searchTerm:c})=>{let d=(0,w0.useRef)(null);(0,w0.useEffect)(()=>{e&&d.current&&d.current.scrollIntoView({block:"nearest",behavior:"smooth"})},[o,e]);let f=(m,h)=>{let v=0;for(let g=0;g<m;g++)v+=r[g].items.length;return v+h},p=!n&&a.length===0;return(0,Kt.jsxs)(See,{open:e,onOpenChange:t,modal:!1,children:[(0,Kt.jsx)(Iee,{asChild:!0,children:u}),(0,Kt.jsx)(kee,{className:"w-72 max-h-80 overflow-y-auto p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:m=>m.preventDefault(),children:(0,Kt.jsxs)("div",{className:"flex flex-col",children:[(0,Kt.jsx)("div",{className:"sticky top-0 z-10 border-b border-border bg-popover px-3 py-2",children:(0,Kt.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:c?`Searching for "${c}"`:"Select context to focus on"})}),n&&(0,Kt.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,Kt.jsx)(zy,{className:"size-5 animate-spin text-muted-foreground"})}),p&&(0,Kt.jsxs)("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:["No context items found",c&&(0,Kt.jsx)("span",{className:"block text-xs mt-1",children:"Try a different search term"})]}),!n&&r.map((m,h)=>{if(m.items.length===0)return null;let v=Xke[m.type]||ji;return(0,Kt.jsxs)("div",{className:"py-1",children:[(0,Kt.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[(0,Kt.jsx)(v,{className:"size-3.5 text-muted-foreground"}),(0,Kt.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:l(m.type)}),(0,Kt.jsxs)("span",{className:"text-xs text-muted-foreground/60",children:["(",m.items.length,")"]})]}),(0,Kt.jsx)("div",{className:"flex flex-col",children:m.items.map((g,y)=>{let x=f(h,y),b=x===o;return(0,Kt.jsxs)("button",{ref:b?d:null,type:"button",className:ue("flex flex-col items-start px-3 py-2 text-left text-sm transition-colors","hover:bg-accent/10",b&&"bg-accent/20"),onClick:()=>i(g),onMouseEnter:()=>s(x),children:[(0,Kt.jsx)("span",{className:"truncate w-full font-medium text-foreground",children:g.title}),(g.lessonTitle||g.chapterTitle)&&(0,Kt.jsx)("span",{className:"truncate w-full text-xs text-muted-foreground",children:g.chapterTitle&&g.lessonTitle?`${g.chapterTitle} > ${g.lessonTitle}`:g.lessonTitle||g.chapterTitle})]},g.id)})})]},m.type)})]})})]})};var Jt=S(A(),1);var Wz=S(D(),1),_ee={attachment:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',description:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/></svg>',caption:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>'};function Yke(e){return _ee[e]||_ee.attachment}var Qke="\u200B",Zz=(0,Jt.forwardRef)(({placeholder:e="Ask, search, or make anything...",className:t,autoFocus:r=!1,onInput:n,onKeyDown:o,onMentionRemove:a,onTriggerDetected:i,onTriggerDismissed:s,onSubmit:l},u)=>{let c=(0,Jt.useRef)(null),d=Ed(),[f,p]=(0,Jt.useState)(!0),[m,h]=(0,Jt.useState)([]),v=(0,Jt.useRef)(null),g=(0,Jt.useCallback)(()=>{let k=c.current;if(!k)return"";let M="",L=j=>{if(j.nodeType===Node.TEXT_NODE){let Y=j.textContent||"";M+=Y.replace(/\u200B/g,"")}else if(j.nodeType===Node.ELEMENT_NODE){let Y=j;if(Y.dataset.mentionId){let F=Y.dataset.mentionTitle||"";M+=`[${F}]`}else Y.tagName==="BR"?M+=`
|
|
505
|
+
`:j.childNodes.forEach(L)}};return k.childNodes.forEach(L),M.trim()},[]),y=(0,Jt.useCallback)(()=>{let k=window.getSelection();if(!k||!k.rangeCount)return 0;let M=k.getRangeAt(0),L=M.cloneRange();L.selectNodeContents(c.current),L.setEnd(M.endContainer,M.endOffset);let j=0,Y=F=>{if(F===M.endContainer)return F.nodeType===Node.TEXT_NODE&&(j+=M.endOffset),!0;if(F.nodeType===Node.TEXT_NODE){let K=(F.textContent||"").replace(/\u200B/g,"");j+=K.length}else if(F.nodeType===Node.ELEMENT_NODE){let K=F;if(K.dataset.mentionId){let ee=K.dataset.mentionTitle||"";j+=ee.length+2}else if(K.tagName==="BR")j+=1;else for(let ee of Array.from(F.childNodes))if(Y(ee))return!0}return!1};if(c.current){for(let F of Array.from(c.current.childNodes))if(Y(F))break}return j},[]),x=(0,Jt.useCallback)(()=>{let k=g();d.setText(k),p(k.length===0)},[d,g]),b=(0,Jt.useCallback)(()=>{x();let k=g(),M=y();n?.({text:k,cursorPosition:M});let L=c.current;if(!L)return;let j=window.getSelection();if(!j||!j.rangeCount)return;let Y=j.getRangeAt(0),F="",K=0,ee=U=>{if(U===Y.endContainer)return U.nodeType===Node.TEXT_NODE&&(F+=(U.textContent||"").slice(0,Y.endOffset)),!0;if(U.nodeType===Node.TEXT_NODE)F+=U.textContent||"",K+=(U.textContent||"").length;else if(U.nodeType===Node.ELEMENT_NODE){if(U.dataset.mentionId)F+=" ",K+=1;else for(let ve of Array.from(U.childNodes))if(ee(ve))return!0}return!1};for(let U of Array.from(L.childNodes))if(ee(U))break;let se=F.lastIndexOf("@");if(se!==-1){let U=se>0?F[se-1]:" ";if(U===" "||U===`
|
|
506
|
+
`||U===Qke||se===0){let N=F.slice(se+1);if(!N.includes(" ")){v.current=se,i?.(N,se);return}}}v.current!==null&&(v.current=null,s?.())},[x,g,y,n,i,s]),_=(0,Jt.useCallback)(k=>{if(k.key==="Enter"&&!k.shiftKey){if(o&&(o(k),k.defaultPrevented))return;k.preventDefault(),g().trim()&&l?.();return}if(k.key==="Backspace"){let M=window.getSelection();if(!M||!M.rangeCount)return;let L=M.getRangeAt(0);if(L.collapsed){let j=L.startContainer,Y=L.startOffset;if(j.nodeType===Node.TEXT_NODE&&Y===0){let F=j.previousSibling;if(!F&&j.parentElement!==c.current&&(F=j.parentElement?.previousSibling||null),F&&F.dataset?.mentionId){k.preventDefault();let K=F.dataset.mentionId;F.parentNode?.removeChild(F),h(ee=>ee.filter(se=>se.id!==K)),a?.(K),x();return}}if(j.nodeType===Node.ELEMENT_NODE){let K=j.childNodes[Y-1];if(K&&K.dataset?.mentionId){k.preventDefault();let ee=K.dataset.mentionId;K.parentNode?.removeChild(K),h(se=>se.filter(U=>U.id!==ee)),a?.(ee),x();return}}}}o?.(k)},[o,a,x,l,g]),I=(0,Jt.useCallback)(k=>{let M=c.current;if(!M)return;let L=window.getSelection();if(!L||!L.rangeCount)return;let j=L.getRangeAt(0);if(v.current!==null){let U=0,N=null,ve=0,T=Ne=>{if(Ne.nodeType===Node.TEXT_NODE){let It=Ne.textContent||"",E=v.current-U;if(E>=0&&E<It.length)return N=Ne,ve=E,!0;U+=It.length}else if(Ne.nodeType===Node.ELEMENT_NODE){if(Ne.dataset.mentionId)U+=1;else for(let E of Array.from(Ne.childNodes))if(T(E))return!0}return!1};for(let Ne of Array.from(M.childNodes))if(T(Ne))break;if(N){let Ne=document.createRange();Ne.setStart(N,ve),Ne.setEnd(j.endContainer,j.endOffset),Ne.deleteContents()}}let Y=document.createElement("span");if(Y.className="inline-flex items-center gap-1 rounded-md border border-muted-foreground py-0.5 px-1.5 text-xs mx-0.5 cursor-default select-none bg-muted/50 max-w-[350px]",Y.contentEditable="false",Y.dataset.mentionId=k.id,Y.dataset.mentionTitle=k.title,k.icon){let U=document.createElement("img");U.src=k.icon,U.className="size-3.5 rounded-sm shrink-0",U.alt="",Y.appendChild(U)}else if(k.type){let U=document.createElement("span");U.className="size-3.5 shrink-0 flex items-center justify-center",U.innerHTML=Yke(k.type),Y.appendChild(U)}let F=document.createElement("span");F.className="truncate",F.textContent=k.title,Y.appendChild(F),L.getRangeAt(0).insertNode(Y);let ee=document.createTextNode(" ");Y.after(ee);let se=document.createRange();se.setStartAfter(ee),se.collapse(!0),L.removeAllRanges(),L.addRange(se),h(U=>[...U,k]),v.current=null,x(),setTimeout(()=>{c.current?.focus()},10)},[x]);(0,Jt.useImperativeHandle)(u,()=>({focus:()=>c.current?.focus(),getValue:g,insertMention:I,getInlineMentions:()=>m}),[g,I,m]),(0,Jt.useEffect)(()=>{r&&c.current?.focus()},[r]),(0,Jt.useEffect)(()=>d.subscribe(()=>{d.getState().text===""&&c.current&&(c.current.innerHTML="",h([]),p(!0))}),[d]);let C=(0,Jt.useCallback)(k=>{k.preventDefault();let M=k.clipboardData.getData("text/plain");document.execCommand("insertText",!1,M)},[]);return(0,Wz.jsx)("div",{className:"relative",children:(0,Wz.jsx)("div",{ref:c,contentEditable:!0,role:"textbox","aria-label":"Message input","data-placeholder":e,className:ue("aui-composer-input mb-1 max-h-32 min-h-14 w-full resize-none bg-transparent px-4 pt-2 pb-3 text-sm outline-none","overflow-y-auto whitespace-pre-wrap wrap-break-word","focus:outline-none focus-visible:ring-0","empty:before:content-[attr(data-placeholder)] empty:before:text-muted-foreground empty:before:pointer-events-none",t),onInput:b,onKeyDown:_,onPaste:C,suppressContentEditableWarning:!0})})});Zz.displayName="MentionComposerInput";var Tee=S(A(),1);var ro=S(D(),1),eCe={attachment:ji,description:Yn,caption:Ui,link:fc},tCe=({title:e,type:t="attachment",className:r})=>{let n=eCe[t]||ji;return(0,ro.jsxs)(kl,{children:[(0,ro.jsx)(Cl,{asChild:!0,children:(0,ro.jsxs)("span",{className:ue("inline-flex items-center gap-1 rounded-md border border-muted-foreground/50 py-0.5 px-1.5 text-xs mx-0.5","max-w-[350px] cursor-default bg-muted/30 align-middle",r),children:[(0,ro.jsx)(n,{className:"size-3 shrink-0"}),(0,ro.jsx)("span",{className:"truncate",children:e})]})}),(0,ro.jsx)(_l,{side:"top",sideOffset:4,children:e})]})};function rCe(e){let t=[],r=/\[([^\]]+)\]/g,n=0,o;for(;(o=r.exec(e))!==null;)o.index>n&&t.push({type:"text",content:e.slice(n,o.index)}),t.push({type:"context",content:o[1]}),n=o.index+o[0].length;return n<e.length&&t.push({type:"text",content:e.slice(n)}),t}var Pee=()=>{let e=vh(),t=(0,Tee.useMemo)(()=>{let r=e.content?.filter(a=>a.type==="text");if(!r||r.length===0)return null;let n=r.map(a=>a.text).join("");return rCe(n).map((a,i)=>a.type==="context"?(0,ro.jsx)(tCe,{title:a.content},`context-${i}`):(0,ro.jsx)("span",{children:a.content},`text-${i}`))},[e.content]);return(0,ro.jsx)(ro.Fragment,{children:t})};var Pt=S(A(),1);var nCe={attachment:"Attachments",description:"Description",caption:"Video",link:"Links"};function Lee(e={}){let{onInsertMention:t}=e,r=(0,Pt.useContext)(Dz);if(!r)throw new Error("useContextMention must be used within a WidgetProvider");let{client:n}=r,{selectedContext:o,addContextItem:a,removeContextItem:i,clearContext:s}=Tp(),[l,u]=(0,Pt.useState)(!1),[c,d]=(0,Pt.useState)(""),[f,p]=(0,Pt.useState)(0),[m,h]=(0,Pt.useState)(!1),[v,g]=(0,Pt.useState)([]),[y,x]=(0,Pt.useState)(!1),b=n.getConfig(),_=b.baseUrl||"http://localhost:3000",I=b.apiKey,C=(0,Pt.useCallback)(async(T="",Ne=10)=>{h(!0);try{let It=new URLSearchParams({limit:Ne.toString()});T&&It.set("search",T);let E=await fetch(`${_}/api/widget/context?${It.toString()}`,{headers:{"Content-Type":"application/json","X-Assistant-Id":I}});if(!E.ok){console.error("[ContextMention] Failed to fetch context:",E.status);return}let Ve=await E.json();g(Ve.categories),x(Ve.hasMore)}catch(It){console.error("[ContextMention] Error fetching context:",It)}finally{h(!1)}},[_,I]),k=(0,Pt.useCallback)(()=>{u(!0),d(""),p(0),C()},[C]),M=(0,Pt.useCallback)(()=>{u(!1),d(""),p(0)},[]),L=(0,Pt.useCallback)(T=>{d(T),p(0),C(T)},[C]),j=(0,Pt.useMemo)(()=>v.flatMap(T=>T.items),[v]),Y=(0,Pt.useCallback)(()=>{p(T=>T<j.length-1?T+1:T)},[j.length]),F=(0,Pt.useCallback)(()=>{p(T=>T>0?T-1:0)},[]),K=(0,Pt.useCallback)(()=>{let T=j[f];T&&(a(T),M(),t?.(T))},[j,f,a,M,t]),ee=(0,Pt.useCallback)(T=>{a(T),M(),t?.(T)},[a,M,t]),se=(0,Pt.useCallback)(T=>{i(T)},[i]),U=(0,Pt.useCallback)(()=>{s()},[s]),N=(0,Pt.useCallback)(T=>{if(l)switch(T.key){case"ArrowDown":T.preventDefault(),Y();break;case"ArrowUp":T.preventDefault(),F();break;case"Enter":T.preventDefault(),K();break;case"Escape":T.preventDefault(),M();break}},[l,Y,F,K,M]),ve=(0,Pt.useCallback)(T=>nCe[T]||T,[]);return{selectedItems:o,selectItem:ee,removeItem:se,clearAll:U,isOpen:l,openPopover:k,closePopover:M,searchTerm:c,updateSearch:L,activeIndex:f,setActiveIndex:p,navigateUp:F,navigateDown:Y,selectActiveItem:K,handleKeyDown:N,categories:v,flattenedItems:j,isLoading:m,hasMore:y,getCategoryLabel:ve}}var ha=S(A(),1),B=S(D(),1),Eee=()=>(0,B.jsx)(Li.Root,{className:"aui-thread-root @container flex h-full flex-col bg-background",style:{"--thread-max-width":"44rem"},children:(0,B.jsxs)(Li.Viewport,{className:"aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",children:[(0,B.jsx)(Zs,{condition:({thread:e})=>e.isEmpty,children:(0,B.jsx)(sCe,{})}),(0,B.jsx)(Li.Messages,{components:{UserMessage:gCe,EditComposer:xCe,AssistantMessage:pCe}}),(0,B.jsxs)(Li.ViewportFooter,{className:"aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl bg-background pb-4",children:[(0,B.jsx)(oCe,{}),(0,B.jsx)(uCe,{})]})]})}),oCe=()=>(0,B.jsx)(Li.ScrollToBottom,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Scroll to bottom",variant:"outline",className:"aui-thread-scroll-to-bottom absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible dark:bg-background dark:hover:bg-accent",children:(0,B.jsx)(Ay,{})})}),aCe=()=>{let e=new Date().getHours();return e<12?"Good morning":e<18?"Good afternoon":"Good evening"},iCe=[{label:"Explain this concept in detail",icon:Fy,prompt:"Explain this concept to me by drawing comparisons"},{label:"Generate a podcast",icon:Hy,prompt:"/audio"},{label:"Quiz me",icon:vl,prompt:"/quiz"},{label:"Generate flashcards",icon:Ky,prompt:"/flashcards"}],sCe=()=>(0,B.jsxs)("div",{className:"aui-thread-welcome-root mx-auto flex w-full max-w-(--thread-max-width) flex-col gap-4",children:[(0,B.jsx)("div",{className:"aui-thread-welcome-center flex w-full grow flex-col items-center justify-center",children:(0,B.jsxs)("div",{className:"aui-thread-welcome-message flex size-full flex-col justify-center px-4",children:[(0,B.jsx)("h1",{className:"aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in font-semibold text-2xl duration-200",style:{color:"var(--color-primary)"},children:aCe()}),(0,B.jsx)("p",{className:"aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in text-muted-foreground text-xl delay-75 duration-200",children:"How may I be of service?"})]})}),(0,B.jsx)(lCe,{})]}),lCe=()=>(0,B.jsx)("div",{className:"aui-thread-welcome-suggestions flex w-full flex-col gap-2",children:iCe.map((e,t)=>{let r=e.icon;return(0,B.jsx)("div",{className:"fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200",style:{animationDelay:`${200+t*50}ms`},children:(0,B.jsx)(Li.Suggestion,{prompt:e.prompt,send:!0,asChild:!0,children:(0,B.jsx)(Tl,{variant:"ghost",className:"aui-thread-welcome-suggestion h-auto w-full @md:flex-col flex-wrap items-start justify-start gap-1 rounded-2xl border text-left text-sm transition-colors hover:bg-muted hover:text-primary","aria-label":e.label,style:{borderWidth:0,padding:8},children:(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(r,{className:"size-4 shrink-0"}),(0,B.jsx)("span",{children:e.label})]})})})},e.prompt)})}),uCe=()=>{let e=(0,ha.useRef)(null),t=Ed(),r=(0,ha.useCallback)(()=>{t.send()},[t]),n=(0,ha.useCallback)(C=>{e.current?.insertMention({id:C.id,title:C.title,icon:C.icon,type:C.type}),setTimeout(()=>{e.current?.focus()},0)},[]),{isOpen:o,openPopover:a,closePopover:i,categories:s,isLoading:l,activeIndex:u,flattenedItems:c,selectItem:d,setActiveIndex:f,handleKeyDown:p,getCategoryLabel:m,searchTerm:h,updateSearch:v}=Lee({onInsertMention:n}),{selectedContext:g,removeContextItem:y}=Tp(),x=(0,ha.useCallback)(C=>{o||a(),v(C)},[o,a,v]),b=(0,ha.useCallback)(()=>{o&&i()},[o,i]),_=(0,ha.useCallback)(C=>{o&&["ArrowUp","ArrowDown","Enter","Escape"].includes(C.key)&&(C.preventDefault(),p(C),C.key==="Escape"&&setTimeout(()=>{e.current?.focus()},0))},[o,p]),I=(0,ha.useCallback)(C=>{y(C)},[y]);return(0,B.jsx)(Cn.Root,{className:"aui-composer-root relative flex w-full flex-col",children:(0,B.jsxs)(Cn.AttachmentDropzone,{className:"aui-composer-attachment-dropzone flex w-full flex-col rounded-2xl border border-input bg-background px-1 pt-2 outline-none transition-shadow has-[[contenteditable]:focus-visible]:border-ring has-[[contenteditable]:focus-visible]:ring-2 has-[[contenteditable]:focus-visible]:ring-ring/20 data-[dragging=true]:border-ring data-[dragging=true]:border-dashed data-[dragging=true]:bg-accent/50",children:[(0,B.jsx)(cCe,{isOpen:o,onOpenChange:C=>C?a():i(),categories:s,isLoading:l,activeIndex:u,flattenedItems:c,onSelectItem:d,onActiveIndexChange:f,getCategoryLabel:m,searchTerm:h,selectedItems:g,onRemoveItem:y}),(0,B.jsx)(oee,{}),(0,B.jsx)(Zz,{ref:e,placeholder:"Ask, search, or make anything...",autoFocus:!0,onTriggerDetected:x,onTriggerDismissed:b,onKeyDown:_,onMentionRemove:I,onSubmit:r}),(0,B.jsx)(dCe,{})]})})},cCe=({isOpen:e,onOpenChange:t,categories:r,isLoading:n,activeIndex:o,flattenedItems:a,onSelectItem:i,onActiveIndexChange:s,getCategoryLabel:l,searchTerm:u,selectedItems:c,onRemoveItem:d})=>(0,B.jsxs)("div",{className:"aui-composer-context mb-2 flex items-center gap-2 overflow-x-auto px-1.5 pt-0.5 pb-1",children:[(0,B.jsx)(Cee,{isOpen:e,onOpenChange:t,categories:r,isLoading:n,activeIndex:o,flattenedItems:a,onSelectItem:i,onActiveIndexChange:s,getCategoryLabel:l,searchTerm:u,trigger:(0,B.jsx)(ht,{tooltip:"Add context (@)",side:"bottom",variant:"ghost",size:"icon",className:"aui-composer-add-context size-[34px] rounded-full p-1 font-semibold text-xs hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30","aria-label":"Add context (@)",children:(0,B.jsx)(My,{className:"size-5 stroke-[1.5px]"})})}),c.length>0&&(0,B.jsx)("div",{className:"flex items-center gap-1.5 overflow-x-auto",children:c.map(f=>(0,B.jsx)(wee,{label:f.title,onRemove:()=>d(f.id)},f.id))})]}),dCe=()=>(0,B.jsxs)("div",{className:"aui-composer-action-wrapper relative mx-2 mb-2 flex items-center justify-between",children:[(0,B.jsxs)("div",{className:"flex items-center gap-2",children:[(0,B.jsx)(aee,{}),(0,B.jsx)(ht,{tooltip:"All sources",side:"bottom",variant:"ghost",size:"icon",className:"aui-composer-all-sources size-[34px] rounded-full p-1 font-semibold text-xs hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30","aria-label":"All sources",children:(0,B.jsx)(Ny,{className:"size-5 stroke-[1.5px]"})})]}),(0,B.jsx)(Zs,{condition:({thread:e})=>!e.isRunning,children:(0,B.jsx)(Cn.Send,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Send message",side:"bottom",type:"submit",variant:"default",className:"aui-composer-send size-8 rounded-full","aria-label":"Send message",children:(0,B.jsx)(Ry,{className:"aui-composer-send-icon size-4"})})})}),(0,B.jsx)(Zs,{condition:({thread:e})=>e.isRunning,children:(0,B.jsx)(Cn.Cancel,{asChild:!0,children:(0,B.jsx)(Tl,{type:"button",variant:"default",size:"icon",className:"aui-composer-cancel size-8 rounded-full","aria-label":"Stop generating",children:(0,B.jsx)(Gy,{className:"aui-composer-cancel-icon size-3 fill-current"})})})})]}),fCe=()=>(0,B.jsx)(Ra.Error,{children:(0,B.jsx)(eg.Root,{className:"aui-message-error-root mt-2 rounded-md border border-destructive bg-destructive/10 p-3 text-destructive text-sm dark:bg-destructive/5 dark:text-red-200",children:(0,B.jsx)(eg.Message,{className:"aui-message-error-message line-clamp-2"})})}),pCe=()=>(0,B.jsxs)(Ra.Root,{className:"aui-assistant-message-root fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width) animate-in py-3 duration-150","data-role":"assistant",children:[(0,B.jsxs)("div",{className:"aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed",children:[(0,B.jsx)(Ra.Parts,{components:{Text:vee,tools:{Fallback:bee}}}),(0,B.jsx)(fCe,{})]}),(0,B.jsxs)("div",{className:"aui-assistant-message-footer mt-1 ml-2 flex",children:[(0,B.jsx)(Aee,{}),(0,B.jsx)(mCe,{})]})]}),mCe=()=>(0,B.jsxs)(Ci.Root,{hideWhenRunning:!0,autohide:"not-last",autohideFloat:"single-branch",className:"aui-assistant-action-bar-root col-start-3 row-start-2 -ml-1 flex gap-1 text-muted-foreground data-floating:absolute data-floating:rounded-md data-floating:border data-floating:bg-background data-floating:p-1 data-floating:shadow-sm",children:[(0,B.jsx)(Ci.Copy,{asChild:!0,children:(0,B.jsxs)(ht,{tooltip:"Copy",children:[(0,B.jsx)(Zs,{condition:({message:e})=>e.isCopied,children:(0,B.jsx)(la,{})}),(0,B.jsx)(Zs,{condition:({message:e})=>!e.isCopied,children:(0,B.jsx)(Bi,{})})]})}),(0,B.jsx)(Ci.ExportMarkdown,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Export as Markdown",children:(0,B.jsx)(cc,{})})}),(0,B.jsx)(Ci.Reload,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Refresh",children:(0,B.jsx)(Zy,{})})})]}),hCe=()=>{let[e,t]=(0,ha.useState)(!1),r=vh(n=>{console.log("[MessageContextIndicator] Message state:",n);let o=n.metadata,a=o?.context||o?.custom?.context;return console.log("[MessageContextIndicator] Context:",a),a});return!r||r.length===0?null:(0,B.jsxs)("div",{className:"col-start-2 mb-1 flex flex-col items-end",children:[(0,B.jsxs)("button",{onClick:()=>t(!e),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,B.jsxs)("span",{children:[r.length," Context"]}),(0,B.jsx)(uc,{className:ue("size-3.5 transition-transform duration-200",e&&"rotate-180")})]}),e&&(0,B.jsx)("div",{className:"mt-1 flex flex-wrap gap-1 justify-end",children:r.map(n=>(0,B.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:n.title},n.id))})]})},gCe=()=>(0,B.jsxs)(Ra.Root,{className:"aui-user-message-root fade-in slide-in-from-bottom-1 mx-auto grid w-full max-w-(--thread-max-width) animate-in auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 py-3 duration-150 [&:where(>*)]:col-start-2","data-role":"user",children:[(0,B.jsx)(hCe,{}),(0,B.jsx)(nee,{}),(0,B.jsxs)("div",{className:"aui-user-message-content-wrapper relative col-start-2 min-w-0",children:[(0,B.jsx)("div",{className:"aui-user-message-content wrap-break-word rounded-2xl bg-muted px-4 py-2.5 text-foreground",children:(0,B.jsx)(Pee,{})}),(0,B.jsx)("div",{className:"aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2",children:(0,B.jsx)(yCe,{})})]}),(0,B.jsx)(Aee,{className:"aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end"})]}),yCe=()=>(0,B.jsx)(Ci.Root,{hideWhenRunning:!0,autohide:"not-last",className:"aui-user-action-bar-root flex flex-col items-end",children:(0,B.jsx)(Ci.Edit,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Edit",className:"aui-user-action-edit p-4",children:(0,B.jsx)(Vy,{})})})}),xCe=()=>(0,B.jsx)(Ra.Root,{className:"aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col px-2 py-3",children:(0,B.jsxs)(Cn.Root,{className:"aui-edit-composer-root ml-auto flex w-full max-w-[85%] flex-col rounded-2xl bg-muted",children:[(0,B.jsx)(Cn.Input,{className:"aui-edit-composer-input min-h-14 w-full resize-none bg-transparent p-4 text-foreground text-sm outline-none",autoFocus:!0}),(0,B.jsxs)("div",{className:"aui-edit-composer-footer mx-3 mb-3 flex items-center gap-2 self-end",children:[(0,B.jsx)(Cn.Cancel,{asChild:!0,children:(0,B.jsx)(Tl,{variant:"ghost",size:"sm",children:"Cancel"})}),(0,B.jsx)(Cn.Send,{asChild:!0,children:(0,B.jsx)(Tl,{size:"sm",children:"Update"})})]})]})}),Aee=({className:e,...t})=>(0,B.jsxs)(Ws.Root,{hideWhenSingleBranch:!0,className:ue("aui-branch-picker-root mr-2 -ml-2 inline-flex items-center text-muted-foreground text-xs",e),...t,children:[(0,B.jsx)(Ws.Previous,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Previous",children:(0,B.jsx)($y,{})})}),(0,B.jsxs)("span",{className:"aui-branch-picker-state font-medium",children:[(0,B.jsx)(Ws.Number,{})," / ",(0,B.jsx)(Ws.Count,{})]}),(0,B.jsx)(Ws.Next,{asChild:!0,children:(0,B.jsx)(ht,{tooltip:"Next",children:(0,B.jsx)(Dy,{})})})]});var Re=S(D(),1),Ree=()=>(0,Re.jsxs)($u.Root,{className:"aui-thread-list-root flex flex-col",children:[(0,Re.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[(0,Re.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Chats"}),(0,Re.jsx)($u.New,{asChild:!0,children:(0,Re.jsx)(ht,{tooltip:"New chat",variant:"ghost",size:"icon",className:"h-7 w-7",children:(0,Re.jsx)(qy,{className:"h-4 w-4"})})})]}),(0,Re.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[(0,Re.jsx)($u.Items,{components:{ThreadListItem:vCe}}),(0,Re.jsx)("div",{className:"px-3 py-2",children:(0,Re.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Archived"})}),(0,Re.jsx)($u.Items,{archived:!0,components:{ThreadListItem:bCe}})]})]}),vCe=()=>(0,Re.jsxs)(Hn.Root,{className:"aui-thread-list-item group relative flex items-center gap-2 px-3 py-2 hover:bg-muted/50 data-[active]:bg-muted cursor-pointer transition-colors",children:[(0,Re.jsxs)(Hn.Trigger,{className:"flex flex-1 items-center gap-2 min-w-0",children:[(0,Re.jsx)(By,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"}),(0,Re.jsx)("div",{className:"flex flex-1 flex-col min-w-0",children:(0,Re.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:(0,Re.jsx)(Hn.Title,{fallback:"New Chat"})})})]}),(0,Re.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,Re.jsx)(Hn.Archive,{asChild:!0,children:(0,Re.jsx)(ht,{tooltip:"Archive",variant:"ghost",size:"icon",className:"h-6 w-6",children:(0,Re.jsx)(bp,{className:"h-3.5 w-3.5"})})}),(0,Re.jsx)(Hn.Delete,{asChild:!0,children:(0,Re.jsx)(ht,{tooltip:"Delete",variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",children:(0,Re.jsx)(Sp,{className:"h-3.5 w-3.5"})})})]})]}),bCe=()=>(0,Re.jsxs)(Hn.Root,{className:"aui-thread-list-item-archived group relative flex items-center gap-2 px-3 py-2 hover:bg-muted/50 data-[active]:bg-muted cursor-pointer transition-colors opacity-70",children:[(0,Re.jsxs)(Hn.Trigger,{className:"flex flex-1 items-center gap-2 min-w-0",children:[(0,Re.jsx)(bp,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"}),(0,Re.jsx)("div",{className:"flex flex-1 flex-col min-w-0",children:(0,Re.jsx)("span",{className:"truncate text-sm text-foreground",children:(0,Re.jsx)(Hn.Title,{fallback:"Archived Chat"})})})]}),(0,Re.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,Re.jsx)(Hn.Unarchive,{asChild:!0,children:(0,Re.jsx)(ht,{tooltip:"Unarchive",variant:"ghost",size:"icon",className:"h-6 w-6",children:(0,Re.jsx)(Ey,{className:"h-3.5 w-3.5"})})}),(0,Re.jsx)(Hn.Delete,{asChild:!0,children:(0,Re.jsx)(ht,{tooltip:"Delete",variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",children:(0,Re.jsx)(Sp,{className:"h-3.5 w-3.5"})})})]})]});var nt=S(D(),1),wCe={audio:wp,"audio-overview":wp,"video-overview":Ui,"mind-map":jy,reports:Yn,flashcards:Sl,quiz:ua,"slide-deck":Wy,infographic:bl},SCe={audio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300","audio-overview":"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300","video-overview":"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300","mind-map":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",reports:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",flashcards:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300",quiz:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-300","slide-deck":"bg-indigo-100 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-300",infographic:"bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-300"},ICe={audio:"Audio","audio-overview":"Audio Overview","video-overview":"Video Overview","mind-map":"Mind Map",reports:"Report",flashcards:"Flashcards",quiz:"Quiz","slide-deck":"Slide Deck",infographic:"Infographic"},kCe=({category:e,title:t,content:r,isLoading:n,children:o})=>{let a=wCe[e],i=SCe[e],s=ICe[e];return(0,nt.jsxs)("div",{className:"my-3 overflow-hidden rounded-xl border border-border bg-card shadow-sm",children:[(0,nt.jsxs)("div",{className:ue("flex items-center gap-3 px-4 py-3",i),children:[(0,nt.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-white/50 dark:bg-black/20",children:n?(0,nt.jsx)(Ha,{className:"h-4 w-4 animate-spin"}):(0,nt.jsx)(a,{className:"h-4 w-4"})}),(0,nt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,nt.jsx)("p",{className:"text-xs font-medium opacity-80",children:s}),(0,nt.jsx)("h4",{className:"truncate font-semibold text-sm",children:t})]})]}),r&&(0,nt.jsx)("div",{className:"px-4 py-3 text-sm text-muted-foreground",children:(0,nt.jsx)("div",{className:"line-clamp-4 whitespace-pre-wrap",children:r})}),o,!n&&(0,nt.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-border px-4 py-2",children:[(0,nt.jsxs)("button",{className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-muted transition-colors",children:[(0,nt.jsx)(cc,{className:"h-3 w-3"}),"Export"]}),(0,nt.jsxs)("button",{className:"flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-muted transition-colors",children:[(0,nt.jsx)(dc,{className:"h-3 w-3"}),"Open"]})]})]})};function Hl(e){return ph({toolName:`create_${e.replace(/-/g,"_")}`,render:({args:t,result:r,status:n})=>{let o=n.type==="running";return(0,nt.jsx)(kCe,{category:e,title:t.title||"Generating...",content:r?.content||t.content,isLoading:o})}})}var CCe=Hl("audio-overview"),_Ce=Hl("video-overview"),TCe=Hl("mind-map"),PCe=Hl("reports"),LCe=Hl("flashcards"),ECe=Hl("quiz"),ACe=Hl("slide-deck"),RCe=Hl("infographic"),Mee=()=>(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(CCe,{}),(0,nt.jsx)(_Ce,{}),(0,nt.jsx)(TCe,{}),(0,nt.jsx)(PCe,{}),(0,nt.jsx)(LCe,{}),(0,nt.jsx)(ECe,{}),(0,nt.jsx)(ACe,{}),(0,nt.jsx)(RCe,{})]});var Mn=S(D(),1),$ee=({sidebarOpen:e=!1,onSidebarClose:t})=>(0,Mn.jsxs)("div",{className:"relative flex flex-1 h-full w-full overflow-hidden bg-background",children:[(0,Mn.jsx)(Mee,{}),(0,Mn.jsx)("div",{className:"flex flex-1 flex-col min-w-0",children:(0,Mn.jsx)("div",{className:"flex-1 overflow-hidden relative",children:(0,Mn.jsx)(Eee,{})})}),(0,Mn.jsx)(_z,{children:e&&(0,Mn.jsxs)(Mn.Fragment,{children:[(0,Mn.jsx)(ql.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 bg-black/50 z-40",onClick:t}),(0,Mn.jsx)(ql.div,{initial:{x:-256},animate:{x:0},exit:{x:-256},transition:{duration:.2,ease:[.4,0,.2,1]},className:ue("absolute left-0 top-0 bottom-0 w-64 bg-background z-50 overflow-hidden shadow-lg"),children:(0,Mn.jsx)(Ree,{})})]})})]});var Kz={WidgetClient:du,init:e=>{let{container:t="#course-ai-widget",defaultSidebarOpen:r=!0,...n}=e,o=typeof t=="string"?document.querySelector(t):t;if(!o)throw new Error(`Container not found: ${t}`);let a=(0,Dee.createRoot)(o);return a.render(Gz.default.createElement(oQ,{config:n},Gz.default.createElement($ee,{sidebarOpen:r}))),{unmount:()=>a.unmount()}},createClient:e=>new du(e)};if(typeof window<"u"){window.CourseAI=Kz;let e=document.currentScript;if(e?.hasAttribute("data-api-key")){let t=()=>{let r=e.getAttribute("data-assistant-id");if(!r){console.error("[CourseAI] Missing required attribute: data-assistant-id");return}let n={apiKey:e.getAttribute("data-api-key"),assistantId:r,userId:e.getAttribute("data-user-id")||void 0,baseUrl:e.getAttribute("data-base-url")||"http://localhost:3000",debug:e.hasAttribute("data-debug")},o=e.getAttribute("data-container")||"#course-ai-widget",a=e.getAttribute("data-sidebar-open")!=="false";Kz.init({...n,container:o,defaultSidebarOpen:a})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}}var MCe=Kz;return o2($Ce);})();
|
|
507
|
+
/*! Bundled license information:
|
|
508
|
+
|
|
509
|
+
react/cjs/react.production.min.js:
|
|
510
|
+
(**
|
|
511
|
+
* @license React
|
|
512
|
+
* react.production.min.js
|
|
513
|
+
*
|
|
514
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
515
|
+
*
|
|
516
|
+
* This source code is licensed under the MIT license found in the
|
|
517
|
+
* LICENSE file in the root directory of this source tree.
|
|
518
|
+
*)
|
|
519
|
+
|
|
520
|
+
scheduler/cjs/scheduler.production.min.js:
|
|
521
|
+
(**
|
|
522
|
+
* @license React
|
|
523
|
+
* scheduler.production.min.js
|
|
524
|
+
*
|
|
525
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
526
|
+
*
|
|
527
|
+
* This source code is licensed under the MIT license found in the
|
|
528
|
+
* LICENSE file in the root directory of this source tree.
|
|
529
|
+
*)
|
|
530
|
+
|
|
531
|
+
react-dom/cjs/react-dom.production.min.js:
|
|
532
|
+
(**
|
|
533
|
+
* @license React
|
|
534
|
+
* react-dom.production.min.js
|
|
535
|
+
*
|
|
536
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
537
|
+
*
|
|
538
|
+
* This source code is licensed under the MIT license found in the
|
|
539
|
+
* LICENSE file in the root directory of this source tree.
|
|
540
|
+
*)
|
|
541
|
+
|
|
542
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
543
|
+
(**
|
|
544
|
+
* @license React
|
|
545
|
+
* react-jsx-runtime.production.min.js
|
|
546
|
+
*
|
|
547
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
548
|
+
*
|
|
549
|
+
* This source code is licensed under the MIT license found in the
|
|
550
|
+
* LICENSE file in the root directory of this source tree.
|
|
551
|
+
*)
|
|
552
|
+
|
|
553
|
+
react-is/cjs/react-is.production.min.js:
|
|
554
|
+
(** @license React v16.13.1
|
|
555
|
+
* react-is.production.min.js
|
|
556
|
+
*
|
|
557
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
558
|
+
*
|
|
559
|
+
* This source code is licensed under the MIT license found in the
|
|
560
|
+
* LICENSE file in the root directory of this source tree.
|
|
561
|
+
*)
|
|
562
|
+
|
|
563
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
564
|
+
(**
|
|
565
|
+
* @license React
|
|
566
|
+
* use-sync-external-store-shim.production.js
|
|
567
|
+
*
|
|
568
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
569
|
+
*
|
|
570
|
+
* This source code is licensed under the MIT license found in the
|
|
571
|
+
* LICENSE file in the root directory of this source tree.
|
|
572
|
+
*)
|
|
573
|
+
|
|
574
|
+
classnames/index.js:
|
|
575
|
+
(*!
|
|
576
|
+
Copyright (c) 2018 Jed Watson.
|
|
577
|
+
Licensed under the MIT License (MIT), see
|
|
578
|
+
http://jedwatson.github.io/classnames
|
|
579
|
+
*)
|
|
580
|
+
|
|
581
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
582
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
583
|
+
lucide-react/dist/esm/Icon.js:
|
|
584
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
585
|
+
lucide-react/dist/esm/icons/archive-restore.js:
|
|
586
|
+
lucide-react/dist/esm/icons/archive.js:
|
|
587
|
+
lucide-react/dist/esm/icons/arrow-down.js:
|
|
588
|
+
lucide-react/dist/esm/icons/arrow-up.js:
|
|
589
|
+
lucide-react/dist/esm/icons/at-sign.js:
|
|
590
|
+
lucide-react/dist/esm/icons/badge-question-mark.js:
|
|
591
|
+
lucide-react/dist/esm/icons/chart-column.js:
|
|
592
|
+
lucide-react/dist/esm/icons/check.js:
|
|
593
|
+
lucide-react/dist/esm/icons/chevron-down.js:
|
|
594
|
+
lucide-react/dist/esm/icons/chevron-left.js:
|
|
595
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
596
|
+
lucide-react/dist/esm/icons/chevron-up.js:
|
|
597
|
+
lucide-react/dist/esm/icons/circle-question-mark.js:
|
|
598
|
+
lucide-react/dist/esm/icons/circle-x.js:
|
|
599
|
+
lucide-react/dist/esm/icons/copy.js:
|
|
600
|
+
lucide-react/dist/esm/icons/download.js:
|
|
601
|
+
lucide-react/dist/esm/icons/external-link.js:
|
|
602
|
+
lucide-react/dist/esm/icons/file-text.js:
|
|
603
|
+
lucide-react/dist/esm/icons/file.js:
|
|
604
|
+
lucide-react/dist/esm/icons/globe.js:
|
|
605
|
+
lucide-react/dist/esm/icons/headphones.js:
|
|
606
|
+
lucide-react/dist/esm/icons/layers.js:
|
|
607
|
+
lucide-react/dist/esm/icons/link.js:
|
|
608
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
609
|
+
lucide-react/dist/esm/icons/loader.js:
|
|
610
|
+
lucide-react/dist/esm/icons/message-square-text.js:
|
|
611
|
+
lucide-react/dist/esm/icons/message-square.js:
|
|
612
|
+
lucide-react/dist/esm/icons/network.js:
|
|
613
|
+
lucide-react/dist/esm/icons/paperclip.js:
|
|
614
|
+
lucide-react/dist/esm/icons/pencil.js:
|
|
615
|
+
lucide-react/dist/esm/icons/plus.js:
|
|
616
|
+
lucide-react/dist/esm/icons/podcast.js:
|
|
617
|
+
lucide-react/dist/esm/icons/presentation.js:
|
|
618
|
+
lucide-react/dist/esm/icons/refresh-cw.js:
|
|
619
|
+
lucide-react/dist/esm/icons/square.js:
|
|
620
|
+
lucide-react/dist/esm/icons/trash-2.js:
|
|
621
|
+
lucide-react/dist/esm/icons/video.js:
|
|
622
|
+
lucide-react/dist/esm/icons/wallet-cards.js:
|
|
623
|
+
lucide-react/dist/esm/icons/x.js:
|
|
624
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
625
|
+
(**
|
|
626
|
+
* @license lucide-react v0.562.0 - ISC
|
|
627
|
+
*
|
|
628
|
+
* This source code is licensed under the ISC license.
|
|
629
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
630
|
+
*)
|
|
631
|
+
*/
|
|
632
|
+
//# sourceMappingURL=course-ai-widget.global.js.map
|