From 3cc3879580b2c9026db9d9f9f24ae626fe7d6e01 Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 5 Jun 2024 01:23:53 -0700 Subject: [PATCH 01/34] Updagting the studio page (#286) Co-authored-by: Ethan Jones --- studio/index.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/studio/index.html b/studio/index.html index e7ccdb6e..b6747dd8 100644 --- a/studio/index.html +++ b/studio/index.html @@ -1,6 +1,6 @@ --- layout: default -title: WireMock Studio +title: WireMock Studio is now WireMock Cloud description: WireMock Studio is a tool for building and running mock APIs on your desktop or in your cluster. --- @@ -16,17 +16,15 @@
-

Studio

+

Cloud

-

is an IDE for your mock APIs.

-

is an IDE for your

-

mock APIs.

+

is an API productivity platform powered by WireMock.

- It provides management of multiple mock APIs, support for Swagger, OpenAPI, Postman and JWT, and a full web UI that's accessible to non-coders. + WireMock Studio has been replaced by WireMock Cloud. From Git sync to API prototyping to chaos testing and more, WireMock Cloud brings the power of mocking to every stage of building your application.

From 21ddc0da51b25355278fcb1c6864a5374185ef0c Mon Sep 17 00:00:00 2001 From: viktormelnychuk Date: Thu, 6 Jun 2024 20:33:29 +0300 Subject: [PATCH 02/34] update docs --- _docs/request-matching.md | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/_docs/request-matching.md b/_docs/request-matching.md index b781ce70..a0b2562d 100644 --- a/_docs/request-matching.md +++ b/_docs/request-matching.md @@ -987,6 +987,46 @@ The full list of comparison types used by default is as follows: `CHILD_LOOKUP` `ATTR_NAME_LOOKUP` +#### Same child nodes with different content +By default WireMock takes into account an order of identical child nodes. Meaning if actual request has different order of same node on same level than stub it won't be matched. +This can be changed by passing additional argument to the `equalToXml` method + +Java: + +```java + .withRequestBody(equalToXml("" + + " 1" + + " 2" + + "",false,true)) +``` +```json +{ + "request": { + ... + "bodyPatterns" : [ { + "equalToXml" : "Hello", + "ignoreOrderOfSameNode": true + } ] + ... + }, + ... +} +``` +This will make sure that stub above matches both of following requests: +```xml + + 2 + 1 + +``` +and +```xml + + 1 + 2 + +``` +If third argument is passed as `false` then first xml will not match the stub ### XPath Deems a match if the attribute value is valid XML and matches the XPath expression supplied. An XML document will be considered to match if any elements are returned by the XPath evaluation. WireMock delegates to Java's in-built XPath engine (via XMLUnit), therefore up to (at least) Java 8 it supports XPath version 1.0. From ca6fb47f73f00d2059f86779313d04935e79dee0 Mon Sep 17 00:00:00 2001 From: leeturner Date: Wed, 12 Jun 2024 18:42:50 +0100 Subject: [PATCH 03/34] Clarify the version of wiremock for the new helpers --- _docs/response-templating.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index c7a281c3..369ea322 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -343,9 +343,10 @@ Variable assignment and number helpers are available: ## Val helper -The `val` helper can be used to access values or provide a default if the value is not present. It can also be used to -assign a value to a variable much like the `assign` helper. The main difference between `val` and `assign` is that `val` -will maintain the type of the date being assigned whereas `assign` will always assign a string. +Released in WireMock version `3.6.0`, the `val` helper can be used to access values or provide a default if the value +is not present. It can also be used to assign a value to a variable much like the `assign` helper. The main difference +between `val` and `assign` is that `val` will maintain the type of the date being assigned whereas `assign` will always +assign a string. {% raw %} @@ -744,9 +745,9 @@ Providing no parameters will result in an empty array. {% endraw %} ## Array add & remove helpers -The `arrayAdd` and `arrayRemove` helpers can be used to add or remove elements from an array based on a position value -or the `start` or `end` keywords. If no position is specified, the element will be added or removed from the end of the -array. +As of WireMock version `3.6.0`, the `arrayAdd` and `arrayRemove` helpers can be used to add or remove elements from an +array based on a position value or the `start` or `end` keywords. If no position is specified, the element will be +added or removed from the end of the array. {% raw %} @@ -766,7 +767,8 @@ array. ## arrayJoin helper -The `arrayJoin` helper will concatenate the values passed to it with the separator specified: +Released in WireMock version `3.6.0`, the `arrayJoin` helper will concatenate the values passed to it with the +separator specified: {% raw %} From 6b44a71de9b1fddf848638493565a93c3e488dc2 Mon Sep 17 00:00:00 2001 From: leeturner Date: Mon, 17 Jun 2024 17:50:38 +0100 Subject: [PATCH 04/34] Add the new request.id to the docs --- _docs/response-templating.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index 369ea322..df1095bd 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -181,6 +181,8 @@ wm.stubFor(get(urlPathMatching("/static/.*")) The model of the request is supplied to the header and body templates. The following request attributes are available: +`request.id` - The unique ID of each request (introduced in WireMock version x.x.x) + `request.url` - URL path and query `request.path` - URL path. This can be referenced in full or it can be treated as an array of path segments (like below) e.g. `request.path.3`. From 85375bd75e90e5585c366603d12ad3c758236b22 Mon Sep 17 00:00:00 2001 From: viktormelnychuk Date: Wed, 19 Jun 2024 14:16:57 +0300 Subject: [PATCH 05/34] implement suggestion --- _docs/request-matching.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_docs/request-matching.md b/_docs/request-matching.md index a0b2562d..1a346a58 100644 --- a/_docs/request-matching.md +++ b/_docs/request-matching.md @@ -988,8 +988,8 @@ The full list of comparison types used by default is as follows: `ATTR_NAME_LOOKUP` #### Same child nodes with different content -By default WireMock takes into account an order of identical child nodes. Meaning if actual request has different order of same node on same level than stub it won't be matched. -This can be changed by passing additional argument to the `equalToXml` method +By default, WireMock takes into account an order of identical child nodes. Meaning if actual request has different order of same node on same level than stub it won't be matched. +As of WireMock version `3.7.0`, this can be changed by passing additional argument to the `equalToXml` method Java: @@ -1004,7 +1004,7 @@ Java: "request": { ... "bodyPatterns" : [ { - "equalToXml" : "Hello", + "equalToXml" : "12", "ignoreOrderOfSameNode": true } ] ... From 19b06ca48ac1a1eec47d7302487deb4f2f48b2fe Mon Sep 17 00:00:00 2001 From: Ethan Jones Date: Wed, 19 Jun 2024 12:14:22 -0400 Subject: [PATCH 06/34] Adding WM Live callout --- assets/js/notifications.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/assets/js/notifications.js b/assets/js/notifications.js index 35dccb97..09a1252d 100644 --- a/assets/js/notifications.js +++ b/assets/js/notifications.js @@ -1,7 +1,21 @@ var wiremock_notification_shown = localStorage.getItem( "wiremock_notification_shown", ); -var notifications = []; +var notifications = [ + { + content: { + title: + "Go beyond the basics of request matching with WireMock Live on July 18! " + + "Register now.", + }, + layout: { + style: "wiremock_notification_with_link", + position: "top", + className: "info", + autoHide: false, + }, + }, +]; if (wiremock_notification_shown == null) { localStorage.setItem("wiremock_notification_shown", true); From a780f85ed607fa9fdf5a11a345a97b21b4b45e77 Mon Sep 17 00:00:00 2001 From: leeturner Date: Thu, 20 Jun 2024 09:44:21 +0100 Subject: [PATCH 07/34] Update the version number that this will be released in --- _docs/response-templating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/response-templating.md b/_docs/response-templating.md index df1095bd..52c32fd6 100644 --- a/_docs/response-templating.md +++ b/_docs/response-templating.md @@ -181,7 +181,7 @@ wm.stubFor(get(urlPathMatching("/static/.*")) The model of the request is supplied to the header and body templates. The following request attributes are available: -`request.id` - The unique ID of each request (introduced in WireMock version x.x.x) +`request.id` - The unique ID of each request (introduced in WireMock version `3.7.0`) `request.url` - URL path and query From df50329c202f4536eff3766d4390030285b54b29 Mon Sep 17 00:00:00 2001 From: leeturner Date: Fri, 21 Jun 2024 15:32:21 +0100 Subject: [PATCH 08/34] Bumped WireMockk version to 3.7.0 --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 30b074cc..e47b9b6e 100644 --- a/_config.yml +++ b/_config.yml @@ -234,7 +234,7 @@ compress_html: ignore: envs: development -wiremock_version: 3.6.0 +wiremock_version: 3.7.0 wiremock_baseline: 3.x pageEditPrefix: https://github.com/wiremock/wiremock.org/edit/main/ From bf9f7568fd4ee7b0f9fb4a396e959e9ae548d176 Mon Sep 17 00:00:00 2001 From: leeturner Date: Thu, 27 Jun 2024 10:13:45 +0100 Subject: [PATCH 09/34] Update to the new wiremock oss logo --- _includes/masthead.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/_includes/masthead.html b/_includes/masthead.html index 9577618d..65cb326c 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -1,15 +1,17 @@

-   - What's NEW? OpenAPI Validation

+ Image of a loud speaker  + What's NEW? External data sources

- Guarantee requests to your mock APIs match your specs. + Easily bring data from a CSV file into your mock API calls.

- - + + Image of WireMock Cloud data sources

- Stop faulty behavior from leaking into your production environments with OpenAPI validation on your mock API requests. Choose between hard and soft validation as needed. Learn more. + Using external data with WireMock Cloud mock servers lets you quickly bring updated test data without complex configuration, helping to guarantee your test sessions with our API mocks are realistic and simulate your application's production behavior. Learn more.

From 3d43c3d9c1514e781e923070a2b5e8397e31e98f Mon Sep 17 00:00:00 2001 From: leeturner Date: Wed, 3 Jul 2024 13:46:59 +0100 Subject: [PATCH 17/34] Reword whats new page --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 25338473..97307d41 100644 --- a/index.html +++ b/index.html @@ -130,7 +130,7 @@

Image of a loud speaker  What's NEW? External data sources

- Easily bring data from a CSV file into your mock API calls. + Easily use data from a CSV file into your mock API calls.

@@ -138,7 +138,7 @@

- Using external data with WireMock Cloud mock servers lets you quickly bring updated test data without complex configuration, helping to guarantee your test sessions with our API mocks are realistic and simulate your application's production behavior. Learn more. + Using external data with WireMock Cloud mock servers lets you quickly use updated test data without complex configuration, helping to guarantee your test sessions with our API mocks are realistic and simulate your application's production behavior. Learn more.

From 669d66ceca2d6c04ee686860ebdc21c61228c454 Mon Sep 17 00:00:00 2001 From: leeturner Date: Thu, 4 Jul 2024 09:49:12 +0100 Subject: [PATCH 18/34] Update the WireMock openapi with the latest updates from the main repo --- assets/js/wiremock-admin-api.json | 327 +++++++++++++++++++++-- swagger/examples/health.yaml | 5 + swagger/examples/record-spec.yaml | 2 +- swagger/schemas/health.yaml | 25 ++ swagger/schemas/request-pattern.yaml | 38 +++ swagger/schemas/response-definition.yaml | 5 + swagger/schemas/stub-mapping.yaml | 19 ++ swagger/wiremock-admin-api.yaml | 152 ++++++++++- 8 files changed, 549 insertions(+), 24 deletions(-) create mode 100644 swagger/examples/health.yaml create mode 100644 swagger/schemas/health.yaml diff --git a/assets/js/wiremock-admin-api.json b/assets/js/wiremock-admin-api.json index 929328a2..29cf743e 100644 --- a/assets/js/wiremock-admin-api.json +++ b/assets/js/wiremock-admin-api.json @@ -2,11 +2,12 @@ "openapi": "3.0.0", "info": { "title": "WireMock", - "version": "2.35.0" + "version": "3.8.0", + "description": "WireMock offers a REST API for administration, troubleshooting and analysis purposes" }, "externalDocs": { "description": "WireMock user documentation", - "url": "http://wiremock.org/docs/" + "url": "https://wiremock.org/docs/" }, "servers": [ { @@ -19,7 +20,7 @@ "description": "Operations on stub mappings", "externalDocs": { "description": "User documentation", - "url": "http://wiremock.org/docs/stubbing/" + "url": "https://wiremock.org/docs/stubbing/" } }, { @@ -27,7 +28,7 @@ "description": "Logged requests and responses received by the mock service", "externalDocs": { "description": "User documentation", - "url": "http://wiremock.org/docs/verifying/" + "url": "https://wiremock.org/docs/verifying/" } }, { @@ -35,7 +36,7 @@ "description": "Near misses allow querying of received requests or request patterns according to similarity", "externalDocs": { "description": "User documentation", - "url": "http://wiremock.org/docs/verifying/#near-misses" + "url": "https://wiremock.org/docs/verifying/#near-misses" } }, { @@ -43,7 +44,7 @@ "description": "Stub mapping record and snapshot functions", "externalDocs": { "description": "User documentation", - "url": "http://wiremock.org/docs/record-playback/" + "url": "https://wiremock.org/docs/record-playback/" } }, { @@ -51,9 +52,13 @@ "description": "Scenarios support modelling of stateful behaviour", "externalDocs": { "description": "User documentation", - "url": "http://wiremock.org/docs/stateful-behaviour/" + "url": "https://wiremock.org/docs/stateful-behaviour/" } }, + { + "name": "Files", + "description": "Manage the files used to support WireMock stubs" + }, { "name": "System", "description": "Global operations" @@ -62,6 +67,7 @@ "paths": { "/__admin/mappings": { "get": { + "operationId": "getAllStubMappings", "summary": "Get all stub mappings", "tags": [ "Stub Mappings" @@ -207,6 +213,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -402,6 +415,7 @@ } }, "post": { + "operationId": "createNewStubMapping", "summary": "Create a new stub mapping", "tags": [ "Stub Mappings" @@ -519,6 +533,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -778,6 +799,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -932,6 +960,7 @@ } }, "delete": { + "operationId": "deleteAllStubMappings", "summary": "Delete all stub mappings", "tags": [ "Stub Mappings" @@ -945,6 +974,7 @@ }, "/__admin/mappings/reset": { "post": { + "operationId": "resetStubMappings", "summary": "Reset stub mappings", "description": "Restores stub mappings to the defaults defined back in the backing store", "tags": [ @@ -959,6 +989,7 @@ }, "/__admin/mappings/save": { "post": { + "operationId": "persistStubMappings", "summary": "Persist stub mappings", "description": "Save all persistent stub mappings to the backing store", "tags": [ @@ -973,6 +1004,7 @@ }, "/__admin/mappings/import": { "post": { + "operationId": "importStubMappings", "summary": "Import stub mappings", "description": "Import given stub mappings to the backing store", "tags": [ @@ -999,6 +1031,7 @@ } ], "get": { + "operationId": "getStubMappingById", "summary": "Get stub mapping by ID", "tags": [ "Stub Mappings" @@ -1118,6 +1151,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -1275,6 +1315,7 @@ } }, "put": { + "operationId": "updateStubMapping", "summary": "Update a stub mapping", "tags": [ "Stub Mappings" @@ -1392,6 +1433,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -1651,6 +1699,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -1808,6 +1863,7 @@ } }, "delete": { + "operationId": "deleteStubMapping", "summary": "Delete a stub mapping", "tags": [ "Stub Mappings" @@ -1824,6 +1880,7 @@ }, "/__admin/mappings/find-by-metadata": { "post": { + "operationId": "findStubMappingsByMetadata", "description": "Find stubs by matching on their metadata", "tags": [ "Stub Mappings" @@ -2075,6 +2132,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -2272,6 +2336,7 @@ }, "/__admin/mappings/remove-by-metadata": { "post": { + "operationId": "removeStubMappingsByMetadata", "summary": "Delete stub mappings matching metadata", "tags": [ "Stub Mappings" @@ -2412,6 +2477,7 @@ }, "/__admin/requests": { "get": { + "operationId": "getAllRequestsInJournal", "summary": "Get all requests in journal", "tags": [ "Requests" @@ -2533,6 +2599,7 @@ } }, "delete": { + "operationId": "deleteAllRequestsInJournal", "summary": "Delete all requests in journal", "tags": [ "Requests" @@ -2546,6 +2613,7 @@ }, "/__admin/requests/{requestId}": { "get": { + "operationId": "getRequestById", "summary": "Get request by ID", "tags": [ "Requests" @@ -2602,6 +2670,7 @@ } }, "delete": { + "operationId": "deleteRequestById", "summary": "Delete request by ID", "tags": [ "Requests" @@ -2627,6 +2696,7 @@ }, "/__admin/requests/reset": { "post": { + "operationId": "emptyRequestJournal", "deprecated": true, "summary": "Empty the request journal", "tags": [ @@ -2641,6 +2711,7 @@ }, "/__admin/requests/count": { "post": { + "operationId": "countRequestsByCriteria", "summary": "Count requests by criteria", "description": "Count requests logged in the journal matching the specified criteria", "tags": [ @@ -2758,6 +2829,7 @@ }, "/__admin/requests/remove": { "post": { + "operationId": "removeRequestsByCriteria", "summary": "Remove requests by criteria", "description": "Removed requests logged in the journal matching the specified criteria", "tags": [ @@ -2897,6 +2969,7 @@ }, "/__admin/requests/remove-by-metadata": { "post": { + "operationId": "removeRequestsByMetadata", "summary": "Delete requests mappings matching metadata", "tags": [ "Requests" @@ -3072,6 +3145,7 @@ }, "/__admin/requests/find": { "post": { + "operationId": "findRequestsByCriteria", "summary": "Find requests by criteria", "description": "Retrieve details of requests logged in the journal matching the specified criteria", "tags": [ @@ -3211,6 +3285,7 @@ }, "/__admin/requests/unmatched": { "get": { + "operationId": "findUnmatchedRequests", "summary": "Find unmatched requests", "description": "Get details of logged requests that weren't matched by any stub mapping", "tags": [ @@ -3260,6 +3335,7 @@ }, "/__admin/requests/unmatched/near-misses": { "get": { + "operationId": "retrieveNearMissesForUnmatchedRequests", "description": "Retrieve near-misses for all unmatched requests", "tags": [ "Near Misses" @@ -3354,6 +3430,7 @@ }, "/__admin/near-misses/request": { "post": { + "operationId": "findNearMissesForRequest", "summary": "Find near misses matching specific request", "description": "Find at most 3 near misses for closest stub mappings to the specified request", "tags": [ @@ -3512,6 +3589,7 @@ }, "/__admin/near-misses/request-pattern": { "post": { + "operationId": "findNearMissesForRequestPattern", "summary": "Find near misses matching request pattern", "description": "Find at most 3 near misses for closest logged requests to the specified request pattern", "tags": [ @@ -3697,6 +3775,7 @@ }, "/__admin/recordings/start": { "post": { + "operationId": "startRecording", "summary": "Start recording", "description": "Begin recording stub mappings", "tags": [ @@ -3947,14 +4026,14 @@ "targetBaseUrl": { "type": "string", "description": "Target URL when using the record and playback API", - "example": "http://examples.wiremockapi.cloud/" + "example": "https://example.wiremock.org" } } } ] }, "example": { - "targetBaseUrl": "http://examples.wiremockapi.cloud/", + "targetBaseUrl": "https://example.wiremock.org", "filters": { "urlPathPattern": "/api/.*", "method": "GET" @@ -3995,6 +4074,7 @@ }, "/__admin/recordings/stop": { "post": { + "operationId": "stopRecording", "summary": "Stop recording", "description": "End recording of stub mappings", "tags": [ @@ -4119,6 +4199,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -4293,6 +4380,7 @@ }, "/__admin/recordings/status": { "get": { + "operationId": "getRecordingStatus", "summary": "Get recording status", "tags": [ "Recordings" @@ -4324,6 +4412,7 @@ }, "/__admin/recordings/snapshot": { "post": { + "operationId": "takeRecordingSnapshot", "summary": "Take a snapshot recording", "tags": [ "Recordings" @@ -4740,6 +4829,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -4914,6 +5010,7 @@ }, "/__admin/scenarios": { "get": { + "operationId": "getAllScenarios", "summary": "Get all scenarios", "tags": [ "Scenarios" @@ -4973,6 +5070,7 @@ }, "/__admin/scenarios/reset": { "post": { + "operationId": "resetAllScenarios", "summary": "Reset the state of all scenarios", "tags": [ "Scenarios" @@ -4984,8 +5082,101 @@ } } }, + "/__admin/files": { + "get": { + "operationId": "getAllFileNames", + "summary": "Get all file names", + "tags": [ + "Files" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "file1.json", + "file2.json", + "file3.txt" + ] + } + } + }, + "description": "All scenarios" + } + } + } + }, + "/__admin/files/{fileId}": { + "parameters": [ + { + "description": "The name of the file", + "in": "path", + "name": "fileId", + "required": true, + "example": "file1.json", + "schema": { + "type": "string" + } + } + ], + "get": { + "operationId": "getFileById", + "summary": "Get file by ID", + "tags": [ + "Files" + ], + "responses": { + "404": { + "description": "File not found" + }, + "200": { + "description": "The contents of the file" + } + } + }, + "put": { + "operationId": "updateFileById", + "summary": "Update or create a file", + "tags": [ + "Files" + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "byte" + } + } + } + }, + "responses": { + "200": { + "description": "OK - contents of the request body as a string" + } + } + }, + "delete": { + "operationId": "deleteFileById", + "summary": "Delete a file if it exists", + "tags": [ + "Files" + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/__admin/settings": { "post": { + "operationId": "updateGlobalSettings", "summary": "Update global settings", "tags": [ "System" @@ -5063,6 +5254,7 @@ }, "/__admin/reset": { "post": { + "operationId": "resetMappingsAndJournal", "summary": "Reset mappings and request journal", "description": "Reset mappings to the default state and reset the request journal", "tags": [ @@ -5075,15 +5267,106 @@ } } }, - "/__admin/shutdown": { - "post": { - "description": "Shutdown the WireMock server", + "/__admin/shutdown" : { + "post" : { + "operationId" : "shutdownServer", + "summary" : "Shutdown the WireMock server", + "description" : "Shutdown the WireMock server", + "tags" : [ "System" ], + "responses" : { + "200" : { + "description" : "Server will be shut down" + } + } + } + }, + "/__admin/version": { + "get": { + "operationId": "getVersion", + "summary": "Return the version of the WireMock server", + "description": "Returns the version of the WireMock server", "tags": [ "System" ], "responses": { "200": { - "description": "Server will be shut down" + "description": "Successfully returned the version of the WireMock server", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string", + "example": "3.8.0" + } + } + }, + "example": { + "version": "3.8.0" + } + } + } + } + } + } + }, + "/__admin/health": { + "get": { + "operationId": "getHealth", + "summary": "Return the health of the WireMock server", + "description": "Returns the health of the WireMock server", + "tags": [ + "System" + ], + "responses": { + "200": { + "description": "Successful health and uptime data", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "The status of the server", + "example": "healthy", + "enum": [ + "healthy", + "unhealthy" + ] + }, + "message": { + "type": "string", + "description": "Longer message regarding the status of the server", + "example": "Wiremock is ok" + }, + "version": { + "type": "string", + "description": "The WireMock version", + "example": "3.8.0" + }, + "upTimeInSeconds": { + "type": "integer", + "description": "How long the server has been running", + "example": 14355 + }, + "timestamp": { + "type": "string", + "description": "The current timestamp", + "example": "2024-07-03T13:16:06.172362Z" + } + } + }, + "example": { + "status": "healthy", + "message": "Wiremock is ok", + "version": "3.8.0", + "uptimeInSeconds": 14355, + "timestamp": "2024-07-03T13:16:06.172362Z" + } + } + } } } } @@ -5294,6 +5577,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." @@ -5683,14 +5973,14 @@ "targetBaseUrl": { "type": "string", "description": "Target URL when using the record and playback API", - "example": "http://examples.wiremockapi.cloud/" + "example": "https://example.wiremock.org" } } } ] }, "example": { - "targetBaseUrl": "http://examples.wiremockapi.cloud/", + "targetBaseUrl": "https://example.wiremock.org", "filters": { "urlPathPattern": "/api/.*", "method": "GET" @@ -6131,6 +6421,13 @@ "type": "object", "description": "Extra request headers to send when proxying to another host." }, + "removeProxyRequestHeaders": { + "type": "array", + "description": "Request headers to remove when proxying to another host.", + "items": { + "type": "string" + } + }, "body": { "type": "string", "description": "The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified." diff --git a/swagger/examples/health.yaml b/swagger/examples/health.yaml new file mode 100644 index 00000000..4c74d40e --- /dev/null +++ b/swagger/examples/health.yaml @@ -0,0 +1,5 @@ +status: "healthy" +message: "Wiremock is ok" +version: "3.8.0" +uptimeInSeconds: 14355 +timestamp: "2024-07-03T13:16:06.172362Z" \ No newline at end of file diff --git a/swagger/examples/record-spec.yaml b/swagger/examples/record-spec.yaml index 552de91f..660b9125 100644 --- a/swagger/examples/record-spec.yaml +++ b/swagger/examples/record-spec.yaml @@ -1,4 +1,4 @@ -targetBaseUrl: http://examples.wiremockapi.cloud/ +targetBaseUrl: http://example.mocklab.io filters: urlPathPattern: "/api/.*" method: GET diff --git a/swagger/schemas/health.yaml b/swagger/schemas/health.yaml new file mode 100644 index 00000000..cd0eb57f --- /dev/null +++ b/swagger/schemas/health.yaml @@ -0,0 +1,25 @@ +type: object +properties: + status: + type: string + example: "healthy" + description: "The status of the server" + enum: + - healthy + - unhealthy + message: + type: string + description: "Longer message regarding the status of the server" + example: "Wiremock is ok" + version: + type: string + description: "The WireMock version" + example: "3.8.0" + uptimeInSeconds: + type: integer + description: "How long the server has been running" + example: 14355 + timestamp: + type: string + description: "The current timestamp" + example: "2024-07-03T13:16:06.172362Z" diff --git a/swagger/schemas/request-pattern.yaml b/swagger/schemas/request-pattern.yaml index 628878f0..4035ff8e 100644 --- a/swagger/schemas/request-pattern.yaml +++ b/swagger/schemas/request-pattern.yaml @@ -8,6 +8,15 @@ example: method: POST url: /some/thing properties: + scheme: + type: string + description: The URI scheme + host: + type: object + description: 'URI host pattern to match against in the "": "" form' + port: + type: integer + description: The HTTP port number method: type: string description: The HTTP request method e.g. GET @@ -48,3 +57,32 @@ properties: description: 'Request body patterns to match against in the : { "": "" } form' items: type: object + customMatcher: + type: object + description: Custom request matcher to match against + properties: + name: + type: string + description: The matcher's name specified in the implementation of the matcher. + parameters: + type: object + multipartPatterns: + type: array + description: Multipart patterns to match against headers and body + items: + type: object + properties: + name: + type: string + matchingType: + type: string + default: ANY + enum: + - ALL + - ANY + headers: + type: object + bodyPatterns: + type: array + items: + type: object diff --git a/swagger/schemas/response-definition.yaml b/swagger/schemas/response-definition.yaml index e6a035f8..43bf4c58 100644 --- a/swagger/schemas/response-definition.yaml +++ b/swagger/schemas/response-definition.yaml @@ -13,6 +13,11 @@ allOf: additionalProxyRequestHeaders: type: object description: Extra request headers to send when proxying to another host. + removeProxyRequestHeaders: + type: array + description: Request headers to remove when proxying to another host. + items: + type: string body: type: string description: The response body as a string. Only one of body, base64Body, jsonBody or bodyFileName may be specified. diff --git a/swagger/schemas/stub-mapping.yaml b/swagger/schemas/stub-mapping.yaml index 16ed220f..176eafd9 100644 --- a/swagger/schemas/stub-mapping.yaml +++ b/swagger/schemas/stub-mapping.yaml @@ -32,6 +32,25 @@ properties: postServeActions: type: object description: A map of the names of post serve action extensions to trigger and their parameters. + serveEventListeners: + type: array + description: The list of serve event listeners + items: + type: object + properties: + name: + type: string + requestPhases: + type: array + items: + type: string + enum: + - BEFORE_MATCH + - AFTER_MATCH + - BEFORE_RESPONSE_SENT + - AFTER_COMPLETE + parameters: + type: object metadata: type: object description: Arbitrary metadata to be used for e.g. tagging, documentation. Can also be used to find and remove stubs. diff --git a/swagger/wiremock-admin-api.yaml b/swagger/wiremock-admin-api.yaml index a7d0a33b..f605ca3b 100644 --- a/swagger/wiremock-admin-api.yaml +++ b/swagger/wiremock-admin-api.yaml @@ -2,11 +2,12 @@ openapi: 3.0.0 info: title: WireMock - version: 2.35.0 + version: 3.8.0 + description: "WireMock offers a REST API for administration, troubleshooting and analysis purposes" externalDocs: description: WireMock user documentation - url: http://wiremock.org/docs/ + url: https://wiremock.org/docs/ servers: - url: / @@ -16,33 +17,36 @@ tags: description: Operations on stub mappings externalDocs: description: User documentation - url: http://wiremock.org/docs/stubbing/ + url: https://wiremock.org/docs/stubbing/ - name: Requests description: Logged requests and responses received by the mock service externalDocs: description: User documentation - url: http://wiremock.org/docs/verifying/ + url: https://wiremock.org/docs/verifying/ - name: Near Misses description: Near misses allow querying of received requests or request patterns according to similarity externalDocs: description: User documentation - url: http://wiremock.org/docs/verifying/#near-misses + url: https://wiremock.org/docs/verifying/#near-misses - name: Recordings description: Stub mapping record and snapshot functions externalDocs: description: User documentation - url: http://wiremock.org/docs/record-playback/ + url: https://wiremock.org/docs/record-playback/ - name: Scenarios description: Scenarios support modelling of stateful behaviour externalDocs: description: User documentation - url: http://wiremock.org/docs/stateful-behaviour/ + url: https://wiremock.org/docs/stateful-behaviour/ + - name: Files + description: Manage the files used to support WireMock stubs - name: System description: Global operations paths: /__admin/mappings: get: + operationId: getAllStubMappings summary: Get all stub mappings tags: - Stub Mappings @@ -71,6 +75,7 @@ paths: $ref: 'examples/stub-mappings.yaml' description: All stub mappings post: + operationId: createNewStubMapping summary: Create a new stub mapping tags: - Stub Mappings @@ -80,6 +85,7 @@ paths: '201': $ref: "#/components/responses/stubMapping" delete: + operationId: deleteAllStubMappings summary: Delete all stub mappings tags: - Stub Mappings @@ -89,6 +95,7 @@ paths: /__admin/mappings/reset: post: + operationId: resetStubMappings summary: Reset stub mappings description: Restores stub mappings to the defaults defined back in the backing store tags: @@ -99,6 +106,7 @@ paths: /__admin/mappings/save: post: + operationId: persistStubMappings summary: Persist stub mappings description: Save all persistent stub mappings to the backing store tags: @@ -109,6 +117,7 @@ paths: /__admin/mappings/import: post: + operationId: importStubMappings summary: Import stub mappings description: Import given stub mappings to the backing store tags: @@ -127,6 +136,7 @@ paths: schema: type: string get: + operationId: getStubMappingById summary: Get stub mapping by ID tags: - Stub Mappings @@ -136,6 +146,7 @@ paths: '200': $ref: "#/components/responses/stubMapping" put: + operationId: updateStubMapping summary: Update a stub mapping tags: - Stub Mappings @@ -147,6 +158,7 @@ paths: '200': $ref: "#/components/responses/stubMapping" delete: + operationId: deleteStubMapping summary: Delete a stub mapping tags: - Stub Mappings @@ -158,6 +170,7 @@ paths: /__admin/mappings/find-by-metadata: post: + operationId: findStubMappingsByMetadata description: Find stubs by matching on their metadata tags: - Stub Mappings @@ -181,6 +194,7 @@ paths: /__admin/mappings/remove-by-metadata: post: + operationId: removeStubMappingsByMetadata summary: Delete stub mappings matching metadata tags: - Stub Mappings @@ -197,6 +211,7 @@ paths: /__admin/requests: get: + operationId: getAllRequestsInJournal summary: Get all requests in journal tags: - Requests @@ -221,6 +236,7 @@ paths: $ref: 'examples/serve-events.yaml' description: List of received requests delete: + operationId: deleteAllRequestsInJournal summary: Delete all requests in journal tags: - Requests @@ -230,6 +246,7 @@ paths: /__admin/requests/{requestId}: get: + operationId: getRequestById summary: Get request by ID tags: - Requests @@ -251,6 +268,7 @@ paths: example: $ref: "examples/request.yaml" delete: + operationId: deleteRequestById summary: Delete request by ID tags: - Requests @@ -268,6 +286,7 @@ paths: /__admin/requests/reset: post: + operationId: emptyRequestJournal deprecated: true summary: Empty the request journal tags: @@ -278,6 +297,7 @@ paths: /__admin/requests/count: post: + operationId: countRequestsByCriteria summary: Count requests by criteria description: Count requests logged in the journal matching the specified criteria tags: @@ -298,6 +318,7 @@ paths: /__admin/requests/remove: post: + operationId: removeRequestsByCriteria summary: Remove requests by criteria description: Removed requests logged in the journal matching the specified criteria tags: @@ -312,8 +333,11 @@ paths: example: $ref: "examples/requests.yaml" + + /__admin/requests/remove-by-metadata: post: + operationId: removeRequestsByMetadata summary: Delete requests mappings matching metadata tags: - Requests @@ -334,6 +358,7 @@ paths: /__admin/requests/find: post: + operationId: findRequestsByCriteria summary: Find requests by criteria description: Retrieve details of requests logged in the journal matching the specified criteria tags: @@ -350,6 +375,7 @@ paths: /__admin/requests/unmatched: get: + operationId: findUnmatchedRequests summary: Find unmatched requests description: Get details of logged requests that weren't matched by any stub mapping tags: @@ -364,6 +390,7 @@ paths: /__admin/requests/unmatched/near-misses: get: + operationId: retrieveNearMissesForUnmatchedRequests description: Retrieve near-misses for all unmatched requests tags: - Near Misses @@ -373,6 +400,7 @@ paths: /__admin/near-misses/request: post: + operationId: findNearMissesForRequest summary: Find near misses matching specific request description: Find at most 3 near misses for closest stub mappings to the specified request tags: @@ -391,6 +419,7 @@ paths: /__admin/near-misses/request-pattern: post: + operationId: findNearMissesForRequestPattern summary: Find near misses matching request pattern description: Find at most 3 near misses for closest logged requests to the specified request pattern tags: @@ -403,6 +432,7 @@ paths: /__admin/recordings/start: post: + operationId: startRecording summary: Start recording description: Begin recording stub mappings tags: @@ -415,6 +445,7 @@ paths: /__admin/recordings/stop: post: + operationId: stopRecording summary: Stop recording description: End recording of stub mappings tags: @@ -431,6 +462,7 @@ paths: /__admin/recordings/status: get: + operationId: getRecordingStatus summary: Get recording status tags: - Recordings @@ -452,6 +484,7 @@ paths: /__admin/recordings/snapshot: post: + operationId: takeRecordingSnapshot summary: Take a snapshot recording tags: - Recordings @@ -469,6 +502,7 @@ paths: /__admin/scenarios: get: + operationId: getAllScenarios summary: Get all scenarios tags: - Scenarios @@ -487,6 +521,7 @@ paths: /__admin/scenarios/reset: post: + operationId: resetAllScenarios summary: Reset the state of all scenarios tags: - Scenarios @@ -494,8 +529,69 @@ paths: '200': description: Successfully reset + + /__admin/files: + get: + operationId: getAllFileNames + summary: Get all file names + tags: + - Files + responses: + '200': + content: + application/json: + schema: + type: array + items: + type: string + example: ["file1.json", "file2.json", "file3.txt"] + description: All scenarios + + /__admin/files/{fileId}: + parameters: + - description: The name of the file + in: path + name: fileId + required: true + example: file1.json + schema: + type: string + get: + operationId: getFileById + summary: Get file by ID + tags: + - Files + responses: + '404': + description: File not found + '200': + description: The contents of the file + put: + operationId: updateFileById + summary: Update or create a file + tags: + - Files + requestBody: + content: + application/octet-stream: + schema: + type: string + format: byte + responses: + '200': + description: OK - contents of the request body as a string + delete: + operationId: deleteFileById + summary: Delete a file if it exists + tags: + - Files + responses: + '200': + description: OK + /__admin/settings: post: + operationId: updateGlobalSettings summary: Update global settings tags: - System @@ -518,6 +614,7 @@ paths: /__admin/reset: post: + operationId: resetMappingsAndJournal summary: Reset mappings and request journal description: Reset mappings to the default state and reset the request journal tags: @@ -528,12 +625,51 @@ paths: /__admin/shutdown: post: + operationId: shutdownServer + summary: Shutdown the WireMock server description: Shutdown the WireMock server tags: - System responses: '200': description: Server will be shut down + + + /__admin/version: + get: + operationId: getVersion + summary: Return the version of the WireMock server + description: Returns the version of the WireMock server + tags: + - System + responses: + '200': + description: Successfully returned the version of the WireMock server + content: + application/json: + schema: + type: object + properties: + version: + type: string + example: "3.8.0" + + /__admin/health: + get: + operationId: getHealth + summary: Return the health of the WireMock server + description: Returns the health of the WireMock server + tags: + - System + responses: + '200': + description: Successful health and uptime data + content: + application/json: + schema: + $ref: 'schemas/health.yaml' + example: + $ref: 'examples/health.yaml' components: requestBodies: @@ -569,7 +705,7 @@ components: targetBaseUrl: type: string description: Target URL when using the record and playback API - example: http://examples.wiremockapi.cloud/ + example: https://example.wiremock.org example: $ref: "examples/record-spec.yaml" From 22e6e2224d3615333e06edd5d668b4080e64203a Mon Sep 17 00:00:00 2001 From: leeturner Date: Thu, 4 Jul 2024 09:54:09 +0100 Subject: [PATCH 19/34] Fix old url --- swagger/examples/record-spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger/examples/record-spec.yaml b/swagger/examples/record-spec.yaml index 660b9125..f8164291 100644 --- a/swagger/examples/record-spec.yaml +++ b/swagger/examples/record-spec.yaml @@ -1,4 +1,4 @@ -targetBaseUrl: http://example.mocklab.io +targetBaseUrl: https://examples.wiremockapi.cloud/ filters: urlPathPattern: "/api/.*" method: GET From 45ec231f4965fd775c8cda1549b5c150147399c5 Mon Sep 17 00:00:00 2001 From: leeturner Date: Fri, 5 Jul 2024 11:15:40 +0100 Subject: [PATCH 20/34] Update the external resources page with new items --- external-resources/index.html | 416 ++++++++++++++-------------------- 1 file changed, 173 insertions(+), 243 deletions(-) diff --git a/external-resources/index.html b/external-resources/index.html index 8ae46985..fb918bcf 100644 --- a/external-resources/index.html +++ b/external-resources/index.html @@ -15,263 +15,193 @@

Community Resources

-

- Code, articles and videos related to WireMock from around the web. -

-

- Integrations -

-

- WireMocha is a WireMock plugin for IntelliJ: -

- https://plugins.jetbrains.com/plugin/18860-wiremocha + +

Code, articles and videos related to WireMock from around the web.

+ + +

Configuration / Clients

+ +

Automate configuration of stubs from JAX-RS annotated resources.

+ https://github.com/tomasbjerre/wiremock-jaxrs + +

Monitor JVM metrics and WireMock response times.

+ https://github.com/rasklaad/wiremock-metrics + +

PHP client for WireMock

+ https://github.com/rowanhill/wiremock-php + +

NodeJS client for WireMock

+ https://www.npmjs.com/package/wiremock -

- Mark Winteringham wrote a very handy Chrome extension to provide a UI over WireMock: -

- http://www.mwtestconsultancy.co.uk/wiremock-chrome-extension/ +

NodeJS + TypeScript client WireMock

+ https://www.npmjs.com/package/wiremock-captain + +

Epresso test using WireMock as the backend for Android apps

+ https://handstandsam.com/2016/01/30/running-wiremock-on-android/ + +

Make the creation of WireMock stubs for Spring REST controllers safe and effortless.

+ https://dzone.com/articles/wiremock-the-ridiculously-easy-way + + +

Integrations

+ +

WireMocha is a WireMock plugin for IntelliJ.

+ https://plugins.jetbrains.com/plugin/18860-wiremocha

Spring Contract Verifier (previously called Accurest) is a consumer driven contracts tool that generates WireMock stub mappings as examples for client testing.

- http://cloud.spring.io/spring-cloud-contract/ + https://spring.io/projects/spring-cloud-contract -

A Spring REST Docs integration for WireMock that generates WireMock stub mappings from - your test cases:

+

A Spring REST Docs integration for WireMock that generates WireMock stub mappings from your test cases.

https://github.com/epages-de/restdocs-wiremock -

WireMock Maven Plugin:

+

A WireMock plugin for Maven.

https://github.com/automatictester/wiremock-maven-plugin - -

Maciej Walkowiak has built a library providing zero-config, fully declarative Spring Boot integration with WireMock in JUnit 5 tests:

+ +

Zero-config, fully declarative Spring Boot integration with WireMock.

https://github.com/maciejwalkowiak/wiremock-spring-boot -

@GenerateWireMockStub for Spring REST controllers, built by Lukasz Gryzbon, makes the creation of WireMock stubs for tests safe and effortless:

- https://github.com/lsd-consulting/spring-wiremock-stub-generator - -

- Extensions -

-

- Simulate webhooks with this extension: -

- https://github.com/wiremock/wiremock-webhooks-extension - -

- Some folks at Open Table have written a response transformer for injecting data from the request body into the response: -

- - https://github.com/opentable/wiremock-body-transformer - - -

- In a similar vein, Adam York has written a response transformer utilising Velocity templates: -

- - https://github.com/adamyork/wiremock-velocity-transformer - - - -

- Mason Malone has built an extension for matching requests based on the contents of JSON web tokens: -

- - https://github.com/MasonM/wiremock-jwt-extension - - - -

- Also from Mason, an extension for finding and removing unused stub mappings: -

- - https://github.com/MasonM/wiremock-unused-stubs-extension - - -

- Felipe Fernández has built a Spock extension to enhance automation around record and replay functionality: -

- - https://github.com/felipefzdz/spock-wiremock-extension - -

- Automate configuration of stubs, given JAX-RS annotated resources, with this extension: -

- - https://github.com/tomasbjerre/wiremock-jaxrs - -

- Monitor JVM metrics and wiremock response time: -

- - https://github.com/rasklaad/wiremock-metrics - - -

- Other languages -

-

- PHP client by Rowan Hill: -

- - https://github.com/rowanhill/wiremock-php - - -

- Ruby wrapper by Jeffres S. Morgan: -

- - https://rubygems.org/gems/service_mock - - -

- Groovy binding by Tom Jankes: -

- - https://github.com/tomjankes/wiremock-groovy - - -

- Python client by Cody Lee: -

- - - https://pypi.python.org/pypi/wiremock/1.1.1 - - -

- NodeJS wrapper: -

- - https://www.npmjs.com/package/wiremock - - -

- NodeJS + TypeScript client: -

- - https://www.npmjs.com/package/wiremock-captain - - - -

- Articles -

- -

- Sam Edwards has been hugely helpful in getting WireMock onto the Android platform and helping others do so. Here is his blog post explaining how to write an Espresso test using WireMock as your app's back-end: -

- - http://handstandsam.com/2016/01/30/running-wiremock-on-android/ - - -

- Dusan Dević at Yenlo wrote a useful guide to testing error conditions in the WSO2 ESB using Wiremock: -

- - https://www.yenlo.com/blog/wso2torial-error-handling-in-wso2-esb-with-wiremock - - -

- Phill Barber has written a couple of interesting posts about practical testing scenarios with WireMock: -

- - - http://phillbarber.blogspot.co.uk/2015/05/how-to-write-end-to-end-tests-for-nginx.html - - - http://phillbarber.blogspot.co.uk/2015/02/how-to-test-for-connection-leaks.html - - -

- Bas Dijkstra kindly open sourced the content for the workshop he ran on WireMock and REST Assured: -

- - - http://www.ontestautomation.com/open-sourcing-my-workshop-on-wiremock/ - - -

- @GenerateWireMockStub for Spring REST controllers, built by Lukasz Gryzbon, makes the creation of WireMock stubs for tests safe and effortless: -

- - - https://dzone.com/articles/wiremock-the-ridiculously-easy-way - - -

- WireMock workshop: -

- - - https://github.com/basdijkstra/wiremock-workshop - - -

Videos

-

- Fluent and thorough live-coding demonstration of WireMock delivered by Sam Edwards at DevFest DC: -

- - https://youtu.be/x3MvZ8DFrpE - - -

- Sebastian Daschner presents a step-by-step guide to running your acceptance tests in Kubernetes using WireMock: -

- - - https://blog.sebastian-daschner.com/entries/acceptance_tests_wiremock_kubernetes - - -

- Interesting and detailed presentation by Lotte Johansen on testing microservices with WireMock at Norway's top online marketplace: -

- - - https://www.youtube.com/watch?v=cmJfMnGK-r0 - - -

- Chris Batey did an excellent talk at Skillsmatter in London about building fault tolerant microservices. He showed some practical failure testing strategies using WireMock and Saboteur he'd used for real while working at Sky: -

- - https://skillsmatter.com/skillscasts/5810-building-fault-tolerant-microservices - - -

- Daniel Bryant's excellent QCon presentation “The Seven Deadly Sins of Microservices” covers the full gamut of microservice anti-patterns seen in the wild, with some sound advice on how to fix them. WireMock and Saboteur get an honourable mention in the testing discussion: -

- - - https://www.infoq.com/presentations/7-sins-microservices - - -

- - The folks at Intuit have built a very impressive and ambitious testing setup, using WireMock to isolate individual services. Here's a talk they did at AWS:Reinvent: -

+

A response transformer for injecting data from the request body into the response from Open Table.

+ https://github.com/opentable/wiremock-body-transformer + +

An extension for matching requests based on the contents of JSON web tokens.

+ https://github.com/MasonM/wiremock-jwt-extension + +

Create a mock server with WireMock and Postman - Practical implementation

+ https://www.youtube.com/watch?v=Zd4_tUSOHfw&pp=ygUId2lyZW1vY2s%3D + +

Create a mock server with WireMock and Postman - Configuration theory

+ https://www.youtube.com/watch?v=gVVTO4U8M_k&pp=ygUId2lyZW1vY2s%3D + +

Transparent http client testing with http4K and WireMock

+ https://www.youtube.com/watch?v=fpXf1K_E_bY&pp=ygUId2lyZW1vY2s%3D + + +

Tutorial

+ +

A workshop introduction to service virtualization with WireMock

+ https://github.com/basdijkstra/wiremock-workshop + +

A step-by-step guide to running your acceptance tests in Kubernetes using WireMock.

+ https://blog.sebastian-daschner.com/entries/acceptance_tests_wiremock_kubernetes + +

Testing microservices with WireMock at Norway's top online marketplace.

+ https://www.youtube.com/watch?v=cmJfMnGK-r0 + +

AWS:Reinvent talk from Intuit on isolating services for testing with WireMock.

+ https://www.youtube.com/watch?list=PLhr1KZpdzuke5pqzTvI2ZxwP8-NwLACuU&v=sUsh3EnzKKk + +

Using WireMock for HTTP stubbing and mocking.

+ https://medium.com/@2023sl93093/using-wiremock-for-http-stubbing-and-mocking-a-guide-0446dcf37b07 + +

Request filtering (interception) and modification with WireMock.

+ https://medium.com/gitconnected/wiremock-server-request-filtering-interception-and-modification-b13c48c87e32 + +

Mastering API Performance Testing with k6, Grafana and WireMock.

+ https://medium.com/gitconnected/mastering-api-performance-testing-with-k6-grafana-and-wiremock-e09825fb2241 - - https://www.youtube.com/watch?list=PLhr1KZpdzuke5pqzTvI2ZxwP8-NwLACuU&v=sUsh3EnzKKk - - -

- Michael Bailey was the first person to publicly demonstrate the possibility of running WireMock on Android. Here's his presentation at Google's GTAC conference on the testing setup used by his team at Amex: -

- - - https://www.youtube.com/watch?v=-xQCNf_5NNM - +

Standalone stub server using Spring Cloud Contract and WireMock.

+ https://medium.com/@boottechnologies-ci/standalone-stub-server-using-spring-cloud-contract-wiremock-c91e72d8cdde -

- Tom and Rob Elliot gave a join talk at Skillsmatter about patterns for readable and scalable tests with WireMock, and an approach for unit testing a CDN: -

+

Mock servers in the era of microservices.

+ https://medium.com/gitconnected/mock-server-using-wiremock-a61cbd55a690 - +

Understanding proxying with WireMock and .NET

+
https://www.youtube.com/watch?v=kRHiNlkF2po&pp=ygUId2lyZW1vY2s%3D - https://skillsmatter.com/skillscasts/6853-scalable-management-of-test-data-making-tests-readable - +

Running WireMock as a .NET Tool in CommandLine

+ https://www.youtube.com/watch?v=YdyR1ZWrnC4&pp=ygUId2lyZW1vY2s%3D -

MockLab

-

Build a Paypal sandbox for load testing in 10 minutes

+

Generating Static Mappings for Stubs in WireMock and .NET

+ https://www.youtube.com/watch?v=xilAgj4NqhQ&pp=ygUId2lyZW1vY2s%3D -

Mock REST API tutorial

+

Using admin interfaces to debug tests efficiently with WireMock and .NET

+ https://www.youtube.com/watch?v=Q5sxMG84H0w&pp=ygUId2lyZW1vY2s%3D +

Getting JSON body responses from WireMock and .NET

+ https://www.youtube.com/watch?v=fPAUqXo68e8&pp=ygUId2lyZW1vY2s%3D + +

Mocking Bearer Token Authentication using WireMock and .NET

+ https://www.youtube.com/watch?v=IC1lMYuPd4Y&pp=ygUId2lyZW1vY2s%3D + +

Custom database Logging with WireMock

+ https://www.youtube.com/watch?v=HuGAXwrg0nE&pp=ygUId2lyZW1vY2s%3D + +

Understanding request matchers in WireMock and .NET

+ https://www.youtube.com/watch?v=XrgS1ZsUKCY&pp=ygUId2lyZW1vY2s%3D + +

Advanced API mocking Strategies with WireMock Cloud

+ https://www.youtube.com/watch?v=Pdg5wIEyS08&pp=ygUId2lyZW1vY2s%3D + +

Introduction to WireMock and .NET

+ https://www.youtube.com/watch?v=SQRPqBWHeJs&pp=ygUId2lyZW1vY2s%3D + +

Dev Services for Gradle Projects with Quarkus, Gradle and WireMock

+ https://www.youtube.com/watch?v=Lf15C0Jl3Yk&pp=ygUId2lyZW1vY2s%3D + +

Spring Cloud OpenFeign & Testing with WireMock

+ https://www.youtube.com/watch?v=GpqnYd8VR3k&pp=ygUId2lyZW1vY2s%3D + +

Easy Integration Tests for Spring webclients with WireMock.

+ https://www.youtube.com/watch?v=hbr4snySA6I&pp=ygUId2lyZW1vY2s%3D + +

Wiremock - How to use dynamic responses (Espanol)

+ https://www.youtube.com/watch?v=eazDmNtl5aM&pp=ygUId2lyZW1vY2s%3D + +

WireMock platform Enhanced API Security Astra Review

+ https://www.youtube.com/watch?v=2zC7L1uMeis&pp=ygUId2lyZW1vY2s%3D + +

The power of visualization with WireMock (Espanol)

+ https://www.youtube.com/watch?v=aiH83J8ZgsU&pp=ygUId2lyZW1vY2s%3D + +

Exploring WireMock's built-in request matchers

+ https://www.youtube.com/watch?v=73quuWlJAkM&pp=ygUId2lyZW1vY2s%3D + +

Request Matching With URLs with WireMock

+ https://www.youtube.com/watch?v=1VIr__OWYRI&pp=ygUId2lyZW1vY2s%3D + +

External APIs Testing with WireMock

+ https://www.youtube.com/watch?v=KaW8yl52z5w&pp=ygUId2lyZW1vY2s%3D + +

Setup a WireMock Standalone Server Locally and create a basic JSON stub

+ https://www.youtube.com/watch?v=kIgl7Yxmd4M&pp=ygUId2lyZW1vY2s%3D + +

Top use cases for API mocking with WireMock

+ https://www.youtube.com/watch?v=L3Pb0ciIhgI&pp=ygUId2lyZW1vY2s%3D + +

Wiremock for monoliths vs microservices

+ https://www.youtube.com/watch?v=wTD9vBRxoP0&pp=ygUId2lyZW1vY2s%3D + +

Web services integration testing with WireMock

+ https://www.youtube.com/watch?v=koxLAS6PM-g&pp=ygUId2lyZW1vY2s%3D + +

Exploring API Testing: Challenges and Tools

+ https://www.youtube.com/watch?v=BhsSd2wLfM0&pp=ygUId2lyZW1vY2s%3D + +

How to generate WireMock stubs with the OpenAPI generator (French)

+ https://www.youtube.com/watch?v=0jhONfBrcKw&pp=ygUId2lyZW1vY2s%3D + +

Fake It until You Make It! API Integration Testing with Containers & WireMock

+ https://www.youtube.com/watch?v=YEc6EwiHrjM&pp=ygUId2lyZW1vY2s%3D + +

Apidays Paris 2023 - Boost Productivity with Mock APIs: A Game Changer

+ https://www.youtube.com/watch?v=paqtGXPKVwE&pp=ygUId2lyZW1vY2s%3D + +

Testcontainers and API mocking with WireMock for C/C++

+ https://www.youtube.com/watch?v=dBjjFDZS5FM&pp=ygUId2lyZW1vY2s%3D + +

Spring Integration Testing Demystified: Testcontainers, WebTestClient, and WireMock

+ https://www.youtube.com/watch?v=kPqbfzZSUE4&pp=ygUId2lyZW1vY2s%3D + +

Integration Tests with WireMock and Spring Boot

+ https://www.youtube.com/watch?v=QnfwblMrBd4&pp=ygUId2lyZW1vY2s%3D + +

Response templating - how to create mock APIs that return dynamic responses in WireMock Cloud

+ https://www.youtube.com/watch?v=A-LWoewCJN4&pp=ygUId2lyZW1vY2s%3D + +

Stub External APIs with WireMock and Spring Boot

+ https://www.youtube.com/watch?v=dx-69FrfZrw&pp=ygUId2lyZW1vY2s%3D + +

REST APIs for your tests with WIreMock (Russian)

+ https://www.youtube.com/watch?v=bDKMvb3RUTg&pp=ygUId2lyZW1vY2s%3D +
From 5a82c11227a927c56be969bbe908c3259b7688d3 Mon Sep 17 00:00:00 2001 From: Tom Akehurst Date: Sat, 6 Jul 2024 10:35:30 +0100 Subject: [PATCH 21/34] Switched to redocly CLI for bundling OpenAPI, updated redoc, imported newest WireMock OpenAPI --- assets/js/redoc.standalone.js | 1946 ++++- assets/js/wiremock-admin-api.json | 6617 ++++------------ package.json | 10 +- swagger/examples/record-spec.yaml | 2 +- swagger/schemas/absent-pattern.yaml | 8 + swagger/schemas/after-pattern.yaml | 14 + swagger/schemas/and-pattern.yaml | 10 + swagger/schemas/bad-request-entity.yaml | 16 + swagger/schemas/base64-string.yaml | 4 + swagger/schemas/before-pattern.yaml | 14 + swagger/schemas/binary-equal-to-pattern.yaml | 7 + swagger/schemas/contains-pattern.yaml | 7 + swagger/schemas/content-pattern.yaml | 89 +- swagger/schemas/date-time-elements.yaml | 21 + swagger/schemas/delay-distribution.yaml | 28 +- swagger/schemas/does-not-contain-pattern.yaml | 7 + swagger/schemas/does-not-match-pattern.yaml | 7 + .../schemas/equal-to-date-time-pattern.yaml | 14 + swagger/schemas/equal-to-json-pattern.yaml | 14 + swagger/schemas/equal-to-pattern.yaml | 9 + swagger/schemas/equal-to-xml-pattern.yaml | 17 + .../has-exactly-multivalue-pattern.yaml | 10 + .../schemas/includes-multivalue-pattern.yaml | 10 + .../schemas/matches-json-path-pattern.yaml | 20 + .../schemas/matches-json-schema-pattern.yaml | 25 + swagger/schemas/matches-pattern.yaml | 7 + swagger/schemas/matches-xpath-pattern.yaml | 25 + swagger/schemas/not-pattern.yaml | 7 + swagger/schemas/or-pattern.yaml | 10 + swagger/schemas/request-pattern.yaml | 69 +- swagger/schemas/response-definition.yaml | 34 +- swagger/wiremock-admin-api.json | 6669 +++++++++++++++++ swagger/wiremock-admin-api.yaml | 11 +- yarn.lock | 2299 +++--- 34 files changed, 11551 insertions(+), 6506 deletions(-) create mode 100644 swagger/schemas/absent-pattern.yaml create mode 100644 swagger/schemas/after-pattern.yaml create mode 100644 swagger/schemas/and-pattern.yaml create mode 100644 swagger/schemas/bad-request-entity.yaml create mode 100644 swagger/schemas/base64-string.yaml create mode 100644 swagger/schemas/before-pattern.yaml create mode 100644 swagger/schemas/binary-equal-to-pattern.yaml create mode 100644 swagger/schemas/contains-pattern.yaml create mode 100644 swagger/schemas/date-time-elements.yaml create mode 100644 swagger/schemas/does-not-contain-pattern.yaml create mode 100644 swagger/schemas/does-not-match-pattern.yaml create mode 100644 swagger/schemas/equal-to-date-time-pattern.yaml create mode 100644 swagger/schemas/equal-to-json-pattern.yaml create mode 100644 swagger/schemas/equal-to-pattern.yaml create mode 100644 swagger/schemas/equal-to-xml-pattern.yaml create mode 100644 swagger/schemas/has-exactly-multivalue-pattern.yaml create mode 100644 swagger/schemas/includes-multivalue-pattern.yaml create mode 100644 swagger/schemas/matches-json-path-pattern.yaml create mode 100644 swagger/schemas/matches-json-schema-pattern.yaml create mode 100644 swagger/schemas/matches-pattern.yaml create mode 100644 swagger/schemas/matches-xpath-pattern.yaml create mode 100644 swagger/schemas/not-pattern.yaml create mode 100644 swagger/schemas/or-pattern.yaml create mode 100644 swagger/wiremock-admin-api.json diff --git a/assets/js/redoc.standalone.js b/assets/js/redoc.standalone.js index 7fa12786..a66ab517 100644 --- a/assets/js/redoc.standalone.js +++ b/assets/js/redoc.standalone.js @@ -1,122 +1,1826 @@ -/*! - * ReDoc - OpenAPI/Swagger-generated API Reference Documentation - * ------------------------------------------------------------- - * Version: "2.0.0-rc.18" - * Repo: https://github.com/Redocly/redoc - */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["null","esprima"],t):"object"==typeof exports?exports.Redoc=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):e.Redoc=t(e.null,e.esprima)}(this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=153)}([function(e,t,n){"use strict";e.exports=n(216)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return l})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return u})),n.d(t,"__generator",(function(){return p})),n.d(t,"__exportStar",(function(){return f})),n.d(t,"__values",(function(){return d})),n.d(t,"__read",(function(){return h})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return g})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return w})),n.d(t,"__makeTemplateObject",(function(){return x})),n.d(t,"__importStar",(function(){return k})),n.d(t,"__importDefault",(function(){return _})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function b(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=d(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return an})),n.d(t,"b",(function(){return Ue})),n.d(t,"c",(function(){return ue})),n.d(t,"d",(function(){return tt})),n.d(t,"e",(function(){return se})),n.d(t,"f",(function(){return lt})),n.d(t,"g",(function(){return M})),n.d(t,"h",(function(){return ut})),n.d(t,"i",(function(){return Mt})),n.d(t,"j",(function(){return zt})),n.d(t,"k",(function(){return Kt})),n.d(t,"l",(function(){return re})),n.d(t,"m",(function(){return ht})),n.d(t,"n",(function(){return Ke})),n.d(t,"o",(function(){return mt})),n.d(t,"p",(function(){return Ee})); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function l(){for(var e=[],t=0;t2&&oe("box");var n=X(t);return new de(e,K(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&oe("shallowBox"),re.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&oe("array");var n=X(t);return new At(e,K(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&oe("shallowArray"),re.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&oe("map");var n=X(t);return new Ft(e,K(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&oe("shallowMap"),re.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&oe("set");var n=X(t);return new $t(e,K(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&oe("object");var r=X(n);return ct({},e,t,r)},shallowObject:function(e,t){return"string"==typeof arguments[1]&&oe("shallowObject"),re.object(e,{},{name:t,deep:!1})},ref:ee,shallow:Z,deep:J,struct:te},re=function(e,t,n){if("string"==typeof arguments[1])return J.apply(null,arguments);if(dt(e))return e;var r=w(e)?re.object(e,t,n):Array.isArray(e)?re.array(e,t):E(e)?re.map(e,t):O(e)?re.set(e,t):e;if(r!==e)return r;m(!1)};function oe(e){m("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(ne).forEach((function(e){return re[e]=ne[e]}));var ie=q(!1,(function(e,t,n,r,o){var i=n.get,s=n.set,l=o[0]||{};!function(e,t,n){var r=Ht(e);n.name=r.name+"."+t,n.context=e,r.values[t]=new he(n),Object.defineProperty(e,t,function(e){return Qt[e]||(Qt[e]={configurable:Ie.computedConfigurable,enumerable:!1,get:function(){return Gt(this).read(this,e)},set:function(t){Gt(this).write(this,e,t)}})}(t))}(e,t,a({get:i,set:s},l))})),ae=ie({equals:F.structural}),se=function(e,t,n){if("string"==typeof t)return ie.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return ie.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new he(r)};function le(e,t){var n=function(){return ce(e,t,this,arguments)};return n.isMobxAction=!0,n}function ce(e,t,n,r){var o=function(e,t,n){var r=Ve()&&!!e,o=0;if(r){o=Date.now();var i=n&&n.length||0,a=new Array(i);if(i>0)for(var s=0;s0;Ie.computationDepth>0&&t&&m(!1),Ie.allowStateChanges||!t&&"strict"!==Ie.enforceActions||m(!1)}function ke(e,t,n){Te(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ie.runId;var r,o=Ie.trackingDerivation;if(Ie.trackingDerivation=e,!0===Ie.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(e){r=new ve(e)}return Ie.trackingDerivation=o,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=me.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;ar&&(r=s.dependenciesState)}n.length=o,e.newObserving=null,i=t.length;for(;i--;){0===(s=t[i]).diffValue&&Re(s,e),s.diffValue=0}for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,Pe(s,e))}r!==me.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function _e(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Re(t[n],e);e.dependenciesState=me.NOT_TRACKING}function Ee(e){var t=Oe(),n=e();return Se(t),n}function Oe(){var e=Ie.trackingDerivation;return Ie.trackingDerivation=null,e}function Se(e){Ie.trackingDerivation=e}function Te(e){if(e.dependenciesState!==me.UP_TO_DATE){e.dependenciesState=me.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=me.UP_TO_DATE}}var je=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.currentActionId=0,this.nextActionId=1},Ce=!0,Ae=!1,Ie=function(){var e=d();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Ce=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new je).version&&(Ce=!1),Ce?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new je):(setTimeout((function(){Ae||m("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new je)}();function Pe(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Re(e,t){if(1===e.observers.length)e.observers.length=0,Ne(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function Ne(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ie.pendingUnobservations.push(e))}function Le(){Ie.inBatch++}function Me(){if(0==--Ie.inBatch){$e();for(var e=Ie.pendingUnobservations,t=0;t0&&Ne(e),!1)}function Fe(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ge.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach((function(t){return e(t,n,r+1)}))}(ut(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof he?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Ue=function(){function e(e,t,n){void 0===e&&(e="Reaction@"+h()),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.observing=[],this.newObserving=[],this.dependenciesState=me.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+h(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ge.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ie.pendingReactions.push(this),$e())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Le(),this._isScheduled=!1,we(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ve()&&Ye({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}Me()}},e.prototype.track=function(e){Le();var t,n=Ve();n&&(t=Date.now(),Qe({name:this.name,type:"reaction"})),this._isRunning=!0;var r=ke(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&_e(this),be(r)&&this.reportExceptionInDerivation(r.cause),n&&Xe({time:Date.now()-t}),Me()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Ie.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ie.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Ve()&&Ye({type:"error",name:this.name,message:n,error:""+e}),Ie.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Le(),_e(this),Me()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t0||Ie.isRunningReactions||Be(qe)}function qe(){Ie.isRunningReactions=!0;for(var e=Ie.pendingReactions,t=0;e.length>0;){++t===ze&&(console.error("Reaction doesn't converge to a stable state after "+ze+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r",e):2===arguments.length&&"function"==typeof t?le(e,t):1===arguments.length&&"string"==typeof e?Ze(e):!0!==r?Ze(t).apply(null,arguments):void(e[t]=le(e.name||t,n.value))};function nt(e,t,n){x(e,t,le(t,n.bind(e)))}function rt(e,t){void 0===t&&(t=p);var n,r=t&&t.name||e.name||"Autorun@"+h();if(!t.scheduler&&!t.delay)n=new Ue(r,(function(){this.track(a)}),t.onError);else{var o=it(t),i=!1;n=new Ue(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed||n.track(a)})))}),t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}tt.bound=function(e,t,n,r){return!0===r?(nt(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return nt(this,t,n.value||n.initializer.call(this)),this[t]},set:Je}:{enumerable:!1,configurable:!0,set:function(e){nt(this,t,e)},get:function(){}}};var ot=function(e){return e()};function it(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:ot}function at(e,t,n){return st("onBecomeUnobserved",e,t,n)}function st(e,t,n,r){var o="function"==typeof r?Jt(t,n):Jt(t),i="function"==typeof r?r:n,a=o[e];return"function"!=typeof a?m(!1):(o[e]=function(){a.call(this),i.call(this)},function(){o[e]=a})}function lt(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,o=e.disableErrorBoundaries,i=e.arrayBuffer,a=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Ie.pendingReactions.length||Ie.inBatch||Ie.isRunningReactions)&&m("isolateGlobalState should be called before MobX is running any reactions"),Ae=!0,Ce&&(0==--d().__mobxInstanceCount&&(d().__mobxGlobals=void 0),Ie=new je)),void 0!==t){var s=void 0;switch(t){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:m("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Ie.enforceActions=s,Ie.allowStateChanges=!0!==s&&"strict"!==s}void 0!==n&&(Ie.computedRequiresReaction=!!n),void 0!==r&&(Ie.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),Ie.disableErrorBoundaries=!!o),"number"==typeof i&&Nt(i),a&&He(a)}function ct(e,t,n,r){var o=(r=X(r)).defaultDecorator||(!1===r.deep?ee:J);$(e),Ht(e,r.name,o.enhancer),Le();try{for(var i in t){var a=Object.getOwnPropertyDescriptor(t,i);0;var s=(n&&i in n?n[i]:a.get?ie:o)(e,i,a,!0);s&&Object.defineProperty(e,i,s)}}finally{Me()}return e}function ut(e,t){return pt(Jt(e,t))}function pt(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n).map(pt)),r}function ft(e,t){if(null==e)return!1;if(void 0!==t){if(Kt(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Kt(e)||!!e.$mobx||L(e)||We(e)||ye(e)}function dt(e){return 1!==arguments.length&&m(!1),ft(e)}function ht(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Zt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Zt(e).observe(t,n)}(e,t,n)}function mt(e,t){void 0===t&&(t=void 0),Le();try{return e.apply(t)}finally{Me()}}function gt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function yt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),y((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function vt(e,t){var n=Oe();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o0}function wt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),y((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function xt(e,t){var n=Oe(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return yt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),wt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r0&&e+t+1>Tt&&Nt(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;xe(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=u),gt(this)){var i=vt(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return u;t=i.removedCount,n=i.added}var a=(n=0===n.length?n:n.map((function(e){return r.enhancer(e,void 0)}))).length-t;this.updateArrayLength(o,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,l([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&Ve(),o=bt(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&Qe(a({},i,{name:this.atom.name})),this.atom.reportChanged(),o&&xt(this,i),r&&Xe()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&Ve(),o=bt(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&Qe(a({},i,{name:this.atom.name})),this.atom.reportChanged(),o&&xt(this,i),r&&Xe()},e}(),At=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+h()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new Ct(r,n,i,o);if(k(i,"$mobx",a),t&&t.length){var s=pe(!0);i.spliceWithArray(0,0,t),fe(s)}return St&&Object.defineProperty(a.array,"0",It),i}return i(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),p=["%","/","?",";","#"].concat(u),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(225);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i127?R+="x":R+=P[N];if(!R.match(d)){var M=A.slice(0,T),D=A.slice(T+1),F=P.match(h);F&&(M.push(F[1]),D.unshift(F[2])),D.length&&(b="/"+D.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+U,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[k])for(T=0,I=u.length;T0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=_.slice(-1)[0],S=(n.host||e.host||_.length>1)&&("."===O||".."===O)||""===O,T=0,j=_.length;j>=0;j--)"."===(O=_[j])?_.splice(j,1):".."===O?(_.splice(j,1),T++):T&&(_.splice(j,1),T--);if(!x&&!k)for(;T--;T)_.unshift("..");!x||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),S&&"/"!==_.join("/").substr(-1)&&_.push("");var C,A=""===_[0]||_[0]&&"/"===_[0].charAt(0);E&&(n.hostname=n.host=A?"":_.length?_.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(x=x||n.host&&_.length)&&!A&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r=n(25),o=n(13),i=n(121),a=n(15).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";(function(e){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var r=n(229),o=n(230),i=n(123);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return j(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){for(var p=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=p}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,o){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),u=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function j(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},l.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);R(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);R(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function $(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(6))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,p=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):p=-1,c.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++p1)for(var n=1;n=0?e.substr(t).toLowerCase():""},t.getHash=function(e){var t=e.indexOf("#");return t>=0?e.substr(t):"#"},t.stripHash=function(e){var t=e.indexOf("#");return t>=0&&(e=e.substr(0,t)),e},t.isHttp=function(e){var t=s.getProtocol(e);return"http"===t||"https"===t||void 0===t&&r.browser},t.isFileSystemPath=function(e){if(r.browser)return!1;var t=s.getProtocol(e);return void 0===t||"file"===t},t.fromFileSystemPath=function(e){o&&(e=e.replace(/\\/g,"/")),e=encodeURI(e);for(var t=0;t0&&(p=e.exports.formatter.apply(null,s)),n&&n.message&&(p+=(p?" \n":"")+n.message);var f=new t(p);return l(f,n),c(f),u(f,r),f}}function l(e,t){!function(e,t){!function(e){if(!m)return!1;var t=Object.getOwnPropertyDescriptor(e,"stack");if(!t)return!1;return"function"==typeof t.get}(e)?e.stack=t?d(e.stack,t.stack):h(e.stack):t?function(e,t){var n=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return d(n.get.apply(e),t.stack)},enumerable:!1,configurable:!0})}(e,t):(n=e,r=Object.getOwnPropertyDescriptor(n,"stack"),Object.defineProperty(n,"stack",{get:function(){return h(r.get.apply(n))},enumerable:!1,configurable:!0}));var n,r}(e,t),u(e,t)}function c(e){e.toJSON=p,e.inspect=f}function u(e,t){if(t&&"object"==typeof t)for(var n=Object.keys(t),r=0;r=0))try{e[o]=t[o]}catch(e){}}}function p(){var e={},t=Object.keys(this);t=t.concat(a);for(var n=0;n=0)return t.splice(n,1),t.join("\n")}return e}}e.exports=s(Error),e.exports.error=s(Error),e.exports.eval=s(EvalError),e.exports.range=s(RangeError),e.exports.reference=s(ReferenceError),e.exports.syntax=s(SyntaxError),e.exports.type=s(TypeError),e.exports.uri=s(URIError),e.exports.formatter=r;var m=!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(217)},function(e,t){e.exports=!1},function(e,t,n){var r,o,i,a=n(156),s=n(3),l=n(7),c=n(20),u=n(13),p=n(53),f=n(39),d=s.WeakMap;if(a){var h=new d,m=h.get,g=h.has,y=h.set;r=function(e,t){return y.call(h,e,t),t},o=function(e){return m.call(h,e)||{}},i=function(e){return g.call(h,e)}}else{var v=p("state");f[v]=!0,r=function(e,t){return c(e,v,t),t},o=function(e){return u(e,v)?e[v]:{}},i=function(e){return u(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(71),o=n(40);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(68),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(46),o=n(58),i=n(5);function a(e,t,n){var r=[];return e.include.forEach((function(e){n=a(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===r.indexOf(t)}))}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;ee.length)return;if(!(x instanceof o)){if(m&&b!=t.length-1){if(f.lastIndex=w,!(T=f.exec(e)))break;for(var k=T.index+(h?T[1].length:0),_=T.index+T[0].length,E=b,O=w,S=t.length;E=(O+=t[E].length)&&(++b,w=O);if(t[b]instanceof o)continue;j=E-b,x=e.slice(w,O),T.index-=w}else{f.lastIndex=0;var T=f.exec(x),j=1}if(T){h&&(g=T[1]?T[1].length:0);_=(k=T.index+g)+(T=T[0].slice(g)).length;var C=x.slice(0,k),A=x.slice(_),I=[b,j];C&&(++b,w+=C.length,I.push(C));var P=new o(c,d?r.tokenize(T,d):T,y,T,m);if(I.push(P),A&&I.push(A),Array.prototype.splice.apply(t,I),1!=j&&r.matchGrammar(e,t,n,b,w,!0,c),s)break}else if(s)break}}}}},tokenize:function(e,t){var n=[e],o=t.rest;if(o){for(var i in o)t[i]=o[i];delete t.rest}return r.matchGrammar(e,n,t,0,0,!1),n},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,i=0;o=n[i++];)o(t)}},Token:o};function o(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o}if(e.Prism=r,o.stringify=function(e,t){if("string"==typeof e)return e;if(Array.isArray(e))return e.map((function(e){return o.stringify(e,t)})).join("");var n={type:e.type,content:o.stringify(e.content,t),tag:"span",classes:["token",e.type],attributes:{},language:t};if(e.alias){var i=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(n.classes,i)}r.hooks.run("wrap",n);var a=Object.keys(n.attributes).map((function(e){return e+'="'+(n.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+(a?" "+a:"")+">"+n.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),o=n.language,i=n.code,a=n.immediateClose;e.postMessage(r.highlight(i,r.languages[o],o)),a&&e.close()}),!1),r):r;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(r.filename=i.src,r.manual||i.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n),n.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:r}};o["language-"+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:o},n.languages.insertBefore("markup","cdata",i)}}),n.languages.xml=n.languages.extend("markup",{}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.markup.tag.addInlined("script","javascript"),n.languages.js=n.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(e){e=e||document;var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(e.querySelectorAll("pre[data-src]")).forEach((function(e){if(!e.hasAttribute("data-src-loaded")){for(var r,o=e.getAttribute("data-src"),i=e,a=/\blang(?:uage)?-([\w-]+)\b/i;i&&!a.test(i.className);)i=i.parentNode;if(i&&(r=(e.className.match(a)||[,""])[1]),!r){var s=(o.match(/\.(\w+)$/)||[,""])[1];r=t[s]||s}var l=document.createElement("code");l.className="language-"+r,e.textContent="",l.textContent="Loading…",e.appendChild(l);var c=new XMLHttpRequest;c.open("GET",o,!0),c.onreadystatechange=function(){4==c.readyState&&(c.status<400&&c.responseText?(l.textContent=c.responseText,n.highlightElement(l),e.setAttribute("data-src-loaded","")):c.status>=400?l.textContent="✖ Error "+c.status+" while fetching file: "+c.statusText:l.textContent="✖ Error: File does not exist or is empty")},c.send(null)}})),n.plugins.toolbar&&n.plugins.toolbar.registerButton("download-file",(function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-src")&&t.hasAttribute("data-download-link")){var n=t.getAttribute("data-src"),r=document.createElement("a");return r.textContent=t.getAttribute("data-download-link-label")||"Download",r.setAttribute("download",""),r.href=n,r}}))},document.addEventListener("DOMContentLoaded",(function(){self.Prism.fileHighlight()})))}).call(this,n(6))},function(e,t,n){var r=n(3),o=n(66),i=n(30),a=r["__core-js_shared__"]||o("__core-js_shared__",{});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.2.1",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(25),o=n(3),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(40);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(44);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,o="/"===a.charAt(0))}return(o?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!o).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),a="/"===o(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,l=0;l=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var o="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(12))},function(e,t,n){var r,o,i;o=[t],void 0===(i="function"==typeof(r=function(e){"use strict";e.__esModule=!0;var t={},n=Object.prototype.hasOwnProperty,r=function(e){var r=arguments.length<=1||void 0===arguments[1]?t:arguments[1],o=r.cache||{};return function(){for(var t=arguments.length,i=Array(t),a=0;a2?r:e).apply(void 0,o)}}e.memoize=a,e.debounce=s,e.bind=l,e.default={memoize:a,debounce:s,bind:l}})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){(function(t){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:g,table:g,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||k.defaults,this.rules=n.normal,this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.rules=n.gfm)}n._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,n.def=f(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d{1,9}\.)/,n.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,n.item=f(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=f(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",n._comment=//,n.html=f(n.html,"i").replace("comment",n._comment).replace("tag",n._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n.paragraph=f(n._paragraph).replace("hr",n.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",n._tag).getRegex(),n.blockquote=f(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=y({},n),n.gfm=y({},n.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),n.pedantic=y({},n.normal,{html:f("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:g,paragraph:f(n.normal._paragraph).replace("hr",n.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",n.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,o,i,a,s,l,c,p,f,d,h,m,g,y,w,x;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e)){var k=this.tokens[this.tokens.length-1];e=e.substring(i[0].length),k&&"paragraph"===k.type?k.text+="\n"+i[0].trimRight():(i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?i:b(i,"\n")}))}else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2]?i[2].trim():i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if((i=this.rules.nptable.exec(e))&&(l={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(i[0].length),h=0;h ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),c={type:"list_start",ordered:y=(a=i[2]).length>1,start:y?+a:"",loose:!1},this.tokens.push(c),p=[],r=!1,g=(i=i[0].match(this.rules.item)).length,h=0;h1?1===s.length:s.length>1||this.options.smartLists&&s!==a)&&(e=i.slice(h+1).join("\n")+e,h=g-1)),o=r||/\n\n(?!\s*$)/.test(l),h!==g-1&&(r="\n"===l.charAt(l.length-1),o||(o=r)),o&&(c.loose=!0),x=void 0,(w=/^\[[ xX]\] /.test(l))&&(x=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),f={type:"list_item_start",task:w,checked:x,loose:o},p.push(f),this.tokens.push(f),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(c.loose)for(g=p.length,h=0;h?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",o.em=f(o.em).replace(/punctuation/g,o._punctuation).getRegex(),o._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,o._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,o._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,o.autolink=f(o.autolink).replace("scheme",o._scheme).replace("email",o._email).getRegex(),o._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,o.tag=f(o.tag).replace("comment",n._comment).replace("attribute",o._attribute).getRegex(),o._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,o._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,o._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,o.link=f(o.link).replace("label",o._label).replace("href",o._href).replace("title",o._title).getRegex(),o.reflink=f(o.reflink).replace("label",o._label).getRegex(),o.normal=y({},o),o.pedantic=y({},o.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",o._label).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",o._label).getRegex()}),o.gfm=y({},o.normal,{escape:f(o.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(a[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.inRawBlock=!1),e=e.substring(a[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):u(a[0]):a[0];else if(a=this.rules.link.exec(e)){var c=w(a[2],"()");if(c>-1){var p=4+a[1].length+c;a[2]=a[2].substring(0,c),a[0]=a[0].substring(0,p).trim(),a[3]=""}e=e.substring(a[0].length),this.inLink=!0,r=a[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],o=t[3]):o="":o=a[3]?a[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(a,{href:i.escapes(r),title:i.escapes(o)}),this.inLink=!1}else if((a=this.rules.reflink.exec(e))||(a=this.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=a[0].charAt(0),e=a[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(a,t),this.inLink=!1}else if(a=this.rules.strong.exec(e))e=e.substring(a[0].length),l+=this.renderer.strong(this.output(a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.em.exec(e))e=e.substring(a[0].length),l+=this.renderer.em(this.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.code.exec(e))e=e.substring(a[0].length),l+=this.renderer.codespan(u(a[2].trim(),!0));else if(a=this.rules.br.exec(e))e=e.substring(a[0].length),l+=this.renderer.br();else if(a=this.rules.del.exec(e))e=e.substring(a[0].length),l+=this.renderer.del(this.output(a[1]));else if(a=this.rules.autolink.exec(e))e=e.substring(a[0].length),r="@"===a[2]?"mailto:"+(n=u(this.mangle(a[1]))):n=u(a[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(a=this.rules.url.exec(e))){if(a=this.rules.text.exec(e))e=e.substring(a[0].length),this.inRawBlock?l+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):u(a[0]):a[0]):l+=this.renderer.text(u(this.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===a[2])r="mailto:"+(n=u(a[0]));else{do{s=a[0],a[0]=this.rules._backpedal.exec(a[0])[0]}while(s!==a[0]);n=u(a[0]),r="www."===a[1]?"http://"+n:n}e=e.substring(a[0].length),l+=this.renderer.link(r,null,n)}return l},i.escapes=function(e){return e?e.replace(i.rules._escapes,"$1"):e},i.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},a.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,r);null!=o&&o!==e&&(n=!0,e=o)}return r?'
'+(n?e:u(e,!0))+"
\n":"
"+(n?e:u(e,!0))+"
"},a.prototype.blockquote=function(e){return"
\n"+e+"
\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},a.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.checkbox=function(e){return" "},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(null===(e=d(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},a.prototype.image=function(e,t,n){if(null===(e=d(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},a.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new i(e.links,this.options),this.inlineText=new i(e.links,y({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop(),this.token},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,p(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,o="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var h={},m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function y(e){for(var t,n,r=1;r=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}g.exec=g,k.options=k.setOptions=function(e){return y(k.defaults,e),k},k.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},k.defaults=k.getDefaults(),k.Parser=l,k.parser=l.parse,k.Renderer=a,k.TextRenderer=s,k.Lexer=r,k.lexer=r.lex,k.InlineLexer=i,k.inlineLexer=i.output,k.Slugger=c,k.parse=k,e.exports=k}(this||"undefined"!=typeof window&&window)}).call(this,n(6))},function(e,t,n){var r=n(7);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(37),o=n(54),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(18),o=n(70),i=n(38),a=n(32),s=n(52),l=n(13),c=n(94),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){var r=n(19),o=n(164),i=n(73),a=n(39),s=n(103),l=n(67),c=n(53)("IE_PROTO"),u=function(){},p=function(){var e,t=l("iframe"),n=i.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("