@signalk/freeboard-sk 3.4.0-beta.2 → 3.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +2 -2
- package/public/assets/features/action-button-1.jpg +0 -0
- package/public/assets/features/action-button-2.jpg +0 -0
- package/public/assets/features-corpus.json +1 -1
- package/public/assets/help/img/navigation-route.svg +4 -0
- package/public/assets/help/index.html +21 -3
- package/public/{chunk-UIEE3YOF.js → chunk-A3USDUNB.js} +1 -1
- package/public/{chunk-6XBJQDQZ.js → chunk-AZQNOMPD.js} +1 -1
- package/public/{chunk-N6FC7TMF.js → chunk-ECLVX6LA.js} +1 -1
- package/public/{chunk-VG2HTHDN.js → chunk-F7CTV67V.js} +99 -99
- package/public/chunk-FGHHJ7U2.js +1 -0
- package/public/chunk-FJGK2Y72.js +1 -0
- package/public/{chunk-CZWRDBMY.js → chunk-IP2UNZAT.js} +1 -1
- package/public/{chunk-26ZBWNUQ.js → chunk-KAAC4VTV.js} +1 -1
- package/public/chunk-LEEF5WZZ.js +1 -0
- package/public/{chunk-ZHXEZBYI.js → chunk-MWETYHR7.js} +1 -1
- package/public/chunk-NFMYMYDJ.js +1 -0
- package/public/{chunk-B5DI22LT.js → chunk-PWZFOOT4.js} +1 -1
- package/public/chunk-ROH43CFA.js +1 -0
- package/public/{chunk-CKZDFNLJ.js → chunk-VBSJZWSI.js} +1 -1
- package/public/{chunk-3E3U7Z7O.js → chunk-VXYZIAGN.js} +1 -1
- package/public/chunk-WARJYBQ7.js +7 -0
- package/public/{chunk-VAE47BFB.js → chunk-WOU2FNU3.js} +1 -1
- package/public/{chunk-UXZI7A6H.js → chunk-XHJJSLEL.js} +1 -1
- package/public/{chunk-IZEHULJO.js → chunk-ZYGXQZX6.js} +1 -1
- package/public/index.html +1 -1
- package/public/main-NXVNOJR5.js +358 -0
- package/public/{worker-2QCQHBWQ.js → worker-6LLSDQNK.js} +40 -20
- package/public/chunk-6W3TVG4T.js +0 -1
- package/public/chunk-FFPCEPCR.js +0 -7
- package/public/chunk-L766X4HH.js +0 -1
- package/public/chunk-NUFT6SHL.js +0 -1
- package/public/chunk-PKC2MOZE.js +0 -1
- package/public/chunk-VCZ35SJT.js +0 -1
- package/public/main-YMAIP3FL.js +0 -358
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-CI2BDMX2.js";import{a as t}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-CI2BDMX2.js";import{a as t}from"./chunk-MWETYHR7.js";import"./chunk-WARJYBQ7.js";import"./chunk-BZGM3F3K.js";var a=t.Object({ids:t.Array(t.String()),visible:t.Boolean()}),o=t.Object({ids:t.Array(t.String()),style:t.Optional(t.Union([t.Literal("normal"),t.Literal("active"),t.Literal("warning"),t.Literal("alarm"),t.Null()])),colors:t.Optional(t.Union([t.Object({fg:t.Optional(t.String({pattern:i})),bg:t.Optional(t.String({pattern:i}))}),t.Null()])),badge:t.Optional(t.Union([t.Integer({minimum:0}),t.Null()]))});export{o as DecorateButtonsParams,a as SetVisibilityParams};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as h,b as q,e as ct}from"./chunk-BZGM3F3K.js";var i={};ct(i,{CodePointCount:()=>Tl,Counted:()=>Ml,Entries:()=>Cl,EntriesRegExp:()=>Rl,Every:()=>El,EveryAll:()=>kl,GraphemeCount:()=>gl,HasPropertyKey:()=>vl,IsArray:()=>At,IsBigInt:()=>Ft,IsBoolean:()=>Ha,IsClassInstance:()=>$l,IsConstructor:()=>ll,IsDeepEqual:()=>An,IsEqual:()=>P,IsFunction:()=>Va,IsGreaterEqualThan:()=>Ja,IsGreaterThan:()=>xl,IsInteger:()=>Ln,IsLessEqualThan:()=>Za,IsLessThan:()=>Il,IsMaxLength:()=>bl,IsMinLength:()=>hl,IsMultipleOf:()=>yl,IsNull:()=>gr,IsNumber:()=>Tr,IsObject:()=>Dt,IsObjectNotArray:()=>fl,IsString:()=>br,IsSymbol:()=>dl,IsUndefined:()=>Fn,IsUnsafePropertyKey:()=>Xa,IsValueLike:()=>Qa,Keys:()=>$r,ShiftLeft:()=>hr,Some:()=>Ol,SomeAll:()=>Pl,Symbols:()=>wl,Values:()=>jl});function $t(e,t,r){return e>=t&&e<=r}function il(e){return e===8205}function Ga(e){return $t(e,127462,127487)}function sl(e){return $t(e,65024,65039)}function ml(e){return $t(e,768,879)||$t(e,6832,6911)||$t(e,7616,7679)||$t(e,65056,65071)}function Ir(e){return e>65535?2:1}function za(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(ml(r)||sl(r))t+=Ir(r);else break}return t}function pl(e,t){let r=e.codePointAt(t),n=t+Ir(r);for(n=za(e,n);n<e.length-1&&il(e.codePointAt(n));){let a=e.codePointAt(n+1);n+=1+Ir(a),n=za(e,n)}return Ga(r)&&n<e.length&&Ga(e.codePointAt(n))&&(n+=Ir(e.codePointAt(n))),n}function Ba(e){let t=0,r=0;for(;r<e.length;)r=pl(e,r),t++;return t}function yr(e){let t=0,r=0,n=0;for(;r<e.length;){let a=e.charCodeAt(r++)>>10;t+=+((n<<8|a)!==13879),n=a}return t}function _a(e,t){return e.length<=t||e.length<=t<<1&&yr(e)<=t}function Wa(e,t){return e.length>=t<<1||e.length>=t&&yr(e)>=t}function At(e){return Array.isArray(e)}function Ft(e){return P(typeof e,"bigint")}function Ha(e){return P(typeof e,"boolean")}function ll(e){if(Fn(e)||!Va(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Va(e){return P(typeof e,"function")}function Ln(e){return Number.isInteger(e)}function gr(e){return P(e,null)}function Tr(e){return Number.isFinite(e)}function fl(e){return Dt(e)&&!At(e)}function Dt(e){return P(typeof e,"object")&&!gr(e)}function br(e){return P(typeof e,"string")}function dl(e){return P(typeof e,"symbol")}function Fn(e){return P(e,void 0)}function P(e,t){return e===t}function xl(e,t){return e>t}function Il(e,t){return e<t}function Za(e,t){return e<=t}function Ja(e,t){return e>=t}function yl(e,t){if(Ft(e)||Ft(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!Tr(e)||Ln(e)&&1/t%1===0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<r}function $l(e){if(!Dt(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return gr(t)?!1:P(typeof t.constructor,"function")&&!(P(t.constructor,globalThis.Object)||P(t.constructor.name,"Object"))}function Qa(e){return Ft(e)||Ha(e)||gr(e)||Tr(e)||br(e)||Fn(e)}function gl(e){return Ba(e)}function Tl(e){return yr(e)}function bl(e,t){return _a(e,t)}function hl(e,t){return Wa(e,t)}function El(e,t,r){return e.every((n,a)=>a<t||r(n,a))}function kl(e,t,r){let n=!0;return e.forEach((a,s)=>{s>=t&&!r(a,s)&&(n=!1)}),n}function Ol(e,t){return e.some((r,n)=>t(r,n))}function Pl(e,t){let r=!1;return e.forEach((n,a)=>{t(n,a)&&(r=!0)}),r}function Ml(e,t){return e.reduce((r,n,a)=>t(n,a)?++r:r,0)}function hr(e,t,r){return P(e.length,0)?r():t(e[0],e.slice(1))}function Xa(e){return P(e,"__proto__")||P(e,"constructor")||P(e,"prototype")}function vl(e,t){return Xa(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Rl(e){return $r(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function Cl(e){return Object.entries(e)}function $r(e){return Object.getOwnPropertyNames(e)}function wl(e){return Object.getOwnPropertySymbols(e)}function jl(e){return Object.values(e)}function Sl(e,t){if(!Dt(t))return!1;let r=$r(e);return P(r.length,$r(t).length)&&r.every(n=>An(e[n],t[n]))}function ql(e,t){return At(t)&&P(e.length,t.length)&&e.every((r,n)=>An(e[n],t[n]))}function An(e,t){return At(e)?ql(e,t):Dt(e)?Sl(e,t):P(e,t)}var _e={};ct(_e,{IsBigInt64Array:()=>Vl,IsBigUint64Array:()=>Zl,IsBoolean:()=>Ll,IsDate:()=>Ql,IsFloat32Array:()=>Wl,IsFloat64Array:()=>Hl,IsInt16Array:()=>Gl,IsInt32Array:()=>Bl,IsInt8Array:()=>Kl,IsMap:()=>Yl,IsNumber:()=>Fl,IsRegExp:()=>Jl,IsSet:()=>Xl,IsString:()=>Al,IsTypeArray:()=>Dl,IsUint16Array:()=>zl,IsUint32Array:()=>_l,IsUint8Array:()=>Ul,IsUint8ClampedArray:()=>Nl});function Ll(e){return e instanceof Boolean}function Fl(e){return e instanceof Number}function Al(e){return e instanceof String}function Dl(e){return globalThis.ArrayBuffer.isView(e)}function Kl(e){return e instanceof globalThis.Int8Array}function Ul(e){return e instanceof globalThis.Uint8Array}function Nl(e){return e instanceof globalThis.Uint8ClampedArray}function Gl(e){return e instanceof globalThis.Int16Array}function zl(e){return e instanceof globalThis.Uint16Array}function Bl(e){return e instanceof globalThis.Int32Array}function _l(e){return e instanceof globalThis.Uint32Array}function Wl(e){return e instanceof globalThis.Float32Array}function Hl(e){return e instanceof globalThis.Float64Array}function Vl(e){return e instanceof globalThis.BigInt64Array}function Zl(e){return e instanceof globalThis.BigUint64Array}function Jl(e){return e instanceof globalThis.RegExp}function Ql(e){return e instanceof globalThis.Date}function Xl(e){return e instanceof globalThis.Set}function Yl(e){return e instanceof globalThis.Map}var O$=i;var Me={};ct(Me,{Get:()=>af,Reset:()=>rf,Set:()=>nf});var Pe={immutableTypes:!1,maxErrors:8,maxParseErrors:1,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function rf(){Pe.immutableTypes=!1,Pe.maxErrors=8,Pe.maxParseErrors=1,Pe.maxInstantiationCount=128,Pe.useAcceleration=!0,Pe.exactOptionalPropertyTypes=!1,Pe.enumerableKind=!1,Pe.correctiveParse=!1,Pe.unionPrioritySort=!0}function nf(e){for(let t of i.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(Pe,t,{value:r})}}function af(){return Pe}var p={};ct(p,{Assign:()=>of,Clone:()=>sf,Create:()=>pf,Discard:()=>uf,Metrics:()=>ve,Update:()=>df});var ve={assign:0,create:0,clone:0,discard:0,update:0};function Te(e){return[...i.Keys(e),...i.Symbols(e)]}function Ya(e,t){if(!t.has(e)){t.add(e);for(let r of Te(e)){let n=Object.getOwnPropertyDescriptor(e,r);!n||!("value"in n)||i.IsObject(n.value)&&Ya(n.value,t)}Object.freeze(e)}}function Ze(e){return Me.Get().immutableTypes&&Ya(e,new WeakSet),e}function of(e,t){ve.assign+=1;let r={},n=Te(t),a=Te(e);for(let s of a)n.includes(s)||Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(e,s));for(let s of n)Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s));return Ze(r)}function sf(e){ve.clone+=1;let t={};for(let r of Te(e)){if(i.IsUnsafePropertyKey(r))continue;let n=Object.getOwnPropertyDescriptor(e,r);i.IsEqual(n.enumerable,!0)?t[r]=n.value:Object.defineProperty(t,r,n)}return t}function eo(e,t){return h(h({},e),t)}function mf(e,t){for(let r of Object.keys(t))Object.defineProperty(e,r,{configurable:!0,writable:!0,enumerable:!1,value:t[r]});return e}function pf(e,t,r={}){ve.create+=1;let n=eo(t,r),a=Me.Get().enumerableKind?eo(n,e):mf(n,e);return Ze(a)}function uf(e,t){ve.discard+=1;let r={};for(let n of Te(e)){if(t.includes(n))continue;let a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a)}return Ze(r)}function cf(e,t,r,n){for(let a of Te(e)){if(i.IsUnsafePropertyKey(a)||t.includes(a)||r.includes(a))continue;let s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,s)}}function lf(e,t,r){let n=Me.Get().enumerableKind;for(let a of t)i.IsUnsafePropertyKey(a)||Object.defineProperty(r,a,{configurable:!0,writable:!0,enumerable:n,value:e[a]})}function ff(e,t,r){for(let n of t)i.IsUnsafePropertyKey(n)||Object.defineProperty(r,n,{configurable:!0,enumerable:!0,writable:!0,value:e[n]})}function df(e,t,r){ve.update+=1;let n={},a=Te(t),s=Te(r);return cf(e,a,s,n),lf(t,a,n),ff(r,s,n),Ze(n)}function x(e,t){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.IsEqual(e["~kind"],t)}function Y(e){return i.IsObject(e)}function I(e,t,r){return p.Create({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:r},{})}function Je(e){return x(e,"Deferred")}function Re(e,t){return p.Create({"~kind":"Array"},{type:"array",items:e},t)}function U(e){return x(e,"Array")}function Er(e){return p.Discard(e,["~kind","type","items"])}function Qe(e,t,r={}){return p.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function te(e){return x(e,"Constructor")}function to(e){return p.Discard(e,["~kind","type","parameters","instanceType"])}function Xe(e,t,r={}){return p.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function re(e){return x(e,"Function")}function ro(e){return p.Discard(e,["~kind","type","parameters","returnType"])}function lt(e,t){return p.Create({"~kind":"Ref"},{$ref:e},t)}function ne(e){return x(e,"Ref")}function gt(e,t){return p.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function kr(e){return x(e,"Generic")}function Or(e){return p.Create({"~kind":"Any"},{},e)}function B(e){return x(e,"Any")}var no="(?!)";function F(e){return p.Create({"~kind":"Never"},{not:{}},e)}function We(e){return x(e,"Never")}function Kt(e,t){return p.Update(e,{"~immutable":!0},t)}function ao(e,t,r,n){let a=c(e,t,r);return Kt(a,n)}function je(e,t){return p.Update(e,{"~readonly":!0},t)}function oo(e,t,r,n){let a=c(e,t,r);return je(a,n)}function Hg(e){return Pr(e)}function oe(e){return Y(e)&&i.HasPropertyKey(e,"~optional")}function io(e){return i.Keys(e).filter(t=>!oe(e[t]))}function Mr(e){return i.Keys(e)}function vr(e){return i.Values(e)}function $(e,t={}){let r=io(e),n=r.length>0?{required:r}:{};return p.Create({"~kind":"Object"},q(h({type:"object"},n),{properties:e}),t)}function S(e){return x(e,"Object")}function so(e){return p.Discard(e,["~kind","type","properties","required"])}function ie(e){return p.Create({"~kind":"Unknown"},{},e)}function V(e){return x(e,"Unknown")}function Ye(e,t,r){let n=i.Keys(e).reduce((a,s)=>q(h({},a),{[s]:p.Update(e[s],{},{$id:s})}),{});return p.Create({"~kind":"Cyclic"},{$defs:n,$ref:t},r)}function me(e){return x(e,"Cyclic")}function fT(e){return p.Update(e,{"~unsafe":null},{})}function mo(e){return i.IsObjectNotArray(e)&&i.HasPropertyKey(e,"~unsafe")&&i.IsNull(e["~unsafe"])}var Se={};ct(Se,{Match:()=>xf});function xf(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function Dn(...e){let[t,r]=Se.Match(e,{2:(n,a)=>[n,a,a],1:n=>[n,ie(),ie()]});return p.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function Z(e){return x(e,"Infer")}function Ut(e,t,r,n={}){return p.Create({"~kind":"Dependent"},{if:e,then:t,else:r},n)}function _(e){return x(e,"Dependent")}function po(e){return p.Discard(e,["~kind","if","then","else"])}function uo(e){return i.IsObjectNotArray(e)}function co(e){return i.Keys(e).filter(r=>isNaN(r)).reduce((r,n)=>[...r,e[n]],[])}function wT(e){return i.IsString(e)||i.IsNumber(e)}function jT(e,t){let r=uo(e)?co(e):e;return p.Create({"~kind":"Enum"},{enum:r},t)}function pe(e){return x(e,"Enum")}function be(e,t={}){return p.Create({"~kind":"Intersect"},{allOf:e},t)}function M(e){return x(e,"Intersect")}function lo(e){return p.Discard(e,["~kind","allOf"])}var To={};ct(To,{Hash:()=>go,HashCode:()=>wf});function W(){throw new Error("Unreachable")}function yf(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let n of Reflect.ownKeys(r))n!=="constructor"&&typeof n!="symbol"&&t.add(n);r=Object.getPrototypeOf(r)}return[...t]}function $f(e){return typeof e=="number"}var xe={Array:0,BigInt:1,Boolean:2,Date:3,Constructor:4,Function:5,Null:6,Number:7,Object:8,RegExp:9,String:10,Symbol:11,TypeArray:12,Undefined:13},Cr=8997,Nt=33826,wr=40164,jr=52210,Io=new Float64Array(1),yo=new DataView(Io.buffer),$o=new Uint8Array(Io.buffer);function J(e){let t=Cr^e,r=t*435,n=Nt*435+(r>>>16),a=wr*435+(n>>>16)+(t<<8),s=jr*435+(a>>>16)+(Nt<<8);Cr=r&65535,Nt=n&65535,wr=a&65535,jr=s&65535}function gf(e){J(xe.Array);for(let t of e)et(t)}function Tf(e){J(xe.BigInt),yo.setBigInt64(0,e);for(let t of $o)J(t)}function fo(e){J(xe.Boolean),J(e?1:0)}function bf(e){J(xe.Constructor),et(e.toString())}function hf(e){J(xe.Date),et(e.getTime())}function Ef(e){J(xe.Function),et(e.toString())}function kf(e){J(xe.Null)}function xo(e){J(xe.Number),yo.setFloat64(0,e,!0);for(let t of $o)J(t)}function Of(e){J(xe.Object);for(let t of yf(e).sort())et(t),et(e[t])}function Pf(e){J(xe.RegExp),Kn(e.toString())}var Mf=new TextEncoder;function Kn(e){J(xe.String);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127){for(let n of Mf.encode(e.slice(t)))J(n);return}J(r)}}function vf(e){J(xe.Symbol),et(e.toString())}function Rf(e){J(xe.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)J(t[r])}function Cf(e){return J(xe.Undefined)}function et(e){return _e.IsTypeArray(e)?Rf(e):_e.IsDate(e)?hf(e):_e.IsRegExp(e)?Pf(e):_e.IsBoolean(e)?fo(e.valueOf()):_e.IsString(e)?Kn(e.valueOf()):_e.IsNumber(e)?xo(e.valueOf()):$f(e)?xo(e):i.IsArray(e)?gf(e):i.IsBoolean(e)?fo(e):i.IsBigInt(e)?Tf(e):i.IsConstructor(e)?bf(e):i.IsNull(e)?kf(e):i.IsObject(e)?Of(e):i.IsString(e)?Kn(e):i.IsSymbol(e)?vf(e):i.IsUndefined(e)?Cf(e):i.IsFunction(e)?Ef(e):W()}function Rr(e){return e.toString(16).padStart(4,"0")}function wf(e){return BigInt(`0x${go(e)}`)}function go(e){return Cr=8997,Nt=33826,wr=40164,jr=52210,et(e),`${Rr(jr)}${Rr(wr)}${Rr(Nt)}${Rr(Cr)}`}function bo(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var jf=bo;function JT(){return jf}var Un=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,n=Eo(r)?m=>this.decode(r["~codec"].decode(m)):this.decode,a=Eo(r)?m=>r["~codec"].encode(t(m)):t,s={decode:n,encode:a};return p.Update(this.type,{"~codec":s},{})}},Nn=class{constructor(t){this.type=t}Decode(t){return new Un(this.type,t)}};function ko(e){return new Nn(e)}function Sh(e,t){return ko(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function qh(e,t){return ko(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function Eo(e){return Y(e)&&i.HasPropertyKey(e,"~codec")&&i.IsObject(e["~codec"])&&i.HasPropertyKey(e["~codec"],"encode")&&i.HasPropertyKey(e["~codec"],"decode")}function Oo(e,t={}){return I("AddImmutable",[e],t)}function Tt(e,t={}){return Kt(e,t)}function Gh(e){return Tt(e)}function Gt(e){return Y(e)&&i.HasPropertyKey(e,"~immutable")}function qe(e,t={}){return I("AddReadonly",[e],t)}function Sr(e,t={}){return je(e,t)}function Jh(e){return Sr(e)}function ft(e){return Y(e)&&i.HasPropertyKey(e,"~readonly")}function qf(e,t){let r=Ff(e)?[...e["~refine"],t]:[t];return p.Update(e,{"~refine":r},{})}function rE(...e){let[t,r,n]=Se.Match(e,{3:(a,s,m)=>[a,s,m],2:(a,s)=>[a,s,()=>"Refine Error"]});return qf(t,{check:r,error:n})}function Lf(e){return i.IsObjectNotArray(e)&&i.HasPropertyKey(e,"check")&&i.HasPropertyKey(e,"error")&&i.IsFunction(e.check)&&i.IsFunction(e.error)}function Ff(e){return Y(e)&&i.HasPropertyKey(e,"~refine")&&i.IsArray(e["~refine"])&&i.Every(e["~refine"],0,t=>Lf(t))}var Po="-?(?:0|[1-9][0-9]*)n";function Gn(e){return p.Create({"~kind":"BigInt"},{type:"bigint"},e)}function tt(e){return x(e,"BigInt")}function Mo(e){return p.Create({"~kind":"Boolean"},{type:"boolean"},e)}function Le(e){return x(e,"Boolean")}function zn(e){return p.Create({"~kind":"Identifier"},{name:e})}function lE(e){return x(e,"Identifier")}var qr="-?(?:0|[1-9][0-9]*)";function zt(e){return p.Create({"~kind":"Integer"},{type:"integer"},e)}function Ie(e){return x(e,"Integer")}var Bn=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function Af(e){return i.IsBigInt(e)?"bigint":i.IsBoolean(e)?"boolean":i.IsNumber(e)?"number":i.IsString(e)?"string":(()=>{throw new Bn(e)})()}function v(e,t){return p.Create({"~kind":"Literal"},{type:Af(e),const:e},t)}function Lr(e){return i.IsBigInt(e)||i.IsBoolean(e)||i.IsNumber(e)||i.IsString(e)}function TE(e){return w(e)&&i.IsBigInt(e.const)}function bE(e){return w(e)&&i.IsBoolean(e.const)}function vo(e){return w(e)&&i.IsNumber(e.const)}function Ro(e){return w(e)&&i.IsString(e.const)}function w(e){return x(e,"Literal")}function Fr(e){return p.Create({"~kind":"Null"},{type:"null"},e)}function Ar(e){return x(e,"Null")}var Dr="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function ke(e){return p.Create({"~kind":"Number"},{type:"number"},e)}function Q(e){return x(e,"Number")}function Kr(e){return p.Create({"~kind":"Symbol"},{type:"symbol"},e)}function bt(e){return x(e,"Symbol")}function Bt(...e){let[t,r,n]=Se.Match(e,{3:(a,s,m)=>[a,s,m],2:(a,s)=>[a,s,s],1:a=>[a,ie(),ie()]});return p.Create({"~kind":"Parameter"},{name:t,extends:r,equals:n},{})}function FE(e){return x(e,"Parameter")}var Ur=".*";function Fe(e){return p.Create({"~kind":"String"},{type:"string"},e)}function ye(e){return x(e,"String")}function E(e,t={}){return p.Create({"~kind":"Union"},{anyOf:e},t)}function y(e){return x(e,"Union")}function Co(e){return p.Discard(e,["~kind","anyOf"])}function _t(e){let t=wo(e);return i.IsEqual(t.length,2)?t[0]:[]}function Df(e){return!0}function jo(e){return i.ShiftLeft(e,(t,r)=>Kf(t)?jo(r):!1,()=>!0)}function So(e){return i.IsEqual(e.length,0)?!1:jo(e)}function Kf(e){return y(e)?So(e.anyOf):w(e)?Df(e.const):!1}function Nr(e){return So(e)}function Gr(e){return p.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function qo(e,t,r=[]){return i.ShiftLeft(e,(n,a)=>qo(a,t,[...r,`${n}${t}`]),()=>r)}function Uf(e,t){return i.IsEqual(e.length,0)?[`${t}`]:qo(e,t)}function Lo(e,t,r=[]){return i.ShiftLeft(t,(n,a)=>Lo(e,a,[...r,...Fo(e,n)]),()=>r)}function Fo(e,t){return y(t)?Lo(e,t.anyOf):w(t)?Uf(e,t.const):W()}function Ao(e,t){return i.ShiftLeft(t,(r,n)=>Ao(Fo(e,r),n),()=>e)}function Nf(e){return e.map(t=>v(t))}function Gf(e){let t=Ao([],e),r=Nf(t);return E(r)}function zf(e){return i.IsEqual(e.length,0)?W():i.IsEqual(e.length,1)&&w(e[0])?e[0]:Gf(e)}function _n(e){let t=_t(e);return i.IsEqual(t.length,0)?Fe():Nr(t)?zf(t):Gr(e)}function Do(e){let t=_n(e);return H(t)?Fe():t}function fe(e,t){let r="object",n={[e]:t};return p.Create({"~kind":"Record"},{type:r,patternProperties:n})}function Ko(e){return fe(Ce,e)}function Uo(e){return $({true:e,false:e})}function X(e,t={}){let[r,n,a]=[e,e.length,!1];return p.Create({"~kind":"Tuple"},{type:"array",additionalItems:a,items:r,minItems:n},t)}function A(e){return x(e,"Tuple")}function No(e){return p.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Wn(e){return e.reduceRight((r,n,a)=>h({[a]:n},r),{})}function Go(e){let t=Wn(e.items);return $(t)}function Bf(e){return p.Discard(e,["~optional"])}function dt(e,t){return p.Update(Bf(e),{},t)}function zo(e,t,r,n){let a=c(e,t,r);return dt(a,n)}function _f(e){return p.Discard(e,["~readonly"])}function ht(e,t){return p.Update(_f(e),{},t)}function Bo(e,t,r,n){let a=c(e,t,r);return ht(a,n)}function zr(e,t){let r=ft(e)&&ft(t),n=oe(e)&&oe(t),a=N([e,t]),s=ht(dt(a,{}),{});return r&&n?je(Ae(s,{}),{}):r?je(s,{}):n?Ae(s,{}):s}function _o(e,t){let r=ft(e)||ft(t),n=oe(e)||oe(t),a=ht(dt(e,{}),{}),s=ht(dt(t,{}),{}),m=de([a,s]);return r&&n?je(Ae(m,{}),{}):r?je(m,{}):n?Ae(m,{}):m}function Wf(e,t,r){return r in e?r in t?zr(e[r],t[r]):e[r]:r in t?t[r]:F()}function Hf(e,t){return[...new Set([...i.Keys(e),...i.Keys(t)])].reduce((a,s)=>q(h({},a),{[s]:Wf(e,t,s)}),{})}function Wo(e){return S(e)?e.properties:A(e)?Wn(e.items):{}}function Ho(e,t){let r=Wo(e),n=Wo(t),a=Hf(r,n);return $(a)}function Vf(e,t){let r=Et(e,t);return i.IsEqual(r,Ht)?e:i.IsEqual(r,Vt)||i.IsEqual(r,Wt)?t:F()}function Vo(e){return S(e)||A(e)}function Zf(e,t){let r=Vo(e),n=Vo(t);return r&&n?Ho(e,t):r&&!n?e:!r&&n?t:Vf(e,t)}function Zo(e,t){return We(e)||B(e)?e:V(e)||We(t)||B(t)?t:V(t)?e:Zf(e,t)}function Jf(e,t){return y(e)||y(t)}function Qf(e,t){let r=Oe(e),n=Oe(t);return Jf(r,n)?N([r,n]):Zo(r,n)}function Jo(e,t,r=[]){return i.ShiftLeft(t,(n,a)=>Jo(e,a,[...r,Qf(n,e)]),()=>i.IsEqual(r.length,0)?[e]:r)}function Qo(e,t,r=[]){return i.ShiftLeft(e,(n,a)=>Qo(a,t,[...r,...Zt([n],t)]),()=>r)}function Zt(e,t=[]){return i.ShiftLeft(e,(r,n)=>y(r)?Zt(n,Qo(r.anyOf,t)):Zt(n,Jo(r,t)),()=>t)}function Xf(e,t){let r=ue({},e,t);return g.IsExtendsTrueLike(r)?[]:[e]}function Xo(e,t,r=[]){return i.ShiftLeft(e,(n,a)=>Xo(a,t,[...r,...Xf(n,t)]),()=>r)}function Br(e,t){let r=Oe(e),n=y(r)?r.anyOf:[r],a=Xo(n,t);return de(a)}function we(e,t,r){let n=N([e,t]),a=Br(r,e);return de([n,a])}function ce(e,t=[]){return i.ShiftLeft(e,(r,n)=>ce(n,[...t,v(r)]),()=>de(t))}function N(e){let t=Zt(e),r=Hn(t);return de(r)}function se(e){let t=Do(e);return Oe(t)}function de(e){let t=Hn(e);return rt(t)}function Oe(e){return _(e)?we(e.if,e.then,e.else):pe(e)?ce(e.enum):M(e)?N(e.allOf):H(e)?se(e.pattern):y(e)?de(e.anyOf):e}function rt(e){return i.IsEqual(e.length,1)?e[0]:i.IsEqual(e.length,0)?F():E(e)}function Yo(e,t){let r=ce(e);return nt(r,t)}function ei(e,t){return fe(at,t)}function ti(e,t){let r=N(e);return nt(r,t)}function ri(e,t){return i.IsString(e)||i.IsNumber(e)?$({[e]:t}):i.IsEqual(e,!1)?$({false:t}):i.IsEqual(e,!0)?$({true:t}):$({})}function ni(e,t){return fe(kt,t)}function ai(e,t){return i.HasPropertyKey(e,"pattern")&&(i.IsString(e.pattern)||e.pattern instanceof RegExp)?fe(e.pattern.toString(),t):fe(Ce,t)}function oi(e,t){let r=_t(e);return Nr(r)?nt(se(e),t):fe(e,t)}function Yf(e){return y(e)?Ot(e.anyOf):[e]}function Ot(e,t=[]){return i.ShiftLeft(e,(r,n)=>Ot(n,[...t,...Yf(r)]),()=>t)}function ed(e){return e.some(t=>ye(t)||Q(t)||Ie(t))}function td(e,t){return i.IsEqual(ed(e),!0)?fe(Ce,t):void 0}function rd(e,t){return e.reduce((r,n)=>w(n)&&(i.IsString(n.const)||i.IsNumber(n.const))?q(h({},r),{[n.const]:t}):r,{})}function nd(e,t){let r=rd(e,t);return $(r)}function ii(e,t){let r=Ot(e),n=td(r,t);return Y(n)?n:nd(r,t)}function nt(e,t){return B(e)?Ko(t):Le(e)?Uo(t):pe(e)?Yo(e.enum,t):Ie(e)?ei(e,t):M(e)?ti(e.allOf,t):w(e)?ri(e.const,t):Q(e)?ni(e,t):y(e)?ii(e.anyOf,t):ye(e)?ai(e,t):H(e)?oi(e.pattern,t):$({})}function Vn(e,t,r){return b([e])?p.Update(nt(e,t),{},r):_r(e,t,r)}function si(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return Vn(s,m,a)}var at=`^${qr}$`,kt=`^${Dr}$`,Ce=`^${Ur}$`;function _r(e,t,r={}){return I("Record",[e,t],r)}function mi(e,t,r={}){return Vn(e,t,r)}function pi(e,t){return fe(e,t)}function Wr(e){return i.IsEqual(e,Ce)?Fe():i.IsEqual(e,at)?zt():i.IsEqual(e,kt)?ke():_n(e)}function De(e){return i.Keys(e.patternProperties)[0]}function Hr(e){let t=De(e);return Wr(t)}function $e(e){return e.patternProperties[De(e)]}function le(e){return x(e,"Record")}function Jt(e){return p.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function Pt(e){return x(e,"Rest")}function ui(e){return p.Create({"~kind":"This"},{$ref:"#"},e)}function ci(e){return x(e,"This")}function Vr(e){return p.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Zr(e){return x(e,"Undefined")}function li(e){return p.Create({"~kind":"Void"},{type:"void"},e)}function ot(e){return x(e,"Void")}function od(e){return p.Discard(e,["~immutable"])}function fi(e,t){return p.Update(od(e),{},t)}function di(e,t,r,n){let a=c(e,t,r);return fi(a,n)}function xi(e,t={}){return I("RemoveReadonly",[e],t)}function Ii(e,t={}){return I("RemoveOptional",[e],t)}function yi(e,t={}){return dt(e,t)}function $i(e,t){return e(t)}function gi(e,t){return i.IsString(t)?v($i(e,t)):v(t)}function Ti(e,t){let r=se(t);return He(e,r)}function bi(e,t){let r=t.map(n=>He(e,n));return E(r)}function He(e,t){return w(t)?gi(e,t.const):H(t)?Ti(e,t.pattern):y(t)?bi(e,t.anyOf):t}function Jr(e,t={}){return I("Lowercase",[e],t)}function Rv(e,t={}){return Zn(e,t)}function Qr(e,t={}){return I("Uncapitalize",[e],t)}function Sv(e,t={}){return Jn(e,t)}function Xr(e,t={}){return I("Uppercase",[e],t)}function Av(e,t={}){return Qn(e,t)}var id=e=>e[0].toUpperCase()+e.slice(1),sd=e=>e.toLowerCase(),md=e=>e[0].toLowerCase()+e.slice(1),pd=e=>e.toUpperCase();function Xn(e,t){return b([e])?p.Update(He(id,e),{},t):Yr(e,t)}function Zn(e,t){return b([e])?p.Update(He(sd,e),{},t):Jr(e,t)}function Jn(e,t){return b([e])?p.Update(He(md,e),{},t):Qr(e,t)}function Qn(e,t){return b([e])?p.Update(He(pd,e),{},t):Xr(e,t)}function hi(e,t,r,n){let a=c(e,t,r);return Xn(a,n)}function Ei(e,t,r,n){let a=c(e,t,r);return Zn(a,n)}function ki(e,t,r,n){let a=c(e,t,r);return Jn(a,n)}function Oi(e,t,r,n){let a=c(e,t,r);return Qn(a,n)}function Yr(e,t={}){return I("Capitalize",[e],t)}function Zv(e,t={}){return Xn(e,t)}function ud(e,t,r,n,a,s){let m=ue(e,r,n);return g.IsExtendsUnion(m)?E([c(m.inferred,t,a),c(e,t,s)]):g.IsExtendsTrue(m)?c(m.inferred,t,a):c(e,t,s)}function Yn(e,t,r,n,a,s,m){return b([r,n])?p.Update(ud(e,t,r,n,a,s),{},m):en(r,n,a,s,m)}function Pi(e,t,r,n,a,s,m){let l=c(e,t,r),d=c(e,t,n);return Yn(e,t,l,d,a,s,m)}function en(e,t,r,n,a={}){return I("Conditional",[e,t,r,n],a)}function iR(e,t,r,n,a={}){return Yn({},D([],[]),e,t,r,n,a)}function cd(e){let t=te(e)?e.parameters:[],r=it({},D([],[]),t);return X(r)}function ea(e,t){return b([e])?p.Update(cd(e),{},t):tn(e,t)}function Mi(e,t,r,n){let a=c(e,t,r);return ea(a,n)}function tn(e,t={}){return I("ConstructorParameters",[e],t)}function $R(e,t={}){return ea(e,t)}function ta(e,t){return p.Update(Oe(e),{},t)}function vi(e,t,r,n){let a=c(e,t,r);return ta(a,n)}function Ri(e,t={}){return I("Evaluate",[e],t)}function PR(e,t={}){return ta(e,t)}function Qt(e,t,r){return b([e,t])?p.Update(Br(e,t),{},r):rn(e,t,r)}function Ci(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return Qt(s,m,a)}function rn(e,t,r={}){return I("Exclude",[e,t],r)}function LR(e,t,r={}){return Qt(e,t,r)}function ld(e,t){let r=ue({},e,t);return g.IsExtendsTrueLike(r)?[e]:[]}function wi(e,t,r=[]){return i.ShiftLeft(e,(n,a)=>wi(a,t,[...r,...ld(n,t)]),()=>r)}function ji(e,t){let r=Oe(e),n=y(r)?r.anyOf:[r],a=wi(n,t);return de(a)}function ra(e,t,r){return b([e,t])?p.Update(ji(e,t),{},r):nn(e,t,r)}function Si(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return ra(s,m,a)}function nn(e,t,r={}){return I("Extract",[e,t],r)}function JR(e,t,r={}){return ra(e,t,r)}function fd(e){return e.reduce((t,r)=>Lr(r)?[...t,v(r)]:t,[])}function Mt(e){let t=fd(e);return E(t)}function qi(e,t){return t in e?ne(e[t])?qi(e,e[t].$ref):e[t]:F()}function Ke(e,t){return qi(e,t)}function Li(e,t){let r=Ke(e,t);return he(r)}function Fi(e,t,r){let n=we(e,t,r);return he(n)}function dd(e,t){let r=i.Keys(e).filter(C=>!i.HasPropertyKey(t,C)),n=i.Keys(t).filter(C=>!i.HasPropertyKey(e,C)),a=i.Keys(e).filter(C=>i.HasPropertyKey(t,C)),s=r.reduce((C,ae)=>q(h({},C),{[ae]:e[ae]}),{}),m=n.reduce((C,ae)=>q(h({},C),{[ae]:t[ae]}),{}),l=a.reduce((C,ae)=>q(h({},C),{[ae]:zr(e[ae],t[ae])}),{}),d=p.Assign(s,m);return p.Assign(d,l)}function Ai(e){return e.reduce((t,r)=>dd(t,he(r)),{})}function Di(e){let t=Go(X(e));return he(t)}function xd(e,t){return i.Keys(e).filter(a=>a in t).reduce((a,s)=>q(h({},a),{[s]:_o(e[s],t[s])}),{})}function Ki(e,t){return i.ShiftLeft(e,(r,n)=>Ki(n,xd(t,he(r))),()=>t)}function Ui(e){return i.ShiftLeft(e,(t,r)=>Ki(r,he(t)),()=>W())}function he(e){return me(e)?Li(e.$defs,e.$ref):_(e)?Fi(e.if,e.then,e.else):M(e)?Ai(e.allOf):y(e)?Ui(e.anyOf):A(e)?Di(e.items):S(e)?e.properties:{}}function vt(e){let t=he(e);return $(t)}var Id=new RegExp("^(?:0|[1-9][0-9]*)$");function Rt(e){let t=`${e}`;return Id.test(t)?parseInt(t):e}function yd(e){return v(Rt(e))}function Ni(e){return e.map(t=>Gi(t))}function Gi(e){return M(e)?be(Ni(e.allOf)):y(e)?E(Ni(e.anyOf)):w(e)?yd(e.const):e}function zi(e,t){let r=Gi(t),n=ue({},r,ke());return g.IsExtendsTrueLike(n)?e:w(t)&&i.IsEqual(t.const,"length")?ke():F()}function Bi(e,t){let r=Ke(e,t);return ge(r)}function _i(e,t,r){let n=we(e,t,r);return ge(n)}function Wi(e){let t=ce(e);return ge(t)}function Hi(e){let t=N(e);return ge(t)}function Vi(e){return[`${e}`]}function Zi(e){let t=se(e);return ge(t)}function Ji(e){return e.reduce((t,r)=>[...t,...ge(r)],[])}function ge(e){return me(e)?Bi(e.$defs,e.$ref):_(e)?_i(e.if,e.then,e.else):pe(e)?Wi(e.enum):M(e)?Hi(e.allOf):w(e)?Vi(e.const):H(e)?Zi(e.pattern):y(e)?Ji(e.anyOf):[]}function Ct(e){return ge(e)}function Xt(e,t){return t.map(r=>Yt(e,r))}function Yt(e,t){return U(t)?Re(Yt(e,t.items)):te(t)?Qe(Xt(e,t.parameters),Yt(e,t.instanceType)):re(t)?Xe(Xt(e,t.parameters),Yt(e,t.returnType)):A(t)?X(Xt(e,t.items)):y(t)?E(Xt(e,t.anyOf)):M(t)?be(Xt(e,t.allOf)):ci(t)?$(e):t}function Qi(e,t){return Yt(e,t)}function $d(e,t){let r=t in e?e[t]:F();return Qi(e,r)}function Xi(e,t){return t.reduce((r,n)=>[...r,$d(e,n)],[])}function gd(e,t){let r=Ct(t),n=Xi(e,r);return de(n)}var Td=new RegExp(at);function bd(e){return e.filter(r=>Td.test(r))}function hd(e){let t=Mr(e),r=bd(t),n=Xi(e,r);return de(n)}function Yi(e,t){return Q(t)?hd(e):gd(e,t)}function Ed(e){return v(Rt(e))}function es(e){return e.map(t=>na(t))}function na(e){return M(e)?be(es(e.allOf)):y(e)?E(es(e.anyOf)):w(e)?Ed(e.const):e}function kd(e,t){return e.reduceRight((r,n,a)=>{let s=ue({},v(a),t);return g.IsExtendsTrueLike(s)?[n,...r]:r},[])}function Od(e,t){let r=na(t),n=kd(e,r);return rt(n)}function Pd(e){return rt(e)}function ts(e,t){return w(t)&&i.IsEqual(t.const,"length")?v(e.length):Q(t)||Ie(t)?Pd(e):Od(e,t)}function rs(e,t){return U(e)?zi(e.items,t):S(e)?Yi(e.properties,t):A(e)?ts(e.items,t):F()}function Md(e){return me(e)||_(e)||M(e)||y(e)?vt(e):e}function aa(e,t,r){return b([e,t])?p.Update(rs(Md(e),t),{},r):er(e,t,r)}function ns(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return aa(s,m,a)}function er(e,t,r={}){return I("Index",[e,t],r)}function Lj(e,t,r={}){let n=i.IsArray(t)?Mt(t):t;return aa(e,n,r)}function vd(e){return te(e)?e.instanceType:F()}function oa(e,t){return b([e])?p.Update(vd(e),{},t):an(e,t)}function as(e,t,r,n={}){let a=c(e,t,r);return oa(a,n)}function an(e,t={}){return I("InstanceType",[e],t)}function _j(e,t={}){return oa(e,t)}function Rd(e,t){return N([...e,$(t)])}function ia(e,t,r){return b(e)?p.Update(Rd(e,t),{},r):tr(e,t,r)}function os(e,t,r,n,a){let s=Ee(e,t,r),m=rr(e,t,n);return ia(s,m,a)}function tr(e,t,r={}){return I("Interface",[e,t],r)}function wt(e){return Y(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"Interface")}function oS(e,t,r={}){return ia(e,t,r)}function is(){return E([ke(),Fe(),Kr()])}function ss(e){return ke()}function Cd(e){return e.reduce((r,n)=>Lr(n)?[...r,v(Rt(n))]:W(),[])}function ms(e){let t=i.Keys(e),r=Cd(t);return rt(r)}function ps(e){return Hr(e)}function us(e){let t=e.map((r,n)=>v(n));return rt(t)}function cs(e){return B(e)?is():U(e)?ss(e.items):S(e)?ms(e.properties):le(e)?ps(e):A(e)?us(e.items):F()}function wd(e){return me(e)||_(e)||M(e)||y(e)?vt(e):e}function sa(e,t){return b([e])?p.Update(cs(wd(e)),{},t):nr(e,t)}function ls(e,t,r,n){let a=c(e,t,r);return sa(a,n)}function nr(e,t={}){return I("KeyOf",[e],t)}function ZS(e,t={}){return sa(e,t)}function jd(e){let t=se(e);return on(t)}function Sd(e){return e.reduce((t,r)=>[...t,...on(r)],[])}function qd(e){let t=ce(e);return on(t)}function Ld(e){return i.IsNumber(e)?[v(`${e}`)]:[v(e)]}function on(e){return pe(e)?qd(e.enum):w(e)?Ld(e.const):H(e)?jd(e.pattern):y(e)?Sd(e.anyOf):[e]}function fs(e){return on(e)}function Fd(e){return H(e)?se(e.pattern):e}function Ad(e,t,r,n,a,s){let m=p.Assign(e,{[r.name]:n}),l=c(m,t,a),d=Fd(l),L=c(m,t,s);return vo(d)||Ro(d)?{[d.const]:L}:{}}function Dd(e,t,r,n,a,s){return n.reduce((m,l)=>[...m,Ad(e,t,r,l,a,s)],[])}function Kd(e){return e.reduce((t,r)=>[...t,$(r)],[])}function ds(e,t,r,n,a,s){let m=fs(n),l=Dd(e,t,r,m,a,s),d=Kd(l);return N(d)}function ma(e,t,r,n,a,s,m){return b([n])?p.Update(ds(e,t,r,n,a,s),{},m):ar(r,n,a,s,m)}function xs(e,t,r,n,a,s,m){let l=c(e,t,n);return ma(e,t,r,l,a,s,m)}function ar(e,t,r,n,a={}){return I("Mapped",[e,t,r,n],a)}function hq(e,t,r,n,a={}){return ma({},D([],[]),e,t,r,n,a)}function Ud(e,t,r){return e.includes(r)?!0:or([...e,r],t,t[r])}function Is(e,t,r){let n=vr(r);return xt(e,t,n)}function xt(e,t,r){return i.ShiftLeft(r,(n,a)=>or(e,t,n)?!0:xt(e,t,a),()=>!1)}function or(e,t,r){return ne(r)?Ud(e,t,r.$ref):U(r)?or(e,t,r.items):te(r)?xt(e,t,[...r.parameters,r.instanceType]):re(r)?xt(e,t,[...r.parameters,r.returnType]):wt(r)?Is(e,t,r.parameters[1]):M(r)?xt(e,t,r.allOf):S(r)?Is(e,t,r.properties):y(r)?xt(e,t,r.anyOf):A(r)?xt(e,t,r.items):le(r)?or(e,t,$e(r)):!1}function ys(e,t,r){return or(e,t,r)}function Nd(e,t){return t.reduce((r,n)=>ys([n],e,e[n])?[...r,n]:r,[])}function $s(e){let t=Mr(e);return Nd(e,t)}function Gd(e,t,r){return r.includes(t)?r:t in e?ir(e,e[t],[...r,t]):W()}function gs(e,t,r){let n=vr(t);return jt(e,n,r)}function jt(e,t,r){return t.reduce((n,a)=>ir(e,a,n),r)}function ir(e,t,r){return ne(t)?Gd(e,t.$ref,r):U(t)?ir(e,t.items,r):te(t)?jt(e,[...t.parameters,t.instanceType],r):re(t)?jt(e,[...t.parameters,t.returnType],r):wt(t)?gs(e,t.parameters[1],r):M(t)?jt(e,t.allOf,r):S(t)?gs(e,t.properties,r):y(t)?jt(e,t.anyOf,r):A(t)?jt(e,t.items,r):le(t)?ir(e,$e(t),r):r}function Ts(e,t,r){return ir(e,r,[t])}function zd(e,t,r){let n=Ee(e,D([],[]),t),a=rr({},D([],[]),r);return N([...n,$(a)])}function Bd(e,t){return i.Keys(e).filter(n=>t.includes(n)).reduce((n,a)=>{let s=e[a],m=wt(s)?zd(e,s.parameters[0],s.parameters[1]):s;return q(h({},n),{[a]:m})},{})}function bs(e,t,r){let n=Ts(e,t,r),a=Bd(e,n);return Ye(a,t)}function _d(e,t,r){let n=p.Assign(e,t);return i.Keys(t).filter(s=>r.includes(s)).reduce((s,m)=>q(h({},s),{[m]:bs(n,m,t[m])}),{})}function Wd(e,t,r){let n=p.Assign(e,t);return i.Keys(t).filter(s=>!r.includes(s)).reduce((s,m)=>q(h({},s),{[m]:c(n,D([],[]),t[m])}),{})}function Hd(e,t,r){let n=$s(t),a=_d(e,t,n),s=Wd(e,t,n),m=h(h({},a),s);return p.Update(m,{},r)}function sn(e,t,r,n){return Hd(e,r,n)}function hs(e,t={}){return I("Module",[e],t)}function bL(e,t={}){return sn({},D([],[]),e,t)}function Vd(e){let t=E([Fr(),Vr()]);return Qt(e,t,{})}function pa(e,t){return b([e])?p.Update(Vd(e),{},t):mn(e,t)}function Es(e,t,r,n){let a=c(e,t,r);return pa(a,n)}function mn(e,t={}){return I("NonNullable",[e],t)}function SL(e,t={}){return pa(e,t)}function pn(e){let t=vt(e);return S(t)?t.properties:W()}function Zd(e,t){return i.Keys(e).reduce((n,a)=>t.includes(a)?n:q(h({},n),{[a]:e[a]}),{})}function ks(e,t){let r=pn(e),n=Ct(t),a=Zd(r,n);return $(a)}function ua(e,t,r){return b([e,t])?p.Update(ks(e,t),{},r):un(e,t,r)}function Os(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return ua(s,m,a)}function un(e,t,r={}){return I("Omit",[e,t],r)}function eF(e,t,r={}){let n=i.IsArray(t)?Mt(t):t;return ua(e,n,r)}function Jd(e){let t=re(e)?e.parameters:[],r=it({},D([],[]),t);return X(r)}function ca(e,t){return b([e])?p.Update(Jd(e),{},t):cn(e,t)}function Ps(e,t,r,n){let a=c(e,t,r);return ca(a,n)}function cn(e,t={}){return I("Parameters",[e],t)}function lF(e,t={}){return ca(e,t)}function Ms(e,t){let r=Ke(e,t),n=Ue(r);return Ye(p.Assign(e,{[t]:n}),t)}function vs(e,t,r){let n=we(e,t,r);return Ue(n)}function Rs(e){let t=N(e);return Ue(t)}function Cs(e){let t=e.map(r=>Ue(r));return E(t)}function ws(e){let t=i.Keys(e).reduce((n,a)=>q(h({},n),{[a]:Pr(e[a])}),{});return $(t)}function Ue(e){return me(e)?Ms(e.$defs,e.$ref):_(e)?vs(e.if,e.then,e.else):M(e)?Rs(e.allOf):y(e)?Cs(e.anyOf):S(e)?ws(e.properties):$({})}function la(e,t){return b([e])?p.Update(Ue(e),{},t):ln(e,t)}function js(e,t,r,n){let a=c(e,t,r);return la(a,n)}function ln(e,t={}){return I("Partial",[e],t)}function QF(e,t={}){return la(e,t)}function Qd(e,t){return i.Keys(e).reduce((n,a)=>t.includes(a)?p.Assign(n,{[a]:e[a]}):n,{})}function Ss(e,t){let r=pn(e),n=Ct(t),a=Qd(r,n);return $(a)}function fa(e,t,r){return b([e,t])?p.Update(Ss(e,t),{},r):fn(e,t,r)}function qs(e,t,r,n,a){let s=c(e,t,r),m=c(e,t,n);return fa(s,m,a)}function fn(e,t,r={}){return I("Pick",[e,t],r)}function dA(e,t,r={}){let n=i.IsArray(t)?Mt(t):t;return fa(e,n,r)}function Ls(e){return Tt(Re(e))}function Fs(e,t){let r=Ke(e,t),n=Ne(r);return Ye(p.Assign(e,{[t]:n}),t)}function As(e,t,r){let n=we(e,t,r);return Ne(n)}function Ds(e){let t=N(e);return Ne(t)}function Ks(e){let t=i.Keys(e).reduce((n,a)=>q(h({},n),{[a]:Sr(e[a])}),{});return $(t)}function Us(e){return Tt(X(e))}function Ns(e){let t=e.map(r=>Ne(r));return E(t)}function Ne(e){return U(e)?Ls(e.items):me(e)?Fs(e.$defs,e.$ref):_(e)?As(e.if,e.then,e.else):M(e)?Ds(e.allOf):S(e)?Ks(e.properties):A(e)?Us(e.items):y(e)?Ns(e.anyOf):e}function da(e,t){return b([e])?p.Update(Ne(e),{},t):dn(e)}function Gs(e,t,r,n){let a=c(e,t,r);return da(a,n)}function dn(e,t={}){return I("ReadonlyObject",[e],t)}function Xd(e,t={}){return da(e,t)}var pD=Xd;function zs(e,t){let r=Ke(e,t),n=Ge(r);return Ye(p.Assign(e,{[t]:n}),t)}function Bs(e,t,r){let n=we(e,t,r);return Ge(n)}function _s(e){let t=N(e);return Ge(t)}function Ws(e){let t=e.map(r=>Ge(r));return E(t)}function Hs(e){let t=i.Keys(e).reduce((n,a)=>q(h({},n),{[a]:yi(e[a])}),{});return $(t)}function Ge(e){return me(e)?zs(e.$defs,e.$ref):_(e)?Bs(e.if,e.then,e.else):M(e)?_s(e.allOf):y(e)?Ws(e.anyOf):S(e)?Hs(e.properties):$({})}function xa(e,t){return b([e])?p.Update(Ge(e),{},t):xn(e,t)}function Vs(e,t,r,n){let a=c(e,t,r);return xa(a,n)}function xn(e,t={}){return I("Required",[e],t)}function VD(e,t={}){return xa(e,t)}function Yd(e){return re(e)?e.returnType:F()}function Ia(e,t){return b([e])?p.Update(Yd(e),{},t):In(e,t)}function Zs(e,t,r,n={}){let a=c(e,t,r);return Ia(a,n)}function In(e,t={}){return I("ReturnType",[e],t)}function aK(e,t={}){return Ia(e,t)}function ya(e,t){return b([e])?p.Update(e,{},t):yn(e,t)}function Js(e,t,r,n){let a=c(e,t,r);return ya(a,n)}function yn(e,t){return I("With",[e,t],{})}function lK(e,t){return ya(e,t)}function tx(e,t){return i.IsEqual(e,"Array")?Re(t[0]):i.IsEqual(e,"Capitalize")?Yr(t[0]):i.IsEqual(e,"ConstructorParameters")?tn(t[0]):i.IsEqual(e,"Evaluate")?Ri(t[0]):i.IsEqual(e,"Exclude")?rn(t[0],t[1]):i.IsEqual(e,"Extract")?nn(t[0],t[1]):i.IsEqual(e,"Index")?er(t[0],t[1]):i.IsEqual(e,"InstanceType")?an(t[0]):i.IsEqual(e,"Lowercase")?Jr(t[0]):i.IsEqual(e,"NonNullable")?mn(t[0]):i.IsEqual(e,"Omit")?un(t[0],t[1]):i.IsEqual(e,"Parameters")?cn(t[0]):i.IsEqual(e,"Partial")?ln(t[0]):i.IsEqual(e,"Pick")?fn(t[0],t[1]):i.IsEqual(e,"Readonly")?dn(t[0]):i.IsEqual(e,"KeyOf")?nr(t[0]):i.IsEqual(e,"Record")?_r(t[0],t[1]):i.IsEqual(e,"Required")?xn(t[0]):i.IsEqual(e,"ReturnType")?In(t[0]):i.IsEqual(e,"Uncapitalize")?Qr(t[0]):i.IsEqual(e,"Uppercase")?Xr(t[0]):sr(lt(e),t)}function It(){throw Error("Unreachable")}function tm(e,t=[]){return i.ShiftLeft(e,(r,n)=>tm(n,[...t,r[1]]),()=>t)}function Ve(e){return i.IsEqual(e.length,3)?[e[0],...tm(e[1])]:[]}function rm(e){return Bt(e[0],e[2],e[4])}function nm(e){return Bt(e[0],e[2],e[2])}function am(e){return Bt(e[0],ie(),e[2])}function om(e){return Bt(e,ie(),ie())}function im(e){return Ve(e)}function sm(e){return e[1]}function mm(e){return Ve(e)}function pm(e){return e[1]}function um(e){return tx(e[0],e[1])}function cm(e){return null}function lm(e){return Fe()}function fm(e){return ke()}function dm(e){return Mo()}function xm(e){return Vr()}function Im(e){return Fr()}function ym(e){return zt()}function $m(e){return Gn()}function gm(e){return ie()}function Tm(e){return Or()}function bm(e){return $({})}function hm(e){return F()}function Em(e){return Kr()}function km(e){return li()}function Om(e){return ui()}function Pm(e){return v(BigInt(e))}function Mm(e){return v(i.IsEqual(e,"true"))}function vm(e){return v(parseFloat(e))}function Rm(e){return v(e)}function Cm(e){return e[1]}function wm(e){return v(e)}function jm(e){return i.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function Sm(e){return e[1]}function qm(e){return $n(e)}function Lm(e){return i.IsEqual(e.length,6)?Ut(e[1],e[3],e[5]):Ut(e[1],e[3],ie())}function Fm(e){return e.length>0}function Am(e){return e.reduce((t,r)=>i.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function Dm(e){return i.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function Km(e){return i.IsArray(e)&&i.IsEqual(e.length,3)?e[1]:e}function Um(e){return i.IsEqual(e.length,2)?e[1]:[]}function Qs(e,t){return t.reduce((r,n)=>{let a=n;return i.IsEqual(a.length,1)?er(r,a[0]):i.IsEqual(a.length,0)?Re(r):It()},e)}function Xs(e,t){return i.IsEqual(t.length,3)?en(e,t[0],t[1],t[2]):e}function rx(e,t){return i.IsArray(t)&&i.IsEqual(t.length,0)?e:yn(e,t)}function Nm(e){let[t,r,n,a,s]=e;return rx(Xs(t?nr(Qs(r,n)):Qs(r,n),a),s)}function $a(e,t){return i.IsEqual(t.length,3)?(()=>{let[r,n,a]=t,s=$a(n,a);if(i.IsEqual(r,"&"))return M(s)?be([e,...s.allOf]):be([e,s]);if(i.IsEqual(r,"|"))return y(s)?E([e,...s.anyOf]):E([e,s]);It()})():e}function Gm(e){let[t,r]=e;return $a(t,r)}function zm(e){let[t,r]=e;return $a(t,r)}function Bm(e){return Oo(e[1])}function _m(e){return e[1]}function Wm(e){return gt(e[0],e[2])}function Hm(e){return i.IsEqual(e.length,4)?Dn(e[1],e[3]):i.IsEqual(e.length,2)?Dn(e[1],ie()):It()}function Vm(e){return`${e}`}function Zm(e){return Ie(e[3])?at:Q(e[3])?kt:bt(e[3])?Ce:ye(e[3])?Ce:It()}function Jm(e){return e.length>0}function Qm(e){return e.length>0}function Xm(e){let[t,r,n,a,s]=e;return{[r]:t&&n?qe(ze(s)):t&&!n?qe(s):!t&&n?ze(s):s}}function Ym(e){return Ve(e)}function ep(e){return e.reduce((t,r)=>i.HasPropertyKey(r,at)||i.HasPropertyKey(r,kt)||i.HasPropertyKey(r,Ce)?[t[0],p.Assign(t[1],r)]:[p.Assign(t[0],r),t[1]],[{},{}])}function tp(e){return ep(e[1])}function rp(e){let[t,r]=e,n=i.IsEqual(i.Keys(r).length,0)?{}:{patternProperties:r};return $(t,n)}function np(e){return i.IsEqual(e.length,5)?qe(ze(e[4])):i.IsEqual(e.length,3)?e[2]:i.IsEqual(e.length,4)?i.IsEqual(e[2],"readonly")?qe(e[3]):ze(e[3]):It()}function ap(e){if(!i.IsArray(e)||!i.IsEqual(e.length,3))return e;let[t,r,n]=e;return t&&n?qe(ze(r)):t&&!n?qe(r):!t&&n?ze(r):r}function op(e){return i.IsEqual(e.length,2)?Jt(e[1]):i.IsEqual(e.length,1)?e[0]:It()}function ip(e){return Ve(e)}function sp(e){return X(e[1])}function mp(e){return qe(ze(e[4]))}function pp(e){return qe(e[3])}function up(e){return ze(e[3])}function cp(e){return e[2]}function lp(e){return i.IsEqual(e.length,2)?Jt(e[1]):i.IsEqual(e.length,1)?e[0]:It()}function fp(e){return Ve(e)}function dp(e){return Xe(e[1],e[4])}function xp(e){return Qe(e[2],e[5])}function Ys(e,t){return i.IsEqual(e,"remove")?xi(t):i.IsEqual(e,"add")?qe(t):t}function Ip(e){return i.IsEqual(e.length,2)&&i.IsEqual(e[0],"-")?"remove":i.IsEqual(e.length,2)&&i.IsEqual(e[0],"+")||i.IsEqual(e.length,1)?"add":"none"}function em(e,t){return i.IsEqual(e,"remove")?Ii(t):i.IsEqual(e,"add")?ze(t):t}function yp(e){return i.IsEqual(e.length,2)&&i.IsEqual(e[0],"-")?"remove":i.IsEqual(e.length,2)&&i.IsEqual(e[0],"+")||i.IsEqual(e.length,1)?"add":"none"}function $p(e){return i.IsEqual(e.length,2)?[e[1]]:[]}function gp(e){return i.IsArray(e[6])&&i.IsEqual(e[6].length,1)?ar(zn(e[3]),e[5],e[6][0],Ys(e[1],em(e[8],e[10]))):ar(zn(e[3]),e[5],lt(e[3]),Ys(e[1],em(e[8],e[10])))}function Tp(e){return lt(e)}function bp(e){return BigInt(e)}function hp(e){return parseFloat(e)}function Ep(e){return i.IsEqual(e,"true")}function kp(e){return null}function Op(e){return{[e[0]]:e[2]}}function Pp(e){return Ve(e)}function nx(e){return e.reduce((t,r)=>p.Assign(t,r),{})}function Mp(e){return nx(e[1])}function vp(e){return Ve(e)}function Rp(e){return e[1]}function Cp(e){return Gn()}function wp(e){return Fe()}function jp(e){return ke()}function Sp(e){return zt()}function qp(e){return F()}function Lp(e){return v(e)}function Fp(e){return E(e[1])}function Ap(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Dp(e){return[e[0],...e[1]]}function Kp(e){return e[1]}function Up(e){return Ve(e)}function Np(e){return i.IsEqual(e.length,2)?e[1]:[]}function Gp(e){let t=e[2],r=e[3],[n,a]=e[4],s=i.IsEqual(i.Keys(a).length,0)?{}:{patternProperties:a};return{[e[1]]:gt(t,tr(r,n,s))}}function zp(e){let t=e[2],[r,n]=e[3],a=i.IsEqual(i.Keys(n).length,0)?{}:{patternProperties:n};return{[e[1]]:tr(t,r,a)}}function Bp(e){return{[e[1]]:gt(e[2],e[4])}}function _p(e){return{[e[1]]:e[3]}}function Wp(e){return null}function Hp(e){return Ve(e)}function Vp(e){return e[1]}function Zp(e){let[t,r]=[e[0],e[1]];return hs(p.Assign(t,ep(r)[0]))}function mr(e){return P(e.length,2)}function k(e,t,r){return mr(e)?t(e[0],e[1]):r()}function ox(e,t){return P(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function K(e,t){for(let r=0;r<e.length;r++){let n=ox(e[r],t);if(mr(n))return n}return[]}function ga(e,t){return Array.from({length:t-e+1},(r,n)=>String.fromCharCode(e+n))}var Jp=[...ga(97,122),...ga(65,90)],Ta="0",ba=ga(49,57),St=[Ta,...ba],Qp=" ",qt=`
|
|
2
|
+
`;var st="_",gn=".",Xp="$",Tn="-";var Yp="//",eu="/*",sx="*/";function tu(e){let t=e.indexOf(sx);return P(t,-1)?"":e.slice(t+2)}function ru(e){let t=e.indexOf(qt);return P(t,-1)?"":e.slice(t)}function mx(e){return e.replace(/^[ \t\r\f\v]+/,"")}function bn(e){let t=mx(e);return t.startsWith(eu)?bn(tu(t.slice(2))):t.startsWith(Yp)?bn(ru(t.slice(2))):t}function ee(e){let t=e.trimStart();return t.startsWith(eu)?ee(tu(t.slice(2))):t.startsWith(Yp)?ee(ru(t.slice(2))):t}function hn(e,t){return k(K([e],t),(r,n)=>[r,n],()=>["",t])}function px(e,t){return e.includes(t)}function Lt(e,t,r,n=""){return k(K(e,r),(a,s)=>px(t,a)?Lt(e,t,s,n):Lt(e,t,s,`${n}${a}`),()=>[n,r])}function ux(e){return K(ba,e)}var cx=[...St,st];function lx(e){return Lt(cx,[st],e)}function fx(e){return k(K([Ta],e),(t,r)=>[t,r],()=>k(ux(e),(t,r)=>k(lx(r),(n,a)=>[`${t}${n}`,a],()=>[]),()=>[]))}function En(e){return fx(ee(e))}function dx(e){return hn(Tn,e)}function xx(e){return k(dx(e),(t,r)=>k(En(r),(n,a)=>[`${t}${n}`,a],()=>[]),()=>[])}function nu(e){return xx(ee(e))}function Ix(e){return k(nu(e),(t,r)=>k(K(["n"],r),(n,a)=>[`${t}`,a],()=>[]),()=>[])}function ha(e){return Ix(e)}function Ea(e,t){return K([e],t)}function u(e,t){return P(e,"")?["",t]:e.startsWith(qt)?Ea(e,bn(t)):e.startsWith(Qp)?Ea(e,t):Ea(e,ee(t))}var au=[...Jp,st,Xp];function yx(e){return K(au,e)}var $x=[...au,...St];function ou(e,t=""){return k(K($x,e),(r,n)=>ou(n,`${t}${r}`),()=>[t,e])}function gx(e){return k(yx(e),(t,r)=>k(ou(r),(n,a)=>[`${t}${n}`,a],()=>[]),()=>[])}function G(e){return gx(ee(e))}var Tx=[...St,st];function bx(e){return mr(K([gn],e))}function iu(e){return k(Lt(Tx,[st],e),(t,r)=>P(t,"")?[]:[t,r],()=>[])}function hx(e){return k(K([gn],e),(t,r)=>k(iu(r),(n,a)=>[`0${t}${n}`,a],()=>[]),()=>[])}function Ex(e){return k(En(e),(t,r)=>k(K([gn],r),(n,a)=>k(iu(a),(s,m)=>[`${t}${n}${s}`,m],()=>[`${t}`,a]),()=>[`${t}`,r]),()=>[])}function kx(e){return bx(e)?hx(e):Ex(e)}function su(e){return kx(ee(e))}function Ox(e){return hn(Tn,e)}function Px(e){return k(Ox(e),(t,r)=>k(su(r),(n,a)=>[`${t}${n}`,a],()=>[]),()=>[])}function kn(e){return Px(ee(e))}function Mx(e){return P(e,"")?[]:[e.slice(0,1),e.slice(1)]}function mu(e,t){return hr(e,(r,n)=>t.startsWith(r)?!0:mu(n,t),()=>!1)}function mt(e,t,r=""){return k(Mx(t),(n,a)=>mu(e,t)?[r,t]:mt(e,a,`${r}${n}`),()=>[])}function vx(e,t,r){return k(K([e],r),(n,a)=>k(mt([t],a),(s,m)=>k(K([t],m),(l,d)=>[`${s}`,d],()=>[]),()=>[]),()=>[])}function Rx(e,t,r){return k(K([e],r),(n,a)=>k(mt([qt,t],a),(s,m)=>k(K([t],m),(l,d)=>[`${s}`,d],()=>[]),()=>[]),()=>[])}function pu(e,t,r,n){return r?vx(e,t,ee(n)):Rx(e,t,ee(n))}function Cx(e,t){return K(e,t)}function wx(e,t){return pu(e,e,!1,t)}function jx(e,t){return k(Cx(e,t),(r,n)=>wx(r,`${r}${n}`),()=>[])}function On(e,t){return jx(e,ee(t))}function uu(e,t){return k(mt(e,t),(r,n)=>P(r,"")?[]:[r,n],()=>[])}var o=(e,t,r=()=>[])=>e.length===2?t(e):r(),qx=e=>o(o(G(e),([t,r])=>o(u("extends",r),([n,a])=>o(R(a),([s,m])=>o(u("=",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[rm(t),r]),Lx=e=>o(o(G(e),([t,r])=>o(u("extends",r),([n,a])=>o(R(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[nm(t),r]),Fx=e=>o(o(G(e),([t,r])=>o(u("=",r),([n,a])=>o(R(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[am(t),r]),Ax=e=>o(G(e),([t,r])=>[om(t),r]),fu=e=>o(o(qx(e),([t,r])=>[t,r],()=>o(Lx(e),([t,r])=>[t,r],()=>o(Fx(e),([t,r])=>[t,r],()=>o(Ax(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),du=(e,t=[])=>o(o(u(",",e),([r,n])=>o(fu(n),([a,s])=>[[r,a],s])),([r,n])=>du(n,[...t,r]),()=>[t,e]),Dx=e=>o(o(o(fu(e),([t,r])=>o(du(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[im(t),r]),Pa=e=>o(o(u("<",e),([t,r])=>o(Dx(r),([n,a])=>o(u(">",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[sm(t),r]),xu=(e,t=[])=>o(o(u(",",e),([r,n])=>o(R(n),([a,s])=>[[r,a],s])),([r,n])=>xu(n,[...t,r]),()=>[t,e]),Kx=e=>o(o(o(R(e),([t,r])=>o(xu(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[mm(t),r]),Ux=e=>o(o(u("<",e),([t,r])=>o(Kx(r),([n,a])=>o(u(">",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[pm(t),r]),Nx=e=>o(o(G(e),([t,r])=>o(Ux(r),([n,a])=>[[t,n],a])),([t,r])=>[um(t),r]),Iu=e=>o(o(o(u(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[cm(t),r]),yu=e=>o(u("string",e),([t,r])=>[lm(t),r]),$u=e=>o(u("number",e),([t,r])=>[fm(t),r]),Gx=e=>o(u("boolean",e),([t,r])=>[dm(t),r]),zx=e=>o(u("undefined",e),([t,r])=>[xm(t),r]),Bx=e=>o(u("null",e),([t,r])=>[Im(t),r]),gu=e=>o(u("integer",e),([t,r])=>[ym(t),r]),_x=e=>o(u("bigint",e),([t,r])=>[$m(t),r]),Wx=e=>o(u("unknown",e),([t,r])=>[gm(t),r]),Hx=e=>o(u("any",e),([t,r])=>[Tm(t),r]),Vx=e=>o(u("object",e),([t,r])=>[bm(t),r]),Zx=e=>o(u("never",e),([t,r])=>[hm(t),r]),Tu=e=>o(u("symbol",e),([t,r])=>[Em(t),r]),Jx=e=>o(u("void",e),([t,r])=>[km(t),r]),Qx=e=>o(u("this",e),([t,r])=>[Om(t),r]),Xx=e=>o(o(u("${",e),([t,r])=>o(R(r),([n,a])=>o(u("}",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Cm(t),r]),ka=e=>o(mt(["${","`"],e),([t,r])=>[wm(t),r]),bu=e=>o(o(o(ka(e),([t,r])=>o(Xx(r),([n,a])=>o(bu(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o(o(ka(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o(o(ka(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[jm(t),r]),Ma=e=>o(o(u("`",e),([t,r])=>o(bu(r),([n,a])=>o(u("`",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Sm(t),r]),Yx=e=>o(Ma(e),([t,r])=>[qm(t),r]),eI=e=>o(o(o(u("if",e),([t,r])=>o(R(r),([n,a])=>o(u("then",a),([s,m])=>o(R(m),([l,d])=>o(u("else",d),([L,C])=>o(R(C),([ae,ut])=>[[t,n,s,l,L,ae],ut])))))),([t,r])=>[t,r],()=>o(o(u("if",e),([t,r])=>o(R(r),([n,a])=>o(u("then",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[t,r],()=>[])),([t,r])=>[Lm(t),r]),tI=e=>o(ha(e),([t,r])=>[Pm(t),r]),rI=e=>o(o(u("true",e),([t,r])=>[t,r],()=>o(u("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Mm(t),r]),nI=e=>o(kn(e),([t,r])=>[vm(t),r]),aI=e=>o(On(["'",'"'],e),([t,r])=>[Rm(t),r]),oI=e=>o(o(o(u("keyof",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Fm(t),r]),hu=(e,t=[])=>o(o(o(u("[",e),([r,n])=>o(R(n),([a,s])=>o(u("]",s),([m,l])=>[[r,a,m],l]))),([r,n])=>[r,n],()=>o(o(u("[",e),([r,n])=>o(u("]",n),([a,s])=>[[r,a],s])),([r,n])=>[r,n],()=>[])),([r,n])=>hu(n,[...t,r]),()=>[t,e]),iI=e=>o(hu(e),([t,r])=>[Am(t),r]),sI=e=>o(o(o(u("extends",e),([t,r])=>o(R(r),([n,a])=>o(u("?",a),([s,m])=>o(R(m),([l,d])=>o(u(":",d),([L,C])=>o(R(C),([ae,ut])=>[[t,n,s,l,L,ae],ut])))))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Dm(t),r]),mI=e=>o(o(o(u("(",e),([t,r])=>o(R(r),([n,a])=>o(u(")",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o(yu(e),([t,r])=>[t,r],()=>o($u(e),([t,r])=>[t,r],()=>o(Gx(e),([t,r])=>[t,r],()=>o(zx(e),([t,r])=>[t,r],()=>o(Bx(e),([t,r])=>[t,r],()=>o(gu(e),([t,r])=>[t,r],()=>o(_x(e),([t,r])=>[t,r],()=>o(Wx(e),([t,r])=>[t,r],()=>o(Hx(e),([t,r])=>[t,r],()=>o(Vx(e),([t,r])=>[t,r],()=>o(Zx(e),([t,r])=>[t,r],()=>o(Tu(e),([t,r])=>[t,r],()=>o(Jx(e),([t,r])=>[t,r],()=>o(Qx(e),([t,r])=>[t,r],()=>o(tI(e),([t,r])=>[t,r],()=>o(rI(e),([t,r])=>[t,r],()=>o(nI(e),([t,r])=>[t,r],()=>o(aI(e),([t,r])=>[t,r],()=>o(Yx(e),([t,r])=>[t,r],()=>o(eI(e),([t,r])=>[t,r],()=>o(gI(e),([t,r])=>[t,r],()=>o(hI(e),([t,r])=>[t,r],()=>o(vI(e),([t,r])=>[t,r],()=>o(MI(e),([t,r])=>[t,r],()=>o(jI(e),([t,r])=>[t,r],()=>o(Nx(e),([t,r])=>[t,r],()=>o(SI(e),([t,r])=>[t,r],()=>[])))))))))))))))))))))))))))),([t,r])=>[Km(t),r]),pI=e=>o(o(o(u("with",e),([t,r])=>o(Ku(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Um(t),r]),Eu=e=>o(o(oI(e),([t,r])=>o(mI(r),([n,a])=>o(iI(a),([s,m])=>o(sI(m),([l,d])=>o(pI(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[Nm(t),r]),ku=e=>o(o(o(u("&",e),([t,r])=>o(Eu(r),([n,a])=>o(ku(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Ou=e=>o(o(Eu(e),([t,r])=>o(ku(r),([n,a])=>[[t,n],a])),([t,r])=>[Gm(t),r]),Pu=e=>o(o(o(u("|",e),([t,r])=>o(Ou(r),([n,a])=>o(Pu(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Pn=e=>o(o(Ou(e),([t,r])=>o(Pu(r),([n,a])=>[[t,n],a])),([t,r])=>[zm(t),r]),uI=e=>o(o(u("readonly",e),([t,r])=>o(Pn(r),([n,a])=>[[t,n],a])),([t,r])=>[Bm(t),r]),cI=e=>o(o(u("|",e),([t,r])=>o(Pn(r),([n,a])=>[[t,n],a])),([t,r])=>[_m(t),r]),lI=e=>o(o(Pa(e),([t,r])=>o(u("=",r),([n,a])=>o(R(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Wm(t),r]),fI=e=>o(o(o(u("infer",e),([t,r])=>o(G(r),([n,a])=>o(u("extends",a),([s,m])=>o(Pn(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[t,r],()=>o(o(u("infer",e),([t,r])=>o(G(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>[])),([t,r])=>[Hm(t),r]),R=e=>o(o(fI(e),([t,r])=>[t,r],()=>o(cI(e),([t,r])=>[t,r],()=>o(uI(e),([t,r])=>[t,r],()=>o(Pn(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),dI=e=>o(kn(e),([t,r])=>[Vm(t),r]),xI=e=>o(G(e),([t,r])=>[t,r]),II=e=>o(On(["'",'"'],e),([t,r])=>[t,r]),yI=e=>o(o(u("[",e),([t,r])=>o(G(r),([n,a])=>o(u(":",a),([s,m])=>o(o(gu(m),([l,d])=>[l,d],()=>o($u(m),([l,d])=>[l,d],()=>o(yu(m),([l,d])=>[l,d],()=>o(Tu(m),([l,d])=>[l,d],()=>[])))),([l,d])=>o(u("]",d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[Zm(t),r]),Mu=e=>o(o(dI(e),([t,r])=>[t,r],()=>o(xI(e),([t,r])=>[t,r],()=>o(II(e),([t,r])=>[t,r],()=>o(yI(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),vu=e=>o(o(o(u("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Jm(t),r]),Ru=e=>o(o(o(u("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Qm(t),r]),Cu=e=>o(o(vu(e),([t,r])=>o(Mu(r),([n,a])=>o(Ru(a),([s,m])=>o(u(":",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[Xm(t),r]),Mn=e=>o(o(o(u(",",e),([t,r])=>o(u(`
|
|
3
|
+
`,r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u(";",e),([t,r])=>o(u(`
|
|
4
|
+
`,r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u(",",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o(o(u(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o(o(u(`
|
|
5
|
+
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),wu=(e,t=[])=>o(o(Mn(e),([r,n])=>o(Cu(n),([a,s])=>[[r,a],s])),([r,n])=>wu(n,[...t,r]),()=>[t,e]),$I=e=>o(o(o(Cu(e),([t,r])=>o(wu(r),([n,a])=>o(o(Mn(a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Ym(t),r]),va=e=>o(o(u("{",e),([t,r])=>o($I(r),([n,a])=>o(u("}",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[tp(t),r]),gI=e=>o(va(e),([t,r])=>[rp(t),r]),TI=e=>o(o(o(G(e),([t,r])=>o(u("?",r),([n,a])=>o(u(":",a),([s,m])=>o(u("readonly",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[t,r],()=>o(o(G(e),([t,r])=>o(u(":",r),([n,a])=>o(u("readonly",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[t,r],()=>o(o(G(e),([t,r])=>o(u("?",r),([n,a])=>o(u(":",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[t,r],()=>o(o(G(e),([t,r])=>o(u(":",r),([n,a])=>o(R(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>[])))),([t,r])=>[np(t),r]),cu=e=>o(o(TI(e),([t,r])=>[t,r],()=>o(o(vu(e),([t,r])=>o(R(r),([n,a])=>o(Ru(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>[])),([t,r])=>[ap(t),r]),ju=e=>o(o(o(u("...",e),([t,r])=>o(cu(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(cu(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[op(t),r]),Su=(e,t=[])=>o(o(u(",",e),([r,n])=>o(ju(n),([a,s])=>[[r,a],s])),([r,n])=>Su(n,[...t,r]),()=>[t,e]),bI=e=>o(o(o(ju(e),([t,r])=>o(Su(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ip(t),r]),hI=e=>o(o(u("[",e),([t,r])=>o(bI(r),([n,a])=>o(u("]",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[sp(t),r]),EI=e=>o(o(G(e),([t,r])=>o(u("?",r),([n,a])=>o(u(":",a),([s,m])=>o(u("readonly",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[mp(t),r]),kI=e=>o(o(G(e),([t,r])=>o(u(":",r),([n,a])=>o(u("readonly",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[pp(t),r]),OI=e=>o(o(G(e),([t,r])=>o(u("?",r),([n,a])=>o(u(":",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[up(t),r]),PI=e=>o(o(G(e),([t,r])=>o(u(":",r),([n,a])=>o(R(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[cp(t),r]),lu=e=>o(o(EI(e),([t,r])=>[t,r],()=>o(kI(e),([t,r])=>[t,r],()=>o(OI(e),([t,r])=>[t,r],()=>o(PI(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),qu=e=>o(o(o(u("...",e),([t,r])=>o(lu(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(lu(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[lp(t),r]),Lu=(e,t=[])=>o(o(u(",",e),([r,n])=>o(qu(n),([a,s])=>[[r,a],s])),([r,n])=>Lu(n,[...t,r]),()=>[t,e]),Fu=e=>o(o(o(qu(e),([t,r])=>o(Lu(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[fp(t),r]),MI=e=>o(o(u("(",e),([t,r])=>o(Fu(r),([n,a])=>o(u(")",a),([s,m])=>o(u("=>",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[dp(t),r]),vI=e=>o(o(u("new",e),([t,r])=>o(u("(",r),([n,a])=>o(Fu(a),([s,m])=>o(u(")",m),([l,d])=>o(u("=>",d),([L,C])=>o(R(C),([ae,ut])=>[[t,n,s,l,L,ae],ut])))))),([t,r])=>[xp(t),r]),RI=e=>o(o(o(u("+",e),([t,r])=>o(u("readonly",r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u("-",e),([t,r])=>o(u("readonly",r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[Ip(t),r]),CI=e=>o(o(o(u("+",e),([t,r])=>o(u("?",r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u("-",e),([t,r])=>o(u("?",r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[yp(t),r]),wI=e=>o(o(o(u("as",e),([t,r])=>o(R(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[$p(t),r]),jI=e=>o(o(u("{",e),([t,r])=>o(RI(r),([n,a])=>o(u("[",a),([s,m])=>o(G(m),([l,d])=>o(u("in",d),([L,C])=>o(R(C),([ae,ut])=>o(wI(ut),([Wc,Hc])=>o(u("]",Hc),([Vc,Zc])=>o(CI(Zc),([Jc,Qc])=>o(u(":",Qc),([Xc,Yc])=>o(R(Yc),([el,tl])=>o(Iu(tl),([rl,nl])=>o(u("}",nl),([al,ol])=>[[t,n,s,l,L,ae,Wc,Vc,Jc,Xc,el,rl,al],ol]))))))))))))),([t,r])=>[gp(t),r]),SI=e=>o(G(e),([t,r])=>[Tp(t),r]),qI=e=>o(ha(e),([t,r])=>[bp(t),r]),LI=e=>o(kn(e),([t,r])=>[hp(t),r]),FI=e=>o(o(u("true",e),([t,r])=>[t,r],()=>o(u("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Ep(t),r]),AI=e=>o(On(['"',"'"],e),([t,r])=>[t,r]),DI=e=>o(u("null",e),([t,r])=>[kp(t),r]),KI=e=>o(u("undefined",e),([t,r])=>[void 0,r]),Au=e=>o(o(Mu(e),([t,r])=>o(u(":",r),([n,a])=>o(Ra(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Op(t),r]),Du=(e,t=[])=>o(o(Mn(e),([r,n])=>o(Au(n),([a,s])=>[[r,a],s])),([r,n])=>Du(n,[...t,r]),()=>[t,e]),UI=e=>o(o(o(Au(e),([t,r])=>o(Du(r),([n,a])=>o(o(Mn(a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Pp(t),r]),Ku=e=>o(o(u("{",e),([t,r])=>o(UI(r),([n,a])=>o(u("}",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Mp(t),r]),Uu=(e,t=[])=>o(o(u(",",e),([r,n])=>o(Ra(n),([a,s])=>[[r,a],s])),([r,n])=>Uu(n,[...t,r]),()=>[t,e]),NI=e=>o(o(o(Ra(e),([t,r])=>o(Uu(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[vp(t),r]),GI=e=>o(o(u("[",e),([t,r])=>o(NI(r),([n,a])=>o(u("]",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Rp(t),r]),Ra=e=>o(o(qI(e),([t,r])=>[t,r],()=>o(LI(e),([t,r])=>[t,r],()=>o(FI(e),([t,r])=>[t,r],()=>o(AI(e),([t,r])=>[t,r],()=>o(DI(e),([t,r])=>[t,r],()=>o(KI(e),([t,r])=>[t,r],()=>o(Ku(e),([t,r])=>[t,r],()=>o(GI(e),([t,r])=>[t,r],()=>[])))))))),([t,r])=>[t,r]),zI=e=>o(u("-?(?:0|[1-9][0-9]*)n",e),([t,r])=>[Cp(t),r]),BI=e=>o(u(".*",e),([t,r])=>[wp(t),r]),_I=e=>o(u("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?",e),([t,r])=>[jp(t),r]),WI=e=>o(u("-?(?:0|[1-9][0-9]*)",e),([t,r])=>[Sp(t),r]),HI=e=>o(u("(?!)",e),([t,r])=>[qp(t),r]),VI=e=>o(uu(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,r])=>[Lp(t),r]),ZI=e=>o(o(zI(e),([t,r])=>[t,r],()=>o(BI(e),([t,r])=>[t,r],()=>o(_I(e),([t,r])=>[t,r],()=>o(WI(e),([t,r])=>[t,r],()=>o(HI(e),([t,r])=>[t,r],()=>o(JI(e),([t,r])=>[t,r],()=>o(VI(e),([t,r])=>[t,r],()=>[]))))))),([t,r])=>[t,r]),JI=e=>o(o(u("(",e),([t,r])=>o(Ca(r),([n,a])=>o(u(")",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Fp(t),r]),Nu=e=>o(o(o(Oa(e),([t,r])=>o(u("|",r),([n,a])=>o(Nu(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o(o(Oa(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[]))),([t,r])=>[Ap(t),r]),Oa=e=>o(o(ZI(e),([t,r])=>o(Ca(r),([n,a])=>[[t,n],a])),([t,r])=>[Dp(t),r]),Ca=e=>o(o(Nu(e),([t,r])=>[t,r],()=>o(Oa(e),([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),wo=e=>o(o(u("^",e),([t,r])=>o(Ca(r),([n,a])=>o(u("$",a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Kp(t),r]),Gu=(e,t=[])=>o(o(u(",",e),([r,n])=>o(R(n),([a,s])=>[[r,a],s])),([r,n])=>Gu(n,[...t,r]),()=>[t,e]),QI=e=>o(o(o(R(e),([t,r])=>o(Gu(r),([n,a])=>o(o(u(",",a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Up(t),r]),zu=e=>o(o(o(u("extends",e),([t,r])=>o(QI(r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Np(t),r]),XI=e=>o(o(u("interface",e),([t,r])=>o(G(r),([n,a])=>o(Pa(a),([s,m])=>o(zu(m),([l,d])=>o(va(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[Gp(t),r]),YI=e=>o(o(u("interface",e),([t,r])=>o(G(r),([n,a])=>o(zu(a),([s,m])=>o(va(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[zp(t),r]),ey=e=>o(o(u("type",e),([t,r])=>o(G(r),([n,a])=>o(Pa(a),([s,m])=>o(u("=",m),([l,d])=>o(R(d),([L,C])=>[[t,n,s,l,L],C]))))),([t,r])=>[Bp(t),r]),ty=e=>o(o(u("type",e),([t,r])=>o(G(r),([n,a])=>o(u("=",a),([s,m])=>o(R(m),([l,d])=>[[t,n,s,l],d])))),([t,r])=>[_p(t),r]),ry=e=>o(o(o(u("export",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Wp(t),r]),Bu=e=>o(o(o(u(";",e),([t,r])=>o(u(`
|
|
6
|
+
`,r),([n,a])=>[[t,n],a])),([t,r])=>[t,r],()=>o(o(u(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>o(o(u(`
|
|
7
|
+
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),_u=(e,t=[])=>o(o(Bu(e),([r,n])=>o(wa(n),([a,s])=>[[r,a],s])),([r,n])=>_u(n,[...t,r]),()=>[t,e]),ny=e=>o(o(o(wa(e),([t,r])=>o(_u(r),([n,a])=>o(o(Bu(a),([s,m])=>[[s],m],()=>[[],a]),([s,m])=>[[t,n,s],m]))),([t,r])=>[t,r],()=>o([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Hp(t),r]),wa=e=>o(o(ry(e),([t,r])=>o(o(XI(r),([n,a])=>[n,a],()=>o(YI(r),([n,a])=>[n,a],()=>o(ey(r),([n,a])=>[n,a],()=>o(ty(r),([n,a])=>[n,a],()=>[])))),([n,a])=>o(Iu(a),([s,m])=>[[t,n,s],m]))),([t,r])=>[Vp(t),r]),ay=e=>o(o(wa(e),([t,r])=>o(ny(r),([n,a])=>[[t,n],a])),([t,r])=>[Zp(t),r]),Wu=e=>o(o(ay(e),([t,r])=>[t,r],()=>o(lI(e),([t,r])=>[t,r],()=>o(R(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function Hu(e){let t=Ma(`\`${e}\``);return i.IsEqual(t.length,2)?t[0]:W()}function iy(e){return e.join("|")}function sy(e){return e.slice(1,e.length-1)}function my(e,t,r){return pt(t,`${r}${e}`)}function py(e,t){return pt(e,`${t}${Po}`)}function uy(e,t){return pt(e,`${t}${qr}`)}function cy(e,t){return pt(e,`${t}${Dr}`)}function ly(e,t){return pr(E([v("false"),v("true")]),e,t)}function fy(e,t){return pt(e,`${t}${Ur}`)}function dy(e,t,r){return pt(t,`${r}${sy(e)}`)}function xy(e,t,r){let n=ur(e,{});return pr(n,t,r)}function Iy(e,t,r){let n=ce(e);return pr(n,t,r)}function Vu(e,t,r,n=[]){return i.ShiftLeft(e,(a,s)=>Vu(s,t,r,[...n,pr(a,[],"")]),()=>pt(t,`${r}(${iy(n)})`))}function pr(e,t,r){return pe(e)?Iy(e.enum,t,r):Ie(e)?uy(t,r):w(e)?my(e.const,t,r):tt(e)?py(t,r):Le(e)?ly(t,r):Q(e)?cy(t,r):ye(e)?fy(t,r):H(e)?dy(e.pattern,t,r):Ju(e)?xy(e.parameters[0],t,r):y(e)?Vu(e.anyOf,t,r):no}function pt(e,t){return i.ShiftLeft(e,(r,n)=>pr(r,n,t),()=>t)}function yy(e){return`^${pt(e,"")}$`}function Zu(e){let t=yy(e);return Gr(t)}function ur(e,t){return b(e)?p.Update(Zu(e),{},t):$n(e,t)}function Qu(e,t,r,n){let a=Ee(e,t,r);return ur(a,n)}function $n(e,t={}){return I("TemplateLiteral",[e],t)}function Ju(e){return Y(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"TemplateLiteral")}function Xu(e){return ur(e,{})}function $y(e){let t=Hu(e);return Xu(t)}function PN(e,t={}){let r=i.IsString(e)?$y(e):Xu(e);return p.Update(r,{},t)}function H(e){return x(e,"TemplateLiteral")}var g={};ct(g,{ExtendsFalse:()=>T,ExtendsTrue:()=>f,ExtendsUnion:()=>ja,IsExtendsFalse:()=>gy,IsExtendsTrue:()=>ec,IsExtendsTrueLike:()=>Be,IsExtendsUnion:()=>Yu,Match:()=>z});function ja(e){return p.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Yu(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsUnion")&&i.IsObject(e.inferred)}function f(e){return p.Create({"~kind":"ExtendsTrue"},{inferred:e})}function ec(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsTrue")&&i.IsObject(e.inferred)}function T(){return p.Create({"~kind":"ExtendsFalse"},{})}function gy(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.IsEqual(e["~kind"],"ExtendsFalse")}function Be(e){return Yu(e)||ec(e)}function z(e,t,r){return Be(e)?t(e.inferred):r()}function Ty(e,t,r,n){return z(O(e,r,n),a=>f(p.Assign(p.Assign(e,a),{[t]:r})),()=>T())}function by(e,t){return f(e)}function hy(e,t,r,n,a){return z(O(e,t,r),s=>z(O(s,t,n),m=>f(m),()=>T()),()=>z(O(e,t,a),s=>f(s),()=>T()))}function Ey(e,t,r){let n=ce(r);return O(e,t,n)}function tc(e,t,r){return i.ShiftLeft(r,(n,a)=>z(O(e,t,n),s=>tc(s,t,a),()=>T()),()=>f(e))}function ky(e,t,r){let n=se(r);return O(e,t,n)}function rc(e,t,r){return i.ShiftLeft(r,(n,a)=>z(O(e,t,n),s=>f(s),()=>rc(e,t,a)),()=>T())}function j(e,t,r){return B(r)?by(e,t):_(r)?hy(e,t,r.if,r.then,r.else):pe(r)?Ey(e,t,r.enum):Z(r)?Ty(e,r.name,t,r.extends):M(r)?tc(e,t,r.allOf):H(r)?ky(e,t,r.pattern):y(r)?rc(e,t,r.anyOf):V(r)?f(e):T()}function nc(e,t,r){return Z(r)?j(e,t,r):B(r)?f(e):V(r)?f(e):ja(e)}function Oy(e,t){let r=Gt(e),n=Gt(t);return r&&n||!r&&n?!0:!(r&&!n)}function ac(e,t,r,n){return U(n)?Oy(t,n)?O(e,r,n.items):T():j(e,t,n)}function oc(e,t,r){return tt(r)?f(e):j(e,t,r)}function ic(e,t,r){return Le(r)?f(e):j(e,t,r)}function Py(e,t,r,n,a){let s=Z(n)?t:n,m=Z(n)?n:t,l=oe(t),d=oe(n);return!l&&d?T():z(O(e,s,m),L=>cr(L,r,a),()=>T())}function My(e,t,r,n){return i.ShiftLeft(n,(a,s)=>Py(e,t,r,a,s),()=>oe(t)?f(e):T())}function vy(e,t,r){return i.ShiftLeft(t,(n,a)=>My(e,n,a,r),()=>f(e))}function cr(e,t,r){return vy(e,t,r)}function vn(e,t,r){return ot(r)?f(e):O(e,t,r)}function sc(e,t,r,n){return B(n)?f(e):V(n)?f(e):te(n)?z(cr(e,t,n.parameters),a=>vn(a,r,n.instanceType),()=>T()):T()}function mc(e,t,r,n,a){return z(O(e,t,a),()=>O(e,r,a),()=>O(e,n,a))}function pc(e,t,r){let n=ce(t);return O(e,n,r)}function uc(e,t,r,n){return B(n)?f(e):V(n)?f(e):re(n)?z(cr(e,t,n.parameters),a=>vn(a,r,n.returnType),()=>T()):T()}function cc(e,t,r){return Ie(r)?f(e):Q(r)?f(e):j(e,t,r)}function lc(e,t,r){let n=N(t);return O(e,n,r)}function Rn(e,t,r){return t===r?f(e):T()}function Ry(e,t,r){return w(r)?Rn(e,t,r.const):tt(r)?f(e):j(e,v(t),r)}function Cy(e,t,r){return w(r)?Rn(e,t,r.const):Le(r)?f(e):j(e,v(t),r)}function wy(e,t,r){return w(r)?Rn(e,t,r.const):Q(r)?f(e):j(e,v(t),r)}function jy(e,t,r){return w(r)?Rn(e,t,r.const):ye(r)?f(e):j(e,v(t),r)}function fc(e,t,r){return i.IsBigInt(t.const)?Ry(e,t.const,r):i.IsBoolean(t.const)?Cy(e,t.const,r):i.IsNumber(t.const)?wy(e,t.const,r):i.IsString(t.const)?jy(e,t.const,r):W()}function dc(e,t,r){return Z(r)?j(e,t,r):f(e)}function xc(e,t,r){return Ar(r)?f(e):j(e,t,r)}function Ic(e,t,r){return Q(r)?f(e):j(e,t,r)}function Sy(e,t,r){return oe(t)?oe(r)?f(e):T():f(e)}function qy(e,t,r){return Z(r)&&We(r.extends)?T():z(O(e,t,r),n=>Sy(n,t,r),()=>T())}function Ly(e,t){return e.reduce((r,n)=>n in t?Be(t[n])?h(h({},r),t[n].inferred):W():W(),{})}function Fy(e,t,r){let n={};for(let m of i.Keys(r))n[m]=m in t?qy({},t[m],r[m]):oe(r[m])?Z(r[m])?f(p.Assign(e,{[r[m].name]:r[m].extends})):f(e):T();let a=i.Values(n).every(m=>Be(m)),s=a?Ly(i.Keys(n),n):{};return a?f(s):T()}function Ay(e,t,r){let n=Fy(e,t,r);return Be(n)?f(p.Assign(e,n.inferred)):T()}function Dy(e,t,r){return Ay(e,t,r)}function Ky(e,t){return i.Keys(t).reduce((r,n)=>q(h({},r),{[n]:i.HasPropertyKey(e,n)?y(r[n])?E([...r[n].anyOf,t[n]]):E([e[n],t[n]]):t[n]}),e)}function yc(e,t,r,n){return i.ShiftLeft(t,(a,s)=>z(O({},e[a],r),m=>yc(e,s,r,Ky(n,m)),()=>T()),()=>f(n))}function Uy(e,t,r,n){let a=i.Keys(t);return yc(t,a,n,e)}function $c(e,t,r){return le(r)?Uy(e,t,De(r),$e(r)):S(r)?Dy(e,t,r.properties):j(e,$(t),r)}function Ny(e,t){return i.IsEqual(i.Keys(t).length,0)?f(e):T()}function Gy(e,t,r,n,a){return O(e,r,a)}function gc(e,t,r,n){return le(n)?Gy(e,Wr(t),r,Wr(De(n)),$e(n)):S(n)?Ny(e,n.properties):B(n)?f(e):V(n)?f(e):T()}function Tc(e,t,r){return ye(r)?f(e):j(e,t,r)}function bc(e,t,r){return bt(r)?f(e):j(e,t,r)}function hc(e,t,r){let n=se(t);return O(e,n,r)}function Sa(e,t){return p.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function lr(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"name")&&i.HasPropertyKey(e,"type")&&i.IsEqual(e["~kind"],"Inferrable")&&i.IsString(e.name)&&i.IsObject(e.type)}function qa(e){return Pt(e)?Z(e.items)?U(e.items.extends)?Sa(e.items.name,e.items.extends.items):V(e.items.extends)?Sa(e.items.name,e.items.extends):void 0:W():void 0}function Cn(e){return Z(e)?Sa(e.name,e.extends):void 0}function Ec(e,t){let r=[];for(let n of e){if(!Be(O({},n,t)))return;r.push(n)}return r}function kc(e,t,r,n){let a=Ec(r,n);return i.IsArray(a)?f(p.Assign(e,{[t]:X(a)})):T()}function wn(e,t,r,n){let a=Ec(r,n);return i.IsArray(a)?f(p.Assign(e,{[t]:E(a)})):T()}function zy(e){return[...e].reverse()}function La(e,t){return t?zy(e):e}function By(e){let t=e.length>0?e[0]:void 0,r=Y(t)?qa(t):void 0;return Y(r)}function _y(e,t,r,n,a,s){return z(O(e,r,a),m=>Oc(m,t,n,s),()=>T())}function Wy(e,t,r,n,a){let s=qa(n);return lr(s)?kc(e,s.name,La(r,t),s.type):i.ShiftLeft(r,(m,l)=>_y(e,t,m,l,n,a),()=>T())}function Hy(e,t,r,n){return i.ShiftLeft(n,(a,s)=>Wy(e,t,r,a,s),()=>i.IsEqual(r.length,0)?f(e):T())}function Oc(e,t,r,n){return Hy(e,t,r,n)}function Vy(e,t,r){let n=it(e,D([],[]),r),a=By(n);return Oc(e,a,La(t,a),La(n,a))}function Zy(e,t,r){for(let n of t){let a=O(e,n,r);if(!Be(a))return a;e=a.inferred}return f(e)}function Jy(e,t,r){let n=Cn(r);return lr(n)?wn(e,n.name,t,n.type):Zy(e,t,r)}function Pc(e,t,r){let n=it(e,D([],[]),t);return A(r)?Vy(e,n,r.items):U(r)?Jy(e,n,r.items):j(e,X(n),r)}function Mc(e,t,r){return ot(r)?f(e):Zr(r)?f(e):j(e,t,r)}function vc(e,t,r){return i.ShiftLeft(r,(n,a)=>z(O(e,t,n),s=>f(s),()=>vc(e,t,a)),()=>T())}function Fa(e,t,r){return i.ShiftLeft(t,(n,a)=>z(vc(e,n,r),s=>Fa(s,a,r),()=>T()),()=>f(e))}function Rc(e,t,r){let n=Cn(r);return lr(n)?wn(e,n.name,t,n.type):y(r)?Fa(e,t,r.anyOf):Fa(e,t,[r])}function Cc(e,t,r){return Z(r)?j(e,t,r):B(r)?f(e):V(r)?f(e):T()}function wc(e,t,r){return ot(r)?f(e):j(e,t,r)}function O(e,t,r){return B(t)?nc(e,t,r):U(t)?ac(e,t,t.items,r):tt(t)?oc(e,t,r):Le(t)?ic(e,t,r):te(t)?sc(e,t.parameters,t.instanceType,r):_(t)?mc(e,t.if,t.then,t.else,r):pe(t)?pc(e,t.enum,r):re(t)?uc(e,t.parameters,t.returnType,r):Ie(t)?cc(e,t,r):M(t)?lc(e,t.allOf,r):w(t)?fc(e,t,r):We(t)?dc(e,t,r):Ar(t)?xc(e,t,r):Q(t)?Ic(e,t,r):S(t)?$c(e,t.properties,r):le(t)?gc(e,De(t),$e(t),r):ye(t)?Tc(e,t,r):bt(t)?bc(e,t,r):H(t)?hc(e,t.pattern,r):A(t)?Pc(e,t.items,r):Zr(t)?Mc(e,t,r):y(t)?Rc(e,t.anyOf,r):V(t)?Cc(e,t,r):ot(t)?wc(e,t,r):T()}function Qy(e){return Or()}function Xy(e){return i.Keys(e).reduce((t,r)=>q(h({},t),{[r]:yt(e[r])}),{})}function fr(e){return e.reduce((t,r)=>[...t,yt(r)],[])}function yt(e){return ne(e)?Qy(e.$ref):U(e)?Re(yt(e.items),Er(e)):te(e)?Qe(fr(e.parameters),yt(e.instanceType)):re(e)?Xe(fr(e.parameters),yt(e.returnType)):M(e)?be(fr(e.allOf)):S(e)?$(Xy(e.properties)):le(e)?mi(Hr(e),yt($e(e))):y(e)?E(fr(e.anyOf)):A(e)?X(fr(e.items)):e}function Yy(e,t){return t in e?yt(e[t]):ie()}function jc(e){return Yy(e.$defs,e.$ref)}function Sc(e){return me(e)?jc(e):mo(e)?ie():e}function ue(e,t,r){let n=Sc(t),a=Sc(r);return O(e,n,a)}var Wt=0,dr=1,Ht=2,Vt=3;function Et(e,t){let r=[ue({},e,t),ue({},t,e)];return g.IsExtendsTrueLike(r[0])&&g.IsExtendsTrueLike(r[1])?Wt:g.IsExtendsTrueLike(r[0])&&g.IsExtendsFalse(r[1])?Ht:g.IsExtendsFalse(r[0])&&g.IsExtendsTrueLike(r[1])?Vt:dr}function Aa(e,t,r=[],n=t){return i.ShiftLeft(t,(a,s)=>{let m=Et(e,a);return i.IsEqual(m,Ht)||i.IsEqual(m,Wt)?n:i.IsEqual(m,dr)?Aa(e,s,[...r,a],n):Aa(e,s,r,n)},()=>[...r,e])}function e$(e,t,r){let n=Oe(e);return B(n)?[n]:V(n)?[n]:We(n)?jn(t,r):S(n)?jn(t,[...r,n]):jn(t,Aa(n,r))}function jn(e,t=[]){return i.ShiftLeft(e,(r,n)=>e$(r,n,t),()=>t)}function Hn(e){let t=jn(e);return Ot(t)}function xr(e,t=[]){return Je(e)&&i.IsEqual(e.action,"Conditional")?ne(e.parameters[0])?xr(e.parameters[2],xr(e.parameters[3],[...t,e.parameters[0].$ref])):xr(e.parameters[2],xr(e.parameters[3],t)):Je(e)&&i.IsEqual(e.action,"Mapped")&&Je(e.parameters[1])&&i.IsEqual(e.parameters[1].action,"KeyOf")&&ne(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function t$(e,t){return e.reduce((r,n)=>[...r,t.includes(n.name)],[])}function Fc(e,t,r=[]){return i.ShiftLeft(e,(n,a)=>i.ShiftLeft(t,(s,m)=>Fc(a,m,[...r,[s,n]]),()=>r),()=>r)}function r$(e){return H(e)?se(e.pattern):pe(e)?ce(e.enum):e}function n$(e){let t=r$(e);return y(t)?[...t.anyOf]:[t]}function a$(e,t){return e.reduce((r,n)=>[...r,[...n,t]],[])}function qc(e,t){return t.reduce((r,n)=>[...r,...a$(e,n)],[])}function Lc(e){return e.reduce((t,r)=>i.IsEqual(r[0],!0)?qc(t,n$(r[1])):qc(t,[r[1]]),[[]])}function Ac(e,t,r){let n=xr(r),a=t$(e,n),s=Fc(t,a);return Je(r)&&i.IsEqual(r.action,"Conditional")||Je(r)&&i.IsEqual(r.action,"Mapped")?Lc(s):[t]}function o$(){return["(not-resolvable)",F()]}function i$(){return["(not-generic)",F()]}function s$(e,t,r){return[e,gt(t,r)]}function m$(e,t,r){return t in e?Dc(e,t,e[t],r):o$()}function Dc(e,t,r,n){return kr(r)?s$(t,r.parameters,r.expression):ne(r)?m$(e,r.$ref,n):i$()}function Kc(e,t,r){return Dc(e,"(anonymous)",t,r)}function p$(e,t,r){if(Z(t)||Sn(t)||g.IsExtendsTrueLike(ue({},t,r)))return;let n={parameter:e,expect:r,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:n})}function Uc(e,t,r,n,a){let s=c(e,t,a);return p$(r,s,n),p.Assign(e,{[r]:s})}function u$(e,t,r,n,a){let s=c(e,t,r.extends),m=c(e,t,r.equals);return i.ShiftLeft(a,(l,d)=>Da(Uc(e,t,r.name,s,l),t,n,d),()=>Da(Uc(e,t,r.name,s,m),t,n,[]))}function Da(e,t,r,n){return i.ShiftLeft(r,(a,s)=>u$(e,t,a,s,n),()=>e)}function Nc(e,t,r,n){return Da(e,t,r,n)}var Ka=0,Ua=0;function c$(){if(!i.IsLessThan(Ua,Me.Get().maxInstantiationCount))throw Error("Type instantiation is excessively deep and possibly infinite")}function l$(){c$(),Ua++,Ka++}function f$(){Ka--,i.IsEqual(Ka,0)&&(Ua=0)}function d$(e){return i.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function x$(e,t){return i.IsEqual(d$(e),t)}function I$(e,t,r,n,a,s){l$();try{let m=Nc(e,t,n,s),l=c(m,D([...t.callstack,r.$ref],t.visited),a);return c(m,D([],[]),l)}finally{f$()}}function y$(e,t,r,n,a,s){return s.reduce((m,l)=>{let d=I$(e,t,r,n,a,l);return[...m,d]},[])}function $$(e,t,r,n,a,s){let m=Ac(n,s,a),l=y$(e,t,r,n,a,m);return i.IsEqual(l.length,1)?l[0]:de(l)}function qn(e,t,r,n){let a=Ee(e,t,n),s=Kc(e,r,n),m=s[0],l=s[1];return kr(l)?x$(t,m)?sr(lt(m),a):$$(e,t,lt(m),l.parameters,l.expression,a):sr(r,a)}function sr(e,t){return p.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function z_(e,t){return qn({},D([],[]),e,t)}function Sn(e){return x(e,"Call")}function Gc(e,t,r,n){return t.visited.includes(n)?r:n in e?c(e,D(t.callstack,[...t.visited,n]),e[n]):r}function g$(e){return Pt(e)?A(e.items)?Na(e.items.items):Z(e.items)?[e]:ne(e.items)?[e]:[F()]:[e]}function Na(e){return e.reduce((r,n)=>[...r,...g$(n)],[])}function D(e,t){return{callstack:e,visited:t}}function b(e){return i.ShiftLeft(e,(t,r)=>ne(t)?!1:b(r),()=>!0)}function rr(e,t,r){return i.Keys(r).reduce((n,a)=>q(h({},n),{[a]:c(e,t,r[a])}),{})}function it(e,t,r){let n=Ee(e,t,r);return Na(n)}function Ee(e,t,r){return r.map(n=>c(e,t,n))}function T$(e,t){let r=oe(e)?Ae(t,{}):t,n=ft(e)?je(r,{}):r;return Gt(e)?Kt(n,{}):n}function b$(e,t,r,n,a){return i.IsEqual(r,"AddImmutable")?ao(e,t,n[0],a):i.IsEqual(r,"RemoveImmutable")?di(e,t,n[0],a):i.IsEqual(r,"AddReadonly")?oo(e,t,n[0],a):i.IsEqual(r,"RemoveReadonly")?Bo(e,t,n[0],a):i.IsEqual(r,"AddOptional")?zc(e,t,n[0],a):i.IsEqual(r,"RemoveOptional")?zo(e,t,n[0],a):i.IsEqual(r,"Capitalize")?hi(e,t,n[0],a):i.IsEqual(r,"Conditional")?Pi(e,t,n[0],n[1],n[2],n[3],a):i.IsEqual(r,"ConstructorParameters")?Mi(e,t,n[0],a):i.IsEqual(r,"Evaluate")?vi(e,t,n[0],a):i.IsEqual(r,"Exclude")?Ci(e,t,n[0],n[1],a):i.IsEqual(r,"Extract")?Si(e,t,n[0],n[1],a):i.IsEqual(r,"Index")?ns(e,t,n[0],n[1],a):i.IsEqual(r,"InstanceType")?as(e,t,n[0],a):i.IsEqual(r,"Interface")?os(e,t,n[0],n[1],a):i.IsEqual(r,"KeyOf")?ls(e,t,n[0],a):i.IsEqual(r,"Lowercase")?Ei(e,t,n[0],a):i.IsEqual(r,"Mapped")?xs(e,t,n[0],n[1],n[2],n[3],a):i.IsEqual(r,"Module")?sn(e,t,n[0],a):i.IsEqual(r,"NonNullable")?Es(e,t,n[0],a):i.IsEqual(r,"Pick")?qs(e,t,n[0],n[1],a):i.IsEqual(r,"Parameters")?Ps(e,t,n[0],a):i.IsEqual(r,"Partial")?js(e,t,n[0],a):i.IsEqual(r,"Omit")?Os(e,t,n[0],n[1],a):i.IsEqual(r,"ReadonlyObject")?Gs(e,t,n[0],a):i.IsEqual(r,"Record")?si(e,t,n[0],n[1],a):i.IsEqual(r,"Required")?Vs(e,t,n[0],a):i.IsEqual(r,"ReturnType")?Zs(e,t,n[0],a):i.IsEqual(r,"TemplateLiteral")?Qu(e,t,n[0],a):i.IsEqual(r,"Uncapitalize")?ki(e,t,n[0],a):i.IsEqual(r,"Uppercase")?Oi(e,t,n[0],a):i.IsEqual(r,"With")?Js(e,t,n[0],n[1]):I(r,n,a)}function h$(e,t,r){let n=ne(r)?Gc(e,t,r,r.$ref):U(r)?Re(c(e,t,r.items),Er(r)):Sn(r)?qn(e,t,r.target,r.arguments):te(r)?Qe(Ee(e,t,r.parameters),c(e,t,r.instanceType),to(r)):re(r)?Xe(Ee(e,t,r.parameters),c(e,t,r.returnType),ro(r)):_(r)?Ut(c(e,t,r.if),c(e,t,r.then),c(e,t,r.else),po(r)):M(r)?be(Ee(e,t,r.allOf),lo(r)):S(r)?$(rr(e,t,r.properties),so(r)):le(r)?pi(De(r),c(e,t,$e(r))):Pt(r)?Jt(c(e,t,r.items)):A(r)?X(it(e,t,r.items),No(r)):y(r)?E(Ee(e,t,r.anyOf),Co(r)):r;return T$(r,n)}function c(e,t,r){return Je(r)?b$(e,t,r.action,r.parameters,r.options):h$(e,t,r)}function E$(e,t){return c(e,D([],[]),t)}function Ae(e,t){return p.Update(e,{"~optional":!0},t)}function zc(e,t,r,n){let a=c(e,t,r);return Ae(a,n)}function ze(e,t={}){return I("AddOptional",[e],t)}function Pr(e,t={}){return Ae(e,t)}function k$(e,t){let r=Et(e,t);return i.IsEqual(r,Vt)||i.IsEqual(r,dr)?1:0}function Bc(e,t,r=[]){return i.ShiftLeft(t,(n,a)=>i.IsEqual(k$(e,n),1)?Bc(e,a,[...r,n]):[...r,e,...t],()=>[...r,e])}function _c(e,t=[]){return i.ShiftLeft(e,(r,n)=>_c(n,Bc(r,t)),()=>t)}function xW(e){return _c(e)}function uH(...e){let[t,r,n]=Se.Match(e,{2:(m,l)=>i.IsString(m)?[{},m,l]:[m,l,{}],3:(m,l,d)=>[m,l,d],1:m=>[{},m,{}]}),a=Wu(r),s=i.IsArray(a)&&i.IsEqual(a.length,2)?c(t,D([],[]),a[0]):F();return p.Update(s,{},n)}export{i as a,_e as b,O$ as c,af as d,Me as e,p as f,x as g,Y as h,Re as i,U as j,Er as k,Qe as l,te as m,Xe as n,re as o,lt as p,ne as q,gt as r,kr as s,Or as t,B as u,F as v,We as w,Hg as x,oe as y,$ as z,S as A,ie as B,V as C,Ye as D,me as E,fT as F,mo as G,Se as H,Dn as I,Z as J,Ut as K,_ as L,wT as M,jT as N,pe as O,be as P,M as Q,W as R,To as S,JT as T,Un as U,Nn as V,ko as W,Sh as X,qh as Y,Eo as Z,Gh as _,Gt as $,Jh as aa,ft as ba,rE as ca,Ff as da,Gn as ea,tt as fa,Mo as ga,Le as ha,zn as ia,lE as ja,zt as ka,Ie as la,v as ma,TE as na,bE as oa,vo as pa,Ro as qa,w as ra,Fr as sa,Ar as ta,ke as ua,Q as va,Kr as wa,bt as xa,Bt as ya,FE as za,Fe as Aa,ye as Ba,E as Ca,y as Da,Do as Ea,X as Fa,A as Ga,Ot as Ha,mi as Ia,De as Ja,Hr as Ka,$e as La,le as Ma,Jt as Na,Pt as Oa,ui as Pa,ci as Qa,Vr as Ra,Zr as Sa,li as Ta,ot as Ua,PN as Va,H as Wa,g as Xa,oS as Ya,ue as Za,z_ as _a,Sn as $a,Zv as ab,Rv as bb,Sv as cb,Av as db,iR as eb,$R as fb,LR as gb,JR as hb,Lj as ib,_j as jb,ZS as kb,hq as lb,SL as mb,eF as nb,lF as ob,QF as pb,dA as qb,Xd as rb,pD as sb,VD as tb,aK as ub,lK as vb,E$ as wb,PR as xb,bL as yb,xW as zb,uH as Ab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as r}from"./chunk-7FANVIZX.js";import{a as t}from"./chunk-
|
|
1
|
+
import{f as r}from"./chunk-7FANVIZX.js";import{a as t}from"./chunk-MWETYHR7.js";import"./chunk-WARJYBQ7.js";import"./chunk-BZGM3F3K.js";var i=t.Array(t.String({minLength:1})),o=t.Object({ids:i,visible:t.Boolean()}),s=t.Object({ids:i,opacity:t.Number({minimum:0,maximum:1})}),a=t.Object({ids:i,time:t.Refine(t.Union([t.Null(),t.String()]),e=>e===null||r(e),()=>"must be null or an ISO 8601 instant")}),c=t.Object({order:i});export{s as SetOpacityParams,c as SetOrderParams,a as SetTimeParams,o as SetVisibilityParams};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-7PF3OZ2P.js";import{
|
|
1
|
+
import{a as S}from"./chunk-7PF3OZ2P.js";import{Ga as ce,Ha as pe,_b as de,l as Q,m as Y,n as Z,o as ee,p as te,v as oe,va as le,wa as re,x as se}from"./chunk-F7CTV67V.js";import{a as ie,b as ne,c as ae}from"./chunk-O2XN7DIT.js";import"./chunk-CI2BDMX2.js";import{a as z,b as q}from"./chunk-M4EXFQJE.js";import{j as B,k as j,l as H}from"./chunk-UBRYY245.js";import"./chunk-A7RX2LBX.js";import{a as J}from"./chunk-ON6WKWFV.js";import"./chunk-Z2OUIJPL.js";import"./chunk-FX2SMI5S.js";import"./chunk-I3RHGD62.js";import{j as N,o as U}from"./chunk-EX2EX65O.js";import{$a as $,Fa as X,Ga as R,Ja as O,La as W,Na as V,Oa as F,Wa as K,Ya as A,i as E,rb as L}from"./chunk-GJFI75CP.js";import"./chunk-LEEF5WZZ.js";import"./chunk-7FANVIZX.js";import"./chunk-ZYGXQZX6.js";import"./chunk-RYULE37H.js";import{$b as I,Db as f,Hb as u,Jb as p,Oa as r,Tb as T,Wa as D,X as y,Yb as c,Zb as P,_a as M,_b as G,ba as m,ca as h,nb as g,ob as x,qb as b,rb as v,sb as w,tb as _,ub as a,vb as s,wb as C}from"./chunk-3PBISOLT.js";import"./chunk-MWETYHR7.js";import"./chunk-WARJYBQ7.js";import{g as k}from"./chunk-BZGM3F3K.js";function _e(l,e){if(l&1){let t=f();a(0,"button",11),u("click",function(){m(t);let i=p();return h(i.load())}),a(1,"mat-icon"),c(2,"file_upload"),s(),c(3," \xA0Load "),s()}if(l&2){let t=p();_("disabled",!t.display.loadRoutesOK&&!t.display.loadWaypointsOK&&!t.display.loadTracksOK)}}function ue(l,e){l&1&&(a(0,"div",10)(1,"div")(2,"b"),c(3,"Invalid GPX Data:"),s(),C(4,"br")(5,"br"),a(6,"i"),c(7,"Selected file does not contain GPX data or"),C(8,"br"),c(9," does not correctly implement namespaced <extensions> attributes."),s()()())}function fe(l,e){l&1&&C(0,"mat-progress-bar",12)}function ge(l,e){if(l&1){let t=f();a(0,"div",23)(1,"div",24),c(2),s(),a(3,"div",25)(4,"mat-checkbox",26,0),u("change",function(){let i=m(t).$index,o=T(5),d=p(4);return h(d.checkWpt(o.checked,i))}),s()()()}if(l&2){let t=e.$implicit,n=e.$index,i=p(4);r(2),P(t.name),r(2),_("checked",i.selWaypoints[n])}}function xe(l,e){if(l&1){let t=f();a(0,"div",13)(1,"mat-expansion-panel",16),u("opened",function(){m(t);let i=p(3);return h(i.display.expand.waypoints=!0)})("closed",function(){m(t);let i=p(3);return h(i.display.expand.waypoints=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",18),c(5,"place"),s(),c(6," \xA0\xA0 "),a(7,"b"),c(8,"Waypoints:"),s()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),c(12),s(),a(13,"span",20)(14,"mat-checkbox",21),u("change",function(i){m(t);let o=p(3);return h(o.checkWpt(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),s()()()()(),a(15,"div",22),v(16,ge,6,2,"div",23,b),s()()()}if(l&2){let t=p(3);r(),_("expanded",t.display.expand.waypoints),r(11),I(" (",t.display.selCount.waypoints," of ",t.gpxData.waypoints.length,") "),r(2),_("indeterminate",t.display.someWptChecked)("checked",t.display.allWaypointsChecked)("disabled",t.gpxData.waypoints.length===0),r(2),w(t.gpxData.waypoints)}}function ye(l,e){if(l&1){let t=f();a(0,"div",23)(1,"div",24),c(2),s(),a(3,"div",25)(4,"mat-checkbox",29,1),u("change",function(){let i=m(t).$index,o=T(5),d=p(4);return h(d.checkRte(o.checked,i))}),s()()()}if(l&2){let t=e.$implicit,n=e.$index,i=p(4);r(2),P(t.name),r(2),_("checked",i.selRoutes[n])}}function Ce(l,e){if(l&1){let t=f();a(0,"div",13)(1,"mat-expansion-panel",16),u("opened",function(){m(t);let i=p(3);return h(i.display.expand.routes=!0)})("closed",function(){m(t);let i=p(3);return h(i.display.expand.routes=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",27),c(5,"directions"),s(),c(6," \xA0\xA0 "),a(7,"b"),c(8,"Routes:"),s()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),c(12),s(),a(13,"span",20)(14,"mat-checkbox",28),u("change",function(i){m(t);let o=p(3);return h(o.checkRte(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),s()()()()(),a(15,"div",22),v(16,ye,6,2,"div",23,b),s()()()}if(l&2){let t=p(3);r(),_("expanded",t.display.expand.routes),r(11),I(" (",t.display.selCount.routes," of ",t.gpxData.routes.length,") "),r(2),_("indeterminate",t.display.someRteChecked)("checked",t.display.allRoutesChecked)("disabled",t.gpxData.routes.length==0),r(2),w(t.gpxData.routes)}}function ke(l,e){if(l&1){let t=f();a(0,"div",23)(1,"div",24),c(2),s(),a(3,"div",25)(4,"mat-checkbox",32,2),u("change",function(){let i=m(t).$index,o=T(5),d=p(4);return h(d.checkTrk(o.checked,i))}),s()()()}if(l&2){let t=e.$implicit,n=e.$index,i=p(4);r(2),P(t.name),r(2),_("checked",i.selTracks[n])}}function be(l,e){if(l&1){let t=f();a(0,"div",13)(1,"mat-expansion-panel",16),u("opened",function(){m(t);let i=p(3);return h(i.display.expand.tracks=!0)})("closed",function(){m(t);let i=p(3);return h(i.display.expand.tracks=!1)}),a(2,"mat-expansion-panel-header",17)(3,"mat-panel-title")(4,"mat-icon",30),c(5,"show_chart"),s(),c(6," \xA0\xA0 "),a(7,"b"),c(8,"Tracks:"),s()(),a(9,"mat-panel-description")(10,"div",5)(11,"span",19),c(12),s(),a(13,"span",20)(14,"mat-checkbox",31),u("change",function(i){m(t);let o=p(3);return h(o.checkTrk(i.checked,-1))})("click",function(i){return i.cancelBubble=!0}),s()()()()(),a(15,"div",22),v(16,ke,6,2,"div",23,b),s()()()}if(l&2){let t=p(3);r(),_("expanded",t.display.expand.tracks),r(11),I(" (",t.display.selCount.tracks," of ",t.gpxData.tracks.length,") "),r(2),_("indeterminate",t.display.someTrkChecked)("checked",t.display.allTracksChecked)("disabled",t.gpxData.tracks.length==0),r(2),w(t.gpxData.tracks)}}function ve(l,e){if(l&1&&(a(0,"div",13)(1,"div",14)(2,"div"),c(3,"File:"),s(),a(4,"div",15),c(5),s()(),C(6,"mat-divider"),s(),g(7,xe,18,6,"div",13),g(8,Ce,18,6,"div",13),g(9,be,18,6,"div",13)),l&2){let t=p(2);r(5),G(" ",t.data.fileName," "),r(2),x(t.gpxData.waypoints.length!=0?7:-1),r(),x(t.gpxData.routes.length!=0?8:-1),r(),x(t.gpxData.tracks.length!=0&&t.app.tracksAvailable()?9:-1)}}function we(l,e){if(l&1&&(a(0,"div",10),g(1,fe,1,0,"mat-progress-bar",12)(2,ve,10,4),s()),l&2){let t=p();r(),x(t.app.sIsFetching()?1:2)}}var me=class l{constructor(e){this.data=e}data;gpxData={name:"",routes:[],waypoints:[],tracks:[]};selRoutes=[];selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,loadRoutesOK:!1,loadWaypointsOK:!1,loadTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};errorCount=0;subCount=0;gpx=new S;app=y(de);dialogRef=y(X);skres=y(re);signalk=y(oe);symbols=y(se);ngOnInit(){this.data.fileData=this.data.fileData||null,this.parseGPXData(this.data.fileData)}ngOnDestroy(){this.clear()}load(){this.uploadToServer({rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseGPXData(e){return k(this,null,function*(){this.display.allRoutesChecked=!1,this.display.loadRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.loadWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.loadTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1;let t=yield this.parseFileData(e);if(!t){console.warn(`Selected file does not contain GPX data or
|
|
2
2
|
does not correctly implement namespaced <extensions> attributes`,"Invalid GPX Data:"),this.display.notValid=!0;return}this.gpxData=t,this.gpxData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.loadRoutesOK=!0,this.display.selCount.routes=1),this.gpxData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selWaypoints.length===1&&(this.selWaypoints[0]=!0,this.display.allWaypointsChecked=!0,this.display.expand.waypoints=!0,this.display.loadWaypointsOK=!0,this.display.selCount.waypoints=1),this.gpxData.tracks.forEach(()=>{this.selTracks.push(!1)}),this.selTracks.length===1&&(this.selTracks[0]=!0,this.display.allTracksChecked=!0,this.display.expand.tracks=!0,this.display.loadTracksOK=!0,this.display.selCount.tracks=1)})}checkRte(e,t=-1){let n=0;if(t!==-1){this.selRoutes[t]=e,this.display.loadRoutesOK=e;for(let i of this.selRoutes)i&&n++;this.display.loadRoutesOK=n!==0,this.display.selCount.routes=n,this.display.allRoutesChecked=n===this.selRoutes.length}else{for(let i=0;i<this.selRoutes.length;i++)this.selRoutes[i]=e,this.display.loadRoutesOK=e,this.display.allRoutesChecked=e;this.display.selCount.routes=e?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||n===0)}checkWpt(e,t=-1){let n=0;if(t!==-1){this.selWaypoints[t]=e,this.display.loadWaypointsOK=e;for(let i of this.selWaypoints)i&&n++;this.display.loadWaypointsOK=n!==0,this.display.selCount.waypoints=n,this.display.allWaypointsChecked=n===this.selWaypoints.length}else{for(let i=0;i<this.selWaypoints.length;i++)this.selWaypoints[i]=e,this.display.loadWaypointsOK=e,this.display.allWaypointsChecked=e;this.display.selCount.waypoints=e?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||n===0)}checkTrk(e,t=-1){let n=0;if(t!==-1){this.selTracks[t]=e,this.display.loadTracksOK=e;for(let i of this.selTracks)i&&n++;this.display.loadTracksOK=n!==0,this.display.selCount.tracks=n,this.display.allTracksChecked=n===this.selTracks.length}else{for(let i=0;i<this.selTracks.length;i++)this.selTracks[i]=e,this.display.loadTracksOK=e,this.display.allTracksChecked=e;this.display.selCount.tracks=e?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||n===0)}clear(){this.gpx=new S}parseFileData(e){return k(this,null,function*(){let t={name:"",routes:[],waypoints:[],tracks:[]};if(this.gpx=new S,this.app.sIsFetching.set(!0),!(yield this.gpx.parse(e)))return this.app.sIsFetching.set(!1),null;let n=1;return this.gpx.rte.forEach(i=>{t.routes.push({name:i.name!==""?i.name:`Rte: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:"",wptcount:i.rtept.length}),n++}),n=1,this.gpx.wpt.forEach(i=>{t.waypoints.push({name:i.name?i.name:`Wpt: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),n=1,this.gpx.trk.forEach(i=>{t.tracks.push({name:i.name?i.name:`Trk: ${n}`,description:i.desc?i.desc:i.cmt?i.cmt:""}),n++}),this.app.sIsFetching.set(!1),t})}uploadToServer(e){return k(this,null,function*(){this.app.sIsFetching.set(!0),this.errorCount=0,this.subCount=0;for(let n=0;n<e.rte.selected.length;n++)e.rte.selected[n]&&this.transformRoute(this.gpx.rte[n]);for(let n=0;n<e.wpt.selected.length;n++)e.wpt.selected[n]&&this.transformWaypoint(this.gpx.wpt[n]);let t=[];for(let n=0;n<e.trk.selected.length;n++)if(e.trk.selected[n]){let i=this.gpx.trk[n],o=this.transformTrack(i);this.subCount++;try{let d=yield this.skres.importTrack(o.feature,le((i.trkseg??[]).map(he=>he.trkpt)));this.subCount--,t.push(d),this.app.debug("SUCCESS: Track added."),this.checkComplete()}catch(d){this.errorCount++,this.subCount--,this.logError(d),this.checkComplete()}}t.length!==0&&this.skres.trackAddFromServer(t)})}errorList=[];logError(e){if(e instanceof E){let t=e.error?e.error.message:e.message;this.errorList.push({status:e.status,message:t})}else this.errorList.push({status:void 0,message:e instanceof Error?e.message:String(e)})}checkComplete(){this.subCount===0&&(this.app.sIsFetching.set(!1),this.app.saveConfig(),this.dialogRef.close({errCount:this.errorCount,errList:this.errorList}),this.app.debug(`GPXLoad: complete: ${this.errorCount}`))}transformRoute(e){let t=this.skres.buildRoute(e.rtept.map(o=>[o.lon,o.lat])),n=t[1];n.name=e.name??"",n.description=e.desc??"";let i=n.feature.properties??={};e.cmt&&(i.cmt=e.cmt),e.src&&(i.src=e.src),e.number&&(i.number=e.number),e.type&&(i.type=e.type),i.coordinatesMeta=[],i.coordinatesMeta=e.rtept.map(o=>{let d={name:o.name??""};return o.cmt&&(d.description=o.cmt),d}),this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/routes/${t[0]}`,t[1]).subscribe(o=>{this.subCount--,Math.floor(o.statusCode/100)===2?(this.app.debug("SUCCESS: Route added."),this.skres.selectionAdd("routes",t[0])):this.errorCount++,this.checkComplete()},o=>{this.errorCount++,this.subCount--,this.logError(o),this.checkComplete()})}transformWaypoint(e){let t=this.skres.buildWaypoint([e.lon,e.lat]),n=t[1],i=n.feature.properties??={};if(e.ele&&n.feature.geometry.coordinates.push(e.ele),e.name&&e.name.length!==0&&(n.name=e.name),e.desc&&e.desc.length!==0&&(n.description=e.desc),e.type&&(n.type=e.type,i.type=e.type),e.cmt&&(i.cmt=e.cmt),e.src&&(i.src=e.src),e.sym){i.sym=e.sym;let o=this.symbols.resolveGpxSym(e.sym);o&&(n.type="waypoint",i.skIcon=o)}this.subCount++,this.signalk.api.put(this.app.skApiVersion,`/resources/waypoints/${t[0]}`,t[1]).subscribe(o=>{this.subCount--,Math.floor(o.statusCode/100)===2?(this.app.debug("SUCCESS: Waypoint added."),this.skres.selectionAdd("waypoints",t[0])):this.errorCount++,this.checkComplete()},o=>{this.errorCount++,this.subCount--,this.logError(o),this.checkComplete()})}transformTrack(e){let t={},n={feature:{type:"Feature",geometry:{type:"MultiLineString",coordinates:[]},properties:t,id:""}};return e.trkseg&&e.trkseg.forEach(i=>{let o=[];i.trkpt.forEach(d=>{o.push([d.lon,d.lat])}),n.feature.geometry.coordinates.push(o)}),e.name&&e.name.length!==0?t.name=e.name:t.name=`gpxtrk #${Math.random().toString().slice(-5)}`,e.desc&&e.desc.length!==0&&(t.description=e.desc),e.cmt&&(t.cmt=e.cmt),e.src&&(t.src=e.src),e.type&&(t.type=e.type),n}static \u0275fac=function(t){return new(t||l)(D(R))};static \u0275cmp=M({type:l,selectors:[["gpxload-dialog"]],decls:13,vars:3,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxload-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click","disabled"],["mat-dialog-content",""],["mat-raised-button","","matTooltip","Load selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],["mode","indeterminate"],[1,"card-group"],[2,"display","flex"],[2,"flex","1 1 auto","padding-left","10px","overflow","hidden","display","-webkit-box","-webkit-box-orient","vertical","-webkit-line-clamp","1","line-clamp","1","text-overflow","ellipsis"],[3,"opened","closed","expanded"],[2,"padding","0 12px"],[1,"icon-waypoint"],[1,"pnlSelectedItems"],[1,"pnlSelect"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[1,"icon-track"],["matTooltip","Select all Tracks","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(t,n){t&1&&(a(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div"),g(4,_e,4,1,"button",6),s(),a(5,"div",7),c(6,"Import GPX"),s(),a(7,"div",8)(8,"button",9),u("click",function(){return n.dialogRef.close(-1)}),a(9,"mat-icon"),c(10,"close"),s()()()()(),g(11,ue,10,0,"div",10)(12,we,3,1,"div",10),s()),t&2&&(r(4),x(n.app.sIsFetching()?-1:4),r(4),_("disabled",n.app.sIsFetching()),r(3),x(n.display.notValid?11:12))},dependencies:[ne,ie,pe,ce,W,O,F,V,$,A,K,B,N,U,q,z,te,Q,Y,ee,Z,H,j,ae,J,L],styles:[".gpxload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0 12px 6px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}.pnlSelectedItems[_ngcontent-%COMP%]{display:none;line-height:2.9em}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:3px;padding-right:3px;text-align:right}.txtSelect[_ngcontent-%COMP%]{display:none}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}@media only screen and (min-width:400px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:475px){.pnlSelectedItems[_ngcontent-%COMP%]{display:inline;line-height:2.9em}.txtSelect[_ngcontent-%COMP%]{display:inline}.pnlSelect[_ngcontent-%COMP%]{flex:1 1 auto;padding-left:20px;padding-right:15px;text-align:right}button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}}"]})};export{me as GPXImportDialog};
|