var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
import React from 'react';
import { render, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { Mode } from '@reltio/mdm-sdk';
import { ImageDetailsView } from './ImageDetailsView';
import { MdmModuleProvider } from '../contexts/MdmModuleContext';
import { attributeType, complexAttributeValues, simpleAttributeValues, smallCombinedAttributeValues } from './attributes.test-data';
var defaultProps = {
    setCurrentAttributeValueUri: jest.fn(),
    handleSetAsDefault: jest.fn(),
    currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/4',
    attributeType: attributeType,
    attributeValues: simpleAttributeValues
};
var defaultMdmModuleValues = {
    dependentLookups: {
        editors: {},
        structure: {},
        initedTypeUris: []
    }
};
var defaultMdmModuleActions = {
    modifyAttribute: jest.fn()
};
var setUp = function (_a) {
    var _b = _a === void 0 ? {} : _a, _c = _b.props, props = _c === void 0 ? {} : _c, _d = _b.mdmModuleValues, mdmModuleValues = _d === void 0 ? {} : _d;
    var user = userEvent.setup();
    var Providers = function (_a) {
        var children = _a.children;
        return (React.createElement(MdmModuleProvider, { values: __assign(__assign({}, defaultMdmModuleValues), mdmModuleValues), actions: defaultMdmModuleActions }, children));
    };
    return __assign({ user: user }, render(React.createElement(ImageDetailsView, __assign({}, defaultProps, props)), { wrapper: Providers }));
};
describe('DetailsView tests', function () {
    beforeEach(function () {
        jest.clearAllMocks();
    });
    it('should render DetailsViewSidebar and DetailsViewCarousel with current props', function () {
        setUp();
        expect(screen.getByTestId('thumbnails-container').childNodes).toHaveLength(5);
        expect(screen.getByText('Details')).toBeInTheDocument();
        expect(screen.getByText('Set as default')).toBeInTheDocument();
        expect(screen.getByText('Meta info')).toBeInTheDocument();
        expect(screen.getByText('Mime Type')).toBeInTheDocument();
        expect(screen.getByText('image/jpg')).toBeInTheDocument();
    });
    it('should render DetailsViewSidebar and DetailsViewCarousel with current props if attributeValues empty', function () {
        setUp({ props: { attributeValues: [] } });
        expect(screen.queryByText('thumbnails-container')).not.toBeInTheDocument();
        expect(screen.getByText('Details')).toBeInTheDocument();
        expect(screen.getByText('Set as default')).toBeInTheDocument();
        expect(screen.getByText('Meta info')).toBeInTheDocument();
        expect(screen.queryByText('Mime Type')).not.toBeInTheDocument();
        expect(screen.queryByText('image/jpg')).not.toBeInTheDocument();
    });
    describe('carousel tests', function () {
        it('should render 5 images and render correct main image', function () {
            var container = setUp().container;
            expect(screen.getByTestId('thumbnails-container').childNodes).toHaveLength(5);
            expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#3');
        });
        it('should change currentImageIndex on prevButtonClick', function () { return __awaiter(void 0, void 0, void 0, function () {
            var _a, container, user;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = setUp(), container = _a.container, user = _a.user;
                        expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#3');
                        return [4 /*yield*/, user.click(screen.getByTestId('prev-image-button'))];
                    case 1:
                        _b.sent();
                        expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#2');
                        return [2 /*return*/];
                }
            });
        }); });
        it('should change currentImageIndex on nextButtonClick', function () { return __awaiter(void 0, void 0, void 0, function () {
            var _a, container, user;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = setUp(), container = _a.container, user = _a.user;
                        expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#3');
                        return [4 /*yield*/, user.click(screen.getByTestId('next-image-button'))];
                    case 1:
                        _b.sent();
                        expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#4');
                        return [2 /*return*/];
                }
            });
        }); });
        it('should change currentImageIndex on click on image at carousel', function () { return __awaiter(void 0, void 0, void 0, function () {
            var _a, user, container, firstThumbnail;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = setUp(), user = _a.user, container = _a.container;
                        firstThumbnail = within(screen.getByTestId('thumbnails-container')).getAllByTestId('SvgDefaultImage')[0];
                        return [4 /*yield*/, user.click(firstThumbnail)];
                    case 1:
                        _b.sent();
                        expect(container.querySelector('img.mainImage')).toHaveAttribute('src', '#0');
                        return [2 /*return*/];
                }
            });
        }); });
        it('should not render prev button if current image is first', function () {
            setUp({ props: { currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1' } });
            expect(screen.queryByTestId('prev-image-button')).not.toBeInTheDocument();
        });
        it('should not render next button if current image is last', function () {
            setUp({ props: { currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/5' } });
            expect(screen.queryByTestId('next-image-button')).not.toBeInTheDocument();
        });
    });
    describe('sidebar tests', function () {
        it('should call handleSetAsDefault on click on "Set as default" button', function () { return __awaiter(void 0, void 0, void 0, function () {
            var user;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        user = setUp().user;
                        return [4 /*yield*/, user.click(screen.getByText('Set as default'))];
                    case 1:
                        _a.sent();
                        expect(defaultProps.handleSetAsDefault).toHaveBeenCalledWith(defaultProps.currentAttributeValueUri);
                        return [2 /*return*/];
                }
            });
        }); });
        it('should render system and non-system attributes in view mode', function () {
            setUp({
                props: {
                    attributeValues: complexAttributeValues,
                    currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                },
                mdmModuleValues: { mode: Mode.Viewing }
            });
            expect(screen.getByText('Details')).toBeInTheDocument();
            expect(screen.getByText('Meta info')).toBeInTheDocument();
            expect(screen.queryByText('Attributes')).not.toBeInTheDocument();
            var metaItems = screen.getAllByTestId('image-meta-info-item');
            expect(metaItems).toHaveLength(11);
            var _a = screen.getAllByTestId('one-line-renderer'), stringRenderer = _a[0], longRenderer = _a[1];
            expect(stringRenderer).toHaveTextContent('String');
            expect(longRenderer).toHaveTextContent('Long');
            expect(metaItems.map(function (item) { return item.textContent; })).toEqual([
                expect.stringContaining('Creation Time'),
                'Creation Date06-09-2021',
                'Dimensions500 x 400 pixels',
                'Mime Typeimage/png',
                'Size5.00 KB',
                'Full image URL (S3)link',
                'Preview image URL (S3)link',
                'Small image URL (S3)link',
                'Full image URL (CDN)link',
                'Preview image URL (CDN)link',
                'Small image URL (CDN)link'
            ]);
        });
        it('should render only system attributes in editing mode', function () {
            setUp({
                props: {
                    attributeValues: complexAttributeValues,
                    currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                },
                mdmModuleValues: { mode: Mode.Editing }
            });
            expect(screen.getByText('Details')).toBeInTheDocument();
            expect(screen.getByText('Meta info')).toBeInTheDocument();
            expect(screen.getByText('Attributes')).toBeInTheDocument();
            expect(screen.getAllByTestId('image-meta-info-item')).toHaveLength(11);
            expect(screen.queryByTestId('one-line-renderer')).not.toBeInTheDocument();
        });
        it('should render only system attributes in suggesting mode', function () {
            setUp({
                props: {
                    attributeValues: complexAttributeValues,
                    currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                },
                mdmModuleValues: { mode: Mode.Suggesting }
            });
            expect(screen.getByText('Details')).toBeInTheDocument();
            expect(screen.getByText('Meta info')).toBeInTheDocument();
            expect(screen.getByText('Attributes')).toBeInTheDocument();
            expect(screen.getAllByTestId('image-meta-info-item')).toHaveLength(11);
            expect(screen.queryByTestId('one-line-renderer')).not.toBeInTheDocument();
        });
        it('should render MetaInfo without currentImage.value', function () {
            var attributeValues = [
                { uri: 'entities/mnGiTyT/attributes/ImageGallery/1', value: {} }
            ];
            setUp({ props: { attributeValues: attributeValues, currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1' } });
            expect(screen.getByText('Details')).toBeInTheDocument();
            expect(screen.getByText('Meta info')).toBeInTheDocument();
            expect(screen.queryByTestId('image-meta-info-item')).not.toBeInTheDocument();
        });
        it('should render MetaInfo without values', function () {
            var attributeValues = [
                {
                    uri: '1',
                    value: {
                        CdnUrl: [],
                        CdnUrlPreview: [],
                        CdnUrlThumbnail: [],
                        CreationTimestamp: [],
                        Height: [],
                        MimeType: [],
                        Size: [],
                        Url: [],
                        UrlPreview: [],
                        UrlThumbnail: [],
                        Width: []
                    }
                }
            ];
            setUp({ props: { attributeValues: attributeValues, currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1' } });
            expect(screen.getByText('Details')).toBeInTheDocument();
            expect(screen.getByText('Meta info')).toBeInTheDocument();
            expect(screen.queryByTestId('image-meta-info-item')).not.toBeInTheDocument();
        });
        it('should not show add attributes button in viewing mode', function () {
            setUp({ mdmModuleValues: { mode: Mode.Viewing } });
            expect(screen.queryByText('Attributes')).not.toBeInTheDocument();
        });
        it('should show add attributes button in editing mode', function () {
            setUp({
                props: {
                    attributeValues: smallCombinedAttributeValues,
                    currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                },
                mdmModuleValues: { mode: Mode.Editing }
            });
            expect(screen.getByText('Attributes')).toBeInTheDocument();
            expect(screen.getByText('String')).toBeInTheDocument();
            expect(screen.getByRole('textbox')).toHaveValue('String123');
            expect(screen.getByText('Cancel')).toBeDisabled();
            expect(screen.getByText('Apply')).toBeDisabled();
        });
        it('should show add attributes button in suggesting mode', function () { return __awaiter(void 0, void 0, void 0, function () {
            return __generator(this, function (_a) {
                setUp({
                    props: {
                        attributeValues: smallCombinedAttributeValues,
                        currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                    },
                    mdmModuleValues: { mode: Mode.Suggesting }
                });
                expect(screen.getByText('Attributes')).toBeInTheDocument();
                expect(screen.getByText('String')).toBeInTheDocument();
                expect(screen.getByRole('textbox')).toHaveValue('String123');
                expect(screen.getByText('Cancel')).toBeDisabled();
                expect(screen.getByText('Apply')).toBeDisabled();
                return [2 /*return*/];
            });
        }); });
    });
    it('should show correct attributes in attributes selector', function () { return __awaiter(void 0, void 0, void 0, function () {
        var user, menuitems;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    user = setUp({
                        props: {
                            attributeValues: smallCombinedAttributeValues,
                            currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                        },
                        mdmModuleValues: { mode: Mode.Suggesting }
                    }).user;
                    expect(screen.getByText('String')).toBeInTheDocument();
                    expect(screen.getByRole('textbox')).toHaveValue('String123');
                    return [4 /*yield*/, user.click(screen.getByText('Attributes'))];
                case 1:
                    _a.sent();
                    expect(screen.getByRole('textbox')).toHaveAttribute('placeholder', 'Search & add attributes');
                    menuitems = screen.getAllByRole('menuitem');
                    expect(menuitems[0]).toHaveTextContent('String');
                    expect(menuitems[1]).toHaveTextContent('Long');
                    return [2 /*return*/];
            }
        });
    }); });
    it('should correctly work with values editing apply', function () { return __awaiter(void 0, void 0, void 0, function () {
        var user, cancelButton, applyButton, backdrop, menuitems, _a, titleTextbox, locationTextbox;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    user = setUp({
                        props: {
                            attributeValues: smallCombinedAttributeValues,
                            currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                        },
                        mdmModuleValues: { mode: Mode.Suggesting }
                    }).user;
                    cancelButton = screen.getByText('Cancel');
                    applyButton = screen.getByText('Apply');
                    expect(cancelButton).toBeDisabled();
                    expect(applyButton).toBeDisabled();
                    return [4 /*yield*/, user.click(screen.getByText('Attributes'))];
                case 1:
                    _b.sent();
                    backdrop = screen.getByRole('presentation').firstChild;
                    menuitems = screen.getAllByRole('menuitem');
                    return [4 /*yield*/, user.click(menuitems[1])];
                case 2:
                    _b.sent();
                    return [4 /*yield*/, user.click(backdrop)];
                case 3:
                    _b.sent();
                    expect(cancelButton).not.toBeDisabled();
                    expect(applyButton).not.toBeDisabled();
                    _a = screen.getAllByRole('textbox'), titleTextbox = _a[0], locationTextbox = _a[1];
                    return [4 /*yield*/, user.type(titleTextbox, '{Backspace}{Backspace}{Backspace}')];
                case 4:
                    _b.sent();
                    return [4 /*yield*/, user.type(locationTextbox, '123')];
                case 5:
                    _b.sent();
                    return [4 /*yield*/, user.click(applyButton)];
                case 6:
                    _b.sent();
                    expect(defaultMdmModuleActions.modifyAttribute).toHaveBeenCalledWith({
                        attributeType: defaultProps.attributeType,
                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1',
                        value: {
                            uri: 'entities/mnGiTyT/attributes/ImageGallery/1',
                            value: {
                                CdnUrl: [{ value: 'https://google.com', uri: 'entities/mnGiTyT/attributes/ImageGallery/1/CdnUrl/1' }],
                                String: [
                                    {
                                        value: 'String',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/12'
                                    }
                                ],
                                Long: [
                                    {
                                        value: '123',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/Long',
                                        uri: expect.any(String)
                                    }
                                ]
                            }
                        }
                    });
                    return [2 /*return*/];
            }
        });
    }); });
    it('should correctly work with values editing cancel', function () { return __awaiter(void 0, void 0, void 0, function () {
        var user, cancelButton, applyButton, backdrop, menuitems, _a, titleTextbox, locationTextbox;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    user = setUp({
                        props: {
                            attributeValues: smallCombinedAttributeValues,
                            currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1'
                        },
                        mdmModuleValues: { mode: Mode.Suggesting }
                    }).user;
                    cancelButton = screen.getByText('Cancel');
                    applyButton = screen.getByText('Apply');
                    expect(cancelButton).toBeDisabled();
                    expect(applyButton).toBeDisabled();
                    return [4 /*yield*/, user.click(screen.getByText('Attributes'))];
                case 1:
                    _b.sent();
                    backdrop = screen.getByRole('presentation').firstChild;
                    menuitems = screen.getAllByRole('menuitem');
                    return [4 /*yield*/, user.click(menuitems[1])];
                case 2:
                    _b.sent();
                    return [4 /*yield*/, user.click(backdrop)];
                case 3:
                    _b.sent();
                    expect(cancelButton).not.toBeDisabled();
                    expect(applyButton).not.toBeDisabled();
                    _a = screen.getAllByRole('textbox'), titleTextbox = _a[0], locationTextbox = _a[1];
                    return [4 /*yield*/, user.type(titleTextbox, '{Backspace}{Backspace}{Backspace}')];
                case 4:
                    _b.sent();
                    return [4 /*yield*/, user.type(locationTextbox, 'L1')];
                case 5:
                    _b.sent();
                    return [4 /*yield*/, user.click(cancelButton)];
                case 6:
                    _b.sent();
                    expect(screen.getByRole('textbox')).toHaveValue('String123');
                    return [2 /*return*/];
            }
        });
    }); });
    it('should work correctly with attributes actions', function () { return __awaiter(void 0, void 0, void 0, function () {
        var attributeValues, user, cancelButton, applyButton, backdrop, _a, second, third, longTextBox;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    attributeValues = [
                        {
                            uri: 'entities/mnGiTyT/attributes/ImageGallery/1',
                            value: {
                                CdnUrl: [{ value: 'https://google.com', uri: 'entities/mnGiTyT/attributes/ImageGallery/1/CdnUrl/1' }],
                                String: [
                                    {
                                        value: 'String1',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/11'
                                    },
                                    {
                                        value: 'String2',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/12'
                                    },
                                    {
                                        value: 'String3',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/13'
                                    }
                                ]
                            }
                        }
                    ];
                    user = setUp({
                        props: { attributeValues: attributeValues, currentAttributeValueUri: 'entities/mnGiTyT/attributes/ImageGallery/1' },
                        mdmModuleValues: { mode: Mode.Suggesting }
                    }).user;
                    cancelButton = screen.getByText('Cancel');
                    applyButton = screen.getByText('Apply');
                    expect(cancelButton).toBeDisabled();
                    expect(applyButton).toBeDisabled();
                    return [4 /*yield*/, user.click(screen.getByText('Attributes'))];
                case 1:
                    _b.sent();
                    return [4 /*yield*/, user.click(screen.getByTestId('reltio-add-one-more-simple-attribute-button'))];
                case 2:
                    _b.sent();
                    return [4 /*yield*/, user.click(screen.getAllByTestId('reltio-delete-simple-attribute-button')[0])];
                case 3:
                    _b.sent();
                    backdrop = screen.getByRole('presentation').firstChild;
                    return [4 /*yield*/, user.click(screen.getByText('Long'))];
                case 4:
                    _b.sent();
                    return [4 /*yield*/, user.click(backdrop)];
                case 5:
                    _b.sent();
                    expect(cancelButton).not.toBeDisabled();
                    expect(applyButton).not.toBeDisabled();
                    _a = screen.getAllByRole('textbox'), second = _a[1], third = _a[2], longTextBox = _a[3];
                    return [4 /*yield*/, user.type(second, '2')];
                case 6:
                    _b.sent();
                    return [4 /*yield*/, user.type(third, '3')];
                case 7:
                    _b.sent();
                    return [4 /*yield*/, user.type(longTextBox, '4')];
                case 8:
                    _b.sent();
                    return [4 /*yield*/, user.click(applyButton)];
                case 9:
                    _b.sent();
                    expect(defaultMdmModuleActions.modifyAttribute).toHaveBeenCalledWith({
                        attributeType: defaultProps.attributeType,
                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1',
                        value: {
                            uri: 'entities/mnGiTyT/attributes/ImageGallery/1',
                            value: {
                                CdnUrl: [{ value: 'https://google.com', uri: 'entities/mnGiTyT/attributes/ImageGallery/1/CdnUrl/1' }],
                                String: [
                                    {
                                        value: 'String2',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/12'
                                    },
                                    {
                                        value: 'String32',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: 'entities/mnGiTyT/attributes/ImageGallery/1/String/13'
                                    },
                                    {
                                        value: '3',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/String',
                                        uri: expect.any(String)
                                    }
                                ],
                                Long: [
                                    {
                                        value: '4',
                                        type: 'configuration/entityTypes/HCP/attributes/ImageGallery/attributes/Long',
                                        uri: expect.any(String)
                                    }
                                ]
                            }
                        }
                    });
                    return [2 /*return*/];
            }
        });
    }); });
});
