@fungi.computer/prints 0.18.0 → 0.18.2
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/assets/audio-waveform-Be5wRu8s.js +1 -0
- package/dist/assets/audio-waveform-view-DbTyVH72.js +1 -0
- package/dist/assets/button-oE2Hrd5D.js +83 -0
- package/dist/assets/computer-Bfe-Ioxr.js +1 -0
- package/dist/assets/dialog-BXLOuKaF.js +1 -0
- package/dist/assets/dist-DAokFn5x.js +1 -0
- package/dist/assets/dropdown-menu-CAHLGfkb.js +1 -0
- package/dist/assets/ellipsis-DlNHenkt.js +1 -0
- package/dist/assets/generation-quote-DcaCSlvV.js +2 -0
- package/dist/assets/heart-BquDo4lf.js +1 -0
- package/dist/assets/images-CQ3EhUoY.js +1 -0
- package/dist/assets/index-D-LwJiG1.js +2 -0
- package/dist/assets/keycap-D2RkH2IS.js +1 -0
- package/dist/assets/library-rail-DVjIWa9C.js +1266 -0
- package/dist/assets/library-view-BBAeJjj6.js +1 -0
- package/dist/assets/log-event-B3BGsDWO.js +1 -0
- package/dist/assets/{print-download-button-CwK9wdo2.js → print-download-button-BNNi_aoW.js} +2 -2
- package/dist/assets/print-info-drawer-DDZan_oj.js +2 -0
- package/dist/assets/print-viewer-D7p4Tznx.js +2 -0
- package/dist/assets/prints-folder-dialog--W4H7Jx6.js +1 -0
- package/dist/assets/query-CYqgVHJ7.js +1 -0
- package/dist/assets/status-DNJRO5m5.js +1 -0
- package/dist/assets/textarea-LIOZDOK4.js +1 -0
- package/dist/assets/upload-queue-BHAaEiPu.js +1 -0
- package/dist/assets/useMutation-DH-cbXIA.js +1 -0
- package/dist/assets/useTriggerFocusGuards-Bddw7Qdn.js +1 -0
- package/dist/index.html +20 -4
- package/package.json +7 -7
- package/dist/assets/generation-quote-D7I39kF2.js +0 -2
- package/dist/assets/index-C0hNF6s0.js +0 -1267
- package/dist/assets/local-images-B-ZLs6V_.js +0 -1
- package/dist/assets/log-event-BpFScFqd.js +0 -83
- package/dist/assets/print-info-drawer-B1PQWwH2.js +0 -2
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{r as n}from"./modules-C4mfDnjH.js";var r=t((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.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`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var ee=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function te(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)x.call(n,i)&&!C.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:S.current}}function w(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function T(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var E=/\/+/g;function D(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function O(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+D(c,0):a,ee(o)?(i=``,e!=null&&(i=e.replace(E,`$&/`)+`/`),O(o,r,i,``,function(e){return e})):o!=null&&(T(o)&&(o=w(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(E,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,ee(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+D(s,l);c+=O(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+D(s,l++),c+=O(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return O(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var k={current:null},ae={transition:null},oe={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:ae,ReactCurrentOwner:S};function se(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,e.act=se,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=S.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)x.call(n,l)&&!C.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=te,e.createFactory=function(e){var t=te.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=T,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ae.transition;ae.transition={};try{e()}finally{ae.transition=t}},e.unstable_act=se,e.useCallback=function(e,t){return k.current.useCallback(e,t)},e.useContext=function(e){return k.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return k.current.useDeferredValue(e)},e.useEffect=function(e,t){return k.current.useEffect(e,t)},e.useId=function(){return k.current.useId()},e.useImperativeHandle=function(e,t,n){return k.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return k.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return k.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return k.current.useMemo(e,t)},e.useReducer=function(e,t,n){return k.current.useReducer(e,t,n)},e.useRef=function(e){return k.current.useRef(e)},e.useState=function(e){return k.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return k.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return k.current.useTransition()},e.version=`18.3.1`})),i=t(((e,t)=>{t.exports=r()})),a;function o(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var s=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},c=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(a=globalThis).__zod_globalConfig??(a.__zod_globalConfig={});var l=globalThis.__zod_globalConfig;function u(e){return e&&Object.assign(l,e),l}function d(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function f(e,t){return typeof t==`bigint`?t.toString():t}function p(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return e==null}function h(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function g(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var _=Symbol(`evaluating`);function v(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==_)return r===void 0&&(r=_,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function b(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ee(e){return JSON.stringify(e)}function x(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var S=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function C(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var te=p(()=>{if(l.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function w(e){if(C(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return C(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function T(e){return w(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ne=new Set([`string`,`number`,`symbol`]);function E(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function D(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function O(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 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 re(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ie={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function k(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return D(e,b(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return y(this,`shape`,e),e},checks:[]}))}function ae(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return D(e,b(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return y(this,`shape`,r),r},checks:[]}))}function oe(e,t){if(!w(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return D(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function se(e,t){if(!w(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return D(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function A(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return D(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return y(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ce(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return D(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return y(this,`shape`,i),i},checks:[]}))}function le(e,t,n){return D(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return y(this,`shape`,i),i}}))}function ue(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function de(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function fe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function pe(e){return typeof e==`string`?e:e?.message}function me(e,t,n){let r=e.message?e.message:pe(e.inst?._zod.def?.error?.(e))??pe(t?.error?.(e))??pe(n.customError?.(e))??pe(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function he(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ge(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var _e=(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,f,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ve=o(`$ZodError`,_e),ye=o(`$ZodError`,_e,{Parent:Error});function be(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Se=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new s;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>me(e,a,u())));throw S(t,i?.callee),t}return o.value},Ce=Se(ye),we=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>me(e,a,u())));throw S(t,i?.callee),t}return o.value},Te=we(ye),Ee=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new s;return a.issues.length?{success:!1,error:new(e??ve)(a.issues.map(e=>me(e,i,u())))}:{success:!0,data:a.value}},De=Ee(ye),Oe=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>me(e,i,u())))}:{success:!0,data:a.value}},ke=Oe(ye),Ae=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Se(e)(t,n,i)},je=e=>(t,n,r)=>Se(e)(t,n,r),Me=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return we(e)(t,n,i)},Ne=e=>async(t,n,r)=>we(e)(t,n,r),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ee(e)(t,n,i)},Fe=e=>(t,n,r)=>Ee(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Le=e=>async(t,n,r)=>Oe(e)(t,n,r),Re=/^[cC][0-9a-z]{6,}$/,ze=/^[0-9a-z]+$/,Be=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ve=/^[0-9a-vA-V]{20}$/,He=/^[A-Za-z0-9]{27}$/,Ue=/^[a-zA-Z0-9_-]{21}$/,We=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ge=/^([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})$/,Ke=e=>e?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)$/,qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Je=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ye(){return new RegExp(Je,`u`)}var Xe=/^(?:(?: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])$/,Ze=/^(([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}|:))$/,Qe=/^((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])$/,$e=/^(([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])$/,et=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tt=/^[A-Za-z0-9_-]*$/,nt=/^https?$/,rt=/^\+[1-9]\d{6,14}$/,it=`(?:(?:\\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])))`,at=RegExp(`^${it}$`);function ot(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 st(e){return RegExp(`^${ot(e)}$`)}function ct(e){let t=ot({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${it}T(?:${r})$`)}var lt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ut=/^-?\d+$/,dt=/^-?\d+(?:\.\d+)?$/,ft=/^(?:true|false)$/i,pt=/^null$/i,mt=/^[^A-Z]*$/,ht=/^[^a-z]*$/,gt=o(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),_t={number:`number`,bigint:`bigint`,object:`date`},vt=o(`$ZodCheckLessThan`,(e,t)=>{gt.init(e,t);let n=_t[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yt=o(`$ZodCheckGreaterThan`,(e,t)=>{gt.init(e,t);let n=_t[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bt=o(`$ZodCheckMultipleOf`,(e,t)=>{gt.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):g(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),xt=o(`$ZodCheckNumberFormat`,(e,t)=>{gt.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ie[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=ut)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),St=o(`$ZodCheckMaxLength`,(e,t)=>{var n;gt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!m(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=he(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ct=o(`$ZodCheckMinLength`,(e,t)=>{var n;gt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!m(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=he(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wt=o(`$ZodCheckLengthEquals`,(e,t)=>{var n;gt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!m(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=he(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tt=o(`$ZodCheckStringFormat`,(e,t)=>{var n,r;gt.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Et=o(`$ZodCheckRegex`,(e,t)=>{Tt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Dt=o(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=mt,Tt.init(e,t)}),Ot=o(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ht,Tt.init(e,t)}),kt=o(`$ZodCheckIncludes`,(e,t)=>{gt.init(e,t);let n=E(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),At=o(`$ZodCheckStartsWith`,(e,t)=>{gt.init(e,t);let n=RegExp(`^${E(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),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})}}),jt=o(`$ZodCheckEndsWith`,(e,t)=>{gt.init(e,t);let n=RegExp(`.*${E(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),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})}}),Mt=o(`$ZodCheckOverwrite`,(e,t)=>{gt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Nt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}},Pt={major:4,minor:4,patch:3},j=o(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=ue(e),i;for(let a of t){if(a._zod.def.when){if(de(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new s;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ue(e,t))});else{if(e.issues.length===t)continue;r||=ue(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ue(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new s;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new s;return o.then(e=>t(e,r,a))}return t(o,r,a)}}v(e,`~standard`,()=>({validate:t=>{try{let n=De(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ke(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ft=o(`$ZodString`,(e,t)=>{j.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??lt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),It=o(`$ZodStringFormat`,(e,t)=>{Tt.init(e,t),Ft.init(e,t)}),Lt=o(`$ZodGUID`,(e,t)=>{t.pattern??=Ge,It.init(e,t)}),Rt=o(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ke(e)}else t.pattern??=Ke();It.init(e,t)}),zt=o(`$ZodEmail`,(e,t)=>{t.pattern??=qe,It.init(e,t)}),Bt=o(`$ZodURL`,(e,t)=>{It.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===nt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Vt=o(`$ZodEmoji`,(e,t)=>{t.pattern??=Ye(),It.init(e,t)}),Ht=o(`$ZodNanoID`,(e,t)=>{t.pattern??=Ue,It.init(e,t)}),Ut=o(`$ZodCUID`,(e,t)=>{t.pattern??=Re,It.init(e,t)}),Wt=o(`$ZodCUID2`,(e,t)=>{t.pattern??=ze,It.init(e,t)}),Gt=o(`$ZodULID`,(e,t)=>{t.pattern??=Be,It.init(e,t)}),Kt=o(`$ZodXID`,(e,t)=>{t.pattern??=Ve,It.init(e,t)}),qt=o(`$ZodKSUID`,(e,t)=>{t.pattern??=He,It.init(e,t)}),Jt=o(`$ZodISODateTime`,(e,t)=>{t.pattern??=ct(t),It.init(e,t)}),Yt=o(`$ZodISODate`,(e,t)=>{t.pattern??=at,It.init(e,t)}),Xt=o(`$ZodISOTime`,(e,t)=>{t.pattern??=st(t),It.init(e,t)}),Zt=o(`$ZodISODuration`,(e,t)=>{t.pattern??=We,It.init(e,t)}),Qt=o(`$ZodIPv4`,(e,t)=>{t.pattern??=Xe,It.init(e,t),e._zod.bag.format=`ipv4`}),$t=o(`$ZodIPv6`,(e,t)=>{t.pattern??=Ze,It.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),en=o(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qe,It.init(e,t)}),tn=o(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$e,It.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function nn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var rn=o(`$ZodBase64`,(e,t)=>{t.pattern??=et,It.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{nn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function an(e){if(!tt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return nn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var on=o(`$ZodBase64URL`,(e,t)=>{t.pattern??=tt,It.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{an(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sn=o(`$ZodE164`,(e,t)=>{t.pattern??=rt,It.init(e,t)});function cn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ln=o(`$ZodJWT`,(e,t)=>{It.init(e,t),e._zod.check=n=>{cn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),un=o(`$ZodNumber`,(e,t)=>{j.init(e,t),e._zod.pattern=e._zod.bag.pattern??dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),dn=o(`$ZodNumberFormat`,(e,t)=>{xt.init(e,t),un.init(e,t)}),fn=o(`$ZodBoolean`,(e,t)=>{j.init(e,t),e._zod.pattern=ft,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),pn=o(`$ZodNull`,(e,t)=>{j.init(e,t),e._zod.pattern=pt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),mn=o(`$ZodUnknown`,(e,t)=>{j.init(e,t),e._zod.parse=e=>e}),hn=o(`$ZodNever`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),gn=o(`$ZodVoid`,(e,t)=>{j.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}});function _n(e,t,n){e.issues.length&&t.issues.push(...fe(n,e.issues)),t.value[n]=e.value}var vn=o(`$ZodArray`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>_n(t,n,e))):_n(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function yn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...fe(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function bn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=re(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>yn(e,n,i,t,u,d))):yn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Sn=o(`$ZodObject`,(e,t)=>{if(j.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=p(()=>bn(t));v(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=C,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>yn(n,t,e,s,r,i))):yn(a,t,e,s,r,i)}return i?xn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Cn=o(`$ZodObjectJIT`,(e,t)=>{Sn.init(e,t);let n=e._zod.parse,r=p(()=>bn(t)),i=e=>{let t=new Nt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ee(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ee(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
4
|
-
if (${n}.issues.length) {
|
|
5
|
-
if (${o} in input) {
|
|
6
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (${n}.value === undefined) {
|
|
14
|
-
if (${o} in input) {
|
|
15
|
-
newResult[${o}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${o}] = ${n}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`):c?t.write(`
|
|
22
|
-
if (${n}.issues.length) {
|
|
23
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
-
...iss,
|
|
25
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
-
})));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (${n}.value === undefined) {
|
|
30
|
-
if (${o} in input) {
|
|
31
|
-
newResult[${o}] = undefined;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
newResult[${o}] = ${n}.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`):t.write(`
|
|
38
|
-
const ${n}_present = ${o} in input;
|
|
39
|
-
if (${n}.issues.length) {
|
|
40
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
41
|
-
...iss,
|
|
42
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
43
|
-
})));
|
|
44
|
-
}
|
|
45
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
46
|
-
payload.issues.push({
|
|
47
|
-
code: "invalid_type",
|
|
48
|
-
expected: "nonoptional",
|
|
49
|
-
input: undefined,
|
|
50
|
-
path: [${o}]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (${n}_present) {
|
|
55
|
-
if (${n}.value === undefined) {
|
|
56
|
-
newResult[${o}] = undefined;
|
|
57
|
-
} else {
|
|
58
|
-
newResult[${o}] = ${n}.value;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=C,s=!l.jitless,c=s&&te.value,u=t.catchall,d;e._zod.parse=(l,f)=>{d??=r.value;let p=l.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),l=a(l,f),u?xn([],p,l,f,d,e):l):n(l,f):(l.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),l)}});function wn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ue(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>me(e,r,u())))}),t)}var Tn=o(`$ZodUnion`,(e,t)=>{j.init(e,t),v(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),v(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),v(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>h(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>wn(t,r,e,i)):wn(o,r,e,i)}}),En=o(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Tn.init(e,t);let n=e._zod.parse;v(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=p(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!C(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Dn=o(`$ZodIntersection`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>kn(e,t,n)):kn(e,i,a)}});function On(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(w(e)&&w(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=On(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=On(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ue(e))return e;let o=On(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var An=o(`$ZodTuple`,(e,t)=>{j.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=jn(n,`optin`),c=jn(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>Mn(t,r,e))):Mn(a,r,e)}}return o.length?Promise.all(o).then(()=>Nn(l,r,n,a,c)):Nn(l,r,n,a,c)}});function jn(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function Mn(e,t,n){e.issues.length&&t.issues.push(...fe(n,e.issues)),t.value[n]=e.value}function Nn(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...fe(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var Pn=o(`$ZodRecord`,(e,t)=>{j.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!w(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>me(e,r,u())),input:c,path:[c],inst:e});continue}let l=o.value,d=t.valueType._zod.run({value:i[c],issues:[]},r);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&n.issues.push(...fe(c,e.issues)),n.value[l]=e.value})):(d.issues.length&&n.issues.push(...fe(c,d.issues)),n.value[l]=d.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&dt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>me(e,r,u())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...fe(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...fe(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Fn=o(`$ZodEnum`,(e,t)=>{j.init(e,t);let n=d(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ne.has(typeof e)).map(e=>typeof e==`string`?E(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),In=o(`$ZodLiteral`,(e,t)=>{if(j.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?E(e):e?E(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Ln=o(`$ZodTransform`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new c(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new s;return n.value=i,n.fallback=!0,n}});function Rn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var zn=o(`$ZodOptional`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${h(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Rn(e,r)):Rn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Bn=o(`$ZodExactOptional`,(e,t)=>{zn.init(e,t),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Vn=o(`$ZodNullable`,(e,t)=>{j.init(e,t),v(e._zod,`optin`,()=>t.innerType._zod.optin),v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${h(e.source)}|null)$`):void 0}),v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Hn=o(`$ZodDefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Un(e,t)):Un(r,t)}});function Un(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Wn=o(`$ZodPrefault`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Gn=o(`$ZodNonOptional`,(e,t)=>{j.init(e,t),v(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Kn(t,e)):Kn(i,e)}});function Kn(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 qn=o(`$ZodCatch`,(e,t)=>{j.init(e,t),e._zod.optin=`optional`,v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>me(e,n,u()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>me(e,n,u()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Jn=o(`$ZodPipe`,(e,t)=>{j.init(e,t),v(e._zod,`values`,()=>t.in._zod.values),v(e._zod,`optin`,()=>t.in._zod.optin),v(e._zod,`optout`,()=>t.out._zod.optout),v(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Yn(e,t.in,n)):Yn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yn(e,t.out,n)):Yn(r,t.out,n)}});function Yn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Xn=o(`$ZodReadonly`,(e,t)=>{j.init(e,t),v(e._zod,`propValues`,()=>t.innerType._zod.propValues),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`optin`,()=>t.innerType?._zod?.optin),v(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Zn):Zn(r)}});function Zn(e){return e.value=Object.freeze(e.value),e}var Qn=o(`$ZodFunction`,(e,t)=>(j.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?Ce(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Ce(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await Te(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await Te(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new An({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),$n=o(`$ZodPromise`,(e,t)=>{j.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),er=o(`$ZodLazy`,(e,t)=>{j.init(e,t),v(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),v(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),v(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),v(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),tr=o(`$ZodCustom`,(e,t)=>{gt.init(e,t),j.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>nr(t,n,r,e));nr(i,n,r,e)}});function nr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ge(e))}}var rr,ir=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ar(){return new ir}(rr=globalThis).__zod_globalRegistry??(rr.__zod_globalRegistry=ar());var or=globalThis.__zod_globalRegistry;function sr(e,t){return new e({type:`string`,...O(t)})}function cr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...O(t)})}function lr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...O(t)})}function ur(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...O(t)})}function dr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...O(t)})}function fr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...O(t)})}function pr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...O(t)})}function mr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...O(t)})}function hr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...O(t)})}function gr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...O(t)})}function _r(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...O(t)})}function vr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...O(t)})}function yr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...O(t)})}function br(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...O(t)})}function xr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...O(t)})}function Sr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...O(t)})}function Cr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...O(t)})}function wr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...O(t)})}function Tr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...O(t)})}function Er(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...O(t)})}function Dr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...O(t)})}function Or(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...O(t)})}function kr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...O(t)})}function Ar(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...O(t)})}function jr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...O(t)})}function Mr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...O(t)})}function Nr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...O(t)})}function Pr(e,t){return new e({type:`number`,checks:[],...O(t)})}function Fr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...O(t)})}function Ir(e,t){return new e({type:`boolean`,...O(t)})}function Lr(e,t){return new e({type:`null`,...O(t)})}function Rr(e){return new e({type:`unknown`})}function zr(e,t){return new e({type:`never`,...O(t)})}function Br(e,t){return new e({type:`void`,...O(t)})}function Vr(e,t){return new vt({check:`less_than`,...O(t),value:e,inclusive:!1})}function Hr(e,t){return new vt({check:`less_than`,...O(t),value:e,inclusive:!0})}function Ur(e,t){return new yt({check:`greater_than`,...O(t),value:e,inclusive:!1})}function Wr(e,t){return new yt({check:`greater_than`,...O(t),value:e,inclusive:!0})}function Gr(e,t){return new bt({check:`multiple_of`,...O(t),value:e})}function Kr(e,t){return new St({check:`max_length`,...O(t),maximum:e})}function qr(e,t){return new Ct({check:`min_length`,...O(t),minimum:e})}function Jr(e,t){return new wt({check:`length_equals`,...O(t),length:e})}function Yr(e,t){return new Et({check:`string_format`,format:`regex`,...O(t),pattern:e})}function Xr(e){return new Dt({check:`string_format`,format:`lowercase`,...O(e)})}function Zr(e){return new Ot({check:`string_format`,format:`uppercase`,...O(e)})}function Qr(e,t){return new kt({check:`string_format`,format:`includes`,...O(t),includes:e})}function $r(e,t){return new At({check:`string_format`,format:`starts_with`,...O(t),prefix:e})}function ei(e,t){return new jt({check:`string_format`,format:`ends_with`,...O(t),suffix:e})}function ti(e){return new Mt({check:`overwrite`,tx:e})}function ni(e){return ti(t=>t.normalize(e))}function ri(){return ti(e=>e.trim())}function ii(){return ti(e=>e.toLowerCase())}function ai(){return ti(e=>e.toUpperCase())}function oi(){return ti(e=>x(e))}function si(e,t,n){return new e({type:`array`,element:t,...O(n)})}function ci(e,t,n){let r=O(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function li(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...O(n)})}function ui(e,t){let n=di(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ge(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ge(r))}},e(t.value,t)),t);return n}function di(e,t){let n=new gt({check:`custom`,...O(t)});return n._zod.check=e,n}function fi(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??or,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 pi(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,pi(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&M(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function mi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
63
|
-
|
|
64
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function hi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:_i(t,`input`,e.processors),output:_i(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function M(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return M(r.element,n);if(r.type===`set`)return M(r.valueType,n);if(r.type===`lazy`)return M(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return M(r.innerType,n);if(r.type===`intersection`)return M(r.left,n)||M(r.right,n);if(r.type===`record`||r.type===`map`)return M(r.keyType,n)||M(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:M(r.in,n)||M(r.out,n);if(r.type===`object`){for(let e in r.shape)if(M(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(M(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(M(e,n))return!0;return!!(r.rest&&M(r.rest,n))}return!1}var gi=(e,t={})=>n=>{let r=fi({...n,processors:t});return pi(e,r),mi(r,e),hi(r,e)},_i=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=fi({...i??{},target:a,io:t,processors:n});return pi(e,o),mi(o,e),hi(o,e)},vi={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},yi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=vi[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},bi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},xi=(e,t,n,r)=>{n.type=`boolean`},Si=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ci=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},wi=(e,t,n,r)=>{n.not={}},Ti=(e,t,n,r)=>{let i=e._zod.def,a=d(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ei=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Di=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},ki=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Ai=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=pi(a.element,t,{...r,path:[...r.path,`items`]})},ji=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=pi(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=pi(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Mi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>pi(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ni=(e,t,n,r)=>{let i=e._zod.def,a=pi(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=pi(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Pi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>pi(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?pi(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Fi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=pi(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=pi(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=pi(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ii=(e,t,n,r)=>{let i=e._zod.def,a=pi(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Li=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ri=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},zi=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Bi=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Vi=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;pi(o,t,r);let s=t.seen.get(e);s.ref=o},Hi=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ui=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Wi=(e,t,n,r)=>{let i=e._zod.def;pi(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Gi=(e,t,n,r)=>{let i=e._zod.innerType;pi(i,t,r);let a=t.seen.get(e);a.ref=i},Ki=o(`ZodISODateTime`,(e,t)=>{Jt.init(e,t),va.init(e,t)});function qi(e){return Ar(Ki,e)}var Ji=o(`ZodISODate`,(e,t)=>{Yt.init(e,t),va.init(e,t)});function Yi(e){return jr(Ji,e)}var Xi=o(`ZodISOTime`,(e,t)=>{Xt.init(e,t),va.init(e,t)});function Zi(e){return Mr(Xi,e)}var Qi=o(`ZodISODuration`,(e,t)=>{Zt.init(e,t),va.init(e,t)});function $i(e){return Nr(Qi,e)}var ea=o(`ZodError`,(e,t)=>{ve.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>xe(e,t)},flatten:{value:t=>be(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,f,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,f,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),ta=Se(ea),na=we(ea),ra=Ee(ea),ia=Oe(ea),aa=Ae(ea),oa=je(ea),sa=Me(ea),ca=Ne(ea),la=Pe(ea),ua=Fe(ea),da=Ie(ea),fa=Le(ea),pa=new WeakMap;function ma(e,t,n){let r=Object.getPrototypeOf(e),i=pa.get(r);if(i||(i=new Set,pa.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var N=o(`ZodType`,(e,t)=>(j.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:_i(e,`input`),output:_i(e,`output`)}}),e.toJSONSchema=gi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>ta(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ra(e,t,n),e.parseAsync=async(t,n)=>na(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ia(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>aa(e,t,n),e.decode=(t,n)=>oa(e,t,n),e.encodeAsync=async(t,n)=>sa(e,t,n),e.decodeAsync=async(t,n)=>ca(e,t,n),e.safeEncode=(t,n)=>la(e,t,n),e.safeDecode=(t,n)=>ua(e,t,n),e.safeEncodeAsync=async(t,n)=>da(e,t,n),e.safeDecodeAsync=async(t,n)=>fa(e,t,n),ma(e,`ZodType`,{check(...e){let t=this.def;return this.clone(b(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return D(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Jo(e,t))},superRefine(e,t){return this.check(Yo(e,t))},overwrite(e){return this.check(ti(e))},optional(){return Co(this)},exactOptional(){return To(this)},nullable(){return Do(this)},nullish(){return Co(Do(this))},nonoptional(e){return No(this,e)},array(){return to(this)},or(e){return oo([this,e])},and(e){return uo(this,e)},transform(e){return Lo(this,xo(e))},default(e){return ko(this,e)},prefault(e){return jo(this,e)},catch(e){return Fo(this,e)},pipe(e){return Lo(this,e)},readonly(){return zo(this)},describe(e){let t=this.clone();return or.add(t,{description:e}),t},meta(...e){if(e.length===0)return or.get(this);let t=this.clone();return or.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return or.get(e)?.description},configurable:!0}),e)),ha=o(`_ZodString`,(e,t)=>{Ft.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ma(e,`_ZodString`,{regex(...e){return this.check(Yr(...e))},includes(...e){return this.check(Qr(...e))},startsWith(...e){return this.check($r(...e))},endsWith(...e){return this.check(ei(...e))},min(...e){return this.check(qr(...e))},max(...e){return this.check(Kr(...e))},length(...e){return this.check(Jr(...e))},nonempty(...e){return this.check(qr(1,...e))},lowercase(e){return this.check(Xr(e))},uppercase(e){return this.check(Zr(e))},trim(){return this.check(ri())},normalize(...e){return this.check(ni(...e))},toLowerCase(){return this.check(ii())},toUpperCase(){return this.check(ai())},slugify(){return this.check(oi())}})}),ga=o(`ZodString`,(e,t)=>{Ft.init(e,t),ha.init(e,t),e.email=t=>e.check(cr(ya,t)),e.url=t=>e.check(mr(Ca,t)),e.jwt=t=>e.check(kr(za,t)),e.emoji=t=>e.check(hr(Ta,t)),e.guid=t=>e.check(lr(ba,t)),e.uuid=t=>e.check(ur(xa,t)),e.uuidv4=t=>e.check(dr(xa,t)),e.uuidv6=t=>e.check(fr(xa,t)),e.uuidv7=t=>e.check(pr(xa,t)),e.nanoid=t=>e.check(gr(Ea,t)),e.guid=t=>e.check(lr(ba,t)),e.cuid=t=>e.check(_r(Da,t)),e.cuid2=t=>e.check(vr(Oa,t)),e.ulid=t=>e.check(yr(ka,t)),e.base64=t=>e.check(Er(Ia,t)),e.base64url=t=>e.check(Dr(La,t)),e.xid=t=>e.check(br(Aa,t)),e.ksuid=t=>e.check(xr(ja,t)),e.ipv4=t=>e.check(Sr(Ma,t)),e.ipv6=t=>e.check(Cr(Na,t)),e.cidrv4=t=>e.check(wr(Pa,t)),e.cidrv6=t=>e.check(Tr(Fa,t)),e.e164=t=>e.check(Or(Ra,t)),e.datetime=t=>e.check(qi(t)),e.date=t=>e.check(Yi(t)),e.time=t=>e.check(Zi(t)),e.duration=t=>e.check($i(t))});function _a(e){return sr(ga,e)}var va=o(`ZodStringFormat`,(e,t)=>{It.init(e,t),ha.init(e,t)}),ya=o(`ZodEmail`,(e,t)=>{zt.init(e,t),va.init(e,t)}),ba=o(`ZodGUID`,(e,t)=>{Lt.init(e,t),va.init(e,t)}),xa=o(`ZodUUID`,(e,t)=>{Rt.init(e,t),va.init(e,t)});function Sa(e){return ur(xa,e)}var Ca=o(`ZodURL`,(e,t)=>{Bt.init(e,t),va.init(e,t)});function wa(e){return mr(Ca,e)}var Ta=o(`ZodEmoji`,(e,t)=>{Vt.init(e,t),va.init(e,t)}),Ea=o(`ZodNanoID`,(e,t)=>{Ht.init(e,t),va.init(e,t)}),Da=o(`ZodCUID`,(e,t)=>{Ut.init(e,t),va.init(e,t)}),Oa=o(`ZodCUID2`,(e,t)=>{Wt.init(e,t),va.init(e,t)}),ka=o(`ZodULID`,(e,t)=>{Gt.init(e,t),va.init(e,t)}),Aa=o(`ZodXID`,(e,t)=>{Kt.init(e,t),va.init(e,t)}),ja=o(`ZodKSUID`,(e,t)=>{qt.init(e,t),va.init(e,t)}),Ma=o(`ZodIPv4`,(e,t)=>{Qt.init(e,t),va.init(e,t)}),Na=o(`ZodIPv6`,(e,t)=>{$t.init(e,t),va.init(e,t)}),Pa=o(`ZodCIDRv4`,(e,t)=>{en.init(e,t),va.init(e,t)}),Fa=o(`ZodCIDRv6`,(e,t)=>{tn.init(e,t),va.init(e,t)}),Ia=o(`ZodBase64`,(e,t)=>{rn.init(e,t),va.init(e,t)}),La=o(`ZodBase64URL`,(e,t)=>{on.init(e,t),va.init(e,t)}),Ra=o(`ZodE164`,(e,t)=>{sn.init(e,t),va.init(e,t)}),za=o(`ZodJWT`,(e,t)=>{ln.init(e,t),va.init(e,t)}),Ba=o(`ZodNumber`,(e,t)=>{un.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),ma(e,`ZodNumber`,{gt(e,t){return this.check(Ur(e,t))},gte(e,t){return this.check(Wr(e,t))},min(e,t){return this.check(Wr(e,t))},lt(e,t){return this.check(Vr(e,t))},lte(e,t){return this.check(Hr(e,t))},max(e,t){return this.check(Hr(e,t))},int(e){return this.check(Ua(e))},safe(e){return this.check(Ua(e))},positive(e){return this.check(Ur(0,e))},nonnegative(e){return this.check(Wr(0,e))},negative(e){return this.check(Vr(0,e))},nonpositive(e){return this.check(Hr(0,e))},multipleOf(e,t){return this.check(Gr(e,t))},step(e,t){return this.check(Gr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Va(e){return Pr(Ba,e)}var Ha=o(`ZodNumberFormat`,(e,t)=>{dn.init(e,t),Ba.init(e,t)});function Ua(e){return Fr(Ha,e)}var Wa=o(`ZodBoolean`,(e,t)=>{fn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r)});function Ga(e){return Ir(Wa,e)}var Ka=o(`ZodNull`,(e,t)=>{pn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r)});function qa(e){return Lr(Ka,e)}var Ja=o(`ZodUnknown`,(e,t)=>{mn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ya(){return Rr(Ja)}var Xa=o(`ZodNever`,(e,t)=>{hn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r)});function Za(e){return zr(Xa,e)}var Qa=o(`ZodVoid`,(e,t)=>{gn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r)});function $a(e){return Br(Qa,e)}var eo=o(`ZodArray`,(e,t)=>{vn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.element=t.element,ma(e,`ZodArray`,{min(e,t){return this.check(qr(e,t))},nonempty(e){return this.check(qr(1,e))},max(e,t){return this.check(Kr(e,t))},length(e,t){return this.check(Jr(e,t))},unwrap(){return this.element}})});function to(e,t){return si(eo,e,t)}var no=o(`ZodObject`,(e,t)=>{Cn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),v(e,`shape`,()=>t.shape),ma(e,`ZodObject`,{keyof(){return _o(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ya()})},loose(){return this.clone({...this._zod.def,catchall:Ya()})},strict(){return this.clone({...this._zod.def,catchall:Za()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return oe(this,e)},safeExtend(e){return se(this,e)},merge(e){return A(this,e)},pick(e){return k(this,e)},omit(e){return ae(this,e)},partial(...e){return ce(So,this,e[0])},required(...e){return le(Mo,this,e[0])}})});function P(e,t){return new no({type:`object`,shape:e??{},...O(t)})}function ro(e,t){return new no({type:`object`,shape:e,catchall:Za(),...O(t)})}function io(e,t){return new no({type:`object`,shape:e,catchall:Ya(),...O(t)})}var ao=o(`ZodUnion`,(e,t)=>{Tn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.options=t.options});function oo(e,t){return new ao({type:`union`,options:e,...O(t)})}var so=o(`ZodDiscriminatedUnion`,(e,t)=>{ao.init(e,t),En.init(e,t)});function co(e,t,n){return new so({type:`union`,options:t,discriminator:e,...O(n)})}var lo=o(`ZodIntersection`,(e,t)=>{Dn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ni(e,t,n,r)});function uo(e,t){return new lo({type:`intersection`,left:e,right:t})}var fo=o(`ZodTuple`,(e,t)=>{An.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pi(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function po(e,t,n){let r=t instanceof j;return new fo({type:`tuple`,items:e,rest:r?t:null,...O(r?n:t)})}var mo=o(`ZodRecord`,(e,t)=>{Pn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function ho(e,t,n){return!t||!t._zod?new mo({type:`record`,keyType:_a(),valueType:e,...O(t)}):new mo({type:`record`,keyType:e,valueType:t,...O(n)})}var go=o(`ZodEnum`,(e,t)=>{Fn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new go({...t,checks:[],...O(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new go({...t,checks:[],...O(r),entries:i})}});function _o(e,t){return new go({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...O(t)})}var vo=o(`ZodLiteral`,(e,t)=>{In.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function yo(e,t){return new vo({type:`literal`,values:Array.isArray(e)?e:[e],...O(t)})}var bo=o(`ZodTransform`,(e,t)=>{Ln.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new c(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ge(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(ge(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function xo(e){return new bo({type:`transform`,transform:e})}var So=o(`ZodOptional`,(e,t)=>{zn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Co(e){return new So({type:`optional`,innerType:e})}var wo=o(`ZodExactOptional`,(e,t)=>{Bn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function To(e){return new wo({type:`optional`,innerType:e})}var Eo=o(`ZodNullable`,(e,t)=>{Vn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ii(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Do(e){return new Eo({type:`nullable`,innerType:e})}var Oo=o(`ZodDefault`,(e,t)=>{Hn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ri(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ko(e,t){return new Oo({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():T(t)}})}var Ao=o(`ZodPrefault`,(e,t)=>{Wn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jo(e,t){return new Ao({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():T(t)}})}var Mo=o(`ZodNonOptional`,(e,t)=>{Gn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Li(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function No(e,t){return new Mo({type:`nonoptional`,innerType:e,...O(t)})}var Po=o(`ZodCatch`,(e,t)=>{qn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Fo(e,t){return new Po({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Io=o(`ZodPipe`,(e,t)=>{Jn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vi(e,t,n,r),e.in=t.in,e.out=t.out});function Lo(e,t){return new Io({type:`pipe`,in:e,out:t})}var Ro=o(`ZodReadonly`,(e,t)=>{Xn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zo(e){return new Ro({type:`readonly`,innerType:e})}var Bo=o(`ZodLazy`,(e,t)=>{er.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gi(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Vo(e){return new Bo({type:`lazy`,getter:e})}var Ho=o(`ZodPromise`,(e,t)=>{$n.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ui(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Uo(e){return new Ho({type:`promise`,innerType:e})}var Wo=o(`ZodFunction`,(e,t)=>{Qn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r)});function Go(e){return new Wo({type:`function`,input:Array.isArray(e?.input)?po(e?.input):e?.input??to(Ya()),output:e?.output??Ya()})}var Ko=o(`ZodCustom`,(e,t)=>{tr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r)});function qo(e,t){return ci(Ko,e??(()=>!0),t)}function Jo(e,t={}){return li(Ko,e,t)}function Yo(e,t){return ui(e,t)}function Xo(e,t={}){let n=new Ko({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...O(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Zo(e){let t=Vo(()=>oo([_a(e),Va(),Ga(),qa(),to(t),ho(_a(),t)]));return t}var F=e(i(),1),Qo=Zo(),$o=Vo(()=>co(`status`,[P({status:yo(`available`)}).strict(),P({status:yo(`unavailable`),reason:_a()}).strict()])),es=Qo,ts=Vo(()=>ho(_a(),es)),ns=e=>es.parse(e),rs=Vo(()=>P({code:_a().min(1).max(160),message:_a().min(1).max(512),details:es.optional()}).strict()),is=e=>rs.parse(e),as=ts,os=Vo(()=>_a().refine(e=>e.trim().length>0)),ss=$o,cs=Vo(()=>oo([P({type:yo(`action`)}).strict(),P({type:yo(`custom`),data:ts}).strict(),P({type:yo(`choice`),options:to(P({value:es,label:os,description:os.optional()}))}).strict(),P({type:yo(`form`),submitLabel:os.optional()}).strict(),P({type:yo(`confirmation`),message:os,confirmLabel:os.optional(),cancelLabel:os.optional()}).strict()])),ls=Vo(()=>P({inputSchema:as.optional(),outputSchema:as.optional(),presentation:cs.optional()}).strict()),us=Vo(()=>Va().int().refine(e=>Number.isSafeInteger(e))),ds=Vo(()=>P({hint:os.pipe(_a().max(120)),words:to(P({word:_a().regex(/^\S{1,64}$/u),description:os.pipe(_a().max(512)).optional(),arguments:ts}).strict()).max(32).optional(),text:P({field:os.pipe(_a().max(120)),arguments:ts,requestIdField:os.pipe(_a().max(120)).optional()}).strict().optional()}).strict().refine(e=>e.words!==void 0||e.text!==void 0,`slash arguments need words or text`)),fs=Vo(()=>P({order:us.optional()}).strict()),ps=Vo(()=>P({bindings:P({order:us.optional(),values:to(os).max(16)}).strict().optional(),agent:P({keybind:os.optional(),order:us.optional()}).strict().optional(),help:fs.optional(),menu:fs.optional(),palette:fs.optional(),slash:P({aliases:to(os).max(16),consumesDraft:Ga().optional(),order:us.optional(),arguments:ds.optional()}).strict().optional()}).strict()),ms=Vo(()=>P({id:os.refine(e=>!e.includes(`:`)),title:os,category:os,description:os.optional(),projections:ps.optional(),action:ls.optional(),availability:ss.optional()}).strict()),hs=e=>ms.parse(e),gs=Vo(()=>P({inputSchema:as.optional(),outputSchema:as.optional()}).strict()),_s=_a().min(1).brand();Vo(()=>P({commandId:_s,command:P({namespace:_a(),id:_a()}).strict(),sourceId:_a(),scope:_a().optional(),title:_a(),category:_a(),description:_a().optional(),order:Va(),availability:$o,action:gs.optional(),keybind:_a().optional()}).strict());var vs=8192,ys=os.pipe(_a().max(vs)),bs=os.pipe(_a().max(60)),xs=wa({protocol:/^https?$/u}),Ss=P({label:ys,value:ys}).strict(),Cs={summary:ys.optional(),facts:to(Ss).max(4).optional(),body:ys.optional(),bodyLabel:ys.optional(),details:to(Ss).max(24).optional()};co(`type`,[P({type:yo(`choice`),message:bs,...Cs,current:ys.optional(),collapsedGroup:ys.optional(),options:to(P({value:ys,label:ys,description:ys.optional(),group:ys.optional(),destructive:yo(!0).optional()}).strict()).min(1).max(256)}).strict(),P({type:yo(`text`),message:bs,...Cs,placeholder:ys.optional(),secret:Ga().optional()}).strict(),P({type:yo(`confirmation`),message:bs,...Cs,confirmLabel:ys.optional(),cancelLabel:ys.optional(),destructive:yo(!0).optional()}).strict(),P({type:yo(`decision`),message:bs,...Cs,options:to(P({value:ys,label:ys,description:ys.optional(),destructive:yo(!0).optional()}).strict()).min(1).max(8).refine(e=>new Set(e.map(e=>e.value)).size===e.length,`Decision option values must be unique`),multiple:Ga().optional(),other:P({label:ys,placeholder:ys.optional(),maxLength:Va().int().min(1).max(vs),blank:ys.optional()}).strict().optional(),escape:ys.optional()}).strict().refine(e=>[e.escape,e.other?.blank].every(t=>t===void 0||e.options.some(e=>e.value===t)),`A decision's escape and blank answers must be offered options`)]),Vo(()=>co(`type`,[P({type:yo(`info`),message:ys,links:to(P({url:xs,label:ys.optional()}).strict()).max(16).optional()}).strict(),P({type:yo(`progress`),message:ys}).strict(),P({type:yo(`handoff`),url:xs,code:ys.optional(),message:ys.optional()}).strict(),P({type:yo(`success`),message:ys}).strict()]));var ws=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},Ts={pipe(){return ws(this,arguments)}},Es=function(){function e(){}return e.prototype=Ts,e}(),I=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},Ds=e=>e,Os=e=>()=>e,ks=Os(!0),As=Os(null),js=Os(void 0),Ms=js;function Ns(e,t,n,r,i,a,o,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function Ps(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}function Fs(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i!==n&&t.set(i,i),i}}var Is=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},Ls=new WeakSet,Rs=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),zs=0,Bs=()=>{zs++};function Vs(e){return typeof e==`string`}function Hs(e){return typeof e==`number`}function Us(e){return typeof e==`boolean`}function Ws(e){return typeof e==`symbol`}function Gs(e){return Vs(e)||Hs(e)||Ws(e)}function Ks(e){return typeof e==`function`}function qs(e){return e===void 0}function Js(e){return e!=null}function Ys(e){return!0}function Xs(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Zs(e){return typeof e==`object`&&!!e||Ks(e)}var Qs=I(2,(e,t)=>Zs(e)&&t in e),$s=`~effect/Hash`,ec=e=>{switch(typeof e){case`number`:return oc(e);case`bigint`:return sc(e.toString(10));case`string`:return sc(e);case`function`:case`object`:if(e===null)break;if(e instanceof Date)return Number.isNaN(e.getTime())?sc(`Invalid Date`):sc(e.toISOString());if(e instanceof RegExp)return sc(e.toString());{if(Ls.has(e))return tc(e);let t=gc.get(e);if(t!==void 0)return t;if(_c.has(e))return Bs(),sc(`[Circular]`);_c.add(e);let n=zs,r;try{r=`~effect/Hash`in e?e[$s]():typeof e==`function`?tc(e):e instanceof DataView?dc(Rs(e)):Array.isArray(e)||ArrayBuffer.isView(e)?dc(e):e instanceof Map?fc(e):e instanceof Set?mc(e):lc(e)}finally{_c.delete(e)}return n===zs&&gc.set(e,r),r}}return ic(nc(sc(String(e))))},tc=e=>(hc.has(e)||hc.set(e,ic(Math.random()*4294967296|0)),hc.get(e)),nc=e=>(e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),e^e>>>16),rc=I(2,(e,t)=>nc(Math.imul(e,2654435761)+Math.imul(t,2246822507))),ic=e=>e&3221225471|e>>>1&1073741824,ac=new DataView(new ArrayBuffer(8)),oc=e=>{let t=e|0;return t===e?ic(t):(ac.setFloat64(0,e===e?e:NaN),ic(rc(ac.getInt32(0),ac.getInt32(4))))},sc=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return ic(t)},cc=(e,t)=>{let n=12289;for(let r of t)n^=rc(ec(r),ec(e[r]));return ic(n)},lc=e=>cc(e,Is(e)),uc=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return ic(r)},dc=e=>{let t=6151;for(let n of e)t=rc(t,ec(n));return ic(t)},fc=uc(sc(`Map`),([e,t])=>rc(ec(e),ec(t))),pc=sc(`Set`),mc=uc(pc,e=>rc(pc,ec(e))),hc=new WeakMap,gc=new WeakMap,_c=new WeakSet,vc=`~effect/Equal`;function yc(){return arguments.length===1?e=>bc(e,arguments[0]):bc(arguments[0],arguments[1])}function bc(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||Ls.has(e)||Ls.has(t)?!1:xc(e,t):!1}function xc(e,t){let n=Cc.length;for(let r=n;r-->0;)if(Cc[r]===e&&wc[r]===t)return!0;if(n)return Sc(e,t);let r=Tc.get(e);r||Tc.set(e,r=new WeakMap);let i=r.get(t);return i===void 0&&r.set(t,i=Sc(e,t)),i}function Sc(e,t){Cc.push(e),wc.push(t);try{return L(e,t)}finally{Cc.pop(),wc.pop()}}var Cc=[],wc=[],Tc=new WeakMap;function L(e,t){if(ec(e)!==ec(t))return!1;if(e instanceof Date){if(!(t instanceof Date))return!1;let n=e.getTime(),r=t.getTime();return n===r||Number.isNaN(n)&&Number.isNaN(r)}if(e instanceof RegExp)return t instanceof RegExp&&e.toString()===t.toString();let n=Mc(e);if(n!==Mc(t)||typeof e==`function`&&!n)return!1;if(n)return e[vc](t);if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:Ec(e,t);if(ArrayBuffer.isView(e)){let n=e instanceof DataView;return!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||n!==t instanceof DataView?!1:n?Dc(Rs(e),Rs(t)):Dc(e,t)}return e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:kc(e,t,Ac,jc):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:kc(e,t,ec,bc):Oc(e,t)}function Ec(e,t){for(let n=0;n<e.length;n++)if(!bc(e[n],t[n]))return!1;return!0}function Dc(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Oc(e,t){let n=Is(e),r=Is(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!bc(e[i],t[i]))return!1;return!0}function kc(e,t,n,r){let i=new Map,a=0;for(let e of t){let t=n(e),r=i.get(t);r?r.push(e):i.set(t,[e]),a++}outer:for(let t of e){let e=i.get(n(t));if(e){for(let n=0;n<e.length;n++)if(r(t,e[n])){e[n]=e[e.length-1],e.pop(),a--;continue outer}}return!1}return a===0}var Ac=e=>ec(e[0]),jc=(e,t)=>bc(e[0],t[0])&&bc(e[1],t[1]),Mc=e=>Qs(e,vc),Nc=e=>e.length>0;function Pc(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function Fc(e,t){for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Pc(e,n,t[n])}var Ic=Symbol.for(`~effect/Redactable`),Lc=e=>Qs(e,Ic);function Rc(e){return Lc(e)?zc(e):e}function zc(e){return e[Ic](globalThis[`~effect/Fiber/currentFiber`]?.context??Hc)}var Bc=`~effect/Fiber/currentFiber`,Vc=new Map,Hc={"~effect/Context":{},base:Vc,depth:0,mapUnsafe:Vc,pipe(){return ws(this,arguments)}};function R(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,t=0){try{return l(e,t)}catch{return(typeof e==`object`&&e||typeof e==`function`)&&r.delete(e),`[inspection threw]`}}function l(e,n=0){if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return Uc;r.add(e);let l;if(Ic in e)l=c(zc(e),n);else if(Array.isArray(e))l=!i||e.length<=1?`[${e.map(e=>c(e,n)).join(`,`)}]`:`[\n${a(n+1)}${e.map(e=>c(e,n+1)).join(`,
|
|
65
|
-
`+a(n+1))}\n${a(n)}]`;else if(e instanceof Date)l=Kc(e);else if(!t?.ignoreToString&&Qs(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=qc(e);l=e instanceof Error&&e.cause!==void 0?`${t} (cause: ${c(e.cause,n)})`:t}else if(Symbol.iterator in e)l=`${e.constructor.name}(${c(Array.from(e),n)})`;else{let t=s(e);if(!i||t.length<=1){let r=`{${t.map(t=>`${Wc(t)}:${c(Jc(e,t),n)}`).join(`,`)}}`;l=o(e,r)}else{let r=`{\n${t.map(t=>`${a(n+1)}${Wc(t)}: ${c(Jc(e,t),n+1)}`).join(`,
|
|
66
|
-
`)}\n${a(n)}}`;l=o(e,r)}}return r.delete(e),l}return String(e)}return c(e,0)}var Uc=`[Circular]`;function Wc(e){return typeof e==`string`?JSON.stringify(e):String(e)}function Gc(e){return e.map(e=>`[${Wc(e)}]`).join(``)}function Kc(e){try{return e.toISOString()}catch{return`Invalid Date`}}function qc(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}function Jc(e,t){try{return e[t]}catch{return`[property access threw]`}}function Yc(e,t){let n=[];return JSON.stringify(e,function(e,t){let r=Object.getOwnPropertyDescriptor(this,e)?.value,i=Qs(r,Ic)?Rc(r):Rc(t);if(typeof i==`bigint`)return R(i);if(typeof i!=`object`||!i)return i;let a=i instanceof Error&&!Qs(i,`toJSON`)?{...i,name:i.name,message:i.message}:i;for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(i))return;if(n.push(i),a!==i&&n.push(a),!Xc(a)||Zc(a))return a;let o=new Proxy(a,{get(e,t){let n=Reflect.get(e,t,e);return Object.getOwnPropertyDescriptor(e,t)?.get===void 0?n:Rc(n)}});return n.push(o),o},t?.space)??`null`}function Xc(e){for(let t of Object.getOwnPropertyNames(e))if(Object.getOwnPropertyDescriptor(e,t)?.get!==void 0)return!0;return!1}function Zc(e){for(let t of[Number.prototype.valueOf,Boolean.prototype.valueOf,String.prototype.valueOf])try{return Reflect.apply(t,e,[]),!0}catch{}return!1}var Qc=Symbol.for(`nodejs.util.inspect.custom`),$c=e=>{try{return e=Rc(e),Qs(e,`toJSON`)&&Ks(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map($c):e}catch{return`[toJSON threw]`}},z={toJSON(){return $c(this)},[Qc](){return this.toJSON()},toString(){return R(this.toJSON())}},el=(()=>{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.hasOwn(e,`writable`)?e.writable===!0:e.set!==void 0})(),tl=()=>Error.stackTraceLimit,nl=e=>{el&&(Error.stackTraceLimit=e)},rl=class{constructor(e){this.value=e,this.done=!1}next(e){return this.done?(this.value=e,this):(this.done=!0,{value:this.value,done:!1})}},il=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return tl()!==0&&t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})(),al=`~effect/Effect`,ol=`~effect/Exit`,sl={_A:Ds,_E:Ds,_R:Ds},cl=`${al}/identifier`,B=`${al}/args`,ll=`${al}/evaluate`,ul=`${al}/successCont`,dl=`${al}/failureCont`,fl=`${al}/ensureCont`,pl=Symbol.for(`effect/Effect/Yield`),ml={pipe(){return ws(this,arguments)},toJSON(){return{...this}},toString(){return R(this.toJSON(),{ignoreToString:!0,space:2})},[Qc](){return this.toJSON()}},hl={[al]:sl,...ml,[Symbol.iterator](){return new rl(this)},toJSON(){return{_id:`Effect`,op:this[cl],...B in this?{args:this[B]}:void 0}}},gl=e=>Qs(e,ol),_l=`~effect/Cause`,vl=`~effect/Cause/Reason`,yl=e=>Qs(e,_l),bl=class{constructor(e){this[_l]=_l,this.reasons=e}pipe(){return ws(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${R(this.reasons)})`}[Qc](){return this.toJSON()}[vc](e){return yl(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>yc(t,e.reasons[n]))}[$s](){return dc(this.reasons)}},xl=new WeakMap,Sl=class{[vl];annotations;_tag;constructor(e,t,n){if(this[vl]=vl,this._tag=e,t!==Cl&&typeof n==`object`&&n&&t.size>0){let e=xl.get(n);e&&(t=new Map([...e,...t])),xl.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return ws(this,arguments)}toString(){return R(this)}[Qc](){return this.toString()}},Cl=new Map,wl=class extends Sl{constructor(e,t=Cl){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${R(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[vc](e){return Ml(e)&&yc(this.error,e.error)&&yc(this.annotations,e.annotations)}[$s](){return rc(sc(this._tag))(rc(ec(this.error))(ec(this.annotations)))}},Tl=e=>new bl(e),El=(e,t)=>{let n=new Map,r=[];for(let i of e.concat(t)){let e=ec(i),t=n.get(e);if(t===void 0)n.set(e,[i]);else if(t.some(e=>yc(e,i)))continue;else t.push(i);r.push(i)}return r},Dl=I(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new bl(El(e.reasons,t.reasons));return yc(e,n)?e:n}),Ol=e=>new bl([new wl(e)]),kl=class extends Sl{constructor(e,t=Cl){super(`Die`,t,e),this.defect=e}toString(){return`Die(${R(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[vc](e){return Nl(e)&&yc(this.defect,e.defect)&&yc(this.annotations,e.annotations)}[$s](){return rc(sc(this._tag))(rc(ec(this.defect))(ec(this.annotations)))}},Al=e=>new bl([new kl(e)]),jl=I(e=>yl(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new bl(e.reasons.map(e=>e.annotate(t,n)))),Ml=e=>e._tag===`Fail`,Nl=e=>e._tag===`Die`,Pl=e=>e._tag===`Interrupt`;function Fl(e){return Wl(`Effect.evaluate: Not implemented`)}var Il=e=>({...hl,[cl]:e.op,[ll]:e[ll]??Fl,[ul]:e[ul],[dl]:e[dl],[fl]:e[fl]}),Ll=e=>{let t=Il(e),n=function(e){this[B]=e};return n.prototype=t,function(e){return new n(e)}},Rl=e=>{let t={[ol]:ol,_tag:e.op,get[e.prop](){return this[B]},...Il(e),toString(){return`${e.op}(${R(this[B])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[B]}},[vc](e){return gl(e)&&e._tag===this._tag&&yc(this[B],e[B])},[$s](){return rc(sc(e.op),ec(this[B]))}},n=function(e){this[B]=e};return n.prototype=t,function(e){return new n(e)}},zl=Rl({op:`Success`,prop:`value`,[ll](e){let t=e.getCont(ul);return t?t[ul](this[B],e,this):e.yieldWith(this)}}),Bl={key:`effect/Cause/StackTrace`},Vl={key:`effect/Cause/InterruptorStackTrace`},Hl=Rl({op:`Failure`,prop:`cause`,[ll](e){let t=this[B],n=!1;e.cache.stackFrame&&(t=jl(t,{mapUnsafe:new Map([[Bl.key,e.cache.stackFrame]])}),n=!0);let r=e.getCont(dl),i=e._interruptedCause;if(i&&e.interruptible){let a=!1;for(;r&&e.interruptible;)a||=cl in r,r=e.getCont(dl);a&&(t=Tl(t.reasons.filter(e=>e._tag!==`Fail`))),t=Dl(t,i),n=!0}return r?r[dl](t,e,n?void 0:this):e.yieldWith(n?Hl(t):this)}}),Ul=e=>Hl(Ol(e)),Wl=e=>Hl(Al(e)),Gl=Ll({op:`WithFiber`,[ll](e){return this[B](e)}}),Kl=function(){class e extends globalThis.Error{}let t=Il({op:`YieldableError`,[ll](){return Ul(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),ql=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends Kl{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(Fc(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),Jl=e=>{class t extends ql{_tag=e}return t.prototype.name=e,t};Jl(`NoSuchElementError`);var Yl=`~effect/Option`,Xl={[Yl]:{_A:e=>e},...ml,[Symbol.iterator](){return new rl(this)}},Zl=Object.defineProperty(Object.assign(Object.create(Xl),{_tag:`Some`,_op:`Some`,[vc](e){return eu(e)&&nu(e)&&yc(this.value,e.value)},[$s](){return rc(ec(this._tag))(ec(this.value))},toString(){return`some(${R(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:$c(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),Ql=ec(`None`),$l=Object.assign(Object.create(Xl),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[vc](e){return eu(e)&&tu(e)},[$s](){return Ql},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),eu=e=>Qs(e,Yl),tu=e=>e._tag===`None`,nu=e=>e._tag===`Some`,ru=Object.create($l),iu=function(e){this.value=e};iu.prototype=Zl;var au=e=>new iu(e),ou=`~effect/Result`,su={[ou]:{_A:e=>e,_E:e=>e},...ml,[Symbol.iterator](){return new rl(this)}},cu=Object.assign(Object.create(su),{_tag:`Success`,_op:`Success`,[vc](e){return uu(e)&&fu(e)&&yc(this.success,e.success)},[$s](){return rc(ec(this._tag))(ec(this.success))},toString(){return`success(${R(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:$c(this.success)}}}),lu=Object.assign(Object.create(su),{_tag:`Failure`,_op:`Failure`,[vc](e){return uu(e)&&du(e)&&yc(this.failure,e.failure)},[$s](){return rc(ec(this._tag))(ec(this.failure))},toString(){return`failure(${R(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:$c(this.failure)}}}),uu=e=>Qs(e,ou),du=e=>e._tag===`Failure`,fu=e=>e._tag===`Success`,pu=function(e){this.failure=e};pu.prototype=lu;var mu=e=>new pu(e),hu=function(e){this.success=e};hu.prototype=cu;var gu=e=>new hu(e);function _u(e){return(t,n)=>t===n?0:e(t,n)}var vu=_u((e,t)=>e<t?-1:1),yu=_u((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),bu=e=>I(2,(t,n)=>e(t,n)===-1),xu=e=>I(2,(t,n)=>e(t,n)===1),Su=e=>I(2,(t,n)=>e(t,n)!==1),Cu=e=>I(2,(t,n)=>e(t,n)!==-1),wu=()=>ru,Tu=au,Eu=tu,Du=nu,Ou=I(2,(e,{onNone:t,onSome:n})=>Eu(e)?t():n(e.value)),ku=I(2,(e,t)=>Eu(e)?t():e.value),Au=I(2,(e,t)=>Eu(e)?t():e),ju=ku(As),Mu=ku(js),Nu=I(2,(e,t)=>Eu(e)?wu():Tu(t(e.value))),Pu=gu,Fu=mu,Iu=du,Lu=fu,Ru=I(2,(e,t)=>Iu(e)?Fu(t(e.failure)):e),zu=I(2,(e,{onFailure:t,onSuccess:n})=>Iu(e)?t(e.failure):n(e.success)),Bu=globalThis.Array,Vu=I(2,(e,t)=>[...e,t]);Bu.isArray;var Hu=Nc,Uu=Nc,Wu=()=>[],Gu=I(2,(e,t)=>e.map(t)),Ku=`~effect/BigDecimal`,qu={[Ku]:Ku,[$s](){let e=td(this);return rc(sc(String(e.value)),oc(e.scale))},[vc](e){return Ju(e)&&od(this,e)===0},toString(){return`BigDecimal(${cd(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Qc](){return this.toJSON()},pipe(){return ws(this,arguments)}},Ju=e=>Qs(e,Ku),Yu=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(qu);return n.value=e,n.scale=t,n},Xu=(e,t)=>{let n=Yu(e,t);return n.normalized=n,n},Zu=BigInt(0),Qu=BigInt(1),$u=BigInt(10),ed=Xu(Zu,0),td=e=>{if(e.normalized===void 0){if(e.value===Zu)e.normalized=ed;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=Xu(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},nd=100,rd=[Qu],id=(e,t)=>e===t?0:e<t?-1:1,ad=(e,t)=>{let n=`${e.value<Zu?-e.value:e.value}`,r=`${t.value<Zu?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==Zu)return i<Zu?-1:1;let a=Math.max(n.length,r.length);return vu(n.padEnd(a,`0`),r.padEnd(a,`0`))},od=(e,t)=>{if(e.scale===t.scale)return id(e.value,t.value);let n=sd(e),r=sd(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>nd)return n===-1?ad(t,e):ad(e,t);let o=rd[a]??=$u**BigInt(a);return i>0?id(e.value,t.value*o):id(e.value*o,t.value)},sd=e=>e.value===Zu?0:e.value<Zu?-1:1,cd=e=>{let t=td(e);if(Math.abs(t.scale)>=16)return ld(t);let n=t.value<Zu,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},ld=e=>{if(ud(e))return`0e+0`;let t=td(e),n=`${t.value}`,r=t.value<Zu?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},ud=e=>e.value===Zu,dd=e=>Il({op:e.label,[ll]:e.evaluate}),fd=`~effect/Context/Service`,pd=function(){function e(){}let t=e;Object.setPrototypeOf(t,md);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[gd]=gd,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&hd.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},md={[fd]:fd,...dd({label:`Service`,evaluate(e){return zl(Id(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return Md(this,e)},use(e){return Gl(t=>e(Id(t.context,this)))},useSync(e){return Gl(t=>zl(e(Id(t.context,this))))}},hd=new Set,gd=`~effect/Context/Reference`,_d=`~effect/Context`,vd=8,yd=8,bd=(e,t,n,r)=>{let i=Object.create(Ed);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},xd=(e,t)=>{t&&(xd(e,t.parent),e.set(t.key,t.value))},Sd=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return xd(t,e.overlay),e._flat=t},Cd=Symbol(),wd=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?Cd:(n.overlay&&++n.baseHits>=n.base.size&&n.baseHits>=yd&&(n.base=Sd(n),n.overlay=void 0,n.depth=0),r)},Td=e=>bd(void 0,e,void 0,0),Ed={get mapUnsafe(){return Sd(this)},...ml,[_d]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[vc](e){if(!Od(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!yc(r,n.get(e)))return!1;return!0},[$s](){return oc(this.mapUnsafe.size)}},Dd=(e,t)=>e.cacheRoot===t.cacheRoot,Od=e=>Qs(e,_d),kd=e=>!!e[gd],Ad=()=>jd,jd=Td(new Map),Md=(e,t)=>Td(new Map([[e.key,t]])),Nd=I(3,(e,t,n)=>Pd(e,t.key,n)),Pd=(e,t,n)=>{let r=e,i=hd.has(t)?void 0:r.cacheRoot;if(r.depth>=vd){let e=new Map(r.mapUnsafe);return e.set(t,n),bd(i,e,void 0,0)}return bd(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},Fd=(e,t)=>{let n=wd(e,t);return n===Cd?void 0:n},Id=I(2,(e,t)=>{let n=wd(e,t.key);if(n===Cd){if(kd(t))return Rd(t);throw zd(t)}return n}),Ld=`~effect/Context/defaultValue`,Rd=e=>Ld in e?e[Ld]:e[Ld]=e.defaultValue(),zd=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
|
|
67
|
-
`);e.splice(1,3),t.stack=e.join(`
|
|
68
|
-
`)}return t},Bd=pd,Vd=`~effect/Duration`,Hd=BigInt(0),Ud=BigInt(1),Wd=BigInt(2),Gd=BigInt(10),Kd=BigInt(1e3),qd=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),Jd=e=>qd(e*1e6),Yd=(e,t)=>{let n=e.indexOf(`.`);if(n===-1)return BigInt(e)*t;let r=e[0]===`-`,i=e.slice(n+1),a=Gd**BigInt(i.length),o=(BigInt(e.slice(+!!r,n))*a+BigInt(i))*t,s=o/a+(o%a*Wd>=a?Ud:Hd);return r?-s:s},Xd=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Zd=e=>{switch(typeof e){case`number`:return uf(e);case`bigint`:return lf(e);case`string`:{if(e===`Infinity`)return sf;if(e===`-Infinity`)return cf;let t=Xd.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return lf(Yd(r,Ud));if(i===`micro`||i===`micros`)return lf(Yd(r,Kd));let a=Number(r);switch(i){case`milli`:case`millis`:return uf(a);case`second`:case`seconds`:return df(a);case`minute`:case`minutes`:return ff(a);case`hour`:case`hours`:return pf(a);case`day`:case`days`:return mf(a);case`week`:case`weeks`:return hf(a)}break}case`object`:{if(e===null)break;if(Vd in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(Hs)?Qd(e):Number.isNaN(e[0])||Number.isNaN(e[1])?of:e[0]===-1/0||e[1]===-1/0?cf:e[0]===1/0||e[1]===1/0?sf:rf(qd(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?rf(n):rf(qd(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return Qd(e)},Qd=e=>{throw Error(`Invalid Input: ${e}`)},$d={_tag:`Millis`,millis:0},ef={_tag:`Infinity`},tf={_tag:`NegativeInfinity`},nf={[Vd]:Vd,[$s](){switch(this.value._tag){case`Millis`:{let e=this.value.millis*1e6;return Number.isFinite(e)?ec(qd(e)):oc(this.value.millis)}case`Nanos`:return ec(this.value.nanos);default:return lc(this.value)}},[vc](e){return af(e)&&yf(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[Qc](){return this.toJSON()},pipe(){return ws(this,arguments)}},rf=e=>{let t=Object.create(nf);return t.value=typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?$d:Number.isFinite(e)?Number.isInteger(e)?{_tag:`Millis`,millis:e}:{_tag:`Nanos`,nanos:Jd(e)}:e>0?ef:tf:e===Hd?$d:{_tag:`Nanos`,nanos:e},t},af=e=>Qs(e,Vd),of=rf(0),sf=rf(1/0),cf=rf(-1/0),lf=e=>rf(e),uf=e=>rf(e),df=e=>rf(e*1e3),ff=e=>rf(e*6e4),pf=e=>rf(e*36e5),mf=e=>rf(e*864e5),hf=e=>rf(e*6048e5),gf=e=>{let t=Zd(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return Jd(t.value.millis)}},_f=I(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(gf(e),t.value.nanos):n.onNanos(e.value.nanos,gf(t))),vf=(e,t)=>_f(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),yf=I(2,(e,t)=>vf(e,t)),bf=Bd(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new Tf}),xf=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},Sf=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},Cf=e=>{try{return Sf(e)}catch{return xf(e)}},wf=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},Tf=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?xf:Cf)}shouldYield(e){return e.currentOpCount>=e.cache.maxOpsBeforeYield}makeDispatcher(){return new Ef(this.setImmediate)}},Ef=class{tasks=new wf;running=void 0;setImmediate;constructor(e=Cf){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},Df=Bd(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),Of=Bd(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),kf=Jl,Af=`~effect/encoding/EncodingError`,jf=class extends kf(`EncodingError`){[Af]=Af},Mf=`effect/Tracer/ParentSpan`;pd()(Mf,{fiberCached:!0});var Nf=`effect/Tracer`,Pf=`effect/Metric/FiberRuntimeMetrics`,Ff=Bd(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:js}),If=Bd(`effect/References/TracerEnabled`,{fiberCached:!0,defaultValue:ks}),Lf=Bd(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Rf=Bd(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),zf=class extends Sl{constructor(e,t=Cl){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[vc](e){return Pl(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[$s](){return rc(sc(`${this._tag}:${this.fiberId}`))(tc(this.annotations))}},Bf=e=>new bl([new zf(e)]),Vf=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return Pu(n.error)}return Fu(e)},Hf=e=>e.reasons.some(Pl),Uf=I(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>Ml(e)?(n=!0,new wl(t(e.error),e.annotations)):e);return n?Tl(r):e}),Wf=(e,t)=>{let n=[],r=[];if(e.reasons.length===0)return n;let i=tl();i!==0&&nl(1);try{for(let i of e.reasons){if(i._tag===`Interrupt`){r.push(i);continue}n.push(Gf(i._tag===`Die`?i.defect:i.error,i.annotations,t))}if(n.length===0){let e=Error(`The fiber was interrupted by:`);e.name=`InterruptCause`,e.stack=Xf(e,r);let i=new globalThis.Error(`All fibers interrupted without error`,{cause:e});i.name=`InterruptError`,i.stack=`${i.name}: ${i.message}`,n.push(Gf(i,r[0].annotations,t))}}finally{i!==0&&nl(i)}return n},Gf=(e,t,n)=>{let r=typeof e,i;if(e&&r===`object`){if(i=new globalThis.Error(Kf(e),{cause:e.cause?Gf(e.cause):void 0}),typeof e.name==`string`&&(i.name=e.name),typeof e.stack==`string`)i.stack=Jf(e.stack,i,t);else{let e=`${i.name}: ${i.message}`;i.stack=t?Yf(e,t):e}n?.includeCauseInStack&&(i.stack=$f(i));for(let t of Object.keys(e))t in i||(i[t]=e[t])}else{i=new globalThis.Error(e?r===`string`?e:Yc(e):`Unknown error: ${e}`);let n=`${i.name}: ${i.message}`;i.stack=t?Yf(n,t):n}return i},Kf=e=>{if(typeof e.message==`string`)return e.message;if(typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString)try{return e.toString()}catch{}return Yc(e)},qf=/\((.*)\)/g,Jf=(e,t,n)=>{let r=`${t.name}: ${t.message}`,i=(e.startsWith(r)?e.slice(r.length):e).split(`
|
|
69
|
-
`),a=[r];for(let e=1;e<i.length&&!/Generator\.next|~effect\/(?:Effect|Utils)/.test(i[e]);e++)a.push(i[e]);return n?Yf(a.join(`
|
|
70
|
-
`),n):a.join(`
|
|
71
|
-
`)},Yf=(e,t)=>{let n=t?.get(Bl.key);return n&&(e=`${e}\n${Zf(n)}`),e},Xf=(e,t)=>{let n=[`${e.name}: ${e.message}`];for(let e of t){let t=e.fiberId===void 0?`unknown`:`#${e.fiberId}`,r=e.annotations.get(Vl.key);n.push(` at fiber (${t})`),r&&n.push(Zf(r))}return n.join(`
|
|
72
|
-
`)},Zf=e=>{let t=[],n=e,r=0;for(;n&&r<10;){let e=n.stack();if(e){let r=e.matchAll(qf),i=!1;for(let[,e]of r)i=!0,t.push(` at ${n.name} (${e})`);i||t.push(` at ${n.name} (${e.replace(/^at /,``)})`)}else t.push(` at ${n.name}`);n=n.parent,r++}return t.join(`
|
|
73
|
-
`)},Qf=e=>Wf(e).map($f).join(`
|
|
74
|
-
`),$f=e=>e.cause?`${e.stack} {\n${ep(e.cause,` `)}\n}`:e.stack,ep=(e,t)=>{let n=e.stack.split(`
|
|
75
|
-
`),r=`${t}[cause]: ${n[0]}`;for(let e=1,i=n.length;e<i;e++)r+=`\n${t}${n[e]}`;return e.cause&&(r+=` {\n${ep(e.cause,`${t} `)}\n${t}}`),r},tp=`~effect/Fiber`,np={_A:Ds,_E:Ds},rp={id:0},ip=(()=>{try{return globalThis.process?.getBuiltinModule?.(`node:async_hooks`)?.AsyncResource}catch{return}})(),ap=()=>ip===void 0?void 0:new ip(`effect/Fiber`),op=()=>globalThis[Bc],sp=class{constructor(e,t=!0){this.setContext(e),this.id=++rp.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=void 0,this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this._parent=void 0,this._asyncContext=void 0,this.cache.runtimeMetrics?.recordFiberStart(this.context)}get[tp](){return np}get currentDispatcher(){return this._dispatcher??=this.cache.scheduler.makeDispatcher()}getRef(e){return Id(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Ms):(this._observers===void 0?this._observers=[e]:this._observers.push(e),()=>this.removeObserver(e))}removeObserver(e){if(this._exit||this._observers===void 0)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)}interruptUnsafe(e,t){if(this._exit)return;let n=Bf(e);this.cache.stackFrame&&(n=jl(n,Md(Bl,this.cache.stackFrame))),t&&(n=jl(n,t)),this._interruptedCause=this._interruptedCause?Dl(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(gp(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._asyncContext!==void 0){let t=this._asyncContext;return this._asyncContext=void 0,t.runInAsyncScope(this.evaluate,this,e)}if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===pl){this._asyncContext=ap();return}let n=dp.interruptChildren&&dp.interruptChildren(this);if(n!==void 0)return this.evaluate(Hp(n,()=>t));if(this._exit=t,this.cache.runtimeMetrics?.recordFiberEnd(this.context,this._exit),this._parent&&=(this._parent._children?.delete(this),void 0),this._observers!==void 0){let e=this._observers;this._observers=void 0;for(let n=0;n<e.length;n++)e[n](t)}this._stack.length=0,this._children=void 0,this.context=Ad()}runLoop(e){let t=globalThis[Bc];globalThis[Bc]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;)try{this._deferredInterrupt&&(this._deferredInterrupt=!1,i=gp(this._interruptedCause)),this.currentOpCount++;let e=this.cache;if(!r&&!e.preventYield&&e.scheduler.shouldYield(this)){r=!0;let e=i;i=Hp(xp,()=>e)}if(i=e.tracerContext?e.tracerContext(i,this):i[ll](this),i===pl){let e=this._yielded;if(ol in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return pl}}catch(e){if(!Qs(i,ll))return Wl(`Fiber.runLoop: Not a valid effect: ${String(i)}`);i=Wl(e)}}finally{this._running=n,globalThis[Bc]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,lp;for(;;){let t=this._stack.pop();if(!t)return;let n=t[fl];if(n!==void 0){let r=n.call(t,this);if(r)return r[e]=r,r}if(t[e])return t}}succeedWith(e){if(!(++this.currentOpCount&up-1))return zl(e);let t=this.getCont(ul);return t?t[ul](e,this):this.yieldWith(zl(e))}yieldWith(e){return this._yielded=e,pl}children(){return this._children??=new Set}pipe(){return ws(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&Dd(t,e))return;let n=e.cacheRoot,r=n._fiberCache??=cp(e);this.cache?.scheduler!==r.scheduler&&(this._dispatcher=void 0),this.cache=r}get currentSpanLocal(){let e=this.cache.span;return e?._tag===`Span`?e:void 0}},cp=e=>{let t=Fd(e,Nf);return{scheduler:Id(e,bf),tracer:t,tracerContext:t?t.context:void 0,tracerEnabled:Id(e,If),span:Fd(e,Mf),logLevel:Id(e,Lf),minimumLogLevel:Id(e,Rf),stackFrame:Id(e,Ff),runtimeMetrics:Fd(e,Pf),maxOpsBeforeYield:Id(e,Df),preventYield:Id(e,Of)}},lp={[ul](e,t){return gp(t._interruptedCause)},[dl](e,t){return gp(t._interruptedCause)}},up=32,dp={interruptChildren:void 0},fp=e=>{if(!e.cache.stackFrame)return;let t=new Map;return t.set(Vl.key,e.cache.stackFrame),Td(t)},pp=e=>kp(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(hp(r))}return a(),vp(()=>i?.())}),mp=e=>Gl(t=>{let n=fp(t),r=Wu();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return Vp(pp(r))}),hp=zl,gp=Hl,_p=Ul,vp=Ll({op:`Sync`,[ll](e){let t=this[B](),n=e.getCont(ul);return n?n[ul](t,e):e.yieldWith(zl(t))}}),yp=Ll({op:`Suspend`,[ll](e){return this[B]()}}),bp=zu({onFailure:_p,onSuccess:hp}),xp=Ll({op:`Yield`,[ll](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(Yp)},this[B]??0),e.yieldWith(()=>{t=!0})}})(0),Sp=e=>yp(()=>gp(e())),Cp=e=>Wl(e),wp=e=>yp(()=>_p(e())),Tp=hp(void 0),Ep=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new Cm(e,`An error occurred in Effect.try`):e.catch;return yp(()=>{try{return hp(t())}catch(e){return _p(n(e))}})},Dp=function(){let e=Il({op:`Async`,[ll](e){let t=!1,n=!1,r=this.withSignal?new AbortController:void 0,i=this.register.call(e.cache.scheduler,r=>{t||(t=!0,n?e.evaluate(r):n=r)},r?.signal);return n===!1?(n=!0,e._yielded=()=>{t=!0},r===void 0&&i===void 0||e._stack.push(Op(()=>(t=!0,r?.abort(),i??Yp))),pl):n}}),t=function(e,t){this.register=e,this.withSignal=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Op=Ll({op:`AsyncFinalizer`,[fl](e){e.interruptible&&(e.interruptible=!1,e._stack.push(dm))},[dl](e,t){return Hf(e)?Hp(lm(Hl(e),this[B]()),()=>gp(e)):gp(e)}}),kp=e=>Dp(e,e.length>=2),Ap=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),jp=(e,...t)=>Ap(e.length,t.length===0?function(){return Mp(()=>e.apply(this,arguments))}:function(){let n=Mp(()=>e.apply(this,arguments));for(let e of t)n=e(n,...arguments);return n}),Mp=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return hp(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return yp(()=>n?(n=!1,Hp(r.value,e=>Np(t,e))):yp(()=>Np(e())))}}}catch(e){return Cp(e)}},Np=function(){let e=Il({op:`Iterator`,[ul](e,t){let n=this.iterator;for(;;){let r=n.next(e);if(r.done)return hp(r.value);if(!Up(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[ll](e){return this[ul](this.initial,e)}}),t=function(e,t){this.iterator=e,this.initial=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Pp=function(e){return e._stack.push(this),this[B]},Fp=Il({op:`OnSuccess`,[ll]:Pp}),Ip=function(e,t,n){this[B]=e,this[ul]=t,this.payload=n};Ip.prototype=Fp;var Lp=function(){return this.payload},Rp=(()=>{let e=`~effect/Effect/stackProbe`;return{[e]:function(){return Error().stack}}[e]()?.includes(`[as `+e+`]`)===!0})(),zp=function(e,t){let n=this.payload;return t.succeedWith(Rp?n(e):il(()=>n(e)))},Bp=function(e){let t=this.payload;return t(e)},Vp=e=>new Ip(e,Lp,Yp),Hp=I(2,(e,t)=>new Ip(e,Bp,t)),Up=e=>e[ol]!==void 0,Wp=I(2,(e,t)=>Up(e)?e._tag===`Success`?t(e.value):e:Hp(e,t)),Gp=I(2,(e,t)=>new Ip(e,zp,t)),Kp=I(2,(e,t)=>Up(e)?Xp(e,t):Gp(e,t)),qp=I(2,(e,t)=>Up(e)?Zp(e,t):rm(e,t)),Jp=e=>e._tag===`Success`,Yp=zl(void 0),Xp=I(2,(e,t)=>e._tag===`Success`?zl(t(e.value)):e),Zp=I(2,(e,t)=>{if(e._tag===`Success`)return e;let n=Vf(e.cause);return Iu(n)?e:Ul(t(n.success))}),Qp=I(2,(e,t)=>new em(e,t.length===1?t:e=>t(e))),$p=Il({op:`OnFailure`,[ll]:Pp}),em=function(e,t){this[B]=e,this[dl]=t};em.prototype=$p;var tm=I(3,(e,t,n)=>Qp(e,e=>{let r=t(e);return Iu(r)?gp(r.failure):n(r.success,e)})),nm=I(2,(e,t)=>tm(e,Vf,e=>t(e))),rm=I(2,(e,t)=>nm(e,e=>wp(()=>t(e)))),im=function(e,t){let n=this.payload;return t.succeedWith(Rp?n.onSuccess(e):il(()=>n.onSuccess(e)))},am=((e,t)=>{let n=Il({op:e,[ll]:Pp,[ul]:im,[dl]:t}),r=function(e,t){this[B]=e,this.payload=t};return r.prototype=n,r})(`Match`,function(e,t){let n=e.reasons.find(Ml);if(n===void 0)return gp(e);let r=this.payload;return t.succeedWith(Rp?r.onFailure(n.error):il(()=>r.onFailure(n.error)))}),om=I(2,(e,t)=>new am(e,t)),sm=e=>Up(e)?zl(e):cm(e),cm=Ll({op:`Exit`,[ll](e){return e._stack.push(this),this[B]},[ul](e,t,n){return t.succeedWith(n??zl(e))},[dl](e,t,n){return t.succeedWith(n??Hl(e))}}),lm=(e,t)=>Jp(e)?t:Qp(t,t=>gp(Dl(e.cause,t))),um=e=>Gl(t=>t.interruptible?(t.interruptible=!1,t._stack.push(dm),e):e),dm=Ll({op:`SetInterruptible`,[fl](e){if(e.interruptible=this[B],e._interruptedCause&&e.interruptible)return()=>gp(e._interruptedCause)}})(!0),fm=e=>e===`unbounded`?1/0:Math.max(1,e??1),pm=()=>e=>{let t=e.onItem,n=e.step,r=(e,t,r,a,o)=>Hp(sm(o),o=>n(e,t[r],o,r)??i(e,t,r+1,a)??Tp),i=(e,i,a=0,o=i.length)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!Up(c))return r(e,i,a,o,c);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return i},mm=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=0,o=i.end??r.length,s=i.concurrency,c=!1,l,u,d,f,p,m=e=>{let t=Wl(e);return f=t,c=!0,u&&u.size>0?Hp(um(mp(Array.from(u))),()=>f??t):t},h=()=>{let i=!1;for(;!f&&a<o;a++){let o=r[a],g=p??t(e,o,a);if(Up(g)){if(f=n(e,o,g,a),f)break}else if(l){p=void 0;let t=gm(l,g,!0,!0,`inherit`);if(t._exit){if(f=n(e,o,t._exit,a),f)break;continue}u.add(t);let r=a;if(t.addObserver(a=>{u.delete(t);try{if(f){if(a._tag===`Failure`){let e=a.cause.reasons.filter(e=>e._tag!==`Interrupt`);if(e.length>0){let t=Tl(e);f=Hl(f._tag===`Failure`?Dl(f.cause,t):t)}}}else{let t=n(e,o,a,r);t&&(f=t,h())}if(i){let e=h();e&&d(e)}else c&&u.size===0&&d(f??Tp)}catch(e){d(m(e))}}),u.size<s)continue;i=!0,a++;return}else return kp(e=>{l=op(),u=new Set,p=g,d=e;let t;try{t=h()}catch(t){return e(m(t))}return t?e(t):yp(()=>(f??=Yp,Hp(u?mp(u):Tp,()=>f?._tag===`Failure`?f:Tp)))})}if(c=!0,f){if(u&&u.size>0){let e=fp(l);u.forEach(t=>t.interruptUnsafe(l.id,e));return}if(d||f._tag===`Failure`)return f}else if(d){if(u)u.size===0&&d(Tp);else return Yp}};return h()}},hm=()=>e=>mm(e),gm=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new sp(a.context,o);return r||(a.children().add(s),s._parent=a),n?s.evaluate(t):(s._asyncContext=ap(),a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0)),s},_m=e=>(t,n)=>{let r=new sp(n?.scheduler?Nd(e,bf,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},vm=_m(Ad()),ym=(e=>{let t=_m(e);return e=>{if(Up(e))return e;let n=new Tf(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??Wl(new xm(r))}})(Ad());Jl(`TimeoutError`),Jl(`IllegalArgumentError`),Jl(`ExceededCapacityError`);var bm=`~effect/Cause/AsyncFiberError`,xm=class extends Jl(`AsyncFiberError`){[bm]=bm;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},Sm=`~effect/Cause/UnknownError`,Cm=class extends Jl(`UnknownError`){[Sm]=Sm;constructor(e,t){super({message:t,cause:e})}},wm={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};wm.gray,wm.blue,wm.green,wm.yellow,wm.red,wm.bgBrightRed,wm.black;var Tm=Ml,Em=Al,Dm=Uf,Om=Qf;pd()(`effect/Cause/StackTrace`),pd()(`effect/Cause/InterruptorStackTrace`);var km=zl,Am=Hl,jm=Ul,Mm=Yp,Nm=Jp,Pm=`~effect/DateTime`,Fm=`~effect/DateTime/TimeZone`,Im={[Pm]:Pm,pipe(){return ws(this,arguments)},[Qc](){return this.toString()},toJSON(){return Rm(this).toJSON()}};({...Im}),{...Im};var Lm={[Fm]:Fm,[Qc](){return this.toString()}};({...Lm}),{...Lm};var Rm=e=>new Date(e.epochMilliseconds);globalThis.String;var zm=e=>e.trim(),Bm=hp,Vm=yp,Hm=_p,Um=Sp,Wm=Cp,Gm=Ep,Km=bp,qm=Hp,Jm=sm,Ym=Qp,Xm=om,Zm=vm,Qm=ym;pd()(`effect/Effect/Transaction`);var $m=Kp,eh=qp,th=Wp,nh=jp;pd()(`effect/DateTime/CurrentTimeZone`);var rh=e=>ah(typeof e==`string`?oh.encode(e):e),ih=e=>{let t=sh(e),n=t.length;if(n%4!=0)return Fu(new jf({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return Fu(new jf({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=uh(t.charCodeAt(e))<<18|uh(t.charCodeAt(e+1))<<12|uh(t.charCodeAt(e+2))<<6|uh(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return Pu(r)}catch(e){return Fu(new jf({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},ah=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=ch[e[r-2]>>2],n+=ch[(e[r-2]&3)<<4|e[r-1]>>4],n+=ch[(e[r-1]&15)<<2|e[r]>>6],n+=ch[e[r]&63];return r===t+1&&(n+=ch[e[r-2]>>2],n+=ch[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=ch[e[r-2]>>2],n+=ch[(e[r-2]&3)<<4|e[r-1]>>4],n+=ch[(e[r-1]&15)<<2],n+=`=`),n},oh=new TextEncoder,sh=e=>e.replace(/[\n\r]/g,``),ch=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,lh=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)lh[ch.charCodeAt(e)]=e;lh[61]=0;var uh=e=>{if(e>=lh.length||lh[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return lh[e]};kf(`CookiesError`),{...z},{...z};var dh=new WeakMap,fh=`~effect/Redacted`,ph=e=>Qs(e,fh),mh=(e,t)=>{let n=Object.create(hh);return t?.label&&(n.label=t.label),dh.set(n,e),n},hh={[fh]:{_A:e=>e},label:void 0,...ml,toJSON(){return this.toString()},toString(){return`<redacted${Vs(this.label)?`:`+this.label:``}>`},[$s](){return ec(dh.get(this))},[vc](e){return ph(e)&&yc(dh.get(this),dh.get(e))}};({...ml});function gh(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function _h(e){return t=>gh(t)?.[e]}var vh=`~structural`,yh=`~identifier`,bh=`~sentinels`,xh=`~constructor`,Sh=[`title`,`description`,`default`,`examples`,`readOnly`,`writeOnly`,`format`,`contentEncoding`,`contentMediaType`,`contentSchema`],Ch=_h(`identifier`),wh=_h(yh),Th=_h(`title`),Eh=_h(`description`),Dh=Ps(e=>{let t=gh(e)?.identifier;return typeof t==`string`?t:e.getExpected(Dh)}),Oh=new Set([bh,vh,`representation`,`arbitraryConstraint`,`toJsonSchema`,`toCode`,`toEquivalence`,`toFormatter`,`toCodec`,`toCodecJson`,`toCodecStringTree`,`toCodecIso`,`toCodecArbitrary`]),V=Symbol(),kh=km,Ah=kh(V),jh=kh(V),Mh=e=>e===V?wu():Tu(e),Nh=e=>e._tag===`None`?Ah:kh(e.value),Ph=`~effect/SchemaIssue/Issue`;function Fh(e){return Qs(e,Ph)&&e[Ph]===Ph}function Ih(e){return Object.hasOwn(e,`input`)}var Lh=class{[Ph]=Ph;constructor(e,t){t?.reportInput===!0&&e!==V&&(this.input=e)}},Rh=class extends Lh{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},zh=class extends Lh{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},Bh=class extends Lh{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Vh=class extends Lh{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},Hh=class extends Lh{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Uh=class extends Lh{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Wh=class extends Lh{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Gh=class extends Lh{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Kh=class extends Lh{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},qh=class extends Lh{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Jh(e,t,n){if(Fh(e))return e;if(typeof e==`string`)return new Gh({message:e},t,n);let r=typeof e.issue==`string`?new Gh({message:e.issue},t,n):e.issue;return new Bh(e.path,r)}function Yh(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Gh(void 0,t,n):Jh(e,t,n)}function Xh(e,t,n,r){return Array.isArray(t)?Uu(t)?t.length===1?Jh(t[0],n,r):new Uh(e,Gu(t,e=>Jh(e,n,r)),n,r):void 0:Yh(t,n,r)}var Zh=e=>{let t=cg(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return ng(Dh(e.ast),e);case`InvalidValue`:{let t=tg(e);if(t!==void 0)return ng(t,e);let n=eg(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=eg(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=eg(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Qh=e=>cg(e.issue)??cg(e);function $h(e){return t=>({issues:rg(t,[],e?.leafHook??Zh,e?.checkHook??Qh)})}function eg(e){return Ih(e)?R(e.input):void 0}function tg(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function ng(e,t){let n=eg(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function rg(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return rg(e.issue,t,n,r);let a=tg(e.issue);return[{path:t,message:a===void 0?ng(ig(e.filter),e):ng(a,e.issue)}]}case`Encoding`:return rg(e.issue,t,n,r);case`Pointer`:return rg(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>rg(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:cg(e)??ng(Dh(e.ast),e)}]:e.issues.flatMap(e=>rg(e,t,n,r));default:return[{path:t,message:n(e)}]}}function ig(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>ig(e)).join(` & `)}}function ag(){return e=>sg(e,``)}var og=ag();function sg(e,t){let n;switch(e._tag){case`Filter`:{let r=Qh(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return sg(e.issue,t);let r=tg(e.issue);n=r===void 0?ng(ig(e.filter),e):ng(r,e.issue)}break}case`Encoding`:return sg(e.issue,t);case`Pointer`:return sg(e.issue,t+Gc(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>sg(e,t)).join(`
|
|
76
|
-
`);n=cg(e)??ng(Dh(e.ast),e);break;default:n=Zh(e)}return t?`${n}\n at ${t}`:n}function cg(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return cg(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function lg(e){let t;for(let n of e.reasons){if(!Tm(n)||!Fh(n.error))return;t??=n.error}return t}function ug(e,t){let n=lg(e);if(n===void 0)throw Error(t,{cause:e});return n}var dg=e=>Object.assign(Object.create(Ts),e),fg=dg({_tag:`Passthrough`});function pg(){return fg}function mg(e){return dg({_tag:`Transform`,transform:e})}function hg(e){return dg({_tag:`TransformEffect`,transform:e})}function gg(){return mg(globalThis.String)}function _g(){return mg(globalThis.Number)}function vg(){return mg(zm)}function yg(e){return hg((t,n)=>Gm({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Gh({expected:`a valid JSON string`},t,n)}))}function bg(e){return hg((t,n)=>Gm({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Gh({expected:`a JSON-serializable value`},t,n)}))}function xg(){return mg(rh)}function Sg(){return hg((e,t)=>eh(Km(ih(e)),()=>new Gh({expected:`a valid Base64 string`},e,t)))}var Cg=class extends Es{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new Cg(this.encode,this.decode)}},wg=`~effect/SchemaTransformation/Transformation`,Tg=class extends Es{[wg]=wg;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new Tg(this.encode,this.decode)}};function Eg(e){return Qs(e,wg)&&e[wg]===wg}var Dg=e=>Eg(e)?e:new Tg(e.decode,e.encode);function Og(){return new Tg(vg(),pg())}var kg=new Tg(pg(),pg());function Ag(){return kg}var jg=new Tg(_g(),gg()),Mg=new Tg(Sg(),xg());function Ng(e){return new Tg(yg(e??{}),bg(e))}function Pg(e){return t=>t._tag===e}var Fg=Pg(`Declaration`),Ig=Pg(`Null`),Lg=Pg(`Undefined`),Rg=Pg(`Never`),zg=Pg(`String`),Bg=Pg(`Number`),Vg=Pg(`Boolean`),Hg=Pg(`Literal`),Ug=Pg(`UniqueSymbol`),Wg=Pg(`Arrays`),Gg=Pg(`Objects`),Kg=Pg(`Union`),qg=Pg(`Suspend`),Jg=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Yg={},Xg=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},Zg=`~effect/Schema`,Qg=class{[Zg]=Zg;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},$g=class extends Qg{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===V?Ah:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=yv(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new $g(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},e_=new class extends Qg{_tag=`Null`;getParser(){return Lv(this,null)}getExpected(){return`null`}},t_=class extends Qg{_tag=`Undefined`;getParser(){return Lv(this,void 0)}toCodecJson(){return sv(this,[n_])}getExpected(){return`undefined`}},n_=new Jg(e_,new Tg(mg(()=>void 0),mg(()=>null))),r_=new t_,i_=new class extends Qg{_tag=`Unknown`;getParser(){return Rv(this,Ys)}getExpected(){return`unknown`}},a_=class extends Qg{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${R(e)}`);this.literal=e}getParser(){return Lv(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?o_(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:o_(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function o_(e){let t=globalThis.String(e.literal);return sv(e,[new Jg(new a_(t),new Tg(mg(()=>e.literal),mg(()=>t)))])}var s_=new class extends Qg{_tag=`String`;getParser(){return Rv(this,Vs)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&Jv(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},c_=class extends Qg{_tag=`Number`;getParser(){return Rv(this,Hs)}matchKey(e,t){return this._match(Uv,e,t)}matchPart(e,t){return this._match(Hv,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:Jv(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(l_(this.checks,`effect/schema/isFinite`)||l_(this.checks,`effect/schema/isInt`))?this:sv(this,[nv])}toCodecStringTree(){return this.toCodecJson()===this?sv(this,[Kv]):sv(this,[qv])}getExpected(){return`number`}};function l_(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&l_(e.checks,t))}var u_=new c_,d_=new class extends Qg{_tag=`Boolean`;getParser(){return Rv(this,Us)}getExpected(){return`boolean`}},f_=class extends Qg{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(Dv(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(Dv(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new Hh(n,t[o],i),a=new Bh([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Hm(new Uh(n,[a],t,i))}return e.issues?Hm(new Uh(n,e.issues,t,i)):kh(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:fm(t.concurrency),f=d===1?h_(i,e,0,u):g_(i,e,{concurrency:d,end:u});if(!f)return c(i);if(Up(f))return th(f,()=>c(i));let p=!0;return Vm(()=>p?(p=!1,qm(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===V)return Ah;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):Hm(new Wh(n,e,a))}catch(e){return Wm(e)}}}_rebuild(e,t,n){let r=yv(this.elements,e),i=yv(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new f_(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function p_(e,t,n,r){if(n._tag===`Failure`)return __(e,e.ast,r,n);let i=n===jh?t:n[B];if(i!==V)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(Dv(t.ast))return;let n=new Bh([r],new Vh(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return jm(new Uh(e.ast,[n],e.input,e.options))}}var m_={onItem(e,t,n){let r=n<e.len?t:V;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:p_},h_=pm()(m_),g_=hm()(m_),__=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=lg(r.cause);if(i===void 0)return Am(Dm(r.cause,r=>new Uh(t,[new Bh([n],r)],e.input,e.options)));let a=new Bh([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return jm(new Uh(t,[a],e.input,e.options))},v_=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function y_(e,t,n=Yg){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(zv(Nv(t)))}var b_=class{name;type;constructor(e,t){this.name=e,this.type=t}};function x_(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(x_);default:return!1}}function S_(e){let t=lv(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(S_);default:return!1}}function C_(e){return x_(e)&&S_(e)}var w_=class{parameter;type;constructor(e,t){if(!C_(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,Dv(t)&&!Iv(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},T_=class extends Qg{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return Rv(n,Js);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(zv(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return __(t,n,i,s)??Mm;let c=s===jh?o:s[B];if(a!==V&&c!==V){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return Mm;Pc(t.out,a,c)}return Mm},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!Up(t))return qm(Jm(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return __(e,n,r,a)??Mm;let o=a===jh?r:a[B],s=e.input[r],l=i.parserValue(s,e.options);return Up(l)?t(e,r,o,s,l):qm(Jm(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return Up(a)?t(e,n,n,i,a):qm(Jm(a),r=>t(e,n,n,i,r))},u=i?hm()({onItem:(e,[t,n])=>n.is.parameter===s_?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return nh(function*(t,d){if(t===V)return V;if(!(typeof t==`object`&&t&&!Array.isArray(t)))return yield*Hm(new Wh(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:fm(d.concurrency),v=i&&g?n.indexSignatures.map(e=>y_(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new Hh(n,f[a],d),r=new Bh([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*Hm(new Uh(n,[r],t,d))}}}if(r){let e=_===1?O_(m,a):k_(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===s_?l:c,r=v?.[e]??(t.is.parameter===s_?Object.keys(f):y_(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!Up(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Wu();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===s_?Object.keys(f):y_(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*Hm(new Uh(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return qm(Jm(n),n=>{let i=E_(e,r,n);if(i)return i;let o=()=>kh(e.out),s=O_(e,a.slice(t+1));return s?th(s,o):o()})};return(e,t)=>{if(e===V)return Ah;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&fm(t.concurrency)!==1)return(l??=c())(e,t);if(!(typeof e==`object`&&e&&!Array.isArray(e)))return Hm(new Wh(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=B_(i,s),l=c?i[s]:V,d=n.parser(l,t);if(!Up(d))return u(o,e,d);if(d===jh){c&&Pc(a,s,l);continue}let f=E_(o,n,d);if(f)return f}}catch(e){return Wm(e)}return kh(a)}}_rebuild(e,t,n,r){let i=yv(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new b_(t.name,n)}),a=yv(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new w_(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new T_(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function E_(e,t,n){if(n._tag===`Failure`)return __(e,e.ast,t.name,n);if(n===jh)return;let r=n[B];if(r!==V){Pc(e.out,t.name,r);return}if(delete e.out[t.name],!Dv(t.type)){let n=new Bh([t.name],new Vh(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return jm(new Uh(e.ast,[n],e.input,e.options))}}var D_={onItem(e,t){if(!B_(e.input,t.name))return t.parser(V,e.options);let n=e.input[t.name];return Pc(e.out,t.name,n),t.parser(n,e.options)},step:E_},O_=pm()(D_),k_=hm()(D_);function A_(e,t){return e?t?[...e,...t]:e:t}function j_(e,t,n){return new T_(Reflect.ownKeys(e).map(t=>new b_(t,e[t].ast)),[],n,t)}function M_(e){return e.ast}function N_(e,t,n){return new H_(e.map(M_),t,void 0,n)}var P_=Fs(e=>{for(;;){if(qg(e))return i_;let t=e.encoding;if(!t)return e.recur?.(P_,Ds)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Ds))return i_;e=t[t.length-1].to}});function F_(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(F_)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function I_(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[bh];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!Dv(t)){if(Hg(t))return[{key:e.name,literal:t.literal}];if(Ug(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!Dv(e)){if(Hg(e))return[{key:t,literal:e.literal}];if(Ug(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>I_(P_(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return I_(e.thunk())}}var L_=new WeakMap,R_=Object.freeze([]),z_=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,B_=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function V_(e){let t=L_.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=P_(c);if(Rg(l))continue;if(Hg(l)||Ug(l)){a??=new Map;let e=Hg(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=I_(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=F_(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??R_);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??R_;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Zs(e)){let n=B_(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??R_;if(t)return o}return R_}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=z_(t);if(!Zs(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=B_(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=B_(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=B_(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(z_(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return L_.set(e,t),t}var H_=class extends Qg{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===V)return Ah;let i=(o??=V_(n.types))(e,r);if(i.length===0)return Hm(new Kh(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:Up(r)?U_(n,r.cause,e,t):W_(n,r,e,t)}return G_(n,a,i,e,t)}}_rebuild(e,t,n){let r=yv(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new H_(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=Nv(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Hg);if(t.length>0)return`${Y_(n.isMutable)}[ ${t.map(t=>e(t)+X_(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Hg(e.type));if(t.length>0)return`{ ${t.map(t=>`${Y_(t.type.context?.isMutable)}${Wc(t.name)}${X_(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function U_(e,t,n,r){let i=lg(t);return i?jm(new Kh(e,[i],n,r)):Am(t)}function W_(e,t,n,r){return Ym(t,t=>U_(e,t,n,r))}function G_(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=q_(a,n);if(!o)return a.out?a.out:Hm(new Kh(e,a.issues??[],r,i));if(Up(o))return K_(o,a);let s=!0;return Vm(()=>s?(s=!1,K_(o,a)):G_(e,t,n,r,i))}function K_(e,t){return th(e,e=>t.out===jh?Bm(t.input):t.out?t.out:Hm(new Kh(t.ast,t.issues??[],t.input,t.options)))}var q_=pm()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=lg(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),jm(new qh(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return Mm}}}),J_=new H_([new a_(`Infinity`),new a_(`-Infinity`),new a_(`NaN`)]);function Y_(e){return e?``:`readonly `}function X_(e){return e?`?`:``}var Z_=class extends Es{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new Z_(this.run,{...this.annotations,...e},this.aborted)}abort(){return new Z_(this.run,this.annotations,!0)}and(e,t){return new Q_([this,e],t)}},Q_=class extends Es{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new Q_(this.checks,{...this.annotations,...e})}and(e,t){return new Q_([this,e],t)}};function $_(e,t,n=!1){return new Z_((t,n,r)=>Xh(n,e(t,n,r),t,r),t,n)}function ev(e){return $_(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var tv=fv(u_,[ev()]),nv=new Jg(new H_([tv,J_]),new Tg(_g(),mg(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function rv(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return $_(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var iv=new WeakMap;function av(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&iv.set(n,ov(e)),n}function ov(e){let t=iv.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return iv.set(e,n),n}function sv(e,t){return e.encoding===t?e:av(e,{encoding:t})}function cv(e,t){if(e.context===t)return e;let n=ov(e);return n.context===t&&n.encoding===e.encoding?n:av(e,{context:t})}function lv(e){return e.encoding?lv(e.encoding[e.encoding.length-1].to):e}function uv(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return dv(e,Vu(e.checks.slice(0,-1),n.annotate(t)))}return av(e,{annotations:{...e.annotations,...t}})}function dv(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:av(e,{checks:t})}function fv(e,t){return dv(e,A_(e.checks,t))}function pv(e,t){let n=t(e.to);return n===e.to?e:new Jg(n,e.transformation)}function mv(e,t){let n=e,r=n[n.length-1],i=pv(r,t);return i===r?e:Vu(e.slice(0,e.length-1),i)}function hv(e){return t=>t.encoding?sv(t,mv(t.encoding,e)):t}function gv(e,t){return hv(e=>cv(e,t))(e)}function _v(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:sv(r,mv(r.encoding,n))}return e(r)}return Fs(n)}function vv(e,t,n){let r=new Jg(e,t);return sv(n,n.encoding?[...n.encoding,r]:[r])}function yv(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function bv(e,t){return cv(e,e.context?new Xg(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Xg(!1,!1,void 0,t))}var xv=Fs(e=>Sv(cv(e,e.context?e.context.isOptional===!1?new Xg(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Xg(!0,!1)))),Sv=hv(xv),Cv=Ps(e=>xv(new H_([e,r_])));function wv(e,t,n){return vv(e,n,t)}function Tv(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Gs(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function Ev(e,t){let{literals:n,parameters:r}=Tv(e);return new T_(n.map(e=>new b_(e,t)),r.map(e=>new w_(e,t)))}function Dv(e){return e.context?.isOptional??!1}function Ov(e){return e.context?.isMutable??!1}function kv(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(kv)}function Av(e){function t(e){return kv(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Hu(n)?n:void 0}function jv(e){let t=!0;function n(e){return t=t&&!e.encoding&&!qg(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var Mv=Fs(e=>{let t=ov(e);if(t!==e){let n=Mv(t);return n===t&&e.encoding===void 0?e:cv(n,e.context)}let n=`recur`in e?e.recur(Mv):e;if(`encodingChecks`in n&&n.encodingChecks){let t=jv(e)?n.encodingChecks:Wg(n)||Gg(n)||Fg(n)&&n.typeParameters.length>0?Av(n.encodingChecks):void 0;return av(n,{encodingChecks:void 0,checks:A_(n.checks,t)})}return n}),Nv=Fs(e=>Mv(Fv(e)));function Pv(e,t){let n=t,r=n.length,i=n[r-1],a=[new Jg(Fv(sv(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new Jg(Fv(n[e-1].to),n[e].transformation.flip()));let o=Fv(i.to);return o.encoding?sv(o,[...o.encoding,...a]):sv(o,a)}var Fv=Ps(e=>{if(e.encoding)return Pv(e,e.encoding);let t=ov(e);if(t!==e){let n=Fv(t);return n===t?e:cv(n,e.context)}return`flip`in e?e.flip(Fv):`recur`in e?e.recur(Fv):e});function Iv(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(Iv);default:return!1}}function Lv(e,t){let n=t===0?jh:kh(t);return(r,i)=>r===V?Ah:r===t?n:Hm(new Wh(e,r,i))}function Rv(e,t){return(n,r)=>n===V?Ah:t(n)?jh:Hm(new Wh(e,n,r))}var zv=_v(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(zv)}}),Bv=_v(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(Bv)}}),Vv=`[\\s\\S]*?`,Hv=new globalThis.RegExp(`^${v_}$`),Uv=new globalThis.RegExp(`^(?:${v_}|Infinity|-Infinity|NaN)$`);function Wv(e){return rv(Hv,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Hv.source}),...e})}var Gv=fv(s_,[Wv()]),Kv=new Jg(Gv,jg),qv=new Jg(new H_([Gv,J_]),jg);function Jv(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=Jv(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Rh(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Yv(e){if(!Fg(e))return;let t=e.annotations?.[xh];return Ks(t)?t(e.typeParameters):void 0}var Xv=gh,Zv=Th,Qv=Eh;function $v(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function ey(e){return e===void 0||typeof e==`string`}function ty(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function ny(e){return ty(e,$v)}var ry=new $g([],()=>(e,t,n)=>ny(e)?jh:Hm(new Wh(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>sy}),iy=new Jg(ry,Ag()),ay=new Jg(new H_([new f_(!1,[],[ry]),new T_([],[new w_(s_,ry)])]),Ag());function oy(e){return ty(e,ey)}var sy=new Jg(new $g([],()=>(e,t,n)=>oy(e)?jh:Hm(new Wh(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),Ag()),cy=(e,t,n)=>e===jh?n(t):th(e,n);function ly(e){if(e._tag===`Middleware`)return(t,n,r)=>uy(t===jh?e.decode(kh(Mh(n)),r):e.decode($m(t,Mh),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===jh?kh(t):e;case`Transform`:{let e=e=>e===V?Ah:kh(t.transform(e));return(t,n)=>cy(t,n,e)}case`TransformOptional`:{let e=e=>Nh(t.transform(Mh(e)));return(t,n)=>cy(t,n,e)}case`TransformEffect`:return(e,n,r)=>cy(e,n,e=>e===V?Ah:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>cy(e,n,e=>uy(t.transform(Mh(e),r)))}}var uy=e=>th(e,Nh),dy=(e,t,n,r)=>Ym(r,r=>Um(()=>Dm(r,r=>new zh(e,r,t,n))));function fy(e,t){let n=ly(e.link.transformation),r;return(i,a)=>{if(i===V)return Ah;if(e.isConstructed(i))return jh;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function py(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==V&&r!==void 0)return t(r,i);let a=n;if(Up(a)&&a._tag===`Success`){let e=t(a[B],i);return e===jh?a:e}return th(dy(e,r,i,a),e=>{let n=t(e,i);return n===jh?kh(e):n})}}function my(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:py(e,n)}function hy(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?Yv(e):void 0,o=a?fy(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>ly(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(Up(r)){if(r._tag===`Success`){let i=r===jh?t:r[B];if(t!==V&&i!==V){let i=Jv(u,t,void 0,e,n);i&&(r=Hm(new Uh(e,i,t,n)))}}}else r=qm(r,r=>{if(t!==V&&r!==V){let r=Jv(u,t,void 0,e,n);if(r)return Hm(new Uh(e,r,t,n))}return Bm(r)})}if(s&&!n.disableChecks){if(Up(r)){if(r._tag===`Success`){let i=r===jh?t:r[B];if(i===V)return r;let a=Jv(s,i,void 0,e,n);a&&(r=Hm(new Uh(e,a,i,n)))}}else r=qm(r,t=>{if(t!==V){let r=Jv(s,t,void 0,e,n);if(r)return Hm(new Uh(e,r,t,n))}return Bm(t)})}return r},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[B],o=t(a,r)):o=th(o,e=>{let n=t(e,r);return n===jh?kh(e):n})}if(o._tag===`Success`){let e=o[B],t=p(e,r);return t===jh?o:t}return o=dy(e,n,r,o),th(o,e=>{let t=p(e,r);return t===jh?kh(e):t})}:p}var gy=Symbol(),_y=new WeakMap,vy=e=>Sy(e).parser,yy=e=>Sy(e).makeEffect,by=e=>my(e,yy),xy=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=hy(this.ast,vy)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=hy(this.ast,yy,by)}};function Sy(e){let t=_y.get(e);if(t!==void 0)return t;let n=new xy(e);return _y.set(e,n),n}function Cy(e){let t=e.ast,n;return(e,r)=>(n??=Iy(Uy,Mv(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function wy(e){let t=Cy(e);return(e,n)=>{let r=Qm(t(e,n));return Nm(r)?Tu(r.value):(ug(r.cause,`Option adapter can only return none for schema issues`),wu())}}function Ty(e){return Vy(Mv(e.ast))}function Ey(e){return Oy(e.ast)}function Dy(e){{let t=Ly(Py(e));return e=>{let n=t(e,Yg);return Nm(n)?!0:(ug(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function Oy(e){let t=Mv(e),n=e=>(n=Dy(t),n(e));return e=>n(e)}function ky(e,t){let n=Py(e.ast);return t===void 0?n:(e,r)=>n(e,My(t,r))}function Ay(e,t){return Ry(ky(e,t))}function jy(e,t){return zy(ky(e,t))}var My=(e,t)=>t?{...e,...t}:e,Ny=e=>e===V?Hm(new Gh):Bm(e);function Py(e){return Iy(Hy,e)}function Fy(e,t){return e===jh?Bm(t):Up(e)?e[B]===V?Ny(V):e:th(e,Ny)}function Iy(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Yg);return a===jh?Bm(r):Up(a)?a[B]===V?Ny(V):a:th(a,Ny)}}function Ly(e){return(t,n)=>Qm(e(t,n))}function Ry(e){let t=Ly(e);return(e,n)=>{let r=t(e,n);return Nm(r)?Tu(r.value):(ug(r.cause,`Option adapter can only return none for schema issues`),wu())}}function zy(e){let t=Ly(e);return(e,n)=>{let r=t(e,n);return Nm(r)?Pu(r.value):Fu(ug(r.cause,`Result adapter can only return schema issues`))}}function By(e,t){let n=Qm(e);if(Nm(n))return n.value;let r=ug(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function Vy(e){let t,n;return(r,i)=>{t??=Sy(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??Yg,o=t.make;if(o!==void 0&&r!==V){let e;try{e=o(r,a)}catch(e){throw ug(Em(e),`Constructor adapter can only throw schema issues`),e}if(e!==gy&&e!==V)return e}return By(Fy((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Hy=e=>Sy(e).parser,Uy=e=>Sy(e).makeEffect,Wy=`~effect/Schema/Schema`,Gy=Symbol(),Ky={[Wy]:Wy,get make(){let e=Ty(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=Cy(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=wy(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return ws(this,arguments)},annotate(e){return this.rebuild(uv(this.ast,e))},annotateKey(e){return this.rebuild(bv(this.ast,e))},check(...e){return this.rebuild(fv(this.ast,e))},rebuild(e){return qy(e,this[Gy])}};function qy(e,t){function n(){}let r=Object.setPrototypeOf(n,Ky);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Gy]=t,r.ast=e,r}function Jy(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Yy(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Xy(e){return encodeURI(Jy(e)).replace(/#/g,`%23`)}function Zy(e){if(e.length===0||e===`#`)return``;if(!e.startsWith(`#`))return;let t=e.slice(1);try{if(encodeURI(t).replace(/%25/g,`%`).replace(/#/g,`%23`)!==t)return;let e=decodeURIComponent(t);return e.startsWith(`/`)&&!/~(?:[^01]|$)/.test(e)?e:void 0}catch{return}}function Qy(e,t){return n(e,!1,!0);function n(e,r,i=!1){if(!Xs(e))return e;let a=r||!i&&nb(e.$id),o={};for(let t of Object.keys(e)){let r=e[t],i=r;switch(t){case`$defs`:case`properties`:case`patternProperties`:case`dependentSchemas`:i=tb(r,e=>n(e,a))??r;break;case`allOf`:case`anyOf`:case`oneOf`:case`prefixItems`:i=Array.isArray(r)?r.map(e=>n(e,a)):r;break;case`not`:case`additionalProperties`:case`propertyNames`:case`unevaluatedProperties`:case`items`:case`contains`:case`unevaluatedItems`:case`if`:case`then`:case`else`:case`contentSchema`:i=n(r,a)}Pc(o,t,i)}return t(o,a),o}}function $y(e,t){return Qy(e,e=>{eb(e,t)})}function eb(e,t){typeof e.$ref==`string`&&Pc(e,`$ref`,t(e.$ref,`$ref`)),typeof e.$dynamicRef==`string`&&Pc(e,`$dynamicRef`,t(e.$dynamicRef,`$dynamicRef`))}function tb(e,t){if(!Xs(e))return;let n={};for(let r of Object.keys(e))Pc(n,r,t(e[r],r));return n}function nb(e){return typeof e==`string`&&e.length>0&&e[0]!==`#`}var rb=[`$anchor`,`$defs`,`$dynamicAnchor`,`$dynamicRef`,`$vocabulary`,`contentSchema`,`dependentRequired`,`dependentSchemas`,`maxContains`,`minContains`,`prefixItems`,`unevaluatedItems`,`unevaluatedProperties`];[...rb],[...rb];var ib=_v(e=>{let t=lb(e,ib),n=e.context;return t===e||n===void 0?t:gv(t,ab(n))});function ab(e){return e.constructorDefault===void 0?e:new Xg(e.isOptional,e.isMutable,void 0,e.annotations)}function ob(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function sb(e){return t=>{let n=[...t].sort((t,n)=>e(Nv(t))-e(Nv(n)));return n.some((e,n)=>e!==t[n])?n:t}}var cb=sb(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function lb(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!Ks(n))return sv(e,[iy]);let r=n(e.typeParameters.map(e=>qy(Nv(e))));return r===void 0?e:sv(e,[pv(r,t)])}case`Unknown`:return sv(e,[iy]);case`ObjectKeyword`:return sv(e,[ay]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return ob(e),e.recur(t,Bv);case`Union`:{let n=cb(e.types);return n===e.types?e.recur(t):new H_(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}globalThis.RegExp;var ub=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,`\\$&`);function db(e,t){return t.length>0&&(e+=`\n at ${Gc(t)}`),Error(e)}function fb(e){return`#/$defs/${Xy(e)}`}var pb=new Set([...Oh,yh,...Sh]);function mb(e,t){if(e===void 0)return;let n={},r=e.title;typeof r==`string`&&(n.title=r);let i=e.description,a=e.expected;typeof i==`string`?n.description=i:t?.generateDescriptions===!0&&typeof a==`string`&&(n.description=a);let o=e.default;ny(o)&&(n.default=o);let s=e.examples;Array.isArray(s)&&ny(s)&&(n.examples=s);let c=e.readOnly;typeof c==`boolean`&&(n.readOnly=c);let l=e.writeOnly;typeof l==`boolean`&&(n.writeOnly=l);let u=e.format;typeof u==`string`&&(n.format=u);let d=e.contentEncoding;typeof d==`string`&&(n.contentEncoding=d);let f=e.contentMediaType;typeof f==`string`&&(n.contentMediaType=f);let p=e.contentSchema;if(ny(p)&&(n.contentSchema=p),t?.includeAnnotationKey!==void 0)for(let[r,i]of Object.entries(e))pb.has(r)||!t.includeAnnotationKey(r)||ny(i)&&Pc(n,r,i);return Object.keys(n).length===0?void 0:n}function hb(e){let t=e.type===`number`||e.type===`integer`?e.type:void 0,n=e;if(t!==void 0&&(n={...e},delete n.type),Array.isArray(n.allOf)){let e=[],r=!1;for(let i of n.allOf){let n=hb(i);n.type!==void 0&&(r=!0,(t===void 0||n.type===`integer`)&&(t=n.type)),Object.keys(n.schema).length>0&&e.push(n.schema)}if(r){let{allOf:t,...r}=n;n=e.length===0?r:{...r,allOf:e}}}return{type:t,schema:n}}function gb(e){if(!Array.isArray(e.anyOf)||e.anyOf.length!==2||e.anyOf[0]?.type!==`number`)return!1;let t=e.anyOf[1];return t?.type===`string`&&Array.isArray(t.enum)&&t.enum.length===3&&t.enum.includes(`NaN`)&&t.enum.includes(`Infinity`)&&t.enum.includes(`-Infinity`)}var _b=`|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|`;function vb(e,t){return Object.keys(e).every(e=>t.includes(`|${e}|`))}function yb(e,t){return typeof e.$ref!=`string`&&t.every(t=>!Object.hasOwn(e,t))}var bb=`|title|description|default|examples|readOnly|writeOnly|`,xb=_b+bb;function Sb(e,t,n){if(Object.keys(e).length===0)return t;let r=Object.keys(t);if(r.length===0)return e;let i=e.type===`number`||e.type===`integer`?e.type:void 0,a=gb(e);if(i!==void 0||a){let r=hb(t);if(r.type!==void 0){let t=i===`integer`||r.type===`integer`?`integer`:`number`,o={...e,type:t};a&&delete o.anyOf;let s=Object.keys(r.schema);return s.length===0?o:vb(r.schema,bb)&&yb(o,s)?{...o,...r.schema}:Sb(o,r.schema,n)}}if(n&&yb(e,r))return{...e,...t};let o=Array.isArray(t.allOf)&&r.length===1?t.allOf:[t];return Array.isArray(e.allOf)?{...e,allOf:[...e.allOf,...o]}:typeof e.$ref==`string`?{allOf:[e,...o]}:{...e,allOf:o}}function Cb(e,t=new Set){return typeof e==`boolean`?e:t.has(e)?!0:(t.add(e),e.every(e=>Cb(e,t)))}function wb(e){return Array.isArray(e)}function Tb(e,t,n,r){let i=new Map,a=new Map,o=new WeakMap,s=new Map,c=new Map,l=Object.keys(n);for(let e of l)m(e,[`references`,e]);let u=Gu(e,(e,n)=>v(e,t[n],[]));for(let[e,t]of s.values())if(!Cb(e))for(let e of t)Array.isArray(e.oneOf)&&(e.anyOf=e.oneOf,delete e.oneOf);for(let e of l){let t=n[e],r=g(t);if(r===void 0)continue;let o=i.get(e)[0],s=c.get(r),l=s?.find(e=>yc(i.get(e)[0],o));l===void 0?s===void 0?c.set(r,[e]):s.push(e):a.set(e,l)}let d=Gu(u,h),f={};for(let e of l)a.has(e)||Pc(f,e,h(i.get(e)[0]));return{dialect:`draft-2020-12`,schemas:d,definitions:f};function p(e){return Array.isArray(e.oneOf)&&s.get(e.oneOf)?.[1].push(e),e}function m(e,t){if(!Object.hasOwn(n,e))throw db(`Invalid reference ${e}`,[...t,`$ref`]);let r=i.get(e);if(r!==void 0)return r;let a=[{},[]];return i.set(e,a),a[0]=v(n[e],[`references`,e],a[1]),a}function h(e){return $y(e,e=>{let t=Zy(e);if(t===void 0){if(/^#(?:\/|%2f)/i.test(e))throw Error(`Invalid JSON Pointer URI fragment ${JSON.stringify(e)}`);return e}if(!t.startsWith(`/$defs/`))return e;let n=t.indexOf(`/`,7),r=a.get(Yy(t.slice(7,n<0?void 0:n)));return r===void 0?e:e.replace(/^#(?:\/|%2f).*?(?:\/|%2f).*?(?=\/|%2f|$)/i,fb(r))})}function g(e){if(e._tag===`Reference`)return;let t=e.checks.length===0?e.annotations:e.checks[e.checks.length-1].annotations;return typeof t?.identifier!=`string`&&typeof t?.[`~identifier`]==`string`?t[yh]:void 0}function _(e,t,n,i){let a=e.annotations,o=a?.toJsonSchema;if(o!==void 0){let s=o({type:t,schemas:e.representation?.schemas?.map((e,t)=>v(e,[...n,`representation`,`schemas`,t],i))??[]}),c=wb(s);c&&i.push(!1);let l=c?s[0]:s,u=mb(a,r),d=u===void 0?l:{...l,...u},f=u===void 0?_b:xb;return[d,e._tag===`Filter`&&vb(d,f)&&(u===void 0||vb(u,bb))?!0:void 0]}if(e._tag===`Filter`){i.push(!1);return}let s=e.checks.flatMap((e,r)=>{let a=_(e,t,[...n,`checks`,r],i);return a===void 0?[]:[a[0]]});if(s.length===0)return;let c=mb(a,r),l={allOf:s};return[c===void 0?l:{...l,...c}]}function v(e,t,n){if(e._tag===`Reference`)return n.push(m(e.$ref,t)[1]),{$ref:fb(e.$ref)};let i=o.get(e);if(i!==void 0)return n.push(i[1]),i[0];let a=[];n.push(a);let s=y(e,t,a),c=mb(e.annotations,r);c!==void 0&&(s={...s,...c});for(let n=0;n<e.checks.length;n++){let r=typeof s.type==`string`&&Eb(s.type)?s.type:void 0,i=_(e.checks[n],r,[...t,`checks`,n],a);i!==void 0&&(s=Sb(s,...i))}return o.set(e,[s,a]),p(s)}function y(e,t,n){switch(e._tag){case`Any`:case`Unknown`:return{};case`ObjectKeyword`:return{anyOf:[{type:`object`},{type:`array`}]};case`Void`:case`Undefined`:case`Null`:return{type:`null`};case`BigInt`:return{type:`string`,allOf:[{pattern:`^-?\\d+$`}]};case`Symbol`:return{type:`string`,allOf:[{pattern:`^Symbol\\(([\\s\\S]*)\\)$`}]};case`UniqueSymbol`:return globalThis.Symbol.keyFor(e.symbol)===void 0?{not:{}}:{type:`string`,enum:[globalThis.String(e.symbol)]};case`Declaration`:return n.push(!1),{};case`Suspend`:return v(e.thunk,[...t,`thunk`],n);case`Never`:return{not:{}};case`String`:return{type:`string`};case`Number`:return{anyOf:[{type:`number`},{type:`string`,enum:[`NaN`,`Infinity`,`-Infinity`]}]};case`Boolean`:return{type:`boolean`};case`Literal`:{let t=e.literal;return typeof t==`bigint`?{type:`string`,enum:[globalThis.String(t)]}:{type:typeof t,enum:[t]}}case`Enum`:{let n=e.enums.map(([e,n],r)=>{if(typeof n==`number`&&!globalThis.Number.isFinite(n))throw db(`Invalid numeric enum value ${globalThis.String(n)}`,[...t,`enums`,r,1]);return{type:typeof n,enum:[n],title:e}});return n.length===0?{not:{}}:{anyOf:n}}case`TemplateLiteral`:return{type:`string`,pattern:`^${e.parts.map(Ob).join(``)}$`};case`Arrays`:{if(e.rest.length>1)throw db(`Invalid schema representation document`,[...t,`rest`]);let i={type:`array`},a=e.elements.length,o=e.elements.map((e,i)=>{e.isOptional&&a--;let o=v(e.type,[...t,`elements`,i,`type`],n),s=mb(e.annotations,r);return s===void 0?o:p(Sb(o,s))});if(o.length>0?(i.prefixItems=o,i.maxItems=e.elements.length,a>0&&(i.minItems=a)):i.items=!1,e.rest.length===1){delete i.maxItems;let r=v(e.rest[0],[...t,`rest`,0],n);Object.keys(r).length>0?i.items=r:delete i.items}return i}case`Objects`:{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return{not:{type:`null`}};let i={type:`object`},a={},o=[];for(let i=0;i<e.propertySignatures.length;i++){let s=e.propertySignatures[i];if(typeof s.name!=`string`)throw db(`Invalid schema representation document`,[...t,`propertySignatures`,i,`name`]);let c=s.name,l=v(s.type,[...t,`propertySignatures`,i,`type`],n),u=mb(s.annotations,r);Pc(a,c,u===void 0?l:p(Sb(l,u))),s.isOptional||o.push(c)}e.propertySignatures.length>0&&(i.properties=a),o.length>0&&(i.required=o);let s={},c=[],l=[],u=!1;for(let r=0;r<e.indexSignatures.length;r++){let i=e.indexSignatures[r],a=v(i.type,[...t,`indexSignatures`,r,`type`],n);yc(a,{not:{}})&&(a=!1),l.push(a);let o=b(i.parameter,[...t,`indexSignatures`,r,`parameter`],new Set);if(o===void 0){u=!0,n.push(!1);continue}if(o.length===0)c.push(a);else for(let e of o){let t=s[e];Pc(s,e,t===void 0?a:t===!1||a===!1?!1:p(Sb(t,a)))}}let d=Object.keys(s).length>0;if(d&&(i.patternProperties=s),u&&r?.onExcessProperty===`error`){let r=[];e.propertySignatures.length>0&&r.push({enum:Object.keys(a)});for(let i=0;i<e.indexSignatures.length;i++)r.push(v(e.indexSignatures[i].parameter,[...t,`indexSignatures`,i,`parameter`],n));i.propertyNames=r.length===1?r[0]:{anyOf:r},i.additionalProperties=l.length===1?l[0]:{anyOf:l},c.length>0&&(i.allOf=c.map(e=>({type:`object`,additionalProperties:e})))}else c.length===0?i.additionalProperties=u||r?.onExcessProperty!==`error`:c.length===1&&e.propertySignatures.length===0&&!d?i.additionalProperties=c[0]:c.length>0&&(i.allOf=c.map(e=>({type:`object`,additionalProperties:e})));return typeof i.additionalProperties==`object`&&i.additionalProperties!==null&&Object.keys(i.additionalProperties).length===0&&delete i.additionalProperties,i}case`Union`:{let r=[],i=e.types.map((e,n)=>v(e,[...t,`types`,n],r));if(n.push(r),i.length===0)return{not:{}};let a=e.options?.mode??`anyOf`;if(a===`anyOf`&&i.length>1){let e=Db(i);if(e!==void 0)return e}return a===`oneOf`&&s.set(i,[r,[]]),{[a]:i}}}}function b(e,t,r){switch(e._tag){case`Reference`:{if(!Object.hasOwn(n,e.$ref))throw db(`Invalid reference ${e.$ref}`,[...t,`$ref`]);if(m(e.$ref,t),r.has(e.$ref))return;let i=new Set(r).add(e.$ref);return b(n[e.$ref],[`references`,e.$ref],i)}case`String`:{if(e.checks.length===0)return[];if(e.checks.length!==1||e.checks[0]._tag!==`Filter`||e.checks[0].annotations?.toJsonSchema===void 0)return;let n=[],r=v(e,t,n);return Cb(n)&&r.type===`string`&&typeof r.pattern==`string`&&vb(r,`|type|pattern|title|description|default|examples|readOnly|writeOnly|`)?[r.pattern]:void 0}case`TemplateLiteral`:return e.checks.length===0?[`^${e.parts.map(Ob).join(``)}$`]:void 0;case`Union`:{if(e.types.length===0||e.checks.length>0||e.options?.mode===`oneOf`)return;let n=[];for(let i=0;i<e.types.length;i++){let a=b(e.types[i],[...t,`types`,i],r);if(a===void 0)return;if(a.length===0)return[];n.push(...a)}return n}default:throw db(`Invalid schema representation document`,t)}}}function Eb(e){return e===`string`||e===`number`||e===`boolean`||e===`array`||e===`object`||e===`null`||e===`integer`}function Db(e){let t,n=[];for(let r of e){if(Object.keys(r).length!==2||r.type===void 0||!Array.isArray(r.enum)||r.enum.length===0)return;if(t===void 0)t=r.type;else if(r.type!==t)return;for(let e of r.enum){if(n.includes(e))return;n.push(e)}}return{type:t,enum:n}}function Ob(e){switch(e._tag){case`Literal`:return ub(globalThis.String(e.literal));case`String`:return Vv;case`Number`:return v_;case`TemplateLiteral`:return e.parts.map(Ob).join(``);case`Union`:return`(?:${e.types.map(Ob).join(`|`)})`;default:throw db(`Invalid schema representation document`,[])}}function kb(e,t){let n=Tb([e.representation],[[`representation`]],e.references,t);return{dialect:n.dialect,schema:n.schemas[0],definitions:n.definitions}}var Ab=({identifier:e})=>e;function jb(e){return e===void 0?void 0:{annotations:e}}function Mb(e,t){let{references:n,representations:r}=Nb([e],t);return{representation:r[0],references:n}}function Nb(e,t){let n={},r=new Map,i=new Set,a=new Map,o=new Set;for(let t of e)f(t);let s=t?.referencePolicy??Ab;for(let e of a.values())for(let t of e.values()){let e=s({ast:t.ast,occurrences:t.occurrences,identifier:t.identifier});e===void 0?t.isRecursive&&(t.reference=c(`${t.ast._tag}_`,t,``)):t.reference=c(e,t,e===t.identifier||!e.endsWith(`_`)?`_`:``)}return{representations:Gu(e,e=>m(e)),references:n};function c(e,t,n=`_`){let i=e,a=0;for(;r.has(i);){if(r.get(i)===t)return i;i=`${e}${n}${++a}`}return r.set(i,t),i}function l(e,t,n){let r=t.fallback;return r===void 0?n===t.identifier?e:uv(e,{identifier:n}):wh(e)===r?e:uv(e,{[yh]:r})}function u(e,t){if(!Object.hasOwn(n,e)&&!i.has(e)){i.add(e);let r=h(t);i.delete(e),Pc(n,e,r)}return{_tag:`Reference`,$ref:e}}function d(e){let t=lv(e),n=ov(t),r=Ch(t),i=r===void 0?(t===e?void 0:Ch(e))??wh(t):void 0;i!==void 0&&(r=`${i}Encoded`);let o=a.get(n);o===void 0&&(o=new Map,a.set(n,o));let s=o.get(r);return s===void 0&&(s={ast:n,identifier:r,fallback:i,occurrences:0,isRecursive:!1,reference:void 0},o.set(r,s)),s}function f(e){let t=d(e),n=t.ast;if(t.occurrences++,o.has(t)){t.isRecursive=!0;return}if(!(t.occurrences>1)){switch(o.add(t),p(n.checks),n._tag){case`Declaration`:case`Arrays`:case`Objects`:case`Union`:n.recur(e=>(f(e),e));break;case`TemplateLiteral`:n.parts.forEach(f);break;case`Suspend`:f(n.thunk())}o.delete(t)}}function p(e){e?.forEach(e=>{e.annotations?.representation?.schemas?.forEach(e=>f(Mv(e))),e._tag===`FilterGroup`&&p(e.checks)})}function m(e){let t=d(e),n=t.ast,r=t.reference;return r===void 0?h(n):u(r,t.identifier===void 0?n:l(n,t,r))}function h(e){let t=g(e.checks);switch(e._tag){case`Declaration`:return{_tag:`Declaration`,typeParameters:e.typeParameters.map(e=>m(e)),checks:t,...v(e.annotations)};case`Null`:case`Undefined`:case`Void`:case`Never`:case`Unknown`:case`Any`:case`String`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`ObjectKeyword`:return{_tag:e._tag,checks:t,...jb(e.annotations)};case`Literal`:return{_tag:`Literal`,literal:e.literal,checks:t,...jb(e.annotations)};case`UniqueSymbol`:return{_tag:`UniqueSymbol`,symbol:e.symbol,checks:t,...jb(e.annotations)};case`Enum`:return{_tag:`Enum`,enums:e.enums,checks:t,...jb(e.annotations)};case`TemplateLiteral`:return{_tag:`TemplateLiteral`,parts:e.parts.map(e=>m(e)),checks:t,...jb(e.annotations)};case`Arrays`:return{_tag:`Arrays`,elements:e.elements.map(e=>{let t=lv(e),n=t.context?.annotations;return{isOptional:Dv(t),type:m(e),...jb(n)}}),rest:e.rest.map(e=>m(e)),checks:t,...jb(e.annotations)};case`Objects`:return{_tag:`Objects`,propertySignatures:e.propertySignatures.map(e=>{let t=lv(e.type),n=t.context?.annotations;return{name:e.name,type:m(e.type),isOptional:Dv(t),isMutable:Ov(t),...jb(n)}}),indexSignatures:e.indexSignatures.map(e=>({parameter:m(e.parameter),type:m(e.type)})),checks:t,...jb(e.annotations)};case`Union`:return{_tag:`Union`,types:e.types.map(e=>m(e)),...e.options===void 0?{}:{options:e.options},checks:t,...jb(e.annotations)};case`Suspend`:return{_tag:`Suspend`,checks:[],thunk:m(e.thunk()),...jb(e.annotations)}}}function g(e){return e?.map(_)??[]}function _(e){switch(e._tag){case`Filter`:return{_tag:`Filter`,aborted:e.aborted,...y(e.annotations)};case`FilterGroup`:return{_tag:`FilterGroup`,checks:Gu(e.checks,_),...y(e.annotations)}}}function v(e){if(e===void 0)return;let{representation:t,...n}=e;return{...t===void 0?void 0:{representation:t},...Object.keys(n).length===0?void 0:{annotations:n}}}function y(e){if(e===void 0)return;let{representation:t,...n}=e,r=t===void 0?void 0:t.schemas===void 0?t:{...t,schemas:t.schemas.map(e=>m(Mv(e)))};return{...r===void 0?void 0:{representation:r},...Object.keys(n).length===0?void 0:{annotations:n}}}}function Pb(e){return Nm(e)?e.value:{issues:[{message:Om(e.cause)}]}}function Fb(e,t){let n=ky(e),r={errors:`all`,...t?.parseOptions},i=$h(t),a=e=>{let t=new Tf(`sync`),a=Zm(Xm(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Pb(o):new Promise(e=>{a.addObserver(t=>{e(Pb(t))})})};if(Object.hasOwn(e,`~standard`)){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}var Ib=e=>e,Lb=`~effect/Schema/SchemaError`;function Rb(e){return Qs(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}function zb(){return(e,t,n)=>$b(new $g(e.map(M_),e=>t(e.map(e=>$b(e))),n))}function Bb(e,t){return zb()([],()=>(t,n,r)=>e(t)?Bm(t):Hm(new Wh(n,t,r)),t)}var Vb=class extends kf(`SchemaError`){[Lb]=Lb;constructor(e){let t=tl();nl(0);try{super({issue:e})}finally{nl(t)}}get message(){return og(this.issue)}toString(){return`SchemaError(${this.message})`}};function Hb(e){return Rb(e)}function Ub(e){return Up(e)?Wb(e):Ym(e,e=>Um(()=>Dm(e,e=>new Vb(e))))}function Wb(e){return Nm(e)?e:Am(Dm(e.cause,e=>new Vb(e)))}function Gb(e,t){let n;for(let r of e.reasons){if(!Tm(r)||!Hb(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Kb(e){let t=Qm(e);if(Nm(t))return t.value;throw Gb(t.cause,`Sync adapter can only throw schema errors`)}function qb(e,t){return Fb(e,t)}var Jb=Ey;function Yb(e,t){let n=ky(e,t);return(e,t)=>Ub(n(e,t))}var Xb=Ay;function Zb(e,t){let n=jy(e,t);return(e,t)=>Ru(n(e,t),e=>new Vb(e))}function Qb(e,t){let n=Yb(e,t);return(e,t)=>Kb(n(e,t))}var $b=qy,ex=Ib(e=>$b(xv(e.ast),{schema:e})),H=Ib(e=>{let t=fx(e);return $b(Cv(e.ast),{schema:t})});function U(e){let t=$b(new a_(e),{literal:e,transform(n){return t.pipe(mx(U(n),{decode:mg(()=>n),encode:mg(()=>e)}))}});return t}var tx=$b(i_),nx=$b(e_),rx=$b(r_),ix=$b(s_),ax=$b(u_),W=$b(d_);function ox(e,t){return $b(e,{fields:t,mapFields(e,t){let n=e(this.fields);return ox(j_(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function G(e){return ox(j_(e,void 0),e)}function sx(e,t){return $b(Ev(e.ast,t.ast),{key:e,value:t})}var cx=Ib(e=>$b(new f_(!1,[],[e.ast]),{value:e}));function lx(e,t){return $b(e,{members:t,mapMembers(e,t){let n=e(this.members);return lx(N_(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function ux(e,t){return lx(N_(e,t,void 0),e)}function K(e){let t=e.map(U);return $b(N_(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return ux(e(this.members))},pick(e){return K(e)},transform(e){return ux(t.map((t,n)=>t.transform(e[n])))}})}var dx=Ib(e=>ux([e,nx])),fx=Ib(e=>ux([e,rx]));function q(...e){return t=>t.check(...e)}function px(e){return t=>$b(t.ast,{schema:t,identifier:e})}function mx(e,t){return n=>$b(wv(n.ast,e.ast,t?Dg(t):Ag()),{from:n,to:e})}function hx(e,t){return Bb(t=>t instanceof e,t)}function gx(){return(e,t)=>new Jg(e.ast,Dg(t))}var _x=$_,vx=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function yx(e){let t=new globalThis.RegExp(vx);return _x(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:vx,flags:``}]},...e})}function bx(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${R(n)})`:`new RegExp(${R(n)}, ${R(r)})`;return rv(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}var xx=$b(tv),Sx=ev;function Cx(e){let t=xu(e.order),n=e.formatter??R;return(r,i)=>_x(e=>t(e,r),{expected:`a value greater than ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r,exclusiveMinimum:!0},...e.annotate?.(r),...i})}function wx(e){let t=Cu(e.order),n=e.formatter??R;return(r,i)=>_x(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Tx(e){let t=Su(e.order),n=e.formatter??R;return(r,i)=>_x(e=>t(e,r),{expected:`a value less than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r},...e.annotate?.(r),...i})}function Ex(e){let t=Cu(e.order),n=xu(e.order),r=Su(e.order),i=bu(e.order),a=e.formatter??R;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return _x(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function Dx(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${R(e)}`);return e}var Ox=Cx({order:yu,annotate:e=>({representation:{id:`effect/schema/isGreaterThan`,payload:{exclusiveMinimum:Dx(e)}},toJsonSchema:()=>({exclusiveMinimum:e}),toCode:()=>({runtime:`Schema.isGreaterThan(${R(e)})`})})}),kx=wx({order:yu,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:Dx(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${R(e)})`})})}),Ax=Tx({order:yu,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:Dx(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${R(e)})`})})}),jx=Ex({order:yu,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:Dx(e.minimum),maximum:Dx(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${R(e.minimum)}, maximum: ${R(e.maximum)}, exclusiveMinimum: ${R(t)}, exclusiveMaximum: ${R(n)} })`})}}});function Mx(e){return _x(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>[{type:`integer`},!0],toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Nx=ax.check(Mx());function Px(e,t){return e=Rx(e),Fx(e,Math.ceil(e/2),t)}function Fx(e,t,n){return _x(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[vh]:!0,arbitraryConstraint:{minLength:e},...n})}function Ix(e){return Fx(1,1,e)}function Lx(e,t){return e=Rx(e),_x(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[vh]:!0,arbitraryConstraint:{maxLength:e},...t})}function Rx(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var zx=ix.check(Ix());globalThis.RegExp,globalThis.URL;var Bx=ix.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function Vx(e,t){return Bx.pipe(mx(e,Ng(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var Hx=ix.check(yx()),Ux=ix.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(mx(Hx,Og())),Wx=ix.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),Gx=hx(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>gx()(Wx,Mg)});function Kx(e,t){return kb(Mb(ib(e.ast),t),t)}var qx=ix.pipe(q(Px(1)),q(Lx(80))),Jx=[`InferenceUpstreamError`,`AiInternalError`,`TypeError`,`AbortError`,`TimeoutError`,`Error`],Yx=[`credits_exhausted`,`content_refused`,`invalid_input`,`rate_limited`,`provider_unavailable`,`timeout`,`spending_limit`],Xx={minimum:0,maximum:99999},Zx={minimum:0,maximum:599},Qx=ux([G({category:K(Jx),code:dx(Nx.check(jx(Xx))),reason:ex(K(Yx)),detail:ex(ix.check(Lx(160)))}),G({category:U(`result_download`),status:Nx.check(jx(Zx))})]);oo([ro({category:_o(Jx),code:Va().int().min(Xx.minimum).max(Xx.maximum).nullable(),reason:_o(Yx).optional(),detail:_a().max(160).optional()}),ro({category:yo(`result_download`),status:Va().int().min(Zx.minimum).max(Zx.maximum)})]);var $x=[`CANCELLED`,`CAPABILITY_DENIED`,`CAPABILITY_REVOKED`,`COMMAND_NOT_DECLARED`,`CONFLICT`,`DAILY_LIMIT_REACHED`,`DELIVERY_PENDING`,`DISCONNECTED`,`FILE_TOO_LARGE`,`HOST_FAILURE`,`IDENTITY`,`INSUFFICIENT_CREDIT`,`INVALID_ARGUMENT`,`MEDIA_PROVIDER_FAILURE`,`MEDIA_PROVIDER_FAILURE_UNCHARGED`,`PROTOCOL`,`SAFETY_FILTER_REFUSED`,`SELECTION_CHANGED`,`SETUP_REQUIRED`,`TIMEOUT`],eS=G({name:U(`AppError`),code:K($x),retryable:W,need:H(ix)}),J=class extends Error{code;retryable;need;constructor(e,t){super(e,{cause:t.cause}),this.name=`AppError`,this.code=t.code,this.retryable=t.retryable,this.need=t.need}};function tS(e){return Mu(Xb(qx)(e))}function nS(e){return`This needs ${e??`setup`} first.`}var rS={CANCELLED:{title:`Request cancelled`,message:`It stopped before it finished. Start it again if you still want it.`},CAPABILITY_DENIED:{title:`Access needed`,message:`This App needs permission to do that.`,action:`grant`},CAPABILITY_REVOKED:{title:`Access changed`,message:`This App no longer has permission to do that.`,action:`grant`},COMMAND_NOT_DECLARED:{title:`Action unavailable`,message:`This App doesn't include that action. It may need an update.`},CONFLICT:{title:`File changed`,message:`This file changed elsewhere. Review it before saving again.`},DAILY_LIMIT_REACHED:{title:`Daily limit reached`,message:`Today's spending limit for this Oyster is used up. It resets at 00:00 UTC.`},DELIVERY_PENDING:{title:`App delivery pending`,message:`The App hasn't finished getting ready. Try opening it again.`},DISCONNECTED:{title:`Connection lost`,message:`Reopen the App to connect again.`,action:`reconnect`},HOST_FAILURE:{title:`Couldn't complete the request`,message:`The host stopped answering. Reopen the App or reload the workspace.`},FILE_TOO_LARGE:{title:`File too large`,message:`Choose a file within the supported size limit.`},IDENTITY:{title:`Couldn't connect`,message:`Reopen the App to connect again.`,action:`reconnect`},INSUFFICIENT_CREDIT:{title:`Something went wrong`,message:`The App couldn't complete this request.`,action:`billing`},INVALID_ARGUMENT:{title:`Request not accepted`,message:`Some of the details weren't usable. Check them and try again.`},MEDIA_PROVIDER_FAILURE:{title:`Generation failed`,message:`The model couldn't complete this generation. Change the prompt or model and send again.`},MEDIA_PROVIDER_FAILURE_UNCHARGED:{title:`Generation failed`,message:`The model couldn't complete this generation. You weren't charged. Change the prompt or model and send again.`},PROTOCOL:{title:`Couldn't read the response`,message:`The host sent something this App doesn't understand. Reload the workspace; if it keeps happening, the App may need an update.`},SAFETY_FILTER_REFUSED:{title:`Generation refused`,message:`The model refused this generation. Change the prompt or reference image and send again.`},SELECTION_CHANGED:{title:`Selection changed`,message:`The selection changed during this request. Reopen the App to continue.`,action:`reconnect`},SETUP_REQUIRED:{title:`Setup needed`,message:nS(void 0),action:`setup`},TIMEOUT:{title:`Still waiting`,message:`The request didn't respond in time. Its outcome isn't known yet.`},UNKNOWN:{title:`Something went wrong`,message:`The App couldn't complete this request.`}};function iS(e,t){let n=Xb(eS)(e);if(Eu(n))return{...rS.UNKNOWN,retryable:!1};let r=n.value,i=rS[r.code],a=t?.[r.code]??(r.code===`SETUP_REQUIRED`?{title:i.title,message:nS(tS(r.need))}:i),o=i.action??(r.retryable?`retry`:void 0),s={title:a.title,message:a.message,retryable:r.retryable};return o?{...s,action:o}:s}var aS=t((e=>{var t=i(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),a=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var i,c={},l=null,u=null;for(i in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)a.call(t,i)&&!s.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)c[i]===void 0&&(c[i]=t[i]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:o.current}}e.Fragment=r,e.jsx=c,e.jsxs=c})),oS=t(((e,t)=>{t.exports=aS()})),Y=oS(),sS=F.createContext(void 0),cS=e=>{let t=F.useContext(sS);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},lS=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Y.jsx)(sS.Provider,{value:e,children:t})),uS={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dS=new class{#e=uS;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function fS(e){setTimeout(e,0)}var pS=typeof window>`u`||`Deno`in globalThis;function mS(){}function hS(e,t){return typeof e==`function`?e(t):e}function gS(e){return typeof e==`number`&&e>=0&&e!==1/0}function _S(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vS(e,t){return typeof e==`function`?e(t):e}function yS(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==xS(o,t.options))return!1}else if(!CS(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function bS(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(SS(t.options.mutationKey)!==SS(a))return!1}else if(!CS(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xS(e,t){return(t?.queryKeyHashFn||SS)(e)}function SS(e){return JSON.stringify(e,(e,t)=>OS(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function CS(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!CS(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!CS(e[r],t[r]))return!1;return!0}return!1}var wS=Object.prototype.hasOwnProperty;function TS(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=DS(e)&&DS(t);if(!r&&!(OS(e)&&OS(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:wS.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=TS(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ES(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function DS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function OS(e){if(!kS(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!kS(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function kS(e){return Object.prototype.toString.call(e)===`[object Object]`}function AS(e){return new Promise(t=>{dS.setTimeout(t,e)})}function jS(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:TS(e,t)}function MS(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function NS(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var PS=Symbol();function FS(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===PS?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function IS(e,t){return typeof e==`function`?e(...t):!!e}function LS(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var RS=()=>pS,zS=()=>RS(),BS=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},VS=new class extends BS{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},HS=fS;function US(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=HS,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var WS=US(),GS=new class extends BS{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function KS(e){return Math.min(1e3*2**e,3e4)}function qS(e){return(e??`online`)!==`online`||GS.isOnline()}var JS=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function YS(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(mS);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new JS(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>VS.isFocused()&&(e.networkMode===`always`||GS.isOnline())&&e.canRun(),p=()=>qS(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(zS()?0:3),a=e.retryDelay??KS,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),AS(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var XS=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gS(this.gcTime)&&(this.#e=dS.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zS()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(dS.clearTimeout(this.#e),this.#e=void 0)}},ZS=class extends XS{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||QS(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=YS({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),WS.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function QS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var $S=class extends BS{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ES(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&SS(t.mutationKey)!==SS(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??QS();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){WS.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function eC(e,t){let n=cS(t),[r]=F.useState(()=>new $S(n,e));F.useEffect(()=>{r.setOptions(e)},[r,e]);let i=F.useSyncExternalStore(F.useCallback(e=>r.subscribe(WS.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=F.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(mS)},[r]);if(i.error&&IS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var tC=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m){if(n(c)!==null)m=!0,re(ee);else{var t=n(l);t!==null&&ie(b,t.startTime-e)}}}function ee(t,i){m=!1,h&&(h=!1,_(C),C=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ie(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var x=!1,S=null,C=-1,te=5,w=-1;function T(){return!(e.unstable_now()-w<te)}function ne(){if(S!==null){var t=e.unstable_now();w=t;var n=!0;try{n=S(!0,t)}finally{n?E():(x=!1,S=null)}}else x=!1}var E;if(typeof v==`function`)E=function(){v(ne)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,O=D.port2;D.port1.onmessage=ne,E=function(){O.postMessage(null)}}else E=function(){g(ne,0)};function re(e){S=e,x||(x=!0,E())}function ie(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,re(ee))},e.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`):te=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(C),C=-1):h=!0,ie(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,re(ee))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),nC=t(((e,t)=>{t.exports=tC()})),rC=t((e=>{var t=i(),n=nC();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var a=new Set,o={};function s(e,t){c(e,t),c(e+`Capture`,t)}function c(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var l=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function m(e){return u.call(p,e)?!0:u.call(f,e)?!1:d.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(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){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(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(y,b);v[t]=new _(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(y,b);v[t]=new _(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(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function ee(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for(`react.element`),C=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),w=Symbol.for(`react.strict_mode`),T=Symbol.for(`react.profiler`),ne=Symbol.for(`react.provider`),E=Symbol.for(`react.context`),D=Symbol.for(`react.forward_ref`),O=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),k=Symbol.for(`react.lazy`),ae=Symbol.for(`react.offscreen`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Object.assign,ce;function le(e){if(ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ce=t&&t[1]||``}return`
|
|
77
|
-
`+ce+e}var ue=!1;function de(e,t){if(!e||ue)return``;ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
78
|
-
`),a=r.stack.split(`
|
|
79
|
-
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
80
|
-
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?le(e):``}function fe(e){switch(e.tag){case 5:return le(e.type);case 16:return le(`Lazy`);case 13:return le(`Suspense`);case 19:return le(`SuspenseList`);case 0:case 2:case 15:return e=de(e.type,!1),e;case 11:return e=de(e.type.render,!1),e;case 1:return e=de(e.type,!0),e;default:return``}}function pe(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 te:return`Fragment`;case C:return`Portal`;case T:return`Profiler`;case w:return`StrictMode`;case O:return`Suspense`;case re:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case E:return(e.displayName||`Context`)+`.Consumer`;case ne:return(e._context.displayName||`Context`)+`.Provider`;case D:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case k:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function me(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`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return pe(t);case 8:return t===w?`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 he(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ge(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function _e(e){var t=ge(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ve(e){e._valueTracker||=_e(e)}function ye(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ge(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function be(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function xe(e,t){var n=t.checked;return A({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Se(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=he(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Ce(e,t){t=t.checked,t!=null&&ee(e,`checked`,t,!1)}function we(e,t){Ce(e,t);var n=he(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ee(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ee(e,t.type,he(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Te(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ee(e,t,n){(t!==`number`||be(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var De=Array.isArray;function Oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+he(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ke(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return A({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(De(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:he(n)}}function je(e,t){var n=he(t.value),r=he(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ne(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 Pe(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ne(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Fe,Ie=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Fe||=document.createElement(`div`),Fe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Re={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},ze=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Re).forEach(function(e){ze.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Re[t]=Re[e]})});function Be(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Re.hasOwnProperty(e)&&Re[e]?(``+t).trim():t+`px`}function Ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Be(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var He=A({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 Ue(e,t){if(t){if(He[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function We(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 Ge=null;function Ke(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qe=null,Je=null,Ye=null;function Xe(e){if(e=Yi(e)){if(typeof qe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Zi(t),qe(e.stateNode,e.type,t))}}function Ze(e){Je?Ye?Ye.push(e):Ye=[e]:Je=e}function Qe(){if(Je){var e=Je,t=Ye;if(Ye=Je=null,Xe(e),t)for(e=0;e<t.length;e++)Xe(t[e])}}function $e(e,t){return e(t)}function et(){}var tt=!1;function nt(e,t,n){if(tt)return e(t,n);tt=!0;try{return $e(e,t,n)}finally{tt=!1,(Je!==null||Ye!==null)&&(et(),Qe())}}function rt(e,t){var n=e.stateNode;if(n===null)return null;var i=Zi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var it=!1;if(l)try{var at={};Object.defineProperty(at,"passive",{get:function(){it=!0}}),window.addEventListener(`test`,at,at),window.removeEventListener(`test`,at,at)}catch{it=!1}function ot(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var st=!1,ct=null,lt=!1,ut=null,dt={onError:function(e){st=!0,ct=e}};function ft(e,t,n,r,i,a,o,s,c){st=!1,ct=null,ot.apply(dt,arguments)}function pt(e,t,n,i,a,o,s,c,l){if(ft.apply(this,arguments),st){if(st){var u=ct;st=!1,ct=null}else throw Error(r(198));lt||(lt=!0,ut=u)}}function mt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ht(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 gt(e){if(mt(e)!==e)throw Error(r(188))}function _t(e){var t=e.alternate;if(!t){if(t=mt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return gt(a),e;if(o===i)return gt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function vt(e){return e=_t(e),e===null?null:yt(e)}function yt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=yt(e);if(t!==null)return t;e=e.sibling}return null}var bt=n.unstable_scheduleCallback,xt=n.unstable_cancelCallback,St=n.unstable_shouldYield,Ct=n.unstable_requestPaint,wt=n.unstable_now,Tt=n.unstable_getCurrentPriorityLevel,Et=n.unstable_ImmediatePriority,Dt=n.unstable_UserBlockingPriority,Ot=n.unstable_NormalPriority,kt=n.unstable_LowPriority,At=n.unstable_IdlePriority,jt=null,Mt=null;function Nt(e){if(Mt&&typeof Mt.onCommitFiberRoot==`function`)try{Mt.onCommitFiberRoot(jt,e,void 0,(e.current.flags&128)==128)}catch{}}var Pt=Math.clz32?Math.clz32:It,j=Math.log,Ft=Math.LN2;function It(e){return e>>>=0,e===0?32:31-(j(e)/Ft|0)|0}var Lt=64,Rt=4194304;function zt(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 Bt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=zt(a))):r=zt(s)}else o=n&~i,o===0?a!==0&&(r=zt(a)):r=zt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Pt(t),i=1<<n,r|=e[n],t&=~i;return r}function Vt(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 Ht(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Pt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Vt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ut(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Wt(){var e=Lt;return Lt<<=1,!(Lt&4194240)&&(Lt=64),e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pt(t),e[t]=n}function qt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Pt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Jt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Yt=0;function Xt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zt,Qt,$t,en,tn,nn=!1,rn=[],an=null,on=null,sn=null,cn=new Map,ln=new Map,un=[],dn=`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 fn(e,t){switch(e){case`focusin`:case`focusout`:an=null;break;case`dragenter`:case`dragleave`:on=null;break;case`mouseover`:case`mouseout`:sn=null;break;case`pointerover`:case`pointerout`:cn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:ln.delete(t.pointerId)}}function pn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Yi(t),t!==null&&Qt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function mn(e,t,n,r,i){switch(t){case`focusin`:return an=pn(an,e,t,n,r,i),!0;case`dragenter`:return on=pn(on,e,t,n,r,i),!0;case`mouseover`:return sn=pn(sn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return cn.set(a,pn(cn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,ln.set(a,pn(ln.get(a)||null,e,t,n,r,i)),!0}return!1}function hn(e){var t=Ji(e.target);if(t!==null){var n=mt(t);if(n!==null){if(t=n.tag,t===13){if(t=ht(n),t!==null){e.blockedOn=t,tn(e.priority,function(){$t(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ge=r,n.target.dispatchEvent(r),Ge=null}else return t=Yi(n),t!==null&&Qt(t),e.blockedOn=n,!1;t.shift()}return!0}function _n(e,t,n){gn(e)&&n.delete(t)}function vn(){nn=!1,an!==null&&gn(an)&&(an=null),on!==null&&gn(on)&&(on=null),sn!==null&&gn(sn)&&(sn=null),cn.forEach(_n),ln.forEach(_n)}function yn(e,t){e.blockedOn===t&&(e.blockedOn=null,nn||(nn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vn)))}function bn(e){function t(t){return yn(t,e)}if(0<rn.length){yn(rn[0],e);for(var n=1;n<rn.length;n++){var r=rn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(an!==null&&yn(an,e),on!==null&&yn(on,e),sn!==null&&yn(sn,e),cn.forEach(t),ln.forEach(t),n=0;n<un.length;n++)r=un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<un.length&&(n=un[0],n.blockedOn===null);)hn(n),n.blockedOn===null&&un.shift()}var xn=x.ReactCurrentBatchConfig,Sn=!0;function Cn(e,t,n,r){var i=Yt,a=xn.transition;xn.transition=null;try{Yt=1,Tn(e,t,n,r)}finally{Yt=i,xn.transition=a}}function wn(e,t,n,r){var i=Yt,a=xn.transition;xn.transition=null;try{Yt=4,Tn(e,t,n,r)}finally{Yt=i,xn.transition=a}}function Tn(e,t,n,r){if(Sn){var i=Dn(e,t,n,r);if(i===null)bi(e,t,r,En,n),fn(e,r);else if(mn(i,e,t,n,r))r.stopPropagation();else if(fn(e,r),t&4&&-1<dn.indexOf(e)){for(;i!==null;){var a=Yi(i);if(a!==null&&Zt(a),a=Dn(e,t,n,r),a===null&&bi(e,t,r,En,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else bi(e,t,r,null,n)}}var En=null;function Dn(e,t,n,r){if(En=null,e=Ke(r),e=Ji(e),e!==null){if(t=mt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ht(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}return En=e,null}function On(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(Tt()){case Et:return 1;case Dt:return 4;case Ot:case kt:return 16;case At:return 536870912;default:return 16}default:return 16}}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Pn:Fn,this.isPropagationStopped=Fn,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=A({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=A({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(A({},Wn,{dataTransfer:0})),qn=In(A({},zn,{relatedTarget:0})),Jn=In(A({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(A({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(A({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(A({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(A({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(A({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),ar=In(A({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=In(A({},Wn,{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})),sr=[9,13,27,32],cr=l&&`CompositionEvent`in window,lr=null;l&&`documentMode`in document&&(lr=document.documentMode);var ur=l&&`TextEvent`in window&&!lr,dr=l&&(!cr||lr&&8<lr&&11>=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=Mn(),jn=An=kn=null,gr=!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 dr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={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 br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){Ze(r),t=Si(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){hi(e,0)}function Tr(e){if(ye(Xi(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(l){var Or;if(l){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,Ke(e)),nt(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vr(e,t){var n=Br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Br(n)}}function Hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ur(){for(var e=window,t=be();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=be(e.document)}return t}function Wr(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 Gr(e){var t=Ur(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hr(n.ownerDocument.documentElement,n)){if(r!==null&&Wr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Vr(n,a);var o=Vr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Kr=l&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==be(r)||(r=qr,`selectionStart`in r&&Wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Yr&&zr(Yr,r)||(Yr=r,r=Si(Jr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};l&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionend`),si=new Map,ci=`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 li(e,t){si.set(e,t),s(t,[e])}for(var ui=0;ui<ci.length;ui++){var di=ci[ui];li(di.toLowerCase(),`on`+(di[0].toUpperCase()+di.slice(1)))}li(ri,`onAnimationEnd`),li(ii,`onAnimationIteration`),li(ai,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(oi,`onTransitionEnd`),c(`onMouseEnter`,[`mouseout`,`mouseover`]),c(`onMouseLeave`,[`mouseout`,`mouseover`]),c(`onPointerEnter`,[`pointerout`,`pointerover`]),c(`onPointerLeave`,[`pointerout`,`pointerover`]),s(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),s(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),s(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),s(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),s(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),s(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var fi=`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(` `),pi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(fi));function mi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,pt(r,t,void 0,e),e.currentTarget=null}function hi(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;mi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;mi(i,s,l),a=c}}}if(lt)throw e=ut,lt=!1,ut=null,e}function M(e,t){var n=t[Gi];n===void 0&&(n=t[Gi]=new Set);var r=e+`__bubble`;n.has(r)||(yi(t,e,2,!1),n.add(r))}function gi(e,t,n){var r=0;t&&(r|=4),yi(n,e,r,t)}var _i=`_reactListening`+Math.random().toString(36).slice(2);function vi(e){if(!e[_i]){e[_i]=!0,a.forEach(function(t){t!==`selectionchange`&&(pi.has(t)||gi(t,!1,e),gi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,gi(`selectionchange`,!1,t))}}function yi(e,t,n,r){switch(On(t)){case 1:var i=Cn;break;case 4:i=wn;break;default:i=Tn}n=i.bind(null,t,n,e),i=void 0,!it||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function bi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ji(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}nt(function(){var r=a,i=Ke(n),o=[];a:{var s=si.get(e);if(s!==void 0){var c=Rn,l=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:c=nr;break;case`focusin`:l=`focus`,c=qn;break;case`focusout`:l=`blur`,c=qn;break;case`beforeblur`:case`afterblur`:c=qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=ir;break;case ri:case ii:case ai:c=Jn;break;case oi:c=ar;break;case`scroll`:c=Bn;break;case`wheel`:c=or;break;case`copy`:case`cut`:case`paste`:c=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=rr}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=rt(p,f),h!=null&&u.push(xi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ge&&(l=n.relatedTarget||n.fromElement)&&(Ji(l)||l[Wi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ji(l):null,l!==null&&(d=mt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Gn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=rr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Xi(c),m=l==null?s:Xi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ji(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=Ci(m))p++;for(m=0,h=f;h;h=Ci(h))m++;for(;0<p-m;)u=Ci(u),p--;for(;0<m-p;)f=Ci(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=Ci(u),f=Ci(f)}u=null}else u=null;c!==null&&wi(o,s,c,u,!1),l!==null&&d!==null&&wi(o,d,l,u,!0)}}a:{if(s=r?Xi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Er;else if(br(s)){if(Dr)g=Ir;else{g=Pr;var _=Nr}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Fr);if(g&&=g(e,r)){xr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Ee(s,`number`,s.value)}switch(_=r?Xi(r):window,e){case`focusin`:(br(_)||_.contentEditable===`true`)&&(qr=_,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(o,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(o,n,i)}var v;if(cr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else gr?mr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(dr&&n.locale!==`ko`&&(gr||y!==`onCompositionStart`?y===`onCompositionEnd`&&gr&&(v=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,gr=!0)),_=Si(r,y),0<_.length&&(y=new Xn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=hr(n),v!==null&&(y.data=v)))),(v=ur?_r(e,n):vr(e,n))&&(r=Si(r,`onBeforeInput`),0<r.length&&(i=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}hi(o,t)})}function xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Si(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=rt(e,n),a!=null&&r.unshift(xi(e,a,i)),a=rt(e,t),a!=null&&r.push(xi(e,a,i))),e=e.return}return r}function Ci(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=rt(n,a),c!=null&&o.unshift(xi(n,c,s))):i||(c=rt(n,a),c!=null&&o.push(xi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ti=/\r\n?/g,Ei=/\u0000|\uFFFD/g;function Di(e){return(typeof e==`string`?e:``+e).replace(Ti,`
|
|
81
|
-
`).replace(Ei,``)}function Oi(e,t,n){if(t=Di(t),Di(e)!==t&&n)throw Error(r(425))}function ki(){}var Ai=null,ji=null;function Mi(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 Ni=typeof setTimeout==`function`?setTimeout:void 0,Pi=typeof clearTimeout==`function`?clearTimeout:void 0,Fi=typeof Promise==`function`?Promise:void 0,Ii=typeof queueMicrotask==`function`?queueMicrotask:Fi===void 0?Ni:function(e){return Fi.resolve(null).then(e).catch(Li)};function Li(e){setTimeout(function(){throw e})}function Ri(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),bn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);bn(t)}function zi(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 Bi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Vi=Math.random().toString(36).slice(2),Hi=`__reactFiber$`+Vi,Ui=`__reactProps$`+Vi,Wi=`__reactContainer$`+Vi,Gi=`__reactEvents$`+Vi,Ki=`__reactListeners$`+Vi,qi=`__reactHandles$`+Vi;function Ji(e){var t=e[Hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wi]||n[Hi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bi(e);e!==null;){if(n=e[Hi])return n;e=Bi(e)}return t}e=n,n=e.parentNode}return null}function Yi(e){return e=e[Hi]||e[Wi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Zi(e){return e[Ui]||null}var Qi=[],$i=-1;function ea(e){return{current:e}}function ta(e){0>$i||(e.current=Qi[$i],Qi[$i]=null,$i--)}function na(e,t){$i++,Qi[$i]=e.current,e.current=t}var ra={},ia=ea(ra),aa=ea(!1),oa=ra;function sa(e,t){var n=e.type.contextTypes;if(!n)return ra;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ca(e){return e=e.childContextTypes,e!=null}function la(){ta(aa),ta(ia)}function ua(e,t,n){if(ia.current!==ra)throw Error(r(168));na(ia,t),na(aa,n)}function da(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,me(e)||`Unknown`,a));return A({},n,i)}function fa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ra,oa=ia.current,na(ia,e),na(aa,aa.current),!0}function pa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=da(e,t,oa),i.__reactInternalMemoizedMergedChildContext=e,ta(aa),ta(ia),na(ia,e)):ta(aa),na(aa,n)}var ma=null,N=!1,ha=!1;function ga(e){ma===null?ma=[e]:ma.push(e)}function _a(e){N=!0,ga(e)}function va(){if(!ha&&ma!==null){ha=!0;var e=0,t=Yt;try{var n=ma;for(Yt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ma=null,N=!1}catch(t){throw ma!==null&&(ma=ma.slice(e+1)),bt(Et,va),t}finally{Yt=t,ha=!1}}return null}var ya=[],ba=0,xa=null,Sa=0,Ca=[],wa=0,Ta=null,Ea=1,Da=``;function Oa(e,t){ya[ba++]=Sa,ya[ba++]=xa,xa=e,Sa=t}function ka(e,t,n){Ca[wa++]=Ea,Ca[wa++]=Da,Ca[wa++]=Ta,Ta=e;var r=Ea;e=Da;var i=32-Pt(r)-1;r&=~(1<<i),n+=1;var a=32-Pt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ea=1<<32-Pt(t)+i|n<<i|r,Da=a+e}else Ea=1<<a|n<<i|r,Da=e}function Aa(e){e.return!==null&&(Oa(e,1),ka(e,1,0))}function ja(e){for(;e===xa;)xa=ya[--ba],ya[ba]=null,Sa=ya[--ba],ya[ba]=null;for(;e===Ta;)Ta=Ca[--wa],Ca[wa]=null,Da=Ca[--wa],Ca[wa]=null,Ea=Ca[--wa],Ca[wa]=null}var Ma=null,Na=null,Pa=!1,Fa=null;function Ia(e,t){var n=iu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function La(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Ma=e,Na=zi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Ma=e,Na=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=Ta===null?null:{id:Ea,overflow:Da},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=iu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ma=e,Na=null,!0);default:return!1}}function Ra(e){return!!(e.mode&1)&&!(e.flags&128)}function za(e){if(Pa){var t=Na;if(t){var n=t;if(!La(e,t)){if(Ra(e))throw Error(r(418));t=zi(n.nextSibling);var i=Ma;t&&La(e,t)?Ia(i,n):(e.flags=e.flags&-4097|2,Pa=!1,Ma=e)}}else{if(Ra(e))throw Error(r(418));e.flags=e.flags&-4097|2,Pa=!1,Ma=e}}}function Ba(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ma=e}function Va(e){if(e!==Ma)return!1;if(!Pa)return Ba(e),Pa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Mi(e.type,e.memoizedProps)),t&&=Na){if(Ra(e))throw Ha(),Error(r(418));for(;t;)Ia(e,t),t=zi(t.nextSibling)}if(Ba(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Na=zi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Na=null}}else Na=Ma?zi(e.stateNode.nextSibling):null;return!0}function Ha(){for(var e=Na;e;)e=zi(e.nextSibling)}function Ua(){Na=Ma=null,Pa=!1}function Wa(e){Fa===null?Fa=[e]:Fa.push(e)}var Ga=x.ReactCurrentBatchConfig;function Ka(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ja(e){var t=e._init;return t(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=su(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=du(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===te?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===k&&Ja(i)===t.type)?(r=a(t,n.props),r.ref=Ka(e,t,n),r.return=e,r):(r=cu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ka(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=lu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=du(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case S:return n=cu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ka(e,null,t),n.return=e,n;case C:return t=fu(t,e.mode,n),t.return=e,t;case k:var r=t._init;return f(e,r(t._payload),n)}if(De(t)||se(t))return t=lu(t,e.mode,n,null),t.return=e,t;qa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case S:return n.key===i?l(e,t,n,r):null;case C:return n.key===i?u(e,t,n,r):null;case k:return i=n._init,p(e,t,i(n._payload),r)}if(De(n)||se(n))return i===null?d(e,t,n,r,null):null;qa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case S:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case C:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case k:var a=r._init;return m(e,t,n,a(r._payload),i)}if(De(r)||se(r))return e=e.get(n)||null,d(t,e,r,i,null);qa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Pa&&Oa(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Pa&&Oa(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Pa&&Oa(r,h),l}function g(a,s,c,l){var u=se(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Pa&&Oa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Pa&&Oa(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Pa&&Oa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===te&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case S:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===te){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===k&&Ja(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ka(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===te?(r=lu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=cu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ka(e,r,i),o.return=e,e=o)}return s(e);case C:a:{for(l=i.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=fu(i,e.mode,o),r.return=e,e=r}return s(e);case k:return l=i._init,_(e,r,l(i._payload),o)}if(De(i))return h(e,r,i,o);if(se(i))return g(e,r,i,o);qa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=du(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Xa=Ya(!0),Za=Ya(!1),Qa=ea(null),$a=null,eo=null,to=null;function no(){to=eo=$a=null}function P(e){var t=Qa.current;ta(Qa),e._currentValue=t}function ro(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function io(e,t){$a=e,to=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ks=!0),e.firstContext=null)}function ao(e){var t=e._currentValue;if(to!==e){if(e={context:e,memoizedValue:t,next:null},eo===null){if($a===null)throw Error(r(308));eo=e,$a.dependencies={lanes:0,firstContext:e}}else eo=eo.next=e}return t}var oo=null;function so(e){oo===null?oo=[e]:oo.push(e)}function co(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,so(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function po(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 mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,so(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}function _o(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vo(e,t,n,r){var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;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 a;d=A({},d,f);break a;case 2:uo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);sl|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var bo={},xo=ea(bo),So=ea(bo),Co=ea(bo);function wo(e){if(e===bo)throw Error(r(174));return e}function To(e,t){switch(na(Co,t),na(So,e),na(xo,bo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pe(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pe(t,e)}ta(xo),na(xo,t)}function Eo(){ta(xo),ta(So),ta(Co)}function Do(e){wo(Co.current);var t=wo(xo.current),n=Pe(t,e.type);t!==n&&(na(So,e),na(xo,n))}function Oo(e){So.current===e&&(ta(xo),ta(So))}var ko=ea(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=[];function Mo(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var No=x.ReactCurrentDispatcher,Po=x.ReactCurrentBatchConfig,Fo=0,Io=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=0,Ho=0;function Uo(){throw Error(r(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function Go(e,t,n,i,a,o){if(Fo=o,Io=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,No.current=e===null||e.memoizedState===null?I:Ds,e=n(i,a),Bo){o=0;do{if(Bo=!1,Vo=0,25<=o)throw Error(r(301));o+=1,Ro=Lo=null,t.updateQueue=null,No.current=Os,e=n(i,a)}while(Bo)}if(No.current=Es,t=Lo!==null&&Lo.next!==null,Fo=0,Ro=Lo=Io=null,zo=!1,t)throw Error(r(300));return e}function Ko(){var e=Vo!==0;return Vo=0,e}function qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function Jo(){if(Lo===null){var e=Io.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?Io.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw Error(r(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function Yo(e,t){return typeof t==`function`?t(e):t}function Xo(e){var t=Jo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Lo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Fo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Io.lanes|=d,sl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Rr(i,t.memoizedState)||(Ks=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Io.lanes|=o,sl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Zo(e){var t=Jo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Rr(o,t.memoizedState)||(Ks=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function F(){}function Qo(e,t){var n=Io,i=Jo(),a=t(),o=!Rr(i.memoizedState,a);if(o&&(i.memoizedState=a,Ks=!0),i=i.queue,us(ts.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Ro!==null&&Ro.memoizedState.tag&1){if(n.flags|=2048,as(9,es.bind(null,n,i,a,t),void 0,null),el===null)throw Error(r(349));Fo&30||$o(n,t,a)}return a}function $o(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Io.updateQueue,t===null?(t={lastEffect:null,stores:null},Io.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function es(e,t,n,r){t.value=n,t.getSnapshot=r,ns(t)&&rs(e)}function ts(e,t,n){return n(function(){ns(t)&&rs(e)})}function ns(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function rs(e){var t=lo(e,1);t!==null&&El(t,e,1,-1)}function is(e){var t=qo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e},t.queue=e,e=e.dispatch=Ss.bind(null,Io,e),[t.memoizedState,e]}function as(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Io.updateQueue,t===null?(t={lastEffect:null,stores:null},Io.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function os(){return Jo().memoizedState}function ss(e,t,n,r){var i=qo();Io.flags|=e,i.memoizedState=as(1|t,n,void 0,r===void 0?null:r)}function cs(e,t,n,r){var i=Jo();r=r===void 0?null:r;var a=void 0;if(Lo!==null){var o=Lo.memoizedState;if(a=o.destroy,r!==null&&Wo(r,o.deps)){i.memoizedState=as(t,n,a,r);return}}Io.flags|=e,i.memoizedState=as(1|t,n,a,r)}function ls(e,t){return ss(8390656,8,e,t)}function us(e,t){return cs(2048,8,e,t)}function ds(e,t){return cs(4,2,e,t)}function fs(e,t){return cs(4,4,e,t)}function ps(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 ms(e,t,n){return n=n==null?null:n.concat([e]),cs(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Jo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Jo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vs(e,t,n){return Fo&21?(Rr(n,t)||(n=Wt(),Io.lanes|=n,sl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ks=!0),e.memoizedState=n)}function ys(e,t){var n=Yt;Yt=n!==0&&4>n?n:4,e(!0);var r=Po.transition;Po.transition={};try{e(!1),t()}finally{Yt=n,Po.transition=r}}function bs(){return Jo().memoizedState}function xs(e,t,n){var r=Tl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cs(e))ws(t,n);else if(n=co(e,t,n,r),n!==null){var i=wl();El(n,e,r,i),Ts(n,t,r)}}function Ss(e,t,n){var r=Tl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cs(e))ws(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Rr(s,o)){var c=t.interleaved;c===null?(i.next=i,so(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=co(e,t,i,r),n!==null&&(i=wl(),El(n,e,r,i),Ts(n,t,r))}}function Cs(e){var t=e.alternate;return e===Io||t!==null&&t===Io}function ws(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ts(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}var Es={readContext:ao,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useInsertionEffect:Uo,useLayoutEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useMutableSource:Uo,useSyncExternalStore:Uo,useId:Uo,unstable_isNewReconciler:!1},I={readContext:ao,useCallback:function(e,t){return qo().memoizedState=[e,t===void 0?null:t],e},useContext:ao,useEffect:ls,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ss(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return ss(4,2,e,t)},useMemo:function(e,t){var n=qo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xs.bind(null,Io,e),[r.memoizedState,e]},useRef:function(e){var t=qo();return e={current:e},t.memoizedState=e},useState:is,useDebugValue:hs,useDeferredValue:function(e){return qo().memoizedState=e},useTransition:function(){var e=is(!1),t=e[0];return e=ys.bind(null,e[1]),qo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Io,a=qo();if(Pa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),el===null)throw Error(r(349));Fo&30||$o(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(ts.bind(null,i,o,e),[e]),i.flags|=2048,as(9,es.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=qo(),t=el.identifierPrefix;if(Pa){var n=Da,r=Ea;n=(r&~(1<<32-Pt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Vo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Ho++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ds={readContext:ao,useCallback:gs,useContext:ao,useEffect:us,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Xo,useRef:os,useState:function(){return Xo(Yo)},useDebugValue:hs,useDeferredValue:function(e){return vs(Jo(),Lo.memoizedState,e)},useTransition:function(){return[Xo(Yo)[0],Jo().memoizedState]},useMutableSource:F,useSyncExternalStore:Qo,useId:bs,unstable_isNewReconciler:!1},Os={readContext:ao,useCallback:gs,useContext:ao,useEffect:us,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Zo,useRef:os,useState:function(){return Zo(Yo)},useDebugValue:hs,useDeferredValue:function(e){var t=Jo();return Lo===null?t.memoizedState=e:vs(t,Lo.memoizedState,e)},useTransition:function(){return[Zo(Yo)[0],Jo().memoizedState]},useMutableSource:F,useSyncExternalStore:Qo,useId:bs,unstable_isNewReconciler:!1};function ks(e,t){if(e&&e.defaultProps){for(var n in t=A({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function As(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:A({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var js={isMounted:function(e){return(e=e._reactInternals)?mt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wl(),i=Tl(e),a=mo(r,i);a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(El(t,e,i,r),go(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wl(),i=Tl(e),a=mo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(El(t,e,i,r),go(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wl(),r=Tl(e),i=mo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ho(e,i,r),t!==null&&(El(t,e,r,n),go(t,e,r))}};function Ms(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!zr(n,r)||!zr(i,a):!0}function Ns(e,t,n){var r=!1,i=ra,a=t.contextType;return typeof a==`object`&&a?a=ao(a):(i=ca(t)?oa:ia.current,r=t.contextTypes,a=(r=r!=null)?sa(e,i):ra),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=js,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ps(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&js.enqueueReplaceState(t,t.state,null)}function Fs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},fo(e);var a=t.contextType;typeof a==`object`&&a?i.context=ao(a):(a=ca(t)?oa:ia.current,i.context=sa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(As(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&js.enqueueReplaceState(i,i.state,null),vo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Is(e,t){try{var n=``,r=t;do n+=fe(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
82
|
-
Error generating stack: `+e.message+`
|
|
83
|
-
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ls(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var zs=typeof WeakMap==`function`?WeakMap:Map;function Bs(e,t,n){n=mo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ml||(ml=!0,hl=r),Rs(e,t)},n}function Vs(e,t,n){n=mo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Rs(e,t),typeof r!=`function`&&(gl===null?gl=new Set([this]):gl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Hs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Zl.bind(null,e,t,n),t.then(e,e))}function Us(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Ws(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mo(-1,1),t.tag=2,ho(n,t,1))),n.lanes|=1),e)}var Gs=x.ReactCurrentOwner,Ks=!1;function qs(e,t,n,r){t.child=e===null?Za(t,null,n,r):Xa(t,e.child,n,r)}function Js(e,t,n,r,i){n=n.render;var a=t.ref;return io(t,i),r=Go(e,t,n,r,a,i),n=Ko(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Pa&&n&&Aa(t),t.flags|=1,qs(e,t,r,i),t.child)}function Ys(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!au(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Xs(e,t,a,r,i)):(e=cu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?zr:n,n(o,r)&&e.ref===t.ref)return mc(e,t,i)}return t.flags|=1,e=su(a,r),e.ref=t.ref,e.return=t,t.child=e}function Xs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(zr(a,r)&&e.ref===t.ref){if(Ks=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ks=!0);else return t.lanes=e.lanes,mc(e,t,i)}}return $s(e,t,n,r,i)}function Zs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},na(il,rl),rl|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,na(il,rl),rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,na(il,rl),rl|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),na(il,rl),rl|=r;return qs(e,t,i,n),t.child}function Qs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $s(e,t,n,r,i){var a=ca(n)?oa:ia.current;return a=sa(t,a),io(t,i),n=Go(e,t,n,r,a,i),r=Ko(),e!==null&&!Ks?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,mc(e,t,i)):(Pa&&r&&Aa(t),t.flags|=1,qs(e,t,n,i),t.child)}function ec(e,t,n,r,i){if(ca(n)){var a=!0;fa(t)}else a=!1;if(io(t,i),t.stateNode===null)pc(e,t),Ns(t,n,r),Fs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=ao(l):(l=ca(n)?oa:ia.current,l=sa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ps(t,o,r,l),uo=!1;var f=t.memoizedState;o.state=f,vo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||aa.current||uo?(typeof u==`function`&&(As(t,n,u,r),c=t.memoizedState),(s=uo||Ms(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,po(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:ks(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=ao(c):(c=ca(n)?oa:ia.current,c=sa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ps(t,o,r,c),uo=!1,f=t.memoizedState,o.state=f,vo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||aa.current||uo?(typeof p==`function`&&(As(t,n,p,r),m=t.memoizedState),(l=uo||Ms(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return tc(e,t,n,r,a,i)}function tc(e,t,n,r,i,a){Qs(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&pa(t,n,!1),mc(e,t,a);r=t.stateNode,Gs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):qs(e,t,s,a),t.memoizedState=r.state,i&&pa(t,n,!0),t.child}function nc(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),To(e,t.containerInfo)}function rc(e,t,n,r,i){return Ua(),Wa(i),t.flags|=256,qs(e,t,n,r),t.child}var ic={dehydrated:null,treeContext:null,retryLane:0};function ac(e){return{baseLanes:e,cachePool:null,transitions:null}}function oc(e,t,n){var r=t.pendingProps,i=ko.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),na(ko,i&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=uu(o,r,0,null),e=lu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ac(n),t.memoizedState=ic,e):sc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return lc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=su(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=lu(a,o,n,null),a.flags|=2):a=su(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ac(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ic,r}return a=e.child,e=a.sibling,r=su(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sc(e,t){return t=uu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function cc(e,t,n,r){return r!==null&&Wa(r),Xa(t,e.child,null,n),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ls(Error(r(422))),cc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=uu({mode:`visible`,children:i.children},a,0,null),o=lu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Xa(t,e.child,null,s),t.child.memoizedState=ac(s),t.memoizedState=ic,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return cc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ls(o,i,void 0),cc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ks||c){if(i=el,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),El(i,e,a,-1))}return Bl(),i=Ls(Error(r(421))),cc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=$l.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Na=zi(a.nextSibling),Ma=t,Pa=!0,Fa=null,e!==null&&(Ca[wa++]=Ea,Ca[wa++]=Da,Ca[wa++]=Ta,Ea=e.id,Da=e.overflow,Ta=t),t=sc(t,i.children),t.flags|=4096,t)}function uc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ro(e.return,t,n)}function dc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function fc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(qs(e,t,r.children,n),r=ko.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uc(e,n,t);else if(e.tag===19)uc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(na(ko,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),dc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}dc(t,!0,n,null,a);break;case`together`:dc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=su(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=su(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hc(e,t,n){switch(t.tag){case 3:nc(t),Ua();break;case 5:Do(t);break;case 1:ca(t.type)&&fa(t);break;case 4:To(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;na(Qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(na(ko,ko.current&1),e=mc(e,t,n),e===null?null:e.sibling):oc(e,t,n):(na(ko,ko.current&1),t.flags|=128,null);na(ko,ko.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return fc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),na(ko,ko.current),r)break;return null;case 22:case 23:return t.lanes=0,Zs(e,t,n)}return mc(e,t,n)}var gc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_c=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,wo(xo.current);var a=null;switch(n){case`input`:i=xe(e,i),r=xe(e,r),a=[];break;case`select`:i=A({},i,{value:void 0}),r=A({},r,{value:void 0}),a=[];break;case`textarea`:i=ke(e,i),r=ke(e,r),a=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=ki)}Ue(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(o.hasOwnProperty(u)?a||=[]:(a||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(a||=[],a.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(a||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(a||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(o.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&M(`scroll`,e),a||c===l||(a=[])):(a||=[]).push(u,l))}}n&&(a||=[]).push(`style`,n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},vc=function(e,t,n,r){n!==r&&(t.flags|=4)};function yc(e,t){if(!Pa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function xc(e,t,n){var i=t.pendingProps;switch(ja(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bc(t),null;case 1:return ca(t.type)&&la(),bc(t),null;case 3:return i=t.stateNode,Eo(),ta(aa),ta(ia),Mo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Va(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fa!==null&&(Al(Fa),Fa=null))),bc(t),null;case 5:Oo(t);var a=wo(Co.current);if(n=t.type,e!==null&&t.stateNode!=null)_c(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return bc(t),null}if(e=wo(xo.current),Va(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Hi]=t,i[Ui]=s,e=!!(t.mode&1),n){case`dialog`:M(`cancel`,i),M(`close`,i);break;case`iframe`:case`object`:case`embed`:M(`load`,i);break;case`video`:case`audio`:for(a=0;a<fi.length;a++)M(fi[a],i);break;case`source`:M(`error`,i);break;case`img`:case`image`:case`link`:M(`error`,i),M(`load`,i);break;case`details`:M(`toggle`,i);break;case`input`:Se(i,s),M(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},M(`invalid`,i);break;case`textarea`:Ae(i,s),M(`invalid`,i)}for(var c in Ue(n,s),a=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),a=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),a=[`children`,``+l]):o.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&M(`scroll`,i)}switch(n){case`input`:ve(i),Te(i,s,!0);break;case`textarea`:ve(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=ki)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=a.nodeType===9?a:a.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Hi]=t,e[Ui]=i,gc(e,t,!1,!1),t.stateNode=e;a:{switch(c=We(n,i),n){case`dialog`:M(`cancel`,e),M(`close`,e),a=i;break;case`iframe`:case`object`:case`embed`:M(`load`,e),a=i;break;case`video`:case`audio`:for(a=0;a<fi.length;a++)M(fi[a],e);a=i;break;case`source`:M(`error`,e),a=i;break;case`img`:case`image`:case`link`:M(`error`,e),M(`load`,e),a=i;break;case`details`:M(`toggle`,e),a=i;break;case`input`:Se(e,i),a=xe(e,i),M(`invalid`,e);break;case`option`:a=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},a=A({},i,{value:void 0}),M(`invalid`,e);break;case`textarea`:Ae(e,i),a=ke(e,i),M(`invalid`,e);break;default:a=i}for(s in Ue(n,a),l=a,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Ve(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ie(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Le(e,u):typeof u==`number`&&Le(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(o.hasOwnProperty(s)?u!=null&&s===`onScroll`&&M(`scroll`,e):u!=null&&ee(e,s,u,c))}switch(n){case`input`:ve(e),Te(e,i,!1);break;case`textarea`:ve(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+he(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Oe(e,!!i.multiple,i.defaultValue,!0):Oe(e,!!i.multiple,s,!1);break;default:typeof a.onClick==`function`&&(e.onclick=ki)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bc(t),null;case 6:if(e&&t.stateNode!=null)vc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=wo(Co.current),wo(xo.current),Va(t)){if(i=t.stateNode,n=t.memoizedProps,i[Hi]=t,(s=i.nodeValue!==n)&&(e=Ma,e!==null))switch(e.tag){case 3:Oi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Oi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Hi]=t,t.stateNode=i}return bc(t),null;case 13:if(ta(ko),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pa&&Na!==null&&t.mode&1&&!(t.flags&128))Ha(),Ua(),t.flags|=98560,s=!1;else if(s=Va(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Hi]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bc(t),s=!1}else Fa!==null&&(Al(Fa),Fa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ko.current&1?al===0&&(al=3):Bl())),t.updateQueue!==null&&(t.flags|=4),bc(t),null);case 4:return Eo(),e===null&&vi(t.stateNode.containerInfo),bc(t),null;case 10:return P(t.type._context),bc(t),null;case 17:return ca(t.type)&&la(),bc(t),null;case 19:if(ta(ko),s=t.memoizedState,s===null)return bc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)yc(s,!1);else{if(al!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Ao(e),c!==null){for(t.flags|=128,yc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return na(ko,ko.current&1|2),t.child}e=e.sibling}s.tail!==null&&wt()>fl&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=Ao(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Pa)return bc(t),null}else 2*wt()-s.renderingStartTime>fl&&n!==1073741824&&(t.flags|=128,i=!0,yc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(bc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=wt(),t.sibling=null,n=ko.current,na(ko,i?n&1|2:n&1),t);case 22:case 23:return Il(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?rl&1073741824&&(bc(t),t.subtreeFlags&6&&(t.flags|=8192)):bc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Sc(e,t){switch(ja(t),t.tag){case 1:return ca(t.type)&&la(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Eo(),ta(aa),ta(ia),Mo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oo(t),null;case 13:if(ta(ko),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ta(ko),null;case 4:return Eo(),null;case 10:return P(t.type._context),null;case 22:case 23:return Il(),null;case 24:return null;default:return null}}var Cc=!1,wc=!1,Tc=typeof WeakSet==`function`?WeakSet:Set,L=null;function Ec(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){Xl(e,t,n)}else n.current=null}}function Dc(e,t,n){try{n()}catch(n){Xl(e,t,n)}}var Oc=!1;function kc(e,t){if(Ai=Sn,e=Ur(),Wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ji={focusedElem:e,selectionRange:n},Sn=!1,L=t;L!==null;)if(t=L,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:ks(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Xl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return h=Oc,Oc=!1,h}function Ac(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Dc(t,n,a)}i=i.next}while(i!==r)}}function jc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Nc(e){var t=e.alternate;t!==null&&(e.alternate=null,Nc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[Ui],delete t[Gi],delete t[Ki],delete t[qi])),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 Pc(e){return e.tag===5||e.tag===3||e.tag===4}function Fc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pc(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 a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ki));else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Lc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lc(e,t,n),e=e.sibling;e!==null;)Lc(e,t,n),e=e.sibling}var Rc=null,zc=!1;function Bc(e,t,n){for(n=n.child;n!==null;)Vc(e,t,n),n=n.sibling}function Vc(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount==`function`)try{Mt.onCommitFiberUnmount(jt,n)}catch{}switch(n.tag){case 5:wc||Ec(n,t);case 6:var r=Rc,i=zc;Rc=null,Bc(e,t,n),Rc=r,zc=i,Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rc.removeChild(n.stateNode));break;case 18:Rc!==null&&(zc?(e=Rc,n=n.stateNode,e.nodeType===8?Ri(e.parentNode,n):e.nodeType===1&&Ri(e,n),bn(e)):Ri(Rc,n.stateNode));break;case 4:r=Rc,i=zc,Rc=n.stateNode.containerInfo,zc=!0,Bc(e,t,n),Rc=r,zc=i;break;case 0:case 11:case 14:case 15:if(!wc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Dc(n,t,o),i=i.next}while(i!==r)}Bc(e,t,n);break;case 1:if(!wc&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Xl(n,t,e)}Bc(e,t,n);break;case 21:Bc(e,t,n);break;case 22:n.mode&1?(wc=(r=wc)||n.memoizedState!==null,Bc(e,t,n),wc=r):Bc(e,t,n);break;default:Bc(e,t,n)}}function Hc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tc),t.forEach(function(t){var r=eu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function R(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Rc=c.stateNode,zc=!1;break a;case 3:Rc=c.stateNode.containerInfo,zc=!0;break a;case 4:Rc=c.stateNode.containerInfo,zc=!0;break a}c=c.return}if(Rc===null)throw Error(r(160));Vc(o,s,a),Rc=null,zc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Xl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Uc(t,e),t=t.sibling}function Uc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(R(t,e),Wc(e),i&4){try{Ac(3,e,e.return),jc(3,e)}catch(t){Xl(e,e.return,t)}try{Ac(5,e,e.return)}catch(t){Xl(e,e.return,t)}}break;case 1:R(t,e),Wc(e),i&512&&n!==null&&Ec(n,n.return);break;case 5:if(R(t,e),Wc(e),i&512&&n!==null&&Ec(n,n.return),e.flags&32){var a=e.stateNode;try{Le(a,``)}catch(t){Xl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Ce(a,o),We(c,s);var u=We(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Ve(a,f):d===`dangerouslySetInnerHTML`?Ie(a,f):d===`children`?Le(a,f):ee(a,d,f,u)}switch(c){case`input`:we(a,o);break;case`textarea`:je(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Oe(a,!!o.multiple,o.multiple?[]:``,!1):Oe(a,!!o.multiple,o.defaultValue,!0)):Oe(a,!!o.multiple,m,!1)}a[Ui]=o}catch(t){Xl(e,e.return,t)}}break;case 6:if(R(t,e),Wc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Xl(e,e.return,t)}}break;case 3:if(R(t,e),Wc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{bn(t.containerInfo)}catch(t){Xl(e,e.return,t)}break;case 4:R(t,e),Wc(e);break;case 13:R(t,e),Wc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(dl=wt())),i&4&&Hc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(wc=(u=wc)||d,R(t,e),wc=u):R(t,e),Wc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(L=e,d=e.child;d!==null;){for(f=L=d;L!==null;){switch(p=L,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ac(4,p,p.return);break;case 1:Ec(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Xl(i,n,e)}}break;case 5:Ec(p,p.return);break;case 22:if(p.memoizedState!==null){Jc(f);continue}}m===null?Jc(f):(m.return=p,L=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Be(`display`,s))}catch(t){Xl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Xl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:R(t,e),Wc(e),i&4&&Hc(e);break;case 21:break;default:R(t,e),Wc(e)}}function Wc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Pc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Le(a,``),i.flags&=-33),Lc(e,Fc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ic(e,Fc(e),o);break;default:throw Error(r(161))}}catch(t){Xl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gc(e,t,n){L=e,Kc(e,t,n)}function Kc(e,t,n){for(var r=!!(e.mode&1);L!==null;){var i=L,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Cc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||wc;s=Cc;var l=wc;if(Cc=o,(wc=c)&&!l)for(L=i;L!==null;)o=L,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Yc(i):(c.return=o,L=c);for(;a!==null;)L=a,Kc(a,t,n),a=a.sibling;L=i,Cc=s,wc=l}qc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,L=a):qc(e,t,n)}}function qc(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wc||jc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!wc){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ks(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&yo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}yo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.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 d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&bn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}wc||t.flags&512&&Mc(t)}catch(e){Xl(t,t.return,e)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function Jc(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function Yc(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jc(4,t)}catch(e){Xl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Xl(t,i,e)}}var a=t.return;try{Mc(t)}catch(e){Xl(t,a,e)}break;case 5:var o=t.return;try{Mc(t)}catch(e){Xl(t,o,e)}}}catch(e){Xl(t,t.return,e)}if(t===e){L=null;break}var s=t.sibling;if(s!==null){s.return=t.return,L=s;break}L=t.return}}var Xc=Math.ceil,Zc=x.ReactCurrentDispatcher,Qc=x.ReactCurrentOwner,$c=x.ReactCurrentBatchConfig,z=0,el=null,tl=null,nl=0,rl=0,il=ea(0),al=0,ol=null,sl=0,cl=0,B=0,ll=null,ul=null,dl=0,fl=1/0,pl=null,ml=!1,hl=null,gl=null,_l=!1,vl=null,yl=0,bl=0,xl=null,Sl=-1,Cl=0;function wl(){return z&6?wt():Sl===-1?Sl=wt():Sl}function Tl(e){return e.mode&1?z&2&&nl!==0?nl&-nl:Ga.transition===null?(e=Yt,e===0?(e=window.event,e=e===void 0?16:On(e.type),e):e):(Cl===0&&(Cl=Wt()),Cl):1}function El(e,t,n,i){if(50<bl)throw bl=0,xl=null,Error(r(185));Kt(e,n,i),(!(z&2)||e!==el)&&(e===el&&(!(z&2)&&(cl|=n),al===4&&Ml(e,nl)),Dl(e,i),n===1&&z===0&&!(t.mode&1)&&(fl=wt()+500,N&&va()))}function Dl(e,t){var n=e.callbackNode;Ht(e,t);var r=Bt(e,e===el?nl:0);if(r===0)n!==null&&xt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xt(n),t===1)e.tag===0?_a(Nl.bind(null,e)):ga(Nl.bind(null,e)),Ii(function(){!(z&6)&&va()}),n=null;else{switch(Xt(r)){case 1:n=Et;break;case 4:n=Dt;break;case 16:n=Ot;break;case 536870912:n=At;break;default:n=Ot}n=nu(n,Ol.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ol(e,t){if(Sl=-1,Cl=0,z&6)throw Error(r(327));var n=e.callbackNode;if(Jl()&&e.callbackNode!==n)return null;var i=Bt(e,e===el?nl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Vl(e,i);else{t=i;var a=z;z|=2;var o=zl();(el!==e||nl!==t)&&(pl=null,fl=wt()+500,Ll(e,t));do try{Ul();break}catch(t){Rl(e,t)}while(1);no(),Zc.current=o,z=a,tl===null?(el=null,nl=0,t=al):t=0}if(t!==0){if(t===2&&(a=Ut(e),a!==0&&(i=a,t=kl(e,a))),t===1)throw n=ol,Ll(e,0),Ml(e,i),Dl(e,wt()),n;if(t===6)Ml(e,i);else{if(a=e.current.alternate,!(i&30)&&!jl(a)&&(t=Vl(e,i),t===2&&(o=Ut(e),o!==0&&(i=o,t=kl(e,o))),t===1))throw n=ol,Ll(e,0),Ml(e,i),Dl(e,wt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Kl(e,ul,pl);break;case 3:if(Ml(e,i),(i&130023424)===i&&(t=dl+500-wt(),10<t)){if(Bt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){wl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ni(Kl.bind(null,e,ul,pl),t);break}Kl(e,ul,pl);break;case 4:if(Ml(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Pt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=wt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Xc(i/1960))-i,10<i){e.timeoutHandle=Ni(Kl.bind(null,e,ul,pl),i);break}Kl(e,ul,pl);break;case 5:Kl(e,ul,pl);break;default:throw Error(r(329))}}}return Dl(e,wt()),e.callbackNode===n?Ol.bind(null,e):null}function kl(e,t){var n=ll;return e.current.memoizedState.isDehydrated&&(Ll(e,t).flags|=256),e=Vl(e,t),e!==2&&(t=ul,ul=n,t!==null&&Al(t)),e}function Al(e){ul===null?ul=e:ul.push.apply(ul,e)}function jl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Rr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ml(e,t){for(t&=~B,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Pt(t),r=1<<n;e[n]=-1,t&=~r}}function Nl(e){if(z&6)throw Error(r(327));Jl();var t=Bt(e,0);if(!(t&1))return Dl(e,wt()),null;var n=Vl(e,t);if(e.tag!==0&&n===2){var i=Ut(e);i!==0&&(t=i,n=kl(e,i))}if(n===1)throw n=ol,Ll(e,0),Ml(e,t),Dl(e,wt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kl(e,ul,pl),Dl(e,wt()),null}function Pl(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(fl=wt()+500,N&&va())}}function Fl(e){vl!==null&&vl.tag===0&&!(z&6)&&Jl();var t=z;z|=1;var n=$c.transition,r=Yt;try{if($c.transition=null,Yt=1,e)return e()}finally{Yt=r,$c.transition=n,z=t,!(z&6)&&va()}}function Il(){rl=il.current,ta(il)}function Ll(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Pi(n)),tl!==null)for(n=tl.return;n!==null;){var r=n;switch(ja(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&la();break;case 3:Eo(),ta(aa),ta(ia),Mo();break;case 5:Oo(r);break;case 4:Eo();break;case 13:ta(ko);break;case 19:ta(ko);break;case 10:P(r.type._context);break;case 22:case 23:Il()}n=n.return}if(el=e,tl=e=su(e.current,null),nl=rl=t,al=0,ol=null,B=cl=sl=0,ul=ll=null,oo!==null){for(t=0;t<oo.length;t++)if(n=oo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}oo=null}return e}function Rl(e,t){do{var n=tl;try{if(no(),No.current=Es,zo){for(var i=Io.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}zo=!1}if(Fo=0,Ro=Lo=Io=null,Bo=!1,Vo=0,Qc.current=null,n===null||n.return===null){al=1,ol=t,tl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=nl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Us(s);if(m!==null){m.flags&=-257,Ws(m,s,c,o,t),m.mode&1&&Hs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Hs(o,u,t),Bl();break a}l=Error(r(426))}else if(Pa&&c.mode&1){var _=Us(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ws(_,s,c,o,t),Wa(Is(l,c));break a}}o=l=Is(l,c),al!==4&&(al=2),ll===null?ll=[o]:ll.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Bs(o,l,t);_o(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(gl===null||!gl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var ee=Vs(o,c,t);_o(o,ee);break a}}o=o.return}while(o!==null)}Gl(n)}catch(e){t=e,tl===n&&n!==null&&(tl=n=n.return);continue}break}while(1)}function zl(){var e=Zc.current;return Zc.current=Es,e===null?Es:e}function Bl(){(al===0||al===3||al===2)&&(al=4),el===null||!(sl&268435455)&&!(cl&268435455)||Ml(el,nl)}function Vl(e,t){var n=z;z|=2;var i=zl();(el!==e||nl!==t)&&(pl=null,Ll(e,t));do try{Hl();break}catch(t){Rl(e,t)}while(1);if(no(),z=n,Zc.current=i,tl!==null)throw Error(r(261));return el=null,nl=0,al}function Hl(){for(;tl!==null;)Wl(tl)}function Ul(){for(;tl!==null&&!St();)Wl(tl)}function Wl(e){var t=tu(e.alternate,e,rl);e.memoizedProps=e.pendingProps,t===null?Gl(e):tl=t,Qc.current=null}function Gl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Sc(n,t),n!==null){n.flags&=32767,tl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{al=6,tl=null;return}}else if(n=xc(n,t,rl),n!==null){tl=n;return}if(t=t.sibling,t!==null){tl=t;return}tl=t=e}while(t!==null);al===0&&(al=5)}function Kl(e,t,n){var r=Yt,i=$c.transition;try{$c.transition=null,Yt=1,ql(e,t,n,r)}finally{$c.transition=i,Yt=r}return null}function ql(e,t,n,i){do Jl();while(vl!==null);if(z&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(qt(e,o),e===el&&(tl=el=null,nl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_l||(_l=!0,nu(Ot,function(){return Jl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=$c.transition,$c.transition=null;var s=Yt;Yt=1;var c=z;z|=4,Qc.current=null,kc(e,n),Uc(n,e),Gr(ji),Sn=!!Ai,ji=Ai=null,e.current=n,Gc(n,e,a),Ct(),z=c,Yt=s,$c.transition=o}else e.current=n;if(_l&&(_l=!1,vl=e,yl=a),o=e.pendingLanes,o===0&&(gl=null),Nt(n.stateNode,i),Dl(e,wt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ml)throw ml=!1,e=hl,hl=null,e;return yl&1&&e.tag!==0&&Jl(),o=e.pendingLanes,o&1?e===xl?bl++:(bl=0,xl=e):bl=0,va(),null}function Jl(){if(vl!==null){var e=Xt(yl),t=$c.transition,n=Yt;try{if($c.transition=null,Yt=16>e?16:e,vl===null)var i=!1;else{if(e=vl,vl=null,yl=0,z&6)throw Error(r(331));var a=z;for(z|=4,L=e.current;L!==null;){var o=L,s=o.child;if(L.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(L=u;L!==null;){var d=L;switch(d.tag){case 0:case 11:case 15:Ac(8,d,o)}var f=d.child;if(f!==null)f.return=d,L=f;else for(;L!==null;){d=L;var p=d.sibling,m=d.return;if(Nc(d),d===u){L=null;break}if(p!==null){p.return=m,L=p;break}L=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}L=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,L=s;else b:for(;L!==null;){if(o=L,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ac(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,L=v;break b}L=o.return}}var y=e.current;for(L=y;L!==null;){s=L;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,L=b;else b:for(s=y;L!==null;){if(c=L,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:jc(9,c)}}catch(e){Xl(c,c.return,e)}if(c===s){L=null;break b}var ee=c.sibling;if(ee!==null){ee.return=c.return,L=ee;break b}L=c.return}}if(z=a,va(),Mt&&typeof Mt.onPostCommitFiberRoot==`function`)try{Mt.onPostCommitFiberRoot(jt,e)}catch{}i=!0}return i}finally{Yt=n,$c.transition=t}}return!1}function Yl(e,t,n){t=Is(n,t),t=Bs(e,t,1),e=ho(e,t,1),t=wl(),e!==null&&(Kt(e,1,t),Dl(e,t))}function Xl(e,t,n){if(e.tag===3)Yl(e,e,n);else for(;t!==null;){if(t.tag===3){Yl(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gl===null||!gl.has(r))){e=Is(n,e),e=Vs(t,e,1),t=ho(t,e,1),e=wl(),t!==null&&(Kt(t,1,e),Dl(t,e));break}}t=t.return}}function Zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wl(),e.pingedLanes|=e.suspendedLanes&n,el===e&&(nl&n)===n&&(al===4||al===3&&(nl&130023424)===nl&&500>wt()-dl?Ll(e,0):B|=n),Dl(e,t)}function Ql(e,t){t===0&&(e.mode&1?(t=Rt,Rt<<=1,!(Rt&130023424)&&(Rt=4194304)):t=1);var n=wl();e=lo(e,t),e!==null&&(Kt(e,t,n),Dl(e,n))}function $l(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ql(e,n)}function eu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Ql(e,n)}var tu=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||aa.current)Ks=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ks=!1,hc(e,t,n);Ks=!!(e.flags&131072)}}else Ks=!1,Pa&&t.flags&1048576&&ka(t,Sa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;pc(e,t),e=t.pendingProps;var a=sa(t,ia.current);io(t,n),a=Go(null,t,i,e,a,n);var o=Ko();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ca(i)?(o=!0,fa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,fo(t),a.updater=js,t.stateNode=a,a._reactInternals=t,Fs(t,i,e,n),t=tc(null,t,i,!0,o,n)):(t.tag=0,Pa&&o&&Aa(t),qs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(pc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=ou(i),e=ks(i,e),a){case 0:t=$s(null,t,i,e,n);break a;case 1:t=ec(null,t,i,e,n);break a;case 11:t=Js(null,t,i,e,n);break a;case 14:t=Ys(null,t,i,ks(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),$s(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),ec(e,t,i,a,n);case 3:a:{if(nc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,po(e,t),vo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Is(Error(r(423)),t),t=rc(e,t,i,n,a);break a}if(i!==a){a=Is(Error(r(424)),t),t=rc(e,t,i,n,a);break a}for(Na=zi(t.stateNode.containerInfo.firstChild),Ma=t,Pa=!0,Fa=null,n=Za(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ua(),i===a){t=mc(e,t,n);break a}qs(e,t,i,n)}t=t.child}return t;case 5:return Do(t),e===null&&za(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Mi(i,a)?s=null:o!==null&&Mi(i,o)&&(t.flags|=32),Qs(e,t),qs(e,t,s,n),t.child;case 6:return e===null&&za(t),null;case 13:return oc(e,t,n);case 4:return To(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Xa(t,null,i,n):qs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),Js(e,t,i,a,n);case 7:return qs(e,t,t.pendingProps,n),t.child;case 8:return qs(e,t,t.pendingProps.children,n),t.child;case 12:return qs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,na(Qa,i._currentValue),i._currentValue=s,o!==null){if(Rr(o.value,s)){if(o.children===a.children&&!aa.current){t=mc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=mo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ro(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ro(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}qs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,io(t,n),a=ao(a),i=i(a),t.flags|=1,qs(e,t,i,n),t.child;case 14:return i=t.type,a=ks(i,t.pendingProps),a=ks(i.type,a),Ys(e,t,i,a,n);case 15:return Xs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:ks(i,a),pc(e,t),t.tag=1,ca(i)?(e=!0,fa(t)):e=!1,io(t,n),Ns(t,i,a),Fs(t,i,a,n),tc(null,t,i,!0,e,n);case 19:return fc(e,t,n);case 22:return Zs(e,t,n)}throw Error(r(156,t.tag))};function nu(e,t){return bt(e,t)}function ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function iu(e,t,n,r){return new ru(e,t,n,r)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ou(e){if(typeof e==`function`)return+!!au(e);if(e!=null){if(e=e.$$typeof,e===D)return 11;if(e===ie)return 14}return 2}function su(e,t){var n=e.alternate;return n===null?(n=iu(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)au(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case te:return lu(n.children,a,o,t);case w:s=8,a|=8;break;case T:return e=iu(12,n,t,a|2),e.elementType=T,e.lanes=o,e;case O:return e=iu(13,n,t,a),e.elementType=O,e.lanes=o,e;case re:return e=iu(19,n,t,a),e.elementType=re,e.lanes=o,e;case ae:return uu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ne:s=10;break a;case E:s=9;break a;case D:s=11;break a;case ie:s=14;break a;case k:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=iu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function lu(e,t,n,r){return e=iu(7,e,r,t),e.lanes=n,e}function uu(e,t,n,r){return e=iu(22,e,r,t),e.elementType=ae,e.lanes=n,e.stateNode={isHidden:!1},e}function du(e,t,n){return e=iu(6,e,null,t),e.lanes=n,e}function fu(e,t,n){return t=iu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mu(e,t,n,r,i,a,o,s,c){return e=new pu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=iu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fo(a),e}function hu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function gu(e){if(!e)return ra;e=e._reactInternals;a:{if(mt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ca(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ca(n))return da(e,n,t)}return t}function _u(e,t,n,r,i,a,o,s,c){return e=mu(n,r,!0,e,i,a,o,s,c),e.context=gu(null),n=e.current,r=wl(),i=Tl(n),a=mo(r,i),a.callback=t??null,ho(n,a,i),e.current.lanes=i,Kt(e,i,r),Dl(e,r),e}function vu(e,t,n,r){var i=t.current,a=wl(),o=Tl(i);return n=gu(n),t.context===null?t.context=n:t.pendingContext=n,t=mo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ho(i,t,o),e!==null&&(El(e,i,o,a),go(e,i,o)),o}function yu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function bu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function xu(e,t){bu(e,t),(e=e.alternate)&&bu(e,t)}function Su(){return null}var Cu=typeof reportError==`function`?reportError:function(e){console.error(e)};function wu(e){this._internalRoot=e}Tu.prototype.render=wu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));vu(e,t,null,null)},Tu.prototype.unmount=wu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fl(function(){vu(null,e,null,null)}),t[Wi]=null}};function Tu(e){this._internalRoot=e}Tu.prototype.unstable_scheduleHydration=function(e){if(e){var t=en();e={blockedOn:null,target:e,priority:t};for(var n=0;n<un.length&&t!==0&&t<un[n].priority;n++);un.splice(n,0,e),n===0&&hn(e)}};function Eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Ou(){}function ku(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=yu(o);a.call(e)}}var o=_u(t,r,e,0,null,!1,!1,``,Ou);return e._reactRootContainer=o,e[Wi]=o.current,vi(e.nodeType===8?e.parentNode:e),Fl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=yu(c);s.call(e)}}var c=mu(e,0,!1,null,null,!1,!1,``,Ou);return e._reactRootContainer=c,e[Wi]=c.current,vi(e.nodeType===8?e.parentNode:e),Fl(function(){vu(t,c,n,r)}),c}function Au(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=yu(o);s.call(e)}}vu(t,o,e,i)}else o=ku(n,t,e,i,r);return yu(o)}Zt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zt(t.pendingLanes);n!==0&&(Jt(t,n|1),Dl(t,wt()),!(z&6)&&(fl=wt()+500,va()))}break;case 13:Fl(function(){var t=lo(e,1);t!==null&&El(t,e,1,wl())}),xu(e,1)}},Qt=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&El(t,e,134217728,wl()),xu(e,134217728)}},$t=function(e){if(e.tag===13){var t=Tl(e),n=lo(e,t);n!==null&&El(n,e,t,wl()),xu(e,t)}},en=function(){return Yt},tn=function(e,t){var n=Yt;try{return Yt=e,t()}finally{Yt=n}},qe=function(e,t,n){switch(t){case`input`:if(we(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Zi(i);if(!a)throw Error(r(90));ye(i),we(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&Oe(e,!!n.multiple,t,!1)}},$e=Pl,et=Fl;var ju={usingClientEntryPoint:!1,Events:[Yi,Xi,Zi,Ze,Qe,Pl]},Mu={findFiberByHostInstance:Ji,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Nu={bundleType:Mu.bundleType,version:Mu.version,rendererPackageName:Mu.rendererPackageName,rendererConfig:Mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=vt(e),e===null?null:e.stateNode},findFiberByHostInstance:Mu.findFiberByHostInstance||Su,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{jt=Pu.inject(Nu),Mt=Pu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ju,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Eu(t))throw Error(r(200));return hu(e,t,null,n)},e.createRoot=function(e,t){if(!Eu(e))throw Error(r(299));var n=!1,i=``,a=Cu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=mu(e,1,!1,null,null,n,!1,i,a),e[Wi]=t.current,vi(e.nodeType===8?e.parentNode:e),new wu(t)},e.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(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=vt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Fl(e)},e.hydrate=function(e,t,n){if(!Du(t))throw Error(r(200));return Au(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Eu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Cu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=_u(t,null,e,1,n??null,a,!1,o,s),e[Wi]=t.current,vi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Tu(t)},e.render=function(e,t,n){if(!Du(t))throw Error(r(200));return Au(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Du(e))throw Error(r(40));return e._reactRootContainer?(Fl(function(){Au(null,null,e,!1,function(){e._reactRootContainer=null,e[Wi]=null})}),!0):!1},e.unstable_batchedUpdates=Pl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Du(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Au(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),iC=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=rC()})),aC=e(iC(),1),oC=Symbol(`workers-module`);Symbol.dispose||(Symbol.dispose=Symbol.for(`dispose`)),Symbol.asyncDispose||(Symbol.asyncDispose=Symbol.for(`asyncDispose`)),Promise.withResolvers||(Promise.withResolvers=function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}});var sC=globalThis[oC],cC=sC?sC.RpcTarget:class{},lC=async function(){}.constructor,uC=typeof Buffer<`u`?Buffer.prototype:void 0;function dC(e){switch(typeof e){case`boolean`:case`number`:case`string`:return`primitive`;case`undefined`:return`undefined`;case`object`:case`function`:break;case`bigint`:return`bigint`;default:return`unsupported`}if(e===null)return`primitive`;let t=Object.getPrototypeOf(e);switch(t){case Object.prototype:return`object`;case Function.prototype:case lC.prototype:return`function`;case Array.prototype:return`array`;case Date.prototype:return`date`;case Uint8Array.prototype:case uC:case ArrayBuffer.prototype:case DataView.prototype:case Int8Array.prototype:case Uint8ClampedArray.prototype:case Int16Array.prototype:case Uint16Array.prototype:case Int32Array.prototype:case Uint32Array.prototype:case BigInt64Array.prototype:case BigUint64Array.prototype:case Float32Array.prototype:case Float64Array.prototype:return`bytes`;case WritableStream.prototype:return`writable`;case ReadableStream.prototype:return`readable`;case URL.prototype:return`url`;case Headers.prototype:return`headers`;case Request.prototype:return`request`;case Response.prototype:return`response`;case Blob.prototype:return`blob`;case CC.prototype:return`stub`;case wC.prototype:return`rpc-promise`;default:if(sC){if(t==sC.RpcStub.prototype||e instanceof sC.ServiceStub)return`rpc-target`;if(t==sC.RpcPromise.prototype||t==sC.RpcProperty.prototype)return`rpc-thenable`}return e instanceof cC?`rpc-target`:e instanceof Error?`error`:`unsupported`}}function fC(){throw Error(`RPC map() implementation was not loaded.`)}var pC={applyMap:fC,sendMap:fC};function mC(){throw Error(`Stream implementation was not loaded.`)}var hC={createWritableStreamHook:mC,createWritableStreamFromHook:mC,createReadableStreamHook:mC},gC=class{stream(e,t){let n=this.call(e,t),r;try{r=n.pull()}catch(e){throw n.dispose(),e}let i;return r instanceof Promise?i=r.then(e=>{e.dispose()}):(r.dispose(),i=Promise.resolve()),{promise:i}}},_C=class extends gC{error;constructor(e){super(),this.error=e}call(e,t){return t.dispose(),this}map(e,t,n){for(let e of t)e.dispose();return this}get(e){return this}dup(){return this}pull(){return Promise.reject(this.error)}ignoreUnhandledRejections(){}dispose(){}onBroken(e){try{e(this.error)}catch(e){Promise.resolve(e)}}},vC=new _C(Error(`Attempted to use RPC stub after it has been disposed.`)),yC=(e,t,n)=>e.call(t,n);function bC(e,t){let n=yC;yC=e;try{return t()}finally{yC=n}}var xC=Symbol(`realStub`),SC={apply(e,t,n){let r=e.raw;return new wC(yC(r.hook,r.pathIfPromise||[],jC.fromAppParams(n)),[])},get(e,t,n){let r=e.raw;if(t===xC)return r;if(t in wC.prototype)return r[t];if(typeof t==`string`)return new wC(r.hook,r.pathIfPromise?[...r.pathIfPromise,t]:[t]);if(t===Symbol.dispose&&(!r.pathIfPromise||r.pathIfPromise.length==0))return()=>{r.hook.dispose(),r.hook=vC}},has(e,t){let n=e.raw;return t===xC?!0:t in wC.prototype?t in n:typeof t==`string`||t===Symbol.dispose&&(!n.pathIfPromise||n.pathIfPromise.length==0)},construct(e,t){throw Error(`An RPC stub cannot be used as a constructor.`)},defineProperty(e,t,n){throw Error(`Can't define properties on RPC stubs.`)},deleteProperty(e,t){throw Error(`Can't delete properties on RPC stubs.`)},getOwnPropertyDescriptor(e,t){},getPrototypeOf(e){return Object.getPrototypeOf(e.raw)},isExtensible(e){return!1},ownKeys(e){return[]},preventExtensions(e){return!0},set(e,t,n,r){throw Error(`Can't assign properties on RPC stubs.`)},setPrototypeOf(e,t){throw Error(`Can't override prototype of RPC stubs.`)}},CC=class e extends cC{constructor(e,t){if(super(),!(e instanceof gC)){let n=e;if(e=n instanceof cC||n instanceof Function?IC.create(n,void 0):new PC(jC.fromAppReturn(n)),t)throw TypeError(`RpcStub constructor expected one argument, received two.`)}this.hook=e,this.pathIfPromise=t;let n=()=>{};return n.raw=this,new Proxy(n,SC)}hook;pathIfPromise;dup(){let t=this[xC];return t.pathIfPromise?new e(t.hook.get(t.pathIfPromise)):new e(t.hook.dup())}onRpcBroken(e){this[xC].hook.onBroken(e)}map(e){let{hook:t,pathIfPromise:n}=this[xC];return pC.sendMap(t,n||[],e)}toString(){return`[object RpcStub]`}},wC=class extends CC{constructor(e,t){if(e instanceof gC)super(e,t??[]);else{if(t!==void 0)throw TypeError(`RpcPromise constructor expected one argument, received two.`);let n=dC(e);if(n===`rpc-promise`){let t=kC(e);if(t.pathIfPromise.length>0)super(t.hook,t.pathIfPromise);else{let e=t.hook;t.hook=vC,super(e,[])}}else if(n===`rpc-thenable`)super(IC.create(e,void 0),[]);else{let t=new LC(Promise.resolve(e).then(e=>new PC(jC.fromAppReturn(e))));t.ignoreUnhandledRejections(),super(t,[])}}}then(e,t){return AC(this).then(...arguments)}catch(e){return AC(this).catch(...arguments)}finally(e){return AC(this).finally(...arguments)}toString(){return`[object RpcPromise]`}};function TC(e){let{hook:t,pathIfPromise:n}=e[xC];return n&&n.length>0?t.get(n):t}function EC(e){let{hook:t,pathIfPromise:n}=e[xC];return n?t.get(n):t.dup()}function DC(e){let{hook:t,pathIfPromise:n}=e[xC];if(!(n&&n.length>0))return t}function OC(e){return e[xC].hook}function kC(e){return e[xC]}async function AC(e){let{hook:t,pathIfPromise:n}=e[xC];return n.length>0&&(t=t.get(n)),(await t.pull()).deliverResolve()}var jC=class e{value;source;hooks;promises;static fromAppParams(t){return new e(t,`params`)}static fromAppReturn(t){return new e(t,`return`)}static fromArray(t){let n=[],r=[],i=[];for(let e of t){e.ensureDeepCopied();for(let t of e.hooks)n.push(t);for(let t of e.promises)t.parent===e&&(t={parent:i,property:i.length,promise:t.promise}),r.push(t);i.push(e.value)}return new e(i,`owned`,n,r)}static forEvaluate(t,n){return new e(null,`owned`,t,n)}static deepCopyFrom(t,n,r){let i=new e(null,`owned`,[],[]);return i.value=i.deepCopy(t,n,`value`,i,!0,r),i}constructor(e,t,n,r){this.value=e,this.source=t,this.hooks=n,this.promises=r}rpcTargets;getHookForRpcTarget(e,t,n=!0){if(this.source===`params`){if(n){let t=e;typeof t.dup==`function`&&(e=t.dup())}return IC.create(e,t)}if(this.source===`return`){let r=this.rpcTargets?.get(e);return r?n?r.dup():(this.rpcTargets?.delete(e),r):(r=IC.create(e,t),n?(this.rpcTargets||=new Map,this.rpcTargets.set(e,r),r.dup()):r)}throw Error(`owned payload shouldn't contain raw RpcTargets`)}getHookForWritableStream(e,t,n=!0){if(this.source===`params`)return hC.createWritableStreamHook(e);if(this.source===`return`){let t=this.rpcTargets?.get(e);return t?n?t.dup():(this.rpcTargets?.delete(e),t):(t=hC.createWritableStreamHook(e),n?(this.rpcTargets||=new Map,this.rpcTargets.set(e,t),t.dup()):t)}throw Error(`owned payload shouldn't contain raw WritableStreams`)}getHookForReadableStream(e,t,n=!0){if(this.source===`params`)return hC.createReadableStreamHook(e);if(this.source===`return`){let t=this.rpcTargets?.get(e);return t?n?t.dup():(this.rpcTargets?.delete(e),t):(t=hC.createReadableStreamHook(e),n?(this.rpcTargets||=new Map,this.rpcTargets.set(e,t),t.dup()):t)}throw Error(`owned payload shouldn't contain raw ReadableStreams`)}deepCopy(e,t,n,r,i,a){switch(dC(e)){case`unsupported`:return e;case`primitive`:case`bigint`:case`date`:case`bytes`:case`blob`:case`url`:case`error`:case`undefined`:return e;case`array`:{let t=e,n=t.length,r=Array(n);for(let e=0;e<n;e++)r[e]=this.deepCopy(t[e],t,e,r,i,a);return r}case`object`:{let t={},n=e;for(let e in n)t[e]=this.deepCopy(n[e],n,e,t,i,a);return t}case`stub`:case`rpc-promise`:{let t=e,a;if(a=i?EC(t):TC(t),t instanceof wC){let e=new wC(a,[]);return this.promises.push({parent:r,property:n,promise:e}),e}return this.hooks.push(a),new CC(a)}case`function`:case`rpc-target`:{let n=e,r;return r=a?a.getHookForRpcTarget(n,t,i):IC.create(n,t),this.hooks.push(r),new CC(r)}case`rpc-thenable`:{let o=e,s;return s=a?new wC(a.getHookForRpcTarget(o,t,i),[]):new wC(IC.create(o,t),[]),this.promises.push({parent:r,property:n,promise:s}),s}case`writable`:{let n=e,r;return r=a?a.getHookForWritableStream(n,t,i):hC.createWritableStreamHook(n),this.hooks.push(r),n}case`readable`:{let n=e,r;return r=a?a.getHookForReadableStream(n,t,i):hC.createReadableStreamHook(n),this.hooks.push(r),n}case`headers`:return new Headers(e);case`request`:{let t=e;return t.body&&this.deepCopy(t.body,t,`body`,t,i,a),new Request(t)}case`response`:{let t=e;return t.body&&this.deepCopy(t.body,t,`body`,t,i,a),new Response(t.body,t)}default:throw Error(`unreachable`)}}ensureDeepCopied(){if(this.source!==`owned`){let e=this.source===`params`;this.hooks=[],this.promises=[];try{this.value=this.deepCopy(this.value,void 0,`value`,this,e,this)}catch(e){throw this.hooks=void 0,this.promises=void 0,e}if(this.source=`owned`,this.rpcTargets&&this.rpcTargets.size>0)throw Error(`Not all rpcTargets were accounted for in deep-copy?`);this.rpcTargets=void 0}}deliverTo(t,n,r){if(this.ensureDeepCopied(),this.value instanceof wC)e.deliverRpcPromiseTo(this.value,t,n,r);else{t[n]=this.value;for(let t of this.promises)e.deliverRpcPromiseTo(t.promise,t.parent,t.property,r)}}static deliverRpcPromiseTo(t,n,r,i){let a=DC(t);if(!a)throw Error(`property promises should have been resolved earlier`);let o=a.pull();o instanceof e?o.deliverTo(n,r,i):i.push(o.then(e=>{let t=[];if(e.deliverTo(n,r,t),t.length>0)return Promise.all(t)}))}async deliverCall(t,n){try{let r=[];this.deliverTo(this,`value`,r),r.length>0&&await Promise.all(r);let i=Function.prototype.apply.call(t,n,this.value);return i instanceof wC?e.fromAppReturn(i):e.fromAppReturn(await i)}finally{this.dispose()}}async deliverStreamWrite(t){try{let n=[];this.deliverTo(this,`value`,n),n.length>0&&await Promise.all(n);let r=this.value[0];return(this.hooks.length>0||this.promises.length>0)&&r instanceof Object?(Symbol.dispose in r||Object.defineProperty(r,Symbol.dispose,{value:()=>this.dispose(),writable:!0,enumerable:!1,configurable:!0}),await t.write(r),e.fromAppReturn(void 0)):(await t.write(r),this.dispose(),e.fromAppReturn(void 0))}catch(e){throw this.dispose(),e}}async deliverResolve(){try{let e=[];this.deliverTo(this,`value`,e),e.length>0&&await Promise.all(e);let t=this.value;return t instanceof Object&&(Symbol.dispose in t||Object.defineProperty(t,Symbol.dispose,{value:()=>this.dispose(),writable:!0,enumerable:!1,configurable:!0})),t}catch(e){throw this.dispose(),e}}dispose(){if(this.source===`owned`)this.hooks.forEach(e=>e.dispose()),this.promises.forEach(e=>e.promise[Symbol.dispose]());else if(this.source===`return`&&(this.disposeImpl(this.value,void 0),this.rpcTargets&&this.rpcTargets.size>0))throw Error(`Not all rpcTargets were accounted for in disposeImpl()?`);this.source=`owned`,this.hooks=[],this.promises=[]}disposeImpl(e,t){switch(dC(e)){case`unsupported`:case`primitive`:case`bigint`:case`bytes`:case`blob`:case`date`:case`url`:case`error`:case`undefined`:return;case`array`:{let t=e,n=t.length;for(let e=0;e<n;e++)this.disposeImpl(t[e],t);return}case`object`:{let t=e;for(let e in t)this.disposeImpl(t[e],t);return}case`stub`:case`rpc-promise`:{let t=DC(e);t&&t.dispose();return}case`function`:case`rpc-target`:{let t=e,n=this.rpcTargets?.get(t);n?(n.dispose(),this.rpcTargets.delete(t)):FC(t);return}case`rpc-thenable`:return;case`headers`:return;case`request`:{let t=e;t.body&&this.disposeImpl(t.body,t);return}case`response`:{let t=e;t.body&&this.disposeImpl(t.body,t);return}case`writable`:{let t=e,n=this.rpcTargets?.get(t);n?this.rpcTargets.delete(t):n=hC.createWritableStreamHook(t),n.dispose();return}case`readable`:{let t=e,n=this.rpcTargets?.get(t);n?this.rpcTargets.delete(t):n=hC.createReadableStreamHook(t),n.dispose();return}default:return}}ignoreUnhandledRejections(){this.hooks?(this.hooks.forEach(e=>{e.ignoreUnhandledRejections()}),this.promises.forEach(e=>OC(e.promise).ignoreUnhandledRejections())):this.ignoreUnhandledRejectionsImpl(this.value)}ignoreUnhandledRejectionsImpl(e){switch(dC(e)){case`unsupported`:case`primitive`:case`bigint`:case`bytes`:case`blob`:case`date`:case`error`:case`undefined`:case`function`:case`rpc-target`:case`writable`:case`readable`:case`url`:case`headers`:case`request`:case`response`:return;case`array`:{let t=e,n=t.length;for(let e=0;e<n;e++)this.ignoreUnhandledRejectionsImpl(t[e]);return}case`object`:{let t=e;for(let e in t)this.ignoreUnhandledRejectionsImpl(t[e]);return}case`stub`:case`rpc-promise`:OC(e).ignoreUnhandledRejections();return;case`rpc-thenable`:e.then(e=>{},e=>{});return;default:return}}};function MC(e,t,n,r){for(let i=0;i<n.length;i++){t=e;let a=n[i];if(a in Object.prototype){e=void 0;continue}switch(dC(e)){case`object`:case`function`:e=Object.hasOwn(e,a)?e[a]:void 0;break;case`array`:e=Number.isInteger(a)&&a>=0?e[a]:void 0;break;case`rpc-target`:case`rpc-thenable`:if(Object.hasOwn(e,a))throw TypeError(`Attempted to access property '${a}', which is an instance property of the RpcTarget. To avoid leaking private internals, instance properties cannot be accessed over RPC. If you want to make this property available over RPC, define it as a method or getter on the class, instead of an instance property.`);e=e[a],r=null;break;case`stub`:case`rpc-promise`:{let{hook:t,pathIfPromise:r}=kC(e);return{hook:t,remainingPath:r?r.concat(n.slice(i)):n.slice(i)}}case`writable`:e=void 0;break;case`readable`:e=void 0;break;case`primitive`:case`bigint`:case`bytes`:case`blob`:case`date`:case`error`:case`url`:case`headers`:case`request`:case`response`:e=void 0;break;case`undefined`:e=e[a];break;case`unsupported`:if(i===0)throw TypeError(`RPC stub points at a non-serializable type.`);{let e=n.slice(0,i).join(`.`),t=n.slice(0,i).join(`.`);throw TypeError(`'${e}' is not a serializable type, so property ${t} cannot be accessed.`)}default:throw TypeError(`unreachable`)}}if(e instanceof wC){let{hook:t,pathIfPromise:n}=kC(e);return{hook:t,remainingPath:n||[]}}return{value:e,parent:t,owner:r}}var NC=class extends gC{call(e,t){let n;try{let{value:t,owner:r}=this.getValue();n=MC(t,void 0,e,r)}catch(e){return t.dispose(),new _C(e)}return n.hook?n.hook.call(n.remainingPath,t):typeof n.value==`function`?new LC(t.deliverCall(n.value,n.parent).then(e=>new PC(e))):(t.dispose(),new _C(TypeError(`'${e.join(`.`)}' is not a function.`)))}map(e,t,n){try{let r;try{let{value:t,owner:n}=this.getValue();r=MC(t,void 0,e,n)}catch(e){for(let e of t)e.dispose();throw e}return r.hook?r.hook.map(r.remainingPath,t,n):pC.applyMap(r.value,r.parent,r.owner,t,n)}catch(e){return new _C(e)}}get(e){try{let{value:t,owner:n}=this.getValue();if(e.length===0&&n===null){if(t instanceof Object&&`then`in t)return this.dup();throw Error(`Can't dup an RpcTarget stub as a promise.`)}let r=MC(t,void 0,e,n);return r.hook?r.hook.get(r.remainingPath):new PC(jC.deepCopyFrom(r.value,r.parent,r.owner))}catch(e){return new _C(e)}}},PC=class e extends NC{constructor(e){super(),this.payload=e}payload;getPayload(){if(this.payload)return this.payload;throw Error(`Attempted to use an RPC StubHook after it was disposed.`)}getValue(){let e=this.getPayload();return{value:e.value,owner:e}}dup(){let t=this.getPayload();return new e(jC.deepCopyFrom(t.value,void 0,t))}pull(){return this.getPayload()}ignoreUnhandledRejections(){this.payload&&this.payload.ignoreUnhandledRejections()}dispose(){this.payload&&=(this.payload.dispose(),void 0)}onBroken(e){this.payload&&this.payload.value instanceof CC&&this.payload.value.onRpcBroken(e)}};function FC(e){if(Symbol.dispose in e)try{e[Symbol.dispose]()}catch(e){Promise.reject(e)}}var IC=class e extends NC{static create(t,n){return typeof t!=`function`&&(n=void 0),new e(t,n)}constructor(e,t,n){super(),this.target=e,this.parent=t,n?n.refcount&&(this.refcount=n.refcount,++this.refcount.count):Symbol.dispose in e&&(this.refcount={count:1})}target;parent;refcount;getTarget(){if(this.target)return this.target;throw Error(`Attempted to use an RPC StubHook after it was disposed.`)}getValue(){return{value:this.getTarget(),owner:null}}dup(){return new e(this.getTarget(),this.parent,this)}pull(){let e=this.getTarget();return`then`in e?Promise.resolve(e).then(e=>jC.fromAppReturn(e)):Promise.reject(Error(`Tried to resolve a non-promise stub.`))}ignoreUnhandledRejections(){}dispose(){this.target&&=(this.refcount&&--this.refcount.count==0&&FC(this.target),void 0)}onBroken(e){let t=this.target;t&&`then`in t&&Promise.resolve(t).then(()=>{},e)}},LC=class e extends gC{promise;resolution;constructor(e){super(),this.promise=e.then(e=>(this.resolution=e,e))}call(t,n){return n.ensureDeepCopied(),new e(this.promise.then(e=>e.call(t,n),e=>{throw n.dispose(),e}))}stream(e,t){return t.ensureDeepCopied(),{promise:this.promise.then(n=>n.stream(e,t).promise,e=>{throw t.dispose(),e})}}map(t,n,r){return new e(this.promise.then(e=>e.map(t,n,r),e=>{for(let e of n)e.dispose();throw e}))}get(t){return new e(this.promise.then(e=>e.get(t)))}dup(){return this.resolution?this.resolution.dup():new e(this.promise.then(e=>e.dup()))}pull(){return this.resolution?this.resolution.pull():this.promise.then(e=>e.pull())}ignoreUnhandledRejections(){this.resolution?this.resolution.ignoreUnhandledRejections():this.promise.then(e=>{e.ignoreUnhandledRejections()},e=>{})}dispose(){this.promise.then(e=>e.dispose(),()=>{})}onBroken(e){this.resolution?this.resolution.onBroken(e):this.promise.then(t=>{t.onBroken(e)},e)}},RC={maxBigIntDigits:16384,maxDepth:256,maxMessageSize:33554432},zC=new Uint8Array(new Uint16Array([1]).buffer)[0]===1,BC=[`ArrayBuffer`,`DataView`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`,`Float32Array`,`Float64Array`];function VC(e){return BC.includes(e)}var HC={ArrayBuffer:void 0,DataView:void 0,Int8Array:void 0,Uint8Array:void 0,Uint8ClampedArray:void 0,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,BigInt64Array:8,BigUint64Array:8,Float32Array:4,Float64Array:8},UC={ArrayBuffer:ArrayBuffer.prototype,DataView:DataView.prototype,Int8Array:Int8Array.prototype,Uint8ClampedArray:Uint8ClampedArray.prototype,Int16Array:Int16Array.prototype,Uint16Array:Uint16Array.prototype,Int32Array:Int32Array.prototype,Uint32Array:Uint32Array.prototype,BigInt64Array:BigInt64Array.prototype,BigUint64Array:BigUint64Array.prototype,Float32Array:Float32Array.prototype,Float64Array:Float64Array.prototype},WC=new Map;for(let e of Object.keys(UC))WC.set(UC[e],e);function GC(e,t){if(t!==2&&t!==4&&t!==8)throw RangeError(`Unsupported element size: ${t}`);let n=new DataView(e.buffer,e.byteOffset,e.byteLength);for(let r=0;r<e.byteLength;r+=t)switch(t){case 2:n.setUint16(r,n.getUint16(r,!1),!0);break;case 4:n.setUint32(r,n.getUint32(r,!1),!0);break;case 8:n.setBigUint64(r,n.getBigUint64(r,!1),!0)}}var KC=new class{exportStub(e){throw Error(`Cannot serialize RPC stubs without an RPC session.`)}exportPromise(e){throw Error(`Cannot serialize RPC stubs without an RPC session.`)}getImport(e){}unexport(e){}createPipe(e){throw Error(`Cannot create pipes without an RPC session.`)}onSendError(e){}};async function qC(e,t){let n=await new Response(e).blob();return n.type===t?n:n.slice(0,n.size,t)}var JC={__proto__:null,Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError},YC=class e{exporter;source;encodingLevel;constructor(e,t,n){this.exporter=e,this.source=t,this.encodingLevel=n}static devaluate(t,n,r=KC,i,a=`string`){let o=new e(r,i,a);try{return o.devaluateImpl(t,n,0)}catch(e){if(o.exports)try{r.unexport(o.exports)}catch{}throw e}}exports;devaluateImpl(e,t,n){if(n>=256)throw Error(`Serialization exceeded maximum allowed depth. (Does the message contain cycles?)`);switch(dC(e)){case`unsupported`:{let t;try{t=`Cannot serialize value: ${e}`}catch{t=`Cannot serialize value: (couldn't stringify value)`}throw TypeError(t)}case`primitive`:return typeof e==`number`&&!isFinite(e)?this.encodingLevel===`structuredClonable`?e:e===1/0?[`inf`]:e===-1/0?[`-inf`]:[`nan`]:e;case`object`:{let t=e,r={};for(let e in t)r[e]=this.devaluateImpl(t[e],t,n+1);return r}case`array`:{let t=e,r=t.length,i=Array(r);for(let e=0;e<r;e++)i[e]=this.devaluateImpl(t[e],t,n+1);return[i]}case`bigint`:return this.encodingLevel===`structuredClonable`?e:[`bigint`,e.toString()];case`date`:{if(this.encodingLevel===`structuredClonable`)return e;let t=e.getTime();return[`date`,Number.isNaN(t)?null:t]}case`bytes`:{let t=WC.get(Object.getPrototypeOf(e)),n;if(t===`ArrayBuffer`)n=new Uint8Array(e);else if(t===void 0)n=e;else{let r=e;n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);let i=HC[t];!zC&&i&&(n=n.slice(),GC(n,i))}if(this.encodingLevel===`structuredClonable`||this.encodingLevel===`jsonCompatibleWithBytes`)return t===void 0?[`bytes`,n]:[`bytes`,n,t];let r;if(n.toBase64)r=n.toBase64({omitPadding:!0});else if(typeof Buffer<`u`)r=(n instanceof Buffer?n:Buffer.from(n.buffer,n.byteOffset,n.byteLength)).toString(`base64`);else{let e=``;for(let t=0;t<n.length;t++)e+=String.fromCharCode(n[t]);r=btoa(e)}return r=r.replace(/=+$/,``),t===void 0?[`bytes`,r]:[`bytes`,r,t]}case`url`:return[`url`,e.href];case`headers`:return[`headers`,[...e]];case`request`:{let t=e,r={};t.method!==`GET`&&(r.method=t.method);let i=[...t.headers];if(i.length>0&&(r.headers=i),t.body)r.body=this.devaluateImpl(t.body,t,n+1),r.duplex=t.duplex||`half`;else if(t.body===void 0&&![`GET`,`HEAD`,`OPTIONS`,`TRACE`,`DELETE`].includes(t.method)){let e=t.arrayBuffer(),n=new ReadableStream({async start(t){try{t.enqueue(new Uint8Array(await e)),t.close()}catch(e){t.error(e)}}}),i=hC.createReadableStreamHook(n);r.body=[`readable`,this.exporter.createPipe(n,i)],r.duplex=t.duplex||`half`}t.cache&&t.cache!=="default"&&(r.cache=t.cache),t.redirect!==`follow`&&(r.redirect=t.redirect),t.integrity&&(r.integrity=t.integrity),t.mode&&t.mode!==`cors`&&(r.mode=t.mode),t.credentials&&t.credentials!==`same-origin`&&(r.credentials=t.credentials),t.referrer&&t.referrer!==`about:client`&&(r.referrer=t.referrer),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.keepalive&&(r.keepalive=t.keepalive);let a=t;return a.cf&&(r.cf=a.cf),a.encodeResponseBody&&a.encodeResponseBody!==`automatic`&&(r.encodeResponseBody=a.encodeResponseBody),[`request`,t.url,r]}case`response`:{let t=e,r=this.devaluateImpl(t.body,t,n+1),i={};t.status!==200&&(i.status=t.status),t.statusText&&(i.statusText=t.statusText);let a=[...t.headers];a.length>0&&(i.headers=a);let o=t;if(o.cf&&(i.cf=o.cf),o.encodeBody&&o.encodeBody!==`automatic`&&(i.encodeBody=o.encodeBody),o.webSocket)throw TypeError(`Can't serialize a Response containing a webSocket.`);return[`response`,r,i]}case`blob`:{let t=e,n=t.stream(),r=hC.createReadableStreamHook(n),i=this.exporter.createPipe(n,r);return[`blob`,t.type,[`readable`,i]]}case`error`:{let t=e,r=this.exporter.onSendError(t);r&&(t=r);let i=t,a,o=(e,r)=>{let i=this.exports?.length??0;try{let i=this.devaluateImpl(r,t,n+1);a||={},a[e]=i}catch{if(this.exports&&this.exports.length>i){let e=this.exports.splice(i);try{this.exporter.unexport(e)}catch{}}}};for(let e of Object.keys(t))e!==`name`&&e!==`message`&&e!==`stack`&&o(e,i[e]);`cause`in t&&o(`cause`,i.cause),t instanceof AggregateError&&o(`errors`,t.errors);let s=[`error`,t.name,t.message];return a?(s.push(r&&r.stack?r.stack:null),s.push(a)):r&&r.stack&&s.push(r.stack),s}case`undefined`:return this.encodingLevel===`structuredClonable`?void 0:[`undefined`];case`stub`:case`rpc-promise`:{if(!this.source)throw Error(`Can't serialize RPC stubs in this context.`);let{hook:t,pathIfPromise:n}=kC(e),r=this.exporter.getImport(t);return r===void 0?(t=n?t.get(n):t.dup(),this.devaluateHook(n?`promise`:`export`,t)):n?n.length>0?[`pipeline`,r,n]:[`pipeline`,r]:[`import`,r]}case`function`:case`rpc-target`:{if(!this.source)throw Error(`Can't serialize RPC stubs in this context.`);let n=this.source.getHookForRpcTarget(e,t);return this.devaluateHook(`export`,n)}case`rpc-thenable`:{if(!this.source)throw Error(`Can't serialize RPC stubs in this context.`);let n=this.source.getHookForRpcTarget(e,t);return this.devaluateHook(`promise`,n)}case`writable`:{if(!this.source)throw Error(`Can't serialize WritableStream in this context.`);let n=this.source.getHookForWritableStream(e,t);return this.devaluateHook(`writable`,n)}case`readable`:{if(!this.source)throw Error(`Can't serialize ReadableStream in this context.`);let n=e,r=this.source.getHookForReadableStream(n,t);return[`readable`,this.exporter.createPipe(n,r)]}default:throw Error(`unreachable`)}}devaluateHook(e,t){this.exports||=[];let n=e===`promise`?this.exporter.exportPromise(t):this.exporter.exportStub(t);return this.exports.push(n),[e,n]}};new class{importStub(e){throw Error(`Cannot deserialize RPC stubs without an RPC session.`)}importPromise(e){throw Error(`Cannot deserialize RPC stubs without an RPC session.`)}getExport(e){}getPipeReadable(e){throw Error(`Cannot retrieve pipe readable without an RPC session.`)}getLimits(){return RC}};function XC(e,t){return new wC(new LC(new Response(t).arrayBuffer().then(t=>{let n=new Uint8Array(t),r=new Request(e,{body:n});return new PC(jC.fromAppReturn(r))})),[])}function ZC(e,t){return new wC(new LC(qC(e,t).then(e=>new PC(jC.fromAppReturn(e)))),[])}var QC=class e{importer;encodingLevel;limits;constructor(e,t=`string`){this.importer=e,this.encodingLevel=t,this.limits=e.getLimits()}hooks=[];promises=[];evaluate(e){return this.evaluateWithDepth(e,0)}evaluateWithDepth(e,t){let n=jC.forEvaluate(this.hooks,this.promises);try{return n.value=this.evaluateImpl(e,n,`value`,t),n}catch(e){throw n.dispose(),e}}evaluateCopy(e){return this.evaluate(structuredClone(e))}evaluateImpl(t,n,r,i){let a=this.limits.maxDepth;if(i>=a)throw TypeError(`Deserialization exceeded maximum allowed message depth of ${a}.`);if(this.encodingLevel===`structuredClonable`&&(t instanceof Date||typeof t==`bigint`))return t;if(t instanceof Array){if(t.length==1&&t[0]instanceof Array){let e=t[0];for(let t=0;t<e.length;t++)e[t]=this.evaluateImpl(e[t],e,t,i+1);return e}switch(t[0]){case`bigint`:if(typeof t[1]==`string`){let e=t[1],n=this.limits.maxBigIntDigits;if(e.length>n)throw TypeError(`Deserialized bigint exceeds maximum length of ${n} digits.`);return BigInt(e)}break;case`date`:if(t[1]===null)return new Date(NaN);if(typeof t[1]==`number`)return new Date(t[1]);break;case`bytes`:{let e;if(t[1]instanceof Uint8Array)e=t[1];else if(typeof t[1]==`string`){if(typeof Buffer<`u`)e=Buffer.from(t[1],`base64`);else if(Uint8Array.fromBase64)e=Uint8Array.fromBase64(t[1]);else{let n=atob(t[1]),r=n.length;e=new Uint8Array(r);for(let t=0;t<r;t++)e[t]=n.charCodeAt(t)}}else break;if(t.length===2)return e;if(typeof t[2]!=`string`)throw TypeError(`Unknown bytes type marker type: ${typeof t[2]}`);if(!VC(t[2])){let e=t[2].slice(0,64);throw TypeError(`Unknown bytes type marker: ${e}`)}let n=t[2],r=HC[n];if(r!==void 0&&e.byteLength%r!==0)throw TypeError(`Invalid byte length ${e.byteLength} for ${n}; expected a multiple of ${r}`);let i=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);switch(!zC&&r!==void 0&&GC(new Uint8Array(i),r),n){case`ArrayBuffer`:return i;case`DataView`:return new DataView(i);case`Int8Array`:return new Int8Array(i);case`Uint8Array`:return new Uint8Array(i);case`Uint8ClampedArray`:return new Uint8ClampedArray(i);case`Int16Array`:return new Int16Array(i);case`Uint16Array`:return new Uint16Array(i);case`Int32Array`:return new Int32Array(i);case`Uint32Array`:return new Uint32Array(i);case`BigInt64Array`:return new BigInt64Array(i);case`BigUint64Array`:return new BigUint64Array(i);case`Float32Array`:return new Float32Array(i);case`Float64Array`:return new Float64Array(i)}}case`error`:if(t.length>=3&&typeof t[1]==`string`&&typeof t[2]==`string`){let e=JC[t[1]]||Error,n=e===AggregateError?new e([],t[2]):new e(t[2]);if(typeof t[3]==`string`&&(n.stack=t[3]),t.length>=5){let e=t[4];if(!e||typeof e!=`object`||Array.isArray(e))break;let r=n,a=e;for(let e of Object.keys(a))if(e!==`name`&&e!==`message`&&e!==`stack`){if(e in Object.prototype||e===`toJSON`){this.evaluateImpl(a[e],n,e,i+1);continue}r[e]=this.evaluateImpl(a[e],n,e,i+1)}}return n}break;case`undefined`:if(t.length===1)return;break;case`inf`:return 1/0;case`-inf`:return-1/0;case`nan`:return NaN;case`url`:if(t.length===2&&typeof t[1]==`string`)return new URL(t[1]);break;case`headers`:if(t.length===2&&t[1]instanceof Array)return new Headers(t[1]);break;case`request`:{if(t.length!==3||typeof t[1]!=`string`)break;let e=t[1],a=t[2];if(typeof a!=`object`||!a)break;if(a.body&&(a.body=this.evaluateImpl(a.body,a,`body`,i+1),!(a.body===null||typeof a.body==`string`||a.body instanceof Uint8Array||a.body instanceof ReadableStream)))throw TypeError(`Request body must be of type ReadableStream.`);if(a.signal&&(a.signal=this.evaluateImpl(a.signal,a,`signal`,i+1),!(a.signal instanceof AbortSignal)))throw TypeError(`Request siganl must be of type AbortSignal.`);if(a.headers&&!(a.headers instanceof Array))throw TypeError(`Request headers must be serialized as an array of pairs.`);let o=new Request(e,a);if(a.body instanceof ReadableStream&&o.body===void 0){let e=XC(o,a.body);return this.promises.push({promise:e,parent:n,property:r}),e}return o}case`response`:{if(t.length!==3)break;let e=this.evaluateImpl(t[1],n,r,i+1);if(!(e===null||typeof e==`string`||e instanceof Uint8Array||e instanceof ReadableStream))throw TypeError(`Response body must be of type ReadableStream.`);let a=t[2];if(typeof a!=`object`||!a)break;if(a.webSocket)throw TypeError(`Can't deserialize a Response containing a webSocket.`);if(a.headers&&!(a.headers instanceof Array))throw TypeError(`Request headers must be serialized as an array of pairs.`);return new Response(e,a)}case`blob`:{if(t.length!==3||typeof t[1]!=`string`)break;let e=t[1],a=this.evaluateImpl(t[2],n,r,i+1);if(!(a instanceof ReadableStream))throw TypeError(`Blob content must be serialized as a ReadableStream.`);let o=ZC(a,e);return this.promises.push({promise:o,parent:n,property:r}),o}case`import`:case`pipeline`:{if(t.length<2||t.length>4||typeof t[1]!=`number`)break;let a=this.importer.getExport(t[1]);if(!a)throw Error(`no such entry on exports table: ${t[1]}`);let o=t[0]==`pipeline`,s=e=>{if(o){let t=new wC(e,[]);return this.promises.push({promise:t,parent:n,property:r}),t}return this.hooks.push(e),new wC(e,[])};if(t.length==2)return s(o?a.get([]):a.dup());let c=t[2];if(!(c instanceof Array)||!c.every(e=>typeof e==`string`||typeof e==`number`))break;if(t.length==3)return s(a.get(c));let l=t[3];if(!(l instanceof Array))break;return l=new e(this.importer).evaluateWithDepth([l],i),s(a.call(c,l))}case`remap`:{if(t.length!==5||typeof t[1]!=`number`||!(t[2]instanceof Array)||!(t[3]instanceof Array)||!(t[4]instanceof Array))break;let e=this.importer.getExport(t[1]);if(!e)throw Error(`no such entry on exports table: ${t[1]}`);let i=t[2];if(!i.every(e=>typeof e==`string`||typeof e==`number`))break;let a=t[3].map(e=>{if(!(e instanceof Array)||e.length!==2||e[0]!==`import`&&e[0]!==`export`||typeof e[1]!=`number`)throw TypeError(`unknown map capture: ${JSON.stringify(e)}`);if(e[0]===`export`)return this.importer.importStub(e[1]);{let t=this.importer.getExport(e[1]);if(!t)throw Error(`no such entry on exports table: ${e[1]}`);return t.dup()}}),o=t[4],s=new wC(e.map(i,a,o),[]);return this.promises.push({promise:s,parent:n,property:r}),s}case`export`:case`promise`:if(typeof t[1]==`number`){if(t[0]==`promise`){let e=new wC(this.importer.importPromise(t[1]),[]);return this.promises.push({parent:n,property:r,promise:e}),e}{let e=this.importer.importStub(t[1]);return this.hooks.push(e),new CC(e)}}break;case`writable`:if(typeof t[1]==`number`){let e=this.importer.importStub(t[1]),n=hC.createWritableStreamFromHook(e);return this.hooks.push(e),n}break;case`readable`:if(typeof t[1]==`number`){let e=this.importer.getPipeReadable(t[1]),n=hC.createReadableStreamHook(e);return this.hooks.push(n),e}}throw TypeError(`unknown special value: ${JSON.stringify(t)}`)}if(t instanceof Object){let e=t;for(let t in e)t in Object.prototype||t===`toJSON`?(this.evaluateImpl(e[t],e,t,i+1),delete e[t]):e[t]=this.evaluateImpl(e[t],e,t,i+1);return e}return t}},$C=16,ew=8,tw=16,nw=64;function rw(e){return 2+e.length*3}function iw(e,t,n=0){if(n>=nw)return ew;switch(typeof e){case`string`:return rw(e);case`number`:return 16;case`bigint`:return 16;case`boolean`:return 8;case`undefined`:return 16;case`object`:{if(e===null)return 8;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return tw+e.byteLength;if(typeof Blob<`u`&&e instanceof Blob)return tw+e.size;if(e instanceof Date)return 16;if(t??=new WeakSet,t.has(e))return ew;if(t.add(e),e instanceof Array){let r=$C;for(let i of e)r+=ew+iw(i,t,n+1);return r}if(e instanceof Error){let r=$C+rw(e.name)+rw(e.message)+rw(e.stack??``);for(let i of Object.keys(e))r+=ew+rw(i)+iw(e[i],t,n+1);return r}let r=$C;for(let i of Object.keys(e))r+=ew+rw(i)+iw(e[i],t,n+1);return r}default:return 16}}var aw=class{session;importId;constructor(e,t,n){this.session=e,this.importId=t,n&&(this.activePull=Promise.withResolvers())}localRefcount=0;remoteRefcount=1;activePull;resolution;onBrokenRegistrations;resolve(e){if(this.localRefcount==0){e.dispose();return}if(this.resolution=e,this.sendRelease(),this.onBrokenRegistrations){for(let t of this.onBrokenRegistrations){let n=this.session.onBrokenCallbacks[t],r=this.session.onBrokenCallbacks.length;e.onBroken(n),this.session.onBrokenCallbacks[r]===n?delete this.session.onBrokenCallbacks[r]:delete this.session.onBrokenCallbacks[t]}this.onBrokenRegistrations=void 0}this.activePull&&=(this.activePull.resolve(),void 0)}async awaitResolution(){return this.activePull||=(this.session.sendPull(this.importId),Promise.withResolvers()),await this.activePull.promise,this.resolution.pull()}dispose(){this.resolution?this.resolution.dispose():(this.abort(Error(`RPC was canceled because the RpcPromise was disposed.`)),this.sendRelease())}abort(e){if(!this.resolution){if(this.resolution=new _C(e),this.activePull&&=(this.activePull.reject(e),void 0),this.onBrokenRegistrations)for(let e of this.onBrokenRegistrations)delete this.session.onBrokenCallbacks[e];this.onBrokenRegistrations=void 0}}onBroken(e){if(this.resolution)this.resolution.onBroken(e);else{let t=this.session.onBrokenCallbacks.length;this.session.onBrokenCallbacks.push(e),this.onBrokenRegistrations||=[],this.onBrokenRegistrations.push(t)}}sendRelease(){this.remoteRefcount>0&&(this.session.sendRelease(this.importId,this.remoteRefcount),this.remoteRefcount=0)}},ow=class e extends gC{isPromise;entry;constructor(e,t){super(),this.isPromise=e,++t.localRefcount,this.entry=t}collectPath(e){return this}getEntry(){if(this.entry)return this.entry;throw Error(`This RpcImportHook was already disposed.`)}getEntryTakingOwnership(e){try{return this.getEntry()}catch(t){throw e(),t}}call(e,t){let n=this.getEntryTakingOwnership(()=>t.dispose());return n.resolution?n.resolution.call(e,t):n.session.sendCall(n.importId,e,t)}stream(e,t){let n=this.getEntryTakingOwnership(()=>t.dispose());return n.resolution?n.resolution.stream(e,t):n.session.sendStream(n.importId,e,t)}map(e,t,n){let r=this.getEntryTakingOwnership(()=>{for(let e of t)e.dispose()});return r.resolution?r.resolution.map(e,t,n):r.session.sendMap(r.importId,e,t,n)}get(e){let t=this.getEntry();return t.resolution?t.resolution.get(e):t.session.sendCall(t.importId,e)}dup(){return new e(!1,this.getEntry())}pull(){let e=this.getEntry();if(!this.isPromise)throw Error(`Can't pull this hook because it's not a promise hook.`);return e.resolution?e.resolution.pull():e.awaitResolution()}ignoreUnhandledRejections(){}dispose(){let e=this.entry;this.entry=void 0,e&&--e.localRefcount===0&&e.dispose()}onBroken(e){this.entry&&this.entry.onBroken(e)}},sw=class extends ow{session;constructor(e){super(!1,e),this.session=e.session}dispose(){if(this.session){let e=this.session;this.session=void 0,e.shutdown()}}},cw=class{transport;options;exports=[];reverseExports=new Map;imports=[];abortReason;cancelReadLoop;nextExportId=-1;onBatchDone;pullCount=0;onBrokenCallbacks=[];encodingLevel;limits;constructor(e,t,n){this.transport=e,this.options=n;let r=`string`;if(`encodingLevel`in e){let t=e.encodingLevel;if(t!==void 0){if(t!==`string`&&t!==`jsonCompatible`&&t!==`jsonCompatibleWithBytes`&&t!==`structuredClonable`)throw TypeError(`Unknown transport encodingLevel: ${String(t)}`);r=t}}this.encodingLevel=r,this.limits={...RC,...n.limits},this.exports.push({hook:t,refcount:1}),this.imports.push(new aw(this,0,!1)),this.readLoop().catch(e=>this.abort(e))}getMainImport(){return new sw(this.imports[0])}shutdown(){this.abort(Error(`RPC session was shut down by disposing the main stub`),!1)}exportStub(e){if(this.abortReason)throw this.abortReason;let t=this.reverseExports.get(e);if(t!==void 0)return++this.exports[t].refcount,t;{let t=this.nextExportId--;return this.exports[t]={hook:e,refcount:1},this.reverseExports.set(e,t),this.watchExport(t,e),t}}exportPromise(e){if(this.abortReason)throw this.abortReason;let t=this.nextExportId--;return this.exports[t]={hook:e,refcount:1},this.reverseExports.set(e,t),this.ensureResolvingExport(t),t}unexport(e){for(let t of e)this.releaseExport(t,1)}watchExport(e,t){t.onBroken(n=>{queueMicrotask(()=>{if(this.abortReason===void 0&&this.exports[e]?.hook===t)try{this.send([`reject`,e,YC.devaluate(n,void 0,this,void 0,this.encodingLevel)])}catch(e){this.abort(e)}})})}releaseExport(e,t){let n=this.exports[e];if(!n)throw Error(`no such export ID: ${e}`);if(n.refcount<t)throw Error(`refcount would go negative: ${n.refcount} < ${t}`);n.refcount-=t,n.refcount===0&&(delete this.exports[e],this.reverseExports.delete(n.hook),n.hook.dispose())}onSendError(e){if(this.options.onSendError)return this.options.onSendError(e)}ensureResolvingExport(e){let t=this.exports[e];if(!t)throw Error(`no such export ID: ${e}`);if(!t.pull){let n=async()=>{let e=t.hook;for(;;){let t=await e.pull();if(t.value instanceof CC){let{hook:n,pathIfPromise:r}=kC(t.value);if(r&&r.length==0&&this.getImport(e)===void 0){e=n;continue}}return t}},r=t.autoRelease;++this.pullCount,t.pull=n().then(t=>{let n=YC.devaluate(t.value,void 0,this,t,this.encodingLevel);this.send([`resolve`,e,n]),r&&this.releaseExport(e,1)},t=>{this.send([`reject`,e,YC.devaluate(t,void 0,this,void 0,this.encodingLevel)]),r&&this.releaseExport(e,1)}).catch(t=>{try{this.send([`reject`,e,YC.devaluate(t,void 0,this,void 0,this.encodingLevel)]),r&&this.releaseExport(e,1)}catch(e){this.abort(e)}}).finally(()=>{--this.pullCount===0&&this.onBatchDone&&this.onBatchDone.resolve()})}}getImport(e){if(e instanceof ow&&e.entry&&e.entry.session===this)return e.entry.importId}importStub(e){if(this.abortReason)throw this.abortReason;let t=this.imports[e];return t||(t=new aw(this,e,!1),this.imports[e]=t),new ow(!1,t)}importPromise(e){if(this.abortReason)throw this.abortReason;if(this.imports[e])return new _C(Error(`Bug in RPC system: The peer sent a promise reusing an existing export ID.`));let t=new aw(this,e,!0);return this.imports[e]=t,new ow(!0,t)}getExport(e){return this.exports[e]?.hook}getPipeReadable(e){let t=this.exports[e];if(!t||!t.pipeReadable)throw Error(`Export ${e} is not a pipe or its readable end was already consumed.`);let n=t.pipeReadable;return t.pipeReadable=void 0,n}getLimits(){return this.limits}createPipe(e,t){if(this.abortReason)throw this.abortReason;this.send([`pipe`]);let n=this.imports.length,r=new aw(this,n,!1);this.imports.push(r);let i=new ow(!1,r),a=hC.createWritableStreamFromHook(i);return e.pipeTo(a).catch(()=>{}).finally(()=>t.dispose()),n}send(e){if(this.abortReason!==void 0)return 0;if(this.encodingLevel===`string`){let t;try{t=JSON.stringify(e)}catch(e){try{this.abort(e)}catch{}throw e}try{let e=this.transport.send(t);e!==void 0&&typeof e.catch==`function`&&e.catch(e=>this.abort(e,!1))}catch(e){queueMicrotask(()=>this.abort(e,!1))}return t.length}try{let t=this.transport.send(e);if(typeof t==`number`)return t;let n=t;n&&typeof n.then==`function`&&Promise.resolve(n).catch(e=>this.abort(e,!1));return}catch(e){queueMicrotask(()=>this.abort(e,!1));return}}sendCall(e,t,n){if(this.abortReason)throw n?.dispose(),this.abortReason;let r=[`pipeline`,e,t];if(n){let e;try{e=YC.devaluate(n.value,void 0,this,n,this.encodingLevel)}catch(e){throw n.dispose(),e}r.push(e[0])}this.send([`push`,r]);let i=new aw(this,this.imports.length,!1);return this.imports.push(i),new ow(!0,i)}sendStream(e,t,n){if(this.abortReason)throw n.dispose(),this.abortReason;let r=[`pipeline`,e,t],i;try{i=YC.devaluate(n.value,void 0,this,n,this.encodingLevel)}catch(e){throw n.dispose(),e}r.push(i[0]);let a=[`stream`,r],o=this.send(a);o===void 0&&(o=iw(a));let s=this.imports.length,c=new aw(this,s,!0);return c.remoteRefcount=0,c.localRefcount=1,this.imports.push(c),{promise:c.awaitResolution().then(e=>{e.dispose(),delete this.imports[s]},e=>{throw delete this.imports[s],e}),size:o}}sendMap(e,t,n,r){if(this.abortReason){for(let e of n)e.dispose();throw this.abortReason}let i=[`remap`,e,t,n.map(e=>{let t=this.getImport(e);return t===void 0?[`export`,this.exportStub(e)]:[`import`,t]}),r];this.send([`push`,i]);let a=new aw(this,this.imports.length,!1);return this.imports.push(a),new ow(!0,a)}sendPull(e){if(this.abortReason)throw this.abortReason;this.send([`pull`,e])}sendRelease(e,t){this.abortReason||(this.send([`release`,e,t]),delete this.imports[e])}abort(e,t=!0){if(this.abortReason===void 0){if(this.cancelReadLoop?.(e),this.cancelReadLoop=void 0,t)try{let t=[`abort`,YC.devaluate(e,void 0,this,void 0,this.encodingLevel)];if(this.encodingLevel===`string`){let e=this.transport.send(JSON.stringify(t));e!==void 0&&typeof e.catch==`function`&&e.catch(e=>{})}else{let e=this.transport.send(t);e&&typeof e.then==`function`&&Promise.resolve(e).catch(e=>{})}}catch{}if(e===void 0&&(e=`undefined`),this.abortReason=e,this.onBatchDone&&this.onBatchDone.reject(e),this.transport.abort)try{this.transport.abort(e)}catch(e){Promise.resolve(e)}for(let t of Object.values(this.onBrokenCallbacks))try{t(e)}catch(e){Promise.resolve(e)}for(let t in this.imports)this.imports[t].abort(e);for(let e in this.exports)this.exports[e].hook.dispose()}}async readLoop(){for(;!this.abortReason;){let e=Promise.withResolvers();this.cancelReadLoop=e.reject;let t;try{t=await Promise.race([this.transport.receive(),e.promise])}finally{this.cancelReadLoop===e.reject&&(this.cancelReadLoop=void 0)}if(this.encodingLevel===`string`&&t.length>this.limits.maxMessageSize)throw TypeError(`Incoming message exceeds maximum size of ${this.limits.maxMessageSize} UTF-16 code units.`);if(this.abortReason)break;let n=this.encodingLevel===`string`?JSON.parse(t):t;if(n instanceof Array)switch(n[0]){case`push`:if(n.length>1){let e=new PC(new QC(this,this.encodingLevel).evaluate(n[1]));e.ignoreUnhandledRejections(),this.exports.push({hook:e,refcount:1});continue}break;case`stream`:if(n.length>1){let e=new PC(new QC(this,this.encodingLevel).evaluate(n[1]));e.ignoreUnhandledRejections();let t=this.exports.length;this.exports.push({hook:e,refcount:1,autoRelease:!0}),this.ensureResolvingExport(t);continue}break;case`pipe`:{let{readable:e,writable:t}=new TransformStream,n=hC.createWritableStreamHook(t),r=this.exports.length;this.exports.push({hook:n,refcount:1,pipeReadable:e}),this.watchExport(r,n);continue}case`pull`:{let e=n[1];if(typeof e==`number`){this.ensureResolvingExport(e);continue}break}case`resolve`:case`reject`:{let e=n[1];if(typeof e==`number`&&n.length>2){let t=this.imports[e];if(t){if(n[0]==`resolve`)t.resolve(new PC(new QC(this,this.encodingLevel).evaluate(n[2])));else{let e=new QC(this,this.encodingLevel).evaluate(n[2]);e.dispose(),t.resolve(new _C(e.value))}}else n[0]==`resolve`&&new QC(this,this.encodingLevel).evaluate(n[2]).dispose();continue}break}case`release`:{let e=n[1],t=n[2];if(typeof e==`number`&&typeof t==`number`){this.releaseExport(e,t);continue}break}case`abort`:{let e=new QC(this,this.encodingLevel).evaluate(n[1]);e.dispose(),this.abort(e.value,!1);break}}throw Error(`bad RPC message: ${JSON.stringify(n)}`)}}async drain(){if(this.abortReason)throw this.abortReason;if(this.pullCount>0){let{promise:e,resolve:t,reject:n}=Promise.withResolvers();this.onBatchDone={resolve:t,reject:n},await e}}getStats(){let e={imports:0,exports:0};for(let t in this.imports)++e.imports;for(let t in this.exports)++e.exports;return e}},lw=class{#e;#t;constructor(e,t,n={}){let r;r=t?new PC(jC.fromAppReturn(t)):new _C(Error(`This connection has no main object.`)),this.#e=new cw(e,r,n),this.#t=new CC(this.#e.getMainImport())}getRemoteMain(){return this.#t}getStats(){return this.#e.getStats()}drain(){return this.#e.drain()}};function uw(e,t,n){return new lw(new dw(e),t,n).getRemoteMain()}var dw=class{encodingLevel=`structuredClonable`;constructor(e){this.#e=e,e.start(),e.addEventListener(`message`,e=>{this.#i||(e.data===null?this.#a(Error(`Peer closed MessagePort connection.`)):this.#t?(this.#t(e.data),this.#t=void 0,this.#n=void 0):this.#r.push(e.data))}),e.addEventListener(`messageerror`,e=>{this.#a(Error(`MessagePort message error.`))})}#e;#t;#n;#r=[];#i;send(e){if(this.#i)throw this.#i;this.#e.postMessage(e)}async receive(){if(this.#r.length>0)return this.#r.shift();if(this.#i)throw this.#i;return new Promise((e,t)=>{this.#t=e,this.#n=t})}abort(e){try{this.#e.postMessage(null)}catch{}this.#e.close(),this.#i||=e}#a(e){this.#i||(this.#i=e,this.#n&&=(this.#n(e),this.#t=void 0,void 0))}},fw,pw=class{context;captureMap=new Map;instructions=[];constructor(e,t){this.context=fw?{parent:fw,captures:[],subject:fw.capture(e),path:t}:{parent:void 0,captures:[],subject:e,path:t},fw=this}unregister(){fw=this.context.parent}makeInput(){return new hw(this,0)}makeOutput(e){let t;try{t=YC.devaluate(e.value,void 0,this,e)}finally{e.dispose()}return this.instructions.push(t),this.context.parent?(this.context.parent.instructions.push([`remap`,this.context.subject,this.context.path,this.context.captures.map(e=>[`import`,e]),this.instructions]),new hw(this.context.parent,this.context.parent.instructions.length)):this.context.subject.map(this.context.path,this.context.captures,this.instructions)}pushCall(e,t,n){let r=YC.devaluate(n.value,void 0,this,n);r=r[0];let i=this.capture(e.dup());return this.instructions.push([`pipeline`,i,t,r]),new hw(this,this.instructions.length)}pushGet(e,t){let n=this.capture(e.dup());return this.instructions.push([`pipeline`,n,t]),new hw(this,this.instructions.length)}capture(e){if(e instanceof hw&&e.mapper===this)return e.idx;let t=this.captureMap.get(e);if(t===void 0){if(this.context.parent){let t=this.context.parent.capture(e);this.context.captures.push(t)}else this.context.captures.push(e);t=-this.context.captures.length,this.captureMap.set(e,t)}return t}exportStub(e){throw Error(`Can't construct an RpcTarget or RPC callback inside a mapper function. Try creating a new RpcStub outside the callback first, then using it inside the callback.`)}exportPromise(e){return this.exportStub(e)}getImport(e){return this.capture(e)}unexport(e){}createPipe(e){throw Error(`Cannot send ReadableStream inside a mapper function.`)}onSendError(e){}};pC.sendMap=(e,t,n)=>{let r=new pw(e,t),i;try{i=jC.fromAppReturn(bC(r.pushCall.bind(r),()=>n(new wC(r.makeInput(),[]))))}finally{r.unregister()}if(i instanceof Promise)throw i.catch(e=>{}),Error(`RPC map() callbacks cannot be async.`);return new wC(r.makeOutput(i),[])};function mw(){throw Error(`Attempted to use an abstract placeholder from a mapper function. Please make sure your map function has no side effects.`)}var hw=class extends gC{mapper;idx;constructor(e,t){super(),this.mapper=e,this.idx=t}dup(){return this}dispose(){}get(e){if(e.length==0)return this;if(fw)return fw.pushGet(this,e);mw()}call(e,t){t.dispose(),mw()}map(e,t,n){for(let e of t)e.dispose();mw()}pull(){mw()}ignoreUnhandledRejections(){}onBroken(e){mw()}},gw=class{captures;variables;constructor(e,t){this.captures=e,this.variables=[t]}dispose(){for(let e of this.variables)e.dispose()}apply(e){try{if(e.length<1)throw Error(`Invalid empty mapper function.`);for(let t of e.slice(0,-1)){let e=new QC(this).evaluateCopy(t);if(e.value instanceof CC){let t=DC(e.value);if(t){this.variables.push(t);continue}}this.variables.push(new PC(e))}return new QC(this).evaluateCopy(e[e.length-1])}finally{for(let e of this.variables)e.dispose()}}importStub(e){throw Error(`A mapper function cannot refer to exports.`)}importPromise(e){return this.importStub(e)}getExport(e){return e<0?this.captures[-e-1]:this.variables[e]}getPipeReadable(e){throw Error(`A mapper function cannot use pipe readables.`)}getLimits(){return RC}};function _w(e,t,n,r,i){let a=new gw(r,new PC(jC.deepCopyFrom(e,t,n)));try{return a.apply(i)}finally{a.dispose()}}pC.applyMap=(e,t,n,r,i)=>{try{let a;if(e instanceof wC)throw Error(`applyMap() can't be called on RpcPromise`);if(e instanceof Array){let t=[];try{for(let a of e)t.push(_w(a,e,n,r,i))}catch(e){for(let e of t)e.dispose();throw e}a=jC.fromArray(t)}else a=e==null?jC.fromAppReturn(e):_w(e,t,n,r,i);return new PC(a)}finally{for(let e of r)e.dispose()}};var vw=class e extends gC{state;static create(t){let n=t.getWriter();return new e({refcount:1,writer:n,closed:!1})}constructor(e,t){super(),this.state=e,t&&++e.refcount}getState(){if(this.state)return this.state;throw Error(`Attempted to use a WritableStreamStubHook after it was disposed.`)}call(e,t){try{let n=this.getState();if(e.length!==1||typeof e[0]!=`string`)throw Error(`WritableStream stub only supports direct method calls`);let r=e[0];if(r!==`write`&&r!==`close`&&r!==`abort`)throw Error(`Unknown WritableStream method: ${r}`);return(r===`close`||r===`abort`)&&(n.closed=!0),new LC((r===`write`?t.deliverStreamWrite(n.writer):t.deliverCall(n.writer[r],n.writer)).then(e=>new PC(e)))}catch(e){return t.dispose(),new _C(e)}}map(e,t,n){for(let e of t)e.dispose();return new _C(Error(`Cannot use map() on a WritableStream`))}get(e){return new _C(Error(`Cannot access properties on a WritableStream stub`))}dup(){let t=this.getState();return new e(t,this)}pull(){return Promise.reject(Error(`Cannot pull a WritableStream stub`))}ignoreUnhandledRejections(){}dispose(){let e=this.state;this.state=void 0,e&&--e.refcount===0&&(e.closed||e.writer.abort(Error(`WritableStream RPC stub was disposed without calling close()`)).catch(()=>{}),e.writer.releaseLock())}onBroken(e){this.getState().writer.closed.then(void 0,e)}},yw=262144,bw=1073741824,xw=65536,Sw=2,Cw=1.25,ww=.9,Tw=3,Ew=class{now;window=yw;bytesInFlight=0;inStartupPhase=!0;delivered=0;deliveredTime=0;firstAckTime=0;firstAckDelivered=0;minRtt=1/0;roundsWithoutIncrease=0;lastRoundWindow=0;roundStartTime=0;constructor(e){this.now=e}onSend(e){this.bytesInFlight+=e;let t={sentTime:this.now(),size:e,deliveredAtSend:this.delivered,deliveredTimeAtSend:this.deliveredTime,windowAtSend:this.window,windowFullAtSend:this.bytesInFlight>=this.window};return{token:t,shouldBlock:t.windowFullAtSend}}onError(e){this.bytesInFlight-=e.size}onAck(e){let t=this.now();this.delivered+=e.size,this.deliveredTime=t,this.bytesInFlight-=e.size;let n=t-e.sentTime;if(this.minRtt=Math.min(this.minRtt,n),this.firstAckTime===0)this.firstAckTime=t,this.firstAckDelivered=this.delivered;else{let n,r;e.deliveredTimeAtSend===0?(n=this.firstAckTime,r=this.firstAckDelivered):(n=e.deliveredTimeAtSend,r=e.deliveredAtSend);let i=t-n,a=(this.delivered-r)/i,o=this.inStartupPhase?Sw:Cw,s=a*this.minRtt*o;s=Math.min(s,e.windowAtSend*o),s=e.windowFullAtSend?Math.max(s,e.windowAtSend*ww):Math.max(s,this.window),this.window=Math.max(Math.min(s,bw),xw),this.inStartupPhase&&e.sentTime>=this.roundStartTime&&(this.window>this.lastRoundWindow*Cw?this.roundsWithoutIncrease=0:++this.roundsWithoutIncrease>=Tw&&(this.inStartupPhase=!1),this.roundStartTime=t,this.lastRoundWindow=this.window)}return this.bytesInFlight<this.window}};function Dw(e){let t,n=!1,r=new Ew(()=>performance.now()),i,a,o=()=>{n||(n=!0,e.dispose())};return new WritableStream({start(n){e.onBroken(e=>{t===void 0&&(t=e,n.error(e),o()),a&&=(a(e),i=void 0,void 0)})},write(n,s){if(t!==void 0)throw t;let c=jC.fromAppParams([n]),{promise:l,size:u}=e.stream([`write`],c);if(u===void 0)return l.catch(e=>{throw t===void 0&&(t=e),e});{let{token:e,shouldBlock:n}=r.onSend(u);if(l.then(()=>{r.onAck(e)&&i&&(i(),i=void 0,a=void 0)},n=>{r.onError(e),t===void 0&&(t=n,s.error(n),o()),a&&=(a(n),i=void 0,void 0)}),n)return new Promise((e,t)=>{i=e,a=t})}},async close(){if(t!==void 0)throw o(),t;let{promise:n}=e.stream([`close`],jC.fromAppParams([]));try{await n}catch(e){throw t??e}finally{o()}},abort(n){if(t!==void 0)return;t=n??Error(`WritableStream was aborted`),a&&=(a(t),i=void 0,void 0);let{promise:r}=e.stream([`abort`],jC.fromAppParams([n]));r.then(()=>o(),()=>o())}})}var Ow=class e extends gC{state;static create(t){return new e({refcount:1,stream:t,canceled:!1})}constructor(e,t){super(),this.state=e,t&&++e.refcount}call(e,t){return t.dispose(),new _C(Error(`Cannot call methods on a ReadableStream stub`))}map(e,t,n){for(let e of t)e.dispose();return new _C(Error(`Cannot use map() on a ReadableStream`))}get(e){return new _C(Error(`Cannot access properties on a ReadableStream stub`))}dup(){let t=this.state;if(!t)throw Error(`Attempted to dup a ReadableStreamStubHook after it was disposed.`);return new e(t,this)}pull(){return Promise.reject(Error(`Cannot pull a ReadableStream stub`))}ignoreUnhandledRejections(){}dispose(){let e=this.state;this.state=void 0,e&&--e.refcount===0&&(e.canceled||(e.canceled=!0,e.stream.locked||e.stream.cancel(Error(`ReadableStream RPC stub was disposed without being consumed`)).catch(()=>{})))}onBroken(e){}};hC.createWritableStreamHook=vw.create,hC.createWritableStreamFromHook=Dw,hC.createReadableStreamHook=Ow.create;var kw=CC,Aw=cC,jw=uw;function Mw(e){return e<32||e>=127&&e<=159||e===1564||e>=8203&&e<=8207||e===8232||e===8233||e>=8234&&e<=8238||e>=8294&&e<=8297||e===65279}function Nw(e,t=80){let n=``;for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);n+=Mw(r)?` `:e.charAt(t)}return n=n.replace(/\s+/gu,` `).trim(),n.length<=t?n:`${n.slice(0,Math.max(0,t-1)).trimEnd()}…`}function Pw(e,t){let n=e.find(e=>e.id===t.itemId);if(n===void 0||n.kind===`text`)return!1;if(n.kind===`menu`){let e=n.options.find(e=>e.id===t.optionId);return e!==void 0&&e.disabled!==!0}return t.optionId===void 0?n.kind!==`button`||n.disabled!==!0:!1}Object.freeze({publish:()=>Promise.resolve(),onBack:()=>()=>void 0,onForward:()=>()=>void 0,onActivate:()=>()=>void 0});function Fw(e,t){if(t.kind===`action`){let n=[...e.primary??[],...e.menu??[]].find(e=>e.id===t.actionId);return n!==void 0&&n.disabled!==!0}let n=e.crumbs?.find(e=>e.id===t.crumbId);return n===void 0?!1:t.siblingId===void 0||n.siblings?.some(e=>e.id===t.siblingId)===!0}var Iw=`fungi.app.ready`,Lw=`fungi.app.connect`,X=e=>ix.pipe(q(Px(1)),q(Lx(e))),Rw=e=>H(X(e)),zw=ax.pipe(q(Mx()),q(_x(Number.isSafeInteger,{message:`Expected a safe integer`}))),Bw=zw.pipe(q(kx(0))),Vw=zw.pipe(q(Ox(0))),Hw=G({appId:X(160),releaseId:X(160),surfaceId:X(160)}),Uw=G({editing:W,surface:ux([X(160),nx])}),Ww=ux([G({kind:U(`compose`),requestId:X(160),text:X(2e3)}),G({kind:U(`navigate`),requestId:X(160),params:cx(G({key:X(64),value:X(4096)})).pipe(q(Lx(16)))})]),Gw=ex(K([`granted`,`missing`])),Kw=G({"agent.list":Gw,"agent.manage":Gw,"agent.read":Gw,"agent.send":Gw,"computer.list":Gw,"computer.readFile":Gw,"computer.writeFile":Gw,"computer.execute":Gw,"git.repository":Gw,"workflow.publish":Gw,"workflow.arm":Gw,"workflow.run":Gw,"app.events.emit":Gw,"llm.generation":Gw,"media.generation":Gw,"media.share":Gw}),qw=K([`ready`,`missing`,`unknown`]),Jw=G({models:qw,media:qw,git:qw,terminal:K([`ready`,`exec-only`,`missing`,`unknown`]),terminalReason:H(ix)}),Yw=K([`model`,`media`,`git`,`computer`]),Xw=K([`opened`,`unavailable`]),Zw=G({computerId:ux([X(256),nx]),teamHasComputers:H(dx(W)),computerAccessGranted:H(W),setup:H(Jw),permissions:H(Kw),focus:Uw,openRequest:ux([nx,Ww]),visibility:K([`visible`,`hidden`])}),Qw=K([`connecting`,`connected`,`suspended`,`disconnected`,`disposing`,`disposed`]),$w=G({altKey:W,ctrlKey:W,id:X(160),key:X(64),metaKey:W,shiftKey:W}),eT=G({action:H(tx),availability:H(tx),category:X(160),description:Rw(512),id:X(160),projections:H(tx),title:X(160)}),tT=G({arguments:H(tx),commandId:X(321),origin:K([`agent`,`browser`,`keyboard`,`menu`,`palette`,`programmatic`,`slash`,`terminal`]),requestId:X(160)}),nT=ux([G({result:H(tx),status:U(`handled`)}),G({error:tx,status:U(`failed`)})]),rT=e=>X(e).pipe(q(_x(e=>{for(let t=0;t<e.length;t+=1)if(Mw(e.charCodeAt(t)))return!1;return!0},{message:`Expected one line of plain text`}))),iT={id:X(64),text:rT(80),end:ex(W),priority:ex(U(`low`))},aT=ex(ax.pipe(q(Mx()),q(jx({minimum:0,maximum:9999})))),oT=cx(ux([G({...iT,kind:U(`text`),tone:ex(K([`neutral`,`success`,`warning`,`error`]))}),G({...iT,kind:U(`button`),icon:ex(K([`folder`,`ports`,`processes`,`access`])),count:aT,tone:ex(K([`neutral`,`success`,`warning`,`error`])),busy:ex(W),title:ex(rT(1024)),disabled:ex(W),opens:ex(U(`dialog`)),expanded:ex(W)}),G({...iT,kind:U(`toggle`),pressed:W}),G({...iT,kind:U(`menu`),count:aT,title:ex(rT(1024)),options:cx(G({id:X(64),text:rT(80),checked:ex(W),disabled:ex(W)})).pipe(q(Lx(16)),q(_x(e=>new Set(e.map(e=>e.id)).size===e.length,{message:`Expected unique status option ids`})))})])).pipe(q(Lx(6)),q(_x(e=>new Set(e.map(e=>e.id)).size===e.length,{message:`Expected unique status item ids`}))),sT=G({computerId:X(256),path:X(1024)}),cT=X(80).pipe(q(_x(e=>e.trim()===e,{message:`Expected a trimmed title`}))),lT=X(64),uT=X(80),dT=e=>new Set(e.map(e=>e.id)).size===e.length,fT=G({id:lT,label:uT,siblings:H(cx(G({id:lT,label:uT})).pipe(q(Lx(16)),q(_x(dT,{message:`Expected unique crumb sibling ids`}))))}),pT=G({id:lT,label:uT,icon:H(U(`play`)),variant:H(K([`primary`,`outline`,`ghost`])),tone:H(U(`destructive`)),disabled:H(W)}),mT=e=>cx(pT).pipe(q(Lx(e)),q(_x(dT,{message:`Expected unique header command ids`}))),hT={status:H(cx(G({id:lT,label:uT,presentation:H(U(`bead`)),tone:H(K([`neutral`,`info`,`warning`,`success`,`error`]))})).pipe(q(Lx(4)),q(_x(dT,{message:`Expected unique header status ids`})))),crumbs:H(cx(fT).pipe(q(Lx(8)),q(_x(dT,{message:`Expected unique crumb ids`})))),primary:H(mT(3)),menu:H(mT(12))},gT=G({contractVersion:U(2),canGoBack:W,canGoForward:W,title:H(cT),...hT}),_T=G({canGoBack:W,canGoForward:W,title:H(ix),...hT}),vT=ux([G({kind:U(`crumb`),crumbId:lT,siblingId:H(lT)}),G({kind:U(`action`),actionId:lT})]),yT=dx(G({agentId:X(256),sessionId:X(256)})),bT=e=>H(cx(K(e)).pipe(q(Lx(e.length)))),xT=G({agents:H(cx(K([`agent.list`,`agent.manage`,`agent.read`,`agent.send`])).pipe(q(Lx(4)))),computers:H(cx(K([`computer.list`,`computer.readFile`,`computer.writeFile`,`computer.execute`])).pipe(q(Lx(4)))),git:bT([`git.repository`]),workflows:bT([`workflow.publish`,`workflow.arm`,`workflow.run`]),events:bT([`app.events.emit`]),generation:bT([`llm.generation`,`media.generation`,`media.share`])}),ST=K([`granted`,`declined`,`customize`]),CT=G({message:X(512),tone:H(K([`info`,`success`,`warning`,`error`]))}),wT=K($x);G({code:wT.pick([`DELIVERY_PENDING`])});var TT=G({code:wT,message:X(512),retryable:W,need:ex(qx)}),ET=G({protocolVersion:U(2),type:U(Iw)}),DT=G({epoch:X(160),protocolVersion:U(2),type:U(Lw)}),OT=G({epoch:X(160),protocolVersion:U(2)}),kT={[Symbol.dispose]:H(tx)},AT=ux([G({...kT,ok:U(!0),value:tx}),G({...kT,error:TT,ok:U(!1)})]);function Z(e,t,n=`PROTOCOL`){return Ns(Zb(e,{onExcessProperty:`error`}),zu({onFailure:e=>{throw new J(`The peer sent malformed protocol data`,{cause:e,code:n,retryable:!1})},onSuccess:t}))}function Q(e){return Object.freeze(e)}function jT(e,t){let n=e.arguments===void 0?void 0:ns(e.arguments),r={origin:e.origin,signal:t};return n!==void 0&&Object.assign(r,{arguments:n}),Q(r)}var MT=Z(eT,e=>{let t={category:e.category,id:e.id,title:e.title};return e.action!==void 0&&Object.assign(t,{action:e.action}),e.availability!==void 0&&Object.assign(t,{availability:e.availability}),e.description!==void 0&&Object.assign(t,{description:e.description}),e.projections!==void 0&&Object.assign(t,{projections:e.projections}),Q(CE(()=>hs(t)))},`INVALID_ARGUMENT`),NT=Z(X(321),e=>e),PT=Z(tT,e=>{let t=e.arguments===void 0?void 0:ns(e.arguments),n={commandId:e.commandId,origin:e.origin,requestId:e.requestId};return t!==void 0&&Object.assign(n,{arguments:t}),Q(n)}),FT=Z(ux([rx,tx]),e=>e===void 0?void 0:ns(e)),IT=Z(DT,e=>Q(e));Z(OT,e=>Q(e));var LT=Z(Zw,e=>{let t={computerId:e.computerId,focus:Q({...e.focus}),openRequest:e.openRequest===null?null:Q({...e.openRequest}),visibility:e.visibility};return e.teamHasComputers!==void 0&&(t.teamHasComputers=e.teamHasComputers),e.computerAccessGranted!==void 0&&(t.computerAccessGranted=e.computerAccessGranted),e.setup!==void 0&&(t.setup=Q({...e.setup})),e.permissions!==void 0&&(t.permissions=Q({...e.permissions})),Q(t)}),RT=Z(TT,e=>Q({...e})),zT=Z(Uw,e=>Q({...e}),`INVALID_ARGUMENT`),BT=Z(Hw,e=>Q({...e})),VT=Z(Qw,e=>e),HT=Z(oT,e=>Q(e.map(e=>e.kind===`menu`?Q({...e,options:Q(e.options.map(e=>Q(e)))}):Q(e))),`INVALID_ARGUMENT`),UT=Z(G({itemId:X(64),optionId:ex(X(64)),anchor:ex(G({start:ax.pipe(q(jx({minimum:0,maximum:1e5}))),width:ax.pipe(q(jx({minimum:0,maximum:1e5})))}))}),e=>Q(e.anchor===void 0?{...e}:{...e,anchor:Q({...e.anchor})}),`INVALID_ARGUMENT`),WT=Z(sT,e=>Q({...e}),`INVALID_ARGUMENT`);function GT(e){let t={id:e.id,label:e.label};return e.presentation!==void 0&&(t={...t,presentation:e.presentation}),e.tone!==void 0&&(t={...t,tone:e.tone}),Q(t)}function KT(e){let t={id:e.id,label:e.label};return e.siblings===void 0?Q(t):Q({...t,siblings:Q(e.siblings.map(e=>Q({...e})))})}function qT(e){let t={id:e.id,label:e.label};return e.icon!==void 0&&(t={...t,icon:e.icon}),e.variant!==void 0&&(t={...t,variant:e.variant}),e.tone!==void 0&&(t={...t,tone:e.tone}),e.disabled!==void 0&&(t={...t,disabled:e.disabled}),Q(t)}function JT(e){let t={canGoBack:e.canGoBack,canGoForward:e.canGoForward};return e.title!==void 0&&(t={...t,title:e.title}),e.crumbs!==void 0&&(t={...t,crumbs:Q(e.crumbs.map(KT))}),e.primary!==void 0&&(t={...t,primary:Q(e.primary.map(qT))}),e.menu!==void 0&&(t={...t,menu:Q(e.menu.map(qT))}),e.status!==void 0&&(t={...t,status:Q(e.status.map(GT))}),Q(t)}var YT=Z(gT,JT,`INVALID_ARGUMENT`),XT=Z(_T,e=>{let t=e.title?.trim();return ZT({...JT({...e,title:t===void 0||t.length===0?void 0:t}),contractVersion:2})},`INVALID_ARGUMENT`),ZT=Z(gT,e=>Q({...JT(e),contractVersion:2}),`INVALID_ARGUMENT`),QT=Z(vT,e=>e.kind===`action`?Q({...e}):Q(e.siblingId===void 0?{kind:e.kind,crumbId:e.crumbId}:e),`INVALID_ARGUMENT`),$T=Z(yT,e=>e===null?null:Q({...e}),`INVALID_ARGUMENT`),eE=Z(xT,e=>Q({agents:Q([...new Set(e.agents??[])]),computers:Q([...new Set(e.computers??[])]),...e.git&&{git:Q([...new Set(e.git)])},...e.workflows&&{workflows:Q([...new Set(e.workflows)])},...e.events&&{events:Q([...new Set(e.events)])},...e.generation&&{generation:Q([...new Set(e.generation)])}}),`INVALID_ARGUMENT`),tE=Z(Yw,e=>e,`INVALID_ARGUMENT`);Z(ET,e=>Q(e));var nE=Z(X(512),e=>e),rE=Z(CT,e=>Q({...e}),`INVALID_ARGUMENT`);Z(G({id:X(160),repeat:W}),e=>Q(e));var iE=Z(cx($w).pipe(q(Lx(64))),e=>{if(new Set(e.map(e=>e.id)).size!==e.length)throw new J(`Reserved chords are invalid`,{code:`PROTOCOL`,retryable:!1});return Q(e.map(e=>Q({...e})))});function aE(e){return Z(G({value:tx,version:Bw}),t=>Q({value:e(t.value),version:t.version}))}var oE=aE(LT),sE=Z(G({capabilities:cx(tx).pipe(q(Lx(128))),context:tx}),e=>Q({capabilities:Q(e.capabilities.map(e=>pE(e))),context:oE(e.context)})),cE=aE(VT),lE=aE(iE),uE=aE(nE),dE=Ns(cE,e=>{if(e.value!==`connected`&&e.value!==`suspended`)throw new J(`The host lifecycle is invalid`,{code:`PROTOCOL`,retryable:!1});return Q({value:e.value,version:e.version})});function fE(e){return Z(G({handle:tx,id:X(160),version:Vw}),t=>{if(!(t.handle instanceof kw)&&!(e&&t.handle instanceof Aw))throw new J(`A capability handle is invalid`,{code:`PROTOCOL`,retryable:!1});return Q({handle:t.handle,id:t.id,version:t.version})})}var pE=fE(!1),mE=fE(!0);function hE(e){let t=e?mE:pE;return Z(G({capabilities:cx(tx).pipe(q(Lx(128))),context:tx,identity:tx,lifecycle:tx,reservedChords:tx,theme:tx}),e=>Q({capabilities:Q(e.capabilities.map(e=>t(e))),context:oE(e.context),identity:BT(e.identity),lifecycle:dE(e.lifecycle),reservedChords:lE(e.reservedChords),theme:uE(e.theme)}))}var gE=hE(!1);hE(!0);function _E(e){return Z(AT,t=>t.ok?Q({ok:!0,value:e(t.value)}):Q({ok:!1,error:RT(t.error)}))}var vE=_E(gE),yE=_E(Z(G({commandId:X(321)}),e=>Q(e)));_E(Z(nT,e=>{if(e.status===`failed`)return Q({status:`failed`,error:CE(()=>is(e.error))});let t=e.result===void 0?void 0:ns(e.result);return Q(t===void 0?{status:`handled`}:{status:`handled`,result:t})}));var bE=_E(Z(rx,()=>void 0)),xE=_E(Z(ST,e=>e)),SE=_E(Z(Xw,e=>e));_E(Z(W,e=>e)),_E(Z(W,e=>e));function CE(e){try{return e()}catch(e){throw new J(`The command metadata is invalid`,{cause:e,code:`INVALID_ARGUMENT`,retryable:!1})}}var wE=ux([G({kind:U(`saveFile`),name:X(255).pipe(q(bx(/^[^\p{Cc}/\\]+$/u))),mime:X(255),bytes:Gx}),G({kind:U(`copyText`),text:ix})]);function TE(e){let t=Zb(wE,{onExcessProperty:`error`})(e);if(Iu(t))return{kind:`refused`,reason:`invalid-request`};let n=t.success;return n.kind===`saveFile`?n.name===`.`||n.name===`..`?{kind:`refused`,reason:`invalid-request`}:n.bytes.byteLength>33554432?{kind:`refused`,reason:`too-large`}:{...n,bytes:new Uint8Array(n.bytes)}:n.text.length>1048576||new TextEncoder().encode(n.text).byteLength>1048576?{kind:`refused`,reason:`too-large`}:n}var EE=_E(Z(ux([G({kind:U(`saved`)}),G({kind:U(`copied`)}),G({kind:U(`refused`),reason:K([`no-user-gesture`,`too-large`,`invalid-request`,`unavailable`,`denied`,`busy`])})]),e=>Q(e)));function DE(e){let t=e,n=new Set;return{get:()=>t,subscribe(e){n.add(e);let t=!0;return()=>{t&&(t=!1,n.delete(e))}},update(e){if(!Object.is(t,e)){t=e;for(let e of Array.from(n))try{e(t)}catch(e){console.warn(`App store subscriber failed`,e)}}}}}function OE(e){let t=new Map,n=DE(0),r=!1,i=e=>{let t=new Map;try{for(let n of e){let e=pE(n),r=NE(e.id,e.version);if(t.has(r))throw AE(e.handle),new J(`Duplicate capability grant`,{code:`PROTOCOL`,retryable:!1});t.set(r,e.handle)}}catch(e){for(let e of t.values())AE(e);throw e}return t};for(let[n,r]of i(e))t.set(n,r);let a=e=>{for(let t of e)AE(t)},o=e=>{if(r)throw new J(`The app connection is disposed`,{code:`DISCONNECTED`,retryable:!0});let n=NE(e.id,e.version);return t.get(n)};return{directory:Object.freeze({get version(){return n.get()},subscribe:e=>n.subscribe(e),has(e){return!!o(e)},require(e){let t=o(e);if(!t)throw new J(`The capability is not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});try{return e.schema.parse(t)}catch(e){throw new J(`The capability interface is malformed`,{cause:e,code:`PROTOCOL`,retryable:!1})}}}),replace(e){if(r)throw new J(`The app connection is disposed`,{code:`DISCONNECTED`,retryable:!0});let o=i(e),s=[...t.values()];t.clear();for(let[e,n]of o)t.set(e,n);a(s.filter(e=>![...o.values()].includes(e))),n.update(n.get()+1)},disconnect(){r||(r=!0,a(t.values()),t.clear(),n.update(n.get()+1))}}}var kE=Ya().transform(e=>{let t=Xo(Object).safeParse(e);if(!t.success)return;let n=Object.create(t.data),r=Qb(G({[Symbol.dispose]:H(hx(Function))}))(n);return{owner:t.data,dispose:r[Symbol.dispose]}});function AE(e){try{let t=kE.parse(e);if(t===void 0||ME.has(t.owner))return;ME.add(t.owner),t.dispose?.call(t.owner)}catch(e){console.warn(`RPC value disposal failed`,e)}}function jE(e){return{value:e,[Symbol.dispose](){AE(e)}}}var ME=new WeakSet;function NE(e,t){return`${e}@${String(t)}`}var PE=class{id;version;#e;constructor(e,t,n){this.id=e,this.version=t,this.#e=n,Object.freeze(this)}get schema(){return this.#e}};function FE(e,t,n){return new PE(e,t,n)}function IE(e){let t=P(e),n=Xo(Object),r=P(Object.fromEntries(Object.keys(e).map(e=>[e,Ya().optional()])));return Ya().transform(e=>{let i=n.parse(e),a=Object.create(i),o=r.parse(a),s=Object.fromEntries(Object.entries(o).flatMap(([e,t])=>t===void 0?[]:[[e,Go().parse(t).bind(i)]]));return{...t.parse(s),[Symbol.dispose](){AE(e)}}})}function LE(e){return Ya().transform(t=>{try{return e.parse(t)}catch(e){throw e instanceof J?e:new J(`The capability returned malformed data`,{cause:e,code:`PROTOCOL`,retryable:!1})}finally{AE(t)}})}function RE(e){return Go({output:Uo(Ya().transform(t=>{try{return e.parse(t)}catch(e){throw AE(t),e instanceof J?e:new J(`The capability returned a malformed result`,{cause:e,code:`PROTOCOL`,retryable:!1})}}))})}var zE=RE(LE($a()));IE({fetch:RE(Xo(Response)),close:zE});var BE=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),VE=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function HE(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=HE(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function UE(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=HE(e))&&(r&&(r+=` `),r+=t);return r}var WE=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,GE=UE,KE=(e,t)=>n=>{if(t?.variants==null)return GE(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=WE(t)||WE(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return GE(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},qE=Object.defineProperty,JE=((e,t)=>{let n={};for(var r in e)qE(n,r,{get:e[r],enumerable:!0});return t||qE(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>cD,isAnyNonArbitrary:()=>pD,isArbitraryFamilyName:()=>AD,isArbitraryImage:()=>MD,isArbitraryLength:()=>DD,isArbitraryNumber:()=>OD,isArbitraryPosition:()=>jD,isArbitraryShadow:()=>ND,isArbitrarySize:()=>TD,isArbitraryValue:()=>ED,isArbitraryVariable:()=>PD,isArbitraryVariableFamilyName:()=>ID,isArbitraryVariableImage:()=>zD,isArbitraryVariableLength:()=>FD,isArbitraryVariablePosition:()=>LD,isArbitraryVariableShadow:()=>BD,isArbitraryVariableSize:()=>RD,isArbitraryVariableWeight:()=>VD,isArbitraryWeight:()=>kD,isFraction:()=>rD,isInteger:()=>aD,isNamedContainerQuery:()=>mD,isNumber:()=>iD,isPercent:()=>oD,isTshirtSize:()=>sD}),YE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,XE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$E=/\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$/,eD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rD=e=>ZE.test(e),iD=e=>!!e&&!Number.isNaN(Number(e)),aD=e=>!!e&&Number.isInteger(Number(e)),oD=e=>e.endsWith(`%`)&&iD(e.slice(0,-1)),sD=e=>QE.test(e),cD=()=>!0,lD=e=>$E.test(e)&&!eD.test(e),uD=()=>!1,dD=e=>tD.test(e),fD=e=>nD.test(e),pD=e=>!ED(e)&&!PD(e),mD=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),hD=(e,t,n)=>{let r=YE.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gD=(e,t,n=!1)=>{let r=XE.exec(e);return r?r[1]?t(r[1]):n:!1},_D=e=>e===`position`||e===`percentage`,vD=e=>e===`image`||e===`url`,yD=e=>e===`length`||e===`size`||e===`bg-size`,bD=e=>e===`length`,xD=e=>e===`number`,SD=e=>e===`family-name`,CD=e=>e===`number`||e===`weight`,wD=e=>e===`shadow`,TD=e=>hD(e,yD,uD),ED=e=>YE.test(e),DD=e=>hD(e,bD,lD),OD=e=>hD(e,xD,iD),kD=e=>hD(e,CD,cD),AD=e=>hD(e,SD,uD),jD=e=>hD(e,_D,uD),MD=e=>hD(e,vD,fD),ND=e=>hD(e,wD,dD),PD=e=>XE.test(e),FD=e=>gD(e,bD),ID=e=>gD(e,SD),LD=e=>gD(e,_D),RD=e=>gD(e,yD),zD=e=>gD(e,vD),BD=e=>gD(e,wD,!0),VD=e=>gD(e,CD,!0),HD=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},UD=e=>typeof e==`function`&&e.isThemeGetter===!0,WD=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),GD=(e,t)=>{let n=WD(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},KD={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},qD=25,JD=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),YD=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},XD=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),YD(e,n,t)}let n=t.$v,r=JE[n];if(KD[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return YD(e,n,r)},ZD=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),QD=(e,t)=>e.theme[t]??[],$D=(e,t,n)=>{let r=ZD(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=ZD(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(UD(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:XD(t,n),groupId:o});return}if(HD(n,`$t`)){for(let t of QD(e,n.$t))a(t,r,o);return}if(HD(n,`$v`)){(r.validators??=[]).push({validatorId:XD(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},eO=e=>{let t=JD(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=$D(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],ee=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)ee(e.oldTarget);return t};ee(0);let x=b.length,S=0;for(let e of b)S+=e.edges.length;let C=new Int32Array(x),te=new Int32Array(S),w=``,T=new Int32Array(x),ne=new Int32Array(x),E=[];{let e=0;for(let t=0;t<x;t++){let n=b[t];C[t]=n.edges.length;for(let t of n.edges)te[e]=t.label.length,w+=t.label,E.push(y.get(t.oldTarget)),e++;T[t]=n.groupId,ne[t]=n.vlist}}{let e=new Int32Array(x);for(let t=x-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<C[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<x;n++){let r=n+1;for(let i=0;i<C[n];i++){if(r!==E[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<x;n++){let r=ne[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),ne[n]=e[r])}d.length=0,d.push(...t)}let D=0;for(let e of d)D+=e.length;let O=new Int32Array(D),re=new Int32Array(D);{let e=0;for(let t of d)for(let[n,r]of t)O[e]=n,re[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let ie=[];for(let e of h){let t=ie[ie.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):ie.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let k=new Map,ae=[];for(let e of ie){let t=e.tails.join(` `),n=k.get(t);n===void 0&&(n=ae.length,k.set(t,n),ae.push(e.tails)),e.set=n}for(let e of ae.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let oe=new Set(ae.flat()).size;ie.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let se=n.length,A=new Int32Array(se).fill(-1),ce=0,le=e=>(A[e]===-1&&(A[e]=ce++),A[e]);for(let e=0;e<re.length;e++)re[e]=le(re[e]);for(let e of ie)e.gid=le(e.gid);for(let e=0;e<T.length;e++)T[e]>=0&&(T[e]=le(T[e]));for(let e=0;e<se;e++)A[e]===-1&&(A[e]=ce++);let ue=Array(se);for(let e=0;e<se;e++)ue[A[e]]=n[e];let de=[],fe=[],pe=[],me=[],he=[];for(let t=0;t<se;t++){let n=ue[t],i=(e.conflictingClassGroups[n]??[]).map(e=>A[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>A[r.get(e)]);i.length&&(de.push(t),fe.push(i.length),pe.push(...i));for(let e of a)me.push(t),he.push(e)}let ge=(e.postfixLookupClassGroups??[]).map(e=>A[r.get(e)]),_e=[],ve=new Int32Array(O.length);for(let e=0;e<O.length;e++){let n=t.names[O[e]],r=KD[n];if(r!==void 0)ve[e]=r;else{let t=_e.indexOf(n);t===-1&&(t=_e.length,_e.push(n)),ve[e]=qD+t}}let ye=new Map,be=[],xe=[],Se=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(ve[e++]);let r=n.join(`,`),i=ye.get(r);i===void 0&&(i=be.length,ye.set(r,i),be.push(n.length),xe.push(...n)),Se.push(i)}}let Ce={};for(let e of _e)Ce[e]=t.classifierFns.get(e);return{G:se,customNames:_e,impls:Ce,edgeCounts:C,edgeLabelLen:te,labelText:w,edgeTargetActual:E,nodeGroup:T,nodeVlist:ne,nodeCount:x,totalEdges:S,patCounts:be,patOps:xe,listPat:Se,vlistGroup:re,litEntries:h,sets:ae,attachments:ie,uniqueTailCount:oe,adjGid:de,adjCnt:fe,adjTgt:pe,patGid:me,patTgt:he,postfixLookup:ge,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},tO=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},nO=e=>{let t=eO(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:tO(t.edgeCounts),labelStart:tO(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:tO(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:tO(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},rO=`line`in Error(),iO=-1,aO=-1,oO=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},sO=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},cO=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:ee,patGid:x,patTgt:S,postfixLookupGroups:C,customValidatorNames:te,orderSensitiveModifiers:w}=e,T=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)T[y[e]]=e;let ne=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>ne&&(ne=t)}let E=32;for(;E<2*(1+ne+x.length);)E<<=1;let D=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)D[e+1]=D[e]+u[f[e]+1]-u[f[e]];let O=new Uint8Array(r);for(let e=0;e<C.length;e++)O[C[e]]=1;let re=i.length-1,ie=new Uint8Array(re),k=0,ae=!0;for(let e=0;e<m.length;e++){ie[m[e]]=1;let t=_[g[e]*2+1];t>k&&(k=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ae=!1)}let oe=1;for(;oe<m.length*2;)oe<<=1;let se=new Int32Array(oe).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(oO(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&oe-1;for(;se[n]!==-1;)n=n+1&oe-1;se[n]=e}let A=(e,t,n,r)=>{let i=(oO(t,n,r)^Math.imul(e,2654435761)|0)&oe-1,a=r-n;for(;;){let r=se[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&oe-1}},ce=n.cacheSize??8192,le=n.prefix??e.prefix??``,ue=le===``?``:le+`:`,de=ue.length,fe=(te??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),pe=/\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$/,me=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,he=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_e=0,ve=-1,ye=-1,be=-1,xe=-1,Se=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ce=e=>/\s/.test(String.fromCharCode(e)),we=(e,t,n)=>{if(_e=0,ve=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)_e=1;else if(r===40&&i===41)_e=2;else return;be=t+1,xe=n-1;let a=t+1;if(Se(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Se(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ve=t+1,ye=a,be=a+1)}},Te=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Ee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,De=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oe=e=>!!e&&!Number.isNaN(Number(e)),ke=(e,t,n)=>{if(n-t<11||!Te(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&Te(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&Te(e,t+10,t+18,`-normal/`)},Ae=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],je=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Me=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Ne=(e,t,n,r)=>{if(e>=10){if(e>=25)return fe[e-25](t.slice(n,r));let i=e-10;if(_e!==Ae[i])return!1;if(ve>=0){for(let e of je[i])if(Te(t,ve,ye,e))return!0;return!1}switch(Me[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(be,xe);return pe.test(e)&&!me.test(e)}case 3:return Oe(t.slice(be,xe));case 4:return ge.test(t.slice(be,xe));default:return he.test(t.slice(be,xe))}}switch(e){case 0:return!0;case 1:return _e===0;case 2:return _e===1;case 3:return _e===2;case 4:return Ee.test(t.slice(n,r));case 5:return Oe(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&Oe(t.slice(n,r-1));case 8:return De.test(t.slice(n,r));default:return ke(t,n,r)}},Pe=new Set(typeof w==`string`?w.split(` `):w),Fe=(e,t,n,r,i,a)=>{let o=oO(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ie=new Map,Le=new Map,Re=2,ze=4096,Be=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Pe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Le.get(s);return c===void 0&&Le.set(s,c=Re++),c},Ve=new Map,He=r,Ue=r+4096,We=()=>He++,Ge=2097152,Ke=8192,qe=new Int32Array(Ke),Je=Array(Ke).fill(null),Ye=new Int32Array(Ke),Xe=new Int32Array(Ke),Ze=new Uint8Array(Ke),Qe=0,$e=(e,t,n,r,i,a,o,s)=>{let c=e;if(Je[e]!==null){if(Je[e|1]===null)c=e|1;else if(!(Qe++&3))c=e|Qe>>2&1;else return}Je[c]=t.slice(n,r),qe[c]=i,Ye[c]=a,Xe[c]=o,Ze[c]=s},et=()=>Je.fill(null),tt=256,nt=[new Int32Array(tt),new Int32Array(tt),new Int32Array(tt),new Int32Array(tt)],[rt,it,at,ot]=nt,st=new Uint8Array(tt),ct=new Uint8Array(tt),lt=()=>{tt*=2,nt=nt.map(e=>{let t=new Int32Array(tt);return t.set(e),t}),[rt,it,at,ot]=nt;let e=new Uint8Array(tt);e.set(st),st=e,ct=new Uint8Array(tt)},ut=64,dt=new Int32Array(ut),ft=new Int32Array(ut),pt=new Int32Array(r),mt=2048,ht=21,gt=new Float64Array(mt),_t=new Int32Array(mt),vt=0,yt=(e,t)=>{if(e===0&&t<r)return pt[t]===vt?1:(pt[t]=vt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ht;for(;_t[i]===vt;){if(gt[i]===n)return 1;i=i+1&mt-1}return gt[i]=n,_t[i]=vt,0},bt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?iO:Fe(Ve,e,t+1,r,0,We)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ft[t];if(r>n)continue;let i=dt[t],a=n-r;if(ie[i]===1&&a>0&&a<=k){let t=e.charCodeAt(r);if(ae===!1||t!==91&&t!==40){let t=A(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;we(e,r,n);let h=D[o]-c;for(let t=c;t<m;t++)if(Ne(d[t],e,r,n))return p[h+t]}return iO},xt=e=>{let t=e.length,n=0,c=0,u=!1;(Re>ze||Ie.size>ze)&&(Ie=new Map,Le=new Map,Re=2,et()),He>Ue&&(Ve=new Map,He=r,et());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Ce(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&Ce(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&<();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(qe[y]===v&&Je[y]!==null&&Je[y].length===g?t=y:qe[y|1]===v&&Je[y|1]!==null&&Je[y|1].length===g&&(t=y|1),t>=0){let n=Je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){at[_]=Ye[t],ot[_]=Xe[t],st[_]=Ze[t];continue}}}let b=p;if(de!==0){if(h-p<=de||!e.startsWith(ue,p)){at[_]=iO,$e(y,e,p,h,v,iO,0,0);continue}b=p+de}let ee=0,x=0,S=-1,C=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(ee===0&&x===0){if(n===58){S=t;continue}if(n===47){C=t;continue}}n===91?ee++:n===93?ee--:n===40?x++:n===41&&x--}let te=S>=b?S+1:b,w=te,T=h,ne=!1,E=0;T>w&&e.charCodeAt(T-1)===33?(ne=!0,T--):T>w&&e.charCodeAt(w)===33&&(ne=!0,w++,E=1);let D=-1;C>te&&(D=C+E,D>=T&&(D=-1));let re=w;T-w>1&&e.charCodeAt(w)===45&&(re=w+1);let k=0,ae=0,oe=0,se=-1,A=0;(l[0]>=0||ie[0]===1)&&(dt[0]=0,ft[0]=re,A=1);let ce=aO,le=0;for(let t=re;t<T;t++)if(t===D&&(ce=ae<oe?aO:k,le=A),k!==aO){let n=e.charCodeAt(t),r=-1;if(ae<oe)o.charCodeAt(ae)===n?(ae++,ae===oe&&(r=k=se)):k=aO;else{let e=i[k],t=i[k+1],c=aO;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ae=e+1,oe=a[i+1],se=s[i],c=k);break}}k=c}if(r>=0&&(l[r]>=0||ie[r]===1)&&t+1<T&&e.charCodeAt(t+1)===45){if(A===ut){ut*=2;let e=new Int32Array(ut);e.set(dt),dt=e;let t=new Int32Array(ut);t.set(ft),ft=t}dt[A]=r,ft[A]=t+2,A++}}D===T&&(ce=ae<oe?aO:k,le=A);let fe=ae<oe?aO:k,pe,me=!1;if(D>=0){if(me=!0,pe=bt(e,w,D,ce,le),pe!==iO&&pe<r&&O[pe]){let t=bt(e,w,T,fe,A);t!==iO&&t!==pe&&(pe=t,me=!1)}else pe===iO&&(pe=bt(e,w,T,fe,A),me=!1)}else pe=bt(e,w,T,fe,A);let he=0,ge=0;pe===iO?at[_]=iO:(ge=+!!me,he=b>=S?+!!ne:Fe(Ie,e,b,S,+!!ne,e=>Be(e,ne)),at[_]=pe,st[_]=ge,ot[_]=he),$e(y,e,p,h,v,pe,he,ge)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*E>mt){for(;n*E>mt;)mt<<=1,ht--;gt=new Float64Array(mt),_t=new Int32Array(mt)}if(Re>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);vt=vt+1|0,vt===0&&(pt.fill(0),_t.fill(0),vt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===iO){ct[e]=1;continue}let n=ot[e];if(yt(n,t)===1){ct[e]=0,f=!0;continue}if(ct[e]=1,t<r){let r=T[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)yt(n,ee[e]);if(st[e]&1)for(let e=0;e<x.length;e++)x[e]===t&&yt(n,S[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!ct[m]){m++;continue}let t=rt[m],r=it[m],i=m+1;for(;i<n&&ct[i]&&rt[i]===r+1&&e.charCodeAt(r)===32;)r=it[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},St=16384,Ct=new Int32Array(St*2),wt=0,Tt=1,Et=Object.create(null),Dt=Object.create(null),Ot=new Map,kt=new Map,At=0,jt=0,Mt=()=>{wt^=St,Tt=Tt+1|0,jt=0},Nt=e=>{let t=Et[e];if(t!==void 0)return t;let n=sO(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=Dt[e],t!==void 0)?(Et[e]=t,t):(t=xt(e),i?(Et[e]=t,++At>ce&&(At=0,Dt=Et,Et=Object.create(null),Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},Pt=e=>{let t=Ot.get(e);if(t!==void 0)return t;let n=sO(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=kt.get(e),t!==void 0)?(Ot.set(e,t),t):(t=xt(e),i?(Ot.set(e,t),++At>ce&&(At=0,kt=Ot,Ot=new Map,Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},j=e=>{let t=sO(e,0,e.length),n=(t&16383)+wt;return Ct[n]===(t^Tt)||Ct[n^St]===(t^Tt-1)||(Ct[n]=t^Tt,++jt>St&&Mt(),!1)},Ft=ce===0?xt:rO?e=>{let t=Ot.get(e);return t===void 0?Pt(e):t}:Nt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Ft(arguments[0]):Ft(dO.apply(null,arguments))},mergeString:Ft,seenBefore:ce===0?()=>!1:j,mergeUncached:xt}},lO=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:lO(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},uO=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:lO(i,t);a&&(n&&(n+=` `),n+=a)}return n},dO=function(){return uO(arguments,!1)},fO=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=lO(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(lO(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},pO=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"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":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,mO=()=>JSON.parse(pO),hO=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,gO=e=>e===void 0?{config:mO()}:typeof e==`function`?{config:e(mO())}:hO(e)?{config:e}:{config:GD(mO(),e),cacheSize:e.cacheSize},_O=e=>{let{config:t,cacheSize:n}=gO(e),{tables:r,validatorImpls:i,prefix:a}=nO(t);return cO(r,i,{cacheSize:n,prefix:a})},vO=(e=>{let t=null,n=()=>t??=_O(e);return fO(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...VE]}}});function yO(e,t){return typeof e==`function`?e(t):e}function bO(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function xO(...e){return t=>{let n=!1,r=e.map(e=>{let r=bO(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():bO(e[t],null)}}}}function SO(...e){return F.useCallback(xO(...e),e)}function CO(e){let t=F.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];jO(r)&&typeof FO==`function`&&(r=FO(r._payload)),F.Children.forEach(r,e=>{if(kO(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;jO(n)&&typeof FO==`function`&&(n=FO(n._payload)),a=EO(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=F.cloneElement(a,void 0,s):!o&&F.Children.count(r)===1&&F.isValidElement(r)&&(a=r);let c=a?OO(a):void 0,l=SO(n,c);if(!a){if(r||r===0)throw Error(o?PO(e):NO(e));return r}let u=DO(i,a.props??{});return a.type!==F.Fragment&&(u.ref=n?l:c),F.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var wO=CO(`Slot`),TO=Symbol.for(`radix.slottable`),EO=(e,t)=>{if(`child`in e.props){let t=e.props.child;return F.isValidElement(t)?F.cloneElement(t,void 0,e.props.children(t.props.children)):null}return F.isValidElement(t)?t:null};function DO(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function OO(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kO(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===TO}var AO=Symbol.for(`react.lazy`);function jO(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===AO&&`_payload`in e&&MO(e._payload)}function MO(e){return typeof e==`object`&&!!e&&`then`in e}var NO=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,PO=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,FO=F.use,IO=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),LO=`(prefers-reduced-motion: reduce)`;function RO(e){let t=e.ownerDocument.defaultView;if(!t)return IO;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(LO).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,IO.squish),fast:o(`fast`,IO.fast),normal:o(`normal`,IO.normal),slow:o(`slow`,IO.slow),springDuration:o(`spring-duration`,IO.springDuration),bounce:Math.min(1,s(`bounce`,IO.bounce)),stretch:s(`stretch`,IO.stretch),distance:s(`distance`,IO.distance),stagger:a?0:i(`--stipe-motion-stagger`,IO.stagger),blur:s(`blur`,IO.blur),shake:s(`shake`,IO.shake),steps:Math.floor(s(`steps`,IO.steps)),fuse:r(`--stipe-motion-fuse`,IO.fuse),pressDepth:a?0:r(`--stipe-press-depth`,IO.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,IO.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||IO.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||IO.easeExit}}function zO(e){let[t,n]=(0,F.useState)(()=>({...IO,reduced:!0}));return(0,F.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=RO(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(i);for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`]});let o=r.matchMedia?.(LO);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function BO(e,t){return e.reduced?0:Math.round(t*e.normal/IO.normal)}function VO(e,t){if(e.reduced)return 0;let n=t*e.bounce/IO.bounce;return Math.min(.9,Math.max(0,n))}function HO(e,t){return e.reduced?0:Math.round(t*e.springDuration/IO.springDuration)}function UO(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function WO(e){return`animate`in e}var GO=globalThis;function KO(){return GO.matchMedia?.(LO).matches??!1}function qO(e){let t=GO.matchMedia?.(LO);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function JO(){return!0}function YO(){return(0,F.useSyncExternalStore)(qO,KO,JO)}var XO=(0,F.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=vO(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,Y.jsx)(wO,{...n,className:i,ref:r}):(0,Y.jsx)(`span`,{...n,className:i,ref:r})}),ZO=(0,F.forwardRef)(function({id:e,transform:t},n){return(0,Y.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,Y.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,Y.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function QO({id:e}){return(0,Y.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,Y.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function $O({id:e}){return(0,Y.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,Y.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,Y.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,Y.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,Y.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,Y.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,Y.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,Y.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,Y.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,Y.jsxs)(`feMerge`,{children:[(0,Y.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,Y.jsx)(`feMergeNode`,{in:`shade`}),(0,Y.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var ek=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function tk({id:e,values:t=BE}){return(0,Y.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,Y.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,Y.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function nk(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function rk(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function ik(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function ak(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=rk(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=rk((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+ik(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=ik(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var ok={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},sk=2;function ck({variant:e,pace:t=`working`}){let r=`caps-loader-${(0,F.useId)().replaceAll(`:`,``)}`,i=(0,F.useRef)(null),a=(0,F.useRef)(null),o=zO(a),{reduced:s}=o,c=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,F.useLayoutEffect)(()=>{if(!i.current||!a.current||s&&t===`idle`)return;let r=s?[n(i.current,{opacity:[.55,1],duration:o.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...i.current.querySelectorAll(`ellipse`)].map((r,i)=>n(r,{keyframes:Array.from({length:48},(n,r)=>({...ak(e,i,(r+1)/48),duration:BO(o,ok[e]*(t===`idle`?sk:1))/48})),ease:`linear`,loop:!0})),c=nk(a.current,e=>{for(let t of r)e?t.resume():t.pause()});return()=>{c();for(let e of r)e.revert()}},[e,t,s,o]),(0,Y.jsxs)(`svg`,{ref:a,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,Y.jsxs)(`defs`,{children:[(0,Y.jsx)(tk,{id:r,values:ek}),(0,Y.jsx)(ZO,{id:`${r}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,Y.jsx)(QO,{id:`${r}-shadow`}),(0,Y.jsx)(`mask`,{id:`${r}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,Y.jsx)(`g`,{ref:i,fill:`currentColor`,filter:`url(#${r})`,children:Array.from({length:c},(t,n)=>(0,Y.jsx)(`ellipse`,{...ak(e,n,0)},n))})})]}),(0,Y.jsx)(`g`,{filter:`url(#${r}-shadow)`,children:(0,Y.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${r}-surface)`,mask:`url(#${r}-mask)`})})]})}var lk={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},uk={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},dk=(0,F.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,F.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,Y.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:vO(`caps-loader`,lk[a],uk[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,Y.jsx)(ck,{variant:o,pace:s}),f?(0,Y.jsx)(XO,{id:d,children:i}):null]})}),fk=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,pk=KE(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${fk}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${fk}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),mk=(0,F.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=vO(pk({size:c,variant:l}),n),p=(0,F.useRef)(a).current,m=(0,F.useRef)(null);return(0,F.useImperativeHandle)(d,()=>m.current),hk(m,i,a),e?(0,Y.jsx)(wO,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,Y.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,Y.jsxs)(Y.Fragment,{children:[i?(0,Y.jsx)(dk,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,Y.jsx)(bk,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function hk(e,t,n){let r=(0,F.useRef)(null),i=(0,F.useRef)(null),a=(0,F.useRef)(null);(0,F.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!WO(o))return;let f=RO(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:UO(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var gk=1100;function _k(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:UO(t,`ease-out`)})}function vk(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:UO(t,`linear`)})}function yk(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:UO(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:UO(n,n.ease),fill:`backwards`})]}function bk({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,F.useRef)(null),s=YO(),[c,l]=(0,F.useState)(!1),[u,d]=(0,F.useState)(!1);c&&!u&&d(!0);let f=(0,F.useRef)(a),p=(0,F.useRef)(r);(0,F.useEffect)(()=>{p.current=r},[r]),(0,F.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},gk);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!WO(t))return;let n=RO(t);if(n.shake<=0)return;let r=vk(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,F.useRef)(c);return(0,F.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!WO(e)){c||d(!1);return}let r=RO(e),i=c?yk(t,n,r):yk(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(_k(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:UO(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,Y.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,Y.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,Y.jsx)(dk,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,Y.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,Y.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,Y.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}var xk={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},Sk=(0,F.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,Y.jsx)(mk,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:vO(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:vO(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,xk[n]),children:t})})}),Ck=(0,F.forwardRef)(function({tone:e=`neutral`,size:t=`md`,pressed:n=!1,touch:r,className:i,...a},o){return(0,Y.jsx)(`kbd`,{...a,ref:o,className:vO(`caps-keycap`,i),"data-tone":e,"data-size":t,"data-pressed":n,"data-touch":r})}),wk=(0,F.forwardRef)(function({label:e,shortcut:t,icon:n,readout:r,tone:i=`neutral`,density:a=`regular`,pressed:o,expanded:s,className:c,type:l=`button`,...u},d){let f=o??s;return(0,Y.jsxs)(`button`,{...u,ref:d,type:l,className:vO(`caps-keycap-button`,c),"data-tone":i,"data-density":a===`compact`?a:void 0,"aria-pressed":o,"aria-expanded":s,"aria-keyshortcuts":u[`aria-keyshortcuts`]??t,children:[f===void 0?null:(0,Y.jsx)(`span`,{className:`caps-keycap-led`,"data-lit":f,"aria-hidden":`true`}),n?(0,Y.jsx)(`span`,{className:`caps-keycap-button-icon`,"aria-hidden":`true`,children:n}):null,e===null?null:(0,Y.jsx)(`span`,{className:`caps-keycap-button-label`,children:e}),r,t?(0,Y.jsx)(Ck,{size:`sm`,tone:`neutral`,touch:`hide`,"aria-hidden":`true`,children:t}):null]})}),Tk=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ek=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Dk={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`},Ok=(0,F.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,F.createElement)(`svg`,{ref:c,...Dk,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ek(`lucide`,i),...s},[...o.map(([e,t])=>(0,F.createElement)(e,t)),...Array.isArray(a)?a:[a]])),kk=(e,t)=>{let n=(0,F.forwardRef)(({className:n,...r},i)=>(0,F.createElement)(Ok,{ref:i,iconNode:t,className:Ek(`lucide-${Tk(e)}`,n),...r}));return n.displayName=`${e}`,n};function Ak(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var jk=e=>{switch(e){case`success`:return Pk;case`info`:return Ik;case`warning`:return Fk;case`error`:return Lk;default:return null}},Mk=Array(12).fill(0),Nk=({visible:e,className:t})=>F.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},F.createElement(`div`,{className:`sonner-spinner`},Mk.map((e,t)=>F.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Pk=F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},F.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Fk=F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},F.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Ik=F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},F.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Lk=F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},F.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Rk=F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},F.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),F.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),zk=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},Bk=1,Vk=100,Hk=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:Bk++,Uk=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Vk;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=Hk(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],F.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Gk(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!F.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!F.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!F.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!F.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=Hk(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},Wk=(e,t)=>Uk.message(e,t),Gk=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Kk=Object.assign(Wk,{success:Uk.success,info:Uk.info,warning:Uk.warning,error:Uk.error,custom:Uk.custom,message:Uk.message,promise:Uk.promise,dismiss:Uk.dismiss,loading:Uk.loading},{getHistory:()=>Uk.toasts,getToasts:()=>Uk.getActiveToasts()});Ak(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function qk(e){return e.label!==void 0}var Jk=3,Yk=`24px`,Xk=`16px`,Zk=4e3,Qk=356,$k=14,eA=45,tA=200;function nA(...e){return e.filter(Boolean).join(` `)}function rA(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var iA=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:ee,expandByDefault:x,classNames:S,icons:C,closeButtonAriaLabel:te=`Close toast`}=e,[w,T]=F.useState(null),[ne,E]=F.useState(null),[D,O]=F.useState(!1),[re,ie]=F.useState(!1),[k,ae]=F.useState(!1),[oe,se]=F.useState(!1),[A,ce]=F.useState(!1),[le,ue]=F.useState(0),[de,fe]=F.useState(0),pe=F.useRef(n.duration||y||Zk),me=F.useRef(null),he=F.useRef(null),ge=c===0,_e=c+1<=o,ve=n.type,ye=ve??`default`,be=n.dismissible!==!1,xe=n.className||``,Se=n.descriptionClassName||``,Ce=F.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),we=F.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Te=F.useMemo(()=>n.duration||y||Zk,[n.duration,y]),Ee=F.useRef(0),De=F.useRef(0),Oe=F.useRef(0),ke=F.useRef(null),[Ae,je]=b.split(`-`),Me=F.useMemo(()=>s.reduce((e,t,n)=>n>=Ce?e:e+t.height,0),[s,Ce]),Ne=zk(),Pe=F.useMemo(()=>e.swipeDirections??rA(b),[e.swipeDirections,b]),Fe=n.invert||t,Ie=ve===`loading`;De.current=F.useMemo(()=>Ce*ee+Me,[Ce,Me]),F.useEffect(()=>{pe.current=Te},[Te]),F.useEffect(()=>{O(!0)},[]),F.useEffect(()=>{let e=he.current;if(e){let t=e.getBoundingClientRect().height;return fe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),F.useLayoutEffect(()=>{if(!D)return;let e=he.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,fe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[D,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Le=F.useCallback(()=>{ie(!0),ue(De.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},tA)},[n,d,a,De]);F.useEffect(()=>{if(n.promise&&ve===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ne?(()=>{if(Oe.current<Ee.current){let e=new Date().getTime()-Ee.current;pe.current-=e}Oe.current=new Date().getTime()})():pe.current!==1/0&&(Ee.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Le()},pe.current)),()=>clearTimeout(e)},[u,i,n,ve,Ne,Le]),F.useEffect(()=>{n.delete&&(Le(),n.onDismiss==null||n.onDismiss.call(n,n))},[Le,n.delete]);function Re(){return C?.loading?F.createElement(`div`,{className:nA(S?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ve===`loading`},C.loading):F.createElement(Nk,{className:nA(S?.loader,n?.classNames?.loader),visible:ve===`loading`})}let ze=n.icon||C?.[ve]||jk(ve);return F.createElement(`li`,{tabIndex:0,ref:he,className:nA(_,xe,S?.toast,n?.classNames?.toast,S?.[ye],n?.classNames?.[ye]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":D,"data-promise":!!n.promise,"data-swiped":A,"data-removed":re,"data-visible":_e,"data-y-position":Ae,"data-x-position":je,"data-index":c,"data-front":ge,"data-swiping":k,"data-dismissible":be,"data-type":ve,"data-invert":Fe,"data-swipe-out":oe,"data-swipe-direction":ne,"data-expanded":!!(u||x&&D),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${re?le:De.current}px`,"--initial-height":x?`auto`:`${de}px`,...m,...n.style},onDragEnd:()=>{ae(!1),T(null),ke.current=null},onPointerDown:e=>{e.button!==2&&(Ie||!be||(me.current=new Date,ue(De.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),ke.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(oe||!be)return;ke.current=null;let e=Number(he.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(he.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-me.current?.getTime(),i=w===`x`?e:t,a=Math.abs(i)/r;if((w===`x`?Pe.includes(e>0?`right`:`left`):Pe.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=eA||a>.11)){ue(De.current),n.onDismiss==null||n.onDismiss.call(n,n),E(w===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Le(),se(!0);return}var o,s;(o=he.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=he.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ce(!1),ae(!1),T(null)},onPointerMove:e=>{var t,n;if(!ke.current||!be||window.getSelection()?.toString().length>0)return;let r=e.clientY-ke.current.y,i=e.clientX-ke.current.x;!w&&(Math.abs(i)>1||Math.abs(r)>1)&&T(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(w===`y`){if(Pe.includes(`top`)||Pe.includes(`bottom`)){if(Pe.includes(`top`)&&r<0||Pe.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(w===`x`&&(Pe.includes(`left`)||Pe.includes(`right`))){if(Pe.includes(`left`)&&i<0||Pe.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ce(!0),(t=he.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=he.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},we&&!n.jsx&&ve!==`loading`?F.createElement(`button`,{"aria-label":te,"data-disabled":Ie,"data-close-button":!0,onClick:Ie||!be?()=>{}:()=>{Le(),n.onDismiss==null||n.onDismiss.call(n,n)},className:nA(S?.closeButton,n?.classNames?.closeButton)},C?.close??Rk):null,(ve||n.icon||n.promise)&&n.icon!==null&&(C?.[ve]!==null||n.icon)?F.createElement(`div`,{"data-icon":``,className:nA(S?.icon,n?.classNames?.icon)},ve===`loading`?n.icon||Re():n.promise?Re():null,ve===`loading`?null:ze):null,F.createElement(`div`,{"data-content":``,className:nA(S?.content,n?.classNames?.content)},F.createElement(`div`,{"data-title":``,className:nA(S?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?F.createElement(`div`,{"data-description":``,className:nA(v,Se,S?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),F.isValidElement(n.cancel)?n.cancel:n.cancel&&qk(n.cancel)?F.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{qk(n.cancel)&&be&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Le())},className:nA(S?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,F.isValidElement(n.action)?n.action:n.action&&qk(n.action)?F.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{qk(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Le())},className:nA(S?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function aA(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function oA(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Xk:Yk;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var sA=F.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Jk,toastOptions:g,dir:_=aA(),gap:v=$k,icons:y,customAriaLabel:b,containerAriaLabel:ee=`Notifications`}=e,[x,S]=F.useState([]),C=F.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),te=F.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[w,T]=F.useState([]),[ne,E]=F.useState(!1),[D,O]=F.useState(!1),[re,ie]=F.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),k=F.useRef(null),ae=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),oe=F.useRef(null),se=F.useRef(!1),A=F.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||Uk.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return F.useEffect(()=>Uk.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{aC.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),F.useEffect(()=>{if(d!==`system`){ie(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ie(`dark`):ie(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ie(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ie(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),F.useEffect(()=>{x.length<=1&&E(!1)},[x]),F.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;E(!0),(t=k.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===k.current||k.current?.contains(document.activeElement))&&E(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),F.useEffect(()=>{if(k.current)return()=>{oe.current&&(oe.current.focus({preventScroll:!0}),oe.current=null,se.current=!1)}},[k.current]),F.createElement(`section`,{ref:t,"aria-label":b??`${ee} ${ae}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},te.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?F.createElement(`ol`,{key:t,dir:_===`auto`?aA():_,tabIndex:-1,ref:k,className:c,"data-sonner-toaster":!0,"data-sonner-theme":re,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${w[0]?.height||0}px`,"--width":`${Qk}px`,"--gap":`${v}px`,...m,...oA(l,u)},onBlur:e=>{se.current&&!e.currentTarget.contains(e.relatedTarget)&&(se.current=!1,oe.current&&=(oe.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||se.current||(se.current=!0,oe.current=e.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{D||E(!1)},onDragEnd:()=>E(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||O(!0)},onPointerUp:()=>O(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>F.createElement(iA,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:D,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:A,toasts:C.filter(e=>e.position==n.position),heights:w.filter(e=>e.position==n.position),setHeights:T,expandByDefault:o,gap:v,expanded:ne,swipeDirections:e.swipeDirections}))):null}))});function cA(e){return/\.mp3$/iu.test(e)}var lA=Object.freeze({width:4,height:3}),uA=`prints-generation-notices`;function dA(e){Kk.error(e,{id:`prints-playback-error`,toasterId:uA})}var fA=function(e,t,n){if(t!=null){if(typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Object expected.`);var r,i;if(n){if(!Symbol.asyncDispose)throw TypeError(`Symbol.asyncDispose is not defined.`);r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw TypeError(`Symbol.dispose is not defined.`);r=t[Symbol.dispose],n&&(i=r)}if(typeof r!=`function`)throw TypeError(`Object not disposable.`);i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t},pA=(function(e){return function(t){function n(n){t.error=t.hasError?new e(n,t.error,`An error was suppressed during disposal.`):n,t.hasError=!0}var r,i=0;function a(){for(;r=t.stack.pop();)try{if(!r.async&&i===1)return i=0,t.stack.push(r),Promise.resolve().then(a);if(r.dispose){var e=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(e).then(a,function(e){return n(e),a()})}else i|=1}catch(e){n(e)}if(i===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return a()}})(typeof SuppressedError==`function`?SuppressedError:function(e,t,n){var r=Error(n);return r.name=`SuppressedError`,r.error=e,r.suppressed=t,r}),mA=class extends J{stage;provider;constructor(e){super(e.message,{code:e.code,retryable:e.retryable,...e.need!==void 0&&{need:e.need}}),this.stage=e.stage??null,this.provider=e.provider}},hA=e=>ix.pipe(q(Px(1)),q(Lx(e))),gA=G({requestId:hA(256),computerId:hA(256)}),_A=ax.pipe(q(Mx()),q(_x(Number.isSafeInteger,{message:`Expected a safe integer`}))),$=_A.pipe(q(Ox(0))),vA=_A.pipe(q(kx(0))),yA=ax.pipe(q(Sx()),q(kx(0))),bA=ax.pipe(q(Sx()),q(Ox(0))),xA=K([`first-frame`,`last-frame`,`reference`]),SA=K([`480p`,`720p`,`768p`,`1080p`,`4k`]),CA=K([`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`,`9:21`]),wA=G({computerId:H(hA(256)),path:hA(4096),role:H(xA)}),TA=G({path:hA(4096),role:xA}),EA=G({computerId:hA(256),path:hA(4096)}),DA=G({defaultHeight:$,defaultSteps:dx(vA),defaultWidth:$,dimensions:K([`none`,`own`]),guidance:dx(G({default:yA,max:bA,min:yA})).pipe(ex),maxDimension:dx($),maxDimensionDocumented:W,maxReferences:vA,maxSteps:dx($),referenceDimension:dx($),referenceField:dx(hA(256)),referenceFormat:K([`png`,`webp`]),steps:K([`steps`,`num_steps`,`fixed`]),transport:K([`json`,`multipart`])}),OA=G({minSeconds:$,maxSeconds:$,defaultSeconds:$,durations:cx($),provider:K([`seedance`,`veo`,`minimax`]),formats:cx(G({resolution:SA,aspectRatio:CA,width:$,height:$})),defaultResolution:SA,defaultAspectRatio:CA,supportsAudio:W,defaultGenerateAudio:dx(W),referenceRoles:cx(xA),maxReferenceImages:vA,audioReferences:dx(G({max:$,totalSeconds:$})),referenceResolutions:cx(SA),prices:cx(G({resolution:SA,silentMilliunitsPerSecond:$,audioMilliunitsPerSecond:$}))}),kA=G({provider:U(`elevenlabs`),mode:K([`speech`,`music`]),voices:cx(G({id:hA(64),label:hA(128)})),defaultVoiceId:dx(hA(64)),seconds:dx(G({min:$,max:$,default:$})),milliunitsPerUnit:$}),AA=G({operation:K([`remove_background`,`upscale`]),source:G({formats:cx(K([`png`,`jpeg`,`webp`])),maxBytes:$,maxPixels:$}),defaultMegapixels:dx($),milliunits:dx($),sizes:cx(G({megapixels:$,milliunits:$}))}),jA=cx(G({id:hA(256),input:DA,kind:K([`image`,`video`,`audio`]),label:hA(512),maxPromptLength:$,tier:K([`draft`,`balanced`,`premium`,`max`]),outputFormats:cx(K([`png`,`jpeg`,`webp`])).pipe(q(Lx(3))),sizes:dx(cx(ix.pipe(q(bx(/^\d+x\d+$/u))))),video:dx(OA),audio:dx(kA),transform:dx(AA),billingUnit:K([`image`,`video_second`,`audio_second`,`audio_character_block`])})),MA=G({[Symbol.dispose]:H(tx),computerId:hA(256),models:jA,canGenerate:W}),NA=G({model:hA(256),prompt:hA(32e3),width:H($.pipe(q(Ax(5040)))),height:H($.pipe(q(Ax(5040)))),voiceId:H(hA(64)),steps:H($),durationSeconds:H($),targetMegapixels:H($),resolution:H(SA),aspectRatio:H(CA),generateAudio:H(W),references:H(cx(wA).pipe(q(Lx(16))))});G({model:hA(256),prompt:hA(2048),resolution:H(SA),aspectRatio:H(CA),durationSeconds:H($.pipe(q(kx(4)),q(Ax(15)))),generateAudio:H(W),references:H(cx(TA).pipe(q(Lx(4))))});var PA=[`admission`,`generation-authorization`,`settings`,`estimate`,`billing`,`operation`,`provider`,`normalization`,`artifact`,`destination-authorization`,`destination-write`],FA=G({destination:G({path:hA(4096)}),settings:tx}),IA=G({[Symbol.dispose]:H(tx),bytes:$,costMilliunits:vA,destination:EA,format:K([`png`,`jpeg`,`gif`,`webp`,`mp4`,`mp3`]),height:H($),model:hA(256),width:H($)});G({...IA.fields,format:U(`mp4`)});var LA=G({message:hA(512),stage:H(K(PA)),provider:H(Qx),code:K([`CANCELLED`,`CAPABILITY_DENIED`,`CAPABILITY_REVOKED`,`DAILY_LIMIT_REACHED`,`DISCONNECTED`,`HOST_FAILURE`,`IDENTITY`,`INSUFFICIENT_CREDIT`,`INVALID_ARGUMENT`,`MEDIA_PROVIDER_FAILURE`,`MEDIA_PROVIDER_FAILURE_UNCHARGED`,`PROTOCOL`,`SAFETY_FILTER_REFUSED`,`SETUP_REQUIRED`,`TIMEOUT`]),retryable:W,need:H(qx)}),RA=ux([G({[Symbol.dispose]:H(tx),kind:U(`succeeded`),result:IA}),G({[Symbol.dispose]:H(tx),kind:U(`failed`),failure:LA})]),zA=IE({reference:RE(LE(Ya().transform(e=>Qb(gA)(e)))),generate:RE(LE(Ya().transform(e=>{let t=Qb(RA,{onExcessProperty:`error`})(e);return t.kind===`succeeded`?{kind:t.kind,result:{bytes:t.result.bytes,costMilliunits:t.result.costMilliunits,destination:t.result.destination,format:t.result.format,...t.result.height!==void 0&&{height:t.result.height},model:t.result.model,...t.result.width!==void 0&&{width:t.result.width}}}:{kind:t.kind,failure:t.failure}})))}),BA=FE(`media.generation`,5,Vo(()=>IE({describe:RE(LE(Ya().transform(e=>{let{computerId:t,canGenerate:n,models:r}=Qb(MA,{onExcessProperty:`error`})(e);return{computerId:t,canGenerate:n,models:r}}))),quote:RE(LE(ro({costMilliunits:Va().int().nonnegative().max(2**53-1)}))).optional(),createAttempt:RE(zA),restoreAttempt:RE(zA),cancelAttempt:zE}))),VA=oo([ro({shared:yo(!1)}),ro({shared:yo(!0),url:wa(),showPrompt:Ga()})]);ro({requestId:_a().min(1).max(256),showPrompt:Ga()});var HA=FE(`media.share`,1,Vo(()=>IE({status:RE(LE(VA)),share:RE(LE(VA)),stop:RE(LE(VA))})));function UA(e,t){try{return Qb(e,{onExcessProperty:`error`})(t)}catch(e){throw new J(`The Media capability returned malformed data`,{cause:e,code:`PROTOCOL`,retryable:!1})}}function WA(e){return e instanceof J?e:new J(`The Media capability failed`,{cause:e,code:`HOST_FAILURE`,retryable:!0})}function GA(e){if(e?.aborted)throw new J(`Media generation was cancelled`,{code:`CANCELLED`,retryable:!1})}function KA(e){let t;try{t=Qb(FA,{onExcessProperty:`error`})(e)}catch(e){throw new J(`Media generation input is invalid`,{cause:e,code:`INVALID_ARGUMENT`,retryable:!1})}let n;try{n=JA(Qb(NA,{onExcessProperty:`error`})(t.settings))}catch(e){throw new J(`Media generation settings are invalid`,{cause:e,code:`INVALID_ARGUMENT`,retryable:!1})}let r={path:t.destination.path.trim()};if(r.path.length===0)throw new J(`Media generation destination is invalid`,{code:`INVALID_ARGUMENT`,retryable:!1});return Object.freeze({destination:Object.freeze(r),settings:n})}function qA(e){try{return JA(Qb(NA,{onExcessProperty:`error`})(e))}catch(e){throw new J(`Media generation settings are invalid`,{cause:e,code:`INVALID_ARGUMENT`,retryable:!1})}}function JA(e){let t=(e,t)=>{let n=e.trim();if(n.length===0)throw Error(`${t} must not be blank`);return n},n={model:t(e.model,`model`),prompt:t(e.prompt,`prompt`)};return e.width!==void 0&&(n.width=e.width),e.height!==void 0&&(n.height=e.height),e.voiceId!==void 0&&(n.voiceId=t(e.voiceId,`voiceId`)),e.steps!==void 0&&(n.steps=e.steps),e.durationSeconds!==void 0&&(n.durationSeconds=e.durationSeconds),e.targetMegapixels!==void 0&&(n.targetMegapixels=e.targetMegapixels),e.resolution!==void 0&&(n.resolution=e.resolution),e.aspectRatio!==void 0&&(n.aspectRatio=e.aspectRatio),e.generateAudio!==void 0&&(n.generateAudio=e.generateAudio),e.references!==void 0&&(n.references=Object.freeze(e.references.map(e=>Object.freeze({...e,path:t(e.path,`reference`)})))),Object.freeze(n)}function YA(e){let t=UA(jA,e),n=new Set;for(let e of t){if(n.has(e.id))throw new J(`The Media capability repeated a model`,{code:`PROTOCOL`,retryable:!1});n.add(e.id)}return Object.freeze(t.map(e=>Object.freeze(e)))}function XA(e,t,n,r){let i=UA(IA,e);if(i.model!==t.settings.model||i.destination.computerId!==n||i.destination.path!==t.destination.path||i.width!==t.settings.width||i.height!==t.settings.height||!r&&t.settings.width===void 0!=(i.format===`mp3`))throw new J(`The Media capability returned an unrelated result`,{code:`PROTOCOL`,retryable:!1});return Object.freeze({bytes:i.bytes,costMilliunits:i.costMilliunits,destination:Object.freeze({...i.destination}),format:i.format,...i.height!==void 0&&{height:i.height},model:i.model,...i.width!==void 0&&{width:i.width}})}async function ZA(e){try{let t=e.require(BA);{let e={stack:[],error:void 0,hasError:!1};try{let n=UA(MA,fA(e,jE(await t.describe()),!1).value),r=n.computerId.trim();if(r.length===0)throw new J(`The Media capability returned no Computer`,{code:`PROTOCOL`,retryable:!1});let i=YA(n.models),a=t.quote?.bind(t),o=async e=>{let n=jE(e),a;try{{let t={stack:[],error:void 0,hasError:!1};try{let n=fA(t,jE(await e.reference()),!1),i=UA(G({...gA.fields,[Symbol.dispose]:H(tx)}),n.value);if(a={requestId:i.requestId,computerId:i.computerId},a.computerId!==r)throw new J(`Media attempt belongs to another Computer`,{code:`IDENTITY`,retryable:!1})}catch(e){t.error=e,t.hasError=!0}finally{pA(t)}}}catch(e){throw n[Symbol.dispose](),WA(e)}let o=!1;return{reference:Object.freeze(a),async generate(n,s={}){if(o)throw new J(`Media generation attempt is closed`,{code:`CAPABILITY_DENIED`,retryable:!1});GA(s.signal);let c=KA(n),l=s.signal,u,d,f=()=>(d??=t.cancelAttempt(a),d);try{let t=e.generate(c),n=l===void 0?await t:await Promise.race([t,new Promise((e,t)=>{u=()=>{f().then(()=>{t(new J(`Media generation was cancelled`,{code:`CANCELLED`,retryable:!1}))},t)},l.addEventListener(`abort`,u,{once:!0}),l.aborted&&u()})]);l?.aborted&&(await f(),GA(l)),GA(l);{let e={stack:[],error:void 0,hasError:!1};try{let t=UA(RA,fA(e,jE(n),!1).value);if(t.kind===`failed`)throw new mA(t.failure);return XA(t.result,c,r,i.find(e=>e.id===c.settings.model)?.transform!=null)}catch(t){e.error=t,e.hasError=!0}finally{pA(e)}}}catch(e){throw l?.aborted&&(await f(),GA(l)),WA(e)}finally{u!==void 0&&l?.removeEventListener(`abort`,u)}},[Symbol.dispose](){o||(o=!0,n[Symbol.dispose]())}}};return Object.freeze({computerId:r,canGenerate:n.canGenerate,models:i,async quote(e){let t={stack:[],error:void 0,hasError:!1};try{let n=qA(e);if(a===void 0)return null;let r=fA(t,jE(await a(n)),!1);return Object.freeze({costMilliunits:r.value.costMilliunits})}catch(e){t.error=e,t.hasError=!0}finally{pA(t)}},async createAttempt(){return o(await t.createAttempt())},async restoreAttempt(e){let n=UA(gA,e);if(n.computerId!==r)throw new J(`Select the original Computer to retry this generation`,{code:`IDENTITY`,retryable:!1});let i=await o(await t.restoreAttempt(n));if(i.reference.requestId!==n.requestId)throw i[Symbol.dispose](),new J(`Media restore changed the request identity`,{code:`PROTOCOL`,retryable:!1});return i}})}catch(t){e.error=t,e.hasError=!0}finally{pA(e)}}}catch(e){throw WA(e)}}function QA(e,t){console.error(`Prints operation failed`,JSON.stringify({operation:e,errorKind:t instanceof Error?`error`:`non-error`,stage:t instanceof mA?t.stage:null,provider:t instanceof mA?t.provider:void 0}),mh(t))}export{FT as $,Wg as $n,ho as $r,mS as $t,BO as A,fx as An,Wa as Ar,jw as At,zE as B,Jb as Bn,N as Br,VS as Bt,ZO as C,dx as Cn,Ks as Cr,Lw as Ct,VO as D,G as Dn,is as Dr,Nw as Dt,WO as E,ix as En,_s as Er,Pw as Et,yO as F,Xb as Fn,Ba as Fr,JS as Ft,jT as G,Lx as Gn,Ga as Gr,NS as Gt,OE as H,Ox as Hn,_o as Hr,zS as Ht,KE as I,Zb as In,no as Ir,qS as It,TE as J,_x as Jn,Vo as Jr,SS as Jt,$T as K,Px as Kn,qo as Kr,FS as Kt,LE as L,Qb as Ln,So as Lr,YS as Lt,zO as M,px as Mn,go as Mr,eC as Mt,YO as N,q as Nn,vo as Nr,ZS as Nt,UO as O,Ux as On,ns as Or,kw as Ot,vO as P,Bb as Pn,Eo as Pr,XS as Pt,PT as Q,qb as Qn,P as Qr,yS as Qt,IE as R,Vx as Rn,Io as Rr,GS as Rt,QO as S,nx as Sn,Au as Sr,bE as St,XO as T,sx as Tn,qs as Tr,Fw as Tt,AE as U,kx as Un,Xo as Ur,LS as Ut,FE as V,jx as Vn,ao as Vr,BS as Vt,DE as W,Mx as Wn,to as Wr,MS as Wt,MT as X,ex as Xn,io as Xr,gS as Xt,EE as Y,H as Yn,yo as Yr,xS as Yt,NT as Z,Kx as Zn,Va as Zr,bS as Zt,mk as _,i as _i,xx as _n,ju as _r,SE as _t,gA as a,or as ai,IS as an,zg as ar,sE as at,tk as b,K as bn,Nu as br,nE as bt,KA as c,j as ci,dS as cn,Xv as cr,WT as ct,dA as d,De as di,oS as dn,Nv as dr,XT as dt,ro as ei,CS as en,Vg as er,IT as et,sA as f,ke as fi,J as fn,$h as fr,xE as ft,Sk as g,o as gi,W as gn,ku as gr,tE as gt,wk as h,O as hi,cx as hn,Lu as hr,iE as ht,FA as i,Sa as ii,ES as in,Gg as ir,zT as it,RO as j,ux as jn,Oo as jr,iC as jt,HO as k,rx as kn,eo as kr,Aw as kt,lA as l,Ce as li,lS as ln,Qv as lr,QT as lt,kk as m,v as mi,iS as mn,Iu as mr,yE as mt,mA as n,oo as ni,TS as nn,Ig as nr,RT as nt,HA as o,In as oi,PS as on,Lg as or,BT as ot,Kk as p,D as pi,$x as pn,mh as pr,eE as pt,vE as q,bx as qn,Zo as qr,hS as qt,BA as r,Ya as ri,vS as rn,Bg as rr,aE as rt,ZA as s,Sn as si,_S as sn,Kg as sr,VT as st,QA as t,_a as ti,jS as tn,Hg as tr,LT as tt,cA as u,Te as ui,cS as un,Zv as ur,YT as ut,dk as v,Nx as vn,Mu as vr,UT as vt,ek as w,ax as wn,Xs as wr,Iw as wt,$O as x,zx as xn,Ou as xr,rE as xt,nk as y,U as yn,Du as yr,HT as yt,RE as z,hx as zn,ga as zr,WS as zt};
|