import * as I from './internals.js' ; import { ElemType , Eq , IfElse , Nth , DottedPath , TuplePath , RequireString , Simplify , } from './utils.js' ; import { Adapt , Apply , Choice , Compose , DisallowTypeChange , ElemUnion , Elems , HKT , Id , Index , PartsOf , Plant , Prop , Optional , SetNth , SetDottedPath , SetTuplePath , Union , } from './hkt.js' ; export { Apply , Compose , Eq , HKT } ; export type Removable = true | undefined ; export interface Params < T extends HKT , R extends Removable = undefined > { readonly _T : T ; readonly _R : R ; } export type OpticParams = Params < any , any > ; export type NextParams < C extends OpticParams , T extends HKT , R extends Removable = undefined > = Params < Compose < C [ '_T' ] , T > , R > ; export type NextComposeParams < C1 extends OpticParams , C2 extends OpticParams > = Params < Compose < C1 [ '_T' ] , C2 [ '_T' ] > , C2 [ '_R' ] > ; export type OpticFor < S > = Equivalence < S , Params < DisallowTypeChange < S > > , S > ; export type OpticFor_ < S > = Equivalence < S , Params < Id > , S > ; export interface Equivalence < S , T extends OpticParams , A > { readonly _tag : 'Equivalence' ; readonly _removable : T [ '_R' ] ; compose < T2 extends OpticParams , A2 > ( optic ) : Equivalence < S , NextComposeParams < T , T2 > , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Iso < S , NextComposeParams < T , T2 > , A2 > ; iso < U > ( there , back ) : Iso < S , NextParams < T , Adapt < A , U > > , U > ; indexed ( ) : Iso < S , NextParams < T , Index > , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Lens < S , NextComposeParams < T , T2 > , A2 > ; prop < K extends keyof A > ( key ) : Lens < S , NextParams < T , Prop < A , K > > , A [ K ] > ; path < K extends keyof any > ( path ) : Lens < S , NextParams < T , SetDottedPath < A , K > > , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Lens < S , NextParams < T , SetTuplePath < A , K > > , TuplePath < A , K > > ; nth < N extends number > ( n ) : Lens < S , NextParams < T , SetNth < A , N > > , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Lens < S , NextParams < T , Plant < A , K > > , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Lens < S , NextParams < T , Union < A > > , B [ ] > ; filter ( predicate ) : Lens < S , NextParams < T , Union < A > > , A > ; valueOr < B > ( defaultValue ) : Lens < S , NextParams < T , Id > , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; reread ( read ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; rewrite ( write ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; optional ( ) : Prism < S , NextParams < T , Optional > , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Prism < S , NextParams < T , F > , U > ; guard < U extends A > ( g ) : Prism < S , NextParams < T , Choice < A , U > > , U > ; find ( predicate ) : Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > ; when ( predicate ) : Prism < S , NextParams < T , Union < A > > , A > ; at ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; elems ( ) : Traversal < S , NextParams < T , Elems > , ElemType < A > > ; chars ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; words ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; compose < A2 > ( optic ) : Getter < S , A2 > ; to < B > ( f ) : Getter < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Setter < S , NextComposeParams < T , T2 > , A2 > ; prependTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; appendTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; } export interface Iso < S , T extends OpticParams , A > { readonly _tag : 'Iso' ; readonly _removable : T [ '_R' ] ; compose < T2 extends OpticParams , A2 > ( optic ) : Iso < S , NextComposeParams < T , T2 > , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Iso < S , NextComposeParams < T , T2 > , A2 > ; iso < U > ( there , back ) : Iso < S , NextParams < T , Adapt < A , U > > , U > ; indexed ( ) : Iso < S , NextParams < T , Index > , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Lens < S , NextComposeParams < T , T2 > , A2 > ; prop < K extends keyof A > ( key ) : Lens < S , NextParams < T , Prop < A , K > > , A [ K ] > ; path < K extends keyof any > ( path ) : Lens < S , NextParams < T , SetDottedPath < A , K > > , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Lens < S , NextParams < T , SetTuplePath < A , K > > , TuplePath < A , K > > ; nth < N extends number > ( n ) : Lens < S , NextParams < T , SetNth < A , N > > , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Lens < S , NextParams < T , Plant < A , K > > , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Lens < S , NextParams < T , Union < A > > , B [ ] > ; filter ( predicate ) : Lens < S , NextParams < T , Union < A > > , A > ; valueOr < B > ( defaultValue ) : Lens < S , NextParams < T , Id > , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; reread ( read ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; rewrite ( write ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; optional ( ) : Prism < S , NextParams < T , Optional > , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Prism < S , NextParams < T , F > , U > ; guard < U extends A > ( g ) : Prism < S , NextParams < T , Choice < A , U > > , U > ; find ( predicate ) : Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > ; when ( predicate ) : Prism < S , NextParams < T , Union < A > > , A > ; at ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; elems ( ) : Traversal < S , NextParams < T , Elems > , ElemType < A > > ; chars ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; words ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; compose < A2 > ( optic ) : Getter < S , A2 > ; to < B > ( f ) : Getter < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Setter < S , NextComposeParams < T , T2 > , A2 > ; prependTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; appendTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; } export interface Lens < S , T extends OpticParams , A > { readonly _tag : 'Lens' ; readonly _removable : T [ '_R' ] ; compose < T2 extends OpticParams , A2 > ( optic ) : Lens < S , NextComposeParams < T , T2 > , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Lens < S , NextComposeParams < T , T2 > , A2 > ; iso < U > ( there , back ) : Lens < S , NextParams < T , Adapt < A , U > > , U > ; indexed ( ) : Lens < S , NextParams < T , Index > , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Lens < S , NextComposeParams < T , T2 > , A2 > ; prop < K extends keyof A > ( key ) : Lens < S , NextParams < T , Prop < A , K > > , A [ K ] > ; path < K extends keyof any > ( path ) : Lens < S , NextParams < T , SetDottedPath < A , K > > , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Lens < S , NextParams < T , SetTuplePath < A , K > > , TuplePath < A , K > > ; nth < N extends number > ( n ) : Lens < S , NextParams < T , SetNth < A , N > > , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Lens < S , NextParams < T , Plant < A , K > > , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Lens < S , NextParams < T , Union < A > > , B [ ] > ; filter ( predicate ) : Lens < S , NextParams < T , Union < A > > , A > ; valueOr < B > ( defaultValue ) : Lens < S , NextParams < T , Id > , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Lens < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; reread ( read ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; rewrite ( write ) : Lens < S , NextParams < T , DisallowTypeChange < A > > , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; optional ( ) : Prism < S , NextParams < T , Optional > , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Prism < S , NextParams < T , F > , U > ; guard < U extends A > ( g ) : Prism < S , NextParams < T , Choice < A , U > > , U > ; find ( predicate ) : Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > ; when ( predicate ) : Prism < S , NextParams < T , Union < A > > , A > ; at ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; elems ( ) : Traversal < S , NextParams < T , Elems > , ElemType < A > > ; chars ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; words ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; compose < A2 > ( optic ) : Getter < S , A2 > ; to < B > ( f ) : Getter < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Setter < S , NextComposeParams < T , T2 > , A2 > ; prependTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; appendTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; } export interface Prism < S , T extends OpticParams , A > { readonly _tag : 'Prism' ; readonly _removable : T [ '_R' ] ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; iso < U > ( there , back ) : Prism < S , NextParams < T , Adapt < A , U > > , U > ; indexed ( ) : Prism < S , NextParams < T , Index > , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; prop < K extends keyof A > ( key ) : Prism < S , NextParams < T , Prop < A , K > > , A [ K ] > ; path < K extends keyof any > ( path ) : Prism < S , NextParams < T , SetDottedPath < A , K > > , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Prism < S , NextParams < T , SetTuplePath < A , K > > , TuplePath < A , K > > ; nth < N extends number > ( n ) : Prism < S , NextParams < T , SetNth < A , N > > , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Prism < S , NextParams < T , Plant < A , K > > , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Prism < S , NextParams < T , Union < A > > , B [ ] > ; filter ( predicate ) : Prism < S , NextParams < T , Union < A > > , A > ; valueOr < B > ( defaultValue ) : Prism < S , NextParams < T , Id > , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Prism < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Prism < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; reread ( read ) : Prism < S , NextParams < T , DisallowTypeChange < A > > , A > ; rewrite ( write ) : Prism < S , NextParams < T , DisallowTypeChange < A > > , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Prism < S , NextComposeParams < T , T2 > , A2 > ; optional ( ) : Prism < S , NextParams < T , Optional > , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Prism < S , NextParams < T , F > , U > ; guard < U extends A > ( g ) : Prism < S , NextParams < T , Choice < A , U > > , U > ; find ( predicate ) : Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > ; when ( predicate ) : Prism < S , NextParams < T , Union < A > > , A > ; at ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Prism < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Prism < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; elems ( ) : Traversal < S , NextParams < T , Elems > , ElemType < A > > ; chars ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; words ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; to < B > ( f ) : AffineFold < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Setter < S , NextComposeParams < T , T2 > , A2 > ; prependTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; appendTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; } export interface Traversal < S , T extends OpticParams , A > { readonly _tag : 'Traversal' ; readonly _removable : T [ '_R' ] ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; iso < U > ( there , back ) : Traversal < S , NextParams < T , Adapt < A , U > > , U > ; indexed ( ) : Traversal < S , NextParams < T , Index > , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; prop < K extends keyof A > ( key ) : Traversal < S , NextParams < T , Prop < A , K > > , A [ K ] > ; path < K extends keyof any > ( path ) : Traversal < S , NextParams < T , SetDottedPath < A , K > > , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Traversal < S , NextParams < T , SetTuplePath < A , K > > , TuplePath < A , K > > ; nth < N extends number > ( n ) : Traversal < S , NextParams < T , SetNth < A , N > > , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Traversal < S , NextParams < T , Plant < A , K > > , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Traversal < S , NextParams < T , Union < A > > , B [ ] > ; filter ( predicate ) : Traversal < S , NextParams < T , Union < A > > , A > ; valueOr < B > ( defaultValue ) : Traversal < S , NextParams < T , Id > , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Traversal < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Traversal < S , NextParams < T , PartsOf < U [ '_T' ] , A > > , B [ ] > ; reread ( read ) : Traversal < S , NextParams < T , DisallowTypeChange < A > > , A > ; rewrite ( write ) : Traversal < S , NextParams < T , DisallowTypeChange < A > > , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; optional ( ) : Traversal < S , NextParams < T , Optional > , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Traversal < S , NextParams < T , F > , U > ; guard < U extends A > ( g ) : Traversal < S , NextParams < T , Choice < A , U > > , U > ; find ( predicate ) : Traversal < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > ; when ( predicate ) : Traversal < S , NextParams < T , Union < A > > , A > ; at ( i ) : IfElse < Eq < A , string > , Traversal < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Traversal < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Traversal < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Traversal < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Traversal < S , NextParams < T , DisallowTypeChange < string > , true > , string > , Traversal < S , NextParams < T , ElemUnion < A > , true > , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Traversal < S , NextComposeParams < T , T2 > , A2 > ; elems ( ) : Traversal < S , NextParams < T , Elems > , ElemType < A > > ; chars ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; words ( ) : RequireString < A , Traversal < S , NextParams < T , DisallowTypeChange < string > > , string > > ; compose < A2 > ( optic ) : Fold < S , A2 > ; to < B > ( f ) : Fold < S , B > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Setter < S , NextComposeParams < T , T2 > , A2 > ; prependTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; appendTo ( ) : Setter < S , NextParams < T , ElemUnion < A > > , ElemType < A > > ; } export interface Getter < S , A > { readonly _tag : 'Getter' ; compose < T2 extends OpticParams , A2 > ( optic ) : Getter < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Getter < S , A2 > ; iso < U > ( there , back ) : Getter < S , U > ; indexed ( ) : Getter < S , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Getter < S , A2 > ; prop < K extends keyof A > ( key ) : Getter < S , A [ K ] > ; path < K extends keyof any > ( path ) : Getter < S , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Getter < S , TuplePath < A , K > > ; nth < N extends number > ( n ) : Getter < S , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Getter < S , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Getter < S , B [ ] > ; filter ( predicate ) : Getter < S , A > ; valueOr < B > ( defaultValue ) : Getter < S , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Getter < S , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Getter < S , B [ ] > ; reread ( read ) : Getter < S , A > ; rewrite ( write ) : Getter < S , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : AffineFold < S , A2 > ; optional ( ) : AffineFold < S , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => AffineFold < S , U > ; guard < U extends A > ( g ) : AffineFold < S , U > ; find ( predicate ) : AffineFold < S , ElemType < A > > ; when ( predicate ) : AffineFold < S , A > ; at ( i ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; elems ( ) : Fold < S , ElemType < A > > ; chars ( ) : RequireString < A , Fold < S , string > > ; words ( ) : RequireString < A , Fold < S , string > > ; compose < A2 > ( optic ) : Getter < S , A2 > ; to < B > ( f ) : Getter < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; } export interface AffineFold < S , A > { readonly _tag : 'AffineFold' ; compose < T2 extends OpticParams , A2 > ( optic ) : AffineFold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : AffineFold < S , A2 > ; iso < U > ( there , back ) : AffineFold < S , U > ; indexed ( ) : AffineFold < S , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : AffineFold < S , A2 > ; prop < K extends keyof A > ( key ) : AffineFold < S , A [ K ] > ; path < K extends keyof any > ( path ) : AffineFold < S , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : AffineFold < S , TuplePath < A , K > > ; nth < N extends number > ( n ) : AffineFold < S , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : AffineFold < S , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : AffineFold < S , B [ ] > ; filter ( predicate ) : AffineFold < S , A > ; valueOr < B > ( defaultValue ) : AffineFold < S , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : AffineFold < S , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : AffineFold < S , B [ ] > ; reread ( read ) : AffineFold < S , A > ; rewrite ( write ) : AffineFold < S , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : AffineFold < S , A2 > ; optional ( ) : AffineFold < S , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => AffineFold < S , U > ; guard < U extends A > ( g ) : AffineFold < S , U > ; find ( predicate ) : AffineFold < S , ElemType < A > > ; when ( predicate ) : AffineFold < S , A > ; at ( i ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , AffineFold < S , string > , AffineFold < S , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; elems ( ) : Fold < S , ElemType < A > > ; chars ( ) : RequireString < A , Fold < S , string > > ; words ( ) : RequireString < A , Fold < S , string > > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; to < B > ( f ) : AffineFold < S , B > ; compose < A2 > ( optic ) : AffineFold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; } export interface Fold < S , A > { readonly _tag : 'Fold' ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; iso < U > ( there , back ) : Fold < S , U > ; indexed ( ) : Fold < S , [ number , ElemType < A > ] [ ] > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; prop < K extends keyof A > ( key ) : Fold < S , A [ K ] > ; path < K extends keyof any > ( path ) : Fold < S , DottedPath < A , K > > ; path < K extends ( keyof any ) [ ] > ( ... path ) : Fold < S , TuplePath < A , K > > ; nth < N extends number > ( n ) : Fold < S , Nth < A , N > > ; pick < K extends keyof A > ( keys ) : Fold < S , Pick < A , K > > ; filter < B extends ElemType < A > > ( predicate ) : Fold < S , B [ ] > ; filter ( predicate ) : Fold < S , A > ; valueOr < B > ( defaultValue ) : Fold < S , Exclude < A , undefined > | B > ; partsOf < U extends OpticParams , B > ( traversal ) : Fold < S , B [ ] > ; partsOf < U extends OpticParams , B > ( makeTraversal ) : Fold < S , B [ ] > ; reread ( read ) : Fold < S , A > ; rewrite ( write ) : Fold < S , A > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; optional ( ) : Fold < S , Exclude < A , undefined > > ; guard_ < F extends HKT > ( ) : < U extends A > ( g : ( a : A ) => a is U ) => Fold < S , U > ; guard < U extends A > ( g ) : Fold < S , U > ; find ( predicate ) : Fold < S , ElemType < A > > ; when ( predicate ) : Fold < S , A > ; at ( i ) : IfElse < Eq < A , string > , Fold < S , string > , Fold < S , ElemType < A > > > ; head ( ) : IfElse < Eq < A , string > , Fold < S , string > , Fold < S , ElemType < A > > > ; index ( i ) : IfElse < Eq < A , string > , Fold < S , string > , Fold < S , ElemType < A > > > ; compose < T2 extends OpticParams , A2 > ( optic ) : Fold < S , A2 > ; elems ( ) : Fold < S , ElemType < A > > ; chars ( ) : RequireString < A , Fold < S , string > > ; words ( ) : RequireString < A , Fold < S , string > > ; compose < A2 > ( optic ) : Fold < S , A2 > ; to < B > ( f ) : Fold < S , B > ; compose < A2 > ( optic ) : Fold < S , A2 > ; compose < A2 > ( optic ) : Fold < S , A2 > ; } export interface Setter < S , T extends OpticParams , A > { readonly _tag : 'Setter' ; readonly _removable : T [ '_R' ] ; } export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , A2 > ( optic1 , optic2 ) ; export function compose < S , T extends OpticParams , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , T2 extends OpticParams , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose < S , A , A2 > ( optic1 , optic2 ) ; export function compose ( optic1 , optic2 ) { return optic1 . compose ( optic2 ) ; } export function optic < S > ( ) { return I . optic as any ; } export function optic_ < S > ( ) { return I . optic as any ; } export function get < S , A > ( optic ) { return ( source ) => I . get ( ( optic as any ) . _ref , source ) ; } export function preview < S , A > ( optic ) { return ( source ) => I . preview ( ( optic as any ) . _ref , source ) ; } export function collect < S , A > ( optic ) { return ( source ) => I . collect ( ( optic as any ) . _ref , source ) ; } export function modify < S , T extends OpticParams , A > ( optic ) { return ( f ) => ( source ) => I . modify ( ( optic as any ) . _ref , f , source ) ; } export function set < S , T extends OpticParams , A > ( optic ) { return ( value ) => ( source ) => I . set ( ( optic as any ) . _ref , value , source ) ; } export function remove < S > ( optic ) { return ( source ) => I . remove ( ( optic as any ) . _ref , source ) ; } export { pipe } from './standalone/pipe.js' ;