{"version":3,"file":"oas31-BgS8RJBM.mjs","sources":["../src/dsl/openapi-builder31.ts","../src/model/openapi31.ts"],"sourcesContent":["import * as yaml from 'yaml';\r\nimport * as oa from '../model/openapi31';\r\n\r\n// Internal DSL for building an OpenAPI 3.1.x contract\r\n// using a fluent interface\r\n\r\nexport class OpenApiBuilder {\r\n    rootDoc: oa.OpenAPIObject;\r\n\r\n    static create(doc?: oa.OpenAPIObject): OpenApiBuilder {\r\n        return new OpenApiBuilder(doc);\r\n    }\r\n\r\n    constructor(doc?: oa.OpenAPIObject) {\r\n        this.rootDoc = doc || {\r\n            openapi: '3.1.0',\r\n            info: {\r\n                title: 'app',\r\n                version: 'version'\r\n            },\r\n            paths: {},\r\n            components: {\r\n                schemas: {},\r\n                responses: {},\r\n                parameters: {},\r\n                examples: {},\r\n                requestBodies: {},\r\n                headers: {},\r\n                securitySchemes: {},\r\n                links: {},\r\n                callbacks: {}\r\n            },\r\n            tags: [],\r\n            servers: []\r\n        };\r\n    }\r\n\r\n    getSpec(): oa.OpenAPIObject {\r\n        return this.rootDoc;\r\n    }\r\n\r\n    getSpecAsJson(\r\n        replacer?: (key: string, value: unknown) => unknown,\r\n        space?: string | number\r\n    ): string {\r\n        return JSON.stringify(this.rootDoc, replacer, space);\r\n    }\r\n    getSpecAsYaml(        \r\n        replacer?: Parameters<typeof yaml.stringify>[1],\r\n        options?: Parameters<typeof yaml.stringify>[2]\r\n    ): string {\r\n        return yaml.stringify(this.rootDoc, replacer, options);\r\n    }\r\n\r\n    private static isValidOpenApiVersion(v: string): boolean {\r\n        v = v || '';\r\n        const match = /(\\d+)\\.(\\d+).(\\d+)/.exec(v);\r\n        if (match) {\r\n            const major = parseInt(match[1], 10);\r\n            if (major >= 3) {\r\n                return true;\r\n            }\r\n        }\r\n        return false;\r\n    }\r\n\r\n    addOpenApiVersion(openApiVersion: string): OpenApiBuilder {\r\n        if (!OpenApiBuilder.isValidOpenApiVersion(openApiVersion)) {\r\n            throw new Error(\r\n                'Invalid OpenApi version: ' + openApiVersion + '. Follow convention: 3.x.y'\r\n            );\r\n        }\r\n        this.rootDoc.openapi = openApiVersion;\r\n        return this;\r\n    }\r\n    addInfo(info: oa.InfoObject): OpenApiBuilder {\r\n        this.rootDoc.info = info;\r\n        return this;\r\n    }\r\n    addContact(contact: oa.ContactObject): OpenApiBuilder {\r\n        this.rootDoc.info.contact = contact;\r\n        return this;\r\n    }\r\n    addLicense(license: oa.LicenseObject): OpenApiBuilder {\r\n        this.rootDoc.info.license = license;\r\n        return this;\r\n    }\r\n    addTitle(title: string): OpenApiBuilder {\r\n        this.rootDoc.info.title = title;\r\n        return this;\r\n    }\r\n    addDescription(description: string): OpenApiBuilder {\r\n        this.rootDoc.info.description = description;\r\n        return this;\r\n    }\r\n    addTermsOfService(termsOfService: string): OpenApiBuilder {\r\n        this.rootDoc.info.termsOfService = termsOfService;\r\n        return this;\r\n    }\r\n    addVersion(version: string): OpenApiBuilder {\r\n        this.rootDoc.info.version = version;\r\n        return this;\r\n    }\r\n    addPath(path: string, pathItem: oa.PathItemObject): OpenApiBuilder {\r\n        this.rootDoc.paths = this.rootDoc.paths || {};\r\n        this.rootDoc.paths[path] = { ...(this.rootDoc.paths[path] || {}), ...pathItem };\r\n        return this;\r\n    }\r\n    addSchema(name: string, schema: oa.SchemaObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.schemas = this.rootDoc.components.schemas || {};\r\n        this.rootDoc.components.schemas[name] = schema;\r\n        return this;\r\n    }\r\n    addResponse(name: string, response: oa.ResponseObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.responses = this.rootDoc.components.responses || {};\r\n        this.rootDoc.components.responses[name] = response;\r\n        return this;\r\n    }\r\n    addParameter(name: string, parameter: oa.ParameterObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.parameters = this.rootDoc.components.parameters || {};\r\n        this.rootDoc.components.parameters[name] = parameter;\r\n        return this;\r\n    }\r\n    addExample(name: string, example: oa.ExampleObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.examples = this.rootDoc.components.examples || {};\r\n        this.rootDoc.components.examples[name] = example;\r\n        return this;\r\n    }\r\n    addRequestBody(\r\n        name: string,\r\n        reqBody: oa.RequestBodyObject | oa.ReferenceObject\r\n    ): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.requestBodies = this.rootDoc.components.requestBodies || {};\r\n        this.rootDoc.components.requestBodies[name] = reqBody;\r\n        return this;\r\n    }\r\n    addHeader(name: string, header: oa.HeaderObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.headers = this.rootDoc.components.headers || {};\r\n        this.rootDoc.components.headers[name] = header;\r\n        return this;\r\n    }\r\n    addSecurityScheme(\r\n        name: string,\r\n        secScheme: oa.SecuritySchemeObject | oa.ReferenceObject\r\n    ): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.securitySchemes = this.rootDoc.components.securitySchemes || {};\r\n        this.rootDoc.components.securitySchemes[name] = secScheme;\r\n        return this;\r\n    }\r\n    addLink(name: string, link: oa.LinkObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.links = this.rootDoc.components.links || {};\r\n        this.rootDoc.components.links[name] = link;\r\n        return this;\r\n    }\r\n    addCallback(name: string, callback: oa.CallbackObject | oa.ReferenceObject): OpenApiBuilder {\r\n        this.rootDoc.components = this.rootDoc.components || {};\r\n        this.rootDoc.components.callbacks = this.rootDoc.components.callbacks || {};\r\n        this.rootDoc.components.callbacks[name] = callback;\r\n        return this;\r\n    }\r\n    addServer(server: oa.ServerObject): OpenApiBuilder {\r\n        this.rootDoc.servers = this.rootDoc.servers || [];\r\n        this.rootDoc.servers.push(server);\r\n        return this;\r\n    }\r\n    addTag(tag: oa.TagObject): OpenApiBuilder {\r\n        this.rootDoc.tags = this.rootDoc.tags || [];\r\n        this.rootDoc.tags.push(tag);\r\n        return this;\r\n    }\r\n    addExternalDocs(extDoc: oa.ExternalDocumentationObject): OpenApiBuilder {\r\n        this.rootDoc.externalDocs = extDoc;\r\n        return this;\r\n    }\r\n    addWebhook(webhook: string, webhookItem: oa.PathItemObject): OpenApiBuilder {\r\n        this.rootDoc.webhooks ??= {};\r\n        this.rootDoc.webhooks[webhook] = webhookItem;\r\n        return this;\r\n    }\r\n}","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\n// Typed interfaces for OpenAPI 3.1.0\r\n// see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md\r\n\r\nimport { ServerObject } from './oas-common';\r\nimport { ISpecificationExtension, SpecificationExtension } from './specification-extension';\r\n\r\nexport * from './oas-common';\r\nexport type { ISpecificationExtension, SpecificationExtension } from './specification-extension';\r\n\r\nexport interface OpenAPIObject extends ISpecificationExtension {\r\n    openapi: string;\r\n    info: InfoObject;\r\n    servers?: ServerObject[];\r\n    paths?: PathsObject;\r\n    components?: ComponentsObject;\r\n    security?: SecurityRequirementObject[];\r\n    tags?: TagObject[];\r\n    externalDocs?: ExternalDocumentationObject;\r\n    /** Webhooks added in v. 3.1.0 */\r\n    webhooks?: PathsObject;\r\n}\r\nexport interface InfoObject extends ISpecificationExtension {\r\n    title: string;\r\n    description?: string;\r\n    termsOfService?: string;\r\n    contact?: ContactObject;\r\n    license?: LicenseObject;\r\n    version: string;\r\n}\r\nexport interface ContactObject extends ISpecificationExtension {\r\n    name?: string;\r\n    url?: string;\r\n    email?: string;\r\n}\r\nexport interface LicenseObject extends ISpecificationExtension {\r\n    name: string;\r\n    identifier?: string;\r\n    url?: string;\r\n}\r\n\r\nexport interface ComponentsObject extends ISpecificationExtension {\r\n    schemas?: { [schema: string]: SchemaObject | ReferenceObject };\r\n    responses?: { [response: string]: ResponseObject | ReferenceObject };\r\n    parameters?: { [parameter: string]: ParameterObject | ReferenceObject };\r\n    examples?: { [example: string]: ExampleObject | ReferenceObject };\r\n    requestBodies?: { [request: string]: RequestBodyObject | ReferenceObject };\r\n    headers?: { [header: string]: HeaderObject | ReferenceObject };\r\n    securitySchemes?: { [securityScheme: string]: SecuritySchemeObject | ReferenceObject };\r\n    links?: { [link: string]: LinkObject | ReferenceObject };\r\n    callbacks?: { [callback: string]: CallbackObject | ReferenceObject };\r\n    pathItems?: { [pathItem: string]: PathItemObject | ReferenceObject };\r\n}\r\n\r\n/**\r\n * Rename it to Paths Object to be consistent with the spec\r\n * See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#pathsObject\r\n */\r\nexport interface PathsObject extends ISpecificationExtension {\r\n    // [path: string]: PathItemObject;\r\n    [path: string]: PathItemObject\r\n}\r\n\r\n/**\r\n * @deprecated\r\n * Create a type alias for backward compatibility\r\n */\r\nexport type PathObject = PathsObject;\r\n\r\nexport function getPath(\r\n    pathsObject: PathsObject | undefined,\r\n    path: string\r\n): PathItemObject | undefined {\r\n    if (SpecificationExtension.isValidExtension(path)) {\r\n        return undefined;\r\n    }\r\n    return pathsObject ? (pathsObject[path] as PathItemObject) : undefined;\r\n}\r\n\r\nexport interface PathItemObject extends ISpecificationExtension {\r\n    $ref?: string;\r\n    summary?: string;\r\n    description?: string;\r\n    get?: OperationObject;\r\n    put?: OperationObject;\r\n    post?: OperationObject;\r\n    delete?: OperationObject;\r\n    options?: OperationObject;\r\n    head?: OperationObject;\r\n    patch?: OperationObject;\r\n    trace?: OperationObject;\r\n    servers?: ServerObject[];\r\n    parameters?: (ParameterObject | ReferenceObject)[];\r\n}\r\nexport interface OperationObject extends ISpecificationExtension {\r\n    tags?: string[];\r\n    summary?: string;\r\n    description?: string;\r\n    externalDocs?: ExternalDocumentationObject;\r\n    operationId?: string;\r\n    parameters?: (ParameterObject | ReferenceObject)[];\r\n    requestBody?: RequestBodyObject | ReferenceObject;\r\n    responses?: ResponsesObject;\r\n    callbacks?: CallbacksObject;\r\n    deprecated?: boolean;\r\n    security?: SecurityRequirementObject[];\r\n    servers?: ServerObject[];\r\n}\r\nexport interface ExternalDocumentationObject extends ISpecificationExtension {\r\n    description?: string;\r\n    url: string;\r\n}\r\n\r\n/**\r\n * The location of a parameter.\r\n * Possible values are \"query\", \"header\", \"path\" or \"cookie\".\r\n * Specification:\r\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations\r\n */\r\nexport type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';\r\n\r\n/**\r\n * The style of a parameter.\r\n * Describes how the parameter value will be serialized.\r\n * (serialization is not implemented yet)\r\n * Specification:\r\n * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values\r\n */\r\nexport type ParameterStyle =\r\n    | 'matrix'\r\n    | 'label'\r\n    | 'form'\r\n    | 'simple'\r\n    | 'spaceDelimited'\r\n    | 'pipeDelimited'\r\n    | 'deepObject';\r\n\r\nexport interface BaseParameterObject extends ISpecificationExtension {\r\n    description?: string;\r\n    required?: boolean;\r\n    deprecated?: boolean;\r\n    allowEmptyValue?: boolean;\r\n\r\n    style?: ParameterStyle; // \"matrix\" | \"label\" | \"form\" | \"simple\" | \"spaceDelimited\" | \"pipeDelimited\" | \"deepObject\";\r\n    explode?: boolean;\r\n    allowReserved?: boolean;\r\n    schema?: SchemaObject | ReferenceObject;\r\n    examples?: { [param: string]: ExampleObject | ReferenceObject };\r\n    example?: any;\r\n    content?: ContentObject;\r\n}\r\n\r\nexport interface ParameterObject extends BaseParameterObject {\r\n    name: string;\r\n    in: ParameterLocation; // \"query\" | \"header\" | \"path\" | \"cookie\";\r\n}\r\nexport interface RequestBodyObject extends ISpecificationExtension {\r\n    description?: string;\r\n    content: ContentObject;\r\n    required?: boolean;\r\n}\r\nexport interface ContentObject {\r\n    [mediatype: string]: MediaTypeObject;\r\n}\r\nexport interface MediaTypeObject extends ISpecificationExtension {\r\n    schema?: SchemaObject | ReferenceObject;\r\n    examples?: ExamplesObject;\r\n    example?: any;\r\n    encoding?: EncodingObject;\r\n}\r\nexport interface EncodingObject extends ISpecificationExtension {\r\n    // [property: string]: EncodingPropertyObject;\r\n    [property: string]: EncodingPropertyObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface EncodingPropertyObject {\r\n    contentType?: string;\r\n    headers?: { [key: string]: HeaderObject | ReferenceObject };\r\n    style?: string;\r\n    explode?: boolean;\r\n    allowReserved?: boolean;\r\n    [key: string]: any; // (any) = Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ResponsesObject extends ISpecificationExtension {\r\n    default?: ResponseObject | ReferenceObject;\r\n\r\n    // [statuscode: string]: ResponseObject | ReferenceObject;\r\n    [statuscode: string]: ResponseObject | ReferenceObject | any; // (any) = Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ResponseObject extends ISpecificationExtension {\r\n    description: string;\r\n    headers?: HeadersObject;\r\n    content?: ContentObject;\r\n    links?: LinksObject;\r\n}\r\nexport interface CallbacksObject extends ISpecificationExtension {\r\n    // [name: string]: CallbackObject | ReferenceObject;\r\n    [name: string]: CallbackObject | ReferenceObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface CallbackObject extends ISpecificationExtension {\r\n    // [name: string]: PathItemObject;\r\n    [name: string]: PathItemObject | any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface HeadersObject {\r\n    [name: string]: HeaderObject | ReferenceObject;\r\n}\r\nexport interface ExampleObject {\r\n    summary?: string;\r\n    description?: string;\r\n    value?: any;\r\n    externalValue?: string;\r\n    [property: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface LinksObject {\r\n    [name: string]: LinkObject | ReferenceObject;\r\n}\r\nexport interface LinkObject extends ISpecificationExtension {\r\n    operationRef?: string;\r\n    operationId?: string;\r\n    parameters?: LinkParametersObject;\r\n    requestBody?: any | string;\r\n    description?: string;\r\n    server?: ServerObject;\r\n    [property: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface LinkParametersObject {\r\n    [name: string]: any | string;\r\n}\r\n \r\nexport interface HeaderObject extends BaseParameterObject {\r\n    $ref?: string;\r\n}\r\nexport interface TagObject extends ISpecificationExtension {\r\n    name: string;\r\n    description?: string;\r\n    externalDocs?: ExternalDocumentationObject;\r\n    [extension: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface ExamplesObject {\r\n    [name: string]: ExampleObject | ReferenceObject;\r\n}\r\n\r\nexport interface ReferenceObject {\r\n    $ref: string;\r\n    summary?: string;\r\n    description?: string;\r\n}\r\n\r\n/**\r\n * A type guard to check if the given value is a `ReferenceObject`.\r\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\r\n *\r\n * @param obj The value to check.\r\n */\r\nexport function isReferenceObject(obj: any): obj is ReferenceObject {\r\n    return Object.prototype.hasOwnProperty.call(obj, '$ref');\r\n}\r\n\r\nexport type SchemaObjectType =\r\n    | 'integer'\r\n    | 'number'\r\n    | 'string'\r\n    | 'boolean'\r\n    | 'object'\r\n    | 'null'\r\n    | 'array';\r\n\r\nexport interface SchemaObject extends ISpecificationExtension {\r\n    $ref?: string,\r\n    discriminator?: DiscriminatorObject;\r\n    readOnly?: boolean;\r\n    writeOnly?: boolean;\r\n    xml?: XmlObject;\r\n    externalDocs?: ExternalDocumentationObject;\r\n    /** @deprecated use examples instead */\r\n    example?: any;\r\n    examples?: any[];\r\n    deprecated?: boolean;\r\n\r\n    type?: SchemaObjectType | SchemaObjectType[];\r\n    format?:\r\n        | 'int32'\r\n        | 'int64'\r\n        | 'float'\r\n        | 'double'\r\n        | 'byte'\r\n        | 'binary'\r\n        | 'date'\r\n        | 'date-time'\r\n        | 'password'\r\n        | string;\r\n    allOf?: (SchemaObject | ReferenceObject)[];\r\n    oneOf?: (SchemaObject | ReferenceObject)[];\r\n    anyOf?: (SchemaObject | ReferenceObject)[];\r\n    not?: SchemaObject | ReferenceObject;\r\n    items?: SchemaObject | ReferenceObject;\r\n    properties?: { [propertyName: string]: SchemaObject | ReferenceObject };\r\n    additionalProperties?: SchemaObject | ReferenceObject | boolean;\r\n    propertyNames?: SchemaObject | ReferenceObject;\r\n    description?: string;\r\n    default?: any;\r\n\r\n    title?: string;\r\n    multipleOf?: number;\r\n    maximum?: number;\r\n    const?: any;\r\n    /** @desc In OpenAPI 3.1: number */\r\n    exclusiveMaximum?: number;\r\n    minimum?: number;\r\n    /** @desc In OpenAPI 3.1: number */\r\n    exclusiveMinimum?: number;\r\n    maxLength?: number;\r\n    minLength?: number;\r\n    pattern?: string;\r\n    maxItems?: number;\r\n    minItems?: number;\r\n    uniqueItems?: boolean;\r\n    maxProperties?: number;\r\n    minProperties?: number;\r\n    required?: string[];\r\n    enum?: any[];\r\n    prefixItems?: (SchemaObject | ReferenceObject)[];\r\n    /** \r\n     * @desc JSON Schema compliant Content-Type, optional when specified as a key of ContentObject\r\n     * @example image/png\r\n     */\r\n    contentMediaType?: string;\r\n    /**\r\n     * @desc Specifies the Content-Encoding for the schema, supports all encodings from RFC4648, and \"quoted-printable\" from RFC2045\r\n     * @override format\r\n     * @see https://datatracker.ietf.org/doc/html/rfc4648\r\n     * @see https://datatracker.ietf.org/doc/html/rfc2045#section-6.7\r\n     * @example base64\r\n     */\r\n    contentEncoding?: string;    \r\n}\r\n\r\n/**\r\n * A type guard to check if the given object is a `SchemaObject`.\r\n * Useful to distinguish from `ReferenceObject` values that can be used\r\n * in most places where `SchemaObject` is allowed.\r\n *\r\n * See https://www.typescriptlang.org/docs/handbook/advanced-types.html#type-guards-and-differentiating-types\r\n *\r\n * @param schema The value to check.\r\n */\r\nexport function isSchemaObject(schema: SchemaObject | ReferenceObject): schema is SchemaObject {\r\n    return !Object.prototype.hasOwnProperty.call(schema, '$ref');\r\n}\r\n\r\nexport interface SchemasObject {\r\n    [schema: string]: SchemaObject;\r\n}\r\n\r\nexport interface DiscriminatorObject {\r\n    propertyName: string;\r\n    mapping?: { [key: string]: string };\r\n}\r\n\r\nexport interface XmlObject extends ISpecificationExtension {\r\n    name?: string;\r\n    namespace?: string;\r\n    prefix?: string;\r\n    attribute?: boolean;\r\n    wrapped?: boolean;\r\n}\r\nexport type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';\r\n\r\nexport interface SecuritySchemeObject extends ISpecificationExtension {\r\n    type: SecuritySchemeType;\r\n    description?: string;\r\n    name?: string; // required only for apiKey\r\n    in?: string; // required only for apiKey\r\n    scheme?: string; // required only for http\r\n    bearerFormat?: string;\r\n    flows?: OAuthFlowsObject; // required only for oauth2\r\n    openIdConnectUrl?: string; // required only for openIdConnect\r\n}\r\nexport interface OAuthFlowsObject extends ISpecificationExtension {\r\n    implicit?: OAuthFlowObject;\r\n    password?: OAuthFlowObject;\r\n    clientCredentials?: OAuthFlowObject;\r\n    authorizationCode?: OAuthFlowObject;\r\n}\r\nexport interface OAuthFlowObject extends ISpecificationExtension {\r\n    authorizationUrl?: string;\r\n    tokenUrl?: string;\r\n    refreshUrl?: string;\r\n    scopes: ScopesObject;\r\n}\r\nexport interface ScopesObject extends ISpecificationExtension {\r\n    [scope: string]: any; // Hack for allowing ISpecificationExtension\r\n}\r\nexport interface SecurityRequirementObject {\r\n    [name: string]: string[];\r\n}\r\n"],"names":["OpenApiBuilder","doc","replacer","space","options","yaml","v","match","openApiVersion","info","contact","license","title","description","termsOfService","version","path","pathItem","name","schema","response","parameter","example","reqBody","header","secScheme","link","callback","server","tag","extDoc","webhook","webhookItem","getPath","pathsObject","SpecificationExtension","isReferenceObject","obj","isSchemaObject"],"mappings":";;AAMO,MAAMA,EAAe;AAAA,EAGxB,OAAO,OAAOC,GAAwC;AAClD,WAAO,IAAID,EAAeC,CAAG;AAAA,EAAA;AAAA,EAGjC,YAAYA,GAAwB;AAChC,SAAK,UAAUA,K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