function serialize(withFunctionWrapper = !0) {
    let reg = '',
        map = '',
        ctx = '';


    if (this.reg.size) {

        let type;
        for (const key of this.reg.keys()) {
            type || (type = typeof key);
            reg += (reg ? ',' : '') + ("string" === type ? '"' + key + '"' : key);
        }
        reg = 'index.reg=new Set([' + reg + ']);';

        map = parse_map(this.map, type);
        map = "index.map=new Map([" + map + "]);";

        for (const context of this.ctx.entries()) {
            const key_ctx = context[0],
                  value_ctx = context[1];

            let ctx_map = parse_map(value_ctx, type);
            ctx_map = "new Map([" + ctx_map + "])";
            ctx_map = '["' + key_ctx + '",' + ctx_map + ']';
            ctx += (ctx ? ',' : '') + ctx_map;
        }
        ctx = "index.ctx=new Map([" + ctx + "]);";
    }

    return withFunctionWrapper ? "function inject(index){" + reg + map + ctx + "}" : reg + map + ctx;
}
@this {Index}
@param {boolean} withFunctionWrapper
@return {string}