@telepath-computer/television 0.1.107 → 0.1.109

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.
@@ -1,7 +1,7 @@
1
1
  var Mw=Object.defineProperty;var Vd=n=>{throw TypeError(n)};var Nw=(n,t,e)=>t in n?Mw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var m=(n,t,e)=>Nw(n,typeof t!="symbol"?t+"":t,e),sc=(n,t,e)=>t.has(n)||Vd("Cannot "+e);var l=(n,t,e)=>(sc(n,t,"read from private field"),e?e.call(n):t.get(n)),w=(n,t,e)=>t.has(n)?Vd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),S=(n,t,e,r)=>(sc(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),f=(n,t,e)=>(sc(n,t,"access private method"),e);var jd=(n,t,e,r)=>({set _(i){S(n,t,i,e)},get _(){return l(n,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function e(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=e(i);fetch(i.href,s)}})();var ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uw(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var Gd=Object.prototype.toString,qg=function(t){var e=Gd.call(t),r=e==="[object Arguments]";return r||(r=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Gd.call(t.callee)==="[object Function]"),r},oc,qd;function Fw(){if(qd)return oc;qd=1;var n;if(!Object.keys){var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=qg,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(v){var g=v.constructor;return g&&g.prototype===v},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if(typeof window>"u")return!1;for(var v in window)try{if(!u["$"+v]&&t.call(window,v)&&window[v]!==null&&typeof window[v]=="object")try{c(window[v])}catch{return!0}}catch{return!0}return!1}(),p=function(v){if(typeof window>"u"||!h)return c(v);try{return c(v)}catch{return!1}};n=function(g){var _=g!==null&&typeof g=="object",k=e.call(g)==="[object Function]",T=r(g),P=_&&e.call(g)==="[object String]",R=[];if(!_&&!k&&!T)throw new TypeError("Object.keys called on a non-object");var W=o&&k;if(P&&g.length>0&&!t.call(g,0))for(var N=0;N<g.length;++N)R.push(String(N));if(T&&g.length>0)for(var F=0;F<g.length;++F)R.push(String(F));else for(var Y in g)!(W&&Y==="prototype")&&t.call(g,Y)&&R.push(String(Y));if(s)for(var j=p(g),le=0;le<a.length;++le)!(j&&a[le]==="constructor")&&t.call(g,a[le])&&R.push(a[le]);return R}}return oc=n,oc}var Hw=Array.prototype.slice,Ww=qg,Yd=Object.keys,va=Yd?function(t){return Yd(t)}:Fw(),Xd=Object.keys;va.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(r){return Ww(r)?Xd(Hw.call(r)):Xd(r)})}else Object.keys=va;return Object.keys||va};var Zw=va,ya=Object.defineProperty||!1;if(ya)try{ya({},"a",{value:1})}catch{ya=!1}var To=ya,fn=SyntaxError,X=TypeError,Bw=Object.getOwnPropertyDescriptor,ba=Bw;if(ba)try{ba([],"length")}catch{ba=null}var Wi=ba,Kd=To,Vw=fn,Xr=X,Jd=Wi,Yg=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xr("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new Xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xr("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!Jd&&Jd(t,e);if(Kd)Kd(t,e,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:r,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)t[e]=r;else throw new Vw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ru=To,Xg=function(){return!!ru};Xg.hasArrayLengthDefineBug=function(){if(!ru)return null;try{return ru([],"length",{value:1}).length!==1}catch{return!0}};var El=Xg,jw=Zw,Gw=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",qw=Object.prototype.toString,Yw=Array.prototype.concat,Qd=Yg,Xw=function(n){return typeof n=="function"&&qw.call(n)==="[object Function]"},Kg=El(),Kw=function(n,t,e,r){if(t in n){if(r===!0){if(n[t]===e)return}else if(!Xw(r)||!r())return}Kg?Qd(n,t,e,!0):Qd(n,t,e)},Jg=function(n,t){var e=arguments.length>2?arguments[2]:{},r=jw(t);Gw&&(r=Yw.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)Kw(n,r[i],t[r[i]],e[r[i]])};Jg.supportsDescriptors=!!Kg;var Fr=Jg,wa={exports:{}};typeof self<"u"?wa.exports=self:typeof window<"u"?wa.exports=window:wa.exports=Function("return this")();var Qg=wa.exports,Jw=Qg,em=function(){return typeof ir!="object"||!ir||ir.Math!==Math||ir.Array!==Array?Jw:ir},Qw=Fr,e0=Wi,t0=em,n0=function(){var t=t0();if(Qw.supportsDescriptors){var e=e0(t,"globalThis");(!e||e.configurable&&(e.enumerable||!e.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!0})}else(typeof globalThis!="object"||globalThis!==t)&&(t.globalThis=t);return t},r0=Fr,i0=Qg,tm=em,s0=n0,o0=tm(),nm=function(){return o0};r0(nm,{getPolyfill:tm,implementation:i0,shim:s0});var fh=nm,gn=function(t){return!!t&&(typeof t=="function"||typeof t=="object")},gh=Object,rm=Error,a0=EvalError,l0=RangeError,mh=ReferenceError,c0=URIError,u0=Math.abs,h0=Math.floor,d0=Math.max,p0=Math.min,f0=Math.pow,g0=Math.round,vh=Number.isNaN||function(t){return t!==t},m0=vh,v0=function(t){return m0(t)||t===0?t:t<0?-1:1},Zi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==i||a.enumerable!==!0)return!1}return!0},ep=typeof Symbol<"u"&&Symbol,y0=Zi,yh=function(){return typeof ep!="function"||typeof Symbol!="function"||typeof ep("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:y0()},ac,tp;function im(){return tp||(tp=1,ac=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ac}var lc,np;function sm(){if(np)return lc;np=1;var n=gh;return lc=n.getPrototypeOf||null,lc}var b0="Function.prototype.bind called on incompatible ",w0=Object.prototype.toString,S0=Math.max,_0="[object Function]",rp=function(t,e){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var s=0;s<e.length;s+=1)r[s+t.length]=e[s];return r},k0=function(t,e){for(var r=[],i=e,s=0;i<t.length;i+=1,s+=1)r[s]=t[i];return r},x0=function(n,t){for(var e="",r=0;r<n.length;r+=1)e+=n[r],r+1<n.length&&(e+=t);return e},E0=function(t){var e=this;if(typeof e!="function"||w0.apply(e)!==_0)throw new TypeError(b0+e);for(var r=k0(arguments,1),i,s=function(){if(this instanceof i){var h=e.apply(this,rp(r,arguments));return Object(h)===h?h:this}return e.apply(t,rp(r,arguments))},o=S0(0,e.length-r.length),a=[],c=0;c<o;c++)a[c]="$"+c;if(i=Function("binder","return function ("+x0(a,",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var u=function(){};u.prototype=e.prototype,i.prototype=new u,u.prototype=null}return i},A0=E0,Io=Function.prototype.bind||A0,bh=Function.prototype.call,wh=Function.prototype.apply,$0=typeof Reflect<"u"&&Reflect&&Reflect.apply,T0=Io,I0=wh,C0=bh,R0=$0,om=R0||T0.call(C0,I0),P0=Io,D0=X,L0=bh,z0=om,Al=function(t){if(t.length<1||typeof t[0]!="function")throw new D0("a function is required");return z0(P0,L0,t)},cc,ip;function O0(){if(ip)return cc;ip=1;var n=Al,t=Wi,e;try{e=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return cc=r&&typeof r.get=="function"?n([r.get]):typeof s=="function"?function(a){return s(a==null?a:i(a))}:!1,cc}var uc,sp;function am(){if(sp)return uc;sp=1;var n=im(),t=sm(),e=O0();return uc=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,uc}var M0=Function.prototype.call,N0=Object.prototype.hasOwnProperty,U0=Io,mn=U0.call(M0,N0),q,F0=gh,H0=rm,W0=a0,Z0=l0,B0=mh,Oi=fn,gi=X,V0=c0,j0=u0,G0=h0,q0=d0,Y0=p0,X0=f0,K0=g0,J0=v0,lm=Function,hc=function(n){try{return lm('"use strict"; return ('+n+").constructor;")()}catch{}},Cs=Wi,Q0=To,dc=function(){throw new gi},eS=Cs?function(){try{return arguments.callee,dc}catch{try{return Cs(arguments,"callee").get}catch{return dc}}}():dc,Kr=yh(),Ie=am(),tS=sm(),nS=im(),cm=wh,Co=bh,ni={},rS=typeof Uint8Array>"u"||!Ie?q:Ie(Uint8Array),Pr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":Kr&&Ie?Ie([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":ni,"%AsyncGenerator%":ni,"%AsyncGeneratorFunction%":ni,"%AsyncIteratorPrototype%":ni,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":H0,"%eval%":eval,"%EvalError%":W0,"%Float16Array%":typeof Float16Array>"u"?q:Float16Array,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":lm,"%GeneratorFunction%":ni,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kr&&Ie?Ie(Ie([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kr||!Ie?q:Ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":F0,"%Object.getOwnPropertyDescriptor%":Cs,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":Z0,"%ReferenceError%":B0,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kr||!Ie?q:Ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kr&&Ie?Ie(""[Symbol.iterator]()):q,"%Symbol%":Kr?Symbol:q,"%SyntaxError%":Oi,"%ThrowTypeError%":eS,"%TypedArray%":rS,"%TypeError%":gi,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":V0,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet,"%Function.prototype.call%":Co,"%Function.prototype.apply%":cm,"%Object.defineProperty%":Q0,"%Object.getPrototypeOf%":tS,"%Math.abs%":j0,"%Math.floor%":G0,"%Math.max%":q0,"%Math.min%":Y0,"%Math.pow%":X0,"%Math.round%":K0,"%Math.sign%":J0,"%Reflect.getPrototypeOf%":nS};if(Ie)try{null.error}catch(n){var iS=Ie(Ie(n));Pr["%Error.prototype%"]=iS}var sS=function n(t){var e;if(t==="%AsyncFunction%")e=hc("async function () {}");else if(t==="%GeneratorFunction%")e=hc("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=hc("async function* () {}");else if(t==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(e=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&Ie&&(e=Ie(i.prototype))}return Pr[t]=e,e},op={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ro=Io,Za=mn,oS=Ro.call(Co,Array.prototype.concat),aS=Ro.call(cm,Array.prototype.splice),ap=Ro.call(Co,String.prototype.replace),Ba=Ro.call(Co,String.prototype.slice),lS=Ro.call(Co,RegExp.prototype.exec),cS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uS=/\\(\\)?/g,hS=function(t){var e=Ba(t,0,1),r=Ba(t,-1);if(e==="%"&&r!=="%")throw new Oi("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&e!=="%")throw new Oi("invalid intrinsic syntax, expected opening `%`");var i=[];return ap(t,cS,function(s,o,a,c){i[i.length]=a?ap(c,uS,"$1"):o||s}),i},dS=function(t,e){var r=t,i;if(Za(op,r)&&(i=op[r],r="%"+i[0]+"%"),Za(Pr,r)){var s=Pr[r];if(s===ni&&(s=sS(r)),typeof s>"u"&&!e)throw new gi("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Oi("intrinsic "+t+" does not exist!")},bt=function(t,e){if(typeof t!="string"||t.length===0)throw new gi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new gi('"allowMissing" argument must be a boolean');if(lS(/^%?[^%]*%?$/,t)===null)throw new Oi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=hS(t),i=r.length>0?r[0]:"",s=dS("%"+i+"%",e),o=s.name,a=s.value,c=!1,u=s.alias;u&&(i=u[0],aS(r,oS([0,1],u)));for(var h=1,p=!0;h<r.length;h+=1){var v=r[h],g=Ba(v,0,1),_=Ba(v,-1);if((g==='"'||g==="'"||g==="`"||_==='"'||_==="'"||_==="`")&&g!==_)throw new Oi("property names with quotes must have matching quotes");if((v==="constructor"||!p)&&(c=!0),i+="."+v,o="%"+i+"%",Za(Pr,o))a=Pr[o];else if(a!=null){if(!(v in a)){if(!e)throw new gi("base intrinsic for "+t+" exists, but the property is not available.");return}if(Cs&&h+1>=r.length){var k=Cs(a,v);p=!!k,p&&"get"in k&&!("originalValue"in k.get)?a=k.get:a=a[v]}else p=Za(a,v),a=a[v];p&&!c&&(Pr[o]=a)}}return a},pc,lp;function Bn(){if(lp)return pc;lp=1;var n=bt,t=Al,e=t([n("%String.prototype.indexOf%")]);return pc=function(i,s){var o=n(i,!!s);return typeof o=="function"&&e(i,".prototype.")>-1?t([o]):o},pc}var fc,cp;function Sh(){if(cp)return fc;cp=1;var n=bt,t=n("%Array%"),e=!t.isArray&&Bn()("Object.prototype.toString");return fc=t.isArray||function(i){return e(i)==="[object Array]"},fc}var pS=El,up=To,um=pS.hasArrayLengthDefineBug(),fS=um&&Sh(),gS=Bn(),mS=gS("Object.prototype.propertyIsEnumerable"),_h=function(t,e,r,i,s,o){if(!up){if(!t(o)||!o["[[Configurable]]"]||!o["[[Writable]]"]||s in i&&mS(i,s)!==!!o["[[Enumerable]]"])return!1;var a=o["[[Value]]"];return i[s]=a,e(i[s],a)}return um&&s==="length"&&"[[Value]]"in o&&fS(i)&&i.length!==o["[[Value]]"]?(i.length=o["[[Value]]"],i.length===o["[[Value]]"]):(up(i,s,r(o)),!0)},vS=X,rs=mn,yS={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0},Bi=function(t){if(!t||typeof t!="object")return!1;for(var e in t)if(rs(t,e)&&!yS[e])return!1;var r=rs(t,"[[Value]]")||rs(t,"[[Writable]]"),i=rs(t,"[[Get]]")||rs(t,"[[Set]]");if(r&&i)throw new vS("Property Descriptors may not be both accessor and data descriptors");return!0},hm=function(t){if(typeof t>"u")return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e},bS=X,wS=Bi,SS=hm,dm=function(t){if(typeof t<"u"&&!wS(t))throw new bS("Assertion failed: `Desc` must be a Property Descriptor");return SS(t)},_S=X,hp=mn,kS=Bi,pm=function(t){if(typeof t>"u")return!1;if(!kS(t))throw new _S("Assertion failed: `Desc` must be a Property Descriptor");return!(!hp(t,"[[Value]]")&&!hp(t,"[[Writable]]"))},Vi=function(t){return typeof t=="string"||typeof t=="symbol"},dp=vh,fm=function(t,e){return t===e?t===0?1/t===1/e:!0:dp(t)&&dp(e)},pp=X,xS=gn,ES=_h,AS=dm,$S=pm,TS=Vi,IS=fm,kh=function(t,e,r){if(!xS(t))throw new pp("Assertion failed: Type(O) is not Object");if(!TS(e))throw new pp("Assertion failed: P is not a Property Key");var i={"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0};return ES($S,IS,AS,t,e,i)},gm=Function.prototype.toString,di=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,iu,Sa;if(typeof di=="function"&&typeof Object.defineProperty=="function")try{iu=Object.defineProperty({},"length",{get:function(){throw Sa}}),Sa={},di(function(){throw 42},null,iu)}catch(n){n!==Sa&&(di=null)}else di=null;var CS=/^\s*class\b/,su=function(t){try{var e=gm.call(t);return CS.test(e)}catch{return!1}},gc=function(t){try{return su(t)?!1:(gm.call(t),!0)}catch{return!1}},_a=Object.prototype.toString,RS="[object Object]",PS="[object Function]",DS="[object GeneratorFunction]",LS="[object HTMLAllCollection]",zS="[object HTML document.all class]",OS="[object HTMLCollection]",MS=typeof Symbol=="function"&&!!Symbol.toStringTag,NS=!(0 in[,]),ou=function(){return!1};if(typeof document=="object"){var US=document.all;_a.call(US)===_a.call(document.all)&&(ou=function(t){if((NS||!t)&&(typeof t>"u"||typeof t=="object"))try{var e=_a.call(t);return(e===LS||e===zS||e===OS||e===RS)&&t("")==null}catch{}return!1})}var mm=di?function(t){if(ou(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{di(t,null,iu)}catch(e){if(e!==Sa)return!1}return!su(t)&&gc(t)}:function(t){if(ou(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(MS)return gc(t);if(su(t))return!1;var e=_a.call(t);return e!==PS&&e!==DS&&!/^\[object HTML/.test(e)?!1:gc(t)},FS=mm,HS=function(t){return!!t},Pt=mn,Ko=X,WS=gn,fp=FS,mc=HS,ZS=function(t){if(!WS(t))throw new Ko("ToPropertyDescriptor requires an object");var e={};if(Pt(t,"enumerable")&&(e["[[Enumerable]]"]=mc(t.enumerable)),Pt(t,"configurable")&&(e["[[Configurable]]"]=mc(t.configurable)),Pt(t,"value")&&(e["[[Value]]"]=t.value),Pt(t,"writable")&&(e["[[Writable]]"]=mc(t.writable)),Pt(t,"get")){var r=t.get;if(typeof r<"u"&&!fp(r))throw new Ko("getter must be a function");e["[[Get]]"]=r}if(Pt(t,"set")){var i=t.set;if(typeof i<"u"&&!fp(i))throw new Ko("setter must be a function");e["[[Set]]"]=i}if((Pt(e,"[[Get]]")||Pt(e,"[[Set]]"))&&(Pt(e,"[[Value]]")||Pt(e,"[[Writable]]")))throw new Ko("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e},vc=X,BS=gn,gp=Bi,VS=_h,jS=dm,GS=pm,qS=Vi,YS=fm,XS=ZS,KS=function(t,e,r){if(!BS(t))throw new vc("Assertion failed: Type(O) is not Object");if(!qS(e))throw new vc("Assertion failed: P is not a Property Key");var i=gp(r)?r:XS(r);if(!gp(i))throw new vc("Assertion failed: Desc is not a valid Property Descriptor");return VS(GS,YS,jS,t,e,i)},mp=X,JS=gn,QS=KS,e_=Vi,t_=function(t,e,r){if(!JS(t))throw new mp("Assertion failed: Type(O) is not Object");if(!e_(e))throw new mp("Assertion failed: P is not a Property Key");var i={"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0};return QS(t,e,i)},n_=typeof Reflect<"u"&&Reflect.setPrototypeOf||null,r_=gh,i_=r_.setPrototypeOf||null,s_=Al,vp=Wi,o_=X,vm={};try{vm.__proto__=null}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var a_=!("toString"in vm),yc=vp&&vp(Object.prototype,"__proto__"),l_=a_&&(!!yc&&typeof yc.set=="function"&&s_([yc.set])||function(t,e){if(t==null)throw new o_("set Object.prototype.__proto__ called on null or undefined");return t.__proto__=e,e}),yp=n_,c_=i_,bp=l_,u_=X,h_=yp?function(t,e){if(yp(t,e))return t;throw new u_("Reflect.setPrototypeOf: failed to set [[Prototype]]")}:c_||(bp?function(t,e){return bp(t,e),t}:null),wp=X,d_=gn,Sp=am(),p_=function(t){if(!d_(t))throw new wp("Assertion failed: O must be an Object");if(!Sp)throw new wp("This environment does not support fetching prototypes.");return Sp(t)},f_=X,g_=h_,m_=gn,v_=p_,y_=function(t,e){if(e!==null&&!m_(e))throw new f_("Assertion failed: V must be Object or Null");try{g_(t,e)}catch{return!1}return v_(t)===e},bc=kh,_p=t_,ym=y_,b_=El(),xh=rm;function Po(n,t,e){var r=new xh(e);return ym(r,ka),delete r.constructor,_p(r,"error",n),_p(r,"suppressed",t),r}b_&&Object.defineProperty(Po,"prototype",{writable:!1});var ka=Po.prototype;if(!bc(ka,"constructor",Po)||!bc(ka,"message","")||!bc(ka,"name","SuppressedError"))throw new xh("unable to install SuppressedError.prototype properties; please report this!");ym(Po.prototype,xh.prototype);var w_=Po,S_=w_,bm=function(){return typeof SuppressedError=="function"?SuppressedError:S_},__=Fr,kp=fh(),k_=bm,x_=function(){var t=k_();return __(kp,{SuppressedError:t},{SuppressedError:function(){return kp.SuppressedError!==t}}),t};x_();var E_=X,A_=Bi,$_=hm,T_=function(t){if(typeof t<"u"&&!A_(t))throw new E_("Assertion failed: `Desc` must be a Property Descriptor");return $_(t)},I_=X,xp=mn,C_=Bi,R_=function(t){if(typeof t>"u")return!1;if(!C_(t))throw new I_("Assertion failed: `Desc` must be a Property Descriptor");return!(!xp(t,"[[Value]]")&&!xp(t,"[[Writable]]"))},Ep=vh,P_=function(t,e){return t===e?t===0?1/t===1/e:!0:Ep(t)&&Ep(e)},ji=mm,D_=function(t){return!!t},Dt=mn,Jo=X,L_=gn,Ap=ji,wc=D_,z_=function(t){if(!L_(t))throw new Jo("ToPropertyDescriptor requires an object");var e={};if(Dt(t,"enumerable")&&(e["[[Enumerable]]"]=wc(t.enumerable)),Dt(t,"configurable")&&(e["[[Configurable]]"]=wc(t.configurable)),Dt(t,"value")&&(e["[[Value]]"]=t.value),Dt(t,"writable")&&(e["[[Writable]]"]=wc(t.writable)),Dt(t,"get")){var r=t.get;if(typeof r<"u"&&!Ap(r))throw new Jo("getter must be a function");e["[[Get]]"]=r}if(Dt(t,"set")){var i=t.set;if(typeof i<"u"&&!Ap(i))throw new Jo("setter must be a function");e["[[Set]]"]=i}if((Dt(e,"[[Get]]")||Dt(e,"[[Set]]"))&&(Dt(e,"[[Value]]")||Dt(e,"[[Writable]]")))throw new Jo("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e},Sc=X,O_=gn,$p=Bi,M_=_h,N_=T_,U_=R_,F_=Vi,H_=P_,W_=z_,Do=function(t,e,r){if(!O_(t))throw new Sc("Assertion failed: Type(O) is not Object");if(!F_(e))throw new Sc("Assertion failed: P is not a Property Key");var i=$p(r)?r:W_(r);if(!$p(i))throw new Sc("Assertion failed: Desc is not a valid Property Descriptor");return M_(U_,H_,N_,t,e,i)},Z_=Zi(),B_=Z_?Symbol.dispose||Symbol("Symbol.dispose"):null,V_=Zi,j_=B_,Eh=function(){return V_()&&Symbol.dispose||j_},G_=yh,q_=Do,Y_=Eh,X_=function(){var t=Y_();return G_()&&q_(Symbol,"dispose",{"[[Configurable]]":!1,"[[Enumerable]]":!1,"[[Writable]]":!1,"[[Value]]":t}),t},K_=Zi(),J_=K_?Symbol.asyncDispose||Symbol("Symbol.asyncDispose"):null,Q_=Zi,ek=J_,Ah=function(){return Q_()&&Symbol.asyncDispose||ek},tk=yh,nk=Do,rk=Ah,ik=function(){var t=rk();return tk()&&nk(Symbol,"asyncDispose",{"[[Configurable]]":!1,"[[Enumerable]]":!1,"[[Writable]]":!1,"[[Value]]":t}),t},sk=Sh(),ok=bt,ak=Bn(),lk=X,ck=sk,uk=ok("%Reflect.apply%",!0)||ak("Function.prototype.apply"),$l=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!ck(r))throw new lk("Assertion failed: optional `argumentsList`, if provided, must be a List");return uk(t,e,r)};const hk={},dk=Object.freeze(Object.defineProperty({__proto__:null,default:hk},Symbol.toStringTag,{value:"Module"})),pk=Uw(dk);var $h=typeof Map=="function"&&Map.prototype,_c=Object.getOwnPropertyDescriptor&&$h?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Va=$h&&_c&&typeof _c.get=="function"?_c.get:null,Tp=$h&&Map.prototype.forEach,Th=typeof Set=="function"&&Set.prototype,kc=Object.getOwnPropertyDescriptor&&Th?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ja=Th&&kc&&typeof kc.get=="function"?kc.get:null,Ip=Th&&Set.prototype.forEach,fk=typeof WeakMap=="function"&&WeakMap.prototype,xs=fk?WeakMap.prototype.has:null,gk=typeof WeakSet=="function"&&WeakSet.prototype,Es=gk?WeakSet.prototype.has:null,mk=typeof WeakRef=="function"&&WeakRef.prototype,Cp=mk?WeakRef.prototype.deref:null,vk=Boolean.prototype.valueOf,yk=Object.prototype.toString,bk=Function.prototype.toString,wk=String.prototype.match,Ih=String.prototype.slice,On=String.prototype.replace,Sk=String.prototype.toUpperCase,Rp=String.prototype.toLowerCase,wm=RegExp.prototype.test,Pp=Array.prototype.concat,jt=Array.prototype.join,_k=Array.prototype.slice,Dp=Math.floor,au=typeof BigInt=="function"?BigInt.prototype.valueOf:null,xc=Object.getOwnPropertySymbols,lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",As=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Mi||!0)?Symbol.toStringTag:null,Sm=Object.prototype.propertyIsEnumerable,Lp=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function zp(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||wm.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-Dp(-n):Dp(n);if(r!==n){var i=String(r),s=Ih.call(t,i.length+1);return On.call(i,e,"$&_")+"."+On.call(On.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return On.call(t,e,"$&_")}var cu=pk,Op=cu.custom,Mp=xm(Op)?Op:null,_m={__proto__:null,double:'"',single:"'"},kk={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Gi=function n(t,e,r,i){var s=e||{};if(nn(s,"quoteStyle")&&!nn(_m,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=nn(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(nn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(nn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Am(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?zp(t,c):c}if(typeof t=="bigint"){var u=String(t)+"n";return a?zp(t,u):u}var h=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=h&&h>0&&typeof t=="object")return uu(t)?"[Array]":"[Object]";var p=Hk(s,r);if(typeof i>"u")i=[];else if(Em(i,t)>=0)return"[Circular]";function v(It,yn,Gl){if(yn&&(i=_k.call(i),i.push(yn)),Gl){var Wo={depth:s.depth};return nn(s,"quoteStyle")&&(Wo.quoteStyle=s.quoteStyle),n(It,Wo,r+1,i)}return n(It,s,r+1,i)}if(typeof t=="function"&&!Np(t)){var g=Pk(t),_=Qo(t,v);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(_.length>0?" { "+jt.call(_,", ")+" }":"")}if(xm(t)){var k=Mi?On.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):lu.call(t);return typeof t=="object"&&!Mi?is(k):k}if(Nk(t)){for(var T="<"+Rp.call(String(t.nodeName)),P=t.attributes||[],R=0;R<P.length;R++)T+=" "+P[R].name+"="+km(xk(P[R].value),"double",s);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+Rp.call(String(t.nodeName))+">",T}if(uu(t)){if(t.length===0)return"[]";var W=Qo(t,v);return p&&!Fk(W)?"["+hu(W,p)+"]":"[ "+jt.call(W,", ")+" ]"}if(Ak(t)){var N=Qo(t,v);return!("cause"in Error.prototype)&&"cause"in t&&!Sm.call(t,"cause")?"{ ["+String(t)+"] "+jt.call(Pp.call("[cause]: "+v(t.cause),N),", ")+" }":N.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+jt.call(N,", ")+" }"}if(typeof t=="object"&&o){if(Mp&&typeof t[Mp]=="function"&&cu)return cu(t,{depth:h-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Dk(t)){var F=[];return Tp&&Tp.call(t,function(It,yn){F.push(v(yn,t,!0)+" => "+v(It,t))}),Up("Map",Va.call(t),F,p)}if(Ok(t)){var Y=[];return Ip&&Ip.call(t,function(It){Y.push(v(It,t))}),Up("Set",ja.call(t),Y,p)}if(Lk(t))return Ec("WeakMap");if(Mk(t))return Ec("WeakSet");if(zk(t))return Ec("WeakRef");if(Tk(t))return is(v(Number(t)));if(Ck(t))return is(v(au.call(t)));if(Ik(t))return is(vk.call(t));if($k(t))return is(v(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ir<"u"&&t===ir)return"{ [object globalThis] }";if(!Ek(t)&&!Np(t)){var j=Qo(t,v),le=Lp?Lp(t)===Object.prototype:t instanceof Object||t.constructor===Object,St=t instanceof Object?"":"null prototype",qn=!le&&As&&Object(t)===t&&As in t?Ih.call(Vn(t),8,-1):St?"Object":"",Pe=le||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Yn=Pe+(qn||St?"["+jt.call(Pp.call([],qn||[],St||[]),": ")+"] ":"");return j.length===0?Yn+"{}":p?Yn+"{"+hu(j,p)+"}":Yn+"{ "+jt.call(j,", ")+" }"}return String(t)};function km(n,t,e){var r=e.quoteStyle||t,i=_m[r];return i+n+i}function xk(n){return On.call(String(n),/"/g,"&quot;")}function Hr(n){return!As||!(typeof n=="object"&&(As in n||typeof n[As]<"u"))}function uu(n){return Vn(n)==="[object Array]"&&Hr(n)}function Ek(n){return Vn(n)==="[object Date]"&&Hr(n)}function Np(n){return Vn(n)==="[object RegExp]"&&Hr(n)}function Ak(n){return Vn(n)==="[object Error]"&&Hr(n)}function $k(n){return Vn(n)==="[object String]"&&Hr(n)}function Tk(n){return Vn(n)==="[object Number]"&&Hr(n)}function Ik(n){return Vn(n)==="[object Boolean]"&&Hr(n)}function xm(n){if(Mi)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!lu)return!1;try{return lu.call(n),!0}catch{}return!1}function Ck(n){if(!n||typeof n!="object"||!au)return!1;try{return au.call(n),!0}catch{}return!1}var Rk=Object.prototype.hasOwnProperty||function(n){return n in this};function nn(n,t){return Rk.call(n,t)}function Vn(n){return yk.call(n)}function Pk(n){if(n.name)return n.name;var t=wk.call(bk.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function Em(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1}function Dk(n){if(!Va||!n||typeof n!="object")return!1;try{Va.call(n);try{ja.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function Lk(n){if(!xs||!n||typeof n!="object")return!1;try{xs.call(n,xs);try{Es.call(n,Es)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function zk(n){if(!Cp||!n||typeof n!="object")return!1;try{return Cp.call(n),!0}catch{}return!1}function Ok(n){if(!ja||!n||typeof n!="object")return!1;try{ja.call(n);try{Va.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function Mk(n){if(!Es||!n||typeof n!="object")return!1;try{Es.call(n,Es);try{xs.call(n,xs)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function Nk(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function Am(n,t){if(n.length>t.maxStringLength){var e=n.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return Am(Ih.call(n,0,t.maxStringLength),t)+r}var i=kk[t.quoteStyle||"single"];i.lastIndex=0;var s=On.call(On.call(n,i,"\\$1"),/[\x00-\x1f]/g,Uk);return km(s,"single",t)}function Uk(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+Sk.call(t.toString(16))}function is(n){return"Object("+n+")"}function Ec(n){return n+" { ? }"}function Up(n,t,e,r){var i=r?hu(e,r):jt.call(e,", ");return n+" ("+t+") {"+i+"}"}function Fk(n){for(var t=0;t<n.length;t++)if(Em(n[t],`
2
2
  `)>=0)return!1;return!0}function Hk(n,t){var e;if(n.indent===" ")e=" ";else if(typeof n.indent=="number"&&n.indent>0)e=jt.call(Array(n.indent+1)," ");else return null;return{base:e,prev:jt.call(Array(t+1),e)}}function hu(n,t){if(n.length===0)return"";var e=`
3
3
  `+t.prev+t.base;return e+jt.call(n,","+e)+`
4
- `+t.prev}function Qo(n,t){var e=uu(n),r=[];if(e){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=nn(n,i)?t(n[i],n):""}var s=typeof xc=="function"?xc(n):[],o;if(Mi){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in n)nn(n,c)&&(e&&String(Number(c))===c&&c<n.length||Mi&&o["$"+c]instanceof Symbol||(wm.call(/[^\w$]/,c)?r.push(t(c,n)+": "+t(n[c],n)):r.push(c+": "+t(n[c],n))));if(typeof xc=="function")for(var u=0;u<s.length;u++)Sm.call(n,s[u])&&r.push("["+t(s[u])+"]: "+t(n[s[u]],n));return r}var Wk=Gi,Zk=X,Tl=function(n,t,e){for(var r=n,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,e||(i.next=n.next,n.next=i),i},Bk=function(n,t){if(n){var e=Tl(n,t);return e&&e.value}},Vk=function(n,t,e){var r=Tl(n,t);r?r.value=e:n.next={key:t,next:n.next,value:e}},jk=function(n,t){return n?!!Tl(n,t):!1},Gk=function(n,t){if(n)return Tl(n,t,!0)},qk=function(){var t,e={assert:function(r){if(!e.has(r))throw new Zk("Side channel does not contain "+Wk(r))},delete:function(r){var i=Gk(t,r);return i&&t&&!t.next&&(t=void 0),!!i},get:function(r){return Bk(t,r)},has:function(r){return jk(t,r)},set:function(r,i){t||(t={next:void 0}),Vk(t,r,i)}};return e},Yk=bt,Lo=Bn(),Xk=Gi,Kk=X,Fp=Yk("%Map%",!0),Jk=Lo("Map.prototype.get",!0),Qk=Lo("Map.prototype.set",!0),ex=Lo("Map.prototype.has",!0),tx=Lo("Map.prototype.delete",!0),nx=Lo("Map.prototype.size",!0),$m=!!Fp&&function(){var t,e={assert:function(r){if(!e.has(r))throw new Kk("Side channel does not contain "+Xk(r))},delete:function(r){if(t){var i=tx(t,r);return nx(t)===0&&(t=void 0),i}return!1},get:function(r){if(t)return Jk(t,r)},has:function(r){return t?ex(t,r):!1},set:function(r,i){t||(t=new Fp),Qk(t,r,i)}};return e},rx=bt,Il=Bn(),ix=Gi,ea=$m,sx=X,Jr=rx("%WeakMap%",!0),ox=Il("WeakMap.prototype.get",!0),ax=Il("WeakMap.prototype.set",!0),lx=Il("WeakMap.prototype.has",!0),cx=Il("WeakMap.prototype.delete",!0),ux=Jr?function(){var t,e,r={assert:function(i){if(!r.has(i))throw new sx("Side channel does not contain "+ix(i))},delete:function(i){if(Jr&&i&&(typeof i=="object"||typeof i=="function")){if(t)return cx(t,i)}else if(ea&&e)return e.delete(i);return!1},get:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?ox(t,i):e&&e.get(i)},has:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?lx(t,i):!!e&&e.has(i)},set:function(i,s){Jr&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Jr),ax(t,i,s)):ea&&(e||(e=ea()),e.set(i,s))}};return r}:ea,hx=X,dx=Gi,px=qk,fx=$m,gx=ux,mx=gx||fx||px,vx=function(){var t,e={assert:function(r){if(!e.has(r))throw new hx("Side channel does not contain "+dx(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,i){t||(t=mx()),t.set(r,i)}};return e},yx=mn,ss=vx(),Jt=X,Ch={assert:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");if(ss.assert(n),!Ch.has(n,t))throw new Jt("`"+t+"` is not present on `O`")},get:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var e=ss.get(n);return e&&e["$"+t]},has:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var e=ss.get(n);return!!e&&yx(e,"$"+t)},set:function(n,t,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var r=ss.get(n);r||(r={},ss.set(n,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(Ch);var Rh=Ch,Tm=fn,Nn=Rh,zo=function n(t,e){if(!(this instanceof n))return new n(t,e);if(t!=="normal"&&t!=="break"&&t!=="continue"&&t!=="return"&&t!=="throw")throw new Tm('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');Nn.set(this,"[[Type]]",t),Nn.set(this,"[[Value]]",e)};zo.prototype.type=function(){return Nn.get(this,"[[Type]]")};zo.prototype.value=function(){return Nn.get(this,"[[Value]]")};zo.prototype["?"]=function(){var t=Nn.get(this,"[[Type]]"),e=Nn.get(this,"[[Value]]");if(t==="throw")throw e;return e};zo.prototype["!"]=function(){var t=Nn.get(this,"[[Type]]");if(t!=="normal")throw new Tm('Assertion failed: Completion Record is not of type "normal"');return Nn.get(this,"[[Value]]")};var Ph=zo,bx=Ph,Dh=function(t){return new bx("normal",t)},Ac,Hp;function wx(){if(Hp)return Ac;Hp=1;var n=Zi;return Ac=function(){return n()&&!!Symbol.toStringTag},Ac}var Sx=bt,Wp=Sx("%Object.defineProperty%",!0),_x=wx()(),kx=mn,xx=X,ta=_x?Symbol.toStringTag:null,Im=function(t,e){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new xx("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ta&&(r||!kx(t,ta))&&(Wp?Wp(t,ta,{configurable:!i,enumerable:!1,value:e,writable:!1}):t[ta]=e)},Cm={exports:{}},Ex=bt,Zp=Yg,Ax=El(),Bp=Wi,Vp=X,$x=Ex("%Math.floor%"),Tx=function(t,e){if(typeof t!="function")throw new Vp("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||$x(e)!==e)throw new Vp("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&Bp){var o=Bp(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!r)&&(Ax?Zp(t,"length",e,!0,!0):Zp(t,"length",e)),t},Ix=Io,Cx=wh,Rx=om,Px=function(){return Rx(Ix,Cx,arguments)};(function(n){var t=Tx,e=To,r=Al,i=Px;n.exports=function(o){var a=r(arguments),c=1+o.length-(arguments.length-1);return t(a,c>0?c:0,!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i})(Cm);var Lh=Cm.exports,Dx=function(t,e){for(var r=0;r<t.length;r+=1)if(!e(t[r],r,t))return!1;return!0},Lx=Object,zx=function(t){return t&&typeof t=="object"&&(typeof t["[[ResourceValue]]"]>"u"||Lx(t["[[ResourceValue]]"])===t["[[ResourceValue]]"])&&(t["[[Hint]]"]==="SYNC-DISPOSE"||t["[[Hint]]"]==="ASYNC-DISPOSE")&&(typeof t["[[DisposeMethod]]"]=="function"||typeof t["[[DisposeMethod]]"]>"u")},Ox=mn,Mx=Sh(),Nx=Dx,Ux=zx,Fx=function(t){return t&&typeof t=="object"&&Ox(t,"[[DisposableResourceStack]]")&&Mx(t["[[DisposableResourceStack]]"])&&(t["[[DisposableResourceStack]]"].length===0||Nx(t["[[DisposableResourceStack]]"],Ux))},Hx=gn,Wx=function(t){if(t===null)return"Null";if(typeof t>"u")return"Undefined";if(Hx(t))return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},Zx=Wx,zh=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":Zx(t)},Bx=X,Vx=Gi,jx=Vi,Gx=function(t,e){if(!jx(e))throw new Bx("Assertion failed: P is not a Property Key, got "+Vx(e));return t[e]},jp=X,qx=Gx,Yx=ji,Xx=Vi,Gp=Gi,Kx=function(t,e){if(!Xx(e))throw new jp("Assertion failed: P is not a Property Key");var r=qx(t,e);if(r!=null){if(!Yx(r))throw new jp(Gp(e)+" is not a function: "+Gp(r));return r}},du={exports:{}},Jx=bt,Qx=Jx,qp=Qx("%Reflect.construct%",!0),Ga=Do;try{Ga({},"",{"[[Get]]":function(){}})}catch{Ga=null}if(Ga&&qp){var Yp={},Xp={};Ga(Xp,"length",{"[[Get]]":function(){throw Yp},"[[Enumerable]]":!0}),du.exports=function(t){try{qp(t,Xp)}catch(e){return e===Yp}}}else du.exports=function(t){return typeof t=="function"&&!!t.prototype};var eE=du.exports,$c=X,Kp=ji,tE=eE,nE=function(t){if(!tE(t))throw new $c("C must be a constructor");var e={"[[Resolve]]":void 0,"[[Reject]]":void 0},r=new t(function(i,s){if(typeof e["[[Resolve]]"]<"u"||typeof e["[[Reject]]"]<"u")throw new $c("executor has already been called");e["[[Resolve]]"]=i,e["[[Reject]]"]=s});if(!Kp(e["[[Resolve]]"])||!Kp(e["[[Reject]]"]))throw new $c("executor must provide valid resolve and reject functions");return{"[[Promise]]":r,"[[Resolve]]":e["[[Resolve]]"],"[[Reject]]":e["[[Reject]]"]}},Jp=fn,rE=X,Tc=$l,Qp=Kx,iE=nE,sE=zh,ef=Eh(),tf=Ah(),oE=function(t,e){if(sE(t)!=="Object")throw new rE("`V` must be an Object");if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new Jp("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(e==="ASYNC-DISPOSE"&&tf&&(r=Qp(t,tf)),!r){if(!ef)throw new Jp("`Symbol.dispose` is not supported");if(r=Qp(t,ef),typeof r<"u")return function(){var i=this;if(e==="ASYNC-DISPOSE"){var s=iE(Promise);try{Tc(r,i),Tc(s["[[Resolve]]"],void 0,[void 0])}catch(o){s["[[Reject]]"](o)}return s["[[Promise]]"]}Tc(r,i)}}return r},aE=fn,Ic=X,lE=ji,cE=zh,uE=oE,hE=function(t,e){if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new aE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(arguments.length<3)if(t==null)t=void 0,r=void 0;else{if(typeof t<"u"&&cE(t)!=="Object")throw new Ic("`V` must be an Object, or `null` or `undefined`");if(r=uE(t,e),typeof r>"u")throw new Ic("dispose method must not be `undefined` on `V` when an object `V` is provided")}else if(r=arguments[2],!lE(r))throw new Ic("`method`, when provided, must be a function");return{"[[ResourceValue]]":t,"[[Hint]]":e,"[[DisposeMethod]]":r}},dE=fn,na=X,pE=Fx,nf=hE,fE=Bn(),gE=fE("Array.prototype.push"),Rm=function(t,e,r){if(!pE(t))throw new na("Assertion failed: `disposeCapability` must be a DisposeCapability Record");if(r!=="SYNC-DISPOSE"&&r!=="ASYNC-DISPOSE")throw new dE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var i=arguments.length>3?arguments[3]:void 0;if(arguments.length>3&&typeof i!="function")throw new na("Assertion failed: `method`, when present, must be a function");if(!t["[[DisposableResourceStack]]"])throw new na("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");var s;if(arguments.length<4){if(e==null&&r==="SYNC_DISPOSE")return"UNUSED";s=nf(e,r)}else{if(typeof e<"u")throw new na("Assertion failed: `V` must be undefined when `method` is present");s=nf(void 0,r,i)}return gE(t["[[DisposableResourceStack]]"],s),"UNUSED"},Cc,rf;function Oh(){if(rf)return Cc;rf=1;var n=bt,t=Lh,e=fn,r=n("%Promise.resolve%",!0),i=r&&t(r);return Cc=function(o,a){if(!i)throw new e("This environment does not support Promises.");return i(o,a)},Cc}var Rc,sf;function mE(){if(sf)return Rc;sf=1;var n=bt,t=fn,e=n("%Promise%",!0),r=$l,i=Oh(),s=zh;return Rc=function(a,c,u){if(typeof a<"u"&&s(a)!=="Object")throw new t("Assertion failed: `V` must be `undefined` or an Object");if(c!=="SYNC-DISPOSE"&&c!=="ASYNC-DISPOSE")throw new t("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");if(typeof u<"u"&&typeof u!="function")throw new t("Assertion failed: `method` must be `undefined` or a function");var h=typeof u>"u"?u:r(u,a);if(c==="ASYNC-DISPOSE")return i(e,h)},Rc}var Pc,of;function vE(){if(of)return Pc;of=1;var n=Ph;return Pc=function(e){return new n("throw",e)},Pc}var yE=bt,Dc=fn,af=X,bE=yE("%Promise%",!0),wE=Bn(),lf=wE("Promise.prototype.then",!0),SE=Ph,cf=mE(),_E=Dh,kE=Oh(),uf=vE(),xE=bm(),Pm=function(t,e){if(!(e instanceof SE))throw new af("`completion` must be a Completion Record");var r=t["[[DisposableResourceStack]]"];if(!r)throw new af("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");for(var i,s=r.length-1;s>=0;s-=1)if(!i)i=r[s]["[[Hint]]"];else if(i!==r[s]["[[Hint]]"])throw new Dc("mixed hint stacks are not supported");for(var o=i==="ASYNC-DISPOSE"&&kE(bE,e),a=function(v){if(e.type()==="throw"){var g=e.value(),_=new xE(v,g);e=uf(_)}else e=uf(v)},c=i==="ASYNC-DISPOSE"&&function(g){return lf(o,function(){var _=cf(g["[[ResourceValue]]"],g["[[Hint]]"],g["[[DisposeMethod]]"]);if(!_)throw new Dc("Assertion failed: non-`~ASYNC-DISPOSE~` resource returned a promise from Dispose");return lf(_,_E)},a)},u=r.length-1;u>=0;u-=1)if(i==="ASYNC-DISPOSE")o=c(r[u]);else{var h=r[u];try{var p=cf(h["[[ResourceValue]]"],h["[[Hint]]"],h["[[DisposeMethod]]"]);if(p)throw new Dc("Assertion failed: `~SYNC-DISPOSE~` resource returned something from Dispose")}catch(v){a(v)}}return t["[[DisposableResourceStack]]"]=null,i==="ASYNC-DISPOSE"?o:e},Dm=function(){var t=[];return{"[[DisposableResourceStack]]":t}},Cl=mh,Mh=X,EE=$l,qi=kh,AE=Do,Lm=ji,$E=Dh,nt=Rh,TE=Im,zm=Fr.supportsDescriptors,IE=Lh,Nh=Rm,CE=Pm,Om=Dm,hf=Eh(),ft=function n(){if(!(this instanceof n)||nt.has(this,"[[DisposableState]]")||nt.has(this,"[[DisposeCapability]]"))throw new Mh("can only be used with new");nt.set(this,"[[DisposableState]]","PENDING"),nt.set(this,"[[DisposeCapability]]",Om())},Mm=function(){var t=this;return nt.assert(t,"[[DisposableState]]"),nt.get(t,"[[DisposableState]]")==="DISPOSED"},Oo=IE(Mm);zm?AE(ft.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Mm}):ft.prototype.disposed=!1;var Nm=function(t){nt.set(t,"[[DisposableState]]","DISPOSED"),zm||(t.disposed=!0)};qi(ft.prototype,"dispose",function(){var t=this;if(!Oo(t))return Nm(t),CE(nt.get(t,"[[DisposeCapability]]"),$E())["?"]()});qi(ft.prototype,"use",function(t){var e=this;if(Oo(e))throw new Cl("a disposed stack can not use anything new");return Nh(nt.get(e,"[[DisposeCapability]]"),t,"SYNC-DISPOSE"),t});qi(ft.prototype,"adopt",function(t,e){var r=this;if(Oo(r))throw new Cl("a disposed stack can not use anything new");if(!Lm(e))throw new Mh("`onDispose` must be a function");var i=function(){return EE(e,void 0,[t])};return Nh(nt.get(r,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",i),t});qi(ft.prototype,"defer",function(t){var e=this;if(Oo(e))throw new Cl("a disposed stack can not defer anything new");if(!Lm(t))throw new Mh("`onDispose` must be a function");Nh(nt.get(e,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",t)});qi(ft.prototype,"move",function(){var t=this;if(Oo(t))throw new Cl("a disposed stack can not use anything new");var e=new ft;return nt.set(e,"[[DisposeCapability]]",nt.get(t,"[[DisposeCapability]]")),nt.set(t,"[[DisposeCapability]]",Om()),Nm(t),e});hf&&qi(ft.prototype,hf,ft.prototype.dispose);TE(ft.prototype,"DisposableStack");var RE=ft,PE=RE,DE=function(){return typeof DisposableStack=="function"?DisposableStack:PE},LE=Fr,zE=fh(),OE=DE,ME=function(){var t=OE();return LE(zE,{DisposableStack:t},{DisposableStack:!0}),t},NE=bt,Rl=mh,Uh=X,df=NE("%Promise%",!0),Fh=Rm,UE=$l,Yi=kh,FE=Do,HE=Pm,Um=ji,Fm=Dm,WE=Dh,pf=Oh(),rt=Rh,ZE=Im,Hm=Fr.supportsDescriptors,BE=Lh,VE=Bn(),jE=VE("Promise.prototype.then",!0),ff=Ah(),gt=function n(){if(!(this instanceof n)||rt.has(this,"[[AsyncDisposableState]]")||rt.has(this,"[[DisposeCapability]]"))throw new Uh("can only be used with new");rt.set(this,"[[AsyncDisposableState]]","pending"),rt.set(this,"[[DisposeCapability]]",Fm())},Wm=function(){var t=this;return rt.assert(t,"[[AsyncDisposableState]]"),rt.get(t,"[[AsyncDisposableState]]")==="disposed"},Mo=BE(Wm);Hm?FE(gt.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Wm}):gt.prototype.disposed=!1;var Zm=function(t){rt.set(t,"[[AsyncDisposableState]]","disposed"),Hm||(t.disposed=!0)};Yi(gt.prototype,"disposeAsync",function(){var t=this;return Mo(t)?pf(df):(Zm(t),jE(pf(df,HE(rt.get(t,"[[DisposeCapability]]"),WE())),function(e){return e["?"]()}))});Yi(gt.prototype,"use",function(t){var e=this;if(Mo(e))throw new Rl("a disposed stack can not use anything new");return Fh(rt.get(e,"[[DisposeCapability]]"),t,"ASYNC-DISPOSE"),t});Yi(gt.prototype,"adopt",function(t,e){var r=this;if(Mo(r))throw new Rl("a disposed stack can not use anything new");if(!Um(e))throw new Uh("`onDisposeAsync` must be a function");var i=function(){return UE(e,void 0,[t])};return i.value=t,Fh(rt.get(r,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",i),t});Yi(gt.prototype,"defer",function(t){var e=this;if(Mo(e))throw new Rl("a disposed stack can not defer anything new");if(!Um(t))throw new Uh("`onDispose` must be a function");Fh(rt.get(e,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",t)});Yi(gt.prototype,"move",function(){var t=this;if(Mo(t))throw new Rl("a disposed stack can not use anything new");var e=new gt;return rt.set(e,"[[DisposeCapability]]",rt.get(t,"[[DisposeCapability]]")),rt.set(t,"[[DisposeCapability]]",Fm()),Zm(t),e});ff&&Yi(gt.prototype,ff,gt.prototype.disposeAsync);ZE(gt.prototype,"AsyncDisposableStack");var GE=gt,qE=GE,YE=function(){return typeof AsyncDisposableStack=="function"?AsyncDisposableStack:qE},XE=Fr,KE=fh(),JE=YE,QE=function(){var t=JE();return XE(KE,{AsyncDisposableStack:t},{AsyncDisposableStack:!0}),t},eA=X_,tA=ik,nA=ME,rA=QE,iA=function(){eA(),tA(),nA(),rA()};iA();const gf=new WeakMap;function sA(n){return(typeof n=="object"||typeof n=="function")&&n!==null&&"then"in n&&typeof n.then=="function"}function Qr(n){return typeof n=="string"?n:typeof n=="symbol"?n.description??n.toString():n.name||"(anonymous class)"}function mf(){return new Error("register(Key, factory) requires a factory function. Wrap existing instances as () => instance.")}function oA(){return new Error("register(Key, factory) does not accept async factories. Await setup before registering.")}class aA{constructor(){m(this,"entries",new Map);m(this,"constructionStack",[])}register(t,e){if(e===void 0){if(typeof t!="function")throw mf();this.validateClassRegistration(t),this.storeFactory(t,()=>this.instantiateClass(t));return}if(typeof e!="function")throw mf();if(e.constructor.name==="AsyncFunction")throw oA();this.storeFactory(t,e)}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.factory)!==void 0}resolve(t){return this.resolveAny(t)}storeFactory(t,e){const r=this.getOrCreateEntry(t);r.factory=e,r.instance=void 0,r.error=void 0}validateClassRegistration(t){const e=gf.get(t);if(e){if(t.length!==e.length)throw new Error(`${Qr(t)} cannot be registered with register(Class). @injectable(...) declared ${e.length} dependencies but constructor arity is ${t.length}. Use register(Key, () => value) instead.`);return}if(t.length!==0)throw new Error(`${Qr(t)} cannot be registered with register(Class). Undecorated classes must have zero required constructor parameters. Use register(Key, () => value) instead.`)}instantiateClass(t){const e=gf.get(t);if(!e)return new t;const r=e.map(i=>this.resolveAny(i));return new t(...r)}resolveAny(t){return this.getOrCreateEntry(t).proxy}getOrCreateEntry(t){let e=this.entries.get(t);return e||(e={key:t},e.proxy=this.createProxy(e),this.entries.set(t,e),e)}createProxy(t){return new Proxy({},{get:(e,r)=>{if(r==="then")return;const i=this.getInstance(t),s=Reflect.get(i,r,i);return typeof s=="function"?s.bind(i):s},set:(e,r,i)=>{const s=this.getInstance(t);return Reflect.set(s,r,i,s)},has:(e,r)=>{const i=this.getInstance(t);return r in i}})}getInstance(t){if(t.instance)return t.instance;if(t.error)throw t.error;if(!t.factory)throw new Error(`${Qr(t.key)} was resolved but never registered`);const e=this.constructionStack.indexOf(t.key);if(e!==-1){const r=[...this.constructionStack.slice(e),t.key].map(i=>Qr(i)).join(" -> ");throw new Error(`Circular dependency detected: ${r}`)}this.constructionStack.push(t.key);try{const r=t.factory();if(sA(r))throw new Error(`Factory for ${Qr(t.key)} returned a Promise. Await setup before registering.`);if(typeof r!="object"||r===null)throw new Error(`Factory for ${Qr(t.key)} returned a non-object value. Wrap primitives in an object.`);return t.instance=r,r}catch(r){throw t.error=r,r}finally{this.constructionStack.pop()}}}const Gt=new aA,lA=.5,vf=.1,yf=8,cA=4,Bm=3,Vm=3,uA=4,lr=255,jm=.2126,Gm=.7152,qm=.0722;async function Ym(n){const t=hA(n);if(!t)return"light";try{return await fA(n,t)>=lA?"light":"dark"}catch{return"light"}}function hA(n){if(typeof document.elementsFromPoint!="function")return null;const t=n.getBoundingClientRect(),e=t.left+t.width/2,r=t.top+t.height/2,i=document.elementsFromPoint(e,r);for(const s of i){if(!(s instanceof HTMLElement)||s===n||n.contains(s))continue;const o=window.getComputedStyle(s);if(dA(o))return s}return null}function dA(n){return n.backgroundImage&&n.backgroundImage!=="none"?!0:pA(n.backgroundColor)>0}function pA(n){if(!n)return 0;const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 0;const e=t[1].split(/[\s,/]+/).filter(Boolean);return e.length===uA?parseFloat(e[Bm]):e.length===Vm?1:0}async function fA(n,t){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:ra((e.left-r.left)/r.width),y:ra((e.top-r.top)/r.height),width:ra(e.width/r.width),height:ra(e.height/r.height)},s=window.getComputedStyle(t),o=gA(s.backgroundImage);return o?vA({url:o,surfaceWidth:r.width,surfaceHeight:r.height,region:i}):yA(s.backgroundColor)}function gA(n){const t=n.match(/url\(\s*["']?([^"')]+)["']?\s*\)/);return t?t[1]:null}const bf=new Map;function mA(n){let t=bf.get(n);return t||(t=new Promise((e,r)=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>r(new Error(`Failed to load ${n}`)),i.src=n}),bf.set(n,t),t)}async function vA(n){const t=await mA(n.url),e=Math.max(yf,Math.ceil(n.surfaceWidth*vf)),r=Math.max(yf,Math.ceil(n.surfaceHeight*vf)),i=document.createElement("canvas");i.width=e,i.height=r;const s=i.getContext("2d",{willReadFrequently:!0});if(!s)return 1;const o=n.surfaceWidth/n.surfaceHeight,a=t.naturalWidth/t.naturalHeight;let c,u;a>o?(u=r,c=r*a):(c=e,u=e/a);const h=(e-c)/2,p=(r-u)/2;s.drawImage(t,h,p,c,u);const v=Math.max(0,Math.floor(n.region.x*e)),g=Math.max(0,Math.floor(n.region.y*r)),_=Math.max(1,Math.min(e-v,Math.floor(n.region.width*e))),k=Math.max(1,Math.min(r-g,Math.floor(n.region.height*r))),T=s.getImageData(v,g,_,k).data;let P=0,R=0;for(let W=0;W<T.length;W+=cA){const N=T[W]/lr,F=T[W+1]/lr,Y=T[W+2]/lr,j=T[W+Bm]/lr;P+=j*(jm*N+Gm*F+qm*Y),R+=1}return R>0?P/R:1}function yA(n){const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 1;const e=t[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);if(e.length<Vm)return 1;const r=e[0]/lr,i=e[1]/lr,s=e[2]/lr;return jm*r+Gm*i+qm*s}function ra(n){return n<0?0:n>1?1:n}const bA=["ghost","glass"],Rs=[...bA.flatMap(n=>[`button[variant="${n}"]`,`segmented-control[variant="${n}"]`]),'[material="glass"]'].join(", "),ia=new WeakSet,wf=new WeakSet;function Xm(n){if(wf.has(n))return;wf.add(n);for(const e of n.querySelectorAll(Rs))Lc(e);if(typeof MutationObserver!="function")return;new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const i of r.addedNodes)wA(i,Lc);else r.type==="attributes"&&r.target instanceof HTMLElement&&r.target.matches(Rs)&&Lc(r.target)}).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["variant","material"]})}function wA(n,t){if(n instanceof Element){n instanceof HTMLElement&&n.matches(Rs)&&t(n);for(const e of n.querySelectorAll(Rs))t(e)}}async function Lc(n){if(ia.has(n)||n.hasAttribute("tone"))return;ia.add(n);const t=await Ym(n);if(!n.matches(Rs)){ia.delete(n);return}if(n.hasAttribute("tone")){ia.delete(n);return}n.setAttribute("tone",t)}const SA="*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;height:100%}h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote,pre,hr{margin:0}button,input,textarea,select{font:inherit;color:inherit}@font-face{font-family:Hind;src:url("+new URL("Hind-Variable-C47b_dt9.woff2",import.meta.url).href+') format("woff2-variations");font-weight:300 700;font-style:normal;font-display:swap}:root{--font-sans: "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--font-brand: var(--font-sans);--font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;--font-weight-body: 500;--text-base: 13.5px;--text-scale: 1.125;--text-sm: round(calc(var(--text-base) / var(--text-scale)), 1px);--text-lg: round(calc(var(--text-base) * var(--text-scale)), 1px);--text-xl: round(calc(var(--text-lg) * var(--text-scale)), 1px);--leading-base: 1.5;--control-height-xs: 18px;--control-height-sm: 24px;--control-height-md: 28px;--control-height-lg: 32px;--space-2: 2px;--space-4: 4px;--space-6: 6px;--space-8: 8px;--space-12: 12px;--space-16: 16px;--space-20: 20px;--space-24: 24px;--space-32: 32px;--space-48: 48px;--space-64: 64px;--radius-4: 4px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-24: 24px;--radius-full: 9999px;--layer-chrome: 100;--layer-panel: 500;--layer-overlay: 2000;--shadow-hairline: 0 0 0 .5px var(--color-border);--shadow-control: 0 1px 1px rgb(0 0 0 / .04), 0 2px 6px rgb(0 0 0 / .06);--alpha-50: 4%;--alpha-100: 8%;--alpha-150: 11%;--alpha-200: 15%;--alpha-300: 22%;--alpha-400: 30%;--alpha-500: 40%;--alpha-600: 50%;--alpha-700: 65%;--alpha-800: 80%;--alpha-900: 90%;--alpha-950: 95%;--tint-50: color-mix(in srgb, currentColor var(--alpha-50), transparent);--tint-100: color-mix(in srgb, currentColor var(--alpha-100), transparent);--tint-150: color-mix(in srgb, currentColor var(--alpha-150), transparent);--tint-200: color-mix(in srgb, currentColor var(--alpha-200), transparent);--tint-300: color-mix(in srgb, currentColor var(--alpha-300), transparent);--tint-400: color-mix(in srgb, currentColor var(--alpha-400), transparent);--tint-500: color-mix(in srgb, currentColor var(--alpha-500), transparent);--tint-600: color-mix(in srgb, currentColor var(--alpha-600), transparent);--tint-700: color-mix(in srgb, currentColor var(--alpha-700), transparent);--tint-800: color-mix(in srgb, currentColor var(--alpha-800), transparent);--tint-900: color-mix(in srgb, currentColor var(--alpha-900), transparent);--tint-950: color-mix(in srgb, currentColor var(--alpha-950), transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-300), transparent);--backdrop-blur-glass: blur(20px) saturate(1.4);--black: #000000;--white: #ffffff;--neutral-50: oklch(.985 0 0);--neutral-100: oklch(.97 0 0);--neutral-200: oklch(.923 0 0);--neutral-300: oklch(.869 0 0);--neutral-350: oklch(.79 0 0);--neutral-400: oklch(.709 0 0);--neutral-500: oklch(.553 0 0);--neutral-600: oklch(.444 0 0);--neutral-700: oklch(.374 0 0);--neutral-800: oklch(.268 0 0);--neutral-900: oklch(.216 0 0);--neutral-950: oklch(.147 0 0);--red-50: oklch(.969 .015 12.422);--red-100: oklch(.941 .03 12.58);--red-200: oklch(.892 .058 10.001);--red-300: oklch(.81 .117 11.638);--red-400: oklch(.712 .194 13.428);--red-500: oklch(.645 .246 16.439);--red-600: oklch(.586 .253 17.585);--red-700: oklch(.514 .222 16.935);--red-800: oklch(.455 .188 13.697);--red-900: oklch(.41 .159 10.272);--red-950: oklch(.271 .105 12.094);--orange-50: oklch(.98 .016 73.684);--orange-100: oklch(.954 .038 75.164);--orange-200: oklch(.901 .076 70.697);--orange-300: oklch(.837 .128 66.29);--orange-400: oklch(.75 .183 55.934);--orange-500: oklch(.705 .213 47.604);--orange-600: oklch(.646 .222 41.116);--orange-700: oklch(.553 .195 38.402);--orange-800: oklch(.47 .157 37.304);--orange-900: oklch(.408 .123 38.172);--orange-950: oklch(.266 .079 36.259);--yellow-50: oklch(.987 .026 102.212);--yellow-100: oklch(.973 .071 103.193);--yellow-200: oklch(.945 .129 101.54);--yellow-300: oklch(.905 .182 98.111);--yellow-400: oklch(.852 .199 91.936);--yellow-500: oklch(.795 .184 86.047);--yellow-600: oklch(.681 .162 75.834);--yellow-700: oklch(.554 .135 66.442);--yellow-800: oklch(.476 .114 61.907);--yellow-900: oklch(.421 .095 57.708);--yellow-950: oklch(.286 .066 53.813);--green-50: oklch(.979 .021 166.113);--green-100: oklch(.95 .052 163.051);--green-200: oklch(.905 .093 164.15);--green-300: oklch(.845 .143 164.978);--green-400: oklch(.765 .177 163.223);--green-500: oklch(.696 .17 162.48);--green-600: oklch(.596 .145 163.225);--green-700: oklch(.508 .118 165.612);--green-800: oklch(.432 .095 166.913);--green-900: oklch(.378 .077 168.94);--green-950: oklch(.262 .051 172.552);--blue-50: oklch(.97 .014 254.604);--blue-100: oklch(.932 .032 255.585);--blue-200: oklch(.882 .059 254.128);--blue-300: oklch(.809 .105 251.813);--blue-400: oklch(.707 .165 254.624);--blue-500: oklch(.623 .214 259.815);--blue-600: oklch(.546 .245 262.881);--blue-700: oklch(.488 .243 264.376);--blue-800: oklch(.424 .199 265.638);--blue-900: oklch(.379 .146 265.522);--blue-950: oklch(.282 .091 267.935);--purple-50: oklch(.969 .016 293.756);--purple-100: oklch(.943 .029 294.588);--purple-200: oklch(.894 .057 293.283);--purple-300: oklch(.811 .111 293.571);--purple-400: oklch(.702 .183 293.541);--purple-500: oklch(.606 .25 292.717);--purple-600: oklch(.541 .281 293.009);--purple-700: oklch(.491 .27 292.581);--purple-800: oklch(.432 .232 292.759);--purple-900: oklch(.38 .189 293.745);--purple-950: oklch(.283 .141 291.089)}@supports (corner-shape: squircle){:root{--radius-8: 10px;--radius-12: 15px;--radius-16: 20px;--radius-24: 30px}}:root[data-font=system]{--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif}:root{--color-bg: var(--neutral-50);--color-bg-muted: var(--neutral-100);--color-surface: var(--white);--color-surface-muted: var(--neutral-100);--color-interactive: var(--neutral-200);--color-interactive-hover: var(--neutral-300);--color-border: rgba(0, 0, 0, .1);--color-border-muted: rgba(0, 0, 0, .06);--color-text: var(--neutral-900);--color-text-muted: var(--neutral-500);--color-link: inherit;--color-focus-ring: var(--neutral-500);--color-overlay-backdrop: rgb(0 0 0 / .5);--color-highlight: rgb(255 255 255 / .5);--color-primary: var(--blue-500);--color-danger: var(--red-600);color-scheme:light}body{font-family:var(--font-sans);font-size:var(--text-base);font-weight:var(--font-weight-body);line-height:var(--leading-base);letter-spacing:.015em;color:var(--color-text);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:var(--color-link);text-underline-offset:.15em;text-decoration-thickness:.08em}h1,h2,h3,h4,h5,h6{font-weight:600;color:inherit}code{font-family:var(--font-mono);font-size:.9em;background:var(--color-bg-muted);padding:var(--space-2) var(--space-4);border-radius:var(--radius-4)}pre{font-family:var(--font-mono);background:var(--color-bg-muted);padding:var(--space-12);border-radius:var(--radius-8);overflow-x:auto}pre code{background:none;padding:0}blockquote{padding-left:var(--space-16);border-left:3px solid var(--color-border);color:var(--color-text-muted)}hr{border:none;border-top:1px solid var(--color-border)}table{border-collapse:collapse}th,td{padding:var(--space-8) var(--space-12);border:1px solid var(--color-border);text-align:left}th{background:var(--color-bg-muted);font-weight:600}input,textarea{border:.5px solid var(--tint-300);border-radius:var(--radius-12);background:var(--tint-100);color:inherit;font:inherit;box-sizing:border-box;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}input{height:var(--control-height-lg);padding:0 12px}textarea{padding:6px 10px;resize:none}input::placeholder,textarea::placeholder{color:var(--tint-500)}input:focus,textarea:focus{background:color-mix(in srgb,var(--white) var(--alpha-300),transparent);border-color:var(--color-primary);outline:none;box-shadow:0 0 0 1.5px var(--color-primary)}label.field{display:grid;gap:4px;font-size:13px}label.field>span{font-size:11.5px;font-weight:450;color:var(--tint-800)}@supports (corner-shape: squircle){*{corner-shape:squircle}}button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);box-sizing:border-box;height:var(--control-height-md);padding:0 14px 2px;font:inherit;cursor:default}button,segmented-control{background:var(--color-surface);border:.5px solid var(--tint-200);border-radius:var(--radius-12);box-shadow:var(--shadow-control);color:inherit}button:not([material]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}button:not([material]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}button[variant=primary]{background:var(--color-primary);border-color:#0000002e;color:var(--white)}button[variant=primary]:hover:not(:disabled){background:color-mix(in srgb,var(--color-primary) 92%,black)}button[variant=primary]:active:not(:disabled){background:color-mix(in srgb,var(--color-primary) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=danger]{background:var(--color-danger);border-color:#0000002e;color:var(--white)}button[variant=danger]:hover:not(:disabled){background:color-mix(in srgb,var(--color-danger) 92%,black)}button[variant=danger]:active:not(:disabled){background:color-mix(in srgb,var(--color-danger) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=ghost]{background:transparent;border-color:transparent;color:inherit;box-shadow:none}button[variant=ghost]:hover:not(:disabled){background:var(--color-overlay-hover);backdrop-filter:saturate(1.2);-webkit-backdrop-filter:saturate(1.2)}button[variant=ghost]:active:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.4);-webkit-backdrop-filter:saturate(1.4);box-shadow:none}button[variant=ghost][data-active]:not(:disabled),button[variant=ghost][data-active]:hover:not(:disabled),button[variant=ghost][aria-pressed=true]:not(:disabled),button[variant=ghost][aria-pressed=true]:hover:not(:disabled),button[variant=ghost][aria-expanded=true]:not(:disabled),button[variant=ghost][aria-expanded=true]:hover:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.3);-webkit-backdrop-filter:saturate(1.3);box-shadow:none}button[variant=glass],segmented-control[variant=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);box-shadow:none}button[variant=glass]{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}button[variant=glass]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover));backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}button[variant=glass]:active:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}button[variant=glass][aria-pressed=true]:not(:disabled),button[variant=glass][aria-pressed=true]:hover:not(:disabled),button[variant=glass][aria-expanded=true]:not(:disabled),button[variant=glass][aria-expanded=true]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}[tone=dark] button[variant=glass],[tone=dark] segmented-control[variant=glass]{border-color:var(--tint-400)}button[material],segmented-control[material]{color:inherit;box-shadow:none}button[material]:hover:not(:disabled){background-image:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover))}button[material]:active:not(:disabled){background-image:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}[tone=dark] button[material],[tone=dark] segmented-control[material]{border-color:var(--tint-400)}button:disabled{background:var(--tint-300);border-color:transparent;color:var(--tint-700);box-shadow:none}:where([tone=dark]) button:not([variant]):not([material]):not(:disabled),:where([tone=dark]) button[variant=default]:not([material]):not(:disabled),:where([tone=dark]) segmented-control:not([variant]):not([material]),:where([tone=dark]) segmented-control[variant=default]:not([material]){background:var(--tint-200);border-color:var(--tint-300);box-shadow:inset 0 .5px 0 var(--tint-300)}:where([tone=dark]) button:not([variant]):hover:not(:disabled),:where([tone=dark]) button[variant=default]:hover:not(:disabled){background:var(--tint-300)}:where([tone=dark]) button:not([variant]):active:not(:disabled),:where([tone=dark]) button[variant=default]:active:not(:disabled){background:var(--tint-400);box-shadow:inset 0 1px 2px #0003}:where([tone=light]) button:not([variant]):not([material]):not(:disabled),:where([tone=light]) button[variant=default]:not([material]):not(:disabled),:where([tone=light]) segmented-control:not([variant]):not([material]),:where([tone=light]) segmented-control[variant=default]:not([material]){background:var(--color-surface);border-color:var(--tint-200);box-shadow:var(--shadow-control)}:where([tone=light]) button:not([variant]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}:where([tone=light]) button:not([variant]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button[size=sm],segmented-control[size=sm]{height:var(--control-height-sm)}button[size=sm][icon-only]{width:var(--control-height-sm)}button[size=xs]{height:var(--control-height-xs);padding:0 var(--space-6) 1px;border-radius:var(--radius-8)}button[size=xs][icon-only]{width:var(--control-height-xs);padding:0}button[icon-only]{width:var(--control-height-md);padding:0}[data-ui-icon]{display:inline-block;vertical-align:middle}[selectable],[selectable] *{user-select:text;-webkit-user-select:text}[unselectable],[unselectable] *{user-select:none;-webkit-user-select:none}.prose{line-height:var(--leading-base)}.prose h1{font-size:var(--text-xl);margin-bottom:var(--space-8)}.prose h2{font-size:var(--text-lg);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose h3,.prose h4,.prose h5,.prose h6{font-size:var(--text-base);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose p{margin:var(--space-12) 0}.prose ul,.prose ol{padding-left:var(--space-24);margin:var(--space-12) 0}.prose blockquote,.prose pre{margin:var(--space-12) 0}.prose hr{margin:var(--space-24) 0}.prose table{width:100%;margin:var(--space-12) 0}.prose img{max-width:100%;height:auto}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}[material=paper]{background:var(--white);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text)}[material=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}[material=glass-frosted]{background:color-mix(in srgb,var(--white) var(--alpha-800),transparent);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text);backdrop-filter:var(--backdrop-blur-glass);-webkit-backdrop-filter:var(--backdrop-blur-glass)}[tone=dark]{color:color-mix(in srgb,var(--white) var(--alpha-950),transparent);border-color:color-mix(in srgb,var(--white) var(--alpha-200),transparent);--color-overlay-hover: color-mix(in srgb, var(--white) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--white) var(--alpha-200), transparent)}[tone=dark][material=paper]{background:#000}[tone=dark][material=glass-frosted]{background:color-mix(in srgb,var(--black) 70%,transparent)}[tone=light]{color:var(--color-text);border-color:color-mix(in srgb,var(--black) var(--alpha-100),transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-50), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-100), transparent)}[level="1"]{box-shadow:0 12px 32px #00000024}[level="2"]{box-shadow:0 4px 6px -2px #0000001f,0 40px 60px -16px #00000038}dropdown-menu{position:relative;display:inline-block;color:inherit}dropdown-group{display:grid;gap:var(--space-4)}dropdown-label{display:block;padding:var(--space-4) var(--space-8);color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}dropdown-divider{display:block;height:1px;margin:2px 0;background:var(--color-border)}[data-dropdown-trigger][aria-expanded=true],[data-dropdown-trigger][aria-expanded=true]:hover,dropdown-menu[open]::part(trigger),dropdown-menu[open]::part(trigger):hover{background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}[data-dropdown-trigger-label],dropdown-menu::part(trigger-label){min-width:0}[data-dropdown-trigger-icon],dropdown-menu::part(trigger-icon){display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--color-text-muted);transform:translateY(1px)}dropdown-item:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}ui-popover.dropdown-popover::part(panel){min-width:192px;padding:var(--space-4)}.dropdown-list{display:flex;flex-direction:column;gap:2px}dropdown-item{display:flex;align-items:center;gap:var(--space-8);margin:0;padding:6px 12px;border-radius:var(--radius-8);font:inherit;line-height:1.2;color:inherit;font-weight:var(--font-weight-body);-webkit-user-select:none;user-select:none}dropdown-item>[data-ui-icon]{flex:none}dropdown-item[selected]{background:var(--color-overlay-active)}dropdown-item:hover,dropdown-item[action]:hover{background:var(--color-primary);color:var(--white)}dropdown-item[action]{color:inherit}dropdown-item[danger]{color:var(--color-danger)}dropdown-item[danger]:hover{background:var(--color-danger);color:var(--white)}editable-text{display:inline-block;max-width:100%;vertical-align:top}editable-text>.editable-text-span{display:inline-block;max-width:100%;outline:none;overflow:hidden;white-space:nowrap;cursor:inherit;vertical-align:top}editable-text:not([data-editing])>.editable-text-span{text-overflow:ellipsis}editable-text[data-editing]>.editable-text-span{cursor:text}modal-overlay{color:inherit}modal-overlay::part(backdrop){position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--layer-overlay);display:flex;align-items:center;justify-content:center;padding:var(--space-16);background:linear-gradient(to bottom,color-mix(in srgb,var(--black) var(--alpha-50),transparent),color-mix(in srgb,var(--black) var(--alpha-400),transparent));backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}panel-view{display:block}panel-view::part(panel){display:flex;flex-direction:column;gap:var(--space-16);color:var(--color-text)}panel-view::part(header){display:flex;align-items:center;justify-content:space-between;gap:var(--space-12)}panel-view::part(title){margin:0;font:inherit;font-size:var(--text-lg);font-weight:600;color:var(--color-text)}panel-view::part(button){display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;border:1px solid var(--color-border);border-radius:var(--radius-4);background:var(--color-surface);color:var(--color-text);box-shadow:none}panel-view::part(button):hover{background:var(--color-interactive-hover)}panel-view::part(button):focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}panel-view::part(icon){display:inline-flex;align-items:center;justify-content:center;flex:none}ui-popover{display:contents}ui-popover::part(panel){position:fixed;inset:0 auto auto 0;margin:0;min-width:192px;max-width:384px;padding:var(--space-16) var(--space-20);border-radius:var(--radius-12);outline:none;z-index:2000}segmented-control{display:inline-flex;align-items:stretch;box-sizing:border-box;height:var(--control-height-md)}segmented-control>button{height:auto}segmented-control[variant=ghost]{background:transparent;box-shadow:none}[tone=dark] segmented-control[variant=ghost]{border-color:var(--tint-400)}segmented-control>button{position:relative}segmented-control>button[icon-only]{width:auto;height:auto;padding:0 var(--space-6)}segmented-control>button:not([variant]):not(:disabled),[tone] segmented-control>button:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>button:not(:first-child):not(:last-child){border-radius:0}segmented-control>button:not([variant]):hover:not(:disabled),[tone] segmented-control>button:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>button:not([variant]):active:not(:disabled),[tone] segmented-control>button:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control>button:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>button:not(:last-child):after{background:var(--tint-400)}segmented-control>dropdown-menu{display:inline-flex;align-items:stretch;height:auto}segmented-control>dropdown-menu>[slot=trigger]{height:auto;position:relative}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>dropdown-menu:first-child>[slot=trigger]{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>dropdown-menu:last-child>[slot=trigger]{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>dropdown-menu:not(:first-child):not(:last-child)>[slot=trigger]{border-radius:0}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control[variant=glass]>button,segmented-control[variant=glass]>dropdown-menu{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}segmented-control[variant=glass]>button:not(:disabled):hover,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):hover){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled):active,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):active){backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}segmented-control[variant=glass]>button:not(:disabled)[aria-pressed=true],segmented-control[variant=glass]>button:not(:disabled)[aria-current]:not([aria-current=false]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-pressed=true]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-current]:not([aria-current=false])){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled)[aria-expanded=true],segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-expanded=true]){backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}segmented-control>dropdown-menu:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>dropdown-menu:not(:last-child):after{background:var(--tint-400)}ui-spinner{display:inline-flex;align-items:center;justify-content:center;line-height:0;color:inherit}ui-spinner .spin,.spin{display:inline-flex;animation:ui-spinner-spin 1s steps(8,end) infinite}@keyframes ui-spinner-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spin{animation:none}}system-modal{display:flex;flex-direction:column;width:min(400px,100%);box-sizing:border-box;padding:var(--space-32) var(--space-24);border-radius:var(--radius-12)}system-modal header{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);text-align:center}system-modal header>hgroup{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);max-width:100%}system-modal header h2{margin:0;font-size:var(--text-lg);font-weight:600;letter-spacing:.01em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}system-modal header p{margin:0;font-size:var(--text-base);opacity:.7;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ui-pill{display:inline-block;vertical-align:baseline;margin:2px 0;padding:0 var(--space-8);font-size:var(--text-sm);font-weight:500;line-height:1.7;border-radius:var(--radius-full);border:1px solid var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900);white-space:nowrap}ui-pill[color=gray]{border-color:var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900)}ui-pill[color=red]{border-color:var(--red-200);background:var(--red-100);color:var(--red-950)}ui-pill[color=orange]{border-color:var(--orange-200);background:var(--orange-100);color:var(--orange-950)}ui-pill[color=yellow]{border-color:var(--yellow-200);background:var(--yellow-100);color:var(--yellow-950)}ui-pill[color=green]{border-color:var(--green-200);background:var(--green-100);color:var(--green-950)}ui-pill[color=blue]{border-color:var(--blue-200);background:var(--blue-100);color:var(--blue-950)}ui-pill[color=purple]{border-color:var(--purple-200);background:var(--purple-100);color:var(--purple-950)}',Hh=new CSSStyleSheet;Hh.replaceSync(SA);const Wh=new CSSStyleSheet;try{document.adoptedStyleSheets=[...document.adoptedStyleSheets,Hh,Wh]}catch{}Xm(document);function Km(n){Wh.replaceSync(n)}function qa(){Km("")}function Zh(n){try{n.adoptedStyleSheets=[...n.adoptedStyleSheets,Hh,Wh]}catch{}Xm(n)}const _A=new Set(["target","currentTarget","eventPhase","defaultPrevented","isTrusted","timeStamp","srcElement","returnValue","cancelBubble","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","composedPath","stopPropagation","stopImmediatePropagation","preventDefault","initEvent"]);function kA(n){for(const t of Object.keys(n))if(_A.has(t))throw new Error(`Event payload key "${t}" is reserved; choose a different property name`)}function xA(n,t){kA(t);for(const e of Object.keys(t))Object.defineProperty(n,e,{value:t[e],writable:!0,enumerable:!0,configurable:!0})}function it(){class n extends Event{constructor(e,r){const{type:i,bubbles:s,cancelable:o,composed:a,...c}=r??{};if(i!==void 0)throw new Error('Do not pass "type" in init; use the constructor argument instead');super(e,{bubbles:s,cancelable:o,composed:a}),xA(this,c)}}return n}class qt extends globalThis.EventTarget{}function EA(n,t,e){const r=n.dispose.bind(n);n.dispose=()=>{if(!t())return e(),r()}}function No(n){var e;class t extends n{constructor(...s){super(...s);w(this,e,!1);EA(this,()=>l(this,e),()=>{S(this,e,!0)})}[Symbol.dispose](){this.dispose()}get disposed(){return l(this,e)}}return e=new WeakMap,t}const AA=it(),$A=it(),TA=it(),xa=it(),Jm="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ya=32,IA=16,Qm=10,Sf=0xffffffffffff;var cr;(function(n){n.Base32IncorrectEncoding="B32_ENC_INVALID",n.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",n.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",n.EncodeTimeNegative="ENC_TIME_NEG",n.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",n.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",n.PRNGDetectFailure="PRNG_DETECT",n.ULIDInvalid="ULID_INVALID",n.Unexpected="UNEXPECTED",n.UUIDInvalid="UUID_INVALID"})(cr||(cr={}));class gs extends Error{constructor(t,e){super(`${e} (${t})`),this.name="ULIDError",this.code=t}}function CA(n){const t=Math.floor(n()*Ya)%Ya;return Jm.charAt(t)}function RA(n){const t=PA(),e=t&&(t.crypto||t.msCrypto)||null;if(typeof(e==null?void 0:e.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]/256};if(typeof(e==null?void 0:e.randomBytes)=="function")return()=>e.randomBytes(1).readUInt8()/256;throw new gs(cr.PRNGDetectFailure,"Failed to find a reliable PRNG")}function PA(){return zA()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function DA(n,t){let e="";for(;n>0;n--)e=CA(t)+e;return e}function LA(n,t=Qm){if(isNaN(n))throw new gs(cr.EncodeTimeValueMalformed,`Time must be a number: ${n}`);if(n>Sf)throw new gs(cr.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Sf}: ${n}`);if(n<0)throw new gs(cr.EncodeTimeNegative,`Time must be positive: ${n}`);if(Number.isInteger(n)===!1)throw new gs(cr.EncodeTimeValueMalformed,`Time must be an integer: ${n}`);let e,r="";for(let i=t;i>0;i--)e=n%Ya,r=Jm.charAt(e)+r,n=(n-e)/Ya;return r}function zA(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Pl(n,t){const e=RA(),r=Date.now();return LA(r,Qm)+DA(IA,e)}const mt=4,ct=6,Ps=2,pu=2,Bh=8,OA=ct,Vh="auto",Un="auto",Sn=120,_f=50,ce=16,Dr=Sn*mt+ce*(mt-1),Xa=Sn*ct+ce*(ct-1),MA=Dr+ce*2,NA=200,UA=4,sa=150,FA=10,kf=2,xf=8,HA=300,WA=4;function ev(n){return rv(n)}function tv(n,t){return rv(n.flatMap(e=>sv(e,t)))}function nv(n){const t=[],e=new Set;for(const r of n){if(r.type==="row"){t.push(`Top-level rows are invalid: ${r.id}`);continue}ov(r,"strip",t,e)}return{valid:t.length===0,errors:t}}function ur(n){const t=ev(n),e=nv(t);if(!e.valid)throw new Error(`Invalid layout: ${e.errors.join("; ")}`);return{totalNodes:t.length,nodes:t.filter(r=>r.type!=="row").map(jA)}}function rv(n){const t=[];for(const e of n){const r=iv(e);for(const i of r){if(i.type==="row"){t.push(...i.children.map(dn));continue}t.push(i)}}return t}function iv(n){switch(n.type){case"card":return[dn(n)];case"row":{const t=n.children.map(dn);return t.length===0?[]:t.length===1?[t[0]]:[{...n,children:t}]}case"stack":{const t=[];for(const e of n.children){const r=iv(e);for(const i of r){if(i.type==="stack"){t.push(...i.children.map(fu));continue}if(i.type==="row"){t.push({...i,children:i.children.map(dn)});continue}t.push(dn(i))}}return t.length===0?[]:t.length===1?[fu(t[0])]:[{...n,children:t}]}}}function sv(n,t){switch(n.type){case"card":return n.artifactID===t?[]:[dn(n)];case"row":{const e=n.children.filter(r=>r.artifactID!==t).map(dn);return e.length===0?[]:e.length===1?[e[0]]:[{...n,children:e}]}case"stack":{const e=n.children.flatMap(r=>sv(r,t).filter(s=>s.type!=="stack"));return e.length===0?[]:e.length===1?[fu(e[0])]:[{...n,children:e}]}}}function ov(n,t,e,r){switch(n.type){case"card":av(n,t,e,r);return;case"row":ZA(n,t,e,r);return;case"stack":BA(n,t,e,r);return}}function av(n,t,e,r){jh(n.id,e),typeof n.artifactID!="string"||n.artifactID.length===0?e.push(`Card ${n.id} is missing artifactID`):r.has(n.artifactID)?e.push(`Duplicate artifactID in layout: ${n.artifactID}`):r.add(n.artifactID),VA(n.width)||e.push(`Card ${n.id} width must be an integer in the range ${Ps}-${Bh}`),lv(n.height)||e.push(`Card ${n.id} height must be an integer in the range 2-6 or "auto"`);const i=sr(n.width);t==="row"&&i<Ps&&e.push(`Row child ${n.id} must be at least 2 columns wide`)}function ZA(n,t,e,r){if(jh(n.id,e),t!=="stack"&&e.push(`Row ${n.id} may only appear inside a stack`),lv(n.height,WA)||e.push(`Row ${n.id} height must be an integer in the range 2-4 or "auto"`),!Array.isArray(n.children)||n.children.length===0){e.push(`Row ${n.id} must contain card nodes`);return}let i=0;for(const s of n.children){if(s.type!=="card"){e.push(`Row ${n.id} must contain only card nodes`);continue}av(s,"row",e,r),i+=sr(s.width)}i!==mt&&e.push(`Row ${n.id} children must sum to 4 columns`)}function BA(n,t,e,r){if(jh(n.id,e),t!=="strip"&&e.push(`Invalid nested stack at ${n.id}; stack children cannot contain another nested stack`),!Array.isArray(n.children)||n.children.length===0){e.push(`Stack ${n.id} must contain at least one child`);return}let i=0,s=0;for(const a of n.children){if(a.type==="stack"){e.push(`Stack ${n.id} cannot contain another nested stack`);continue}if(ov(a,"stack",e,r),a.height===Un){s+=1;continue}i+=a.height}if(i>ct&&e.push(`Stack ${n.id} exceeds the 6-row budget`),s===0)return;const o=ct-i;if(o<s*pu||o%s!==0){e.push(`Stack ${n.id} has auto-height children that cannot resolve to whole height >= 2`);return}o/s<pu&&e.push(`Stack ${n.id} has auto-height children below the minimum row size`)}function jh(n,t){(typeof n!="string"||n.length===0)&&t.push(`Node id must be a non-empty string: ${String(n)}`)}function VA(n){return n===Vh||Number.isInteger(n)&&n>=Ps&&n<=Bh}function lv(n,t=OA){return n===Un||Number.isInteger(n)&&n>=pu&&n<=t}function sr(n){return n===Vh?mt:n}function jA(n){if(n.type==="card")return{id:n.id,type:"card",width:sr(n.width),cards:[{id:n.id,artifactID:n.artifactID,col:1,row:1,width:sr(n.width),height:cv(n.height,ct)}]};const t=GA(n.children),e=[];let r=1;for(let i=0;i<n.children.length;i+=1){const s=n.children[i],o=t[i];if(s.type==="card")e.push({id:s.id,artifactID:s.artifactID,col:1,row:r,width:Math.min(mt,sr(s.width)),height:o});else{let a=1;for(const c of s.children)e.push({id:c.id,artifactID:c.artifactID,col:a,row:r,width:sr(c.width),height:o}),a+=sr(c.width)}r+=o}return{id:n.id,type:"stack",width:e.reduce((i,s)=>Math.max(i,s.col+s.width-1),1),cards:e}}function GA(n){let t=0,e=0;for(const i of n)i.height===Un?e+=1:t+=i.height;const r=e>0?(ct-t)/e:0;return n.map(i=>cv(i.height,r))}function cv(n,t){return n===Un?t:n}function dn(n){return{...n}}function fu(n){return n.type==="card"?dn(n):{...n,children:n.children.map(dn)}}function uv(n,t={}){return{id:t.id??Pl(),type:"card",artifactID:n,width:t.width??Vh,height:t.height??Un}}function hv(n,t){return n.some(e=>dv(e,t))}function dv(n,t){switch(n.type){case"card":return n.artifactID===t;case"row":return n.children.some(e=>e.artifactID===t);case"stack":return n.children.some(e=>dv(e,t))}}function Ef(n){return n.layout.flatMap(pv)}function pv(n){switch(n.type){case"card":return[n.artifactID];case"row":return n.children.map(t=>t.artifactID);case"stack":return n.children.flatMap(pv)}}const oe=it(),gu=it(),ei=it(),qA=it();function YA(n){class t extends Error{constructor(r,i){super(r),this.name=n,i&&Object.assign(this,i)}}return t}const fv=YA("RequestError"),XA=200,KA=300;class JA{constructor(t,e){m(this,"serverURL");m(this,"token");this.serverURL=t.replace(/\/$/,""),this.token=e.token}async requestJSON(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0),s=await QA(i);if(!i.ok||i.status<XA||i.status>=KA)throw this.createError(typeof s.error=="string"?s.error:i.statusText,i.status);return s}async requestVoid(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0);if(!i.ok)throw this.createError(await zc(i,i.statusText),i.status)}async requestText(t,e){const r=await this.request(t,e);if(!r.ok)throw this.createError(await zc(r,r.statusText),r.status);return r.text()}async requestRawVoid(t,e,r){const i=await this.request(t,e,r,{"content-type":"text/plain"});if(!i.ok)throw this.createError(await zc(i,i.statusText),i.status)}createError(t,e){const r={serverURL:this.serverURL};return e!==void 0&&(r.status=e),new fv(t,r)}async request(t,e,r,i){const s=`${this.serverURL}${e}`;try{return await fetch(s,{method:t,headers:this.buildHeaders(i),body:r})}catch(o){throw this.createError(o instanceof Error?o.message:"Failed to reach server")}}buildHeaders(t){const e={...t??{}};return this.token&&(e.Authorization=`Bearer ${this.token}`),Object.keys(e).length>0?e:void 0}}async function QA(n){try{return await n.json()}catch{const t=await n.text().catch(()=>"");return t?{message:t}:{}}}async function zc(n,t){try{const e=await n.json();if(typeof e.error=="string")return e.error;if(typeof e.message=="string")return e.message}catch{}return t}function e$(n){return n.map(t=>`${t.name} (${t.id})`).join(", ")}var Ot,cl,gv;class t${constructor(t){w(this,cl);w(this,Ot);S(this,Ot,t)}list(){return l(this,Ot).requestJSON("GET","/screens")}async get(t={}){const e=await f(this,cl,gv).call(this,t.screenID);return l(this,Ot).requestJSON("GET",`/screens/${encodeURIComponent(e)}`)}create(t){const e={name:t.name};return t.id!==void 0&&(e.id=t.id),l(this,Ot).requestJSON("POST","/screens",e)}update(t){const{screenID:e,...r}=t;return l(this,Ot).requestJSON("PATCH",`/screens/${encodeURIComponent(e)}`,r)}remove(t){return l(this,Ot).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}`)}}Ot=new WeakMap,cl=new WeakSet,gv=async function(t){if(t!==void 0)return t;const{screens:e}=await this.list();if(e.length===1)return e[0].id;throw l(this,Ot).createError(`screenID is required when multiple screens exist. Available screens: ${e$(e)}`)};var Fe;class n${constructor(t){w(this,Fe);S(this,Fe,t)}create(t){const e={kind:t.kind,title:t.title};switch(t.kind){case"markdown":e.externalFilePath=t.externalFilePath;break;case"url":e.externalURL=t.externalURL;break;case"web-bundle":t.skipPending!==void 0&&(e.skipPending=t.skipPending);break}return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,Fe).requestJSON("POST","/artifacts",e)}list(t={}){const e=new URLSearchParams;t.screenID!==void 0&&e.set("screenID",t.screenID),t.unplaced&&e.set("unplaced","true");const r=e.toString();return l(this,Fe).requestJSON("GET",r?`/artifacts?${r}`:"/artifacts")}get(t){return l(this,Fe).requestJSON("GET",`/artifacts/${encodeURIComponent(t.artifactID)}`)}update(t){const e={};return t.title!==void 0&&(e.title=t.title),l(this,Fe).requestJSON("PATCH",`/artifacts/${encodeURIComponent(t.artifactID)}`,e)}edit(t){return l(this,Fe).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/edit`)}commitPending(t){return l(this,Fe).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/commit`)}abandonPending(t){return l(this,Fe).requestVoid("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/abandon`)}attach(t){return l(this,Fe).requestJSON("POST",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}detach(t){return l(this,Fe).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}delete(t){return l(this,Fe).requestJSON("DELETE",`/artifacts/${encodeURIComponent(t.artifactID)}`)}getContent(t){return l(this,Fe).requestText("GET",`/artifacts/${encodeURIComponent(t.artifactID)}/content`)}putContent(t){return l(this,Fe).requestRawVoid("PUT",`/artifacts/${encodeURIComponent(t.artifactID)}/content`,t.content)}}Fe=new WeakMap;var dr;class r${constructor(t){w(this,dr);S(this,dr,t)}get(){return l(this,dr).requestJSON("GET","/display")}patch(t){const e={};return t.activeScreenID!==void 0&&(e.activeScreenID=t.activeScreenID),t.activeThemeName!==void 0&&(e.activeThemeName=t.activeThemeName),l(this,dr).requestVoid("PATCH","/display",e)}focus(t){const e={artifactID:t.artifactID};return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,dr).requestJSON("POST","/display/focus",e)}}dr=new WeakMap;var Ns;class i${constructor(t){w(this,Ns);S(this,Ns,t)}async list(){const{views:t}=await l(this,Ns).requestJSON("GET","/views");return t}}Ns=new WeakMap;var rn;class s${constructor(t,e={}){m(this,"screens");m(this,"artifacts");m(this,"display");m(this,"views");w(this,rn);S(this,rn,new JA(t,e)),this.screens=new t$(l(this,rn)),this.artifacts=new n$(l(this,rn)),this.display=new r$(l(this,rn)),this.views=new i$(l(this,rn))}health(){return l(this,rn).requestJSON("GET","/health")}}rn=new WeakMap;const o$={focusCommandInput:{label:"Focus Command Input",trigger:{key:"k",meta:!0}}},a$="Local",l$="store-";function we(n){return new URL(n).origin}function c$(n){return{servers:[{url:we(n),name:a$}],activeServerURL:null,activeScreenID:null,tabs:{},screens:{}}}function u$(n,t){return[...n.tabs[we(t)]??[]]}function h$(n,t,e){const r=we(t),i=n.tabs[r]??[];return i.includes(e)?n:{...n,tabs:{...n.tabs,[r]:[...i,e]}}}function d$(n,t,e){const r=we(t),i=n.tabs[r]??[],s=i.filter(a=>a!==e);if(s.length===i.length)return n;const o={...n.tabs};return s.length===0?delete o[r]:o[r]=s,{...n,tabs:o}}var pr,fr,gr;class p$ extends qt{constructor(e,r,i={}){super();w(this,pr);w(this,fr);w(this,gr);S(this,pr,`${l$}${e}`),S(this,fr,i.storage??f$());const s=l(this,fr).getItem(l(this,pr));s===null?(S(this,gr,r),l(this,fr).setItem(l(this,pr),JSON.stringify(r))):S(this,gr,g$(JSON.parse(s),r))}get(){return l(this,gr)}set(e){S(this,gr,e),l(this,fr).setItem(l(this,pr),JSON.stringify(e)),this.dispatchEvent(new oe("change"))}}pr=new WeakMap,fr=new WeakMap,gr=new WeakMap;function f$(){const n=globalThis.localStorage;if(!n)throw new Error("LocalStore: no storage adapter supplied and window.localStorage is unavailable");return n}function g$(n,t){return{servers:Array.isArray(n.servers)?n.servers:t.servers,activeServerURL:typeof n.activeServerURL=="string"||n.activeServerURL===null?n.activeServerURL:t.activeServerURL,activeScreenID:typeof n.activeScreenID=="string"||n.activeScreenID===null?n.activeScreenID:t.activeScreenID,tabs:n.tabs&&typeof n.tabs=="object"?n.tabs:t.tabs,screens:n.screens&&typeof n.screens=="object"?n.screens:t.screens}}const m$=No(qt);var mr,Ke,vr,Be,kn,xn,te,ri,mv,Us,vv,yv,bv,wv,mu,vu,yu,Sv;class v$ extends m${constructor(e){var i;super();w(this,te);m(this,"id");m(this,"server");w(this,mr);w(this,Ke,new Map);w(this,vr);w(this,Be);w(this,kn);w(this,xn,null);w(this,Us,e=>{if(this.disposed)return;const r=e.event;switch(r.type){case"screen-updated":r.screen.id===this.id&&f(this,te,vv).call(this,r.screen);break;case"artifact-created":break;case"artifact-attached":r.screenID===this.id&&f(this,te,yv).call(this,r.cardID,r.artifact);break;case"artifact-updated":f(this,te,bv).call(this,r.artifact);break;case"artifact-removed":r.screenID===this.id&&f(this,te,wv).call(this,r.artifactID);break;case"artifact-content-changed":l(this,Ke).has(r.artifactID)&&this.dispatchEvent(new qA("artifact-content-changed",{artifactID:r.artifactID}));break}});this.id=e.screen.id,this.server=e.server,S(this,mr,e.localStore),S(this,vr,e.screen.name),S(this,Be,structuredClone(e.screen.layout));const r=((i=l(this,mr).get().screens[this.id])==null?void 0:i.scrollPosition)??0;S(this,kn,Math.max(0,r)),this.server.addEventListener("server-event",l(this,Us)),f(this,te,mv).call(this)}get name(){return l(this,vr)}get layout(){return l(this,Be)}get scrollPosition(){return l(this,kn)}get artifacts(){return l(this,Ke)}setScrollPosition(e){f(this,te,ri).call(this);const r=Math.max(0,e);r!==l(this,kn)&&(S(this,kn,r),f(this,te,Sv).call(this),this.dispatchEvent(new oe("change")))}setLayout(e){f(this,te,ri).call(this);const r=ev(e);if(!nv(r).valid)return;const s=f(this,te,vu).call(this);S(this,Be,r),S(this,xn,{layout:r,snapshot:s}),this.dispatchEvent(new oe("change")),this.server.client.screens.update({screenID:this.id,layout:r.map(o=>structuredClone(o))}).catch(()=>{var o;this.disposed||((o=l(this,xn))==null?void 0:o.layout)===r&&(S(this,xn,null),f(this,te,yu).call(this,s),this.dispatchEvent(new oe("change")))})}rename(e){f(this,te,ri).call(this),S(this,vr,e),this.dispatchEvent(new oe("change")),this.server.client.screens.update({screenID:this.id,name:e}).catch(()=>{})}async remove(){f(this,te,ri).call(this),await this.server.client.screens.remove({screenID:this.id})}removeArtifact(e){if(f(this,te,ri).call(this),!l(this,Ke).has(e))return;const r=f(this,te,vu).call(this);f(this,te,mu).call(this,e),this.dispatchEvent(new oe("change")),this.server.client.artifacts.detach({artifactID:e,screenID:this.id}).catch(()=>{this.disposed||(f(this,te,yu).call(this,r),this.dispatchEvent(new oe("change")))})}dispose(){this.server.removeEventListener("server-event",l(this,Us))}}mr=new WeakMap,Ke=new WeakMap,vr=new WeakMap,Be=new WeakMap,kn=new WeakMap,xn=new WeakMap,te=new WeakSet,ri=function(){if(this.disposed)throw new Error("ScreenModel is disposed")},mv=async function(){try{const e=await this.server.client.screens.get({screenID:this.id});if(this.disposed)return;for(const r of e.artifacts)l(this,Ke).set(r.id,r);this.dispatchEvent(new oe("change"))}catch{}},Us=new WeakMap,vv=function(e){l(this,xn)&&S(this,xn,null),S(this,vr,e.name),S(this,Be,structuredClone(e.layout)),this.dispatchEvent(new oe("change"))},yv=function(e,r){hv(l(this,Be),r.id)||S(this,Be,[...l(this,Be),uv(r.id,{id:e})]),l(this,Ke).set(r.id,r),this.dispatchEvent(new oe("change"))},bv=function(e){const r=l(this,Ke).get(e.id);r&&(l(this,Ke).set(e.id,{...r,...e}),this.dispatchEvent(new oe("change")))},wv=function(e){f(this,te,mu).call(this,e)&&this.dispatchEvent(new oe("change"))},mu=function(e){const r=l(this,Ke).delete(e),i=Ef({layout:l(this,Be)}).length,s=tv(l(this,Be),e),o=Ef({layout:s}).length;return S(this,Be,s),r||i!==o},vu=function(){return{layout:structuredClone(l(this,Be)),artifacts:new Map([...l(this,Ke).entries()].map(([e,r])=>[e,structuredClone(r)]))}},yu=function(e){S(this,Be,structuredClone(e.layout)),l(this,Ke).clear();for(const[r,i]of e.artifacts)l(this,Ke).set(r,structuredClone(i))},Sv=function(){const e=l(this,mr).get();l(this,mr).set({...e,screens:{...e.screens,[this.id]:{scrollPosition:l(this,kn)}}})};const y$=No(qt);var ze,Je,Mt,Fs,Hs,Ws,je,Ea,bu,ii;class b$ extends y${constructor(e){super();w(this,je);w(this,ze);w(this,Je);w(this,Mt,null);w(this,Fs,()=>{this.disposed||f(this,je,Ea).call(this)});w(this,Hs,()=>{this.disposed||f(this,je,Ea).call(this)});w(this,Ws,e=>{if(this.disposed)return;const r=e.event;if(r.type==="screen-removed"){this.removeTab(e.serverURL,r.screenID);const i=l(this,ze).get();i.activeServerURL===we(e.serverURL)&&i.activeScreenID===r.screenID&&f(this,je,ii).call(this,e.serverURL,null);return}if(r.type==="screen-changed"){if(r.screenID===null){f(this,je,ii).call(this,e.serverURL,null);return}const i=l(this,Je).servers.get(we(e.serverURL));if(!i||!i.screens.has(r.screenID))return;this.addTab(e.serverURL,r.screenID),f(this,je,ii).call(this,e.serverURL,r.screenID)}});S(this,ze,e.localStore),S(this,Je,e.serverManager),l(this,ze).addEventListener("change",l(this,Fs)),l(this,Je).addEventListener("change",l(this,Hs)),l(this,Je).addEventListener("server-event",l(this,Ws)),f(this,je,Ea).call(this)}get activeScreen(){return l(this,Mt)}getTabs(e){const r=we(e),i=u$(l(this,ze).get(),r),s=l(this,Je).servers.get(r);return s?i.filter(o=>s.screens.has(o)):i}hasTab(e,r){return this.getTabs(e).includes(r)}addTab(e,r){const i=we(e),s=l(this,Je).servers.get(i);s&&!s.screens.has(r)||f(this,je,bu).call(this,h$(l(this,ze).get(),i,r))}removeTab(e,r){f(this,je,bu).call(this,d$(l(this,ze).get(),e,r))}setActive(e,r){const i=we(e),s=l(this,Je).servers.get(i);!s||!s.screens.has(r)||f(this,je,ii).call(this,i,r)&&s.client.display.patch({activeScreenID:r}).catch(()=>{})}clearActive(){const e=l(this,ze).get().activeServerURL;if(!e||!f(this,je,ii).call(this,e,null))return;const r=l(this,Je).servers.get(e);r==null||r.client.display.patch({activeScreenID:null}).catch(()=>{})}dispose(){var e;l(this,ze).removeEventListener("change",l(this,Fs)),l(this,Je).removeEventListener("change",l(this,Hs)),l(this,Je).removeEventListener("server-event",l(this,Ws)),(e=l(this,Mt))==null||e.dispose(),S(this,Mt,null)}}ze=new WeakMap,Je=new WeakMap,Mt=new WeakMap,Fs=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,je=new WeakSet,Ea=function(){var c,u,h;const{activeServerURL:e,activeScreenID:r}=l(this,ze).get(),i=e?l(this,Je).servers.get(e)??null:null,s=i&&r?i.screens.get(r)??null:null,o=((c=l(this,Mt))==null?void 0:c.id)??null,a=(s==null?void 0:s.id)??null;o===a&&((u=l(this,Mt))==null?void 0:u.server)===i||((h=l(this,Mt))==null||h.dispose(),S(this,Mt,i&&s?new v$({screen:s,server:i,localStore:l(this,ze)}):null),i&&i.acpClient.setScreenContext(s?{screenID:s.id,screenName:s.name}:null),this.dispatchEvent(new AA("active-screen-changed")))},bu=function(e){e!==l(this,ze).get()&&(l(this,ze).set(e),this.dispatchEvent(new $A("tabs-changed")))},ii=function(e,r){const i=we(e),s=l(this,ze).get();return s.activeServerURL===i&&s.activeScreenID===r?!1:(l(this,ze).set({...s,activeServerURL:i,activeScreenID:r}),!0)};function A(n,t,e){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(n))return;a._zod.traits.add(n),t(a,c);const u=o.prototype,h=Object.keys(u);for(let p=0;p<h.length;p++){const v=h[p];v in a||(a[v]=u[v].bind(a))}}const i=(e==null?void 0:e.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:n});function o(a){var c;const u=e!=null&&e.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var c,u;return e!=null&&e.Parent&&a instanceof e.Parent?!0:(u=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:u.has(n)}}),Object.defineProperty(o,"name",{value:n}),o}class mi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _v extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const kv={};function Fn(n){return kv}function xv(n){const t=Object.values(n).filter(r=>typeof r=="number");return Object.entries(n).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function wu(n,t){return typeof t=="bigint"?t.toString():t}function Gh(n){return{get value(){{const t=n();return Object.defineProperty(this,"value",{value:t}),t}}}}function qh(n){return n==null}function Yh(n){const t=n.startsWith("^")?1:0,e=n.endsWith("$")?n.length-1:n.length;return n.slice(t,e)}function w$(n,t){const e=(n.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c!=null&&c[1]&&(i=Number.parseInt(c[1]))}const s=e>i?e:i,o=Number.parseInt(n.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}const Af=Symbol("evaluating");function ne(n,t,e){let r;Object.defineProperty(n,t,{get(){if(r!==Af)return r===void 0&&(r=Af,r=e()),r},set(i){Object.defineProperty(n,t,{value:i})},configurable:!0})}function Wr(n,t,e){Object.defineProperty(n,t,{value:e,writable:!0,enumerable:!0,configurable:!0})}function jn(...n){const t={};for(const e of n){const r=Object.getOwnPropertyDescriptors(e);Object.assign(t,r)}return Object.defineProperties({},t)}function $f(n){return JSON.stringify(n)}function S$(n){return n.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ev="captureStackTrace"in Error?Error.captureStackTrace:(...n)=>{};function Ka(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}const _$=Gh(()=>{var n;if(typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ni(n){if(Ka(n)===!1)return!1;const t=n.constructor;if(t===void 0||typeof t!="function")return!0;const e=t.prototype;return!(Ka(e)===!1||Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")===!1)}function Av(n){return Ni(n)?{...n}:Array.isArray(n)?[...n]:n}const k$=new Set(["string","number","symbol"]);function Ui(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gn(n,t,e){const r=new n._zod.constr(t??n._zod.def);return(!t||e!=null&&e.parent)&&(r._zod.parent=n),r}function M(n){const t=n;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function x$(n){return Object.keys(n).filter(t=>n[t]._zod.optin==="optional"&&n[t]._zod.optout==="optional")}const E$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function A$(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=jn(n._zod.def,{get shape(){const o={};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=e.shape[a])}return Wr(this,"shape",o),o},checks:[]});return Gn(n,s)}function $$(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=jn(n._zod.def,{get shape(){const o={...n._zod.def.shape};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return Wr(this,"shape",o),o},checks:[]});return Gn(n,s)}function T$(n,t){if(!Ni(t))throw new Error("Invalid input to extend: expected a plain object");const e=n._zod.def.checks;if(e&&e.length>0){const s=n._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=jn(n._zod.def,{get shape(){const s={...n._zod.def.shape,...t};return Wr(this,"shape",s),s}});return Gn(n,i)}function I$(n,t){if(!Ni(t))throw new Error("Invalid input to safeExtend: expected a plain object");const e=jn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t};return Wr(this,"shape",r),r}});return Gn(n,e)}function C$(n,t){const e=jn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t._zod.def.shape};return Wr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Gn(n,e)}function R$(n,t,e){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=jn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(e)for(const u in e){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);e[u]&&(c[u]=n?new n({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=n?new n({type:"optional",innerType:a[u]}):a[u];return Wr(this,"shape",c),c},checks:[]});return Gn(t,o)}function P$(n,t,e){const r=jn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(e)for(const o in e){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=new n({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new n({type:"nonoptional",innerType:i[o]});return Wr(this,"shape",s),s}});return Gn(t,r)}function pi(n,t=0){var e;if(n.aborted===!0)return!0;for(let r=t;r<n.issues.length;r++)if(((e=n.issues[r])==null?void 0:e.continue)!==!0)return!0;return!1}function fi(n,t){return t.map(e=>{var r;return(r=e).path??(r.path=[]),e.path.unshift(n),e})}function oa(n){return typeof n=="string"?n:n==null?void 0:n.message}function Hn(n,t,e){var i,s,o,a,c,u;const r={...n,path:n.path??[]};if(!n.message){const h=oa((o=(s=(i=n.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,n))??oa((a=t==null?void 0:t.error)==null?void 0:a.call(t,n))??oa((c=e.customError)==null?void 0:c.call(e,n))??oa((u=e.localeError)==null?void 0:u.call(e,n))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Xh(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function Ds(...n){const[t,e,r]=n;return typeof t=="string"?{message:t,code:"custom",input:e,inst:r}:{...t}}const $v=(n,t)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:t,enumerable:!1}),n.message=JSON.stringify(t,wu,2),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},Tv=A("$ZodError",$v),Iv=A("$ZodError",$v,{Parent:Error});function D$(n,t=e=>e.message){const e={},r=[];for(const i of n.issues)i.path.length>0?(e[i.path[0]]=e[i.path[0]]||[],e[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:e}}function L$(n,t=e=>e.message){const e={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)e._errors.push(t(s));else{let o=e,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],a++}}};return r(n),e}const Kh=n=>(t,e,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise)throw new mi;if(o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>Hn(c,s,Fn())));throw Ev(a,i==null?void 0:i.callee),a}return o.value},Jh=n=>async(t,e,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>Hn(c,s,Fn())));throw Ev(a,i==null?void 0:i.callee),a}return o.value},Dl=n=>(t,e,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:e,issues:[]},i);if(s instanceof Promise)throw new mi;return s.issues.length?{success:!1,error:new(n??Tv)(s.issues.map(o=>Hn(o,i,Fn())))}:{success:!0,data:s.value}},z$=Dl(Iv),Ll=n=>async(t,e,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:e,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new n(s.issues.map(o=>Hn(o,i,Fn())))}:{success:!0,data:s.value}},O$=Ll(Iv),M$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Kh(n)(t,e,i)},N$=n=>(t,e,r)=>Kh(n)(t,e,r),U$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Jh(n)(t,e,i)},F$=n=>async(t,e,r)=>Jh(n)(t,e,r),H$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dl(n)(t,e,i)},W$=n=>(t,e,r)=>Dl(n)(t,e,r),Z$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ll(n)(t,e,i)},B$=n=>async(t,e,r)=>Ll(n)(t,e,r),V$=/^[cC][^\s-]{8,}$/,j$=/^[0-9a-z]+$/,G$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,q$=/^[0-9a-vA-V]{20}$/,Y$=/^[A-Za-z0-9]{27}$/,X$=/^[a-zA-Z0-9_-]{21}$/,K$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,J$=/^([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})$/,Tf=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[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)$/,Q$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tT(){return new RegExp(eT,"u")}const nT=/^(?:(?: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])$/,rT=/^(([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}|:))$/,iT=/^((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])$/,sT=/^(([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])$/,oT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cv=/^[A-Za-z0-9_-]*$/,aT=/^\+[1-9]\d{6,14}$/,Rv="(?:(?:\\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])))",lT=new RegExp(`^${Rv}$`);function Pv(n){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${t}`:n.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${n.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cT(n){return new RegExp(`^${Pv(n)}$`)}function uT(n){const t=Pv({precision:n.precision}),e=["Z"];n.local&&e.push(""),n.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${e.join("|")})`;return new RegExp(`^${Rv}T(?:${r})$`)}const hT=n=>{const t=n?`[\\s\\S]{${(n==null?void 0:n.minimum)??0},${(n==null?void 0:n.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},dT=/^-?\d+$/,Dv=/^-?\d+(?:\.\d+)?$/,pT=/^(?:true|false)$/i,fT=/^[^A-Z]*$/,gT=/^[^a-z]*$/,st=A("$ZodCheck",(n,t)=>{var e;n._zod??(n._zod={}),n._zod.def=t,(e=n._zod).onattach??(e.onattach=[])}),Lv={number:"number",bigint:"bigint",object:"date"},zv=A("$ZodCheckLessThan",(n,t)=>{st.init(n,t);const e=Lv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:e,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),Ov=A("$ZodCheckGreaterThan",(n,t)=>{st.init(n,t);const e=Lv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:e,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),mT=A("$ZodCheckMultipleOf",(n,t)=>{st.init(n,t),n._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),n._zod.check=e=>{if(typeof e.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof e.value=="bigint"?e.value%t.value===BigInt(0):w$(e.value,t.value)===0)||e.issues.push({origin:typeof e.value,code:"not_multiple_of",divisor:t.value,input:e.value,inst:n,continue:!t.abort})}}),vT=A("$ZodCheckNumberFormat",(n,t)=>{var o;st.init(n,t),t.format=t.format||"float64";const e=(o=t.format)==null?void 0:o.includes("int"),r=e?"int":"number",[i,s]=E$[t.format];n._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=i,c.maximum=s,e&&(c.pattern=dT)}),n._zod.check=a=>{const c=a.value;if(e){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:n});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort});return}}c<i&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:n,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:n,continue:!t.abort})}}),yT=A("$ZodCheckMaxLength",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),n._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=Xh(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),bT=A("$ZodCheckMinLength",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),n._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=Xh(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),wT=A("$ZodCheckLengthEquals",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),n._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const o=Xh(i),a=s>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:n,continue:!t.abort})}}),zl=A("$ZodCheckStringFormat",(n,t)=>{var e,r;st.init(n,t),n._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(e=n._zod).check??(e.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:n,continue:!t.abort})}):(r=n._zod).check??(r.check=()=>{})}),ST=A("$ZodCheckRegex",(n,t)=>{zl.init(n,t),n._zod.check=e=>{t.pattern.lastIndex=0,!t.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:"regex",input:e.value,pattern:t.pattern.toString(),inst:n,continue:!t.abort})}}),_T=A("$ZodCheckLowerCase",(n,t)=>{t.pattern??(t.pattern=fT),zl.init(n,t)}),kT=A("$ZodCheckUpperCase",(n,t)=>{t.pattern??(t.pattern=gT),zl.init(n,t)}),xT=A("$ZodCheckIncludes",(n,t)=>{st.init(n,t);const e=Ui(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${e}`:e);t.pattern=r,n._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),n._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:n,continue:!t.abort})}}),ET=A("$ZodCheckStartsWith",(n,t)=>{st.init(n,t);const e=new RegExp(`^${Ui(t.prefix)}.*`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:n,continue:!t.abort})}}),AT=A("$ZodCheckEndsWith",(n,t)=>{st.init(n,t);const e=new RegExp(`.*${Ui(t.suffix)}$`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:n,continue:!t.abort})}}),$T=A("$ZodCheckOverwrite",(n,t)=>{st.init(n,t),n._zod.check=e=>{e.value=t.tx(e.value)}});class TT{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
4
+ `+t.prev}function Qo(n,t){var e=uu(n),r=[];if(e){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=nn(n,i)?t(n[i],n):""}var s=typeof xc=="function"?xc(n):[],o;if(Mi){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in n)nn(n,c)&&(e&&String(Number(c))===c&&c<n.length||Mi&&o["$"+c]instanceof Symbol||(wm.call(/[^\w$]/,c)?r.push(t(c,n)+": "+t(n[c],n)):r.push(c+": "+t(n[c],n))));if(typeof xc=="function")for(var u=0;u<s.length;u++)Sm.call(n,s[u])&&r.push("["+t(s[u])+"]: "+t(n[s[u]],n));return r}var Wk=Gi,Zk=X,Tl=function(n,t,e){for(var r=n,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,e||(i.next=n.next,n.next=i),i},Bk=function(n,t){if(n){var e=Tl(n,t);return e&&e.value}},Vk=function(n,t,e){var r=Tl(n,t);r?r.value=e:n.next={key:t,next:n.next,value:e}},jk=function(n,t){return n?!!Tl(n,t):!1},Gk=function(n,t){if(n)return Tl(n,t,!0)},qk=function(){var t,e={assert:function(r){if(!e.has(r))throw new Zk("Side channel does not contain "+Wk(r))},delete:function(r){var i=t&&t.next,s=Gk(t,r);return s&&i&&i===s&&(t=void 0),!!s},get:function(r){return Bk(t,r)},has:function(r){return jk(t,r)},set:function(r,i){t||(t={next:void 0}),Vk(t,r,i)}};return e},Yk=bt,Lo=Bn(),Xk=Gi,Kk=X,Fp=Yk("%Map%",!0),Jk=Lo("Map.prototype.get",!0),Qk=Lo("Map.prototype.set",!0),ex=Lo("Map.prototype.has",!0),tx=Lo("Map.prototype.delete",!0),nx=Lo("Map.prototype.size",!0),$m=!!Fp&&function(){var t,e={assert:function(r){if(!e.has(r))throw new Kk("Side channel does not contain "+Xk(r))},delete:function(r){if(t){var i=tx(t,r);return nx(t)===0&&(t=void 0),i}return!1},get:function(r){if(t)return Jk(t,r)},has:function(r){return t?ex(t,r):!1},set:function(r,i){t||(t=new Fp),Qk(t,r,i)}};return e},rx=bt,Il=Bn(),ix=Gi,ea=$m,sx=X,Jr=rx("%WeakMap%",!0),ox=Il("WeakMap.prototype.get",!0),ax=Il("WeakMap.prototype.set",!0),lx=Il("WeakMap.prototype.has",!0),cx=Il("WeakMap.prototype.delete",!0),ux=Jr?function(){var t,e,r={assert:function(i){if(!r.has(i))throw new sx("Side channel does not contain "+ix(i))},delete:function(i){if(Jr&&i&&(typeof i=="object"||typeof i=="function")){if(t)return cx(t,i)}else if(ea&&e)return e.delete(i);return!1},get:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?ox(t,i):e&&e.get(i)},has:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?lx(t,i):!!e&&e.has(i)},set:function(i,s){Jr&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Jr),ax(t,i,s)):ea&&(e||(e=ea()),e.set(i,s))}};return r}:ea,hx=X,dx=Gi,px=qk,fx=$m,gx=ux,mx=gx||fx||px,vx=function(){var t,e={assert:function(r){if(!e.has(r))throw new hx("Side channel does not contain "+dx(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,i){t||(t=mx()),t.set(r,i)}};return e},yx=mn,ss=vx(),Jt=X,Ch={assert:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");if(ss.assert(n),!Ch.has(n,t))throw new Jt("`"+t+"` is not present on `O`")},get:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var e=ss.get(n);return e&&e["$"+t]},has:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var e=ss.get(n);return!!e&&yx(e,"$"+t)},set:function(n,t,e){if(!n||typeof n!="object"&&typeof n!="function")throw new Jt("`O` is not an object");if(typeof t!="string")throw new Jt("`slot` must be a string");var r=ss.get(n);r||(r={},ss.set(n,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(Ch);var Rh=Ch,Tm=fn,Nn=Rh,zo=function n(t,e){if(!(this instanceof n))return new n(t,e);if(t!=="normal"&&t!=="break"&&t!=="continue"&&t!=="return"&&t!=="throw")throw new Tm('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');Nn.set(this,"[[Type]]",t),Nn.set(this,"[[Value]]",e)};zo.prototype.type=function(){return Nn.get(this,"[[Type]]")};zo.prototype.value=function(){return Nn.get(this,"[[Value]]")};zo.prototype["?"]=function(){var t=Nn.get(this,"[[Type]]"),e=Nn.get(this,"[[Value]]");if(t==="throw")throw e;return e};zo.prototype["!"]=function(){var t=Nn.get(this,"[[Type]]");if(t!=="normal")throw new Tm('Assertion failed: Completion Record is not of type "normal"');return Nn.get(this,"[[Value]]")};var Ph=zo,bx=Ph,Dh=function(t){return new bx("normal",t)},Ac,Hp;function wx(){if(Hp)return Ac;Hp=1;var n=Zi;return Ac=function(){return n()&&!!Symbol.toStringTag},Ac}var Sx=bt,Wp=Sx("%Object.defineProperty%",!0),_x=wx()(),kx=mn,xx=X,ta=_x?Symbol.toStringTag:null,Im=function(t,e){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new xx("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ta&&(r||!kx(t,ta))&&(Wp?Wp(t,ta,{configurable:!i,enumerable:!1,value:e,writable:!1}):t[ta]=e)},Cm={exports:{}},Ex=bt,Zp=Yg,Ax=El(),Bp=Wi,Vp=X,$x=Ex("%Math.floor%"),Tx=function(t,e){if(typeof t!="function")throw new Vp("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||$x(e)!==e)throw new Vp("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&Bp){var o=Bp(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!r)&&(Ax?Zp(t,"length",e,!0,!0):Zp(t,"length",e)),t},Ix=Io,Cx=wh,Rx=om,Px=function(){return Rx(Ix,Cx,arguments)};(function(n){var t=Tx,e=To,r=Al,i=Px;n.exports=function(o){var a=r(arguments),c=1+o.length-(arguments.length-1);return t(a,c>0?c:0,!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i})(Cm);var Lh=Cm.exports,Dx=function(t,e){for(var r=0;r<t.length;r+=1)if(!e(t[r],r,t))return!1;return!0},Lx=Object,zx=function(t){return t&&typeof t=="object"&&(typeof t["[[ResourceValue]]"]>"u"||Lx(t["[[ResourceValue]]"])===t["[[ResourceValue]]"])&&(t["[[Hint]]"]==="SYNC-DISPOSE"||t["[[Hint]]"]==="ASYNC-DISPOSE")&&(typeof t["[[DisposeMethod]]"]=="function"||typeof t["[[DisposeMethod]]"]>"u")},Ox=mn,Mx=Sh(),Nx=Dx,Ux=zx,Fx=function(t){return t&&typeof t=="object"&&Ox(t,"[[DisposableResourceStack]]")&&Mx(t["[[DisposableResourceStack]]"])&&(t["[[DisposableResourceStack]]"].length===0||Nx(t["[[DisposableResourceStack]]"],Ux))},Hx=gn,Wx=function(t){if(t===null)return"Null";if(typeof t>"u")return"Undefined";if(Hx(t))return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},Zx=Wx,zh=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":Zx(t)},Bx=X,Vx=Gi,jx=Vi,Gx=function(t,e){if(!jx(e))throw new Bx("Assertion failed: P is not a Property Key, got "+Vx(e));return t[e]},jp=X,qx=Gx,Yx=ji,Xx=Vi,Gp=Gi,Kx=function(t,e){if(!Xx(e))throw new jp("Assertion failed: P is not a Property Key");var r=qx(t,e);if(r!=null){if(!Yx(r))throw new jp(Gp(e)+" is not a function: "+Gp(r));return r}},du={exports:{}},Jx=bt,Qx=Jx,qp=Qx("%Reflect.construct%",!0),Ga=Do;try{Ga({},"",{"[[Get]]":function(){}})}catch{Ga=null}if(Ga&&qp){var Yp={},Xp={};Ga(Xp,"length",{"[[Get]]":function(){throw Yp},"[[Enumerable]]":!0}),du.exports=function(t){try{qp(t,Xp)}catch(e){return e===Yp}}}else du.exports=function(t){return typeof t=="function"&&!!t.prototype};var eE=du.exports,$c=X,Kp=ji,tE=eE,nE=function(t){if(!tE(t))throw new $c("C must be a constructor");var e={"[[Resolve]]":void 0,"[[Reject]]":void 0},r=new t(function(i,s){if(typeof e["[[Resolve]]"]<"u"||typeof e["[[Reject]]"]<"u")throw new $c("executor has already been called");e["[[Resolve]]"]=i,e["[[Reject]]"]=s});if(!Kp(e["[[Resolve]]"])||!Kp(e["[[Reject]]"]))throw new $c("executor must provide valid resolve and reject functions");return{"[[Promise]]":r,"[[Resolve]]":e["[[Resolve]]"],"[[Reject]]":e["[[Reject]]"]}},Jp=fn,rE=X,Tc=$l,Qp=Kx,iE=nE,sE=zh,ef=Eh(),tf=Ah(),oE=function(t,e){if(sE(t)!=="Object")throw new rE("`V` must be an Object");if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new Jp("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(e==="ASYNC-DISPOSE"&&tf&&(r=Qp(t,tf)),!r){if(!ef)throw new Jp("`Symbol.dispose` is not supported");if(r=Qp(t,ef),typeof r<"u")return function(){var i=this;if(e==="ASYNC-DISPOSE"){var s=iE(Promise);try{Tc(r,i),Tc(s["[[Resolve]]"],void 0,[void 0])}catch(o){s["[[Reject]]"](o)}return s["[[Promise]]"]}Tc(r,i)}}return r},aE=fn,Ic=X,lE=ji,cE=zh,uE=oE,hE=function(t,e){if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new aE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(arguments.length<3)if(t==null)t=void 0,r=void 0;else{if(typeof t<"u"&&cE(t)!=="Object")throw new Ic("`V` must be an Object, or `null` or `undefined`");if(r=uE(t,e),typeof r>"u")throw new Ic("dispose method must not be `undefined` on `V` when an object `V` is provided")}else if(r=arguments[2],!lE(r))throw new Ic("`method`, when provided, must be a function");return{"[[ResourceValue]]":t,"[[Hint]]":e,"[[DisposeMethod]]":r}},dE=fn,na=X,pE=Fx,nf=hE,fE=Bn(),gE=fE("Array.prototype.push"),Rm=function(t,e,r){if(!pE(t))throw new na("Assertion failed: `disposeCapability` must be a DisposeCapability Record");if(r!=="SYNC-DISPOSE"&&r!=="ASYNC-DISPOSE")throw new dE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var i=arguments.length>3?arguments[3]:void 0;if(arguments.length>3&&typeof i!="function")throw new na("Assertion failed: `method`, when present, must be a function");if(!t["[[DisposableResourceStack]]"])throw new na("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");var s;if(arguments.length<4){if(e==null&&r==="SYNC_DISPOSE")return"UNUSED";s=nf(e,r)}else{if(typeof e<"u")throw new na("Assertion failed: `V` must be undefined when `method` is present");s=nf(void 0,r,i)}return gE(t["[[DisposableResourceStack]]"],s),"UNUSED"},Cc,rf;function Oh(){if(rf)return Cc;rf=1;var n=bt,t=Lh,e=fn,r=n("%Promise.resolve%",!0),i=r&&t(r);return Cc=function(o,a){if(!i)throw new e("This environment does not support Promises.");return i(o,a)},Cc}var Rc,sf;function mE(){if(sf)return Rc;sf=1;var n=bt,t=fn,e=n("%Promise%",!0),r=$l,i=Oh(),s=zh;return Rc=function(a,c,u){if(typeof a<"u"&&s(a)!=="Object")throw new t("Assertion failed: `V` must be `undefined` or an Object");if(c!=="SYNC-DISPOSE"&&c!=="ASYNC-DISPOSE")throw new t("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");if(typeof u<"u"&&typeof u!="function")throw new t("Assertion failed: `method` must be `undefined` or a function");var h=typeof u>"u"?u:r(u,a);if(c==="ASYNC-DISPOSE")return i(e,h)},Rc}var Pc,of;function vE(){if(of)return Pc;of=1;var n=Ph;return Pc=function(e){return new n("throw",e)},Pc}var yE=bt,Dc=fn,af=X,bE=yE("%Promise%",!0),wE=Bn(),lf=wE("Promise.prototype.then",!0),SE=Ph,cf=mE(),_E=Dh,kE=Oh(),uf=vE(),xE=bm(),Pm=function(t,e){if(!(e instanceof SE))throw new af("`completion` must be a Completion Record");var r=t["[[DisposableResourceStack]]"];if(!r)throw new af("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");for(var i,s=r.length-1;s>=0;s-=1)if(!i)i=r[s]["[[Hint]]"];else if(i!==r[s]["[[Hint]]"])throw new Dc("mixed hint stacks are not supported");for(var o=i==="ASYNC-DISPOSE"&&kE(bE,e),a=function(v){if(e.type()==="throw"){var g=e.value(),_=new xE(v,g);e=uf(_)}else e=uf(v)},c=i==="ASYNC-DISPOSE"&&function(g){return lf(o,function(){var _=cf(g["[[ResourceValue]]"],g["[[Hint]]"],g["[[DisposeMethod]]"]);if(!_)throw new Dc("Assertion failed: non-`~ASYNC-DISPOSE~` resource returned a promise from Dispose");return lf(_,_E)},a)},u=r.length-1;u>=0;u-=1)if(i==="ASYNC-DISPOSE")o=c(r[u]);else{var h=r[u];try{var p=cf(h["[[ResourceValue]]"],h["[[Hint]]"],h["[[DisposeMethod]]"]);if(p)throw new Dc("Assertion failed: `~SYNC-DISPOSE~` resource returned something from Dispose")}catch(v){a(v)}}return t["[[DisposableResourceStack]]"]=null,i==="ASYNC-DISPOSE"?o:e},Dm=function(){var t=[];return{"[[DisposableResourceStack]]":t}},Cl=mh,Mh=X,EE=$l,qi=kh,AE=Do,Lm=ji,$E=Dh,nt=Rh,TE=Im,zm=Fr.supportsDescriptors,IE=Lh,Nh=Rm,CE=Pm,Om=Dm,hf=Eh(),ft=function n(){if(!(this instanceof n)||nt.has(this,"[[DisposableState]]")||nt.has(this,"[[DisposeCapability]]"))throw new Mh("can only be used with new");nt.set(this,"[[DisposableState]]","PENDING"),nt.set(this,"[[DisposeCapability]]",Om())},Mm=function(){var t=this;return nt.assert(t,"[[DisposableState]]"),nt.get(t,"[[DisposableState]]")==="DISPOSED"},Oo=IE(Mm);zm?AE(ft.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Mm}):ft.prototype.disposed=!1;var Nm=function(t){nt.set(t,"[[DisposableState]]","DISPOSED"),zm||(t.disposed=!0)};qi(ft.prototype,"dispose",function(){var t=this;if(!Oo(t))return Nm(t),CE(nt.get(t,"[[DisposeCapability]]"),$E())["?"]()});qi(ft.prototype,"use",function(t){var e=this;if(Oo(e))throw new Cl("a disposed stack can not use anything new");return Nh(nt.get(e,"[[DisposeCapability]]"),t,"SYNC-DISPOSE"),t});qi(ft.prototype,"adopt",function(t,e){var r=this;if(Oo(r))throw new Cl("a disposed stack can not use anything new");if(!Lm(e))throw new Mh("`onDispose` must be a function");var i=function(){return EE(e,void 0,[t])};return Nh(nt.get(r,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",i),t});qi(ft.prototype,"defer",function(t){var e=this;if(Oo(e))throw new Cl("a disposed stack can not defer anything new");if(!Lm(t))throw new Mh("`onDispose` must be a function");Nh(nt.get(e,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",t)});qi(ft.prototype,"move",function(){var t=this;if(Oo(t))throw new Cl("a disposed stack can not use anything new");var e=new ft;return nt.set(e,"[[DisposeCapability]]",nt.get(t,"[[DisposeCapability]]")),nt.set(t,"[[DisposeCapability]]",Om()),Nm(t),e});hf&&qi(ft.prototype,hf,ft.prototype.dispose);TE(ft.prototype,"DisposableStack");var RE=ft,PE=RE,DE=function(){return typeof DisposableStack=="function"?DisposableStack:PE},LE=Fr,zE=fh(),OE=DE,ME=function(){var t=OE();return LE(zE,{DisposableStack:t},{DisposableStack:!0}),t},NE=bt,Rl=mh,Uh=X,df=NE("%Promise%",!0),Fh=Rm,UE=$l,Yi=kh,FE=Do,HE=Pm,Um=ji,Fm=Dm,WE=Dh,pf=Oh(),rt=Rh,ZE=Im,Hm=Fr.supportsDescriptors,BE=Lh,VE=Bn(),jE=VE("Promise.prototype.then",!0),ff=Ah(),gt=function n(){if(!(this instanceof n)||rt.has(this,"[[AsyncDisposableState]]")||rt.has(this,"[[DisposeCapability]]"))throw new Uh("can only be used with new");rt.set(this,"[[AsyncDisposableState]]","pending"),rt.set(this,"[[DisposeCapability]]",Fm())},Wm=function(){var t=this;return rt.assert(t,"[[AsyncDisposableState]]"),rt.get(t,"[[AsyncDisposableState]]")==="disposed"},Mo=BE(Wm);Hm?FE(gt.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Wm}):gt.prototype.disposed=!1;var Zm=function(t){rt.set(t,"[[AsyncDisposableState]]","disposed"),Hm||(t.disposed=!0)};Yi(gt.prototype,"disposeAsync",function(){var t=this;return Mo(t)?pf(df):(Zm(t),jE(pf(df,HE(rt.get(t,"[[DisposeCapability]]"),WE())),function(e){return e["?"]()}))});Yi(gt.prototype,"use",function(t){var e=this;if(Mo(e))throw new Rl("a disposed stack can not use anything new");return Fh(rt.get(e,"[[DisposeCapability]]"),t,"ASYNC-DISPOSE"),t});Yi(gt.prototype,"adopt",function(t,e){var r=this;if(Mo(r))throw new Rl("a disposed stack can not use anything new");if(!Um(e))throw new Uh("`onDisposeAsync` must be a function");var i=function(){return UE(e,void 0,[t])};return i.value=t,Fh(rt.get(r,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",i),t});Yi(gt.prototype,"defer",function(t){var e=this;if(Mo(e))throw new Rl("a disposed stack can not defer anything new");if(!Um(t))throw new Uh("`onDispose` must be a function");Fh(rt.get(e,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",t)});Yi(gt.prototype,"move",function(){var t=this;if(Mo(t))throw new Rl("a disposed stack can not use anything new");var e=new gt;return rt.set(e,"[[DisposeCapability]]",rt.get(t,"[[DisposeCapability]]")),rt.set(t,"[[DisposeCapability]]",Fm()),Zm(t),e});ff&&Yi(gt.prototype,ff,gt.prototype.disposeAsync);ZE(gt.prototype,"AsyncDisposableStack");var GE=gt,qE=GE,YE=function(){return typeof AsyncDisposableStack=="function"?AsyncDisposableStack:qE},XE=Fr,KE=fh(),JE=YE,QE=function(){var t=JE();return XE(KE,{AsyncDisposableStack:t},{AsyncDisposableStack:!0}),t},eA=X_,tA=ik,nA=ME,rA=QE,iA=function(){eA(),tA(),nA(),rA()};iA();const gf=new WeakMap;function sA(n){return(typeof n=="object"||typeof n=="function")&&n!==null&&"then"in n&&typeof n.then=="function"}function Qr(n){return typeof n=="string"?n:typeof n=="symbol"?n.description??n.toString():n.name||"(anonymous class)"}function mf(){return new Error("register(Key, factory) requires a factory function. Wrap existing instances as () => instance.")}function oA(){return new Error("register(Key, factory) does not accept async factories. Await setup before registering.")}class aA{constructor(){m(this,"entries",new Map);m(this,"constructionStack",[])}register(t,e){if(e===void 0){if(typeof t!="function")throw mf();this.validateClassRegistration(t),this.storeFactory(t,()=>this.instantiateClass(t));return}if(typeof e!="function")throw mf();if(e.constructor.name==="AsyncFunction")throw oA();this.storeFactory(t,e)}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.factory)!==void 0}resolve(t){return this.resolveAny(t)}storeFactory(t,e){const r=this.getOrCreateEntry(t);r.factory=e,r.instance=void 0,r.error=void 0}validateClassRegistration(t){const e=gf.get(t);if(e){if(t.length!==e.length)throw new Error(`${Qr(t)} cannot be registered with register(Class). @injectable(...) declared ${e.length} dependencies but constructor arity is ${t.length}. Use register(Key, () => value) instead.`);return}if(t.length!==0)throw new Error(`${Qr(t)} cannot be registered with register(Class). Undecorated classes must have zero required constructor parameters. Use register(Key, () => value) instead.`)}instantiateClass(t){const e=gf.get(t);if(!e)return new t;const r=e.map(i=>this.resolveAny(i));return new t(...r)}resolveAny(t){return this.getOrCreateEntry(t).proxy}getOrCreateEntry(t){let e=this.entries.get(t);return e||(e={key:t},e.proxy=this.createProxy(e),this.entries.set(t,e),e)}createProxy(t){return new Proxy({},{get:(e,r)=>{if(r==="then")return;const i=this.getInstance(t),s=Reflect.get(i,r,i);return typeof s=="function"?s.bind(i):s},set:(e,r,i)=>{const s=this.getInstance(t);return Reflect.set(s,r,i,s)},has:(e,r)=>{const i=this.getInstance(t);return r in i}})}getInstance(t){if(t.instance)return t.instance;if(t.error)throw t.error;if(!t.factory)throw new Error(`${Qr(t.key)} was resolved but never registered`);const e=this.constructionStack.indexOf(t.key);if(e!==-1){const r=[...this.constructionStack.slice(e),t.key].map(i=>Qr(i)).join(" -> ");throw new Error(`Circular dependency detected: ${r}`)}this.constructionStack.push(t.key);try{const r=t.factory();if(sA(r))throw new Error(`Factory for ${Qr(t.key)} returned a Promise. Await setup before registering.`);if(typeof r!="object"||r===null)throw new Error(`Factory for ${Qr(t.key)} returned a non-object value. Wrap primitives in an object.`);return t.instance=r,r}catch(r){throw t.error=r,r}finally{this.constructionStack.pop()}}}const Gt=new aA,lA=.5,vf=.1,yf=8,cA=4,Bm=3,Vm=3,uA=4,lr=255,jm=.2126,Gm=.7152,qm=.0722;async function Ym(n){const t=hA(n);if(!t)return"light";try{return await fA(n,t)>=lA?"light":"dark"}catch{return"light"}}function hA(n){if(typeof document.elementsFromPoint!="function")return null;const t=n.getBoundingClientRect(),e=t.left+t.width/2,r=t.top+t.height/2,i=document.elementsFromPoint(e,r);for(const s of i){if(!(s instanceof HTMLElement)||s===n||n.contains(s))continue;const o=window.getComputedStyle(s);if(dA(o))return s}return null}function dA(n){return n.backgroundImage&&n.backgroundImage!=="none"?!0:pA(n.backgroundColor)>0}function pA(n){if(!n)return 0;const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 0;const e=t[1].split(/[\s,/]+/).filter(Boolean);return e.length===uA?parseFloat(e[Bm]):e.length===Vm?1:0}async function fA(n,t){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:ra((e.left-r.left)/r.width),y:ra((e.top-r.top)/r.height),width:ra(e.width/r.width),height:ra(e.height/r.height)},s=window.getComputedStyle(t),o=gA(s.backgroundImage);return o?vA({url:o,surfaceWidth:r.width,surfaceHeight:r.height,region:i}):yA(s.backgroundColor)}function gA(n){const t=n.match(/url\(\s*["']?([^"')]+)["']?\s*\)/);return t?t[1]:null}const bf=new Map;function mA(n){let t=bf.get(n);return t||(t=new Promise((e,r)=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>r(new Error(`Failed to load ${n}`)),i.src=n}),bf.set(n,t),t)}async function vA(n){const t=await mA(n.url),e=Math.max(yf,Math.ceil(n.surfaceWidth*vf)),r=Math.max(yf,Math.ceil(n.surfaceHeight*vf)),i=document.createElement("canvas");i.width=e,i.height=r;const s=i.getContext("2d",{willReadFrequently:!0});if(!s)return 1;const o=n.surfaceWidth/n.surfaceHeight,a=t.naturalWidth/t.naturalHeight;let c,u;a>o?(u=r,c=r*a):(c=e,u=e/a);const h=(e-c)/2,p=(r-u)/2;s.drawImage(t,h,p,c,u);const v=Math.max(0,Math.floor(n.region.x*e)),g=Math.max(0,Math.floor(n.region.y*r)),_=Math.max(1,Math.min(e-v,Math.floor(n.region.width*e))),k=Math.max(1,Math.min(r-g,Math.floor(n.region.height*r))),T=s.getImageData(v,g,_,k).data;let P=0,R=0;for(let W=0;W<T.length;W+=cA){const N=T[W]/lr,F=T[W+1]/lr,Y=T[W+2]/lr,j=T[W+Bm]/lr;P+=j*(jm*N+Gm*F+qm*Y),R+=1}return R>0?P/R:1}function yA(n){const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 1;const e=t[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);if(e.length<Vm)return 1;const r=e[0]/lr,i=e[1]/lr,s=e[2]/lr;return jm*r+Gm*i+qm*s}function ra(n){return n<0?0:n>1?1:n}const bA=["ghost","glass"],Rs=[...bA.flatMap(n=>[`button[variant="${n}"]`,`segmented-control[variant="${n}"]`]),'[material="glass"]'].join(", "),ia=new WeakSet,wf=new WeakSet;function Xm(n){if(wf.has(n))return;wf.add(n);for(const e of n.querySelectorAll(Rs))Lc(e);if(typeof MutationObserver!="function")return;new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const i of r.addedNodes)wA(i,Lc);else r.type==="attributes"&&r.target instanceof HTMLElement&&r.target.matches(Rs)&&Lc(r.target)}).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["variant","material"]})}function wA(n,t){if(n instanceof Element){n instanceof HTMLElement&&n.matches(Rs)&&t(n);for(const e of n.querySelectorAll(Rs))t(e)}}async function Lc(n){if(ia.has(n)||n.hasAttribute("tone"))return;ia.add(n);const t=await Ym(n);if(!n.matches(Rs)){ia.delete(n);return}if(n.hasAttribute("tone")){ia.delete(n);return}n.setAttribute("tone",t)}const SA="*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;height:100%}h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote,pre,hr{margin:0}button,input,textarea,select{font:inherit;color:inherit}@font-face{font-family:Hind;src:url("+new URL("Hind-Variable-C47b_dt9.woff2",import.meta.url).href+') format("woff2-variations");font-weight:300 700;font-style:normal;font-display:swap}:root{--font-sans: "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--font-brand: var(--font-sans);--font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;--font-weight-body: 500;--text-base: 13.5px;--text-scale: 1.125;--text-sm: round(calc(var(--text-base) / var(--text-scale)), 1px);--text-lg: round(calc(var(--text-base) * var(--text-scale)), 1px);--text-xl: round(calc(var(--text-lg) * var(--text-scale)), 1px);--leading-base: 1.5;--control-height-xs: 18px;--control-height-sm: 24px;--control-height-md: 28px;--control-height-lg: 32px;--space-2: 2px;--space-4: 4px;--space-6: 6px;--space-8: 8px;--space-12: 12px;--space-16: 16px;--space-20: 20px;--space-24: 24px;--space-32: 32px;--space-48: 48px;--space-64: 64px;--radius-4: 4px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-24: 24px;--radius-full: 9999px;--layer-chrome: 100;--layer-panel: 500;--layer-overlay: 2000;--shadow-hairline: 0 0 0 .5px var(--color-border);--shadow-control: 0 1px 1px rgb(0 0 0 / .04), 0 2px 6px rgb(0 0 0 / .06);--alpha-50: 4%;--alpha-100: 8%;--alpha-150: 11%;--alpha-200: 15%;--alpha-300: 22%;--alpha-400: 30%;--alpha-500: 40%;--alpha-600: 50%;--alpha-700: 65%;--alpha-800: 80%;--alpha-900: 90%;--alpha-950: 95%;--tint-50: color-mix(in srgb, currentColor var(--alpha-50), transparent);--tint-100: color-mix(in srgb, currentColor var(--alpha-100), transparent);--tint-150: color-mix(in srgb, currentColor var(--alpha-150), transparent);--tint-200: color-mix(in srgb, currentColor var(--alpha-200), transparent);--tint-300: color-mix(in srgb, currentColor var(--alpha-300), transparent);--tint-400: color-mix(in srgb, currentColor var(--alpha-400), transparent);--tint-500: color-mix(in srgb, currentColor var(--alpha-500), transparent);--tint-600: color-mix(in srgb, currentColor var(--alpha-600), transparent);--tint-700: color-mix(in srgb, currentColor var(--alpha-700), transparent);--tint-800: color-mix(in srgb, currentColor var(--alpha-800), transparent);--tint-900: color-mix(in srgb, currentColor var(--alpha-900), transparent);--tint-950: color-mix(in srgb, currentColor var(--alpha-950), transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-300), transparent);--backdrop-blur-glass: blur(20px) saturate(1.4);--black: #000000;--white: #ffffff;--neutral-50: oklch(.985 0 0);--neutral-100: oklch(.97 0 0);--neutral-200: oklch(.923 0 0);--neutral-300: oklch(.869 0 0);--neutral-350: oklch(.79 0 0);--neutral-400: oklch(.709 0 0);--neutral-500: oklch(.553 0 0);--neutral-600: oklch(.444 0 0);--neutral-700: oklch(.374 0 0);--neutral-800: oklch(.268 0 0);--neutral-900: oklch(.216 0 0);--neutral-950: oklch(.147 0 0);--red-50: oklch(.969 .015 12.422);--red-100: oklch(.941 .03 12.58);--red-200: oklch(.892 .058 10.001);--red-300: oklch(.81 .117 11.638);--red-400: oklch(.712 .194 13.428);--red-500: oklch(.645 .246 16.439);--red-600: oklch(.586 .253 17.585);--red-700: oklch(.514 .222 16.935);--red-800: oklch(.455 .188 13.697);--red-900: oklch(.41 .159 10.272);--red-950: oklch(.271 .105 12.094);--orange-50: oklch(.98 .016 73.684);--orange-100: oklch(.954 .038 75.164);--orange-200: oklch(.901 .076 70.697);--orange-300: oklch(.837 .128 66.29);--orange-400: oklch(.75 .183 55.934);--orange-500: oklch(.705 .213 47.604);--orange-600: oklch(.646 .222 41.116);--orange-700: oklch(.553 .195 38.402);--orange-800: oklch(.47 .157 37.304);--orange-900: oklch(.408 .123 38.172);--orange-950: oklch(.266 .079 36.259);--yellow-50: oklch(.987 .026 102.212);--yellow-100: oklch(.973 .071 103.193);--yellow-200: oklch(.945 .129 101.54);--yellow-300: oklch(.905 .182 98.111);--yellow-400: oklch(.852 .199 91.936);--yellow-500: oklch(.795 .184 86.047);--yellow-600: oklch(.681 .162 75.834);--yellow-700: oklch(.554 .135 66.442);--yellow-800: oklch(.476 .114 61.907);--yellow-900: oklch(.421 .095 57.708);--yellow-950: oklch(.286 .066 53.813);--green-50: oklch(.979 .021 166.113);--green-100: oklch(.95 .052 163.051);--green-200: oklch(.905 .093 164.15);--green-300: oklch(.845 .143 164.978);--green-400: oklch(.765 .177 163.223);--green-500: oklch(.696 .17 162.48);--green-600: oklch(.596 .145 163.225);--green-700: oklch(.508 .118 165.612);--green-800: oklch(.432 .095 166.913);--green-900: oklch(.378 .077 168.94);--green-950: oklch(.262 .051 172.552);--blue-50: oklch(.97 .014 254.604);--blue-100: oklch(.932 .032 255.585);--blue-200: oklch(.882 .059 254.128);--blue-300: oklch(.809 .105 251.813);--blue-400: oklch(.707 .165 254.624);--blue-500: oklch(.623 .214 259.815);--blue-600: oklch(.546 .245 262.881);--blue-700: oklch(.488 .243 264.376);--blue-800: oklch(.424 .199 265.638);--blue-900: oklch(.379 .146 265.522);--blue-950: oklch(.282 .091 267.935);--purple-50: oklch(.969 .016 293.756);--purple-100: oklch(.943 .029 294.588);--purple-200: oklch(.894 .057 293.283);--purple-300: oklch(.811 .111 293.571);--purple-400: oklch(.702 .183 293.541);--purple-500: oklch(.606 .25 292.717);--purple-600: oklch(.541 .281 293.009);--purple-700: oklch(.491 .27 292.581);--purple-800: oklch(.432 .232 292.759);--purple-900: oklch(.38 .189 293.745);--purple-950: oklch(.283 .141 291.089)}@supports (corner-shape: squircle){:root{--radius-8: 10px;--radius-12: 15px;--radius-16: 20px;--radius-24: 30px}}:root[data-font=system]{--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif}:root{--color-bg: var(--neutral-50);--color-bg-muted: var(--neutral-100);--color-surface: var(--white);--color-surface-muted: var(--neutral-100);--color-interactive: var(--neutral-200);--color-interactive-hover: var(--neutral-300);--color-border: rgba(0, 0, 0, .1);--color-border-muted: rgba(0, 0, 0, .06);--color-text: var(--neutral-900);--color-text-muted: var(--neutral-500);--color-link: inherit;--color-focus-ring: var(--neutral-500);--color-overlay-backdrop: rgb(0 0 0 / .5);--color-highlight: rgb(255 255 255 / .5);--color-primary: var(--blue-500);--color-danger: var(--red-600);color-scheme:light}body{font-family:var(--font-sans);font-size:var(--text-base);font-weight:var(--font-weight-body);line-height:var(--leading-base);letter-spacing:.015em;color:var(--color-text);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:var(--color-link);text-underline-offset:.15em;text-decoration-thickness:.08em}h1,h2,h3,h4,h5,h6{font-weight:600;color:inherit}code{font-family:var(--font-mono);font-size:.9em;background:var(--color-bg-muted);padding:var(--space-2) var(--space-4);border-radius:var(--radius-4)}pre{font-family:var(--font-mono);background:var(--color-bg-muted);padding:var(--space-12);border-radius:var(--radius-8);overflow-x:auto}pre code{background:none;padding:0}blockquote{padding-left:var(--space-16);border-left:3px solid var(--color-border);color:var(--color-text-muted)}hr{border:none;border-top:1px solid var(--color-border)}table{border-collapse:collapse}th,td{padding:var(--space-8) var(--space-12);border:1px solid var(--color-border);text-align:left}th{background:var(--color-bg-muted);font-weight:600}input,textarea{border:.5px solid var(--tint-300);border-radius:var(--radius-12);background:var(--tint-100);color:inherit;font:inherit;box-sizing:border-box;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}input{height:var(--control-height-lg);padding:0 12px}textarea{padding:6px 10px;resize:none}input::placeholder,textarea::placeholder{color:var(--tint-500)}input:focus,textarea:focus{background:color-mix(in srgb,var(--white) var(--alpha-300),transparent);border-color:var(--color-primary);outline:none;box-shadow:0 0 0 1.5px var(--color-primary)}label.field{display:grid;gap:4px;font-size:13px}label.field>span{font-size:11.5px;font-weight:450;color:var(--tint-800)}@supports (corner-shape: squircle){*{corner-shape:squircle}}button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);box-sizing:border-box;height:var(--control-height-md);padding:0 14px 2px;font:inherit;cursor:default}button,segmented-control{background:var(--color-surface);border:.5px solid var(--tint-200);border-radius:var(--radius-12);box-shadow:var(--shadow-control);color:inherit}button:not([material]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}button:not([material]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}button[variant=primary]{background:var(--color-primary);border-color:#0000002e;color:var(--white)}button[variant=primary]:hover:not(:disabled){background:color-mix(in srgb,var(--color-primary) 92%,black)}button[variant=primary]:active:not(:disabled){background:color-mix(in srgb,var(--color-primary) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=danger]{background:var(--color-danger);border-color:#0000002e;color:var(--white)}button[variant=danger]:hover:not(:disabled){background:color-mix(in srgb,var(--color-danger) 92%,black)}button[variant=danger]:active:not(:disabled){background:color-mix(in srgb,var(--color-danger) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=ghost]{background:transparent;border-color:transparent;color:inherit;box-shadow:none}button[variant=ghost]:hover:not(:disabled){background:var(--color-overlay-hover);backdrop-filter:saturate(1.2);-webkit-backdrop-filter:saturate(1.2)}button[variant=ghost]:active:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.4);-webkit-backdrop-filter:saturate(1.4);box-shadow:none}button[variant=ghost][data-active]:not(:disabled),button[variant=ghost][data-active]:hover:not(:disabled),button[variant=ghost][aria-pressed=true]:not(:disabled),button[variant=ghost][aria-pressed=true]:hover:not(:disabled),button[variant=ghost][aria-expanded=true]:not(:disabled),button[variant=ghost][aria-expanded=true]:hover:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.3);-webkit-backdrop-filter:saturate(1.3);box-shadow:none}button[variant=glass],segmented-control[variant=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);box-shadow:none}button[variant=glass]{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}button[variant=glass]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover));backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}button[variant=glass]:active:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}button[variant=glass][aria-pressed=true]:not(:disabled),button[variant=glass][aria-pressed=true]:hover:not(:disabled),button[variant=glass][aria-expanded=true]:not(:disabled),button[variant=glass][aria-expanded=true]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}[tone=dark] button[variant=glass],[tone=dark] segmented-control[variant=glass]{border-color:var(--tint-400)}button[material],segmented-control[material]{color:inherit;box-shadow:none}button[material]:hover:not(:disabled){background-image:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover))}button[material]:active:not(:disabled){background-image:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}[tone=dark] button[material],[tone=dark] segmented-control[material]{border-color:var(--tint-400)}button:disabled{background:var(--tint-300);border-color:transparent;color:var(--tint-700);box-shadow:none}:where([tone=dark]) button:not([variant]):not([material]):not(:disabled),:where([tone=dark]) button[variant=default]:not([material]):not(:disabled),:where([tone=dark]) segmented-control:not([variant]):not([material]),:where([tone=dark]) segmented-control[variant=default]:not([material]){background:var(--tint-200);border-color:var(--tint-300);box-shadow:inset 0 .5px 0 var(--tint-300)}:where([tone=dark]) button:not([variant]):hover:not(:disabled),:where([tone=dark]) button[variant=default]:hover:not(:disabled){background:var(--tint-300)}:where([tone=dark]) button:not([variant]):active:not(:disabled),:where([tone=dark]) button[variant=default]:active:not(:disabled){background:var(--tint-400);box-shadow:inset 0 1px 2px #0003}:where([tone=light]) button:not([variant]):not([material]):not(:disabled),:where([tone=light]) button[variant=default]:not([material]):not(:disabled),:where([tone=light]) segmented-control:not([variant]):not([material]),:where([tone=light]) segmented-control[variant=default]:not([material]){background:var(--color-surface);border-color:var(--tint-200);box-shadow:var(--shadow-control)}:where([tone=light]) button:not([variant]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}:where([tone=light]) button:not([variant]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button[size=sm],segmented-control[size=sm]{height:var(--control-height-sm)}button[size=sm][icon-only]{width:var(--control-height-sm)}button[size=xs]{height:var(--control-height-xs);padding:0 var(--space-6) 1px;border-radius:var(--radius-8)}button[size=xs][icon-only]{width:var(--control-height-xs);padding:0}button[icon-only]{width:var(--control-height-md);padding:0}[data-ui-icon]{display:inline-block;vertical-align:middle}[selectable],[selectable] *{user-select:text;-webkit-user-select:text}[unselectable],[unselectable] *{user-select:none;-webkit-user-select:none}.prose{line-height:var(--leading-base)}.prose h1{font-size:var(--text-xl);margin-bottom:var(--space-8)}.prose h2{font-size:var(--text-lg);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose h3,.prose h4,.prose h5,.prose h6{font-size:var(--text-base);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose p{margin:var(--space-12) 0}.prose ul,.prose ol{padding-left:var(--space-24);margin:var(--space-12) 0}.prose blockquote,.prose pre{margin:var(--space-12) 0}.prose hr{margin:var(--space-24) 0}.prose table{width:100%;margin:var(--space-12) 0}.prose img{max-width:100%;height:auto}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}[material=paper]{background:var(--white);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text)}[material=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}[material=glass-frosted]{background:color-mix(in srgb,var(--white) var(--alpha-800),transparent);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text);backdrop-filter:var(--backdrop-blur-glass);-webkit-backdrop-filter:var(--backdrop-blur-glass)}[tone=dark]{color:color-mix(in srgb,var(--white) var(--alpha-950),transparent);border-color:color-mix(in srgb,var(--white) var(--alpha-200),transparent);--color-overlay-hover: color-mix(in srgb, var(--white) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--white) var(--alpha-200), transparent)}[tone=dark][material=paper]{background:#000}[tone=dark][material=glass-frosted]{background:color-mix(in srgb,var(--black) 70%,transparent)}[tone=light]{color:var(--color-text);border-color:color-mix(in srgb,var(--black) var(--alpha-100),transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-50), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-100), transparent)}[level="1"]{box-shadow:0 12px 32px #00000024}[level="2"]{box-shadow:0 4px 6px -2px #0000001f,0 40px 60px -16px #00000038}dropdown-menu{position:relative;display:inline-block;color:inherit}dropdown-group{display:grid;gap:var(--space-4)}dropdown-label{display:block;padding:var(--space-4) var(--space-8);color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}dropdown-divider{display:block;height:1px;margin:2px 0;background:var(--color-border)}[data-dropdown-trigger][aria-expanded=true],[data-dropdown-trigger][aria-expanded=true]:hover,dropdown-menu[open]::part(trigger),dropdown-menu[open]::part(trigger):hover{background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}[data-dropdown-trigger-label],dropdown-menu::part(trigger-label){min-width:0}[data-dropdown-trigger-icon],dropdown-menu::part(trigger-icon){display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--color-text-muted);transform:translateY(1px)}dropdown-item:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}ui-popover.dropdown-popover::part(panel){min-width:192px;padding:var(--space-4)}.dropdown-list{display:flex;flex-direction:column;gap:2px}dropdown-item{display:flex;align-items:center;gap:var(--space-8);margin:0;padding:6px 12px;border-radius:var(--radius-8);font:inherit;line-height:1.2;color:inherit;font-weight:var(--font-weight-body);-webkit-user-select:none;user-select:none}dropdown-item>[data-ui-icon]{flex:none}dropdown-item[selected]{background:var(--color-overlay-active)}dropdown-item:hover,dropdown-item[action]:hover{background:var(--color-primary);color:var(--white)}dropdown-item[action]{color:inherit}dropdown-item[danger]{color:var(--color-danger)}dropdown-item[danger]:hover{background:var(--color-danger);color:var(--white)}editable-text{display:inline-block;max-width:100%;vertical-align:top}editable-text>.editable-text-span{display:inline-block;max-width:100%;outline:none;overflow:hidden;white-space:nowrap;cursor:inherit;vertical-align:top}editable-text:not([data-editing])>.editable-text-span{text-overflow:ellipsis}editable-text[data-editing]>.editable-text-span{cursor:text}modal-overlay{color:inherit}modal-overlay::part(backdrop){position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--layer-overlay);display:flex;align-items:center;justify-content:center;padding:var(--space-16);background:linear-gradient(to bottom,color-mix(in srgb,var(--black) var(--alpha-50),transparent),color-mix(in srgb,var(--black) var(--alpha-400),transparent));backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}panel-view{display:block}panel-view::part(panel){display:flex;flex-direction:column;gap:var(--space-16);color:var(--color-text)}panel-view::part(header){display:flex;align-items:center;justify-content:space-between;gap:var(--space-12)}panel-view::part(title){margin:0;font:inherit;font-size:var(--text-lg);font-weight:600;color:var(--color-text)}panel-view::part(button){display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;border:1px solid var(--color-border);border-radius:var(--radius-4);background:var(--color-surface);color:var(--color-text);box-shadow:none}panel-view::part(button):hover{background:var(--color-interactive-hover)}panel-view::part(button):focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}panel-view::part(icon){display:inline-flex;align-items:center;justify-content:center;flex:none}ui-popover{display:contents}ui-popover::part(panel){position:fixed;inset:0 auto auto 0;margin:0;min-width:192px;max-width:384px;padding:var(--space-16) var(--space-20);border-radius:var(--radius-12);outline:none;z-index:2000}segmented-control{display:inline-flex;align-items:stretch;box-sizing:border-box;height:var(--control-height-md)}segmented-control>button{height:auto}segmented-control[variant=ghost]{background:transparent;box-shadow:none}[tone=dark] segmented-control[variant=ghost]{border-color:var(--tint-400)}segmented-control>button{position:relative}segmented-control>button[icon-only]{width:auto;height:auto;padding:0 var(--space-6)}segmented-control>button:not([variant]):not(:disabled),[tone] segmented-control>button:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>button:not(:first-child):not(:last-child){border-radius:0}segmented-control>button:not([variant]):hover:not(:disabled),[tone] segmented-control>button:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>button:not([variant]):active:not(:disabled),[tone] segmented-control>button:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control>button:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>button:not(:last-child):after{background:var(--tint-400)}segmented-control>dropdown-menu{display:inline-flex;align-items:stretch;height:auto}segmented-control>dropdown-menu>[slot=trigger]{height:auto;position:relative}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>dropdown-menu:first-child>[slot=trigger]{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>dropdown-menu:last-child>[slot=trigger]{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>dropdown-menu:not(:first-child):not(:last-child)>[slot=trigger]{border-radius:0}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control[variant=glass]>button,segmented-control[variant=glass]>dropdown-menu{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}segmented-control[variant=glass]>button:not(:disabled):hover,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):hover){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled):active,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):active){backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}segmented-control[variant=glass]>button:not(:disabled)[aria-pressed=true],segmented-control[variant=glass]>button:not(:disabled)[aria-current]:not([aria-current=false]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-pressed=true]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-current]:not([aria-current=false])){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled)[aria-expanded=true],segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-expanded=true]){backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}segmented-control>dropdown-menu:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>dropdown-menu:not(:last-child):after{background:var(--tint-400)}ui-spinner{display:inline-flex;align-items:center;justify-content:center;line-height:0;color:inherit}ui-spinner .spin,.spin{display:inline-flex;animation:ui-spinner-spin 1s steps(8,end) infinite}@keyframes ui-spinner-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spin{animation:none}}system-modal{display:flex;flex-direction:column;width:min(400px,100%);box-sizing:border-box;padding:var(--space-32) var(--space-24);border-radius:var(--radius-12)}system-modal header{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);text-align:center}system-modal header>hgroup{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);max-width:100%}system-modal header h2{margin:0;font-size:var(--text-lg);font-weight:600;letter-spacing:.01em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}system-modal header p{margin:0;font-size:var(--text-base);opacity:.7;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ui-pill{display:inline-block;vertical-align:baseline;margin:2px 0;padding:0 var(--space-8);font-size:var(--text-sm);font-weight:500;line-height:1.7;border-radius:var(--radius-full);border:1px solid var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900);white-space:nowrap}ui-pill[color=gray]{border-color:var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900)}ui-pill[color=red]{border-color:var(--red-200);background:var(--red-100);color:var(--red-950)}ui-pill[color=orange]{border-color:var(--orange-200);background:var(--orange-100);color:var(--orange-950)}ui-pill[color=yellow]{border-color:var(--yellow-200);background:var(--yellow-100);color:var(--yellow-950)}ui-pill[color=green]{border-color:var(--green-200);background:var(--green-100);color:var(--green-950)}ui-pill[color=blue]{border-color:var(--blue-200);background:var(--blue-100);color:var(--blue-950)}ui-pill[color=purple]{border-color:var(--purple-200);background:var(--purple-100);color:var(--purple-950)}',Hh=new CSSStyleSheet;Hh.replaceSync(SA);const Wh=new CSSStyleSheet;try{document.adoptedStyleSheets=[...document.adoptedStyleSheets,Hh,Wh]}catch{}Xm(document);function Km(n){Wh.replaceSync(n)}function qa(){Km("")}function Zh(n){try{n.adoptedStyleSheets=[...n.adoptedStyleSheets,Hh,Wh]}catch{}Xm(n)}const _A=new Set(["target","currentTarget","eventPhase","defaultPrevented","isTrusted","timeStamp","srcElement","returnValue","cancelBubble","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","composedPath","stopPropagation","stopImmediatePropagation","preventDefault","initEvent"]);function kA(n){for(const t of Object.keys(n))if(_A.has(t))throw new Error(`Event payload key "${t}" is reserved; choose a different property name`)}function xA(n,t){kA(t);for(const e of Object.keys(t))Object.defineProperty(n,e,{value:t[e],writable:!0,enumerable:!0,configurable:!0})}function it(){class n extends Event{constructor(e,r){const{type:i,bubbles:s,cancelable:o,composed:a,...c}=r??{};if(i!==void 0)throw new Error('Do not pass "type" in init; use the constructor argument instead');super(e,{bubbles:s,cancelable:o,composed:a}),xA(this,c)}}return n}class qt extends globalThis.EventTarget{}function EA(n,t,e){const r=n.dispose.bind(n);n.dispose=()=>{if(!t())return e(),r()}}function No(n){var e;class t extends n{constructor(...s){super(...s);w(this,e,!1);EA(this,()=>l(this,e),()=>{S(this,e,!0)})}[Symbol.dispose](){this.dispose()}get disposed(){return l(this,e)}}return e=new WeakMap,t}const AA=it(),$A=it(),TA=it(),xa=it(),Jm="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ya=32,IA=16,Qm=10,Sf=0xffffffffffff;var cr;(function(n){n.Base32IncorrectEncoding="B32_ENC_INVALID",n.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",n.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",n.EncodeTimeNegative="ENC_TIME_NEG",n.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",n.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",n.PRNGDetectFailure="PRNG_DETECT",n.ULIDInvalid="ULID_INVALID",n.Unexpected="UNEXPECTED",n.UUIDInvalid="UUID_INVALID"})(cr||(cr={}));class gs extends Error{constructor(t,e){super(`${e} (${t})`),this.name="ULIDError",this.code=t}}function CA(n){const t=Math.floor(n()*Ya)%Ya;return Jm.charAt(t)}function RA(n){const t=PA(),e=t&&(t.crypto||t.msCrypto)||null;if(typeof(e==null?void 0:e.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]/256};if(typeof(e==null?void 0:e.randomBytes)=="function")return()=>e.randomBytes(1).readUInt8()/256;throw new gs(cr.PRNGDetectFailure,"Failed to find a reliable PRNG")}function PA(){return zA()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function DA(n,t){let e="";for(;n>0;n--)e=CA(t)+e;return e}function LA(n,t=Qm){if(isNaN(n))throw new gs(cr.EncodeTimeValueMalformed,`Time must be a number: ${n}`);if(n>Sf)throw new gs(cr.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Sf}: ${n}`);if(n<0)throw new gs(cr.EncodeTimeNegative,`Time must be positive: ${n}`);if(Number.isInteger(n)===!1)throw new gs(cr.EncodeTimeValueMalformed,`Time must be an integer: ${n}`);let e,r="";for(let i=t;i>0;i--)e=n%Ya,r=Jm.charAt(e)+r,n=(n-e)/Ya;return r}function zA(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Pl(n,t){const e=RA(),r=Date.now();return LA(r,Qm)+DA(IA,e)}const mt=4,ct=6,Ps=2,pu=2,Bh=8,OA=ct,Vh="auto",Un="auto",Sn=120,_f=50,ce=16,Dr=Sn*mt+ce*(mt-1),Xa=Sn*ct+ce*(ct-1),MA=Dr+ce*2,NA=200,UA=4,sa=150,FA=10,kf=2,xf=8,HA=300,WA=4;function ev(n){return rv(n)}function tv(n,t){return rv(n.flatMap(e=>sv(e,t)))}function nv(n){const t=[],e=new Set;for(const r of n){if(r.type==="row"){t.push(`Top-level rows are invalid: ${r.id}`);continue}ov(r,"strip",t,e)}return{valid:t.length===0,errors:t}}function ur(n){const t=ev(n),e=nv(t);if(!e.valid)throw new Error(`Invalid layout: ${e.errors.join("; ")}`);return{totalNodes:t.length,nodes:t.filter(r=>r.type!=="row").map(jA)}}function rv(n){const t=[];for(const e of n){const r=iv(e);for(const i of r){if(i.type==="row"){t.push(...i.children.map(dn));continue}t.push(i)}}return t}function iv(n){switch(n.type){case"card":return[dn(n)];case"row":{const t=n.children.map(dn);return t.length===0?[]:t.length===1?[t[0]]:[{...n,children:t}]}case"stack":{const t=[];for(const e of n.children){const r=iv(e);for(const i of r){if(i.type==="stack"){t.push(...i.children.map(fu));continue}if(i.type==="row"){t.push({...i,children:i.children.map(dn)});continue}t.push(dn(i))}}return t.length===0?[]:t.length===1?[fu(t[0])]:[{...n,children:t}]}}}function sv(n,t){switch(n.type){case"card":return n.artifactID===t?[]:[dn(n)];case"row":{const e=n.children.filter(r=>r.artifactID!==t).map(dn);return e.length===0?[]:e.length===1?[e[0]]:[{...n,children:e}]}case"stack":{const e=n.children.flatMap(r=>sv(r,t).filter(s=>s.type!=="stack"));return e.length===0?[]:e.length===1?[fu(e[0])]:[{...n,children:e}]}}}function ov(n,t,e,r){switch(n.type){case"card":av(n,t,e,r);return;case"row":ZA(n,t,e,r);return;case"stack":BA(n,t,e,r);return}}function av(n,t,e,r){jh(n.id,e),typeof n.artifactID!="string"||n.artifactID.length===0?e.push(`Card ${n.id} is missing artifactID`):r.has(n.artifactID)?e.push(`Duplicate artifactID in layout: ${n.artifactID}`):r.add(n.artifactID),VA(n.width)||e.push(`Card ${n.id} width must be an integer in the range ${Ps}-${Bh}`),lv(n.height)||e.push(`Card ${n.id} height must be an integer in the range 2-6 or "auto"`);const i=sr(n.width);t==="row"&&i<Ps&&e.push(`Row child ${n.id} must be at least 2 columns wide`)}function ZA(n,t,e,r){if(jh(n.id,e),t!=="stack"&&e.push(`Row ${n.id} may only appear inside a stack`),lv(n.height,WA)||e.push(`Row ${n.id} height must be an integer in the range 2-4 or "auto"`),!Array.isArray(n.children)||n.children.length===0){e.push(`Row ${n.id} must contain card nodes`);return}let i=0;for(const s of n.children){if(s.type!=="card"){e.push(`Row ${n.id} must contain only card nodes`);continue}av(s,"row",e,r),i+=sr(s.width)}i!==mt&&e.push(`Row ${n.id} children must sum to 4 columns`)}function BA(n,t,e,r){if(jh(n.id,e),t!=="strip"&&e.push(`Invalid nested stack at ${n.id}; stack children cannot contain another nested stack`),!Array.isArray(n.children)||n.children.length===0){e.push(`Stack ${n.id} must contain at least one child`);return}let i=0,s=0;for(const a of n.children){if(a.type==="stack"){e.push(`Stack ${n.id} cannot contain another nested stack`);continue}if(ov(a,"stack",e,r),a.height===Un){s+=1;continue}i+=a.height}if(i>ct&&e.push(`Stack ${n.id} exceeds the 6-row budget`),s===0)return;const o=ct-i;if(o<s*pu||o%s!==0){e.push(`Stack ${n.id} has auto-height children that cannot resolve to whole height >= 2`);return}o/s<pu&&e.push(`Stack ${n.id} has auto-height children below the minimum row size`)}function jh(n,t){(typeof n!="string"||n.length===0)&&t.push(`Node id must be a non-empty string: ${String(n)}`)}function VA(n){return n===Vh||Number.isInteger(n)&&n>=Ps&&n<=Bh}function lv(n,t=OA){return n===Un||Number.isInteger(n)&&n>=pu&&n<=t}function sr(n){return n===Vh?mt:n}function jA(n){if(n.type==="card")return{id:n.id,type:"card",width:sr(n.width),cards:[{id:n.id,artifactID:n.artifactID,col:1,row:1,width:sr(n.width),height:cv(n.height,ct)}]};const t=GA(n.children),e=[];let r=1;for(let i=0;i<n.children.length;i+=1){const s=n.children[i],o=t[i];if(s.type==="card")e.push({id:s.id,artifactID:s.artifactID,col:1,row:r,width:Math.min(mt,sr(s.width)),height:o});else{let a=1;for(const c of s.children)e.push({id:c.id,artifactID:c.artifactID,col:a,row:r,width:sr(c.width),height:o}),a+=sr(c.width)}r+=o}return{id:n.id,type:"stack",width:e.reduce((i,s)=>Math.max(i,s.col+s.width-1),1),cards:e}}function GA(n){let t=0,e=0;for(const i of n)i.height===Un?e+=1:t+=i.height;const r=e>0?(ct-t)/e:0;return n.map(i=>cv(i.height,r))}function cv(n,t){return n===Un?t:n}function dn(n){return{...n}}function fu(n){return n.type==="card"?dn(n):{...n,children:n.children.map(dn)}}function uv(n,t={}){return{id:t.id??Pl(),type:"card",artifactID:n,width:t.width??Vh,height:t.height??Un}}function hv(n,t){return n.some(e=>dv(e,t))}function dv(n,t){switch(n.type){case"card":return n.artifactID===t;case"row":return n.children.some(e=>e.artifactID===t);case"stack":return n.children.some(e=>dv(e,t))}}function Ef(n){return n.layout.flatMap(pv)}function pv(n){switch(n.type){case"card":return[n.artifactID];case"row":return n.children.map(t=>t.artifactID);case"stack":return n.children.flatMap(pv)}}const oe=it(),gu=it(),ei=it(),qA=it();function YA(n){class t extends Error{constructor(r,i){super(r),this.name=n,i&&Object.assign(this,i)}}return t}const fv=YA("RequestError"),XA=200,KA=300;class JA{constructor(t,e){m(this,"serverURL");m(this,"token");this.serverURL=t.replace(/\/$/,""),this.token=e.token}async requestJSON(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0),s=await QA(i);if(!i.ok||i.status<XA||i.status>=KA)throw this.createError(typeof s.error=="string"?s.error:i.statusText,i.status);return s}async requestVoid(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0);if(!i.ok)throw this.createError(await zc(i,i.statusText),i.status)}async requestText(t,e){const r=await this.request(t,e);if(!r.ok)throw this.createError(await zc(r,r.statusText),r.status);return r.text()}async requestRawVoid(t,e,r){const i=await this.request(t,e,r,{"content-type":"text/plain"});if(!i.ok)throw this.createError(await zc(i,i.statusText),i.status)}createError(t,e){const r={serverURL:this.serverURL};return e!==void 0&&(r.status=e),new fv(t,r)}async request(t,e,r,i){const s=`${this.serverURL}${e}`;try{return await fetch(s,{method:t,headers:this.buildHeaders(i),body:r})}catch(o){throw this.createError(o instanceof Error?o.message:"Failed to reach server")}}buildHeaders(t){const e={...t??{}};return this.token&&(e.Authorization=`Bearer ${this.token}`),Object.keys(e).length>0?e:void 0}}async function QA(n){try{return await n.json()}catch{const t=await n.text().catch(()=>"");return t?{message:t}:{}}}async function zc(n,t){try{const e=await n.json();if(typeof e.error=="string")return e.error;if(typeof e.message=="string")return e.message}catch{}return t}function e$(n){return n.map(t=>`${t.name} (${t.id})`).join(", ")}var Ot,cl,gv;class t${constructor(t){w(this,cl);w(this,Ot);S(this,Ot,t)}list(){return l(this,Ot).requestJSON("GET","/screens")}async get(t={}){const e=await f(this,cl,gv).call(this,t.screenID);return l(this,Ot).requestJSON("GET",`/screens/${encodeURIComponent(e)}`)}create(t){const e={name:t.name};return t.id!==void 0&&(e.id=t.id),l(this,Ot).requestJSON("POST","/screens",e)}update(t){const{screenID:e,...r}=t;return l(this,Ot).requestJSON("PATCH",`/screens/${encodeURIComponent(e)}`,r)}remove(t){return l(this,Ot).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}`)}}Ot=new WeakMap,cl=new WeakSet,gv=async function(t){if(t!==void 0)return t;const{screens:e}=await this.list();if(e.length===1)return e[0].id;throw l(this,Ot).createError(`screenID is required when multiple screens exist. Available screens: ${e$(e)}`)};var Fe;class n${constructor(t){w(this,Fe);S(this,Fe,t)}create(t){const e={kind:t.kind,title:t.title};switch(t.kind){case"markdown":e.externalFilePath=t.externalFilePath;break;case"url":e.externalURL=t.externalURL;break;case"web-bundle":t.skipPending!==void 0&&(e.skipPending=t.skipPending);break}return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,Fe).requestJSON("POST","/artifacts",e)}list(t={}){const e=new URLSearchParams;t.screenID!==void 0&&e.set("screenID",t.screenID),t.unplaced&&e.set("unplaced","true");const r=e.toString();return l(this,Fe).requestJSON("GET",r?`/artifacts?${r}`:"/artifacts")}get(t){return l(this,Fe).requestJSON("GET",`/artifacts/${encodeURIComponent(t.artifactID)}`)}update(t){const e={};return t.title!==void 0&&(e.title=t.title),l(this,Fe).requestJSON("PATCH",`/artifacts/${encodeURIComponent(t.artifactID)}`,e)}edit(t){return l(this,Fe).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/edit`)}commitPending(t){return l(this,Fe).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/commit`)}abandonPending(t){return l(this,Fe).requestVoid("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/abandon`)}attach(t){return l(this,Fe).requestJSON("POST",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}detach(t){return l(this,Fe).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}delete(t){return l(this,Fe).requestJSON("DELETE",`/artifacts/${encodeURIComponent(t.artifactID)}`)}getContent(t){return l(this,Fe).requestText("GET",`/artifacts/${encodeURIComponent(t.artifactID)}/content`)}putContent(t){return l(this,Fe).requestRawVoid("PUT",`/artifacts/${encodeURIComponent(t.artifactID)}/content`,t.content)}}Fe=new WeakMap;var dr;class r${constructor(t){w(this,dr);S(this,dr,t)}get(){return l(this,dr).requestJSON("GET","/display")}patch(t){const e={};return t.activeScreenID!==void 0&&(e.activeScreenID=t.activeScreenID),t.activeThemeName!==void 0&&(e.activeThemeName=t.activeThemeName),l(this,dr).requestVoid("PATCH","/display",e)}focus(t){const e={artifactID:t.artifactID};return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,dr).requestJSON("POST","/display/focus",e)}}dr=new WeakMap;var Ns;class i${constructor(t){w(this,Ns);S(this,Ns,t)}async list(){const{views:t}=await l(this,Ns).requestJSON("GET","/views");return t}}Ns=new WeakMap;var rn;class s${constructor(t,e={}){m(this,"screens");m(this,"artifacts");m(this,"display");m(this,"views");w(this,rn);S(this,rn,new JA(t,e)),this.screens=new t$(l(this,rn)),this.artifacts=new n$(l(this,rn)),this.display=new r$(l(this,rn)),this.views=new i$(l(this,rn))}health(){return l(this,rn).requestJSON("GET","/health")}}rn=new WeakMap;const o$={focusCommandInput:{label:"Focus Command Input",trigger:{key:"k",meta:!0}}},a$="Local",l$="store-";function we(n){return new URL(n).origin}function c$(n){return{servers:[{url:we(n),name:a$}],activeServerURL:null,activeScreenID:null,tabs:{},screens:{}}}function u$(n,t){return[...n.tabs[we(t)]??[]]}function h$(n,t,e){const r=we(t),i=n.tabs[r]??[];return i.includes(e)?n:{...n,tabs:{...n.tabs,[r]:[...i,e]}}}function d$(n,t,e){const r=we(t),i=n.tabs[r]??[],s=i.filter(a=>a!==e);if(s.length===i.length)return n;const o={...n.tabs};return s.length===0?delete o[r]:o[r]=s,{...n,tabs:o}}var pr,fr,gr;class p$ extends qt{constructor(e,r,i={}){super();w(this,pr);w(this,fr);w(this,gr);S(this,pr,`${l$}${e}`),S(this,fr,i.storage??f$());const s=l(this,fr).getItem(l(this,pr));s===null?(S(this,gr,r),l(this,fr).setItem(l(this,pr),JSON.stringify(r))):S(this,gr,g$(JSON.parse(s),r))}get(){return l(this,gr)}set(e){S(this,gr,e),l(this,fr).setItem(l(this,pr),JSON.stringify(e)),this.dispatchEvent(new oe("change"))}}pr=new WeakMap,fr=new WeakMap,gr=new WeakMap;function f$(){const n=globalThis.localStorage;if(!n)throw new Error("LocalStore: no storage adapter supplied and window.localStorage is unavailable");return n}function g$(n,t){return{servers:Array.isArray(n.servers)?n.servers:t.servers,activeServerURL:typeof n.activeServerURL=="string"||n.activeServerURL===null?n.activeServerURL:t.activeServerURL,activeScreenID:typeof n.activeScreenID=="string"||n.activeScreenID===null?n.activeScreenID:t.activeScreenID,tabs:n.tabs&&typeof n.tabs=="object"?n.tabs:t.tabs,screens:n.screens&&typeof n.screens=="object"?n.screens:t.screens}}const m$=No(qt);var mr,Ke,vr,Be,kn,xn,te,ri,mv,Us,vv,yv,bv,wv,mu,vu,yu,Sv;class v$ extends m${constructor(e){var i;super();w(this,te);m(this,"id");m(this,"server");w(this,mr);w(this,Ke,new Map);w(this,vr);w(this,Be);w(this,kn);w(this,xn,null);w(this,Us,e=>{if(this.disposed)return;const r=e.event;switch(r.type){case"screen-updated":r.screen.id===this.id&&f(this,te,vv).call(this,r.screen);break;case"artifact-created":break;case"artifact-attached":r.screenID===this.id&&f(this,te,yv).call(this,r.cardID,r.artifact);break;case"artifact-updated":f(this,te,bv).call(this,r.artifact);break;case"artifact-removed":r.screenID===this.id&&f(this,te,wv).call(this,r.artifactID);break;case"artifact-content-changed":l(this,Ke).has(r.artifactID)&&this.dispatchEvent(new qA("artifact-content-changed",{artifactID:r.artifactID}));break}});this.id=e.screen.id,this.server=e.server,S(this,mr,e.localStore),S(this,vr,e.screen.name),S(this,Be,structuredClone(e.screen.layout));const r=((i=l(this,mr).get().screens[this.id])==null?void 0:i.scrollPosition)??0;S(this,kn,Math.max(0,r)),this.server.addEventListener("server-event",l(this,Us)),f(this,te,mv).call(this)}get name(){return l(this,vr)}get layout(){return l(this,Be)}get scrollPosition(){return l(this,kn)}get artifacts(){return l(this,Ke)}setScrollPosition(e){f(this,te,ri).call(this);const r=Math.max(0,e);r!==l(this,kn)&&(S(this,kn,r),f(this,te,Sv).call(this),this.dispatchEvent(new oe("change")))}setLayout(e){f(this,te,ri).call(this);const r=ev(e);if(!nv(r).valid)return;const s=f(this,te,vu).call(this);S(this,Be,r),S(this,xn,{layout:r,snapshot:s}),this.dispatchEvent(new oe("change")),this.server.client.screens.update({screenID:this.id,layout:r.map(o=>structuredClone(o))}).catch(()=>{var o;this.disposed||((o=l(this,xn))==null?void 0:o.layout)===r&&(S(this,xn,null),f(this,te,yu).call(this,s),this.dispatchEvent(new oe("change")))})}rename(e){f(this,te,ri).call(this),S(this,vr,e),this.dispatchEvent(new oe("change")),this.server.client.screens.update({screenID:this.id,name:e}).catch(()=>{})}async remove(){f(this,te,ri).call(this),await this.server.client.screens.remove({screenID:this.id})}removeArtifact(e){if(f(this,te,ri).call(this),!l(this,Ke).has(e))return;const r=f(this,te,vu).call(this);f(this,te,mu).call(this,e),this.dispatchEvent(new oe("change")),this.server.client.artifacts.detach({artifactID:e,screenID:this.id}).catch(()=>{this.disposed||(f(this,te,yu).call(this,r),this.dispatchEvent(new oe("change")))})}dispose(){this.server.removeEventListener("server-event",l(this,Us))}}mr=new WeakMap,Ke=new WeakMap,vr=new WeakMap,Be=new WeakMap,kn=new WeakMap,xn=new WeakMap,te=new WeakSet,ri=function(){if(this.disposed)throw new Error("ScreenModel is disposed")},mv=async function(){try{const e=await this.server.client.screens.get({screenID:this.id});if(this.disposed)return;for(const r of e.artifacts)l(this,Ke).set(r.id,r);this.dispatchEvent(new oe("change"))}catch{}},Us=new WeakMap,vv=function(e){l(this,xn)&&S(this,xn,null),S(this,vr,e.name),S(this,Be,structuredClone(e.layout)),this.dispatchEvent(new oe("change"))},yv=function(e,r){hv(l(this,Be),r.id)||S(this,Be,[...l(this,Be),uv(r.id,{id:e})]),l(this,Ke).set(r.id,r),this.dispatchEvent(new oe("change"))},bv=function(e){const r=l(this,Ke).get(e.id);r&&(l(this,Ke).set(e.id,{...r,...e}),this.dispatchEvent(new oe("change")))},wv=function(e){f(this,te,mu).call(this,e)&&this.dispatchEvent(new oe("change"))},mu=function(e){const r=l(this,Ke).delete(e),i=Ef({layout:l(this,Be)}).length,s=tv(l(this,Be),e),o=Ef({layout:s}).length;return S(this,Be,s),r||i!==o},vu=function(){return{layout:structuredClone(l(this,Be)),artifacts:new Map([...l(this,Ke).entries()].map(([e,r])=>[e,structuredClone(r)]))}},yu=function(e){S(this,Be,structuredClone(e.layout)),l(this,Ke).clear();for(const[r,i]of e.artifacts)l(this,Ke).set(r,structuredClone(i))},Sv=function(){const e=l(this,mr).get();l(this,mr).set({...e,screens:{...e.screens,[this.id]:{scrollPosition:l(this,kn)}}})};const y$=No(qt);var ze,Je,Mt,Fs,Hs,Ws,je,Ea,bu,ii;class b$ extends y${constructor(e){super();w(this,je);w(this,ze);w(this,Je);w(this,Mt,null);w(this,Fs,()=>{this.disposed||f(this,je,Ea).call(this)});w(this,Hs,()=>{this.disposed||f(this,je,Ea).call(this)});w(this,Ws,e=>{if(this.disposed)return;const r=e.event;if(r.type==="screen-removed"){this.removeTab(e.serverURL,r.screenID);const i=l(this,ze).get();i.activeServerURL===we(e.serverURL)&&i.activeScreenID===r.screenID&&f(this,je,ii).call(this,e.serverURL,null);return}if(r.type==="screen-changed"){if(r.screenID===null){f(this,je,ii).call(this,e.serverURL,null);return}const i=l(this,Je).servers.get(we(e.serverURL));if(!i||!i.screens.has(r.screenID))return;this.addTab(e.serverURL,r.screenID),f(this,je,ii).call(this,e.serverURL,r.screenID)}});S(this,ze,e.localStore),S(this,Je,e.serverManager),l(this,ze).addEventListener("change",l(this,Fs)),l(this,Je).addEventListener("change",l(this,Hs)),l(this,Je).addEventListener("server-event",l(this,Ws)),f(this,je,Ea).call(this)}get activeScreen(){return l(this,Mt)}getTabs(e){const r=we(e),i=u$(l(this,ze).get(),r),s=l(this,Je).servers.get(r);return s?i.filter(o=>s.screens.has(o)):i}hasTab(e,r){return this.getTabs(e).includes(r)}addTab(e,r){const i=we(e),s=l(this,Je).servers.get(i);s&&!s.screens.has(r)||f(this,je,bu).call(this,h$(l(this,ze).get(),i,r))}removeTab(e,r){f(this,je,bu).call(this,d$(l(this,ze).get(),e,r))}setActive(e,r){const i=we(e),s=l(this,Je).servers.get(i);!s||!s.screens.has(r)||f(this,je,ii).call(this,i,r)&&s.client.display.patch({activeScreenID:r}).catch(()=>{})}clearActive(){const e=l(this,ze).get().activeServerURL;if(!e||!f(this,je,ii).call(this,e,null))return;const r=l(this,Je).servers.get(e);r==null||r.client.display.patch({activeScreenID:null}).catch(()=>{})}dispose(){var e;l(this,ze).removeEventListener("change",l(this,Fs)),l(this,Je).removeEventListener("change",l(this,Hs)),l(this,Je).removeEventListener("server-event",l(this,Ws)),(e=l(this,Mt))==null||e.dispose(),S(this,Mt,null)}}ze=new WeakMap,Je=new WeakMap,Mt=new WeakMap,Fs=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,je=new WeakSet,Ea=function(){var c,u,h;const{activeServerURL:e,activeScreenID:r}=l(this,ze).get(),i=e?l(this,Je).servers.get(e)??null:null,s=i&&r?i.screens.get(r)??null:null,o=((c=l(this,Mt))==null?void 0:c.id)??null,a=(s==null?void 0:s.id)??null;o===a&&((u=l(this,Mt))==null?void 0:u.server)===i||((h=l(this,Mt))==null||h.dispose(),S(this,Mt,i&&s?new v$({screen:s,server:i,localStore:l(this,ze)}):null),i&&i.acpClient.setScreenContext(s?{screenID:s.id,screenName:s.name}:null),this.dispatchEvent(new AA("active-screen-changed")))},bu=function(e){e!==l(this,ze).get()&&(l(this,ze).set(e),this.dispatchEvent(new $A("tabs-changed")))},ii=function(e,r){const i=we(e),s=l(this,ze).get();return s.activeServerURL===i&&s.activeScreenID===r?!1:(l(this,ze).set({...s,activeServerURL:i,activeScreenID:r}),!0)};function A(n,t,e){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(n))return;a._zod.traits.add(n),t(a,c);const u=o.prototype,h=Object.keys(u);for(let p=0;p<h.length;p++){const v=h[p];v in a||(a[v]=u[v].bind(a))}}const i=(e==null?void 0:e.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:n});function o(a){var c;const u=e!=null&&e.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var c,u;return e!=null&&e.Parent&&a instanceof e.Parent?!0:(u=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:u.has(n)}}),Object.defineProperty(o,"name",{value:n}),o}class mi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _v extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const kv={};function Fn(n){return kv}function xv(n){const t=Object.values(n).filter(r=>typeof r=="number");return Object.entries(n).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function wu(n,t){return typeof t=="bigint"?t.toString():t}function Gh(n){return{get value(){{const t=n();return Object.defineProperty(this,"value",{value:t}),t}}}}function qh(n){return n==null}function Yh(n){const t=n.startsWith("^")?1:0,e=n.endsWith("$")?n.length-1:n.length;return n.slice(t,e)}function w$(n,t){const e=(n.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c!=null&&c[1]&&(i=Number.parseInt(c[1]))}const s=e>i?e:i,o=Number.parseInt(n.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}const Af=Symbol("evaluating");function ne(n,t,e){let r;Object.defineProperty(n,t,{get(){if(r!==Af)return r===void 0&&(r=Af,r=e()),r},set(i){Object.defineProperty(n,t,{value:i})},configurable:!0})}function Wr(n,t,e){Object.defineProperty(n,t,{value:e,writable:!0,enumerable:!0,configurable:!0})}function jn(...n){const t={};for(const e of n){const r=Object.getOwnPropertyDescriptors(e);Object.assign(t,r)}return Object.defineProperties({},t)}function $f(n){return JSON.stringify(n)}function S$(n){return n.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ev="captureStackTrace"in Error?Error.captureStackTrace:(...n)=>{};function Ka(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}const _$=Gh(()=>{var n;if(typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ni(n){if(Ka(n)===!1)return!1;const t=n.constructor;if(t===void 0||typeof t!="function")return!0;const e=t.prototype;return!(Ka(e)===!1||Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")===!1)}function Av(n){return Ni(n)?{...n}:Array.isArray(n)?[...n]:n}const k$=new Set(["string","number","symbol"]);function Ui(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gn(n,t,e){const r=new n._zod.constr(t??n._zod.def);return(!t||e!=null&&e.parent)&&(r._zod.parent=n),r}function M(n){const t=n;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function x$(n){return Object.keys(n).filter(t=>n[t]._zod.optin==="optional"&&n[t]._zod.optout==="optional")}const E$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function A$(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=jn(n._zod.def,{get shape(){const o={};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=e.shape[a])}return Wr(this,"shape",o),o},checks:[]});return Gn(n,s)}function $$(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=jn(n._zod.def,{get shape(){const o={...n._zod.def.shape};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return Wr(this,"shape",o),o},checks:[]});return Gn(n,s)}function T$(n,t){if(!Ni(t))throw new Error("Invalid input to extend: expected a plain object");const e=n._zod.def.checks;if(e&&e.length>0){const s=n._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=jn(n._zod.def,{get shape(){const s={...n._zod.def.shape,...t};return Wr(this,"shape",s),s}});return Gn(n,i)}function I$(n,t){if(!Ni(t))throw new Error("Invalid input to safeExtend: expected a plain object");const e=jn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t};return Wr(this,"shape",r),r}});return Gn(n,e)}function C$(n,t){const e=jn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t._zod.def.shape};return Wr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Gn(n,e)}function R$(n,t,e){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=jn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(e)for(const u in e){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);e[u]&&(c[u]=n?new n({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=n?new n({type:"optional",innerType:a[u]}):a[u];return Wr(this,"shape",c),c},checks:[]});return Gn(t,o)}function P$(n,t,e){const r=jn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(e)for(const o in e){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=new n({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new n({type:"nonoptional",innerType:i[o]});return Wr(this,"shape",s),s}});return Gn(t,r)}function pi(n,t=0){var e;if(n.aborted===!0)return!0;for(let r=t;r<n.issues.length;r++)if(((e=n.issues[r])==null?void 0:e.continue)!==!0)return!0;return!1}function fi(n,t){return t.map(e=>{var r;return(r=e).path??(r.path=[]),e.path.unshift(n),e})}function oa(n){return typeof n=="string"?n:n==null?void 0:n.message}function Hn(n,t,e){var i,s,o,a,c,u;const r={...n,path:n.path??[]};if(!n.message){const h=oa((o=(s=(i=n.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,n))??oa((a=t==null?void 0:t.error)==null?void 0:a.call(t,n))??oa((c=e.customError)==null?void 0:c.call(e,n))??oa((u=e.localeError)==null?void 0:u.call(e,n))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Xh(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function Ds(...n){const[t,e,r]=n;return typeof t=="string"?{message:t,code:"custom",input:e,inst:r}:{...t}}const $v=(n,t)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:t,enumerable:!1}),n.message=JSON.stringify(t,wu,2),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},Tv=A("$ZodError",$v),Iv=A("$ZodError",$v,{Parent:Error});function D$(n,t=e=>e.message){const e={},r=[];for(const i of n.issues)i.path.length>0?(e[i.path[0]]=e[i.path[0]]||[],e[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:e}}function L$(n,t=e=>e.message){const e={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)e._errors.push(t(s));else{let o=e,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],a++}}};return r(n),e}const Kh=n=>(t,e,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise)throw new mi;if(o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>Hn(c,s,Fn())));throw Ev(a,i==null?void 0:i.callee),a}return o.value},Jh=n=>async(t,e,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>Hn(c,s,Fn())));throw Ev(a,i==null?void 0:i.callee),a}return o.value},Dl=n=>(t,e,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:e,issues:[]},i);if(s instanceof Promise)throw new mi;return s.issues.length?{success:!1,error:new(n??Tv)(s.issues.map(o=>Hn(o,i,Fn())))}:{success:!0,data:s.value}},z$=Dl(Iv),Ll=n=>async(t,e,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:e,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new n(s.issues.map(o=>Hn(o,i,Fn())))}:{success:!0,data:s.value}},O$=Ll(Iv),M$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Kh(n)(t,e,i)},N$=n=>(t,e,r)=>Kh(n)(t,e,r),U$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Jh(n)(t,e,i)},F$=n=>async(t,e,r)=>Jh(n)(t,e,r),H$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dl(n)(t,e,i)},W$=n=>(t,e,r)=>Dl(n)(t,e,r),Z$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ll(n)(t,e,i)},B$=n=>async(t,e,r)=>Ll(n)(t,e,r),V$=/^[cC][^\s-]{8,}$/,j$=/^[0-9a-z]+$/,G$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,q$=/^[0-9a-vA-V]{20}$/,Y$=/^[A-Za-z0-9]{27}$/,X$=/^[a-zA-Z0-9_-]{21}$/,K$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,J$=/^([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})$/,Tf=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[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)$/,Q$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function tT(){return new RegExp(eT,"u")}const nT=/^(?:(?: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])$/,rT=/^(([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}|:))$/,iT=/^((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])$/,sT=/^(([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])$/,oT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cv=/^[A-Za-z0-9_-]*$/,aT=/^\+[1-9]\d{6,14}$/,Rv="(?:(?:\\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])))",lT=new RegExp(`^${Rv}$`);function Pv(n){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${t}`:n.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${n.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cT(n){return new RegExp(`^${Pv(n)}$`)}function uT(n){const t=Pv({precision:n.precision}),e=["Z"];n.local&&e.push(""),n.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${e.join("|")})`;return new RegExp(`^${Rv}T(?:${r})$`)}const hT=n=>{const t=n?`[\\s\\S]{${(n==null?void 0:n.minimum)??0},${(n==null?void 0:n.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},dT=/^-?\d+$/,Dv=/^-?\d+(?:\.\d+)?$/,pT=/^(?:true|false)$/i,fT=/^[^A-Z]*$/,gT=/^[^a-z]*$/,st=A("$ZodCheck",(n,t)=>{var e;n._zod??(n._zod={}),n._zod.def=t,(e=n._zod).onattach??(e.onattach=[])}),Lv={number:"number",bigint:"bigint",object:"date"},zv=A("$ZodCheckLessThan",(n,t)=>{st.init(n,t);const e=Lv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:e,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),Ov=A("$ZodCheckGreaterThan",(n,t)=>{st.init(n,t);const e=Lv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:e,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),mT=A("$ZodCheckMultipleOf",(n,t)=>{st.init(n,t),n._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),n._zod.check=e=>{if(typeof e.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof e.value=="bigint"?e.value%t.value===BigInt(0):w$(e.value,t.value)===0)||e.issues.push({origin:typeof e.value,code:"not_multiple_of",divisor:t.value,input:e.value,inst:n,continue:!t.abort})}}),vT=A("$ZodCheckNumberFormat",(n,t)=>{var o;st.init(n,t),t.format=t.format||"float64";const e=(o=t.format)==null?void 0:o.includes("int"),r=e?"int":"number",[i,s]=E$[t.format];n._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=i,c.maximum=s,e&&(c.pattern=dT)}),n._zod.check=a=>{const c=a.value;if(e){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:n});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort});return}}c<i&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:n,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:n,continue:!t.abort})}}),yT=A("$ZodCheckMaxLength",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),n._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=Xh(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),bT=A("$ZodCheckMinLength",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),n._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=Xh(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),wT=A("$ZodCheckLengthEquals",(n,t)=>{var e;st.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!qh(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),n._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const o=Xh(i),a=s>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:n,continue:!t.abort})}}),zl=A("$ZodCheckStringFormat",(n,t)=>{var e,r;st.init(n,t),n._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(e=n._zod).check??(e.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:n,continue:!t.abort})}):(r=n._zod).check??(r.check=()=>{})}),ST=A("$ZodCheckRegex",(n,t)=>{zl.init(n,t),n._zod.check=e=>{t.pattern.lastIndex=0,!t.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:"regex",input:e.value,pattern:t.pattern.toString(),inst:n,continue:!t.abort})}}),_T=A("$ZodCheckLowerCase",(n,t)=>{t.pattern??(t.pattern=fT),zl.init(n,t)}),kT=A("$ZodCheckUpperCase",(n,t)=>{t.pattern??(t.pattern=gT),zl.init(n,t)}),xT=A("$ZodCheckIncludes",(n,t)=>{st.init(n,t);const e=Ui(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${e}`:e);t.pattern=r,n._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),n._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:n,continue:!t.abort})}}),ET=A("$ZodCheckStartsWith",(n,t)=>{st.init(n,t);const e=new RegExp(`^${Ui(t.prefix)}.*`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:n,continue:!t.abort})}}),AT=A("$ZodCheckEndsWith",(n,t)=>{st.init(n,t);const e=new RegExp(`.*${Ui(t.suffix)}$`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:n,continue:!t.abort})}}),$T=A("$ZodCheckOverwrite",(n,t)=>{st.init(n,t),n._zod.check=e=>{e.value=t.tx(e.value)}});class TT{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
5
5
  `).filter(o=>o),i=Math.min(...r.map(o=>o.length-o.trimStart().length)),s=r.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(const o of s)this.content.push(o)}compile(){const t=Function,e=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...e,i.join(`
6
6
  `))}}const IT={major:4,minor:3,patch:6},ge=A("$ZodType",(n,t)=>{var i;var e;n??(n={}),n._zod.def=t,n._zod.bag=n._zod.bag||{},n._zod.version=IT;const r=[...n._zod.def.checks??[]];n._zod.traits.has("$ZodCheck")&&r.unshift(n);for(const s of r)for(const o of s._zod.onattach)o(n);if(r.length===0)(e=n._zod).deferred??(e.deferred=[]),(i=n._zod.deferred)==null||i.push(()=>{n._zod.run=n._zod.parse});else{const s=(a,c,u)=>{let h=pi(a),p;for(const v of c){if(v._zod.def.when){if(!v._zod.def.when(a))continue}else if(h)continue;const g=a.issues.length,_=v._zod.check(a);if(_ instanceof Promise&&(u==null?void 0:u.async)===!1)throw new mi;if(p||_ instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await _,a.issues.length!==g&&(h||(h=pi(a,g)))});else{if(a.issues.length===g)continue;h||(h=pi(a,g))}}return p?p.then(()=>a):a},o=(a,c,u)=>{if(pi(a))return a.aborted=!0,a;const h=s(c,r,u);if(h instanceof Promise){if(u.async===!1)throw new mi;return h.then(p=>n._zod.parse(p,u))}return n._zod.parse(h,u)};n._zod.run=(a,c)=>{if(c.skipChecks)return n._zod.parse(a,c);if(c.direction==="backward"){const h=n._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return h instanceof Promise?h.then(p=>o(p,a,c)):o(h,a,c)}const u=n._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new mi;return u.then(h=>s(h,r,c))}return s(u,r,c)}}ne(n,"~standard",()=>({validate:s=>{var o;try{const a=z$(n,s);return a.success?{value:a.data}:{issues:(o=a.error)==null?void 0:o.issues}}catch{return O$(n,s).then(c=>{var u;return c.success?{value:c.data}:{issues:(u=c.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Qh=A("$ZodString",(n,t)=>{var e;ge.init(n,t),n._zod.pattern=[...((e=n==null?void 0:n._zod.bag)==null?void 0:e.patterns)??[]].pop()??hT(n._zod.bag),n._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:n}),r}}),de=A("$ZodStringFormat",(n,t)=>{zl.init(n,t),Qh.init(n,t)}),CT=A("$ZodGUID",(n,t)=>{t.pattern??(t.pattern=J$),de.init(n,t)}),RT=A("$ZodUUID",(n,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Tf(r))}else t.pattern??(t.pattern=Tf());de.init(n,t)}),PT=A("$ZodEmail",(n,t)=>{t.pattern??(t.pattern=Q$),de.init(n,t)}),DT=A("$ZodURL",(n,t)=>{de.init(n,t),n._zod.check=e=>{try{const r=e.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||e.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:e.value,inst:n,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||e.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:e.value,inst:n,continue:!t.abort})),t.normalize?e.value=i.href:e.value=r;return}catch{e.issues.push({code:"invalid_format",format:"url",input:e.value,inst:n,continue:!t.abort})}}}),LT=A("$ZodEmoji",(n,t)=>{t.pattern??(t.pattern=tT()),de.init(n,t)}),zT=A("$ZodNanoID",(n,t)=>{t.pattern??(t.pattern=X$),de.init(n,t)}),OT=A("$ZodCUID",(n,t)=>{t.pattern??(t.pattern=V$),de.init(n,t)}),MT=A("$ZodCUID2",(n,t)=>{t.pattern??(t.pattern=j$),de.init(n,t)}),NT=A("$ZodULID",(n,t)=>{t.pattern??(t.pattern=G$),de.init(n,t)}),UT=A("$ZodXID",(n,t)=>{t.pattern??(t.pattern=q$),de.init(n,t)}),FT=A("$ZodKSUID",(n,t)=>{t.pattern??(t.pattern=Y$),de.init(n,t)}),HT=A("$ZodISODateTime",(n,t)=>{t.pattern??(t.pattern=uT(t)),de.init(n,t)}),WT=A("$ZodISODate",(n,t)=>{t.pattern??(t.pattern=lT),de.init(n,t)}),ZT=A("$ZodISOTime",(n,t)=>{t.pattern??(t.pattern=cT(t)),de.init(n,t)}),BT=A("$ZodISODuration",(n,t)=>{t.pattern??(t.pattern=K$),de.init(n,t)}),VT=A("$ZodIPv4",(n,t)=>{t.pattern??(t.pattern=nT),de.init(n,t),n._zod.bag.format="ipv4"}),jT=A("$ZodIPv6",(n,t)=>{t.pattern??(t.pattern=rT),de.init(n,t),n._zod.bag.format="ipv6",n._zod.check=e=>{try{new URL(`http://[${e.value}]`)}catch{e.issues.push({code:"invalid_format",format:"ipv6",input:e.value,inst:n,continue:!t.abort})}}}),GT=A("$ZodCIDRv4",(n,t)=>{t.pattern??(t.pattern=iT),de.init(n,t)}),qT=A("$ZodCIDRv6",(n,t)=>{t.pattern??(t.pattern=sT),de.init(n,t),n._zod.check=e=>{const r=e.value.split("/");try{if(r.length!==2)throw new Error;const[i,s]=r;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{e.issues.push({code:"invalid_format",format:"cidrv6",input:e.value,inst:n,continue:!t.abort})}}});function Mv(n){if(n==="")return!0;if(n.length%4!==0)return!1;try{return atob(n),!0}catch{return!1}}const YT=A("$ZodBase64",(n,t)=>{t.pattern??(t.pattern=oT),de.init(n,t),n._zod.bag.contentEncoding="base64",n._zod.check=e=>{Mv(e.value)||e.issues.push({code:"invalid_format",format:"base64",input:e.value,inst:n,continue:!t.abort})}});function XT(n){if(!Cv.test(n))return!1;const t=n.replace(/[-_]/g,r=>r==="-"?"+":"/"),e=t.padEnd(Math.ceil(t.length/4)*4,"=");return Mv(e)}const KT=A("$ZodBase64URL",(n,t)=>{t.pattern??(t.pattern=Cv),de.init(n,t),n._zod.bag.contentEncoding="base64url",n._zod.check=e=>{XT(e.value)||e.issues.push({code:"invalid_format",format:"base64url",input:e.value,inst:n,continue:!t.abort})}}),JT=A("$ZodE164",(n,t)=>{t.pattern??(t.pattern=aT),de.init(n,t)});function QT(n,t=null){try{const e=n.split(".");if(e.length!==3)return!1;const[r]=e;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const eI=A("$ZodJWT",(n,t)=>{de.init(n,t),n._zod.check=e=>{QT(e.value,t.alg)||e.issues.push({code:"invalid_format",format:"jwt",input:e.value,inst:n,continue:!t.abort})}}),Nv=A("$ZodNumber",(n,t)=>{ge.init(n,t),n._zod.pattern=n._zod.bag.pattern??Dv,n._zod.parse=(e,r)=>{if(t.coerce)try{e.value=Number(e.value)}catch{}const i=e.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return e;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return e.issues.push({expected:"number",code:"invalid_type",input:i,inst:n,...s?{received:s}:{}}),e}}),tI=A("$ZodNumberFormat",(n,t)=>{vT.init(n,t),Nv.init(n,t)}),nI=A("$ZodBoolean",(n,t)=>{ge.init(n,t),n._zod.pattern=pT,n._zod.parse=(e,r)=>{if(t.coerce)try{e.value=!!e.value}catch{}const i=e.value;return typeof i=="boolean"||e.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:n}),e}}),rI=A("$ZodUnknown",(n,t)=>{ge.init(n,t),n._zod.parse=e=>e}),iI=A("$ZodNever",(n,t)=>{ge.init(n,t),n._zod.parse=(e,r)=>(e.issues.push({expected:"never",code:"invalid_type",input:e.value,inst:n}),e)});function If(n,t,e){n.issues.length&&t.issues.push(...fi(e,n.issues)),t.value[e]=n.value}const sI=A("$ZodArray",(n,t)=>{ge.init(n,t),n._zod.parse=(e,r)=>{const i=e.value;if(!Array.isArray(i))return e.issues.push({expected:"array",code:"invalid_type",input:i,inst:n}),e;e.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(u=>If(u,e,o))):If(c,e,o)}return s.length?Promise.all(s).then(()=>e):e}});function Ja(n,t,e,r,i){if(n.issues.length){if(i&&!(e in r))return;t.issues.push(...fi(e,n.issues))}n.value===void 0?e in r&&(t.value[e]=void 0):t.value[e]=n.value}function Uv(n){var r,i,s,o;const t=Object.keys(n.shape);for(const a of t)if(!((o=(s=(i=(r=n.shape)==null?void 0:r[a])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const e=x$(n.shape);return{...n,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(e)}}function Fv(n,t,e,r,i,s){const o=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,h=c.optout==="optional";for(const p in t){if(a.has(p))continue;if(u==="never"){o.push(p);continue}const v=c.run({value:t[p],issues:[]},r);v instanceof Promise?n.push(v.then(g=>Ja(g,e,p,t,h))):Ja(v,e,p,t,h)}return o.length&&e.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),n.length?Promise.all(n).then(()=>e):e}const oI=A("$ZodObject",(n,t)=>{ge.init(n,t);const e=Object.getOwnPropertyDescriptor(t,"shape");if(!(e!=null&&e.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=Gh(()=>Uv(t));ne(n._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const h=a[u]._zod;if(h.values){c[u]??(c[u]=new Set);for(const p of h.values)c[u].add(p)}}return c});const i=Ka,s=t.catchall;let o;n._zod.parse=(a,c)=>{o??(o=r.value);const u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:n}),a;a.value={};const h=[],p=o.shape;for(const v of o.keys){const g=p[v],_=g._zod.optout==="optional",k=g._zod.run({value:u[v],issues:[]},c);k instanceof Promise?h.push(k.then(T=>Ja(T,a,v,u,_))):Ja(k,a,v,u,_)}return s?Fv(h,u,a,c,r.value,n):h.length?Promise.all(h).then(()=>a):a}}),aI=A("$ZodObjectJIT",(n,t)=>{oI.init(n,t);const e=n._zod.parse,r=Gh(()=>Uv(t)),i=v=>{var W;const g=new TT(["shape","payload","ctx"]),_=r.value,k=N=>{const F=$f(N);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};g.write("const input = payload.value;");const T=Object.create(null);let P=0;for(const N of _.keys)T[N]=`key_${P++}`;g.write("const newResult = {};");for(const N of _.keys){const F=T[N],Y=$f(N),j=v[N],le=((W=j==null?void 0:j._zod)==null?void 0:W.optout)==="optional";g.write(`const ${F} = ${k(N)};`),le?g.write(`
7
7
  if (${F}.issues.length) {