functype 0.8.69 → 0.8.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{h as Base,a as Companion,J as ESMap,s as Either,u as FPromise,t as FPromiseCompanion,F as FoldableUtils,H as HKT,I as Identity,l as Left,g as List,K as Map,L as MatchableUtils,i as NAME,c as None,e as Option,d as OptionConstructor,E as ParseError,k as Right,f as Set,b as Some,M as Stack,z as Task,w as TaskException,x as TaskResult,j as Throwable,G as Try,q as TypeCheckLeft,p as TypeCheckRight,y as createCancellationTokenSource,D as createErrorSerializer,C as formatError,B as formatStackTrace,n as isLeft,m as isRight,v as isTaggedThrowable,A as safeStringify,o as tryCatch,r as tryCatchAsync}from'./chunk-5DWCHDSA.mjs';export{d as Tuple,a as Typeable,c as Valuable,b as isTypeable}from'./chunk-7PQA3W7W.mjs';export{a as Brand,g as BrandedBoolean,f as BrandedNumber,e as BrandedString,d as createBrander,c as hasBrand,b as unbrand}from'./chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{F as Base,A as BoundedNumber,B as BoundedString,a as Companion,D as Cond,_ as ESMap,p as Either,w as EmailAddress,J as FPromise,I as FPromiseCompanion,U as FoldableUtils,W as HKT,z as ISO8601Date,X as Identity,t as IntegerNumber,Y as Lazy,Z as LazyList,i as Left,g as List,$ as Map,E as Match,aa as MatchableUtils,G as NAME,v as NonEmptyString,s as NonNegativeNumber,c as None,e as Option,d as OptionConstructor,T as ParseError,C as PatternString,u as PositiveInteger,r as PositiveNumber,h as Right,f as Set,b as Some,ba as Stack,O as Task,L as TaskException,M as TaskResult,H as Throwable,V as Try,n as TypeCheckLeft,m as TypeCheckRight,y as UUID,x as UrlString,q as ValidatedBrand,N as createCancellationTokenSource,S as createErrorSerializer,R as formatError,Q as formatStackTrace,k as isLeft,j as isRight,K as isTaggedThrowable,P as safeStringify,l as tryCatch,o as tryCatchAsync}from'./chunk-JIVKCD74.mjs';export{d as Tuple,a as Typeable,c as Valuable,b as isTypeable}from'./chunk-7PQA3W7W.mjs';export{a as Brand,g as BrandedBoolean,f as BrandedNumber,e as BrandedString,d as createBrander,c as hasBrand,b as unbrand}from'./chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- export { L as List } from '../Either-BfXNbTHo.js';
2
- import '../Valuable-CtuVEKTZ.js';
1
+ export { L as List } from '../Either-CfG7OVB-.js';
2
+ import '../Valuable-BI2O7E9Q.js';
@@ -1,2 +1,2 @@
1
- export{g as List}from'../chunk-5DWCHDSA.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{g as List}from'../chunk-JIVKCD74.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- import '../Either-BfXNbTHo.js';
2
- import '../Valuable-CtuVEKTZ.js';
3
- export { M as Map, S as SafeTraversable } from '../Map-vivbm5n0.js';
1
+ import '../Either-CfG7OVB-.js';
2
+ import '../Valuable-BI2O7E9Q.js';
3
+ export { M as Map, S as SafeTraversable } from '../Map-wkGSJvYa.js';
4
4
  import '../tuple/index.js';
@@ -1,2 +1,2 @@
1
- export{K as Map}from'../chunk-5DWCHDSA.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{$ as Map}from'../chunk-JIVKCD74.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- export { N as None, O as Option, k as OptionConstructor, j as Some } from '../Either-BfXNbTHo.js';
2
- import '../Valuable-CtuVEKTZ.js';
1
+ export { N as None, O as Option, k as OptionConstructor, j as Some } from '../Either-CfG7OVB-.js';
2
+ import '../Valuable-BI2O7E9Q.js';
@@ -1,2 +1,2 @@
1
- export{c as None,e as Option,d as OptionConstructor,b as Some}from'../chunk-5DWCHDSA.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{c as None,e as Option,d as OptionConstructor,b as Some}from'../chunk-JIVKCD74.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- export { m as Set } from '../Either-BfXNbTHo.js';
2
- import '../Valuable-CtuVEKTZ.js';
1
+ export { m as Set } from '../Either-CfG7OVB-.js';
2
+ import '../Valuable-BI2O7E9Q.js';
@@ -1,2 +1,2 @@
1
- export{f as Set}from'../chunk-5DWCHDSA.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{f as Set}from'../chunk-JIVKCD74.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,5 @@
1
- import { E as Either, S as Serializable, P as Pipe, F as Foldable, M as Matchable } from '../Either-BfXNbTHo.js';
2
- import { a as Type, T as Typeable, V as Valuable } from '../Valuable-CtuVEKTZ.js';
1
+ import { E as Either, S as Serializable, P as Pipe, F as Foldable, M as Matchable } from '../Either-CfG7OVB-.js';
2
+ import { T as Type, a as Typeable, V as Valuable } from '../Valuable-BI2O7E9Q.js';
3
3
 
4
4
  /**
5
5
  * Possible types of Try instances
@@ -1,2 +1,2 @@
1
- export{G as Try}from'../chunk-5DWCHDSA.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{V as Try}from'../chunk-JIVKCD74.mjs';import'../chunk-7PQA3W7W.mjs';import'../chunk-TQJDL6YW.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- import { a as Type, c as ArrayFunctor, T as Typeable, V as Valuable } from '../Valuable-CtuVEKTZ.js';
1
+ import { T as Type, c as ArrayFunctor, a as Typeable, V as Valuable } from '../Valuable-BI2O7E9Q.js';
2
2
 
3
3
  type Tuple<T extends Type[]> = {
4
4
  get<K extends number>(index: K): T[K];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functype",
3
- "version": "0.8.69",
3
+ "version": "0.8.80",
4
4
  "type": "module",
5
5
  "description": "A smallish functional library for TypeScript",
6
6
  "author": "jordan.burke@gmail.com",
@@ -12,30 +12,30 @@
12
12
  "homepage": "https://github.com/jordanburke/functype#readme",
13
13
  "url": "https://github.com/jordanburke/functype",
14
14
  "devDependencies": {
15
- "@eslint/compat": "^1.2.9",
15
+ "@eslint/compat": "^1.3.1",
16
16
  "@eslint/eslintrc": "^3.3.1",
17
- "@eslint/js": "^9.28.0",
18
- "@types/node": "^22.15.30",
19
- "@typescript-eslint/eslint-plugin": "^8.33.1",
20
- "@typescript-eslint/parser": "^8.33.1",
21
- "@vitest/coverage-v8": "^3.2.2",
22
- "@vitest/ui": "^3.2.2",
17
+ "@eslint/js": "^9.29.0",
18
+ "@types/node": "^22.15.33",
19
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
20
+ "@typescript-eslint/parser": "^8.35.0",
21
+ "@vitest/coverage-v8": "^3.2.4",
22
+ "@vitest/ui": "^3.2.4",
23
23
  "cross-env": "^7.0.3",
24
- "eslint": "^9.28.0",
24
+ "eslint": "^9.29.0",
25
25
  "eslint-config-prettier": "^10.1.5",
26
26
  "eslint-plugin-functional": "^9.0.2",
27
- "eslint-plugin-import": "^2.31.0",
28
- "eslint-plugin-prettier": "^5.4.1",
27
+ "eslint-plugin-import": "^2.32.0",
28
+ "eslint-plugin-prettier": "^5.5.1",
29
29
  "eslint-plugin-simple-import-sort": "^12.1.1",
30
30
  "fast-check": "^4.1.1",
31
31
  "globals": "^16.2.0",
32
- "prettier": "^3.5.3",
32
+ "prettier": "^3.6.1",
33
33
  "rimraf": "^6.0.1",
34
34
  "ts-node": "^10.9.2",
35
35
  "tsup": "^8.5.0",
36
36
  "typedoc": "^0.28.5",
37
37
  "typescript": "5.8.3",
38
- "vitest": "^3.2.2"
38
+ "vitest": "^3.2.4"
39
39
  },
40
40
  "types": "./dist/index.d.ts",
41
41
  "module": "./dist/index.mjs",
@@ -70,6 +70,18 @@
70
70
  "default": "./dist/list/index.mjs"
71
71
  }
72
72
  },
73
+ "./conditional": {
74
+ "import": {
75
+ "types": "./dist/conditional/index.d.ts",
76
+ "default": "./dist/conditional/index.mjs"
77
+ }
78
+ },
79
+ "./lazy": {
80
+ "import": {
81
+ "types": "./dist/lazy/index.d.ts",
82
+ "default": "./dist/lazy/index.mjs"
83
+ }
84
+ },
73
85
  "./task": {
74
86
  "import": {
75
87
  "types": "./dist/core/task/index.d.ts",
@@ -82,6 +94,18 @@
82
94
  "default": "./dist/fpromise/index.mjs"
83
95
  }
84
96
  },
97
+ "./functype": {
98
+ "import": {
99
+ "types": "./dist/functype/index.d.ts",
100
+ "default": "./dist/functype/index.mjs"
101
+ }
102
+ },
103
+ "./typeclass": {
104
+ "import": {
105
+ "types": "./dist/typeclass/index.d.ts",
106
+ "default": "./dist/typeclass/index.mjs"
107
+ }
108
+ },
85
109
  "./map": {
86
110
  "import": {
87
111
  "types": "./dist/map/index.d.ts",
@@ -128,6 +152,8 @@
128
152
  "test:watch": "vitest",
129
153
  "test:coverage": "vitest run --coverage",
130
154
  "test:ui": "vitest --ui",
155
+ "bench": "vitest bench",
156
+ "bench:ui": "vitest bench --ui",
131
157
  "docs": "typedoc",
132
158
  "docs:watch": "typedoc --watch",
133
159
  "postdocs": "node -e \"console.log('Documentation generated in ./typedocs')\"",
@@ -63,16 +63,13 @@ type First = FirstElement<typeof literalTuple> // Would be 1
63
63
  ## When Is This Useful?
64
64
 
65
65
  1. **Strong typing for heterogeneous collections**:
66
-
67
66
  - When you need to store different types in a fixed structure
68
67
  - When you want type safety beyond what arrays provide
69
68
 
70
69
  2. **APIs returning fixed-length, mixed-type results**:
71
-
72
70
  - When a function returns multiple values of different types
73
71
 
74
72
  3. **Data transformation pipelines**:
75
-
76
73
  - When you need to transform data while preserving type information
77
74
 
78
75
  4. **Configuration objects with fixed format**:
@@ -16,7 +16,6 @@ const namedTask = Task({
16
16
  When an error occurs within this task, the task name will be referenced in the error:
17
17
 
18
18
  1. The `Throwable` object created from the error will include:
19
-
20
19
  - The task name as the error's `name` property
21
20
  - A `taskInfo` property containing both the name and description
22
21
 
@@ -1,39 +0,0 @@
1
- import {b as b$1,a,d}from'./chunk-7PQA3W7W.mjs';import D from'safe-stable-stringify';function b(e,t){return Object.assign(e,t)}var ee=Set;var W=e=>{let t=new ee(e),r=y(t),n={...r,_tag:"Set",add:o=>W([...t,o]),remove:o=>{let s=new ee(t);return s.delete(o),W(s)},contains:o=>t.has(o),has:o=>t.has(o),map:o=>W(r.map(o)),flatMap:o=>W(r.flatMap(o)),fold:(o,s)=>{if(t.size===0)return o();let a=Array.from(t);if(a.length===0)return o();let l=a[0];return l===void 0?o():s(l)},foldLeft:o=>s=>r.foldLeft(o)(s),foldRight:o=>s=>r.foldRight(o)(s),toList:()=>y(t),toSet:()=>n,toString:()=>`Set(${Array.from(t).toString()})`,toValue:()=>({_tag:"Set",value:Array.from(t)}),pipe:o=>o(Array.from(t)),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Set",value:Array.from(t)}),toYAML:()=>`_tag: Set
2
- value: ${JSON.stringify(Array.from(t))}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Set",value:Array.from(t)})).toString("base64")})};return n},xe=e=>W(e),ue={fromJSON:e=>{let t=JSON.parse(e);return _(t.value)},fromYAML:e=>{let r=e.split(`
3
- `)[1]?.split(": ")[1];if(!r)return _([]);let n=JSON.parse(r);return _(n)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return ue.fromJSON(t)}},_=b(xe,ue);var S=e=>{let t=Array.from(e||[]),r={_tag:"List",[Symbol.iterator]:()=>t[Symbol.iterator](),get size(){return t.length},get length(){return t.length},map:n=>S(t.map(n)),flatMap:n=>S(t.flatMap(o=>Array.from(n(o)))),flatMapAsync:async n=>{let o=await Promise.all(t.map(async s=>await n(s)));return S(o.flatMap(s=>Array.from(s)))},forEach:n=>t.forEach(n),contains:n=>t.includes(n),count:n=>t.filter(n).length,exists:n=>t.some(n),filter:n=>S(t.filter(n)),filterNot:n=>S(t.filter(o=>!n(o))),filterType:n=>S(t.filter(o=>b$1(o,n))),find:(n,o)=>{let s=t.find(a=>n(a)&&(o?b$1(a,o):true));return A(s)},get head(){return t[0]},get headOption(){return t.length>0?A(t[0]):w()},get isEmpty(){return t.length===0},toArray:()=>[...t],reduce:n=>t.reduce(n),reduceRight:n=>t.reduceRight(n),fold:(n,o)=>{if(t.length===0)return n();let s=t[0];return o(s)},foldLeft:n=>o=>t.reduce(o,n),foldRight:n=>o=>t.reduceRight((s,a)=>o(a,s),n),match:n=>t.length===0?n.Empty():n.NonEmpty([...t]),remove:n=>S(t.filter(o=>o!==n)),removeAt:n=>n<0||n>=t.length?r:S([...t.slice(0,n),...t.slice(n+1)]),add:n=>S([...t,n]),get:n=>A(t[n]),concat:n=>S([...t,...n.toArray()]),drop:n=>S(t.slice(n)),dropRight:n=>S(t.slice(0,-n)),dropWhile:n=>S(t.slice(t.findIndex(o=>!n(o)))),flatten:()=>S(t.flatMap(n=>Array.isArray(n)?n:[n])),toList:()=>r,toSet:()=>_(t),toString:()=>`List(${D(t)})`,toValue:()=>({_tag:"List",value:t}),pipe:n=>n([...t]),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"List",value:t}),toYAML:()=>`_tag: List
4
- value: ${D(t)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"List",value:t})).toString("base64")})};return r},we=e=>S(e),me={fromJSON:e=>{let t=JSON.parse(e);return y(t.value)},fromYAML:e=>{let r=e.split(`
5
- `)[1]?.split(": ")[1];if(!r)return y([]);let n=JSON.parse(r);return y(n)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return me.fromJSON(t)}},y=b(we,me);function J(e,t){return {...a({_tag:e,impl:t}),toString(){return `${e}()`}}}var q="Throwable",k=class e extends Error{constructor(r,n){super(r,{cause:n?.cause});this._tag=q;this.name=n?.taskInfo?.name||q,Object.defineProperties(this,{_tag:{value:q,writable:false,configurable:false},data:{value:n?.data,writable:false,configurable:false},taskInfo:{value:n?.taskInfo,writable:false,configurable:false},name:{value:n?.taskInfo?.name||q,writable:false,configurable:false}}),n?.cause&&Object.defineProperty(this,"cause",{value:n.cause,writable:false,configurable:false}),n?.stack?this.stack=n.stack:Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);}static apply(r,n,o){if(r instanceof Error){let i=new e(r.message,{data:n,cause:r.cause||void 0,stack:r.stack||void 0,taskInfo:o});for(let p of Object.keys(r))p in i||(i[p]=r[p]);return i}if(r&&typeof r=="object"){let i=r,p=typeof i.message=="string"?i.message:typeof i.error=="string"?i.error:`Object error: ${JSON.stringify(i,Object.getOwnPropertyNames(i).filter(T=>i[T]!==void 0))}`,d=new e(p,{data:n||i,taskInfo:o});for(let T of Object.keys(i))T in d||(d[T]=i[T]);return d}if(typeof r=="function"){let i=r.name||"anonymous function",p=r.toString().substring(0,100)+(r.toString().length>100?"...":"");return new e(`Function error: ${i}`,{data:n||{functionType:typeof r,functionName:i,functionString:p},taskInfo:o})}let s=typeof r,a=r===null?"null":r===void 0?"undefined":String(r);if(s==="number"){let i=r,p=Number.isNaN(i)?"Number error: NaN":Number.isFinite(i)?`Number error: ${i}`:`Number error: ${i>0?"Infinity":"-Infinity"}`;return new e(p,{data:n||{errorType:s,errorValue:i,originalError:r},taskInfo:o})}if(s==="bigint")return new e(`BigInt error: ${r}n`,{data:n||{errorType:s,errorValue:String(r),originalError:r},taskInfo:o});if(s==="boolean")return new e(`Boolean error: ${r}`,{data:n||{errorType:s,errorValue:r,originalError:r},taskInfo:o});if(s==="symbol"){let i=r.description||"unnamed symbol";return new e(`Symbol error: Symbol(${i})`,{data:n||{errorType:s,symbolDescription:i,originalError:r},taskInfo:o})}let l=typeof r=="string"?r:`${s.charAt(0).toUpperCase()+s.slice(1)} error: ${a}`;return new e(l,{data:n||{errorType:s,errorValue:a,originalError:r},taskInfo:o})}};var Te=e=>({_tag:"Right",value:e,isLeft:()=>false,isRight:()=>true,getOrElse:t=>e,getOrThrow:()=>e,map:t=>f(t(e)),mapAsync:t=>t(e).then(r=>f(r)).catch(r=>Promise.resolve(c(r))),merge:t=>t.isLeft()?c(t.value):f([e,t.value]),flatMap:t=>t(e),flatMapAsync:t=>t(e).catch(r=>c(r)),toOption:()=>P(e),toList:()=>y([e]),toString:()=>`Right(${D(e)})`,[Symbol.iterator]:function*(){yield e;},yield:function*(){yield e;},traverse:t=>{let r=t(e);return r.isLeft()?c(r.value):f([r.value])},lazyMap:function*(t){yield f(t(e));},tap:t=>(t(e),f(e)),tapLeft:t=>f(e),mapLeft:t=>f(e),bimap:(t,r)=>f(r(e)),fold:(t,r)=>r(e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),match:t=>t.Right(e),swap:()=>c(e),then:(t,r)=>Promise.resolve(e).then(t,r),toValue:()=>({_tag:"Right",value:e}),pipeEither:(t,r)=>r(e),pipe:t=>t(e),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Right",value:e}),toYAML:()=>`_tag: Right
6
- value: ${D(e)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Right",value:e})).toString("base64")})}),ye=e=>({_tag:"Left",value:e,isLeft:()=>true,isRight:()=>false,getOrElse:t=>t,getOrThrow:()=>{throw e},map:t=>c(e),mapAsync:t=>Promise.resolve(c(e)),merge:t=>c(e),flatMap:t=>c(e),flatMapAsync:t=>Promise.resolve(c(e)),toOption:()=>w(),toList:()=>y(),toString:()=>`Left(${D(e)})`,[Symbol.iterator]:function*(){},yield:function*(){},traverse:t=>c(e),lazyMap:function*(t){yield c(e);},tap:t=>c(e),tapLeft:t=>(t(e),c(e)),mapLeft:t=>c(t(e)),bimap:(t,r)=>c(t(e)),fold:(t,r)=>t(e),foldLeft:t=>r=>t,foldRight:t=>r=>t,match:t=>t.Left(e),swap:()=>f(e),then:(t,r)=>Promise.reject(e).then(null,r),toValue:()=>({_tag:"Left",value:e}),pipeEither:(t,r)=>t(e),pipe:t=>t(e),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Left",value:e}),toYAML:()=>`_tag: Left
7
- value: ${D(e)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Left",value:e})).toString("base64")})}),f=e=>Te(e),c=e=>ye(e),at=e=>e.isRight(),st=e=>e.isLeft(),it=(e,t)=>{try{return f(e())}catch(r){return c(t(r))}},Ue=e=>Te(e);console.assert(Ue);var ve=e=>ye(e);console.assert(ve);var lt=async(e,t)=>{try{let r=await e();return f(r)}catch(r){return c(t(r))}},fe={sequence:e=>{let t=[];for(let r of e){if(r.isLeft())return c(r.value);t.push(r.value);}return f(t)},traverse:(e,t)=>fe.sequence(e.map(t)),fromNullable:(e,t)=>e==null?c(t):f(e),fromPredicate:(e,t,r)=>t(e)?f(e):c(r),ap:(e,t)=>e.flatMap(r=>t.map(r)),fromPromise:async(e,t)=>{try{let r=await e;return f(r)}catch(r){return c(t(r))}},fromJSON:e=>{let t=JSON.parse(e);return t._tag==="Right"?f(t.value):c(t.value)},fromYAML:e=>{let t=e.split(`
8
- `),r=t[0]?.split(": ")[1],n=t[1]?.split(": ")[1];if(!r||!n)throw new Error("Invalid YAML format for Either");let o=JSON.parse(n);return r==="Right"?f(o):c(o)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return fe.fromJSON(t)}};var h=e=>{let t=new Promise((r,n)=>{try{e(r,n);}catch(o){n(o);}});return {_tag:"FPromise",map:r=>h((n,o)=>{t.then(s=>{try{n(r(s));}catch(a){o(a);}}).catch(o);}),flatMap:r=>h((n,o)=>{t.then(s=>{try{let a=r(s);"_tag"in a&&a._tag==="FPromise"?a.then(n,o):Promise.resolve(a).then(n,o);}catch(a){o(a);}}).catch(o);}),flatMapAsync:async r=>{let n=await t,o=r(n);return o instanceof Promise?o:new Promise((s,a)=>{o.then(s,a);})},tap:r=>h((n,o)=>{t.then(s=>{try{r(s),n(s);}catch(a){o(a);}}).catch(o);}),mapError:r=>h((n,o)=>{t.then(n).catch(s=>{try{let a={originalError:s,stack:s instanceof Error?s.stack:void 0,timestamp:Date.now()};o(r(s,a));}catch(a){o(a);}});}),tapError:r=>h((n,o)=>{t.then(n).catch(s=>{try{r(s),o(s);}catch(a){o(a);}});}),recover:r=>h(n=>{t.then(n).catch(()=>n(r));}),recoverWith:r=>h(n=>{t.then(n).catch(o=>{try{n(r(o));}catch{n(null);}});}),recoverWithF:r=>h((n,o)=>{t.then(n).catch(s=>{try{r(s).then(n,o);}catch(a){o(a);}});}),filterError:(r,n)=>h((o,s)=>{t.then(o).catch(a=>{if(r(a))try{n(a).then(o,s);}catch(l){s(l);}else s(a);});}),logError:r=>h((n,o)=>{t.then(n).catch(s=>{try{let a={originalError:s,stack:s instanceof Error?s.stack:void 0,timestamp:Date.now()};r(s,a);}catch{}finally{o(s);}});}),then:(r,n)=>t.then(r,n),toPromise:()=>t,toEither:()=>t,fold:(r,n)=>h((o,s)=>{t.then(a=>{try{o(n(a));}catch(l){s(l);}}).catch(a=>{try{o(r(a));}catch(l){s(l);}});})}},Be={resolve:e=>h(t=>t(e)),reject:e=>h((t,r)=>r(e)),from:e=>h((t,r)=>{e.then(t).catch(r);}),fromEither:e=>e.isRight()?h(t=>t(e.value)):h((t,r)=>r(e.value)),all:e=>h((t,r)=>{Promise.all(e.map(n=>n instanceof Promise?n:Promise.resolve(n))).then(t).catch(r);}),allSettled:e=>h(t=>{let r=[],n=0;if(e.length===0){t([]);return}e.forEach((o,s)=>{Promise.resolve(o).then(a=>{r[s]=f(a),n++,n===e.length&&t(r);}).catch(a=>{r[s]=c(a),n++,n===e.length&&t(r);});});}),race:e=>h((t,r)=>{Promise.race(e).then(t,r);}),any:e=>h((t,r)=>{if(typeof Promise.any=="function")Promise.any(e).then(t,r);else {let n=0,o=[];if(e.length===0){r(new AggregateError([],"All promises were rejected"));return}e.forEach((s,a)=>{Promise.resolve(s).then(t).catch(l=>{o[a]=l,n++,n===e.length&&r(new AggregateError(o,"All promises were rejected"));});});}}),retryWithBackoff:(e,t)=>{let{maxRetries:r,baseDelay:n=100,shouldRetry:o=()=>true}=t;return h((s,a)=>{let l=0,i=()=>{e().toPromise().then(s).catch(p=>{if(l++,l<=r&&o(p,l)){let d=n*Math.pow(2,l-1);setTimeout(i,d);}else a(p);});};i();})}},te=b(h,Be);function Pe(e){return e instanceof Error&&typeof e=="object"&&true&&e._tag==="Throwable"}var de=(e,t,r)=>{let n=r?.name||"TaskException",o=r?.description||"Unspecified TaskException",s={name:n,description:o},a=k.apply(e,t,s);return {...J("TaskException",c(a)),_task:s}},ge=(e,t)=>{let r=t?.name||"TaskResult",n=t?.description||"Unspecified TaskResult";return {...J("TaskResult",f(e)),_task:{name:r,description:n}}},re=()=>{let e=new AbortController,t=[];return {token:{get isCancelled(){return e.signal.aborted},get signal(){return e.signal},onCancel(n){e.signal.aborted?n():t.push(n);}},cancel(){e.signal.aborted||(e.abort(),t.forEach(n=>{try{n();}catch(o){console.error("Error in cancellation callback:",o);}}));}}},Oe=e=>{let t=e?.name||"Task",r=e?.description||"",n={Async:(o,s=i=>i,a=()=>{},l)=>te(async(i,p)=>{let d=false,T=null,x=()=>{};if(l){if(l.isCancelled){try{await a();}catch(E){p(k.apply(E,void 0,{name:t,description:r}));return}p(k.apply(new Error("Task was cancelled before execution started"),void 0,{name:t,description:r}));return}let L=()=>{d=true,T=new Error("Task was cancelled during execution");};l.onCancel(L),x=()=>{};}try{let L=await o();if(d){try{await a();}catch(E){p(k.apply(E,void 0,{name:t,description:r}));return}p(T?k.apply(T,void 0,{name:t,description:r}):k.apply(new Error("Task was cancelled during execution"),void 0,{name:t,description:r}));return}try{await a();}catch(E){p(k.apply(E,void 0,{name:t,description:r}));return}i(L);}catch(L){if(d){try{await a();}catch(E){p(k.apply(E,void 0,{name:t,description:r}));return}p(T?k.apply(T,void 0,{name:t,description:r}):k.apply(new Error("Task was cancelled during execution"),void 0,{name:t,description:r}));return}try{await a();}catch(E){p(k.apply(E,void 0,{name:t,description:r}));return}try{if(L instanceof Error&&Pe(L)){let E=new Error(`${t}: ${L.message}`),K=k.apply(E,void 0,{name:t,description:r});Object.defineProperty(K,"cause",{value:L,writable:!1,configurable:!1}),Promise.resolve().then(()=>{try{s(L);}catch(v){console.error("Error in error handler:",v);}}),p(K);}else {let E=await s(L);p(k.apply(E,void 0,{name:t,description:r}));}}catch(E){p(k.apply(E,void 0,{name:t,description:r}));}}finally{x();}}),Sync:(o,s=l=>l,a=()=>{})=>{try{return ge(o(),{name:t,description:r})}catch(l){return de(s(l),void 0,{name:t,description:r})}finally{a();}},AsyncWithProgress:(o,s,a=p=>p,l=()=>{},i)=>{let p=d=>{let T=Math.max(0,Math.min(100,d));T<=100&&s(T);};return n.Async(()=>o(p),a,l,i)}};return {...J("Task",n),_type:"Task"}},Ee={success:(e,t)=>ge(e,t),fail:(e,t,r)=>de(e,t,r),getErrorChain:e=>{if(!e)return [];let t=[e],r=e;for(;r&&r.cause;){let n=r.cause;if(n)t.push(n),r=n;else break;if(t.length>100)break}return t},formatErrorChain:(e,t)=>{let r=Ee.getErrorChain(e),n=t?.separator||`
9
- `;return r.map((o,s)=>{if(!o)return `${s>0?"\u21B3 ":""}Unknown error`;let a=o.taskInfo,l=t?.includeTasks&&a?.name?`[${a.name}] `:"",i=o.message||"No message",p=`${s>0?"\u21B3 ":""}${l}${i}`;return t?.includeStackTrace&&o.stack&&(p+=`
10
- ${o.stack.split(`
11
- `).slice(1).join(`
12
- `)}`),p}).join(n)},fromPromise:(e,t)=>(...r)=>U(t||{name:"PromiseTask",description:"Task from Promise"}).Async(()=>e(...r),o=>o),toPromise:e=>new Promise((t,r)=>{e.isRight()?t(e.value):r(e.value);}),race:(e,t,r)=>{let n=r?.name||"TaskRace",o=r?.description||"Race between multiple tasks";return U({name:n,description:o}).Async(async()=>{let a=[...e],l;if(typeof t=="number"&&t>0){let i=te((p,d)=>{l=setTimeout(()=>{d(new Error(`Task race timed out after ${t}ms`));},t);});a.push(i);}try{return await new Promise((i,p)=>{a.forEach(d=>{d.then(T=>i(T),T=>p(T));});})}finally{l&&clearTimeout(l);}},a=>a)},fromNodeCallback:(e,t)=>{let r=t?.name||"NodeCallbackTask",n=t?.description||"Task from Node.js callback function",o={name:r,description:n};return (...s)=>U(o).Async(()=>new Promise((a,l)=>{try{e(...s,(i,p)=>{i?l(i):a(p);});}catch(i){l(i);}}),a=>a)},createCancellationTokenSource:re,cancellable:(e,t)=>{let r=re();return {task:U(t).Async(()=>e(r.token),o=>o,()=>{},r.token),cancel:()=>r.cancel()}},withProgress:(e,t=()=>{},r)=>{let n=re(),o=0,s=l=>{o=Math.max(0,Math.min(100,l)),t(o);};return {task:U(r).Async(()=>e(s,n.token),l=>l,()=>{},n.token),cancel:()=>n.cancel(),currentProgress:()=>o}}},U=b(Oe,Ee);var he={includeTasks:true,includeStackTrace:false,separator:`
13
- `,includeData:false,maxStackFrames:3,title:"Error",colors:false};function Ae(e){let t=new WeakSet;return JSON.stringify(e,(r,n)=>{if(typeof n=="bigint")return n.toString()+"n";if(typeof n=="object"&&n!==null){if(t.has(n))return "[Circular Reference]";t.add(n);}return r==="stack"&&typeof n=="string"?G(n):n},2)}function G(e){if(!e)return "";if(!e)return e;let t=e.split(`
14
- `),r=t[0],n=t.slice(1).map(o=>o.trim());return [r,...n].join(`
15
- `)}function Rt(e,t){let r={...he,...t},n=e instanceof Error?e:k.apply(e),o=U?.getErrorChain?U.getErrorChain(n):[n],s=r.colors?`\x1B[31m${r.title}:\x1B[0m ${n.message}`:`${r.title}: ${n.message}`,a=o.map((i,p)=>{let d=" ".repeat(p),T=p>0?"\u21B3 ":"",x=i.taskInfo,L=r.includeTasks&&x?.name?r.colors?`\x1B[36m[${x.name}]\x1B[0m `:`[${x.name}] `:"",E=`${d}${T}${L}${i.message}`;if(r.includeStackTrace&&i.stack){let v=G(i.stack).split(`
16
- `).slice(1),j=r.maxStackFrames??he.maxStackFrames??3,X=v.slice(0,j).map(m=>`${d} ${r.colors?"\x1B[90m":""}${m}${r.colors?"\x1B[0m":""}`).join(`
17
- `);E+=`
18
- ${X}`,v.length>j&&(E+=`
19
- ${d} ${r.colors?"\x1B[90m":""}...${v.length-j} more stack frames${r.colors?"\x1B[0m":""}`);}return E}).join(r.separator),l=`${s}
20
-
21
- ${a}`;if(r.includeData){let i=n.data;if(i){let p=r.colors?`
22
-
23
- \x1B[33mContext:\x1B[0m
24
- ${Ae(i)}`:`
25
-
26
- Context:
27
- ${Ae(i)}`;l+=p;}}return l}function Lt(){return function(t){if(!t)return t;let r=t instanceof Error?t:new Error(String(t)),n={message:r.message,name:r.name||"Error",stack:r.stack?G(r.stack):void 0};if(r.taskInfo&&(n.taskInfo=r.taskInfo),r.data&&(n.data=r.data),typeof U?.getErrorChain=="function")try{let o=U.getErrorChain(r);o.length>1&&(n.errorChain=U.formatErrorChain(r,{includeTasks:!0}),n.structuredErrorChain=o.map(s=>({message:s.message,name:s.name,taskInfo:s.taskInfo,stack:s.stack?G(s.stack):void 0})));}catch{}return Object.getOwnPropertyNames(r).forEach(o=>{if(!n[o]){let s=r[o];n[o]=s;}}),n}}var xt=e=>{let t=new Error(e);return t.name="ParseError",t};var Ft={toOption:e=>e.fold(()=>w(),t=>P(t)),toList:e=>e.fold(()=>y([]),t=>y([t])),toEither:(e,t)=>e.fold(()=>c(t),r=>f(r)),isEmpty:e=>e.fold(()=>true,()=>false),size:e=>e.fold(()=>0,()=>1)};var H=e=>({_tag:"Success",error:void 0,isSuccess:()=>true,isFailure:()=>false,get:()=>e,getOrElse:t=>e,orElse:t=>H(e),orThrow:t=>e,toEither:()=>f(e),map:t=>Me(()=>t(e)),flatMap:t=>t(e),fold:(t,r)=>r(e),match:t=>t.Success(e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toString:()=>`Success(${D(e)})`,toValue:()=>({_tag:"Success",value:e}),pipe:t=>t(e),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Success",value:e}),toYAML:()=>`_tag: Success
28
- value: ${D(e)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Success",value:e})).toString("base64")})}),M=e=>({_tag:"Failure",error:e,isSuccess:()=>false,isFailure:()=>true,get:()=>{throw e},getOrElse:t=>t,orElse:t=>t,orThrow:t=>{throw t},toEither:()=>c(e),map:t=>M(e),flatMap:t=>M(e),fold:(t,r)=>t(e),match:t=>t.Failure(e),foldLeft:t=>r=>t,foldRight:t=>r=>t,toString:()=>`Failure(${D(e)}))`,toValue:()=>({_tag:"Failure",value:e}),pipe:t=>{throw e},serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Failure",error:e.message,stack:e.stack}),toYAML:()=>`_tag: Failure
29
- error: ${e.message}
30
- stack: ${e.stack}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Failure",error:e.message,stack:e.stack})).toString("base64")})}),Fe=e=>{try{return H(e())}catch(t){return M(t instanceof Error?t:new Error(String(t)))}},ke={fromJSON:e=>{let t=JSON.parse(e);if(t._tag==="Success")return H(t.value);{let r=new Error(t.error);return t.stack&&(r.stack=t.stack),M(r)}},fromYAML:e=>{let t=e.split(`
31
- `),r=t[0]?.split(": ")[1];if(!r)return M(new Error("Invalid YAML format for Try"));if(r==="Success"){let n=t[1]?.split(": ")[1];if(!n)return M(new Error("Invalid YAML format for Try Success"));let o=JSON.parse(n);return H(o)}else {let n=t[1]?.split(": ")[1];if(!n)return M(new Error("Invalid YAML format for Try Failure"));let o=t[2]?.split(": "),s=o&&o.length>1?o.slice(1).join(": "):void 0,a=new Error(n);return s&&(a.stack=s),M(a)}},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return ke.fromJSON(t)}},Me=b(Fe,ke);var N=e=>e!==null&&typeof e=="object"&&(e._tag==="Some"||e._tag==="None"),O=e=>e!==null&&typeof e=="object"&&e._tag==="List",$=e=>e!==null&&typeof e=="object"&&(e._tag==="Left"||e._tag==="Right"),z=e=>e!==null&&typeof e=="object"&&(e._tag==="Success"||e._tag==="Failure"),R=()=>{let e=(a,l)=>{if(N(a))return a.map(i=>l(i));if(O(a))return a.map(i=>l(i));if($(a))return a.map(i=>l(i));if(z(a))return a.map(i=>l(i));throw new Error(`Unsupported functor type: ${JSON.stringify(a)}`)},t=a=>{if(N(a))return a.get();if(O(a)){let l=a.toArray();if(l.length>0&&O(l[0])){let i=[];for(let p of l)O(p)&&i.push(...p.toArray());return y(i)}return a.flatten()}if($(a))return a.isRight()?a.fold(()=>null,l=>l):a;if(z(a))return a.isSuccess()?a.get():a;throw new Error(`Unsupported functor type for flatten: ${JSON.stringify(a)}`)},r=(a,l)=>{if(N(a))return a.flatMap(i=>l(i));if(O(a))return a.flatMap(i=>l(i));if($(a))return a.flatMap(i=>l(i));if(z(a))return a.flatMap(i=>l(i));throw new Error(`Unsupported functor type for flatMap: ${JSON.stringify(a)}`)},n=(a,l)=>{if(N(a)&&N(l))return a.flatMap(i=>l.map(p=>i(p)));if(O(a)&&O(l))return a.flatMap(i=>l.map(p=>i(p)));if($(a)&&$(l))return a.flatMap(i=>l.map(p=>i(p)));if(z(a)&&z(l))return a.flatMap(i=>l.map(p=>i(p)));throw new Error(`Unsupported functor type for ap: ${JSON.stringify(a)}`)},o=a=>{if(N(a)){let l=a;if(l.isEmpty)return y([A.none()]);let i=l.get();if(O(i))return i.map(p=>A(p));throw new Error("Unsupported inner container type for sequence")}if(O(a)){let i=a.toArray();if(i.length===0)return A.none();let p=i[0];if(N(p)){for(let T of i)if(T.isEmpty)return A.none();let d=i.map(T=>T.get());return A(y(d))}throw new Error("Unsupported inner container type for sequence")}throw new Error(`Unsupported outer container type for sequence: ${JSON.stringify(a)}`)};return {...J("HKT",{map:e,flatten:t,flatMap:r,ap:n,sequence:o,traverse:(a,l)=>o(e(a,i=>l(i)))}),_type:"HKT"}};R.map=(e,t)=>R().map(e,t);R.flatten=e=>R().flatten(e);R.flatMap=(e,t)=>R().flatMap(e,t);R.ap=(e,t)=>R().ap(e,t);R.sequence=e=>R().sequence(e);R.traverse=(e,t)=>R().traverse(e,t);R.isOption=N;R.isList=O;R.isEither=$;R.isTry=z;function Yt(e){return {id:e,isSame:r=>r.id===e}}var Q=Map;var C=e=>{let t="Map",r={values:new Q(e)},n=()=>Array.from(r.values.entries()).map(([u,g])=>d([u,g])),o=u=>C(new Q(r.values).set(u.toArray()[0],u.toArray()[1]).entries()),s=u=>{let g=new Q(r.values);return g.delete(u)?C(g.entries()):C(r.values.entries())},a=u=>{let g=u.toArray();return r.values.get(g[0])===g[1]},l=()=>r.values.size,i=u=>C(Array.from(r.values.entries()).map(([g,I])=>[g,u(I)])),p=u=>{let g=C(r.values.entries()).toList();return C(g.flatMap(u).toArray())},d$1=u=>y(n()).reduce(u),T=u=>y(n()).reduceRight(u),x=u=>g=>y(n()).foldLeft(u)(g),L=u=>g=>y(n()).foldRight(u)(g),E=u=>A(r.values.get(u)),K=(u,g)=>A(r.values.get(u)).getOrElse(g),v=()=>r.values.size===0;return {_tag:t,add:o,remove:s,contains:a,get size(){return l()},map:i,flatMap:p,reduce:d$1,reduceRight:T,foldLeft:x,foldRight:L,fold:(u,g)=>{if(v())return u();let I=n();if(I.length===0)return u();let ie=I[0];return ie===void 0?u():g(ie)},match:u=>v()?u.Empty():u.NonEmpty(n()),get:E,getOrElse:K,get isEmpty(){return v()},orElse:(u,g)=>A(r.values.get(u)).orElse(g),toList:()=>y(n()),toSet:()=>_(n()),toString:()=>`Map(${n().toString()})`,toValue:()=>({_tag:"Map",value:r.values}),pipe:u=>u(Array.from(r.values.entries())),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Map",value:Array.from(r.values.entries())}),toYAML:()=>`_tag: Map
32
- value: ${JSON.stringify(Array.from(r.values.entries()))}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Map",value:Array.from(r.values.entries())})).toString("base64")})}},Ne=e=>C(e),be={fromJSON:e=>{let t=JSON.parse(e);return oe(t.value)},fromYAML:e=>{let r=e.split(`
33
- `)[1]?.split(": ")[1];if(!r)return oe([]);let n=JSON.parse(r);return oe(n)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return be.fromJSON(t)}},oe=b(Ne,be);var Ve={default:e=>t=>e(t),when:(e,t)=>r=>e(r)?t(r):void 0};var F=(e=[])=>{let t="Stack",r=[...e],n=()=>r.length,o=()=>r.length===0;return {_tag:t,get size(){return n()},get isEmpty(){return o()},contains:m=>r.includes(m),reduce:m=>{if(r.length===0)throw new Error("Cannot reduce an empty stack");return r.reduce(m)},reduceRight:m=>{if(r.length===0)throw new Error("Cannot reduce an empty stack");return r.reduceRight(m)},push:m=>F([...r,m]),pop:()=>{if(o())return [F([]),A(null)];let m=[...r],B=m.pop();return [F(m),A(B)]},peek:()=>o()?A(null):A(r[r.length-1]),map:m=>F(r.map(m)),flatMap:m=>o()?F([]):r.reduce((B,V)=>m(V).toArray().reduce((g,I)=>g.push(I),B),F([])),toList:()=>y(r),toArray:()=>[...r],toString:()=>`Stack(${r.join(", ")})`,fold:(m,B)=>{if(o())return m();let V=r[r.length-1];return V!==void 0?B(V):m()},foldLeft:m=>B=>r.reduce(B,m),foldRight:m=>B=>r.reduceRight((V,u)=>B(u,V),m),match:m=>o()?m.Empty():m.NonEmpty([...r]),toValue:()=>({_tag:"Stack",value:r}),pipe:m=>m([...r]),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Stack",value:r}),toYAML:()=>`_tag: Stack
34
- value: ${JSON.stringify(r)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Stack",value:r})).toString("base64")})}},_e=(e=[])=>F(e),Re={empty:()=>F([]),of:e=>F([e]),fromJSON:e=>{let t=JSON.parse(e);return ae(t.value)},fromYAML:e=>{let r=e.split(`
35
- `)[1]?.split(": ")[1];if(!r)return ae([]);let n=JSON.parse(r);return ae(n)},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return Re.fromJSON(t)}},ae=b(_e,Re);var P=e=>({_tag:"Some",value:e,isEmpty:false,get:()=>e,getOrElse:()=>e,getOrThrow:()=>e,orElse:()=>P(e),orNull:()=>e,orUndefined:()=>e,map:t=>P(t(e)),filter(t){return t(e)?P(e):Y},fold:(t,r)=>r(e),match:t=>t.Some(e),flatMap:t=>t(e),flatMapAsync:async t=>await t(e),reduce:t=>t(void 0,e),reduceRight:t=>t(void 0,e),foldLeft:t=>r=>r(t,e),foldRight:t=>r=>r(e,t),toList:()=>y([e]),contains:t=>t===e,size:1,toEither:t=>f(e),toString:()=>`Some(${D(e)})`,toValue:()=>({_tag:"Some",value:e}),pipe:t=>t(e),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"Some",value:e}),toYAML:()=>`_tag: Some
36
- value: ${D(e)}`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"Some",value:e})).toString("base64")})}),Y={_tag:"None",value:void 0,isEmpty:true,get:()=>{throw new Error("Cannot call get() on None")},getOrElse:e=>e,getOrThrow(e){throw e},orElse:e=>e,orNull:()=>null,orUndefined:()=>{},map:e=>Y,filter(e){return Y},flatMap:e=>Y,flatMapAsync:async e=>Y,reduce:()=>{},reduceRight:()=>{},fold:(e,t)=>e(),match:e=>e.None(),foldLeft:e=>()=>e,foldRight:e=>()=>e,toList:()=>y([]),contains:()=>false,size:0,toEither:e=>c(e),toString:()=>"None",toValue:()=>({_tag:"None",value:void 0}),pipe:e=>e(void 0),serialize:()=>({toJSON:()=>JSON.stringify({_tag:"None",value:null}),toYAML:()=>`_tag: None
37
- value: null`,toBinary:()=>Buffer.from(JSON.stringify({_tag:"None",value:null})).toString("base64")})},w=()=>Y,Ce=e=>e!=null?P(e):w(),Se={from:e=>A(e),none:()=>w(),fromJSON:e=>{let t=JSON.parse(e);return t._tag==="Some"?P(t.value):w()},fromYAML:e=>{let t=e.split(`
38
- `),r=t[0]?.split(": ")[1],n=t[1]?.split(": ")[1];if(!r||!n)return w();let o=n==="null"?null:JSON.parse(n);return r==="Some"?P(o):w()},fromBinary:e=>{let t=Buffer.from(e,"base64").toString();return Se.fromJSON(t)}},A=b(Ce,Se);export{Ae as A,G as B,Rt as C,Lt as D,xt as E,Ft as F,Me as G,R as H,Yt as I,Q as J,oe as K,Ve as L,ae as M,b as a,P as b,w as c,Ce as d,A as e,_ as f,y as g,J as h,q as i,k as j,f as k,c as l,at as m,st as n,it as o,Ue as p,ve as q,lt as r,fe as s,Be as t,te as u,Pe as v,de as w,ge as x,re as y,U as z};//# sourceMappingURL=chunk-5DWCHDSA.mjs.map
39
- //# sourceMappingURL=chunk-5DWCHDSA.mjs.map