@kewacode/guard 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +29 -0
- package/package.json +2 -1
- package/src/constants.ts +1 -0
- package/src/decorators/kewa-rate-limit.decorator.ts +11 -0
- package/src/guards/kewa-rate-limit.guard.ts +62 -0
- package/src/index.ts +5 -0
- package/src/interfaces/kewa-options.interface.ts +5 -0
- package/src/kewa-guard.module.ts +29 -0
- package/src/kewa-guard.service.ts +80 -0
- package/tsconfig.lib.json +10 -0
- package/index.js +0 -229
package/Readme.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 🛡️ Kewa Guard
|
|
2
|
+
|
|
3
|
+
> **Distributed Rate Limiter for NestJS using Redis & Sliding Window Algorithm.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@kewa/guard)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://nestjs.com/)
|
|
8
|
+
|
|
9
|
+
**Kewa Guard** é uma biblioteca leve e performática para proteção de rotas em aplicações **NestJS**. Diferente de limitadores simples em memória, ele utiliza **Redis** com scripts **Lua** atômicos para garantir precisão absoluta em ambientes distribuídos (cluster/microservices).
|
|
10
|
+
|
|
11
|
+
## 🚀 Features
|
|
12
|
+
|
|
13
|
+
- 🕷 **Distributed:** Funciona perfeitamente com múltiplas instâncias da API.
|
|
14
|
+
- ⚡ **Atomic:** Usa Lua Scripts para evitar _Race Conditions_.
|
|
15
|
+
- 🪟 **Sliding Window Log:** Algoritmo preciso (não reseta todos os limites no minuto cheio).
|
|
16
|
+
- 🔌 **Plug & Play:** Configuração simples via Módulo Dinâmico.
|
|
17
|
+
- 🛑 **Smart Headers:** Retorna headers padrão (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`).
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 📦 Instalação
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @kewa/guard ioredis
|
|
25
|
+
# ou
|
|
26
|
+
pnpm add @kewa/guard ioredis
|
|
27
|
+
# ou
|
|
28
|
+
yarn add @kewa/guard ioredis
|
|
29
|
+
```
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kewacode/guard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Distributed Rate Limiter for NestJS using Redis",
|
|
5
5
|
"author": "João Bertan",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"types": "./index.d.ts",
|
|
7
8
|
"peerDependencies": {
|
|
8
9
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
9
10
|
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const KEWA_REDIS_CLIENT = 'REDIS_CLIENT';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SetMetadata } from '@nestjs/common';
|
|
2
|
+
|
|
3
|
+
export const KEWA_RATE_LIMIT_KEY = 'kewa_rate_limit_key';
|
|
4
|
+
|
|
5
|
+
export interface KewaRateLimitOptions {
|
|
6
|
+
limit: number;
|
|
7
|
+
ttl: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const KewaRateLimit = (options: KewaRateLimitOptions) =>
|
|
11
|
+
SetMetadata(KEWA_RATE_LIMIT_KEY, options);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CanActivate,
|
|
3
|
+
ExecutionContext,
|
|
4
|
+
HttpException,
|
|
5
|
+
HttpStatus,
|
|
6
|
+
Injectable,
|
|
7
|
+
} from '@nestjs/common';
|
|
8
|
+
import { Reflector } from '@nestjs/core';
|
|
9
|
+
import { Request, Response } from 'express';
|
|
10
|
+
import {
|
|
11
|
+
KEWA_RATE_LIMIT_KEY,
|
|
12
|
+
KewaRateLimitOptions,
|
|
13
|
+
} from '../decorators/kewa-rate-limit.decorator';
|
|
14
|
+
import { KewaGuardService } from '../kewa-guard.service';
|
|
15
|
+
|
|
16
|
+
@Injectable()
|
|
17
|
+
export class KewaRateLimitGuard implements CanActivate {
|
|
18
|
+
constructor(
|
|
19
|
+
private reflector: Reflector,
|
|
20
|
+
private kewaGuardService: KewaGuardService,
|
|
21
|
+
) {}
|
|
22
|
+
|
|
23
|
+
async canActivate(context: ExecutionContext): Promise<boolean> {
|
|
24
|
+
const options = this.reflector.get<KewaRateLimitOptions>(
|
|
25
|
+
KEWA_RATE_LIMIT_KEY,
|
|
26
|
+
context.getHandler(),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
if (!options) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const { limit, ttl } = options;
|
|
34
|
+
|
|
35
|
+
const request = context.switchToHttp().getRequest<Request>();
|
|
36
|
+
const response = context.switchToHttp().getResponse<Response>();
|
|
37
|
+
|
|
38
|
+
const ip = request.ip || request.connection.remoteAddress;
|
|
39
|
+
|
|
40
|
+
const key = `rate_limit:${ip}:${context.getClass().name}.${context.getHandler().name}`;
|
|
41
|
+
|
|
42
|
+
const { allowed, remaining, resetAt } =
|
|
43
|
+
await this.kewaGuardService.checkLimit(key, limit, ttl);
|
|
44
|
+
|
|
45
|
+
response.header('X-RateLimit-Limit', limit.toString());
|
|
46
|
+
response.header('X-RateLimit-Remaining', remaining.toString());
|
|
47
|
+
response.header('X-RateLimit-Reset', resetAt.toString());
|
|
48
|
+
|
|
49
|
+
if (!allowed) {
|
|
50
|
+
throw new HttpException(
|
|
51
|
+
{
|
|
52
|
+
statusCode: HttpStatus.TOO_MANY_REQUESTS,
|
|
53
|
+
error: 'Too Many Requests',
|
|
54
|
+
message: `Você excedeu o limite de ${limit} requisições em ${ttl} segundos.`,
|
|
55
|
+
},
|
|
56
|
+
HttpStatus.TOO_MANY_REQUESTS,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DynamicModule, Global, Module } from '@nestjs/common';
|
|
2
|
+
import Redis from 'ioredis';
|
|
3
|
+
import { KEWA_REDIS_CLIENT } from './constants';
|
|
4
|
+
import { KewaGuardService } from './kewa-guard.service';
|
|
5
|
+
import { KewaGuardOptions } from './interfaces/kewa-options.interface';
|
|
6
|
+
|
|
7
|
+
@Global()
|
|
8
|
+
@Module({})
|
|
9
|
+
export class KewaGuardModule {
|
|
10
|
+
static register(options: KewaGuardOptions): DynamicModule {
|
|
11
|
+
return {
|
|
12
|
+
module: KewaGuardModule,
|
|
13
|
+
providers: [
|
|
14
|
+
{
|
|
15
|
+
provide: KEWA_REDIS_CLIENT,
|
|
16
|
+
useFactory: () => {
|
|
17
|
+
return new Redis({
|
|
18
|
+
host: options.host,
|
|
19
|
+
port: options.port,
|
|
20
|
+
password: options.password,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
KewaGuardService,
|
|
25
|
+
],
|
|
26
|
+
exports: [KewaGuardService],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Inject, Injectable, OnModuleDestroy } from '@nestjs/common';
|
|
2
|
+
import Redis from 'ioredis';
|
|
3
|
+
import { KEWA_REDIS_CLIENT } from './constants';
|
|
4
|
+
|
|
5
|
+
interface RateLimitResult {
|
|
6
|
+
allowed: boolean;
|
|
7
|
+
remaining: number;
|
|
8
|
+
resetAt: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Injectable()
|
|
12
|
+
export class KewaGuardService implements OnModuleDestroy {
|
|
13
|
+
constructor(@Inject(KEWA_REDIS_CLIENT) private readonly redis: Redis) {}
|
|
14
|
+
|
|
15
|
+
onModuleDestroy() {
|
|
16
|
+
this.redis.disconnect();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async checkLimit(
|
|
20
|
+
key: string,
|
|
21
|
+
limit: number,
|
|
22
|
+
ttlSeconds: number,
|
|
23
|
+
): Promise<RateLimitResult> {
|
|
24
|
+
const now = Date.now();
|
|
25
|
+
const windowStart = now - ttlSeconds * 1000;
|
|
26
|
+
|
|
27
|
+
const luaScript = `
|
|
28
|
+
local key = KEYS[1]
|
|
29
|
+
local limit = tonumber(ARGV[1])
|
|
30
|
+
local now = tonumber(ARGV[2])
|
|
31
|
+
local windowStart = tonumber(ARGV[3])
|
|
32
|
+
local ttl = tonumber(ARGV[4])
|
|
33
|
+
|
|
34
|
+
redis.call('ZREMRANGEBYSCORE', key, 0, windowStart)
|
|
35
|
+
|
|
36
|
+
local currentCount = redis.call('ZCARD', key)
|
|
37
|
+
|
|
38
|
+
local allowed = 1
|
|
39
|
+
local remaining = 0
|
|
40
|
+
|
|
41
|
+
if currentCount >= limit then
|
|
42
|
+
allowed = 0
|
|
43
|
+
remaining = 0
|
|
44
|
+
else
|
|
45
|
+
redis.call('ZADD', key, now, now)
|
|
46
|
+
redis.call('EXPIRE', key, ttl)
|
|
47
|
+
allowed = 1
|
|
48
|
+
remaining = limit - (currentCount + 1)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
local resetAt = math.floor((now + (ttl * 1000)) / 1000)
|
|
52
|
+
|
|
53
|
+
return { allowed, remaining, resetAt }
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
const result = (await this.redis.eval(
|
|
57
|
+
luaScript,
|
|
58
|
+
1,
|
|
59
|
+
key,
|
|
60
|
+
limit,
|
|
61
|
+
now,
|
|
62
|
+
windowStart,
|
|
63
|
+
ttlSeconds,
|
|
64
|
+
)) as [number, number, number];
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
allowed: result[0] === 1,
|
|
68
|
+
remaining: result[1],
|
|
69
|
+
resetAt: result[2],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async ping() {
|
|
74
|
+
return await this.redis.ping();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
getClient() {
|
|
78
|
+
return this.redis;
|
|
79
|
+
}
|
|
80
|
+
}
|
package/index.js
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ var __webpack_modules__ = ([
|
|
4
|
-
/* 0 */
|
|
5
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23
|
-
__exportStar(__webpack_require__(1), exports);
|
|
24
|
-
__exportStar(__webpack_require__(5), exports);
|
|
25
|
-
__exportStar(__webpack_require__(6), exports);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/***/ }),
|
|
29
|
-
/* 1 */
|
|
30
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
34
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
35
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
36
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
37
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
38
|
-
};
|
|
39
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
|
-
};
|
|
42
|
-
var KewaGuardModule_1;
|
|
43
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
44
|
-
exports.KewaGuardModule = void 0;
|
|
45
|
-
const common_1 = __webpack_require__(2);
|
|
46
|
-
const ioredis_1 = __importDefault(__webpack_require__(3));
|
|
47
|
-
const constants_1 = __webpack_require__(4);
|
|
48
|
-
const kewa_guard_service_1 = __webpack_require__(5);
|
|
49
|
-
let KewaGuardModule = KewaGuardModule_1 = class KewaGuardModule {
|
|
50
|
-
static register(options) {
|
|
51
|
-
return {
|
|
52
|
-
module: KewaGuardModule_1,
|
|
53
|
-
providers: [
|
|
54
|
-
{
|
|
55
|
-
provide: constants_1.KEWA_REDIS_CLIENT,
|
|
56
|
-
useFactory: () => {
|
|
57
|
-
return new ioredis_1.default({
|
|
58
|
-
host: options.host,
|
|
59
|
-
port: options.port,
|
|
60
|
-
password: options.password,
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
kewa_guard_service_1.KewaGuardService,
|
|
65
|
-
],
|
|
66
|
-
exports: [kewa_guard_service_1.KewaGuardService],
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
exports.KewaGuardModule = KewaGuardModule;
|
|
71
|
-
exports.KewaGuardModule = KewaGuardModule = KewaGuardModule_1 = __decorate([
|
|
72
|
-
(0, common_1.Global)(),
|
|
73
|
-
(0, common_1.Module)({})
|
|
74
|
-
], KewaGuardModule);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/***/ }),
|
|
78
|
-
/* 2 */
|
|
79
|
-
/***/ ((module) => {
|
|
80
|
-
|
|
81
|
-
module.exports = require("@nestjs/common");
|
|
82
|
-
|
|
83
|
-
/***/ }),
|
|
84
|
-
/* 3 */
|
|
85
|
-
/***/ ((module) => {
|
|
86
|
-
|
|
87
|
-
module.exports = require("ioredis");
|
|
88
|
-
|
|
89
|
-
/***/ }),
|
|
90
|
-
/* 4 */
|
|
91
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
95
|
-
exports.KEWA_REDIS_CLIENT = void 0;
|
|
96
|
-
exports.KEWA_REDIS_CLIENT = 'REDIS_CLIENT';
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/***/ }),
|
|
100
|
-
/* 5 */
|
|
101
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
105
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
106
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
107
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
108
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
109
|
-
};
|
|
110
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
111
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
112
|
-
};
|
|
113
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
114
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
115
|
-
};
|
|
116
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
117
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
118
|
-
};
|
|
119
|
-
var _a;
|
|
120
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
121
|
-
exports.KewaGuardService = void 0;
|
|
122
|
-
const common_1 = __webpack_require__(2);
|
|
123
|
-
const ioredis_1 = __importDefault(__webpack_require__(3));
|
|
124
|
-
const constants_1 = __webpack_require__(4);
|
|
125
|
-
let KewaGuardService = class KewaGuardService {
|
|
126
|
-
redis;
|
|
127
|
-
constructor(redis) {
|
|
128
|
-
this.redis = redis;
|
|
129
|
-
}
|
|
130
|
-
onModuleDestroy() {
|
|
131
|
-
this.redis.disconnect();
|
|
132
|
-
}
|
|
133
|
-
async checkLimit(key, limit, ttlSeconds) {
|
|
134
|
-
const now = Date.now();
|
|
135
|
-
const windowStart = now - ttlSeconds * 1000;
|
|
136
|
-
const luaScript = `
|
|
137
|
-
local key = KEYS[1]
|
|
138
|
-
local limit = tonumber(ARGV[1])
|
|
139
|
-
local now = tonumber(ARGV[2])
|
|
140
|
-
local windowStart = tonumber(ARGV[3])
|
|
141
|
-
local ttl = tonumber(ARGV[4])
|
|
142
|
-
|
|
143
|
-
redis.call('ZREMRANGEBYSCORE', key, 0, windowStart)
|
|
144
|
-
|
|
145
|
-
local currentCount = redis.call('ZCARD', key)
|
|
146
|
-
|
|
147
|
-
local allowed = 1
|
|
148
|
-
local remaining = 0
|
|
149
|
-
|
|
150
|
-
if currentCount >= limit then
|
|
151
|
-
allowed = 0
|
|
152
|
-
remaining = 0
|
|
153
|
-
else
|
|
154
|
-
redis.call('ZADD', key, now, now)
|
|
155
|
-
redis.call('EXPIRE', key, ttl)
|
|
156
|
-
allowed = 1
|
|
157
|
-
remaining = limit - (currentCount + 1)
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
local resetAt = math.floor((now + (ttl * 1000)) / 1000)
|
|
161
|
-
|
|
162
|
-
return { allowed, remaining, resetAt }
|
|
163
|
-
`;
|
|
164
|
-
const result = (await this.redis.eval(luaScript, 1, key, limit, now, windowStart, ttlSeconds));
|
|
165
|
-
return {
|
|
166
|
-
allowed: result[0] === 1,
|
|
167
|
-
remaining: result[1],
|
|
168
|
-
resetAt: result[2],
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
async ping() {
|
|
172
|
-
return await this.redis.ping();
|
|
173
|
-
}
|
|
174
|
-
getClient() {
|
|
175
|
-
return this.redis;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
exports.KewaGuardService = KewaGuardService;
|
|
179
|
-
exports.KewaGuardService = KewaGuardService = __decorate([
|
|
180
|
-
(0, common_1.Injectable)(),
|
|
181
|
-
__param(0, (0, common_1.Inject)(constants_1.KEWA_REDIS_CLIENT)),
|
|
182
|
-
__metadata("design:paramtypes", [typeof (_a = typeof ioredis_1.default !== "undefined" && ioredis_1.default) === "function" ? _a : Object])
|
|
183
|
-
], KewaGuardService);
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
/***/ }),
|
|
187
|
-
/* 6 */
|
|
188
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/***/ })
|
|
195
|
-
/******/ ]);
|
|
196
|
-
/************************************************************************/
|
|
197
|
-
/******/ // The module cache
|
|
198
|
-
/******/ var __webpack_module_cache__ = {};
|
|
199
|
-
/******/
|
|
200
|
-
/******/ // The require function
|
|
201
|
-
/******/ function __webpack_require__(moduleId) {
|
|
202
|
-
/******/ // Check if module is in cache
|
|
203
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
204
|
-
/******/ if (cachedModule !== undefined) {
|
|
205
|
-
/******/ return cachedModule.exports;
|
|
206
|
-
/******/ }
|
|
207
|
-
/******/ // Create a new module (and put it into the cache)
|
|
208
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
209
|
-
/******/ // no module.id needed
|
|
210
|
-
/******/ // no module.loaded needed
|
|
211
|
-
/******/ exports: {}
|
|
212
|
-
/******/ };
|
|
213
|
-
/******/
|
|
214
|
-
/******/ // Execute the module function
|
|
215
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
216
|
-
/******/
|
|
217
|
-
/******/ // Return the exports of the module
|
|
218
|
-
/******/ return module.exports;
|
|
219
|
-
/******/ }
|
|
220
|
-
/******/
|
|
221
|
-
/************************************************************************/
|
|
222
|
-
/******/
|
|
223
|
-
/******/ // startup
|
|
224
|
-
/******/ // Load entry module and return exports
|
|
225
|
-
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
226
|
-
/******/ var __webpack_exports__ = __webpack_require__(0);
|
|
227
|
-
/******/
|
|
228
|
-
/******/ })()
|
|
229
|
-
;
|