{"version":3,"file":"content-state-BBUndEDA.d.cts","names":["Annotation","SupportedTarget","ContentState","StateSource","Array","NormalisedContentState","Record","ValidationResponse","validateContentState","serialiseContentState","parseContentState","Promise","encodeContentState","decodeContentState","normaliseContentState"],"sources":["../src/content-state.d.ts"],"sourcesContent":["import { Annotation } from '@iiif/presentation-3';\nimport { SupportedTarget } from './annotation-targets/target-types';\nexport type ContentState = string | (Annotation & {\n    '@context'?: string;\n}) | (StateSource & {\n    '@context'?: string;\n}) | Array<string | (Annotation & {\n    '@context'?: string;\n}) | (StateSource & {\n    '@context'?: string;\n})>;\nexport type StateSource = {\n    id: string;\n    type: 'Manifest' | 'Canvas' | 'Range';\n    partOf?: string | {\n        id: string;\n        type: string;\n    } | Array<{\n        id: string;\n        type: string;\n    }>;\n};\nexport type NormalisedContentState = {\n    id: string;\n    type: 'Annotation';\n    motivation: ['contentState', ...string[]];\n    target: Array<SupportedTarget>;\n    extensions: Record<string, any>;\n};\ntype ValidationResponse = readonly [false, {\n    reason?: string;\n}] | readonly [true];\nexport declare function validateContentState(annotation: ContentState, strict?: boolean): ValidationResponse;\nexport declare function serialiseContentState(annotation: ContentState): string;\nexport declare function parseContentState(state: string): ContentState;\nexport declare function parseContentState(state: string, async: false): ContentState;\nexport declare function parseContentState(state: string, async: true): Promise<ContentState>;\nexport declare function encodeContentState(state: string): string;\nexport declare function decodeContentState(encodedContentState: string): string;\nexport declare function normaliseContentState(state: ContentState): NormalisedContentState;\nexport {};\n"],"mappings":";;;;KAEYE,YAAAA,aAAyBF;;AAArC,CAAA,CAAA,GAAYE,CAENC,WAFMD,GAAY;EAAaF,UAAAA,CAAAA,EAAAA,MAAAA;CAE/BG,CAAAA,GAEDC,KAFCD,CAAAA,MAAAA,GAAAA,CAEeH,UAFfG,GAAAA;EAEeH,UAAAA,CAAAA,EAAAA,MAAAA;CAEfG,CAAAA,GAAAA,CAAAA,WAAAA,GAAAA;EAFDC,UAAAA,CAAAA,EAAAA,MAAAA;CAAK,CAAA,CAAA;AAKED,KAAAA,WAAAA,GAAW;EAWXE,EAAAA,EAAAA,MAAAA;EAIMJ,IAAAA,EAAAA,UAAAA,GAAAA,QAAAA,GAAAA,OAAAA;EAANG,MAAAA,CAAAA,EAAAA,MAAAA,GAAAA;IACIE,EAAAA,EAAAA,MAAAA;IAAM,IAAA,EAAA,MAAA;EAEjBC,CAAAA,GAZGH,KAYHG,CAAAA;IAGmBC,EAAAA,EAAAA,MAAAA;IACAC,IAAAA,EAAAA,MAAAA;EACAC,CAAAA,CAAAA;AACxB,CAAA;AACwBA,KAdZL,sBAAAA,GAcmEH;EACvDU,EAAAA,EAAAA,MAAAA;EACAC,IAAAA,EAAAA,YAAAA;EACAC,UAAAA,EAAAA,CAAAA,cAAqB,EAAA,GAAA,MAAQZ,EAAAA,CAAAA;UAbzCE,MAAMH;cACFK;;KAEXC,kBAAAA;;;iBAGmBC,oBAAAA,aAAiCN,iCAAiCK;iBAClEE,qBAAAA,aAAkCP;iBAClCQ,iBAAAA,iBAAkCR;iBAClCQ,iBAAAA,+BAAgDR;iBAChDQ,iBAAAA,8BAA+CC,QAAQT;iBACvDU,kBAAAA;iBACAC,kBAAAA;iBACAC,qBAAAA,QAA6BZ,eAAeG"}