Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
957b4b125e | ||
|
|
a59f632516 | ||
|
|
20786e53c3 | ||
|
|
120c4dd884 | ||
|
|
5bdce56bba | ||
|
|
e761e2da50 | ||
|
|
9d330d9509 | ||
|
|
c8f6d16891 | ||
|
|
857ef05b07 | ||
|
|
586b88d8f3 | ||
|
|
27cd5f7f2a | ||
|
|
90812f5c43 | ||
|
|
a6ae8b0521 | ||
|
|
91530b64c6 | ||
|
|
6820d6bc70 | ||
|
|
f50ad29a2b | ||
|
|
27e38101a4 | ||
|
|
4bac38e67b | ||
|
|
10abf46597 | ||
|
|
42841e3092 | ||
|
|
0654aefe58 | ||
|
|
41b1ca4483 | ||
|
|
b109d4c847 | ||
|
|
591c12f1a7 | ||
|
|
271918a678 | ||
|
|
c5c40e31c4 | ||
|
|
3ac6c9ec3a | ||
|
|
5fa35d5b81 | ||
|
|
f9b215deab | ||
|
|
0837873f55 | ||
|
|
02b8848912 | ||
|
|
6e39a58b2d | ||
|
|
e146a9712e | ||
|
|
ec7529399e | ||
|
|
824baf7e9d | ||
|
|
dd50eb5e12 | ||
|
|
9b56e1a4c8 | ||
|
|
608abaf0e1 | ||
|
|
64e13a94da | ||
|
|
5051f91c97 | ||
|
|
d1ae81a27e | ||
|
|
1ca401959c | ||
|
|
cd4bd4a18e | ||
|
|
8a69f08c29 | ||
|
|
e533b0827a | ||
|
|
dc78dfdad8 | ||
|
|
23ebba4207 | ||
|
|
afcba582b3 | ||
|
|
12f1d23048 | ||
|
|
a5eb3dfa91 | ||
|
|
5cd642c9a0 | ||
|
|
3f2d2871f0 | ||
|
|
247c1a306a | ||
|
|
4ca634a45b | ||
|
|
37c00ab3fb | ||
|
|
65aac1da2c | ||
|
|
4c069138e8 | ||
|
|
748b5d3c2f | ||
|
|
1dd7cfe043 | ||
|
|
33eb9d381c | ||
|
|
e80101d98c | ||
|
|
8de704d7ae | ||
|
|
165ac6c076 | ||
|
|
9eb0db466c | ||
|
|
df0f43084f | ||
|
|
16b6ed7fd6 |
No files matched your search
+2
-3
@@ -1,7 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
testproj/db.sqlite3
|
testproj/db.sqlite3
|
||||||
testproj/staticfiles
|
testproj/staticfiles
|
||||||
.vscode/
|
\.pytest_cache/
|
||||||
|
docs/\.doctrees/
|
||||||
|
|
||||||
# Created by .ignore support plugin (hsz.mobi)
|
# Created by .ignore support plugin (hsz.mobi)
|
||||||
### Python template
|
### Python template
|
||||||
@@ -159,5 +160,3 @@ com_crashlytics_export_strings.xml
|
|||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
fabric.properties
|
fabric.properties
|
||||||
|
|
||||||
\.pytest_cache/
|
|
||||||
Generated
+8
-3
@@ -16,10 +16,15 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/testproj" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/testproj" isTestSource="false" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.pytest_cache" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/docs/.doctrees" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/docs/_build" />
|
<excludeFolder url="file://$MODULE_DIR$/docs/_build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/htmlcov" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/src/drf_yasg.egg-info" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3.6 (drf-yasg)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Python 3 (drf-yasg)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TemplatesService">
|
<component name="TemplatesService">
|
||||||
@@ -31,7 +36,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="TestRunnerService">
|
<component name="TestRunnerService">
|
||||||
<option name="projectConfiguration" value="py.test" />
|
<option name="projectConfiguration" value="pytest" />
|
||||||
<option name="PROJECT_TEST_RUNNER" value="py.test" />
|
<option name="PROJECT_TEST_RUNNER" value="pytest" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
-5
@@ -55,11 +55,6 @@
|
|||||||
</option>
|
</option>
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="PyShadowingNamesInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
<inspection_tool class="PyShadowingNamesInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="PyUnusedLocalInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false">
|
|
||||||
<option name="ignoreTupleUnpacking" value="true" />
|
|
||||||
<option name="ignoreLambdaParameters" value="true" />
|
|
||||||
<option name="ignoreLoopIterationVariables" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
<option name="processLiterals" value="true" />
|
<option name="processLiterals" value="true" />
|
||||||
|
|||||||
Generated
+1
-1
@@ -69,7 +69,7 @@
|
|||||||
<textMaps />
|
<textMaps />
|
||||||
</LinkMapSettings>
|
</LinkMapSettings>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (drf-yasg)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3 (drf-yasg)" project-jdk-type="Python SDK" />
|
||||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||||
<option name="version" value="3" />
|
<option name="version" value="3" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
+18
-22
@@ -1,28 +1,28 @@
|
|||||||
language: python
|
language: python
|
||||||
cache: pip
|
sudo: false
|
||||||
|
|
||||||
python:
|
python:
|
||||||
|
- '2.7'
|
||||||
- '3.4'
|
- '3.4'
|
||||||
- '3.5'
|
- '3.5'
|
||||||
- '3.6'
|
- '3.6'
|
||||||
|
|
||||||
env:
|
cache: pip
|
||||||
- DRF=3.7
|
|
||||||
- DRF=3.8
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: test
|
- # workaround for python 3.7 on travis https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-401756442
|
||||||
python: '2.7'
|
stage: test
|
||||||
env: DRF=3.7
|
python: '3.7'
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
-
|
-
|
||||||
python: '3.6'
|
python: '3.6'
|
||||||
env: DRF=master
|
env: TOXENV=djmaster
|
||||||
-
|
- # readthedocs uses python 3.5 for building
|
||||||
python: '3.5'
|
python: '3.5'
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs
|
||||||
-
|
-
|
||||||
python: '2.7'
|
python: '3.6'
|
||||||
env: TOXENV=lint
|
env: TOXENV=lint
|
||||||
|
|
||||||
- stage: publish
|
- stage: publish
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: TOXENV=lint
|
- env: TOXENV=lint
|
||||||
- env: DRF=master
|
- env: TOXENV=djmaster
|
||||||
|
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
@@ -49,20 +49,16 @@ install:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- coverage erase
|
- coverage erase
|
||||||
- |
|
|
||||||
[[ -z "$TOXENV" && -z "$PYPI_DEPLOY" ]] && REPORT_COVERAGE="yes" || REPORT_COVERAGE="no";
|
|
||||||
echo "Reporting coverage: ${REPORT_COVERAGE}"
|
|
||||||
- |
|
|
||||||
[[ -z "$TOXENV" && ! -z "$DRF" && "$DRF" != "master" ]] && USE_DETOX="yes" || USE_DETOX="no";
|
|
||||||
echo "Using detox: ${USE_DETOX}"
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- 'if [[ "$USE_DETOX" == "yes" ]]; then detox; else tox; fi'
|
- tox
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coverage combine
|
- |
|
||||||
- 'if [[ "$REPORT_COVERAGE" == "yes" ]]; then coverage report; fi'
|
if [[ -z "$TOXENV" && -z "$PYPI_DEPLOY" ]]; then
|
||||||
- 'if [[ "$REPORT_COVERAGE" == "yes" ]]; then codecov; fi'
|
chmod +x coverage.sh
|
||||||
|
./coverage.sh
|
||||||
|
fi
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|||||||
+2
-2
@@ -35,8 +35,8 @@ You want to contribute some code? Great! Here are a few steps to get you started
|
|||||||
|
|
||||||
$ virtualenv venv
|
$ virtualenv venv
|
||||||
$ source venv/bin/activate
|
$ source venv/bin/activate
|
||||||
(venv) $ pip install -e .[validation]
|
(venv) $ pip install -U -e .[validation]
|
||||||
(venv) $ pip install -r requirements/dev.txt
|
(venv) $ pip install -U -r requirements/dev.txt
|
||||||
|
|
||||||
#. **Make your changes and check them against the test project**
|
#. **Make your changes and check them against the test project**
|
||||||
|
|
||||||
|
|||||||
+13
-16
@@ -11,9 +11,9 @@ Generate **real** Swagger/OpenAPI 2.0 specifications from a Django Rest Framewor
|
|||||||
|
|
||||||
Compatible with
|
Compatible with
|
||||||
|
|
||||||
- **Django Rest Framework**: 3.7.7, 3.8.x
|
- **Django Rest Framework**: 3.7.7, 3.8
|
||||||
- **Django**: 1.11.x, 2.0.x
|
- **Django**: 1.11, 2.0, 2.1
|
||||||
- **Python**: 2.7, 3.4, 3.5, 3.6
|
- **Python**: 2.7, 3.4, 3.5, 3.6, 3.7
|
||||||
|
|
||||||
Resources:
|
Resources:
|
||||||
|
|
||||||
@@ -85,14 +85,14 @@ The preferred instalation method is directly from pypi:
|
|||||||
|
|
||||||
.. code:: console
|
.. code:: console
|
||||||
|
|
||||||
pip install drf-yasg
|
pip install -U drf-yasg
|
||||||
|
|
||||||
Additionally, if you want to use the built-in validation mechanisms (see `4. Validation`_), you need to install
|
Additionally, if you want to use the built-in validation mechanisms (see `4. Validation`_), you need to install
|
||||||
some extra requirements:
|
some extra requirements:
|
||||||
|
|
||||||
.. code:: console
|
.. code:: console
|
||||||
|
|
||||||
pip install drf-yasg[validation]
|
pip install -U drf-yasg[validation]
|
||||||
|
|
||||||
.. _readme-quickstart:
|
.. _readme-quickstart:
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ For additional usage examples, you can take a look at the test project in the ``
|
|||||||
$ virtualenv venv
|
$ virtualenv venv
|
||||||
$ source venv/bin/activate
|
$ source venv/bin/activate
|
||||||
(venv) $ cd testproj
|
(venv) $ cd testproj
|
||||||
(venv) $ pip install -r requirements.txt
|
(venv) $ pip install -U -r requirements.txt
|
||||||
(venv) $ python manage.py migrate
|
(venv) $ python manage.py migrate
|
||||||
(venv) $ python manage.py shell -c "import createsuperuser"
|
(venv) $ python manage.py shell -c "import createsuperuser"
|
||||||
(venv) $ python manage.py runserver
|
(venv) $ python manage.py runserver
|
||||||
@@ -315,8 +315,8 @@ From here on, the terms “OpenAPI” and “Swagger” are used interchangeably
|
|||||||
Swagger in Django Rest Framework
|
Swagger in Django Rest Framework
|
||||||
================================
|
================================
|
||||||
|
|
||||||
Since Django Rest 3.7, there is now `built in support <http://www.django-rest-framework.org/api-guide/schemas/>`__ for
|
Since Django Rest Framework 3.7, there is now `built in support <http://www.django-rest-framework.org/api-guide/schemas/>`__
|
||||||
automatic OpenAPI 2.0 schema generation. However, this generation is based on the `coreapi <http://www.coreapi.org/>`__
|
for automatic OpenAPI 2.0 schema generation. However, this generation is based on the `coreapi <http://www.coreapi.org/>`__
|
||||||
standard, which for the moment is vastly inferior to OpenAPI in both features and tooling support. In particular,
|
standard, which for the moment is vastly inferior to OpenAPI in both features and tooling support. In particular,
|
||||||
the OpenAPI codec/compatibility layer provided has a few major problems:
|
the OpenAPI codec/compatibility layer provided has a few major problems:
|
||||||
|
|
||||||
@@ -329,18 +329,15 @@ In short this makes the generated schema unusable for code generation, and medio
|
|||||||
Other libraries
|
Other libraries
|
||||||
===============
|
===============
|
||||||
|
|
||||||
There are currently two decent Swagger schema generators that I could
|
There are currently two decent Swagger schema generators that I could find for django-rest-framework:
|
||||||
find for django-rest-framework:
|
|
||||||
|
|
||||||
* `django-rest-swagger <https://github.com/marcgibbons/django-rest-swagger>`__
|
* `django-rest-swagger <https://github.com/marcgibbons/django-rest-swagger>`__
|
||||||
* `drf-openapi <https://github.com/limdauto/drf_openapi>`__
|
* `drf-openapi <https://github.com/limdauto/drf_openapi>`__
|
||||||
|
|
||||||
Out of the two, ``django-rest-swagger`` is just a wrapper around DRF 3.7 schema generation with an added UI, and
|
``django-rest-swagger`` is just a wrapper around DRF 3.7 schema generation with an added UI, and
|
||||||
thus presents the same problems. ``drf-openapi`` is a bit more involved and implements some custom handling for response
|
thus presents the same problems, while also being unmaintained. ``drf-openapi`` was
|
||||||
schemas, but ultimately still falls short in code generation because the responses are plain of lacking support for
|
`discontinued by the author <https://github.com/limdauto/drf_openapi/commit/1673c6e039eec7f089336a83bdc31613f32f7e21>`_
|
||||||
named schemas.
|
on April 3rd, 2018.
|
||||||
|
|
||||||
Both projects are also currently unmantained.
|
|
||||||
|
|
||||||
************************
|
************************
|
||||||
Third-party integrations
|
Third-party integrations
|
||||||
|
|||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
coverage combine
|
||||||
|
coverage report
|
||||||
|
codecov
|
||||||
+59
-3
@@ -4,9 +4,65 @@ Changelog
|
|||||||
|
|
||||||
|
|
||||||
**********
|
**********
|
||||||
**1.9.2**
|
**1.10.2**
|
||||||
**********
|
**********
|
||||||
|
|
||||||
|
*Release date: Sep 13, 2018*
|
||||||
|
|
||||||
|
- **ADDED:** added the ``DISPLAY_OPERATION_ID `` ``swagger-ui`` setting
|
||||||
|
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.38
|
||||||
|
- **IMPROVED:** Operation summary will now be parsed from multi-line view method docstrings (:issue:`205`)
|
||||||
|
- **IMPROVED:** ``pattern`` will now work on any field with a ``RegexValidator``
|
||||||
|
(would previously not appear on fields with special formats such as ``EmailField``)
|
||||||
|
- **FIXED:** fixed an issue with ``RelatedFieldInspector`` handling of nested serializers
|
||||||
|
- **FIXED:** fixed handling of ``reverse_lazy`` in URL settings (:issue:`209`)
|
||||||
|
|
||||||
|
**********
|
||||||
|
**1.10.1**
|
||||||
|
**********
|
||||||
|
|
||||||
|
*Release date: Sep 10, 2018*
|
||||||
|
|
||||||
|
- **ADDED:** added the ``SPEC_URL`` setting for controlling the download link in ``swagger-ui`` and ``ReDoc``
|
||||||
|
- **ADDED:** updated ``ReDoc`` settings (added ``NATIVE_SCROLLBARS`` and ``REQUIRED_PROPS_FIRST``)
|
||||||
|
- **ADDED:** added ``extra_styles`` and ``extra_scripts`` blocks to ui templates (:issue:`178`)
|
||||||
|
- **IMPROVED:** updated ``swagger-ui`` to version 3.18.2
|
||||||
|
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.37
|
||||||
|
- **FIXED:** stopped generating invalid OpenAPI by improper placement of ``readOnly`` Schemas
|
||||||
|
- **FIXED:** fixed broken CSS when ``USE_SESSION_AUTH=False``
|
||||||
|
- **FIXED:** fixed implementation of ``operation_summary`` and ``deprecated`` (:pr:`194`, :pr:`198`)
|
||||||
|
- **FIXED:** fixed a bug related to nested ``typing`` hints (:pr:`195`)
|
||||||
|
- **FIXED:** removed dependency on ``future`` (:issue:`196`)
|
||||||
|
- **FIXED:** fixed exceptions logged for fields with ``default=None`` (:issue:`203`)
|
||||||
|
- **FIXED:** fixed ``request_body=no_body`` handling and related tests (:issue:`188`, :issue:`199`)
|
||||||
|
|
||||||
|
|
||||||
|
**********
|
||||||
|
**1.10.0**
|
||||||
|
**********
|
||||||
|
|
||||||
|
*Release date: Aug 08, 2018*
|
||||||
|
|
||||||
|
- **ADDED:** added ``EXCLUDED_MEDIA_TYPES`` setting for controlling ``produces`` MIME type filtering (:issue:`158`)
|
||||||
|
- **ADDED:** added support for ``SerializerMethodField``, via the ``swagger_serializer_method`` decorator for the
|
||||||
|
method field, and support for Python 3.5 style type hinting of the method field return type
|
||||||
|
(:issue:`137`, :pr:`175`, :pr:`179`)
|
||||||
|
|
||||||
|
*NOTE:* in order for this to work, you will have to add the new ``drf_yasg.inspectors.SerializerMethodFieldInspector``
|
||||||
|
to your ``DEFAULT_FIELD_INSPECTORS`` array if you changed it from the default value
|
||||||
|
|
||||||
|
- **IMPROVED:** updated ``swagger-ui`` to version 3.18.0
|
||||||
|
- **IMPROVED:** added support for Python 3.7 and Django 2.1 (:pr:`176`)
|
||||||
|
- **IMPROVED:** ``swagger_schema_fields`` will now also work on serializer ``Field``\ s (:issue:`167`)
|
||||||
|
- **IMPROVED:** ``ref_name`` collisions will now log a warning message (:issue:`156`)
|
||||||
|
- **IMPROVED:** added ``operation_summary`` and ``deprecated`` arguments to ``swagger_auto_schema``
|
||||||
|
(:issue:`149`, :issue:`173`)
|
||||||
|
- **FIXED:** made ``swagger_auto_schema`` work with DRF 3.9 ``@action`` mappings (:issue:`177`)
|
||||||
|
|
||||||
|
*********
|
||||||
|
**1.9.2**
|
||||||
|
*********
|
||||||
|
|
||||||
*Release date: Aug 03, 2018*
|
*Release date: Aug 03, 2018*
|
||||||
|
|
||||||
- **IMPROVED:** updated ``swagger-ui`` to version 3.17.6
|
- **IMPROVED:** updated ``swagger-ui`` to version 3.17.6
|
||||||
@@ -24,7 +80,7 @@ Changelog
|
|||||||
|
|
||||||
- **IMPROVED:** added a ``swagger_fake_view`` marker to more easily detect mock views in view methods;
|
- **IMPROVED:** added a ``swagger_fake_view`` marker to more easily detect mock views in view methods;
|
||||||
``getattr(self, 'swagger_fake_view', False)`` inside a view method like ``get_serializer_class`` will tell you if the
|
``getattr(self, 'swagger_fake_view', False)`` inside a view method like ``get_serializer_class`` will tell you if the
|
||||||
view instnace is being used for swagger schema introspection (:issue:`154`)
|
view instance is being used for swagger schema introspection (:issue:`154`)
|
||||||
- **IMPROVED:** updated ``swagger-ui`` to version 3.17.1
|
- **IMPROVED:** updated ``swagger-ui`` to version 3.17.1
|
||||||
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.25
|
- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-alpha.25
|
||||||
- **FIXED:** fixed wrong handling of duplicate urls in urlconf (:pr:`155`)
|
- **FIXED:** fixed wrong handling of duplicate urls in urlconf (:pr:`155`)
|
||||||
@@ -39,7 +95,7 @@ Changelog
|
|||||||
- **ADDED:** added ``DEFAULT_GENERATOR_CLASS`` setting and ``--generator-class`` argument to the ``generate_swagger``
|
- **ADDED:** added ``DEFAULT_GENERATOR_CLASS`` setting and ``--generator-class`` argument to the ``generate_swagger``
|
||||||
management command (:issue:`140`)
|
management command (:issue:`140`)
|
||||||
- **FIXED:** fixed wrongly required ``'count'`` response field on ``CursorPagination`` (:issue:`141`)
|
- **FIXED:** fixed wrongly required ``'count'`` response field on ``CursorPagination`` (:issue:`141`)
|
||||||
- **FIXED:** fixed some cases where ``swagger_extra_fields`` would not be handlded (:pr:`142`)
|
- **FIXED:** fixed some cases where ``swagger_schema_fields`` would not be handlded (:pr:`142`)
|
||||||
- **FIXED:** fixed crash when encountering ``coreapi.Fields``\ s without a ``schema`` (:issue:`143`)
|
- **FIXED:** fixed crash when encountering ``coreapi.Fields``\ s without a ``schema`` (:issue:`143`)
|
||||||
|
|
||||||
*********
|
*********
|
||||||
|
|||||||
+3
-1
@@ -155,7 +155,9 @@ texinfo_documents = [
|
|||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|
||||||
autodoc_default_flags = ['private-members']
|
autodoc_default_options = {
|
||||||
|
'private-members': None
|
||||||
|
}
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autoclass_content = 'both'
|
autoclass_content = 'both'
|
||||||
autodoc_mock_imports = []
|
autodoc_mock_imports = []
|
||||||
|
|||||||
@@ -155,6 +155,57 @@ Where you can use the :func:`@swagger_auto_schema <.swagger_auto_schema>` decora
|
|||||||
replacing/decorating methods on the base class itself.
|
replacing/decorating methods on the base class itself.
|
||||||
|
|
||||||
|
|
||||||
|
*********************************
|
||||||
|
Support for SerializerMethodField
|
||||||
|
*********************************
|
||||||
|
|
||||||
|
Schema generation of ``serializers.SerializerMethodField`` is supported in two ways:
|
||||||
|
|
||||||
|
1) The :func:`swagger_serializer_method <.swagger_serializer_method>` decorator for the use case where the serializer
|
||||||
|
method is using a serializer. e.g.:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from drf_yasg.utils import swagger_serializer_method
|
||||||
|
|
||||||
|
class OtherStuffSerializer(serializers.Serializer):
|
||||||
|
foo = serializers.CharField()
|
||||||
|
|
||||||
|
class ParentSerializer(serializers.Serializer):
|
||||||
|
other_stuff = serializers.SerializerMethodField()
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=OtherStuffSerializer)
|
||||||
|
def get_other_stuff(self, obj):
|
||||||
|
return OtherStuffSerializer().data
|
||||||
|
|
||||||
|
|
||||||
|
Note that the ``serializer_or_field`` parameter can accept either a subclass or an instance of ``serializers.Field``.
|
||||||
|
|
||||||
|
|
||||||
|
2) For simple cases where the method is returning one of the supported types, `Python 3 type hinting`_ of the
|
||||||
|
serializer method return value can be used. e.g.:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
class SomeSerializer(serializers.Serializer):
|
||||||
|
some_number = serializers.SerializerMethodField()
|
||||||
|
|
||||||
|
def get_some_number(self, obj) -> float:
|
||||||
|
return 1.0
|
||||||
|
|
||||||
|
When return type hinting is not supported, the equivalent ``serializers.Field`` subclass can be used with
|
||||||
|
:func:`swagger_serializer_method <.swagger_serializer_method>`:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
class SomeSerializer(serializers.Serializer):
|
||||||
|
some_number = serializers.SerializerMethodField()
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.FloatField)
|
||||||
|
def get_some_number(self, obj):
|
||||||
|
return 1.0
|
||||||
|
|
||||||
|
|
||||||
********************************
|
********************************
|
||||||
Serializer ``Meta`` nested class
|
Serializer ``Meta`` nested class
|
||||||
********************************
|
********************************
|
||||||
@@ -333,3 +384,6 @@ A second example, of a :class:`~.inspectors.FieldInspector` that removes the ``t
|
|||||||
|
|
||||||
Another caveat that stems from this is that any serializer named "``NestedSerializer``" will be forced inline
|
Another caveat that stems from this is that any serializer named "``NestedSerializer``" will be forced inline
|
||||||
unless it has a ``ref_name`` set explicitly.
|
unless it has a ``ref_name`` set explicitly.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Python 3 type hinting: https://docs.python.org/3/library/typing.html
|
||||||
+14
-3
@@ -2,6 +2,17 @@
|
|||||||
Customizing the web UI
|
Customizing the web UI
|
||||||
######################
|
######################
|
||||||
|
|
||||||
There is currently no pluggable way of customizing the web UI apart from the settings available in
|
The web UI can be customized using the settings available in :ref:`swagger-ui-settings` and :ref:`redoc-ui-settings`.
|
||||||
:ref:`swagger-ui-settings` and :ref:`redoc-ui-settings`. If you really need to, you can override one of the
|
|
||||||
``drf-yasg/swagger-ui.html`` or ``drf-yasg/redoc.html`` templates that are used for rendering.
|
You can also extend one of the ``drf-yasg/swagger-ui.html`` or ``drf-yasg/redoc.html`` templates that are used for
|
||||||
|
rendering. The customizable blocks are currently limited to:
|
||||||
|
|
||||||
|
{% block extra_styles %}
|
||||||
|
additional stylesheets
|
||||||
|
|
||||||
|
{% block extra_scripts %}
|
||||||
|
additional scripts
|
||||||
|
|
||||||
|
{% block user_context_message %}
|
||||||
|
*(swagger-ui session auth only)*
|
||||||
|
logged in user message
|
||||||
+1
-1
@@ -14,7 +14,7 @@ This library generates OpenAPI 2.0 documents. The authoritative specification fo
|
|||||||
be the official documentation over at `swagger.io <https://swagger.io/>`__ and the `OpenAPI 2.0 specification
|
be the official documentation over at `swagger.io <https://swagger.io/>`__ and the `OpenAPI 2.0 specification
|
||||||
page <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__.
|
page <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__.
|
||||||
|
|
||||||
Beause the above specifications are a bit heavy and convoluted, here is a general overview of how the specification
|
Because the above specifications are a bit heavy and convoluted, here is a general overview of how the specification
|
||||||
is structured, starting from the root ``Swagger`` object.
|
is structured, starting from the root ``Swagger`` object.
|
||||||
|
|
||||||
* :class:`.Swagger` object
|
* :class:`.Swagger` object
|
||||||
|
|||||||
+89
-13
@@ -27,16 +27,27 @@ Example:
|
|||||||
}
|
}
|
||||||
|
|
||||||
REDOC_SETTINGS = {
|
REDOC_SETTINGS = {
|
||||||
'LAZY_RENDERING': True,
|
'LAZY_RENDERING': False,
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.. _url-settings:
|
||||||
|
|
||||||
|
All settings which configure URLs (``LOGIN_URL``, ``SPEC_URL``, ``VALIDATOR_URL``, etc.) can accept several forms of
|
||||||
|
input:
|
||||||
|
|
||||||
|
* A view name: `urls.reverse()` will be used to reverse-resolve the name
|
||||||
|
* A 2-tuple of ``(view_name, kwargs)```: `urls.reverse()` will be used to reverse-resolve the name using the given
|
||||||
|
`kwargs`; `kwargs` must be a dict
|
||||||
|
* A 3-tuple of ``(view_name, args, kwargs)```: `urls.reverse()` will be used to reverse-resolve the name using the given
|
||||||
|
`args` and `kwargs`; `args`, `kwargs` must be a tuple/list and a dict respectively
|
||||||
|
* A URL, which will be used as-is
|
||||||
|
|
||||||
The possible settings and their default values are as follows:
|
The possible settings and their default values are as follows:
|
||||||
|
|
||||||
********************
|
****************
|
||||||
``SWAGGER_SETTINGS``
|
SWAGGER_SETTINGS
|
||||||
********************
|
****************
|
||||||
|
|
||||||
|
|
||||||
.. _default-class-settings:
|
.. _default-class-settings:
|
||||||
|
|
||||||
@@ -76,6 +87,7 @@ to this list.
|
|||||||
:class:`'drf_yasg.inspectors.DictFieldInspector' <.inspectors.DictFieldInspector>`, |br| \
|
:class:`'drf_yasg.inspectors.DictFieldInspector' <.inspectors.DictFieldInspector>`, |br| \
|
||||||
:class:`'drf_yasg.inspectors.HiddenFieldInspector' <.inspectors.HiddenFieldInspector>`, |br| \
|
:class:`'drf_yasg.inspectors.HiddenFieldInspector' <.inspectors.HiddenFieldInspector>`, |br| \
|
||||||
:class:`'drf_yasg.inspectors.RecursiveFieldInspector' <.inspectors.RecursiveFieldInspector>`, |br| \
|
:class:`'drf_yasg.inspectors.RecursiveFieldInspector' <.inspectors.RecursiveFieldInspector>`, |br| \
|
||||||
|
:class:`'drf_yasg.inspectors.SerializerMethodFieldInspector' <.inspectors.SerializerMethodFieldInspector>`, |br| \
|
||||||
:class:`'drf_yasg.inspectors.SimpleFieldInspector' <.inspectors.SimpleFieldInspector>`, |br| \
|
:class:`'drf_yasg.inspectors.SimpleFieldInspector' <.inspectors.SimpleFieldInspector>`, |br| \
|
||||||
:class:`'drf_yasg.inspectors.StringDefaultFieldInspector' <.inspectors.StringDefaultFieldInspector>`, |br| \
|
:class:`'drf_yasg.inspectors.StringDefaultFieldInspector' <.inspectors.StringDefaultFieldInspector>`, |br| \
|
||||||
``]``
|
``]``
|
||||||
@@ -104,6 +116,14 @@ Paginator inspectors given to :func:`@swagger_auto_schema <.swagger_auto_schema>
|
|||||||
Swagger document attributes
|
Swagger document attributes
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
EXCLUDED_MEDIA_TYPES
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
A list of keywords for excluding MIME types from ``Operation.produces``. Any MIME type string which includes one of
|
||||||
|
the substrings in this list will be prevented from appearing in a ``produces`` array in the Swagger document.
|
||||||
|
|
||||||
|
**Default**: :python:`['html']`
|
||||||
|
|
||||||
.. _default-swagger-settings:
|
.. _default-swagger-settings:
|
||||||
|
|
||||||
DEFAULT_INFO
|
DEFAULT_INFO
|
||||||
@@ -183,6 +203,15 @@ Swagger UI settings
|
|||||||
Swagger UI configuration settings. |br|
|
Swagger UI configuration settings. |br|
|
||||||
See https://github.com/swagger-api/swagger-ui/blob/112bca906553a937ac67adc2e500bdeed96d067b/docs/usage/configuration.md#parameters.
|
See https://github.com/swagger-api/swagger-ui/blob/112bca906553a937ac67adc2e500bdeed96d067b/docs/usage/configuration.md#parameters.
|
||||||
|
|
||||||
|
SPEC_URL
|
||||||
|
--------
|
||||||
|
|
||||||
|
URL pointing to a swagger document for use by swagger-ui. The default behaviour is to append ``?format=openapi`` to the
|
||||||
|
URL which serves the UI; see :ref:`note on URL settings <url-settings>` above.
|
||||||
|
|
||||||
|
**Default**: :python:`None` |br|
|
||||||
|
*Maps to parameter*: ``url``
|
||||||
|
|
||||||
VALIDATOR_URL
|
VALIDATOR_URL
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@@ -303,9 +332,17 @@ This does not filter the operations from the display.
|
|||||||
**Default**: :python:`['get','put','post','delete','options','head','patch','trace']` |br|
|
**Default**: :python:`['get','put','post','delete','options','head','patch','trace']` |br|
|
||||||
*Maps to parameter*: ``supportedSubmitMethods``
|
*Maps to parameter*: ``supportedSubmitMethods``
|
||||||
|
|
||||||
******************
|
DISPLAY_OPERATION_ID
|
||||||
``REDOC_SETTINGS``
|
--------------------
|
||||||
******************
|
|
||||||
|
Controls the display of operationId in operations list.
|
||||||
|
|
||||||
|
**Default**: :python:`True`
|
||||||
|
*Maps to parameter*: ``displayOperationId``
|
||||||
|
|
||||||
|
**************
|
||||||
|
REDOC_SETTINGS
|
||||||
|
**************
|
||||||
|
|
||||||
.. _redoc-ui-settings:
|
.. _redoc-ui-settings:
|
||||||
|
|
||||||
@@ -315,29 +352,68 @@ ReDoc UI settings
|
|||||||
ReDoc UI configuration settings. |br|
|
ReDoc UI configuration settings. |br|
|
||||||
See https://github.com/Rebilly/ReDoc#configuration.
|
See https://github.com/Rebilly/ReDoc#configuration.
|
||||||
|
|
||||||
|
SPEC_URL
|
||||||
|
--------
|
||||||
|
|
||||||
|
URL pointing to a swagger document for use by ReDoc. The default behaviour is to append ``?format=openapi`` to the
|
||||||
|
URL which serves the UI; see :ref:`note on URL settings <url-settings>` above.
|
||||||
|
|
||||||
|
**Default**: :python:`None` |br|
|
||||||
|
*Maps to attribute*: ``spec-url``
|
||||||
|
|
||||||
LAZY_RENDERING
|
LAZY_RENDERING
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
**Default**: :python:`True` |br|
|
If set, enables lazy rendering mode in ReDoc. This mode is useful for APIs with big number of operations (e.g. > 50).
|
||||||
*Maps to attribute*: ``lazy-rendering``
|
In this mode ReDoc shows initial screen ASAP and then renders the rest operations asynchronously while showing
|
||||||
|
progress bar on the top.
|
||||||
|
|
||||||
|
**NOTE:** this feature might be removed in future versions of ReDoc (see https://github.com/Rebilly/ReDoc/issues/475)
|
||||||
|
|
||||||
|
**Default**: :python:`False` |br|
|
||||||
|
*Maps to attribute*: ``lazyRendering``
|
||||||
|
|
||||||
HIDE_HOSTNAME
|
HIDE_HOSTNAME
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
If set, the protocol and hostname is not shown in the operation definition.
|
||||||
|
|
||||||
**Default**: :python:`False` |br|
|
**Default**: :python:`False` |br|
|
||||||
*Maps to attribute*: ``hide-hostname``
|
*Maps to attribute*: ``hideHostname``
|
||||||
|
|
||||||
EXPAND_RESPONSES
|
EXPAND_RESPONSES
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
Specify which responses to expand by default by response codes. Values should be passed as comma-separated list without
|
||||||
|
spaces e.g. expandResponses="200,201". Special value "all" expands all responses by default.
|
||||||
|
Be careful: this option can slow-down documentation rendering time.
|
||||||
|
|
||||||
**Default**: :python:`'all'` |br|
|
**Default**: :python:`'all'` |br|
|
||||||
*Maps to attribute*: ``expand-responses``
|
*Maps to attribute*: ``expandResponses``
|
||||||
|
|
||||||
PATH_IN_MIDDLE
|
PATH_IN_MIDDLE
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
Show path link and HTTP verb in the middle panel instead of the right one.
|
||||||
|
|
||||||
**Default**: :python:`False` |br|
|
**Default**: :python:`False` |br|
|
||||||
*Maps to attribute*: ``path-in-middle-panel``
|
*Maps to attribute*: ``pathInMiddlePanel``
|
||||||
|
|
||||||
|
NATIVE_SCROLLBARS
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Use native scrollbar for sidemenu instead of perfect-scroll (scrolling performance optimization for big specs).
|
||||||
|
|
||||||
|
**Default**: :python:`False` |br|
|
||||||
|
*Maps to attribute*: ``nativeScrollbars``
|
||||||
|
|
||||||
|
REQUIRED_PROPS_FIRST
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Show required properties first ordered in the same order as in required array.
|
||||||
|
|
||||||
|
**Default**: :python:`False` |br|
|
||||||
|
*Maps to attribute*: ``requiredPropsFirst``
|
||||||
|
|
||||||
|
|
||||||
.. _FORCE_SCRIPT_NAME: https://docs.djangoproject.com/en/2.0/ref/settings/#force-script-name
|
.. _FORCE_SCRIPT_NAME: https://docs.djangoproject.com/en/2.0/ref/settings/#force-script-name
|
||||||
Generated
+75
-75
@@ -22,9 +22,9 @@
|
|||||||
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
|
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
|
||||||
},
|
},
|
||||||
"buffer": {
|
"buffer": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
|
||||||
"integrity": "sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw==",
|
"integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"base64-js": "^1.0.2",
|
"base64-js": "^1.0.2",
|
||||||
"ieee754": "^1.1.4"
|
"ieee754": "^1.1.4"
|
||||||
@@ -72,11 +72,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
|
||||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
"integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"decko": {
|
"decko": {
|
||||||
@@ -96,9 +96,9 @@
|
|||||||
"integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg="
|
"integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg="
|
||||||
},
|
},
|
||||||
"dompurify": {
|
"dompurify": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-1.0.8.tgz",
|
||||||
"integrity": "sha512-1xK0JEda/jvIm3SgqHXKvRCh3AbEKCyBbUAGpNCMVIljBD145cPvBR66JSj3O4SdscFUx5NXsDkJpz6vDT8KLg=="
|
"integrity": "sha512-vetRFbN1SXSPfP3ClIiYnxTrXquSqakBEOoB5JESn0SVcSYzpu6ougjakpKnskGctYdlNpwf+riUHSkG7d4XUw=="
|
||||||
},
|
},
|
||||||
"encoding": {
|
"encoding": {
|
||||||
"version": "0.1.12",
|
"version": "0.1.12",
|
||||||
@@ -176,9 +176,9 @@
|
|||||||
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
||||||
},
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.4.23",
|
"version": "0.4.24",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"safer-buffer": ">= 2.1.2 < 3"
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
}
|
}
|
||||||
@@ -225,14 +225,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"json-schema-ref-parser": {
|
"json-schema-ref-parser": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.3.tgz",
|
||||||
"integrity": "sha512-gP0mSqqkG99xNeA4F6bf2pXQYv5fFqe9SybbKO9qSMmyzzfFFIqd16s9Y65mRWKzZ0muTjyEtcSE/hLZLvIjZw==",
|
"integrity": "sha512-CpDFlBwz/6la78hZxyB9FECVKGYjIIl3Ms3KLqFj99W7IIb7D00/RDgc++IGB4BBALl0QRhh5m4q5WNSopvLtQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"call-me-maybe": "^1.0.1",
|
"call-me-maybe": "^1.0.1",
|
||||||
"debug": "^3.1.0",
|
"debug": "^3.1.0",
|
||||||
"js-yaml": "^3.12.0",
|
"js-yaml": "^3.12.0",
|
||||||
"ono": "^4.0.5"
|
"ono": "^4.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loose-envify": {
|
"loose-envify": {
|
||||||
@@ -244,9 +244,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lunr": {
|
"lunr": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.3.tgz",
|
||||||
"integrity": "sha1-ETYWorYC3cEJMqe/ik5uV+v+zfI="
|
"integrity": "sha512-rlAEsgU9Bnavca2w1WJ6+6cdeHMXNyadcersyk3ZpuhgWb5HBNj8l4WwJz9PjksAhYDlpQffCVXPctOn+wCIVA=="
|
||||||
},
|
},
|
||||||
"mark.js": {
|
"mark.js": {
|
||||||
"version": "8.11.1",
|
"version": "8.11.1",
|
||||||
@@ -259,9 +259,9 @@
|
|||||||
"integrity": "sha512-49i2QYhfULqaXzNZpxC808PisuCTGT2fgG0zrzdCI9N3rIfAWfW0nggvbXr6zvpynZdOG5+9xNxdzP0kwZnERw=="
|
"integrity": "sha512-49i2QYhfULqaXzNZpxC808PisuCTGT2fgG0zrzdCI9N3rIfAWfW0nggvbXr6zvpynZdOG5+9xNxdzP0kwZnERw=="
|
||||||
},
|
},
|
||||||
"memoize-one": {
|
"memoize-one": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.2.tgz",
|
||||||
"integrity": "sha512-wdpOJ4XBejprGn/xhd1i2XR8Dv1A25FJeIvR7syQhQlz9eXsv+06llcvcmBxlWVGv4C73QBsWA8kxvZozzNwiQ=="
|
"integrity": "sha512-ucx2DmXTeZTsS4GPPUZCbULAN7kdPT1G+H49Y34JjbQ5ESc6OGhVxKvb1iKhr9v19ZB9OtnHwNnhUnNR/7Wteg=="
|
||||||
},
|
},
|
||||||
"min-document": {
|
"min-document": {
|
||||||
"version": "2.19.0",
|
"version": "2.19.0",
|
||||||
@@ -272,18 +272,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mobx-react": {
|
"mobx-react": {
|
||||||
"version": "5.2.3",
|
"version": "5.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-5.2.8.tgz",
|
||||||
"integrity": "sha512-OuSlF2nJEa1PGookZcZnINbvEK4iWNNYiqUh6aebk2AkWxj3sG8OafDOQMcMYApQALTHRsrBIjOx/K8TFxcz7w==",
|
"integrity": "sha512-VAkeqkrIpdoy3VPPoqvxjdQmcTT6hi7i3TsZSwcKbSrPbSTuWc7cp1EOiX/zV1wPWEuoNAQ22bCrskQwvdYTJA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoist-non-react-statics": "^2.5.0",
|
"hoist-non-react-statics": "^2.5.0",
|
||||||
"react-lifecycles-compat": "^3.0.2"
|
"react-lifecycles-compat": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
},
|
},
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "1.7.3",
|
"version": "1.7.3",
|
||||||
@@ -300,17 +300,17 @@
|
|||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
},
|
},
|
||||||
"ono": {
|
"ono": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/ono/-/ono-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/ono/-/ono-4.0.7.tgz",
|
||||||
"integrity": "sha512-ZVNuV9kJbr/2tWs83I2snrYo+WIS0DISF/xUfX9p9b6GyDD6F5N9PzHjW+p/dep6IGwSYylf1HCub5I/nM0R5Q==",
|
"integrity": "sha512-FJiGEETwfSVyOwVTwQZD7XN69FRekvgtlobtvPwtilc7PxIHg3gKUykdNP7E9mC/VTF2cxqKZxUZfNKA3MuQLA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"format-util": "^1.0.3"
|
"format-util": "^1.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"openapi-sampler": {
|
"openapi-sampler": {
|
||||||
"version": "1.0.0-beta.13",
|
"version": "1.0.0-beta.14",
|
||||||
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.13.tgz",
|
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.14.tgz",
|
||||||
"integrity": "sha512-NReKJh92NlUmY9CDo86L1Skkx3DMDeWmiLoqMxQSX7xBpoSx8WJ1JdTb7nEwz6M7S+WDPrQsEfS5BaIW27nMrQ==",
|
"integrity": "sha512-NNmH9YAN5AaCE4w6MQXdCrmsOJJQTswHVSp075+h+iiG+OTonpZE8HzwocozovD2imx4lamkuxGLs4E4bO4Z+g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-pointer": "^0.6.0"
|
"json-pointer": "^0.6.0"
|
||||||
}
|
}
|
||||||
@@ -321,9 +321,9 @@
|
|||||||
"integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw=="
|
"integrity": "sha512-/2Sk/khljhdrsamjJYS5NjrH+GKEHEwh7zFSiYyxROyYKagkE4kSn2zDQDRTOMo8mpT2jikxx6yI1dG7lNP/hw=="
|
||||||
},
|
},
|
||||||
"polished": {
|
"polished": {
|
||||||
"version": "1.9.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/polished/-/polished-1.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/polished/-/polished-2.0.3.tgz",
|
||||||
"integrity": "sha512-4NmSD7fMFlM8roNxs7YXPv7UFRbYzb0gufR5zBxJLRzY54+zFsavxBo6zsQzP9ep6Hh3pC2pTyrpSTBEaB6IkQ=="
|
"integrity": "sha512-MMwthxXsmZZlZY/x79KX/8kXpSU0lq3ntnDmAdhpQGk9pU9EM/rQmUbsgIuuk2Cvl6zYSWjyBsDEU8sa1598xg=="
|
||||||
},
|
},
|
||||||
"postcss-value-parser": {
|
"postcss-value-parser": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
@@ -361,17 +361,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-dropdown": {
|
"react-dropdown": {
|
||||||
"version": "1.5.0",
|
"version": "1.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.6.2.tgz",
|
||||||
"integrity": "sha512-rRv3a7NiP++yC1rzdjzkviC5ujq759i4SRa0M3C0Cr7loYT4Z3+JhSPekv1/04JiZNXX46cV3/g6A9kS7rkI4Q==",
|
"integrity": "sha512-6RpKAFEVZLr53y91qnxC9rAWcoDvq8A9YstmeSV2AQgJxNFRcsreN1mJNRUctSvIwm0Hph07ouMvDc2GvfQBsA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"classnames": "^2.2.3"
|
"classnames": "^2.2.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-hot-loader": {
|
"react-hot-loader": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.6.tgz",
|
||||||
"integrity": "sha512-LlKjtHq+RhDq9xm6crXojbkzrEvli5F4/RaeJ//XtDWrwwsAHDjEqKfZZiPCxv7gWV2cxE3YE8TXeE9BDzLqOA==",
|
"integrity": "sha512-iuBeBkLz7tdkKmKduNww9o5JY4ZH1XI0TWwkWToHIqfOSh1xMCqLMSYXUasWfgZWykWWa9IkueYab+cDq2jyWg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-levenshtein": "^2.0.6",
|
"fast-levenshtein": "^2.0.6",
|
||||||
"global": "^4.3.0",
|
"global": "^4.3.0",
|
||||||
@@ -382,9 +382,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-is": {
|
"react-is": {
|
||||||
"version": "16.4.2",
|
"version": "16.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.5.0.tgz",
|
||||||
"integrity": "sha512-rI3cGFj/obHbBz156PvErrS5xc6f1eWyTwyV4mo0vF2lGgXgS+mm7EKD5buLJq6jNgIagQescGSVG2YzgXt8Yg=="
|
"integrity": "sha512-kpkCGLsChXTEQJVmowQqHpCjHKJFwB4SIChYaaaiAkq8OtE2aBg5pQe8/xnFlGmz9KmMx1H4oQRUyxP7qC9v5A=="
|
||||||
},
|
},
|
||||||
"react-lifecycles-compat": {
|
"react-lifecycles-compat": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
@@ -392,41 +392,41 @@
|
|||||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||||
},
|
},
|
||||||
"react-tabs": {
|
"react-tabs": {
|
||||||
"version": "2.2.2",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-2.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-2.3.0.tgz",
|
||||||
"integrity": "sha512-jZGAAoq1yknr/XF60/2kH5X3UJdR1X8ItcsLZ1mJnHfoniKcCr3shT2TK5wiS2sO0LOmqwX2BtJQX3snKd50sg==",
|
"integrity": "sha512-pYaefgVy76/36AMEP+B8YuVVzDHa3C5UFZ3REU78zolk0qMxEhKvUFofvDCXyLZwf0RZjxIfiwok1BEb18nHyA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"classnames": "^2.2.0",
|
"classnames": "^2.2.0",
|
||||||
"prop-types": "^15.5.0"
|
"prop-types": "^15.5.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redoc": {
|
"redoc": {
|
||||||
"version": "2.0.0-alpha.32",
|
"version": "2.0.0-alpha.38",
|
||||||
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-alpha.32.tgz",
|
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-alpha.38.tgz",
|
||||||
"integrity": "sha512-hqQlQ8lnXszLOJGyrRCLtCH+yPJfS22FjbqJ9X6/KM3U46UXk7rv3jZG/quV0IIRhcyehRm6h8a6Eu18KRupng==",
|
"integrity": "sha512-4pT/cRJ/aKdLlCxjFOSWvkA9ZVG5b9dUfxIM+H5698hlRaF6rcu4qh29eGwEikSDw0unH0iNd6MHy9u0fAjRGw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"decko": "^1.2.0",
|
"decko": "^1.2.0",
|
||||||
"dompurify": "^1.0.6",
|
"dompurify": "^1.0.7",
|
||||||
"eventemitter3": "^3.0.0",
|
"eventemitter3": "^3.0.0",
|
||||||
"json-pointer": "^0.6.0",
|
"json-pointer": "^0.6.0",
|
||||||
"json-schema-ref-parser": "^5.1.1",
|
"json-schema-ref-parser": "^5.1.2",
|
||||||
"lunr": "^2.3.0",
|
"lunr": "^2.3.2",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"marked": "0.3.18",
|
"marked": "0.3.18",
|
||||||
"memoize-one": "^4.0.0",
|
"memoize-one": "^4.0.0",
|
||||||
"mobx-react": "^5.2.3",
|
"mobx-react": "^5.2.5",
|
||||||
"openapi-sampler": "1.0.0-beta.13",
|
"openapi-sampler": "1.0.0-beta.14",
|
||||||
"perfect-scrollbar": "^1.4.0",
|
"perfect-scrollbar": "^1.4.0",
|
||||||
"polished": "^1.9.3",
|
"polished": "^2.0.2",
|
||||||
"prismjs": "^1.15.0",
|
"prismjs": "^1.15.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react-dropdown": "^1.3.0",
|
"react-dropdown": "^1.6.2",
|
||||||
"react-hot-loader": "^4.3.3",
|
"react-hot-loader": "^4.3.5",
|
||||||
"react-tabs": "^2.0.0",
|
"react-tabs": "^2.0.0",
|
||||||
"slugify": "^1.2.1",
|
"slugify": "^1.3.1",
|
||||||
"stickyfill": "^1.1.1",
|
"stickyfill": "^1.1.1",
|
||||||
"styled-components": "^3.3.3",
|
"styled-components": "^3.4.5",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -452,9 +452,9 @@
|
|||||||
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
|
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
|
||||||
},
|
},
|
||||||
"slugify": {
|
"slugify": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.1.tgz",
|
||||||
"integrity": "sha512-vvz+9ANt7CtdTHwJpfrsHOnGkgxky+CUPnvtzDZBZYFo/H/CdZkd5lJL7z7RqtH/x9QW/ItYYfHlcGf38CBK1w=="
|
"integrity": "sha512-6BwyhjF5tG5P8s+0DPNyJmBSBePG6iMyhjvIW5zGdA3tFik9PtK+yNkZgTeiroCRGZYgkHftFA62tGVK1EI9Kw=="
|
||||||
},
|
},
|
||||||
"sprintf-js": {
|
"sprintf-js": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -467,9 +467,9 @@
|
|||||||
"integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI="
|
"integrity": "sha1-OUE/7p0CXHSn5ZzuyyN4TMDxfwI="
|
||||||
},
|
},
|
||||||
"styled-components": {
|
"styled-components": {
|
||||||
"version": "3.4.0",
|
"version": "3.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-3.4.6.tgz",
|
||||||
"integrity": "sha1-0lb7RmfmwRWn7WGrePEgKDtD3QA=",
|
"integrity": "sha512-HiEVVY93oH/PuekPuIE7ownn2wmO708rS8MM1yS20i0TCyFgPs3mbop8fJqKLRtC2/npVn2fO5Je6azaL6T2tg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer": "^5.0.3",
|
"buffer": "^5.0.3",
|
||||||
"css-to-react-native": "^2.0.3",
|
"css-to-react-native": "^2.0.3",
|
||||||
@@ -501,9 +501,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"swagger-ui-dist": {
|
"swagger-ui-dist": {
|
||||||
"version": "3.17.6",
|
"version": "3.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.17.6.tgz",
|
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.18.2.tgz",
|
||||||
"integrity": "sha1-37Y7uHZdOKNzjPWUZYad4W3Uczk="
|
"integrity": "sha512-pWAEiKkgWUJvjmLW9AojudnutJ+NTn5g6OdNLj1iIJWwCkoy40K3Upwa24DqFbmIE4vLX4XplND61hp2L+s5vg=="
|
||||||
},
|
},
|
||||||
"tiny-emitter": {
|
"tiny-emitter": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
@@ -522,9 +522,9 @@
|
|||||||
"integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA=="
|
"integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA=="
|
||||||
},
|
},
|
||||||
"whatwg-fetch": {
|
"whatwg-fetch": {
|
||||||
"version": "2.0.4",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
|
||||||
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
|
"integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "drf-yasg",
|
"name": "drf-yasg",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"redoc": "^2.0.0-alpha.32",
|
"redoc": "^2.0.0-alpha.38",
|
||||||
"swagger-ui-dist": "^3.17.6"
|
"swagger-ui-dist": "^3.18.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
|
-r requirements/setup.txt
|
||||||
.[validation]
|
.[validation]
|
||||||
-r requirements/heroku.txt
|
-r requirements/heroku.txt
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
coreapi>=2.3.3
|
coreapi>=2.3.3
|
||||||
coreschema>=0.0.4
|
coreschema>=0.0.4
|
||||||
openapi_codec>=1.3.2
|
|
||||||
ruamel.yaml>=0.15.34
|
ruamel.yaml>=0.15.34
|
||||||
inflection>=0.3.1
|
inflection>=0.3.1
|
||||||
future>=0.16.0
|
|
||||||
six>=1.10.0
|
six>=1.10.0
|
||||||
uritemplate>=3.0.0
|
uritemplate>=3.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# requirements for local development to be installed via pip install -r requirements/dev.txt
|
# requirements for local development to be installed via pip install -U -r requirements/dev.txt
|
||||||
-r tox.txt
|
-r tox.txt
|
||||||
-r test.txt
|
-r test.txt
|
||||||
-r lint.txt
|
-r lint.txt
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ sphinx_rtd_theme>=0.2.4
|
|||||||
Pillow>=4.3.0
|
Pillow>=4.3.0
|
||||||
readme_renderer>=17.2
|
readme_renderer>=17.2
|
||||||
|
|
||||||
Django>=2.0,<2.1
|
Django>=2.0
|
||||||
djangorestframework_camel_case>=0.2.0
|
djangorestframework_camel_case>=0.2.0
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
# needed to build the package setup_requires in setup.py
|
# needed to build the package setup_requires in setup.py
|
||||||
|
|
||||||
# do not unpin this (see setup.py)
|
setuptools-scm>=3.0.6
|
||||||
setuptools_scm==1.15.6
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# requirements for running the tests via pytest
|
# requirements for running the tests via pytest
|
||||||
pytest>=2.9
|
pytest>=2.9,<3.7 # <3.7 because of incompatible pluggy requirement
|
||||||
pytest-pythonpath>=0.7.1
|
pytest-pythonpath>=0.7.1
|
||||||
pytest-cov>=2.5.1
|
pytest-cov>=2.5.1
|
||||||
pytest-xdist>=1.22.0
|
pytest-xdist>=1.22.0
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# requirements for building and running tox
|
# requirements for building and running tox
|
||||||
tox>=2.9.1,<3.0.0
|
tox>=3.1.2
|
||||||
detox>=0.11
|
|
||||||
|
|
||||||
-r setup.txt
|
-r setup.txt
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
python-3.6.4
|
python-3.6.6
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import distutils.core
|
from __future__ import print_function
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import random
|
|
||||||
import string
|
|
||||||
import sys
|
import sys
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
@@ -22,52 +21,8 @@ requirements_setup = read_req('setup.txt')
|
|||||||
requirements_validation = read_req('validation.txt')
|
requirements_validation = read_req('validation.txt')
|
||||||
|
|
||||||
|
|
||||||
def _install_setup_requires(attrs):
|
def drf_yasg_setup(**kwargs):
|
||||||
# copied from setuptools
|
setup(
|
||||||
dist = distutils.core.Distribution(dict(
|
|
||||||
(k, v) for k, v in attrs.items()
|
|
||||||
if k in ('dependency_links', 'setup_requires')
|
|
||||||
))
|
|
||||||
# Honor setup.cfg's options.
|
|
||||||
dist.parse_config_files(ignore_option_errors=True)
|
|
||||||
if dist.setup_requires:
|
|
||||||
dist.fetch_build_eggs(dist.setup_requires)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
# try to install setuptools_scm before setuptools does it, otherwise our monkey patch below will come too early
|
|
||||||
# (setuptools_scm adds find_files hooks into setuptools on install)
|
|
||||||
_install_setup_requires({'setup_requires': requirements_setup})
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if 'sdist' in sys.argv:
|
|
||||||
try:
|
|
||||||
# see https://github.com/pypa/setuptools_scm/issues/190, setuptools_scm includes ALL versioned files from
|
|
||||||
# the git repo into the sdist by default, and there is no easy way to provide an opt-out;
|
|
||||||
# this hack is ugly but does the job; because this is not really a documented interface of the module,
|
|
||||||
# the setuptools_scm version should remain pinned to ensure it keeps working
|
|
||||||
import setuptools_scm.integration
|
|
||||||
|
|
||||||
setuptools_scm.integration.find_files = lambda _: []
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
# this is a workaround for being able to install the package from source without working from a git checkout
|
|
||||||
# it is needed for building succesfully on Heroku
|
|
||||||
from setuptools_scm import get_version
|
|
||||||
|
|
||||||
version = get_version()
|
|
||||||
version_kwargs = {'use_scm_version': True}
|
|
||||||
except LookupError:
|
|
||||||
if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:
|
|
||||||
raise
|
|
||||||
|
|
||||||
rnd = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16))
|
|
||||||
version_kwargs = {'version': '0.0.0.dummy+' + rnd}
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='drf-yasg',
|
name='drf-yasg',
|
||||||
packages=find_packages('src'),
|
packages=find_packages('src'),
|
||||||
package_dir={'': 'src'},
|
package_dir={'': 'src'},
|
||||||
@@ -89,7 +44,7 @@ setup(
|
|||||||
classifiers=[
|
classifiers=[
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Environment :: Web Environment',
|
'Environment :: Web Environment',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
@@ -99,11 +54,34 @@ setup(
|
|||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.4',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
|
'Programming Language :: Python :: 3.7',
|
||||||
'Framework :: Django',
|
'Framework :: Django',
|
||||||
'Framework :: Django :: 1.11',
|
'Framework :: Django :: 1.11',
|
||||||
'Framework :: Django :: 2.0',
|
'Framework :: Django :: 2.0',
|
||||||
|
'Framework :: Django :: 2.1',
|
||||||
'Topic :: Documentation',
|
'Topic :: Documentation',
|
||||||
'Topic :: Software Development :: Code Generators',
|
'Topic :: Software Development :: Code Generators',
|
||||||
],
|
],
|
||||||
**version_kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
drf_yasg_setup(use_scm_version=True)
|
||||||
|
except LookupError as e:
|
||||||
|
if os.getenv('CI', 'false') == 'true' or os.getenv('TRAVIS', 'false') == 'true':
|
||||||
|
# don't silently fail on travis - we don't want to accidentally push a dummy version to PyPI
|
||||||
|
raise
|
||||||
|
|
||||||
|
if 'setuptools-scm' in str(e):
|
||||||
|
import time
|
||||||
|
|
||||||
|
timestamp_ms = int(time.time() * 1000)
|
||||||
|
timestamp_str = hex(timestamp_ms)[2:].zfill(16)
|
||||||
|
dummy_version = '0.0.0rc0+noscm' + timestamp_str
|
||||||
|
|
||||||
|
drf_yasg_setup(version=dummy_version)
|
||||||
|
print(str(e), file=sys.stderr)
|
||||||
|
print("failed to detect version, build was done using dummy version " + dummy_version, file=sys.stderr)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
@@ -14,6 +14,7 @@ SWAGGER_DEFAULTS = {
|
|||||||
'drf_yasg.inspectors.DictFieldInspector',
|
'drf_yasg.inspectors.DictFieldInspector',
|
||||||
'drf_yasg.inspectors.HiddenFieldInspector',
|
'drf_yasg.inspectors.HiddenFieldInspector',
|
||||||
'drf_yasg.inspectors.RelatedFieldInspector',
|
'drf_yasg.inspectors.RelatedFieldInspector',
|
||||||
|
'drf_yasg.inspectors.SerializerMethodFieldInspector',
|
||||||
'drf_yasg.inspectors.SimpleFieldInspector',
|
'drf_yasg.inspectors.SimpleFieldInspector',
|
||||||
'drf_yasg.inspectors.StringDefaultFieldInspector',
|
'drf_yasg.inspectors.StringDefaultFieldInspector',
|
||||||
],
|
],
|
||||||
@@ -25,6 +26,8 @@ SWAGGER_DEFAULTS = {
|
|||||||
'drf_yasg.inspectors.CoreAPICompatInspector',
|
'drf_yasg.inspectors.CoreAPICompatInspector',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'EXCLUDED_MEDIA_TYPES': ['html'],
|
||||||
|
|
||||||
'DEFAULT_INFO': None,
|
'DEFAULT_INFO': None,
|
||||||
'DEFAULT_API_URL': None,
|
'DEFAULT_API_URL': None,
|
||||||
|
|
||||||
@@ -37,6 +40,7 @@ SWAGGER_DEFAULTS = {
|
|||||||
'SECURITY_REQUIREMENTS': None,
|
'SECURITY_REQUIREMENTS': None,
|
||||||
'LOGIN_URL': getattr(settings, 'LOGIN_URL', None),
|
'LOGIN_URL': getattr(settings, 'LOGIN_URL', None),
|
||||||
'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None),
|
'LOGOUT_URL': getattr(settings, 'LOGOUT_URL', None),
|
||||||
|
'SPEC_URL': None,
|
||||||
'VALIDATOR_URL': '',
|
'VALIDATOR_URL': '',
|
||||||
|
|
||||||
'OPERATIONS_SORTER': None,
|
'OPERATIONS_SORTER': None,
|
||||||
@@ -59,13 +63,17 @@ SWAGGER_DEFAULTS = {
|
|||||||
'patch',
|
'patch',
|
||||||
'trace'
|
'trace'
|
||||||
],
|
],
|
||||||
|
'DISPLAY_OPERATION_ID': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
REDOC_DEFAULTS = {
|
REDOC_DEFAULTS = {
|
||||||
'LAZY_RENDERING': True,
|
'SPEC_URL': None,
|
||||||
|
'LAZY_RENDERING': False,
|
||||||
'HIDE_HOSTNAME': False,
|
'HIDE_HOSTNAME': False,
|
||||||
'EXPAND_RESPONSES': 'all',
|
'EXPAND_RESPONSES': 'all',
|
||||||
'PATH_IN_MIDDLE': False,
|
'PATH_IN_MIDDLE': False,
|
||||||
|
'NATIVE_SCROLLBARS': False,
|
||||||
|
'REQUIRED_PROPS_FIRST': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPORT_STRINGS = [
|
IMPORT_STRINGS = [
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
from future.utils import raise_from
|
from six import raise_from
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from coreapi.compat import force_bytes
|
from coreapi.compat import force_bytes
|
||||||
from django.utils.safestring import SafeData, SafeText
|
|
||||||
from ruamel import yaml
|
from ruamel import yaml
|
||||||
|
|
||||||
from . import openapi
|
from . import openapi
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from rest_framework.settings import api_settings as rest_framework_settings
|
|||||||
from . import openapi
|
from . import openapi
|
||||||
from .app_settings import swagger_settings
|
from .app_settings import swagger_settings
|
||||||
from .errors import SwaggerGenerationError
|
from .errors import SwaggerGenerationError
|
||||||
from .inspectors.field import get_basic_type_info, get_queryset_field
|
from .inspectors.field import get_basic_type_info, get_queryset_field, get_queryset_from_view
|
||||||
from .openapi import ReferenceResolver
|
from .openapi import ReferenceResolver
|
||||||
from .utils import force_real_str, get_consumes, get_produces
|
from .utils import force_real_str, get_consumes, get_produces
|
||||||
|
|
||||||
@@ -31,8 +31,7 @@ class EndpointEnumerator(_EndpointEnumerator):
|
|||||||
|
|
||||||
def get_path_from_regex(self, path_regex):
|
def get_path_from_regex(self, path_regex):
|
||||||
if path_regex.endswith(')'):
|
if path_regex.endswith(')'):
|
||||||
logger.warning("url pattern does not end in $ ('%s') - unexpected things might happen",
|
logger.warning("url pattern does not end in $ ('%s') - unexpected things might happen", path_regex)
|
||||||
path_regex)
|
|
||||||
return self.unescape_path(super(EndpointEnumerator, self).get_path_from_regex(path_regex))
|
return self.unescape_path(super(EndpointEnumerator, self).get_path_from_regex(path_regex))
|
||||||
|
|
||||||
def should_include_endpoint(self, path, callback, app_name='', namespace='', url_name=None):
|
def should_include_endpoint(self, path, callback, app_name='', namespace='', url_name=None):
|
||||||
@@ -135,7 +134,7 @@ class EndpointEnumerator(_EndpointEnumerator):
|
|||||||
"""Remove backslashe escapes from all path components outside {parameters}. This is needed because
|
"""Remove backslashe escapes from all path components outside {parameters}. This is needed because
|
||||||
``simplify_regex`` does not handle this correctly - note however that this implementation is
|
``simplify_regex`` does not handle this correctly - note however that this implementation is
|
||||||
|
|
||||||
**NOTE:** this might destructively affect some url regex patterns that contain metacharacters (e.g. \w, \d)
|
**NOTE:** this might destructively affect some url regex patterns that contain metacharacters (e.g. \\w, \\d)
|
||||||
outside path parameter groups; if you are in this category, God help you
|
outside path parameter groups; if you are in this category, God help you
|
||||||
|
|
||||||
:param str path: path possibly containing
|
:param str path: path possibly containing
|
||||||
@@ -312,6 +311,27 @@ class OpenAPISchemaGenerator(object):
|
|||||||
"""
|
"""
|
||||||
return self._gen.determine_path_prefix(paths)
|
return self._gen.determine_path_prefix(paths)
|
||||||
|
|
||||||
|
def should_include_endpoint(self, path, method, view, public):
|
||||||
|
"""Check if a given endpoint should be included in the resulting schema.
|
||||||
|
|
||||||
|
:param str path: request path
|
||||||
|
:param str method: http request method
|
||||||
|
:param view: instantiated view callback
|
||||||
|
:param bool public: if True, all endpoints are included regardless of access through `request`
|
||||||
|
:returns: true if the view should be excluded
|
||||||
|
:rtype: bool
|
||||||
|
"""
|
||||||
|
return public or self._gen.has_view_permissions(path, method, view)
|
||||||
|
|
||||||
|
def get_paths_object(self, paths):
|
||||||
|
"""Construct the Swagger Paths object.
|
||||||
|
|
||||||
|
:param OrderedDict[str,openapi.PathItem] paths: mapping of paths to :class:`.PathItem` objects
|
||||||
|
:returns: the :class:`.Paths` object
|
||||||
|
:rtype: openapi.Paths
|
||||||
|
"""
|
||||||
|
return openapi.Paths(paths=paths)
|
||||||
|
|
||||||
def get_paths(self, endpoints, components, request, public):
|
def get_paths(self, endpoints, components, request, public):
|
||||||
"""Generate the Swagger Paths for the API from the given endpoints.
|
"""Generate the Swagger Paths for the API from the given endpoints.
|
||||||
|
|
||||||
@@ -332,7 +352,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
for path, (view_cls, methods) in sorted(endpoints.items()):
|
for path, (view_cls, methods) in sorted(endpoints.items()):
|
||||||
operations = {}
|
operations = {}
|
||||||
for method, view in methods:
|
for method, view in methods:
|
||||||
if not public and not self._gen.has_view_permissions(path, method, view):
|
if not self.should_include_endpoint(path, method, view, public):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
operation = self.get_operation(view, path, prefix, method, components, request)
|
operation = self.get_operation(view, path, prefix, method, components, request)
|
||||||
@@ -347,7 +367,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
path_suffix = '/' + path_suffix
|
path_suffix = '/' + path_suffix
|
||||||
paths[path_suffix] = self.get_path_item(path, view_cls, operations)
|
paths[path_suffix] = self.get_path_item(path, view_cls, operations)
|
||||||
|
|
||||||
return openapi.Paths(paths=paths), prefix
|
return self.get_paths_object(paths), prefix
|
||||||
|
|
||||||
def get_operation(self, view, path, prefix, method, components, request):
|
def get_operation(self, view, path, prefix, method, components, request):
|
||||||
"""Get an :class:`.Operation` for the given API endpoint (path, method). This method delegates to
|
"""Get an :class:`.Operation` for the given API endpoint (path, method). This method delegates to
|
||||||
@@ -425,7 +445,7 @@ class OpenAPISchemaGenerator(object):
|
|||||||
:rtype: list[openapi.Parameter]
|
:rtype: list[openapi.Parameter]
|
||||||
"""
|
"""
|
||||||
parameters = []
|
parameters = []
|
||||||
queryset = getattr(view_cls, 'queryset', None)
|
queryset = get_queryset_from_view(view_cls)
|
||||||
|
|
||||||
for variable in sorted(uritemplate.variables(path)):
|
for variable in sorted(uritemplate.variables(path)):
|
||||||
model, model_field = get_queryset_field(queryset, variable)
|
model, model_field = get_queryset_field(queryset, variable)
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ from .base import (
|
|||||||
from .field import (
|
from .field import (
|
||||||
CamelCaseJSONFilter, ChoiceFieldInspector, DictFieldInspector, FileFieldInspector, HiddenFieldInspector,
|
CamelCaseJSONFilter, ChoiceFieldInspector, DictFieldInspector, FileFieldInspector, HiddenFieldInspector,
|
||||||
InlineSerializerInspector, RecursiveFieldInspector, ReferencingSerializerInspector, RelatedFieldInspector,
|
InlineSerializerInspector, RecursiveFieldInspector, ReferencingSerializerInspector, RelatedFieldInspector,
|
||||||
SimpleFieldInspector, StringDefaultFieldInspector
|
SerializerMethodFieldInspector, SimpleFieldInspector, StringDefaultFieldInspector
|
||||||
)
|
)
|
||||||
from .query import CoreAPICompatInspector, DjangoRestResponsePagination
|
from .query import CoreAPICompatInspector, DjangoRestResponsePagination
|
||||||
from .view import SwaggerAutoSchema
|
from .view import SwaggerAutoSchema
|
||||||
|
|
||||||
# these settings must be accesed only after definig/importing all the classes in this module to avoid ImportErrors
|
# these settings must be accessed only after defining/importing all the classes in this module to avoid ImportErrors
|
||||||
ViewInspector.field_inspectors = swagger_settings.DEFAULT_FIELD_INSPECTORS
|
ViewInspector.field_inspectors = swagger_settings.DEFAULT_FIELD_INSPECTORS
|
||||||
ViewInspector.filter_inspectors = swagger_settings.DEFAULT_FILTER_INSPECTORS
|
ViewInspector.filter_inspectors = swagger_settings.DEFAULT_FILTER_INSPECTORS
|
||||||
ViewInspector.paginator_inspectors = swagger_settings.DEFAULT_PAGINATOR_INSPECTORS
|
ViewInspector.paginator_inspectors = swagger_settings.DEFAULT_PAGINATOR_INSPECTORS
|
||||||
@@ -25,7 +25,7 @@ __all__ = [
|
|||||||
# field inspectors
|
# field inspectors
|
||||||
'InlineSerializerInspector', 'RecursiveFieldInspector', 'ReferencingSerializerInspector', 'RelatedFieldInspector',
|
'InlineSerializerInspector', 'RecursiveFieldInspector', 'ReferencingSerializerInspector', 'RelatedFieldInspector',
|
||||||
'SimpleFieldInspector', 'FileFieldInspector', 'ChoiceFieldInspector', 'DictFieldInspector',
|
'SimpleFieldInspector', 'FileFieldInspector', 'ChoiceFieldInspector', 'DictFieldInspector',
|
||||||
'StringDefaultFieldInspector', 'CamelCaseJSONFilter', 'HiddenFieldInspector',
|
'StringDefaultFieldInspector', 'CamelCaseJSONFilter', 'HiddenFieldInspector', 'SerializerMethodFieldInspector',
|
||||||
|
|
||||||
# view inspectors
|
# view inspectors
|
||||||
'SwaggerAutoSchema',
|
'SwaggerAutoSchema',
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ import inspect
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from rest_framework.utils import encoders, json
|
|
||||||
|
|
||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..utils import decimal_as_float, force_real_str, is_list_view
|
from ..utils import force_real_str, get_field_default, is_list_view
|
||||||
|
|
||||||
#: Sentinel value that inspectors must return to signal that they do not know how to handle an object
|
#: Sentinel value that inspectors must return to signal that they do not know how to handle an object
|
||||||
NotHandled = object()
|
NotHandled = object()
|
||||||
@@ -135,6 +134,19 @@ class FieldInspector(BaseInspector):
|
|||||||
super(FieldInspector, self).__init__(view, path, method, components, request)
|
super(FieldInspector, self).__init__(view, path, method, components, request)
|
||||||
self.field_inspectors = field_inspectors
|
self.field_inspectors = field_inspectors
|
||||||
|
|
||||||
|
def add_manual_fields(self, serializer_or_field, schema):
|
||||||
|
"""Set fields from the ``swagger_schem_fields`` attribute on the Meta class. This method is called
|
||||||
|
only for serializers or fields that are converted into ``openapi.Schema`` objects.
|
||||||
|
|
||||||
|
:param serializer_or_field: serializer or field instance
|
||||||
|
:param openapi.Schema schema: the schema object to be modified in-place
|
||||||
|
"""
|
||||||
|
meta = getattr(serializer_or_field, 'Meta', None)
|
||||||
|
swagger_schema_fields = getattr(meta, 'swagger_schema_fields', {})
|
||||||
|
if swagger_schema_fields:
|
||||||
|
for attr, val in swagger_schema_fields.items():
|
||||||
|
setattr(schema, attr, val)
|
||||||
|
|
||||||
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
||||||
"""Convert a drf Serializer or Field instance into a Swagger object.
|
"""Convert a drf Serializer or Field instance into a Swagger object.
|
||||||
|
|
||||||
@@ -205,46 +217,29 @@ class FieldInspector(BaseInspector):
|
|||||||
instance_kwargs['required'] = field.required
|
instance_kwargs['required'] = field.required
|
||||||
|
|
||||||
if 'default' not in instance_kwargs and swagger_object_type != openapi.Items:
|
if 'default' not in instance_kwargs and swagger_object_type != openapi.Items:
|
||||||
default = getattr(field, 'default', serializers.empty)
|
default = get_field_default(field)
|
||||||
if default is not serializers.empty:
|
if default not in (None, serializers.empty):
|
||||||
if callable(default):
|
|
||||||
try:
|
|
||||||
if hasattr(default, 'set_context'):
|
|
||||||
default.set_context(field)
|
|
||||||
default = default()
|
|
||||||
except Exception: # pragma: no cover
|
|
||||||
logger.warning("default for %s is callable but it raised an exception when "
|
|
||||||
"called; 'default' field will not be added to schema", field, exc_info=True)
|
|
||||||
default = None
|
|
||||||
|
|
||||||
if default is not None:
|
|
||||||
try:
|
|
||||||
default = field.to_representation(default)
|
|
||||||
# JSON roundtrip ensures that the value is valid JSON;
|
|
||||||
# for example, sets and tuples get transformed into lists
|
|
||||||
default = json.loads(json.dumps(default, cls=encoders.JSONEncoder))
|
|
||||||
if decimal_as_float(field):
|
|
||||||
default = float(default)
|
|
||||||
except Exception: # pragma: no cover
|
|
||||||
logger.warning("'default' on schema for %s will not be set because "
|
|
||||||
"to_representation raised an exception", field, exc_info=True)
|
|
||||||
default = None
|
|
||||||
|
|
||||||
if default is not None:
|
|
||||||
instance_kwargs['default'] = default
|
instance_kwargs['default'] = default
|
||||||
|
|
||||||
if instance_kwargs.get('type', None) != openapi.TYPE_ARRAY:
|
if instance_kwargs.get('type', None) != openapi.TYPE_ARRAY:
|
||||||
instance_kwargs.setdefault('title', title)
|
instance_kwargs.setdefault('title', title)
|
||||||
|
if description is not None:
|
||||||
instance_kwargs.setdefault('description', description)
|
instance_kwargs.setdefault('description', description)
|
||||||
instance_kwargs.update(kwargs)
|
instance_kwargs.update(kwargs)
|
||||||
|
|
||||||
if existing_object is not None:
|
if existing_object is not None:
|
||||||
assert isinstance(existing_object, swagger_object_type)
|
assert isinstance(existing_object, swagger_object_type)
|
||||||
for attr, val in sorted(instance_kwargs.items()):
|
for key, val in sorted(instance_kwargs.items()):
|
||||||
setattr(existing_object, attr, val)
|
setattr(existing_object, key, val)
|
||||||
return existing_object
|
result = existing_object
|
||||||
|
else:
|
||||||
|
result = swagger_object_type(**instance_kwargs)
|
||||||
|
|
||||||
return swagger_object_type(**instance_kwargs)
|
# Provide an option to add manual paremeters to a schema
|
||||||
|
# for example, to add examples
|
||||||
|
if swagger_object_type == openapi.Schema:
|
||||||
|
self.add_manual_fields(field, result)
|
||||||
|
return result
|
||||||
|
|
||||||
# arrays in Schema have Schema elements, arrays in Parameter and Items have Items elements
|
# arrays in Schema have Schema elements, arrays in Parameter and Items have Items elements
|
||||||
child_swagger_type = openapi.Schema if swagger_object_type == openapi.Schema else openapi.Items
|
child_swagger_type = openapi.Schema if swagger_object_type == openapi.Schema else openapi.Items
|
||||||
@@ -263,7 +258,7 @@ class SerializerInspector(FieldInspector):
|
|||||||
return NotHandled
|
return NotHandled
|
||||||
|
|
||||||
def get_request_parameters(self, serializer, in_):
|
def get_request_parameters(self, serializer, in_):
|
||||||
"""Convert a DRF serializer into a list of :class:`.Parameter`\ s.
|
"""Convert a DRF serializer into a list of :class:`.Parameter`\\ s.
|
||||||
|
|
||||||
Should return :data:`.NotHandled` if this inspector does not know how to handle the given `serializer`.
|
Should return :data:`.NotHandled` if this inspector does not know how to handle the given `serializer`.
|
||||||
|
|
||||||
@@ -377,7 +372,7 @@ class ViewInspector(BaseInspector):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def serializer_to_parameters(self, serializer, in_):
|
def serializer_to_parameters(self, serializer, in_):
|
||||||
"""Convert a serializer to a possibly empty list of :class:`.Parameter`\ s.
|
"""Convert a serializer to a possibly empty list of :class:`.Parameter`\\ s.
|
||||||
|
|
||||||
:param serializers.BaseSerializer serializer: the ``Serializer`` instance
|
:param serializers.BaseSerializer serializer: the ``Serializer`` instance
|
||||||
:param str in_: the location of the parameters, one of the `openapi.IN_*` constants
|
:param str in_: the location of the parameters, one of the `openapi.IN_*` constants
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
import datetime
|
||||||
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import operator
|
import operator
|
||||||
|
import uuid
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
from inspect import isclass
|
||||||
|
|
||||||
from django.core import validators
|
from django.core import validators
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -10,9 +14,15 @@ from rest_framework.settings import api_settings as rest_framework_settings
|
|||||||
|
|
||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..errors import SwaggerGenerationError
|
from ..errors import SwaggerGenerationError
|
||||||
from ..utils import decimal_as_float, filter_none, get_serializer_ref_name
|
from ..utils import decimal_as_float, filter_none, get_serializer_class, get_serializer_ref_name
|
||||||
from .base import FieldInspector, NotHandled, SerializerInspector
|
from .base import FieldInspector, NotHandled, SerializerInspector
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Python>=3.5
|
||||||
|
import typing
|
||||||
|
except ImportError:
|
||||||
|
typing = None
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -22,19 +32,6 @@ class InlineSerializerInspector(SerializerInspector):
|
|||||||
#: whether to output :class:`.Schema` definitions inline or into the ``definitions`` section
|
#: whether to output :class:`.Schema` definitions inline or into the ``definitions`` section
|
||||||
use_definitions = False
|
use_definitions = False
|
||||||
|
|
||||||
def add_manual_fields(self, serializer, schema):
|
|
||||||
"""Set fields from the ``swagger_schem_fields`` attribute on the serializer's Meta class. This method is called
|
|
||||||
only for serializers that are converted into ``openapi.Schema`` objects.
|
|
||||||
|
|
||||||
:param serializer: serializer instance
|
|
||||||
:param openapi.Schema schema: the schema object to be modified in-place
|
|
||||||
"""
|
|
||||||
serializer_meta = getattr(serializer, 'Meta', None)
|
|
||||||
swagger_schema_fields = getattr(serializer_meta, 'swagger_schema_fields', {})
|
|
||||||
if swagger_schema_fields:
|
|
||||||
for attr, val in swagger_schema_fields.items():
|
|
||||||
setattr(schema, attr, val)
|
|
||||||
|
|
||||||
def get_schema(self, serializer):
|
def get_schema(self, serializer):
|
||||||
return self.probe_field_inspectors(serializer, openapi.Schema, self.use_definitions)
|
return self.probe_field_inspectors(serializer, openapi.Schema, self.use_definitions)
|
||||||
|
|
||||||
@@ -111,20 +108,25 @@ class InlineSerializerInspector(SerializerInspector):
|
|||||||
)
|
)
|
||||||
if not ref_name and 'title' in result:
|
if not ref_name and 'title' in result:
|
||||||
# on an inline model, the title is derived from the field name
|
# on an inline model, the title is derived from the field name
|
||||||
# but is visually displayed like the model name, which is confusing
|
# but is visno coverually displayed like the model name, which is confusing
|
||||||
# it is better to just remove title from inline models
|
# it is better to just remove title from inline models
|
||||||
del result.title
|
del result.title
|
||||||
|
|
||||||
# Provide an option to add manual paremeters to a schema
|
|
||||||
# for example, to add examples
|
|
||||||
self.add_manual_fields(field, result)
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if not ref_name or not use_references:
|
if not ref_name or not use_references:
|
||||||
return make_schema_definition()
|
return make_schema_definition()
|
||||||
|
|
||||||
definitions = self.components.with_scope(openapi.SCHEMA_DEFINITIONS)
|
definitions = self.components.with_scope(openapi.SCHEMA_DEFINITIONS)
|
||||||
definitions.setdefault(ref_name, make_schema_definition)
|
actual_schema = definitions.setdefault(ref_name, make_schema_definition)
|
||||||
|
actual_schema._remove_read_only()
|
||||||
|
|
||||||
|
actual_serializer = get_serializer_class(getattr(actual_schema, '_serializer', None))
|
||||||
|
this_serializer = get_serializer_class(field)
|
||||||
|
if actual_serializer and actual_serializer != this_serializer: # pragma: no cover
|
||||||
|
logger.warning("Schema for %s will override distinct serializer %s because they "
|
||||||
|
"share the same ref_name", actual_serializer, this_serializer)
|
||||||
|
|
||||||
return openapi.SchemaRef(definitions, ref_name)
|
return openapi.SchemaRef(definitions, ref_name)
|
||||||
|
|
||||||
return NotHandled
|
return NotHandled
|
||||||
@@ -163,6 +165,25 @@ def get_model_field(model, field_name):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def get_queryset_from_view(view, serializer=None):
|
||||||
|
"""Try to get the queryset of the given view
|
||||||
|
|
||||||
|
:param view: the view instance or class
|
||||||
|
:param serializer: if given, will check that the view's get_serializer_class return matches this serialzier
|
||||||
|
:return: queryset or ``None``
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
queryset = getattr(view, 'queryset', None)
|
||||||
|
|
||||||
|
if queryset is not None and serializer is not None:
|
||||||
|
# make sure the view is actually using *this* serializer
|
||||||
|
assert type(serializer) == view.get_serializer_class()
|
||||||
|
|
||||||
|
return queryset
|
||||||
|
except Exception: # pragma: no cover
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def get_parent_serializer(field):
|
def get_parent_serializer(field):
|
||||||
"""Get the nearest parent ``Serializer`` instance for the given field.
|
"""Get the nearest parent ``Serializer`` instance for the given field.
|
||||||
|
|
||||||
@@ -195,7 +216,7 @@ def get_related_model(model, source):
|
|||||||
|
|
||||||
|
|
||||||
class RelatedFieldInspector(FieldInspector):
|
class RelatedFieldInspector(FieldInspector):
|
||||||
"""Provides conversions for ``RelatedField``\ s."""
|
"""Provides conversions for ``RelatedField``\\ s."""
|
||||||
|
|
||||||
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
||||||
SwaggerType, ChildSwaggerType = self._get_partial_types(field, swagger_object_type, use_references, **kwargs)
|
SwaggerType, ChildSwaggerType = self._get_partial_types(field, swagger_object_type, use_references, **kwargs)
|
||||||
@@ -229,10 +250,18 @@ class RelatedFieldInspector(FieldInspector):
|
|||||||
else:
|
else:
|
||||||
# if the RelatedField has no queryset (e.g. read only), try to find the target model
|
# if the RelatedField has no queryset (e.g. read only), try to find the target model
|
||||||
# from the view queryset or ModelSerializer model, if present
|
# from the view queryset or ModelSerializer model, if present
|
||||||
view_queryset = getattr(self.view, 'queryset', None)
|
parent_serializer = get_parent_serializer(field)
|
||||||
serializer_meta = getattr(get_parent_serializer(field), 'Meta', None)
|
|
||||||
this_model = getattr(view_queryset, 'model', None) or getattr(serializer_meta, 'model', None)
|
serializer_meta = getattr(parent_serializer, 'Meta', None)
|
||||||
|
this_model = getattr(serializer_meta, 'model', None)
|
||||||
|
if not this_model:
|
||||||
|
view_queryset = get_queryset_from_view(self.view, parent_serializer)
|
||||||
|
this_model = getattr(view_queryset, 'model', None)
|
||||||
|
|
||||||
source = getattr(field, 'source', '') or field.field_name
|
source = getattr(field, 'source', '') or field.field_name
|
||||||
|
if not source and isinstance(field.parent, serializers.ManyRelatedField):
|
||||||
|
source = field.parent.field_name
|
||||||
|
|
||||||
model = get_related_model(this_model, source)
|
model = get_related_model(this_model, source)
|
||||||
model_field = get_model_field(model, target_field)
|
model_field = get_model_field(model, target_field)
|
||||||
|
|
||||||
@@ -254,13 +283,22 @@ def find_regex(regex_field):
|
|||||||
regex_validator = None
|
regex_validator = None
|
||||||
for validator in regex_field.validators:
|
for validator in regex_field.validators:
|
||||||
if isinstance(validator, validators.RegexValidator):
|
if isinstance(validator, validators.RegexValidator):
|
||||||
|
if isinstance(validator, validators.URLValidator) or validator == validators.validate_ipv4_address:
|
||||||
|
# skip the default url and IP regexes because they are complex and unhelpful
|
||||||
|
# validate_ipv4_address is a RegexValidator instance in Django 1.11
|
||||||
|
continue
|
||||||
if regex_validator is not None:
|
if regex_validator is not None:
|
||||||
# bail if multiple validators are found - no obvious way to choose
|
# bail if multiple validators are found - no obvious way to choose
|
||||||
return None # pragma: no cover
|
return None # pragma: no cover
|
||||||
regex_validator = validator
|
regex_validator = validator
|
||||||
|
|
||||||
# regex_validator.regex should be a compiled re object...
|
# regex_validator.regex should be a compiled re object...
|
||||||
|
try:
|
||||||
pattern = getattr(getattr(regex_validator, 'regex', None), 'pattern', None)
|
pattern = getattr(getattr(regex_validator, 'regex', None), 'pattern', None)
|
||||||
|
except Exception: # pragma: no cover
|
||||||
|
logger.warning('failed to compile regex validator of ' + str(regex_field), exc_info=True)
|
||||||
|
return None
|
||||||
|
|
||||||
if pattern:
|
if pattern:
|
||||||
# attempt some basic cleanup to remove regex constructs not supported by JavaScript
|
# attempt some basic cleanup to remove regex constructs not supported by JavaScript
|
||||||
# -- swagger uses javascript-style regexes - see https://github.com/swagger-api/swagger-editor/issues/1601
|
# -- swagger uses javascript-style regexes - see https://github.com/swagger-api/swagger-editor/issues/1601
|
||||||
@@ -394,7 +432,7 @@ def get_basic_type_info(field):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
pattern = None
|
pattern = None
|
||||||
if swagger_type == openapi.TYPE_STRING and format in (None, openapi.FORMAT_SLUG):
|
if swagger_type == openapi.TYPE_STRING:
|
||||||
pattern = find_regex(field)
|
pattern = find_regex(field)
|
||||||
|
|
||||||
limits = find_limits(field)
|
limits = find_limits(field)
|
||||||
@@ -409,6 +447,120 @@ def get_basic_type_info(field):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def decimal_return_type():
|
||||||
|
return openapi.TYPE_STRING if rest_framework_settings.COERCE_DECIMAL_TO_STRING else openapi.TYPE_NUMBER
|
||||||
|
|
||||||
|
|
||||||
|
raw_type_info = [
|
||||||
|
(bool, (openapi.TYPE_BOOLEAN, None)),
|
||||||
|
(int, (openapi.TYPE_INTEGER, None)),
|
||||||
|
(float, (openapi.TYPE_NUMBER, None)),
|
||||||
|
(Decimal, (decimal_return_type, openapi.FORMAT_DECIMAL)),
|
||||||
|
(uuid.UUID, (openapi.TYPE_STRING, openapi.FORMAT_UUID)),
|
||||||
|
(datetime.datetime, (openapi.TYPE_STRING, openapi.FORMAT_DATETIME)),
|
||||||
|
(datetime.date, (openapi.TYPE_STRING, openapi.FORMAT_DATE)),
|
||||||
|
# TODO - support typing.List etc
|
||||||
|
]
|
||||||
|
|
||||||
|
hinting_type_info = raw_type_info
|
||||||
|
|
||||||
|
|
||||||
|
def get_basic_type_info_from_hint(hint_class):
|
||||||
|
"""Given a class (eg from a SerializerMethodField's return type hint,
|
||||||
|
return its basic type information - ``type``, ``format``, ``pattern``,
|
||||||
|
and any applicable min/max limit values.
|
||||||
|
|
||||||
|
:param hint_class: the class
|
||||||
|
:return: the extracted attributes as a dictionary, or ``None`` if the field type is not known
|
||||||
|
:rtype: OrderedDict
|
||||||
|
"""
|
||||||
|
|
||||||
|
for check_class, type_format in hinting_type_info:
|
||||||
|
if issubclass(hint_class, check_class):
|
||||||
|
swagger_type, format = type_format
|
||||||
|
if callable(swagger_type):
|
||||||
|
swagger_type = swagger_type()
|
||||||
|
# if callable(format):
|
||||||
|
# format = format(klass)
|
||||||
|
break
|
||||||
|
else: # pragma: no cover
|
||||||
|
return None
|
||||||
|
|
||||||
|
pattern = None
|
||||||
|
|
||||||
|
result = OrderedDict([
|
||||||
|
('type', swagger_type),
|
||||||
|
('format', format),
|
||||||
|
('pattern', pattern)
|
||||||
|
])
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
class SerializerMethodFieldInspector(FieldInspector):
|
||||||
|
"""Provides conversion for SerializerMethodField, optionally using information from the swagger_serializer_method
|
||||||
|
decorator.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
||||||
|
if not isinstance(field, serializers.SerializerMethodField):
|
||||||
|
return NotHandled
|
||||||
|
|
||||||
|
method = getattr(field.parent, field.method_name)
|
||||||
|
if method is None:
|
||||||
|
return NotHandled
|
||||||
|
|
||||||
|
serializer = getattr(method, "_swagger_serializer", None)
|
||||||
|
|
||||||
|
if serializer:
|
||||||
|
# attribute added by the swagger_serializer_method decorator
|
||||||
|
serializer = getattr(method, '_swagger_serializer', None)
|
||||||
|
|
||||||
|
# in order of preference for description, use:
|
||||||
|
# 1) field.help_text from SerializerMethodField(help_text)
|
||||||
|
# 2) serializer.help_text from swagger_serializer_method(serializer)
|
||||||
|
# 3) method's docstring
|
||||||
|
description = field.help_text
|
||||||
|
if description is None:
|
||||||
|
description = getattr(serializer, 'help_text', None)
|
||||||
|
if description is None:
|
||||||
|
description = method.__doc__
|
||||||
|
|
||||||
|
label = field.label
|
||||||
|
if label is None:
|
||||||
|
label = getattr(serializer, 'label', None)
|
||||||
|
|
||||||
|
if inspect.isclass(serializer):
|
||||||
|
serializer_kwargs = {
|
||||||
|
"help_text": description,
|
||||||
|
"label": label,
|
||||||
|
"read_only": True,
|
||||||
|
}
|
||||||
|
|
||||||
|
serializer = method._swagger_serializer(**serializer_kwargs)
|
||||||
|
else:
|
||||||
|
serializer.help_text = description
|
||||||
|
serializer.label = label
|
||||||
|
serializer.read_only = True
|
||||||
|
|
||||||
|
return self.probe_field_inspectors(serializer, swagger_object_type, use_references, read_only=True)
|
||||||
|
elif typing:
|
||||||
|
# look for Python 3.5+ style type hinting of the return value
|
||||||
|
hint_class = inspect.signature(method).return_annotation
|
||||||
|
|
||||||
|
if not isclass(hint_class) and hasattr(hint_class, '__args__'):
|
||||||
|
hint_class = hint_class.__args__[0]
|
||||||
|
if isclass(hint_class) and not issubclass(hint_class, inspect._empty):
|
||||||
|
type_info = get_basic_type_info_from_hint(hint_class)
|
||||||
|
|
||||||
|
if type_info is not None:
|
||||||
|
SwaggerType, ChildSwaggerType = self._get_partial_types(field, swagger_object_type,
|
||||||
|
use_references, **kwargs)
|
||||||
|
return SwaggerType(**type_info)
|
||||||
|
|
||||||
|
return NotHandled
|
||||||
|
|
||||||
|
|
||||||
class SimpleFieldInspector(FieldInspector):
|
class SimpleFieldInspector(FieldInspector):
|
||||||
"""Provides conversions for fields which can be described using just ``type``, ``format``, ``pattern``
|
"""Provides conversions for fields which can be described using just ``type``, ``format``, ``pattern``
|
||||||
and min/max validators.
|
and min/max validators.
|
||||||
@@ -457,7 +609,7 @@ class ChoiceFieldInspector(FieldInspector):
|
|||||||
|
|
||||||
|
|
||||||
class FileFieldInspector(FieldInspector):
|
class FileFieldInspector(FieldInspector):
|
||||||
"""Provides conversions for ``FileField``\ s."""
|
"""Provides conversions for ``FileField``\\ s."""
|
||||||
|
|
||||||
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
||||||
SwaggerType, ChildSwaggerType = self._get_partial_types(field, swagger_object_type, use_references, **kwargs)
|
SwaggerType, ChildSwaggerType = self._get_partial_types(field, swagger_object_type, use_references, **kwargs)
|
||||||
@@ -569,14 +721,15 @@ except ImportError: # pragma: no cover
|
|||||||
else:
|
else:
|
||||||
class RecursiveFieldInspector(FieldInspector):
|
class RecursiveFieldInspector(FieldInspector):
|
||||||
"""Provides conversion for RecursiveField (https://github.com/heywbj/django-rest-framework-recursive)"""
|
"""Provides conversion for RecursiveField (https://github.com/heywbj/django-rest-framework-recursive)"""
|
||||||
|
|
||||||
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
def field_to_swagger_object(self, field, swagger_object_type, use_references, **kwargs):
|
||||||
if isinstance(field, RecursiveField) and swagger_object_type == openapi.Schema:
|
if isinstance(field, RecursiveField) and swagger_object_type == openapi.Schema:
|
||||||
assert use_references is True, "Can not create schema for RecursiveField when use_references is False"
|
assert use_references is True, "Can not create schema for RecursiveField when use_references is False"
|
||||||
|
|
||||||
ref_name = get_serializer_ref_name(field.proxied)
|
ref_name = get_serializer_ref_name(field.proxied)
|
||||||
assert ref_name is not None, "Can not create RecursiveField schema for inline ModelSerializer"
|
assert ref_name is not None, "Can't create RecursiveField schema for inline " + str(type(field.proxied))
|
||||||
|
|
||||||
return openapi.SchemaRef(self.components.with_scope(openapi.SCHEMA_DEFINITIONS), ref_name,
|
definitions = self.components.with_scope(openapi.SCHEMA_DEFINITIONS)
|
||||||
ignore_unresolved=True)
|
return openapi.SchemaRef(definitions, ref_name, ignore_unresolved=True)
|
||||||
|
|
||||||
return NotHandled
|
return NotHandled
|
||||||
@@ -3,14 +3,13 @@ from collections import OrderedDict
|
|||||||
import coreschema
|
import coreschema
|
||||||
from rest_framework.pagination import CursorPagination, LimitOffsetPagination, PageNumberPagination
|
from rest_framework.pagination import CursorPagination, LimitOffsetPagination, PageNumberPagination
|
||||||
|
|
||||||
from drf_yasg.utils import force_real_str
|
|
||||||
|
|
||||||
from .. import openapi
|
from .. import openapi
|
||||||
|
from ..utils import force_real_str
|
||||||
from .base import FilterInspector, PaginatorInspector
|
from .base import FilterInspector, PaginatorInspector
|
||||||
|
|
||||||
|
|
||||||
class CoreAPICompatInspector(PaginatorInspector, FilterInspector):
|
class CoreAPICompatInspector(PaginatorInspector, FilterInspector):
|
||||||
"""Converts ``coreapi.Field``\ s to :class:`.openapi.Parameter`\ s for filters and paginators that implement a
|
"""Converts ``coreapi.Field``\\ s to :class:`.openapi.Parameter`\\ s for filters and paginators that implement a
|
||||||
``get_schema_fields`` method.
|
``get_schema_fields`` method.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ from rest_framework.status import is_success
|
|||||||
from .. import openapi
|
from .. import openapi
|
||||||
from ..errors import SwaggerGenerationError
|
from ..errors import SwaggerGenerationError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
force_real_str, force_serializer_instance, get_consumes, get_produces, guess_response_status, is_list_view, no_body,
|
force_real_str, force_serializer_instance, get_consumes, get_produces, guess_response_status, is_list_view,
|
||||||
param_list_to_odict
|
merge_params, no_body, param_list_to_odict
|
||||||
)
|
)
|
||||||
from .base import ViewInspector
|
from .base import ViewInspector
|
||||||
|
|
||||||
@@ -34,8 +34,10 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
|
|
||||||
operation_id = self.get_operation_id(operation_keys)
|
operation_id = self.get_operation_id(operation_keys)
|
||||||
description = self.get_description()
|
description = self.get_description()
|
||||||
|
summary = self.get_summary()
|
||||||
security = self.get_security()
|
security = self.get_security()
|
||||||
assert security is None or isinstance(security, list), "security must be a list of securiy requirement objects"
|
assert security is None or isinstance(security, list), "security must be a list of securiy requirement objects"
|
||||||
|
deprecated = self.is_deprecated()
|
||||||
tags = self.get_tags(operation_keys)
|
tags = self.get_tags(operation_keys)
|
||||||
|
|
||||||
responses = self.get_responses()
|
responses = self.get_responses()
|
||||||
@@ -43,12 +45,14 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
return openapi.Operation(
|
return openapi.Operation(
|
||||||
operation_id=operation_id,
|
operation_id=operation_id,
|
||||||
description=force_real_str(description),
|
description=force_real_str(description),
|
||||||
|
summary=force_real_str(summary),
|
||||||
responses=responses,
|
responses=responses,
|
||||||
parameters=parameters,
|
parameters=parameters,
|
||||||
consumes=consumes,
|
consumes=consumes,
|
||||||
produces=produces,
|
produces=produces,
|
||||||
tags=tags,
|
tags=tags,
|
||||||
security=security
|
security=security,
|
||||||
|
deprecated=deprecated
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_request_body_parameters(self, consumes):
|
def get_request_body_parameters(self, consumes):
|
||||||
@@ -59,7 +63,7 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
- a list of primitive Parameters parsed as form data
|
- a list of primitive Parameters parsed as form data
|
||||||
|
|
||||||
:param list[str] consumes: a list of accepted MIME types as returned by :meth:`.get_consumes`
|
:param list[str] consumes: a list of accepted MIME types as returned by :meth:`.get_consumes`
|
||||||
:return: a (potentially empty) list of :class:`.Parameter`\ s either ``in: body`` or ``in: formData``
|
:return: a (potentially empty) list of :class:`.Parameter`\\ s either ``in: body`` or ``in: formData``
|
||||||
:rtype: list[openapi.Parameter]
|
:rtype: list[openapi.Parameter]
|
||||||
"""
|
"""
|
||||||
serializer = self.get_request_serializer()
|
serializer = self.get_request_serializer()
|
||||||
@@ -102,7 +106,7 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
|
|
||||||
if body_override is not None:
|
if body_override is not None:
|
||||||
if body_override is no_body:
|
if body_override is no_body:
|
||||||
return None
|
return no_body
|
||||||
if self.method not in self.body_methods:
|
if self.method not in self.body_methods:
|
||||||
raise SwaggerGenerationError("request_body can only be applied to (" + ','.join(self.body_methods) +
|
raise SwaggerGenerationError("request_body can only be applied to (" + ','.join(self.body_methods) +
|
||||||
"); are you looking for query_serializer or manual_parameters?")
|
"); are you looking for query_serializer or manual_parameters?")
|
||||||
@@ -122,10 +126,13 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
if body_override is None and self.method in self.implicit_body_methods:
|
if body_override is None and self.method in self.implicit_body_methods:
|
||||||
return self.get_view_serializer()
|
return self.get_view_serializer()
|
||||||
|
|
||||||
|
if body_override is no_body:
|
||||||
|
return None
|
||||||
|
|
||||||
return body_override
|
return body_override
|
||||||
|
|
||||||
def get_request_form_parameters(self, serializer):
|
def get_request_form_parameters(self, serializer):
|
||||||
"""Given a Serializer, return a list of ``in: formData`` :class:`.Parameter`\ s.
|
"""Given a Serializer, return a list of ``in: formData`` :class:`.Parameter`\\ s.
|
||||||
|
|
||||||
:param serializer: the view's request serializer as returned by :meth:`.get_request_serializer`
|
:param serializer: the view's request serializer as returned by :meth:`.get_request_serializer`
|
||||||
:rtype: list[openapi.Parameter]
|
:rtype: list[openapi.Parameter]
|
||||||
@@ -155,21 +162,19 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
:return: modified parameters
|
:return: modified parameters
|
||||||
:rtype: list[openapi.Parameter]
|
:rtype: list[openapi.Parameter]
|
||||||
"""
|
"""
|
||||||
parameters = param_list_to_odict(parameters)
|
|
||||||
manual_parameters = self.overrides.get('manual_parameters', None) or []
|
manual_parameters = self.overrides.get('manual_parameters', None) or []
|
||||||
|
|
||||||
if any(param.in_ == openapi.IN_BODY for param in manual_parameters): # pragma: no cover
|
if any(param.in_ == openapi.IN_BODY for param in manual_parameters): # pragma: no cover
|
||||||
raise SwaggerGenerationError("specify the body parameter as a Schema or Serializer in request_body")
|
raise SwaggerGenerationError("specify the body parameter as a Schema or Serializer in request_body")
|
||||||
if any(param.in_ == openapi.IN_FORM for param in manual_parameters): # pragma: no cover
|
if any(param.in_ == openapi.IN_FORM for param in manual_parameters): # pragma: no cover
|
||||||
if any(param.in_ == openapi.IN_BODY for param in parameters.values()):
|
if any(param.in_ == openapi.IN_BODY for param in parameters):
|
||||||
raise SwaggerGenerationError("cannot add form parameters when the request has a request body; "
|
raise SwaggerGenerationError("cannot add form parameters when the request has a request body; "
|
||||||
"did you forget to set an appropriate parser class on the view?")
|
"did you forget to set an appropriate parser class on the view?")
|
||||||
if self.method not in self.body_methods:
|
if self.method not in self.body_methods:
|
||||||
raise SwaggerGenerationError("form parameters can only be applied to (" + ','.join(self.body_methods) +
|
raise SwaggerGenerationError("form parameters can only be applied to (" + ','.join(self.body_methods) +
|
||||||
") HTTP methods")
|
") HTTP methods")
|
||||||
|
|
||||||
parameters.update(param_list_to_odict(manual_parameters))
|
return merge_params(parameters, manual_parameters)
|
||||||
return list(parameters.values())
|
|
||||||
|
|
||||||
def get_responses(self):
|
def get_responses(self):
|
||||||
"""Get the possible responses for this view as a swagger :class:`.Responses` object.
|
"""Get the possible responses for this view as a swagger :class:`.Responses` object.
|
||||||
@@ -188,7 +193,11 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
|
|
||||||
:return: response serializer, :class:`.Schema`, :class:`.SchemaRef`, ``None``
|
:return: response serializer, :class:`.Schema`, :class:`.SchemaRef`, ``None``
|
||||||
"""
|
"""
|
||||||
return self._get_request_body_override() or self.get_view_serializer()
|
body_override = self._get_request_body_override()
|
||||||
|
if body_override and body_override is not no_body:
|
||||||
|
return body_override
|
||||||
|
|
||||||
|
return self.get_view_serializer()
|
||||||
|
|
||||||
def get_default_responses(self):
|
def get_default_responses(self):
|
||||||
"""Get the default responses determined for this view from the request serializer and request method.
|
"""Get the default responses determined for this view from the request serializer and request method.
|
||||||
@@ -203,8 +212,6 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
default_schema = self.get_default_response_serializer()
|
default_schema = self.get_default_response_serializer()
|
||||||
|
|
||||||
default_schema = default_schema or ''
|
default_schema = default_schema or ''
|
||||||
if any(is_form_media_type(encoding) for encoding in self.get_consumes()):
|
|
||||||
default_schema = ''
|
|
||||||
if default_schema and not isinstance(default_schema, openapi.Schema):
|
if default_schema and not isinstance(default_schema, openapi.Schema):
|
||||||
default_schema = self.serializer_to_schema(default_schema) or ''
|
default_schema = self.serializer_to_schema(default_schema) or ''
|
||||||
|
|
||||||
@@ -219,7 +226,7 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
def get_response_serializers(self):
|
def get_response_serializers(self):
|
||||||
"""Return the response codes that this view is expected to return, and the serializer for each response body.
|
"""Return the response codes that this view is expected to return, and the serializer for each response body.
|
||||||
The return value should be a dict where the keys are possible status codes, and values are either strings,
|
The return value should be a dict where the keys are possible status codes, and values are either strings,
|
||||||
``Serializer``\ s, :class:`.Schema`, :class:`.SchemaRef` or :class:`.Response` objects. See
|
``Serializer``\\ s, :class:`.Schema`, :class:`.SchemaRef` or :class:`.Response` objects. See
|
||||||
:func:`@swagger_auto_schema <.swagger_auto_schema>` for more details.
|
:func:`@swagger_auto_schema <.swagger_auto_schema>` for more details.
|
||||||
|
|
||||||
:return: the response serializers
|
:return: the response serializers
|
||||||
@@ -314,16 +321,40 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
operation_id = '_'.join(operation_keys)
|
operation_id = '_'.join(operation_keys)
|
||||||
return operation_id
|
return operation_id
|
||||||
|
|
||||||
|
def _extract_description_and_summary(self):
|
||||||
|
description = self.overrides.get('operation_description', None)
|
||||||
|
summary = self.overrides.get('operation_summary', None)
|
||||||
|
if description is None:
|
||||||
|
description = self._sch.get_description(self.path, self.method) or ''
|
||||||
|
description = description.strip().replace('\r', '')
|
||||||
|
|
||||||
|
if description and (summary is None):
|
||||||
|
# description from docstring ... do summary magic
|
||||||
|
# https://www.python.org/dev/peps/pep-0257/#multi-line-docstrings
|
||||||
|
summary_max_len = 120 # OpenAPI 2.0 spec says summary should be under 120 characters
|
||||||
|
sections = description.split('\n\n', 1)
|
||||||
|
if len(sections) == 2:
|
||||||
|
sections[0] = sections[0].strip()
|
||||||
|
if len(sections[0]) < summary_max_len:
|
||||||
|
summary, description = sections
|
||||||
|
|
||||||
|
return description, summary
|
||||||
|
|
||||||
def get_description(self):
|
def get_description(self):
|
||||||
"""Return an operation description determined as appropriate from the view's method and class docstrings.
|
"""Return an operation description determined as appropriate from the view's method and class docstrings.
|
||||||
|
|
||||||
:return: the operation description
|
:return: the operation description
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
description = self.overrides.get('operation_description', None)
|
return self._extract_description_and_summary()[0]
|
||||||
if description is None:
|
|
||||||
description = self._sch.get_description(self.path, self.method)
|
def get_summary(self):
|
||||||
return description
|
"""Return a summary description for this operation.
|
||||||
|
|
||||||
|
:return: the summary
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
return self._extract_description_and_summary()[1]
|
||||||
|
|
||||||
def get_security(self):
|
def get_security(self):
|
||||||
"""Return a list of security requirements for this operation.
|
"""Return a list of security requirements for this operation.
|
||||||
@@ -335,6 +366,14 @@ class SwaggerAutoSchema(ViewInspector):
|
|||||||
:rtype: list[dict[str,list[str]]]"""
|
:rtype: list[dict[str,list[str]]]"""
|
||||||
return self.overrides.get('security', None)
|
return self.overrides.get('security', None)
|
||||||
|
|
||||||
|
def is_deprecated(self):
|
||||||
|
"""Return ``True`` if this operation is to be marked as deprecated.
|
||||||
|
|
||||||
|
:return: deprecation status
|
||||||
|
:rtype: bool
|
||||||
|
"""
|
||||||
|
return self.overrides.get('deprecated', None)
|
||||||
|
|
||||||
def get_tags(self, operation_keys):
|
def get_tags(self, operation_keys):
|
||||||
"""Get a list of tags for this operation. Tags determine how operations relate with each other, and in the UI
|
"""Get a list of tags for this operation. Tags determine how operations relate with each other, and in the UI
|
||||||
each tag will show as a group containing the operations that use it.
|
each tag will show as a group containing the operations that use it.
|
||||||
|
|||||||
+35
-7
@@ -1,3 +1,4 @@
|
|||||||
|
import logging
|
||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
@@ -7,6 +8,8 @@ from inflection import camelize
|
|||||||
|
|
||||||
from .utils import filter_none
|
from .utils import filter_none
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
TYPE_OBJECT = "object" #:
|
TYPE_OBJECT = "object" #:
|
||||||
TYPE_STRING = "string" #:
|
TYPE_STRING = "string" #:
|
||||||
TYPE_NUMBER = "number" #:
|
TYPE_NUMBER = "number" #:
|
||||||
@@ -288,6 +291,8 @@ class Paths(SwaggerDict):
|
|||||||
|
|
||||||
|
|
||||||
class PathItem(SwaggerDict):
|
class PathItem(SwaggerDict):
|
||||||
|
OPERATION_NAMES = ['get', 'put', 'post', 'delete', 'options', 'head', 'patch']
|
||||||
|
|
||||||
def __init__(self, get=None, put=None, post=None, delete=None, options=None,
|
def __init__(self, get=None, put=None, post=None, delete=None, options=None,
|
||||||
head=None, patch=None, parameters=None, **extra):
|
head=None, patch=None, parameters=None, **extra):
|
||||||
"""Information about a single path
|
"""Information about a single path
|
||||||
@@ -312,6 +317,15 @@ class PathItem(SwaggerDict):
|
|||||||
self.parameters = filter_none(parameters)
|
self.parameters = filter_none(parameters)
|
||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def operations(self):
|
||||||
|
"""A list of all standard Operations on this PathItem object. See :attr:`.OPERATION_NAMES`.
|
||||||
|
|
||||||
|
:return: list of (method name, Operation) tuples
|
||||||
|
:rtype: list[tuple[str,Operation]]
|
||||||
|
"""
|
||||||
|
return [(k, v) for k, v in self.items() if k in PathItem.OPERATION_NAMES and v]
|
||||||
|
|
||||||
|
|
||||||
class Operation(SwaggerDict):
|
class Operation(SwaggerDict):
|
||||||
def __init__(self, operation_id, responses, parameters=None, consumes=None, produces=None, summary=None,
|
def __init__(self, operation_id, responses, parameters=None, consumes=None, produces=None, summary=None,
|
||||||
@@ -384,8 +398,6 @@ class Parameter(SwaggerDict):
|
|||||||
:param default: default value if the parameter is not provided; must conform to parameter type
|
:param default: default value if the parameter is not provided; must conform to parameter type
|
||||||
"""
|
"""
|
||||||
super(Parameter, self).__init__(**extra)
|
super(Parameter, self).__init__(**extra)
|
||||||
if (not schema and not type) or (schema and type):
|
|
||||||
raise AssertionError("either schema or type are required for Parameter object!")
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.in_ = in_
|
self.in_ = in_
|
||||||
self.description = description
|
self.description = description
|
||||||
@@ -398,6 +410,10 @@ class Parameter(SwaggerDict):
|
|||||||
self.items = items
|
self.items = items
|
||||||
self.default = default
|
self.default = default
|
||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
|
if (not schema and not type) or (schema and type):
|
||||||
|
raise AssertionError("either schema or type are required for Parameter object (not both)!")
|
||||||
|
if schema and isinstance(schema, Schema):
|
||||||
|
schema._remove_read_only()
|
||||||
if self['in'] == IN_PATH:
|
if self['in'] == IN_PATH:
|
||||||
# path parameters must always be required
|
# path parameters must always be required
|
||||||
assert required is not False, "path parameter cannot be optional"
|
assert required is not False, "path parameter cannot be optional"
|
||||||
@@ -429,9 +445,9 @@ class Schema(SwaggerDict):
|
|||||||
:param bool,.Schema,.SchemaRef additional_properties: allow wildcard properties not listed in `properties`
|
:param bool,.Schema,.SchemaRef additional_properties: allow wildcard properties not listed in `properties`
|
||||||
:param list[str] required: list of requried property names
|
:param list[str] required: list of requried property names
|
||||||
:param .Schema,.SchemaRef items: type of array items, only valid if `type` is ``array``
|
:param .Schema,.SchemaRef items: type of array items, only valid if `type` is ``array``
|
||||||
:param default: only valid when insider another ``Schema``\ 's ``properties``;
|
:param default: only valid when insider another ``Schema``\\ 's ``properties``;
|
||||||
the default value of this property if it is not provided, must conform to the type of this Schema
|
the default value of this property if it is not provided, must conform to the type of this Schema
|
||||||
:param read_only: only valid when insider another ``Schema``\ 's ``properties``;
|
:param read_only: only valid when insider another ``Schema``\\ 's ``properties``;
|
||||||
declares the property as read only - it must only be sent as part of responses, never in requests
|
declares the property as read only - it must only be sent as part of responses, never in requests
|
||||||
"""
|
"""
|
||||||
super(Schema, self).__init__(**extra)
|
super(Schema, self).__init__(**extra)
|
||||||
@@ -462,6 +478,11 @@ class Schema(SwaggerDict):
|
|||||||
if pattern and type != TYPE_STRING:
|
if pattern and type != TYPE_STRING:
|
||||||
raise AssertionError("pattern can only be used when type is string")
|
raise AssertionError("pattern can only be used when type is string")
|
||||||
|
|
||||||
|
def _remove_read_only(self):
|
||||||
|
# readOnly is only valid for Schemas inside another Schema's properties;
|
||||||
|
# when placing Schema elsewhere we must take care to remove the readOnly flag
|
||||||
|
self.pop('readOnly', '')
|
||||||
|
|
||||||
|
|
||||||
class _Ref(SwaggerDict):
|
class _Ref(SwaggerDict):
|
||||||
ref_name_re = re.compile(r"#/(?P<scope>.+)/(?P<name>[^/]+)$")
|
ref_name_re = re.compile(r"#/(?P<scope>.+)/(?P<name>[^/]+)$")
|
||||||
@@ -494,12 +515,12 @@ class _Ref(SwaggerDict):
|
|||||||
ref_match = self.ref_name_re.match(self.ref)
|
ref_match = self.ref_name_re.match(self.ref)
|
||||||
return resolver.get(ref_match.group('name'), scope=ref_match.group('scope'))
|
return resolver.get(ref_match.group('name'), scope=ref_match.group('scope'))
|
||||||
|
|
||||||
def __setitem__(self, key, value, **kwargs):
|
def __setitem__(self, key, value):
|
||||||
if key == "$ref":
|
if key == "$ref":
|
||||||
return super(_Ref, self).__setitem__(key, value, **kwargs)
|
return super(_Ref, self).__setitem__(key, value)
|
||||||
raise NotImplementedError("only $ref can be set on Reference objects (not %s)" % key)
|
raise NotImplementedError("only $ref can be set on Reference objects (not %s)" % key)
|
||||||
|
|
||||||
def __delitem__(self, key, **kwargs):
|
def __delitem__(self, key):
|
||||||
raise NotImplementedError("cannot delete property of Reference object")
|
raise NotImplementedError("cannot delete property of Reference object")
|
||||||
|
|
||||||
|
|
||||||
@@ -557,6 +578,8 @@ class Response(SwaggerDict):
|
|||||||
self.schema = schema
|
self.schema = schema
|
||||||
self.examples = examples
|
self.examples = examples
|
||||||
self._insert_extras__()
|
self._insert_extras__()
|
||||||
|
if schema and isinstance(schema, Schema):
|
||||||
|
schema._remove_read_only()
|
||||||
|
|
||||||
|
|
||||||
class ReferenceResolver(object):
|
class ReferenceResolver(object):
|
||||||
@@ -628,8 +651,13 @@ class ReferenceResolver(object):
|
|||||||
ret = self.getdefault(name, None, scope)
|
ret = self.getdefault(name, None, scope)
|
||||||
if ret is None:
|
if ret is None:
|
||||||
ret = maker()
|
ret = maker()
|
||||||
|
value = self.getdefault(name, None, scope)
|
||||||
assert ret is not None, "maker returned None; referenced objects cannot be None/null"
|
assert ret is not None, "maker returned None; referenced objects cannot be None/null"
|
||||||
|
if value is None:
|
||||||
self.set(name, ret, scope)
|
self.set(name, ret, scope)
|
||||||
|
elif value != ret:
|
||||||
|
logger.debug("during setdefault, maker for %s inserted a value and returned a different value", name)
|
||||||
|
ret = value
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
+73
-39
@@ -1,11 +1,14 @@
|
|||||||
|
import six
|
||||||
|
|
||||||
from django.shortcuts import render, resolve_url
|
from django.shortcuts import render, resolve_url
|
||||||
|
from django.utils.functional import Promise
|
||||||
from rest_framework.renderers import BaseRenderer, JSONRenderer, TemplateHTMLRenderer
|
from rest_framework.renderers import BaseRenderer, JSONRenderer, TemplateHTMLRenderer
|
||||||
from rest_framework.utils import json
|
from rest_framework.utils import json
|
||||||
|
|
||||||
from drf_yasg.openapi import Swagger
|
|
||||||
|
|
||||||
from .app_settings import redoc_settings, swagger_settings
|
from .app_settings import redoc_settings, swagger_settings
|
||||||
from .codecs import VALIDATORS, OpenAPICodecJson, OpenAPICodecYaml
|
from .codecs import VALIDATORS, OpenAPICodecJson, OpenAPICodecYaml
|
||||||
|
from .openapi import Swagger
|
||||||
|
from .utils import filter_none
|
||||||
|
|
||||||
|
|
||||||
class _SpecRenderer(BaseRenderer):
|
class _SpecRenderer(BaseRenderer):
|
||||||
@@ -74,23 +77,55 @@ class _UIRenderer(BaseRenderer):
|
|||||||
def set_context(self, renderer_context, swagger):
|
def set_context(self, renderer_context, swagger):
|
||||||
renderer_context['title'] = swagger.info.title
|
renderer_context['title'] = swagger.info.title
|
||||||
renderer_context['version'] = swagger.info.version
|
renderer_context['version'] = swagger.info.version
|
||||||
renderer_context['swagger_settings'] = json.dumps(self.get_swagger_ui_settings())
|
|
||||||
renderer_context['redoc_settings'] = json.dumps(self.get_redoc_settings())
|
|
||||||
renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config())
|
renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config())
|
||||||
renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
|
renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
|
||||||
renderer_context.update(self.get_auth_urls())
|
renderer_context.update(self.get_auth_urls())
|
||||||
|
|
||||||
def get_auth_urls(self):
|
def resolve_url(self, to):
|
||||||
urls = {}
|
if isinstance(to, Promise):
|
||||||
if swagger_settings.LOGIN_URL is not None:
|
to = str(to)
|
||||||
urls['LOGIN_URL'] = resolve_url(swagger_settings.LOGIN_URL)
|
|
||||||
if swagger_settings.LOGOUT_URL is not None:
|
|
||||||
urls['LOGOUT_URL'] = resolve_url(swagger_settings.LOGOUT_URL)
|
|
||||||
|
|
||||||
return urls
|
if to is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
args, kwargs = None, None
|
||||||
|
if not isinstance(to, six.string_types):
|
||||||
|
if len(to) > 2:
|
||||||
|
to, args, kwargs = to
|
||||||
|
elif len(to) == 2:
|
||||||
|
to, kwargs = to
|
||||||
|
|
||||||
|
args = args or ()
|
||||||
|
kwargs = kwargs or {}
|
||||||
|
|
||||||
|
return resolve_url(to, *args, **kwargs)
|
||||||
|
|
||||||
|
def get_auth_urls(self):
|
||||||
|
urls = {
|
||||||
|
'LOGIN_URL': self.resolve_url(swagger_settings.LOGIN_URL),
|
||||||
|
'LOGOUT_URL': self.resolve_url(swagger_settings.LOGOUT_URL),
|
||||||
|
}
|
||||||
|
|
||||||
|
return filter_none(urls)
|
||||||
|
|
||||||
|
def get_oauth2_config(self):
|
||||||
|
data = swagger_settings.OAUTH2_CONFIG
|
||||||
|
assert isinstance(data, dict), "OAUTH2_CONFIG must be a dict"
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
class SwaggerUIRenderer(_UIRenderer):
|
||||||
|
"""Renders a swagger-ui web interface for schema browisng."""
|
||||||
|
template = 'drf-yasg/swagger-ui.html'
|
||||||
|
format = 'swagger'
|
||||||
|
|
||||||
|
def set_context(self, renderer_context, swagger):
|
||||||
|
super(SwaggerUIRenderer, self).set_context(renderer_context, swagger)
|
||||||
|
renderer_context['swagger_settings'] = json.dumps(self.get_swagger_ui_settings())
|
||||||
|
|
||||||
def get_swagger_ui_settings(self):
|
def get_swagger_ui_settings(self):
|
||||||
data = {
|
data = {
|
||||||
|
'url': self.resolve_url(swagger_settings.SPEC_URL),
|
||||||
'operationsSorter': swagger_settings.OPERATIONS_SORTER,
|
'operationsSorter': swagger_settings.OPERATIONS_SORTER,
|
||||||
'tagsSorter': swagger_settings.TAGS_SORTER,
|
'tagsSorter': swagger_settings.TAGS_SORTER,
|
||||||
'docExpansion': swagger_settings.DOC_EXPANSION,
|
'docExpansion': swagger_settings.DOC_EXPANSION,
|
||||||
@@ -102,40 +137,39 @@ class _UIRenderer(BaseRenderer):
|
|||||||
'showCommonExtensions': swagger_settings.SHOW_COMMON_EXTENSIONS,
|
'showCommonExtensions': swagger_settings.SHOW_COMMON_EXTENSIONS,
|
||||||
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
||||||
'supportedSubmitMethods': swagger_settings.SUPPORTED_SUBMIT_METHODS,
|
'supportedSubmitMethods': swagger_settings.SUPPORTED_SUBMIT_METHODS,
|
||||||
|
'displayOperationId': swagger_settings.DISPLAY_OPERATION_ID,
|
||||||
}
|
}
|
||||||
data = {k: v for k, v in data.items() if v is not None}
|
|
||||||
|
data = filter_none(data)
|
||||||
if swagger_settings.VALIDATOR_URL != '':
|
if swagger_settings.VALIDATOR_URL != '':
|
||||||
data['validatorUrl'] = swagger_settings.VALIDATOR_URL
|
data['validatorUrl'] = self.resolve_url(swagger_settings.VALIDATOR_URL)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def get_redoc_settings(self):
|
|
||||||
data = {
|
|
||||||
'lazyRendering': redoc_settings.LAZY_RENDERING,
|
|
||||||
'hideHostname': redoc_settings.HIDE_HOSTNAME,
|
|
||||||
'expandResponses': redoc_settings.EXPAND_RESPONSES,
|
|
||||||
'pathInMiddle': redoc_settings.PATH_IN_MIDDLE,
|
|
||||||
}
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
def get_oauth2_config(self):
|
|
||||||
data = swagger_settings.OAUTH2_CONFIG
|
|
||||||
assert isinstance(data, dict), "OAUTH2_CONFIG must be a dict"
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
class SwaggerUIRenderer(_UIRenderer):
|
|
||||||
"""Renders a swagger-ui web interface for schema browisng.
|
|
||||||
Also requires :class:`.OpenAPIRenderer` as an available renderer on the same view.
|
|
||||||
"""
|
|
||||||
template = 'drf-yasg/swagger-ui.html'
|
|
||||||
format = 'swagger'
|
|
||||||
|
|
||||||
|
|
||||||
class ReDocRenderer(_UIRenderer):
|
class ReDocRenderer(_UIRenderer):
|
||||||
"""Renders a ReDoc web interface for schema browisng.
|
"""Renders a ReDoc web interface for schema browisng."""
|
||||||
Also requires :class:`.OpenAPIRenderer` as an available renderer on the same view.
|
|
||||||
"""
|
|
||||||
template = 'drf-yasg/redoc.html'
|
template = 'drf-yasg/redoc.html'
|
||||||
format = 'redoc'
|
format = 'redoc'
|
||||||
|
|
||||||
|
def set_context(self, renderer_context, swagger):
|
||||||
|
super(ReDocRenderer, self).set_context(renderer_context, swagger)
|
||||||
|
renderer_context['redoc_settings'] = json.dumps(self.get_redoc_settings())
|
||||||
|
|
||||||
|
def get_redoc_settings(self):
|
||||||
|
data = {
|
||||||
|
'url': self.resolve_url(redoc_settings.SPEC_URL),
|
||||||
|
'lazyRendering': redoc_settings.LAZY_RENDERING,
|
||||||
|
'hideHostname': redoc_settings.HIDE_HOSTNAME,
|
||||||
|
'expandResponses': redoc_settings.EXPAND_RESPONSES,
|
||||||
|
'pathInMiddlePanel': redoc_settings.PATH_IN_MIDDLE,
|
||||||
|
'nativeScrollbars': redoc_settings.NATIVE_SCROLLBARS,
|
||||||
|
'requiredPropsFirst': redoc_settings.REQUIRED_PROPS_FIRST,
|
||||||
|
}
|
||||||
|
|
||||||
|
return filter_none(data)
|
||||||
|
|
||||||
|
|
||||||
|
class ReDocOldRenderer(ReDocRenderer):
|
||||||
|
"""Renders a ReDoc 1.x.x web interface for schema browisng."""
|
||||||
|
template = 'drf-yasg/redoc-old.html'
|
||||||
@@ -3,19 +3,26 @@
|
|||||||
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
var currentPath = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||||
var specURL = currentPath + '?format=openapi';
|
var specURL = currentPath + '?format=openapi';
|
||||||
var redoc = document.createElement("redoc");
|
var redoc = document.createElement("redoc");
|
||||||
redoc.setAttribute("spec-url", specURL);
|
|
||||||
|
|
||||||
var redocSettings = JSON.parse(document.getElementById('redoc-settings').innerHTML);
|
var redocSettings = JSON.parse(document.getElementById('redoc-settings').innerHTML);
|
||||||
if (redocSettings.lazyRendering) {
|
if (redocSettings.url) {
|
||||||
redoc.setAttribute("lazy-rendering", '');
|
specURL = redocSettings.url;
|
||||||
|
delete redocSettings.url;
|
||||||
}
|
}
|
||||||
if (redocSettings.pathInMiddle) {
|
redoc.setAttribute("spec-url", specURL);
|
||||||
redoc.setAttribute("path-in-middle-panel", '');
|
|
||||||
|
function camelToKebab(str) {
|
||||||
|
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
||||||
}
|
}
|
||||||
if (redocSettings.hideHostname) {
|
|
||||||
redoc.setAttribute("hide-hostname", '');
|
for (var p in redocSettings) {
|
||||||
|
if (redocSettings.hasOwnProperty(p)) {
|
||||||
|
if (redocSettings[p] !== null && redocSettings[p] !== undefined && redocSettings[p] !== false) {
|
||||||
|
redoc.setAttribute(camelToKebab(p), redocSettings[p].toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
redoc.setAttribute("expand-responses", redocSettings.expandResponses);
|
|
||||||
document.body.appendChild(redoc);
|
document.body.appendChild(redoc);
|
||||||
|
|
||||||
function hideEmptyVersion() {
|
function hideEmptyVersion() {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/*!
|
||||||
|
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
||||||
|
* -------------------------------------------------------------
|
||||||
|
* Version: "1.22.2"
|
||||||
|
* Repo: https://github.com/Rebilly/ReDoc
|
||||||
|
*/
|
||||||
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}(),function(){try{return require("jquery")}catch(e){}}()):"function"==typeof define&&define.amd?define("Redoc",["esprima","jquery"],t):"object"==typeof exports?exports.Redoc=t(function(){try{return require("esprima")}catch(e){}}(),function(){try{return require("jquery")}catch(e){}}()):e.Redoc=t(e.esprima,e.jquery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=250)}([function(e,t,n){var r=n(5),o=n(8),i=n(25),a=n(20),s=n(58),l=function(e,t,n){var u,c,p,d,f=e&l.F,h=e&l.G,g=e&l.S,m=e&l.P,y=e&l.B,v=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});h&&(n=t);for(u in n)c=!f&&v&&void 0!==v[u],p=(c?v:n)[u],d=y&&c?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,v&&a(v,u,p,e&l.U),b[u]!=p&&i(b,u,d),m&&_[u]!=p&&(_[u]=p)};r.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){if(!Do){var e=jo.Symbol;if(e&&e.iterator)Do=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(Do=r)}}return Do}function o(e){Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function i(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function a(e){if("string"==typeof e)return e;if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function s(e){return"function"==typeof e&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function l(e,t){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+a(e)+" as constructor");if("function"==typeof e)return e;if(Array.isArray(e)){var n=e,r=n.length-1,o=e[r];if("function"!=typeof o)throw new Error("Last position of Class method array must be Function in key "+t+" was '"+a(o)+"'");if(r!=o.length)throw new Error("Number of annotations ("+r+") does not match number of arguments ("+o.length+") in the function: "+a(o));for(var i=[],l=0,u=n.length-1;l<u;l++){var c=[];i.push(c);var p=n[l];if(Array.isArray(p))for(var d=0;d<p.length;d++)c.push(s(p[d]));else"function"==typeof p?c.push(s(p)):c.push(p)}return Fo.defineMetadata("parameters",i,o),o}throw new Error("Only Function or Array is supported in Class definition for key '"+t+"' is '"+a(e)+"'")}function u(e){var t=l(e.hasOwnProperty("constructor")?e.constructor:void 0,"constructor"),n=t.prototype;if(e.hasOwnProperty("extends")){if("function"!=typeof e.extends)throw new Error("Class definition 'extends' property must be a constructor function was: "+a(e.extends));t.prototype=n=Object.create(e.extends.prototype)}for(var r in e)"extends"!==r&&"prototype"!==r&&e.hasOwnProperty(r)&&(n[r]=l(e[r],r));this&&this.annotations instanceof Array&&Fo.defineMetadata("annotations",this.annotations,t);var o=t.name;return o&&"constructor"!==o||(t.overriddenName="class"+Lo++),t}function c(e,t,n,r){function o(e){if(!Fo||!Fo.getOwnMetadata)throw"reflect-metadata shim is required when using class decorators";if(this instanceof o)return i.call(this,e),this;var t=new o(e),n="function"==typeof this&&Array.isArray(this.annotations)?this.annotations:[];n.push(t);var a=function(e){var n=Fo.getOwnMetadata("annotations",e)||[];return n.push(t),Fo.defineMetadata("annotations",n,e),e};return a.annotations=n,a.Class=u,r&&r(a),a}var i=p(t);return n&&(o.prototype=Object.create(n.prototype)),o.prototype.toString=function(){return"@"+e},o.annotationCls=o,o}function p(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e){var r=e.apply(void 0,t);for(var o in r)this[o]=r[o]}}}function d(e,t,n){function r(){function e(e,t,n){for(var r=Fo.getOwnMetadata("parameters",e)||[];r.length<=n;)r.push(null);return r[n]=r[n]||[],r[n].push(i),Fo.defineMetadata("parameters",r,e),e}for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this instanceof r)return o.apply(this,t),this;var i=new(r.bind.apply(r,[void 0].concat(t)));return e.annotation=i,e}var o=p(t);return n&&(r.prototype=Object.create(n.prototype)),r.prototype.toString=function(){return"@"+e},r.annotationCls=r,r}function f(e,t,n){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this instanceof r)return o.aLine truncated
|
||||||
|
//# sourceMappingURL=redoc.min.map
|
||||||
+16
-28
@@ -1,10 +1,10 @@
|
|||||||
/*!
|
/*!
|
||||||
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
||||||
* -------------------------------------------------------------
|
* -------------------------------------------------------------
|
||||||
* Version: "2.0.0-alpha.32"
|
* Version: "2.0.0-alpha.38"
|
||||||
* Repo: https://github.com/Rebilly/ReDoc
|
* Repo: https://github.com/Rebilly/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(__WEBPACK_EXTERNAL_MODULE__143__,__WEBPACK_EXTERNAL_MODULE__243__){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=157)}([function(e,t,n){"use strict";e.exports=n(201)},function(e,t,n){"use strict";n.d(t,"d",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c});
|
!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(__WEBPACK_EXTERNAL_MODULE__132__,__WEBPACK_EXTERNAL_MODULE__233__){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=147)}([function(e,t,n){"use strict";e.exports=n(191)},function(e,t,n){"use strict";n.d(t,"d",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c});
|
||||||
/*! *****************************************************************************
|
/*! *****************************************************************************
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
@@ -19,7 +19,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|||||||
See the Apache Version 2.0 License for specific language governing permissions
|
See the Apache Version 2.0 License for specific language governing permissions
|
||||||
and limitations under the License.
|
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<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=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 s(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 l(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]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}},function(e,t,n){"use strict";var r=n(46),o=n(22),i=n(23),a=n(73),s=(n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),"clike");function l(e,t){var n=a.languages[t];return n||(n=a.languages[function(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||s}(t)]),a.highlight(e,n)}var c=n(67),u=n(17);function p(e){return function(t,n,r){r.value=function(e,t){var n,r,o,i=null,a=0,s=function(){a=(new Date).getTime(),i=null,o=e.apply(n,r),i||(n=r=null)};return function(){var l=(new Date).getTime(),c=t-(l-a);return n=this,r=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),a=l,o=e.apply(n,r),i||(n=r=null)):i||(i=setTimeout(s,c)),o}}(r.value,e)}}var f=n(38),d=n(1),h={};function m(e,t,n){if("function"==typeof n.value)return function(e,t,n){if(!n.value||n.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");var r="_memoized_"+t,o=n.value;return e[r]=h,d.a({},n,{value:function(){return this[r]===h&&(this[r]=o.call(this)),this[r]}})}(e,t,n);if("function"==typeof n.get)return function(e,t,n){var r="_memoized_"+t,o=n.get;return e[r]=h,d.a({},n,{get:function(){return this[r]===h&&(this[r]=o.call(this)),this[r]}})}(e,t,n);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(n.value)+" instead")}n.d(t,"b",function(){return r.a}),n.d(t,"p",function(){return o.j}),n.d(t,"h",function(){return o.d}),n.d(t,"n",function(){return o.h}),n.d(t,"g",function(){return o.c}),n.d(t,"e",function(){return o.b}),n.d(t,"o",function(){return o.i}),n.d(t,"l",function(){return o.f}),n.d(t,"q",function(){return o.k}),n.d(t,"m",function(){return o.g}),n.d(t,"k",function(){return o.e}),n.d(t,"B",function(){return o.o}),n.d(t,"v",function(){return o.l}),n.d(t,"w",function(){return o.m}),n.d(t,"y",function(){return o.n}),n.d(t,!1,function(){return o.a}),n.d(t,"t",function(){return i.e}),n.d(t,"s",function(){return i.d}),n.d(t,"f",function(){return i.b}),n.d(t,!1,function(){}),n.d(t,!1,function(){return i.c}),n.d(t,"d",function(){return i.a}),n.d(t,!1,function(){return i.f}),n.d(t,"A",function(){return i.h}),n.d(t,!1,function(){}),n.d(t,!1,function(){return i.g}),n.d(t,!1,function(){}),n.d(t,"i",function(){return l}),n.d(t,"r",function(){return c.a}),n.d(t,!1,function(){}),n.d(t,"a",function(){return u.a}),n.d(t,"z",function(){return u.d}),n.d(t,"j",function(){return u.b}),n.d(t,"x",function(){return u.c}),n.d(t,"c",function(){return p}),n.d(t,!1,function(){return f.a}),n.d(t,!1,function(){return f.b}),n.d(t,"u",function(){return m})},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return Qt}),n.d(t,"b",functionLine truncated
|
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<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=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 s(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 l(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]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}},function(e,t,n){"use strict";var r=n(48),o=n(11),i=n(19),a=n(63),s=(n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),"clike");function l(e,t){void 0===t&&(t=s),t=t.toLowerCase();var n=a.languages[t];return n||(n=a.languages[function(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||s}(t)]),a.highlight(e,n)}var c=n(60),u=n(16);function p(e){return function(t,n,r){r.value=function(e,t){var n,r,o,i=null,a=0,s=function(){a=(new Date).getTime(),i=null,o=e.apply(n,r),i||(n=r=null)};return function(){var l=(new Date).getTime(),c=t-(l-a);return n=this,r=arguments,c<=0||c>t?(i&&(clearTimeout(i),i=null),a=l,o=e.apply(n,r),i||(n=r=null)):i||(i=setTimeout(s,c)),o}}(r.value,e)}}n(33);var f=n(1),d={};function h(e,t,n){if("function"==typeof n.value)return function(e,t,n){if(!n.value||n.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");var r="_memoized_"+t,o=n.value;return e[r]=d,f.a({},n,{value:function(){return this[r]===d&&(this[r]=o.call(this)),this[r]}})}(e,t,n);if("function"==typeof n.get)return function(e,t,n){var r="_memoized_"+t,o=n.get;return e[r]=d,f.a({},n,{get:function(){return this[r]===d&&(this[r]=o.call(this)),this[r]}})}(e,t,n);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(n.value)+" instead")}n.d(t,"b",function(){return r.a}),n.d(t,"q",function(){return o.k}),n.d(t,"j",function(){return o.e}),n.d(t,"o",function(){return o.i}),n.d(t,"i",function(){return o.d}),n.d(t,"g",function(){return o.c}),n.d(t,"p",function(){return o.j}),n.d(t,"m",function(){return o.g}),n.d(t,"r",function(){return o.l}),n.d(t,"n",function(){return o.h}),n.d(t,"l",function(){return o.f}),n.d(t,"C",function(){return o.r}),n.d(t,"w",function(){return o.m}),n.d(t,"x",function(){return o.n}),n.d(t,"y",function(){return o.o}),n.d(t,"c",function(){return o.a}),n.d(t,"d",function(){return o.b}),n.d(t,"B",function(){return o.p}),n.d(t,"u",function(){return i.e}),n.d(t,"t",function(){return i.d}),n.d(t,"h",function(){return i.b}),n.d(t,"f",function(){return i.a}),n.d(t,"A",function(){return i.h}),n.d(t,"k",function(){return l}),n.d(t,"s",function(){return c.a}),n.d(t,"a",function(){return u.a}),n.d(t,"z",function(){return u.b}),n.d(t,"e",function(){return p}),n.d(t,"v",function(){return h})},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return Qt}),n.d(t,"b",function(){return Ut}),n.d(t,"o",function(){return Nt}),n.d(t,"g",function(){return De}),n.d(t,"n",function(){return y}),n.d(t,"k",function(){return ne}),n.d(t,"i",function(){return Qe}),n.d(t,"j",function(){return Re}),n.dLine truncated
|
||||||
/*! *****************************************************************************
|
/*! *****************************************************************************
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||||
@@ -34,14 +34,14 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|||||||
See the Apache Version 2.0 License for specific language governing permissions
|
See the Apache Version 2.0 License for specific language governing permissions
|
||||||
and limitations under the License.
|
and limitations under the License.
|
||||||
***************************************************************************** */
|
***************************************************************************** */
|
||||||
var 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])};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=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(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 l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var c={},u={};function p(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in st(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function f(e,t){return function(){var n,r=function(r,o,i,s){if(!0===s)return t(r,o,i,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var l=r.__mobxDecorators;st(r,"__mobxDecorators",a({},l))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?c:u;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return p(this),this[e]},set:function(t){p(this),this[e]=t}})}(o,e)};return function(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}(arguments)?(n=Ge,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function d(){return!!vt.spyListeners.length}function h(e){if(vt.spyListeners.length)for(var t=vt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function m(e){h(a({},e,{spyReportStart:!0}))}var g={spyReportEnd:!0};function v(e){h(e?a({},e,{spyReportEnd:!0}):g)}function y(e){return vt.spyListeners.push(e),rt(function(){vt.spyListeners=vt.spyListeners.filter(function(t){return t!==e})})}function b(e,t){var n=function(){return w(e,t,this,arguments)};return n.isMobxAction=!0,n}function w(e,t,n,r){var o=function(e,t,n,r){var o=d()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];m({type:"action",name:e,object:n,arguments:s})}var c=Lt();Et();var u=k(!0);return{prevDerivation:c,prevAllowStateChanges:u,notifySpy:o,startTime:i}}(e,0,n,r);try{return t.apply(n,r)}finally{!function(e){_(e.prevAllowStateChanges),St(),Mt(e.prevDerivation),e.notifySpy&&v({time:Date.now()-e.startTime})}(o)}}function x(e,t){var n,r=k(e);try{n=t()}finally{_(r)}return n}function k(e){var t=vt.allowStateChanges;return vt.allowStateChanges=e,t}function _(e){vt.allowStateChanges=e}function E(){et(!1)}function S(e){return function(t,n,r){if(r){if(r.value)return{value:b(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return b(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){st(this,n,O(e,t))}})}}(e).apply(this,arguments)}}var O=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?b(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?b(e,t):1===arguments.length&&"string"==typeof e?S(e):!0!==r?S(t).apply(null,arguments):void(e[t]=b(e.name||t,n.value))};function C(e,t,n){st(e,t,b(t,n.bind(e)))}O.bound=function(e,t,n,r){return!0===r?(C(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return C(this,t,n.value||n.initializer.call(this)),this[t]},set:E}:{enumerable:!1,configurable:!0,set:function(e){C(this,t,e)},get:function(){}}};var T=Object.prototype.toString;function A(e,t){return P(e,t)}function P(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=j(e),t=j(t);var o=T.call(e);if(o!==T.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var l=n.length;for(;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!P(e[l],t[l],n,r))return!1}else{var c,u=Object.keys(e);if(l=u.length,Object.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!R(t,c)||!P(e[c],Line truncated
|
var 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])};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=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function s(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 l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var c={},u={};function p(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in st(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function f(e,t){return function(){var n,r=function(r,o,i,s){if(!0===s)return t(r,o,i,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var l=r.__mobxDecorators;st(r,"__mobxDecorators",a({},l))}return r.__mobxDecorators[o]={prop:o,propertyCreator:t,descriptor:i,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?c:u;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return p(this),this[e]},set:function(t){p(this),this[e]=t}})}(o,e)};return function(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}(arguments)?(n=Ge,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function d(){return!!vt.spyListeners.length}function h(e){if(vt.spyListeners.length)for(var t=vt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function m(e){h(a({},e,{spyReportStart:!0}))}var g={spyReportEnd:!0};function v(e){h(e?a({},e,{spyReportEnd:!0}):g)}function y(e){return vt.spyListeners.push(e),rt(function(){vt.spyListeners=vt.spyListeners.filter(function(t){return t!==e})})}function b(e,t){var n=function(){return w(e,t,this,arguments)};return n.isMobxAction=!0,n}function w(e,t,n,r){var o=function(e,t,n,r){var o=d()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];m({type:"action",name:e,object:n,arguments:s})}var c=Lt();_t();var u=k(!0);return{prevDerivation:c,prevAllowStateChanges:u,notifySpy:o,startTime:i}}(e,0,n,r);try{return t.apply(n,r)}finally{!function(e){E(e.prevAllowStateChanges),St(),Mt(e.prevDerivation),e.notifySpy&&v({time:Date.now()-e.startTime})}(o)}}function x(e,t){var n,r=k(e);try{n=t()}finally{E(r)}return n}function k(e){var t=vt.allowStateChanges;return vt.allowStateChanges=e,t}function E(e){vt.allowStateChanges=e}function _(){et(!1)}function S(e){return function(t,n,r){if(r){if(r.value)return{value:b(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return b(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){st(this,n,O(e,t))}})}}(e).apply(this,arguments)}}var O=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?b(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?b(e,t):1===arguments.length&&"string"==typeof e?S(e):!0!==r?S(t).apply(null,arguments):void(e[t]=b(e.name||t,n.value))};function C(e,t,n){st(e,t,b(t,n.bind(e)))}O.bound=function(e,t,n,r){return!0===r?(C(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return C(this,t,n.value||n.initializer.call(this)),this[t]},set:_}:{enumerable:!1,configurable:!0,set:function(e){C(this,t,e)},get:function(){}}};var T=Object.prototype.toString;function A(e,t){return P(e,t)}function P(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,n,r){e=I(e),t=I(t);var o=T.call(e);if(o!==T.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var l=n.length;for(;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),i){if((l=e.length)!==t.length)return!1;for(;l--;)if(!P(e[l],t[l],n,r))return!1}else{var c,u=Object.keys(e);if(l=u.length,Object.keys(t).length!==l)return!1;for(;l--;)if(c=u[l],!R(t,c)||!P(e[c],Line truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(220),o=n(221),i=n(124);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(u(t),e=s(e,t<0?0:0|d(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=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 z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(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;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return $(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return $(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return $(z(t),e,n,r)}function _(e,t,n,r){return $(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function E(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;o<n;){var i,a,s,l,c=e[o],u=null,p=c>239?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],Line truncated
|
var r=n(210),o=n(211),i=n(113);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(u(t),e=s(e,t<0?0:0|d(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=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 z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(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;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var p=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){p=!1;break}if(p)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return $(B(t,e.length-n),e,n,r)}function w(e,t,n,r){return $(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return w(e,t,n,r)}function k(e,t,n,r){return $(z(t),e,n,r)}function E(e,t,n,r){return $(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(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;o<n;){var i,a,s,l,c=e[o],u=null,p=c>239?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],Line truncated
|
||||||
/*!
|
/*!
|
||||||
Copyright (c) 2017 Jed Watson.
|
Copyright (c) 2017 Jed Watson.
|
||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
@@ -52,55 +52,43 @@ var r=n(220),o=n(221),i=n(124);function a(){return l.TYPED_ARRAY_SUPPORT?2147483
|
|||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return u});var r=n(1),o=n(3),i=n(17),a=n(20),s=n(2),l=n(45),c="data-section-id",u=function(){function e(e,t){var n=this;this.scroll=t,this.activeItemIdx=-1,this.sideBarOpened=!1,this.updateOnScroll=function(e){for(var t=e?1:-1,r=n.activeItemIdx;(-1!==r||e)&&!(r>=n.flatItems.length-1&&e);){if(e){var o=n.getElementAt(r+1);if(n.scroll.isElementBellow(o))break}else{o=n.getElementAt(r);if(n.scroll.isElementAbove(o))break}r+=t}n.activate(n.flatItems[r],!0,!0)},this.updateOnHash=function(e){return void 0===e&&(e=a.a.hash),!!e&&(e=Object(s.x)(e),(t=n.flatItems.find(function(t){return t.id===e}))?n.activateAndScroll(t,!1):n.scroll.scrollIntoViewBySelector("["+c+'="'+e+'"]'),void 0!==t);var t},this.getItemById=function(e){return n.flatItems.find(function(t){return t.id===e})},this.items=e.operationGroups,this.flatItems=Object(s.f)(this.items||[],"items"),this.flatItems.forEach(function(e,t){return e.absoluteIdx=t}),this.subscribe()}return e.updateOnHash=function(e,t){void 0===e&&(e=a.a.hash),e&&t.scrollIntoViewBySelector("["+c+'="'+Object(s.x)(e)+'"]')},e.prototype.subscribe=function(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=a.a.subscribe(this.updateOnHash)},e.prototype.toggleSidebar=function(){this.sideBarOpened=!this.sideBarOpened},e.prototype.closeSidebar=function(){this.sideBarOpened=!1},e.prototype.getElementAt=function(e){var t=this.flatItems[e];return t&&Object(i.d)("["+c+'="'+t.id+'"]')||null},Object.defineProperty(e.prototype,"activeItem",{get:function(){return this.flatItems[this.activeItemIdx]||void 0},enumerable:!0,configurable:!0}),e.prototype.activate=function(e,t,n){if(void 0===t&&(t=!0),void 0===n&&(n=!1),(this.activeItem&&this.activeItem.id)!==(e&&e.id))if(this.deactivate(this.activeItem),e){if(!(e.depth<=l.a))for(this.activeItemIdx=e.absoluteIdx,t&&a.a.update(e.id,n);void 0!==e;)e.activate(),e=e.parent}else a.a.update("",n)},e.prototype.deactivate=function(e){for(;void 0!==e;)e.deactivate(),e=e.parent},e.prototype.activateAndScroll=function(e,t,n){var r=e&&this.getItemById(e.id)||e;this.activate(r,t,n),this.scrollToActive(),r&&r.items.length||this.closeSidebar()},e.prototype.scrollToActive=function(){this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))},e.prototype.dispose=function(){this._unsubscribe(),this._hashUnsubscribe()},r.c([o.l],e.prototype,"activeItemIdx",void 0),r.c([o.l],e.prototype,"sideBarOpened",void 0),r.c([o.d],e.prototype,"toggleSidebar",null),r.c([o.d],e.prototype,"closeSidebar",null),r.c([o.d],e.prototype,"activate",null),r.c([o.d.bound],e.prototype,"activateAndScroll",null),e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(1),o=n(55),i=n(72),a=n(2),s="hashchange";var l=new(function(){function e(){var e=this;this.emit=function(){e._emiter.emit(s,e.hash)},this._emiter=new i.EventEmitter,this.bind()}return Object.defineProperty(e.prototype,"hash",{get:function(){return a.a?window.location.hash:""},enumerable:!0,configurable:!0}),e.prototype.subscribe=function(e){var t=this._emiter.addListener(s,e);return function(){return t.removeListener(s,e)}},e.prototype.bind=function(){a.a&&window.addEventListener("hashchange",this.emit,!1)},e.prototype.dispose=function(){a.a&&window.removeEventListener("hashchange",this.emit)},e.prototype.update=function(e,t){void 0===t&&(t=!1),null==e||function(e,t){return e===t||"#"+e===t||e==="#"+t}(e,this.hash)||(t?a.a&&window.history.replaceState(null,"",window.location.href.split("#")[0]+"#"+e):a.a&&window.history.pushState(null,"",window.location.href.split("#")[0]+"#"+e))},r.c([o.bind,o.debounce],e.prototype,"update",null),e}())},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";n.d(t,"j",function(){return l}),n.d(t,"d",function(){return c}),n.d(t,"h",function(){return p}),n.d(t,"c",function(){return f}),n.d(t,"b",function(){return h}),n.d(t,"i",function(){return m}),n.d(t,"f",function(){return g}),n.d(t,"k",function(){return v}),n.d(t,"g",function(){return y}),n.d(t,"e",function(){return b}),n.d(t,"o",function(){return w}),n.d(t,"l",function(){return x}),n.d(t,"m",function(){return k}),n.d(t,"n",function(){return _}),n.d(t,"a",function(){return E});var r=n(1),o=n(68),i=n(17),a=n(23);function s(e){return"string"==typeof e&&/\dxx/i.test(e)}function l(e){return"default"===e||Object(a.c)(e)||s(e)}function c(e,t){if(void 0===t&&(t=!1),"default"===e)return t?"error"Line truncated
|
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c}),n.d(t,"c",function(){return p}),n.d(t,"a",function(){return f}),n.d(t,"f",function(){return d}),n.d(t,"h",function(){return m}),n.d(t,"g",function(){return g});var r=n(1),o=n(138),i=n.n(o),a=n(15);function s(e,t){for(var n=[],r=0;r<e.length-1;r++)n.push(t(e[r],!1));return 0!==e.length&&n.push(t(e[e.length-1],!0)),n}function l(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r],r,e));return n}function c(e,t){var n=[],r=function(e){for(var o=0,i=e;o<i.length;o++){var a=i[o];n.push(a),a[t]&&r(a[t])}};return r(e),n}function u(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function p(e){return!isNaN(parseFloat(e))&&isFinite(e)}function f(e,t,n){var r=new RegExp("(^|\\n)#\\s?"+t+"\\s*\\n","i"),o=new RegExp("((\\n|^)#\\s*"+t+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");return r.test(e)?e.replace(o,"$1\n\n"+n+"\n$4"):""+e+(""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n")+"# "+t+"\n\n"+n}var d=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!t.length)return e;var r=t.shift();return void 0===r?e:(h(e)&&h(r)&&Object.keys(r).forEach(function(t){h(r[t])?(e[t]||(e[t]={}),d(e[t],r[t])):e[t]=r[t]}),d.apply(void 0,[e].concat(t)))},h=function(e){return function(e){return null!==e&&"object"==typeof e}(e)&&!Array.isArray(e)};function m(e){return i()(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/\--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function g(e,t){var n;if(t.startsWith("//"))n=""+Object(a.parse)(e).protocol+t;else if(function(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}(t))n=t;else if(t.startsWith("/")){var o=Object(a.parse)(e);n=Object(a.format)(r.a({},o,{pathname:t}))}else n=u(e)+"/"+t;return u(n)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(192)},function(e,t,n){"use strict";var r=n(268);function o(e,t,n){if(3===arguments.length)return o.set(e,t,n);if(2===arguments.length)return o.get(e,t);var r=o.bind(o,e);for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i].bind(r,e));return r}e.exports=o,o.get=function(e,t){for(var n=Array.isArray(t)?t:o.parse(t),r=0;r<n.length;++r){var i=n[r];if(!("object"==typeof e&&i in e))throw new Error("Invalid reference token: "+i);e=e[i]}return e},o.set=function(e,t,n){for(var r=Array.isArray(t)?t:o.parse(t),i=r[0],a=0;a<r.length-1;++a){var s=r[a];"-"===s&&Array.isArray(e)&&(s=e.length),i=r[a+1],s in e||(i.match(/^(\d+|-)$/)?e[s]=[]:e[s]={}),e=e[s]}return"-"===i&&Array.isArray(e)&&(i=e.length),e[i]=n,this},o.remove=function(e,t){var n=Array.isArray(t)?t:o.parse(t),r=n[n.length-1];if(void 0===r)throw new Error('Invalid JSON pointer for remove: "'+t+'"');var i=o.get(e,n.slice(0,-1));if(Array.isArray(i)){var a=+r;if(""===r&&isNaN(a))throw new Error('Invalid array index: "'+r+'"');Array.prototype.splice.call(i,a,1)}else delete i[r]},o.dict=function(e,t){var n={};return o.walk(e,function(e,t){n[t]=e},t),n},o.walk=function(e,t,n){var i=[];n=n||function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t},function e(a){r(a,function(r,a){i.push(String(a)),n(r)?e(r):t(r,o.compile(i)),i.pop()})}(e)},o.has=function(e,t){try{o.get(e,t)}catch(e){return!1}return!0},o.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")},o.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},o.parse=function(e){if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(o.unescape)},o.compile=function(e){return 0===e.length?"":"/"+e.map(o.escape).join("/")}},function(e,t,n){var r=n(18),o=n(91),i=n(68),a=Object.defineProperty;t.f=n(23)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(35)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(9),o=n(12),i=n(29),a=n(28),s=n(31),l=function(e,t,n){var c,u,p,f,d=e&l.F,h=e&l.G,m=e&l.S,g=e&l.P,v=e&l.B,y=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?oLine truncated
|
||||||
/*!
|
|
||||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/var r=n(218);function o(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==o(e)&&("function"==typeof(t=e.constructor)&&(!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,o=/: */g,i=/zoo|gra/,a=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,l=/ +\s*(?![^(]*[)])/g,c=/ *[\0] */g,u=/,\r+?/g,p=/([\t\r\n ])*\f?&/g,f=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,h=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,g=/:(read-only)/g,v=/\s+(?=[{\];=:>])/g,y=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,x=/([^\(])(:+) */g,k=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,S=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,A="-webkit-",P="-moz-",j="-ms-",R=59,I=125,N=123,L=40,M=41,D=91,F=93,U=10,B=13,z=9,$=64,W=32,q=38,H=45,Y=95,V=42,Q=44,X=58,G=39,K=34,J=47,Z=62,ee=43,te=126,ne=0,re=12,oe=11,ie=107,ae=109,se=115,le=112,ce=111,ue=105,pe=99,fe=100,de=112,he=1,me=1,ge=0,ve=1,ye=1,be=1,we=0,xe=0,ke=0,_e=[],Ee=[],Se=0,Oe=null,Ce=-2,Te=-1,Ae=0,Pe=1,je=2,Re=3,Ie=0,Ne=1,Le="",Me="",De="";function Fe(e,t,o,i,a){for(var s,l,u=0,p=0,f=0,d=0,v=0,y=0,b=0,w=0,k=0,E=0,S=0,O=0,C=0,T=0,Y=0,we=0,Ee=0,Oe=0,Ce=0,Te=o.length,Be=Te-1,Ye="",Ve="",Qe="",Xe="",Ge="",Ke="";Y<Te;){if(b=o.charCodeAt(Y),Y===Be&&p+d+f+u!==0&&(0!==p&&(b=p===J?U:J),d=f=u=0,Te++,Be++),p+d+f+u===0){if(Y===Be&&(we>0&&(Ve=Ve.replace(r,"")),Ve.trim().length>0)){switch(b){case W:case z:case R:case B:case U:break;default:Ve+=o.charAt(Y)}b=R}if(1===Ee)switch(b){case N:case I:case R:case K:case G:case L:case M:case Q:Ee=0;case z:case B:case U:case W:break;default:for(Ee=0,Ce=Y,v=b,Y--,b=R;Ce<Te;)switch(o.charCodeAt(Ce++)){case U:case B:case R:++Y,b=v,Ce=Te;break;case X:we>0&&(++Y,b=v);case N:Ce=Te}}switch(b){case N:for(Ve=Ve.trim(),v=Ve.charCodeAt(0),S=1,Ce=++Y;Y<Te;){switch(b=o.charCodeAt(Y)){case N:S++;break;case I:S--;break;case J:switch(y=o.charCodeAt(Y+1)){case V:case J:Y=He(y,Y,Be,o)}break;case D:b++;case L:b++;case K:case G:for(;Y++<Be&&o.charCodeAt(Y)!==b;);}if(0===S)break;Y++}switch(Qe=o.substring(Ce,Y),v===ne&&(v=(Ve=Ve.replace(n,"").trim()).charCodeAt(0)),v){case $:switch(we>0&&(Ve=Ve.replace(r,"")),y=Ve.charCodeAt(1)){case fe:case ae:case se:case H:s=t;break;default:s=_e}if(Qe=Fe(t,s,Qe,y,a+1),Ce=Qe.length,ke>0&&0===Ce&&(Ce=Ve.length),Se>0&&(s=Ue(_e,Ve,Oe),l=qe(Re,Qe,s,t,me,he,Ce,y,a,i),Ve=s.join(""),void 0!==l&&0===(Ce=(Qe=l.trim()).length)&&(y=0,Qe="")),Ce>0)switch(y){case se:Ve=Ve.replace(_,We);case fe:case ae:case H:Qe=Ve+"{"+Qe+"}";break;case ie:Ve=Ve.replace(h,"$1 $2"+(Ne>0?Le:"")),Qe=Ve+"{"+Qe+"}",Qe=1===ye||2===ye&&$e("@"+Qe,3)?"@"+A+Qe+"@"+Qe:"@"+Qe;break;default:Qe=Ve+Qe,i===de&&(Xe+=Qe,Qe="")}else Qe="";break;default:Qe=Fe(t,Ue(t,Ve,Oe),Qe,i,a+1)}Ge+=Qe,O=0,Ee=0,T=0,we=0,Oe=0,C=0,Ve="",Qe="",b=o.charCodeAt(++Y);break;case I:case R:if(Ve=(we>0?Ve.replace(r,""):Ve).trim(),(Ce=Ve.length)>1)switch(0===T&&((v=Ve.charCodeAt(0))===H||v>96&&v<123)&&(Ce=(Ve=Ve.replace(" ",":")).length),Se>0&&void 0!==(l=qe(Pe,Ve,t,e,me,he,Xe.length,i,a,i))&&0===(Ce=(Ve=l.trim()).length)&&(Ve="\0\0"),v=Ve.charCodeAt(0),y=Ve.charCodeAt(1),v){case ne:break;case $:if(y===ue||y===pe){Ke+=Ve+o.charAt(Y);break}default:if(Ve.charCodeAt(Ce-1)===X)break;Xe+=ze(Ve,v,y,Ve.charCodeAt(2))}O=0,Ee=0,T=0,we=0,Oe=0,Ve="",b=o.charCodeAt(++Y)}}switch(b){case B:case U:if(p+d+f+u+xe===0)switch(E){case M:case G:case K:case $:case te:case Z:case V:case ee:case J:case H:case X:case Q:case R:case N:case I:break;default:T>0&&(Ee=1)}p===J?p=0:ve+O===0&&i!==ie&&Ve.length>0&&(we=1,Ve+="\0"),Se*Ie>0&&qe(Ae,Ve,t,e,me,he,Xe.length,i,a,i),he=1,me++;break;case R:case I:if(p+d+f+u===0){he++;break}default:switch(he++,Ye=o.charAt(Y),b){case z:case W:if(d+u+p===0)switch(w){case Q:case X:case z:case W:Ye="";break;default:b!==W&&(Ye=" ")}break;case ne:Ye="\\0";break;case re:Ye="\\f";break;case oe:Ye="\\v";break;case q:d+p+u===0&&ve>0&&(Oe=1,we=1,Ye="\f"+Ye);break;case 108:if(d+p+u+ge===0&&T>0)switch(Y-T){case 2:w===le&&o.charCodeAt(Y-3)===X&&(ge=w);case 8:k===ce&&(ge=k)}break;case X:d+p+u===0&&(T=Y);break;case Q:p+f+d+u===0&&(we=1,Ye+="\r");break;case K:case G:0===p&&(d=d===b?0:0===d?b:d);break;case D:d+p+f===0&&u++;break;case F:d+p+f===0&&u--;break;case M:d+p+u===0&&f--;break;case L:if(d+p+u===0){if(0===O)switch(2*w+3*k){case 533:break;default:S=0,O=1}f++}break;case $:p+f+d+u+T+C===0&&(C=1);break;case V:case J:if(d+u+f>0)break;switch(p){case 0:switch(2*b+3*o.charCodeAt(Y+1)){case 235:p=J;break;case 220:Ce=Y,p=V}break;case V:b===J&&w===V&&Ce+2!==Y&&(33===o.charCodeAt(Ce+2)&&(Xe+=o.substring(Ce,Y+1)),Ye="",p=0)}}if(0===p){if(ve+d+u+C===0&&i!==ie&&b!==R)switch(b){case Q:case te:case Z:case ee:case M:case L:if(0===O){switch(w){case z:case W:case U:case B:Ye+="\0";break;default:Ye="\0"+Ye+(b===Q?"":"\0")}we=1}else switch(b){case L:T+7===Y&&108===w&&(T=0),O=++S;break;case M:0==(O=--S)&&(wLine truncated
|
|
||||||
/*!***************************************************
|
/*!***************************************************
|
||||||
* mark.js v8.11.1
|
* mark.js v8.11.1
|
||||||
* https://markjs.io/
|
* https://markjs.io/
|
||||||
* Copyright (c) 2014–2018, Julian Kühnel
|
* Copyright (c) 2014–2018, Julian Kühnel
|
||||||
* Released under the MIT license https://git.io/vwTVl
|
* Released under the MIT license https://git.io/vwTVl
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=i}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim(),r=e.contentWindow.location.href;return r===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,i=null,a=function a(){if(!o){o=!0,clearTimeout(i);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),i=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,l=0;a=Array.prototype.slice.call(a);var c=function(){--s<=0&&i(l)};s||c(),a.forEach(function(t){e.matches(t,o.exclude)?c():o.onIframeReady(t,function(e){n(t)&&(l++,r(e)),c()},c)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){var r=e.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_PRECEDING;if(r&o){if(null===t)return!0;var i=t.compareDocumentPosition(n),a=Node.DOCUMENT_POSITION_FOLLOWING;if(i&a)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode(),n=void 0;return n=null===t?e.nextNode():e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,i=!1;return r.forEach(function(e,t){e.val===n&&(o=t,i=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==o||i?!1===o||i||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach(function(e){e.handled||o.getIframeContents(e.val,function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var i=this,a=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,p=function(){var e=i.getIteratorNode(a);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,function(e){return i.checkIframeFilter(c,u,e,s)},function(t){i.createInstanceOnIframe(t).forEachNode(e,function(e){return l.push(e)},r)}),l.push(c);l.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(s,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=this.getContexts(),a=i.length;a||o(),i.forEach(function(i){var s=function(){r.iterateThroughNodes(e,i,t,n,function(){--a<=0&&o()})};r.iframes?r.waitForIframes(i,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every(function(t){return!r.call(e,t)||(o=!0,!1)}),o}return!1}}]),e}(),i=function(){functLine truncated
|
e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=i}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim(),r=e.contentWindow.location.href;return r===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,i=null,a=function a(){if(!o){o=!0,clearTimeout(i);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),i=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,l=0;a=Array.prototype.slice.call(a);var c=function(){--s<=0&&i(l)};s||c(),a.forEach(function(t){e.matches(t,o.exclude)?c():o.onIframeReady(t,function(e){n(t)&&(l++,r(e)),c()},c)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){var r=e.compareDocumentPosition(n),o=Node.DOCUMENT_POSITION_PRECEDING;if(r&o){if(null===t)return!0;var i=t.compareDocumentPosition(n),a=Node.DOCUMENT_POSITION_FOLLOWING;if(i&a)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode(),n=void 0;return n=null===t?e.nextNode():e.nextNode()&&e.nextNode(),{prevNode:t,node:n}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,i=!1;return r.forEach(function(e,t){e.val===n&&(o=t,i=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==o||i?!1===o||i||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach(function(e){e.handled||o.getIframeContents(e.val,function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var i=this,a=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,p=function(){var e=i.getIteratorNode(a);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,function(e){return i.checkIframeFilter(c,u,e,s)},function(t){i.createInstanceOnIframe(t).forEachNode(e,function(e){return l.push(e)},r)}),l.push(c);l.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(s,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=this.getContexts(),a=i.length;a||o(),i.forEach(function(i){var s=function(){r.iterateThroughNodes(e,i,t,n,function(){--a<=0&&o()})};r.iframes?r.waitForIframes(i,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every(function(t){return!r.call(e,t)||(o=!0,!1)}),o}return!1}}]),e}(),i=function(){functLine truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,s,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,a,s,l],p=0;(c=new Error(t.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(222),o=n(223),i=n(246),a=n(247),s=n(248),l=n(253);function c(e){u(this,c.defaults),u(this,e)}function u(e,t){if(p(t))for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o],a=e[o];p(i)?e[o]=u(a||{},i):void 0!==i&&(e[o]=i)}return e}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.exports=c,c.defaults={parse:{json:r,yaml:o,text:i,binary:a},resolve:{file:s,http:l,external:!0},dereference:{circular:!0}}},function(e,t,n){"use strict";var r=n(91),o=n(36);e.exports={parse:function(e,t){try{return r.safeLoad(e)}catch(e){throw e instanceof Error?e:o(e,e.message)}},stringify:function(e,t,n){try{var i=("string"==typeof n?n.length:n)||2;return r.safeDump(e,{indent:i})}catch(e){throw e instanceof Error?e:o(e,e.message)}}}},function(e,t,n){"use strict";var r=n(42);e.exports=new r({include:[n(128)]})},function(e,t,n){"use strict";var r=n(42);e.exports=new r({include:[n(92)],implicit:[n(230),n(231),n(232),n(233)]})},function(e,t,n){(function(e){var r=n(254),o=n(131),i=n(263),a=n(264),s=n(15),l=t;l.request=function(t,n){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var p=new r(t);return n&&p.on("response",n),p},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(9))},function(e,t,n){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),n=null}).call(this,n(9))},function(e,t,n){(function(e,r,o){var i=n(130),a=n(31),s=n(132),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,n,a,l){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){e.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=Line truncated
|
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))o.call(n,c)&&(s[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(s[a[u]]=n[a[u]])}}return s}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,s,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,i,a,s,l],p=0;(c=new Error(t.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(212),o=n(213),i=n(236),a=n(237),s=n(238),l=n(243);function c(e){u(this,c.defaults),u(this,e)}function u(e,t){if(p(t))for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r],i=t[o],a=e[o];p(i)?e[o]=u(a||{},i):void 0!==i&&(e[o]=i)}return e}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.exports=c,c.defaults={parse:{json:r,yaml:o,text:i,binary:a},resolve:{file:s,http:l,external:!0},dereference:{circular:!0}}},function(e,t,n){"use strict";var r=n(81),o=n(32);e.exports={parse:function(e,t){try{return r.safeLoad(e)}catch(e){throw e instanceof Error?e:o(e,e.message)}},stringify:function(e,t,n){try{var i=("string"==typeof n?n.length:n)||2;return r.safeDump(e,{indent:i})}catch(e){throw e instanceof Error?e:o(e,e.message)}}}},function(e,t,n){"use strict";var r=n(37);e.exports=new r({include:[n(117)]})},function(e,t,n){"use strict";var r=n(37);e.exports=new r({include:[n(82)],implicit:[n(220),n(221),n(222),n(223)]})},function(e,t,n){(function(e){var r=n(244),o=n(120),i=n(253),a=n(254),s=n(15),l=t;l.request=function(t,n){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,l=t.hostname||t.host,c=t.port,u=t.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),t.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var p=new r(t);return n&&p.on("response",n),p},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=o.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(8))},function(e,t,n){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var n;function r(){if(void 0!==n)return n;if(e.XMLHttpRequest){n=new e.XMLHttpRequest;try{n.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!r()&&s(r().overrideMimeType),t.vbArray=s(e.VBArray),n=null}).call(this,n(8))},function(e,t,n){(function(e,r,o){var i=n(119),a=n(26),s=n(121),l=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,n,a,l){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){e.nextTick(function(){c.emit("close")})}),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=Line truncated
|
||||||
/** @license React v16.4.1
|
/** @license React v16.4.2
|
||||||
* react.production.min.js
|
* react.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/var r=n(120),o=n(121),i=n(122),a=n(123),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,u=s?Symbol.for("react.fragment"):60107,p=s?Symbol.for("react.strict_mode"):60108,f=s?Symbol.for("react.profiler"):60114,d=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,m=s?Symbol.for("react.async_mode"):60111,g=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);o(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function w(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function x(){}function k(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var _=k.prototype=new x;_.constructor=k,r(_,w.prototype),_.isPureReactComponent=!0;var E={current:null},S=Object.prototype.hasOwnProperty,O={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)S.call(t,r)&&!O.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:l,type:e,key:i,ref:a,props:o,_owner:E.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var A=/\/+/g,P=[];function j(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function I(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case c:i=!0}}if(i)return n(r,e,""===t?"."+N(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a<e.length;a++){var s=t+N(o=e[a],a);i+=I(o,s,n,r)}else if(null===e||void 0===e?s=null:s="function"==typeof(s=v&&e[v]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),a=0;!(o=e.next()).done;)i+=I(o=o.value,s=t+N(o,a++),n,r);else"object"===o&&y("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,a.thatReturnsArgument):null!=e&&(T(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function D(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),t=j(t,i,r,o),null==e||I(e,"",M,t),R(t)}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=j(null,null,t,n),null==e||I(e,"",L,t),R(t)},count:function(e){return null==e?0:I(e,"",a.thatReturnsNull,null)},toArray:function(e){var t=[];return D(e,t,null,a.thatReturnsArgument),t},only:function(e){return T(e)||y("143"),e}},createRef:function(){return{current:null}},Component:w,PureComponent:k,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:d,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:g,render:e}},Fragment:u,StrictMode:p,unstable_AsyncMode:m,unstable_Profiler:f,createElement:C,cloneElement:function(e,t,n){(null===e||void 0===e)&&y("267",e);var o=void 0,i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,c=E.current),void 0!==t.key&&(a=""+t.key);var u=void 0;for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,o)&&!O.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==u?u[o]:t[o])}if(1===(o=arguments.length-2))i.children=n;else if(1<o){u=Array(o);for(var p=0;p<o;p++)u[p]=arguments[p+2];i.children=Line truncated
|
*/var r=n(109),o=n(110),i=n(111),a=n(112),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,c=s?Symbol.for("react.portal"):60106,u=s?Symbol.for("react.fragment"):60107,p=s?Symbol.for("react.strict_mode"):60108,f=s?Symbol.for("react.profiler"):60114,d=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,m=s?Symbol.for("react.async_mode"):60111,g=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);o(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function w(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function x(){}function k(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var E=k.prototype=new x;E.constructor=k,r(E,w.prototype),E.isPureReactComponent=!0;var _={current:null},S=Object.prototype.hasOwnProperty,O={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)S.call(t,r)&&!O.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:l,type:e,key:i,ref:a,props:o,_owner:_.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var A=/\/+/g,P=[];function I(e,t,n,r){if(P.length){var o=P.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function R(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>P.length&&P.push(e)}function j(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var i=!1;if(null===e)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case c:i=!0}}if(i)return n(r,e,""===t?"."+N(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a<e.length;a++){var s=t+N(o=e[a],a);i+=j(o,s,n,r)}else if(null===e||void 0===e?s=null:s="function"==typeof(s=v&&e[v]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),a=0;!(o=e.next()).done;)i+=j(o=o.value,s=t+N(o,a++),n,r);else"object"===o&&y("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,a.thatReturnsArgument):null!=e&&(T(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function D(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),t=I(t,i,r,o),null==e||j(e,"",M,t),R(t)}var F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=I(null,null,t,n),null==e||j(e,"",L,t),R(t)},count:function(e){return null==e?0:j(e,"",a.thatReturnsNull,null)},toArray:function(e){var t=[];return D(e,t,null,a.thatReturnsArgument),t},only:function(e){return T(e)||y("143"),e}},createRef:function(){return{current:null}},Component:w,PureComponent:k,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:d,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:g,render:e}},Fragment:u,StrictMode:p,unstable_AsyncMode:m,unstable_Profiler:f,createElement:C,cloneElement:function(e,t,n){(null===e||void 0===e)&&y("267",e);var o=void 0,i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,c=_.current),void 0!==t.key&&(a=""+t.key);var u=void 0;for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,o)&&!O.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==u?u[o]:t[o])}if(1===(o=arguments.length-2))i.children=n;else if(1<o){u=Array(o);for(var p=0;p<o;p++)u[p]=arguments[p+2];i.children=Line truncated
|
||||||
/** @license React v16.4.1
|
/** @license React v16.4.2
|
||||||
* react-dom.production.min.js
|
* react-dom.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/var r=n(121),o=n(0),i=n(203),a=n(120),s=n(123),l=n(204),c=n(205),u=n(206),p=n(122);function f(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}o||f("227");var d={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,i,a,s,l){(function(e,t,n,r,o,i,a,s,l){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(d,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,l){if(d.invokeGuardedCallback.apply(this,arguments),d.hasCaughtError()){var c=d.clearCaughtError();d._hasRethrowError||(d._hasRethrowError=!0,d._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(d._hasRethrowError){var e=d._rethrowError;throw d._rethrowError=null,d._hasRethrowError=!1,e}}.apply(d,arguments)},hasCaughtError:function(){return d._hasCaughtError},clearCaughtError:function(){if(d._hasCaughtError){var e=d._caughtError;return d._caughtError=null,d._hasCaughtError=!1,e}f("198")}};var h=null,m={};function g(){if(h)for(var e in m){var t=m[e],n=h.indexOf(e);if(-1<n||f("96",e),!y[n])for(var r in t.extractEvents||f("97",e),y[n]=t,n=t.eventTypes){var o=void 0,i=n[r],a=t,s=r;b.hasOwnProperty(s)&&f("99",s),b[s]=i;var l=i.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&v(l[o],a,s);o=!0}else i.registrationName?(v(i.registrationName,a,s),o=!0):o=!1;o||f("98",r,e)}}}function v(e,t,n){w[e]&&f("100",e),w[e]=t,x[e]=t.eventTypes[n].dependencies}var y=[],b={},w={},x={};function k(e){h&&f("101"),h=Array.prototype.slice.call(e),g()}function _(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];m.hasOwnProperty(t)&&m[t]===r||(m[t]&&f("102",t),m[t]=r,n=!0)}n&&g()}var E={plugins:y,eventNameDispatchConfigs:b,registrationNameModules:w,registrationNameDependencies:x,possibleRegistrationNames:null,injectEventPluginOrder:k,injectEventPluginsByName:_},S=null,O=null,C=null;function T(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=C(r),d.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function A(e,t){return null==t&&f("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function P(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var j=null;function R(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)T(e,t,n[o],r[o]);else n&&T(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function I(e){return R(e,!0)}function N(e){return R(e,!1)}var L={injectEventPluginOrder:k,injectEventPluginsByName:_};function M(e,t){var n=e.stateNode;if(!n)return null;var r=S(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&f("231",t,typeof n),n)}function D(e,t){null!==e&&(j=A(j,e)),e=j,j=null,e&&(P(e,t?I:N),j&&f("95"),d.rethrowCaughtError())}function F(e,t,n,r){for(var o=null,i=0;i<y.length;i++){var a=y[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=A(o,a))}D(o,!1)}var U={injection:L,getListener:M,runEventsInBatch:D,runExtractedEventsInBatch:F},B=Math.random().toString(36).slice(2),z="__reactInternalInstance$"+B,$="__reactEventHandlers$"+B;function W(e){if(e[z])return e[z];for(;!e[z];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[z]).tag||6===e.tag?e:null}function q(e){if(5===e.tag||6===e.tag)return e.stateNode;f("33")}function H(e){return e[$]||null}var Y={precacheFiberNode:function(e,t){t[z]=e},getClosestInstanceFromNode:W,getInstanceFromNode:function(e){return!(e=e[z])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:q,getFiberCurrentPropsFromNode:H,updateFiberProps:function(e,t){e[$]=t}};function V(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Q(e,t,n){for(var r=[];e;)r.push(e),e=V(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function X(e,t,n){(t=M(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=A(n._dispatchListeners,t),n._dispatchInstances=A(n._dispatchInstances,e))}function G(e){e&&e.dispatchConfig.phasedRegistrationNames&&Q(e._targetInst,X,e)}function K(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;Q(t=t?V(t):null,X,e)}}function J(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=M(e,Line truncated
|
*/var r=n(110),o=n(0),i=n(193),a=n(109),s=n(112),l=n(194),c=n(195),u=n(196),p=n(111);function f(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);r(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}o||f("227");var d={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,i,a,s,l){(function(e,t,n,r,o,i,a,s,l){this._hasCaughtError=!1,this._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(d,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,l){if(d.invokeGuardedCallback.apply(this,arguments),d.hasCaughtError()){var c=d.clearCaughtError();d._hasRethrowError||(d._hasRethrowError=!0,d._rethrowError=c)}},rethrowCaughtError:function(){return function(){if(d._hasRethrowError){var e=d._rethrowError;throw d._rethrowError=null,d._hasRethrowError=!1,e}}.apply(d,arguments)},hasCaughtError:function(){return d._hasCaughtError},clearCaughtError:function(){if(d._hasCaughtError){var e=d._caughtError;return d._caughtError=null,d._hasCaughtError=!1,e}f("198")}};var h=null,m={};function g(){if(h)for(var e in m){var t=m[e],n=h.indexOf(e);if(-1<n||f("96",e),!y[n])for(var r in t.extractEvents||f("97",e),y[n]=t,n=t.eventTypes){var o=void 0,i=n[r],a=t,s=r;b.hasOwnProperty(s)&&f("99",s),b[s]=i;var l=i.phasedRegistrationNames;if(l){for(o in l)l.hasOwnProperty(o)&&v(l[o],a,s);o=!0}else i.registrationName?(v(i.registrationName,a,s),o=!0):o=!1;o||f("98",r,e)}}}function v(e,t,n){w[e]&&f("100",e),w[e]=t,x[e]=t.eventTypes[n].dependencies}var y=[],b={},w={},x={};function k(e){h&&f("101"),h=Array.prototype.slice.call(e),g()}function E(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];m.hasOwnProperty(t)&&m[t]===r||(m[t]&&f("102",t),m[t]=r,n=!0)}n&&g()}var _={plugins:y,eventNameDispatchConfigs:b,registrationNameModules:w,registrationNameDependencies:x,possibleRegistrationNames:null,injectEventPluginOrder:k,injectEventPluginsByName:E},S=null,O=null,C=null;function T(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=C(r),d.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function A(e,t){return null==t&&f("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function P(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var I=null;function R(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)T(e,t,n[o],r[o]);else n&&T(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function j(e){return R(e,!0)}function N(e){return R(e,!1)}var L={injectEventPluginOrder:k,injectEventPluginsByName:E};function M(e,t){var n=e.stateNode;if(!n)return null;var r=S(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&f("231",t,typeof n),n)}function D(e,t){null!==e&&(I=A(I,e)),e=I,I=null,e&&(P(e,t?j:N),I&&f("95"),d.rethrowCaughtError())}function F(e,t,n,r){for(var o=null,i=0;i<y.length;i++){var a=y[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=A(o,a))}D(o,!1)}var U={injection:L,getListener:M,runEventsInBatch:D,runExtractedEventsInBatch:F},B=Math.random().toString(36).slice(2),z="__reactInternalInstance$"+B,$="__reactEventHandlers$"+B;function W(e){if(e[z])return e[z];for(;!e[z];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[z]).tag||6===e.tag?e:null}function q(e){if(5===e.tag||6===e.tag)return e.stateNode;f("33")}function H(e){return e[$]||null}var Y={precacheFiberNode:function(e,t){t[z]=e},getClosestInstanceFromNode:W,getInstanceFromNode:function(e){return!(e=e[z])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:q,getFiberCurrentPropsFromNode:H,updateFiberProps:function(e,t){e[$]=t}};function V(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Q(e,t,n){for(var r=[];e;)r.push(e),e=V(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function X(e,t,n){(t=M(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=A(n._dispatchListeners,t),n._dispatchInstances=A(n._dispatchInstances,e))}function G(e){e&&e.dispatchConfig.phasedRegistrationNames&&Q(e._targetInst,X,e)}function K(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;Q(t=t?V(t):null,X,e)}}function J(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=M(e,Line truncated
|
||||||
/*!
|
/** @license React v16.4.2
|
||||||
* isobject <https://github.com/jonschlinkert/isobject>
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";
|
|
||||||
/** @license React v16.4.1
|
|
||||||
* react-is.production.min.js
|
* react-is.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.timeout"):60113;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case a:case l:case s:return e;default:switch(e=e&&e.$$typeof){case u:case f:case c:return e;default:return t}}case i:return t}}}t.typeOf=h,t.AsyncMode=p,t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Profiler=l,t.Portal=i,t.StrictMode=s,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===l||e===s||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)===p},t.isContextConsumer=function(e){return h(e)===u},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return h(e)===f},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===l},t.isPortal=function(e){return h(e)===i},t.isStrictMode=function(e){return h(e)===s}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,p=0;p<u;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[l++]=255&t);1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(p(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,p=n?o-1:0,f=n?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t,n){"use strict";(function(t){e.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(e){return new Promise(function(n,r){var o=e.data;t.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?n(void 0):n(JSON.parse(o)):n(o)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(126);e.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise(function(n,o){var i=e.data;t.isBuffer(i)&&(i=i.toString()),n("string"==typeof i?r.parse(i):i)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";var r=n(225),o=n(244);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(8),e.exports.Schema=n(42),e.exports.FAILSAFE_SCHEMA=n(92),e.exports.JSON_SCHEMA=n(128),e.exports.CORE_SCHEMA=n(127),e.exports.DEFAULT_SAFE_SCHEMA=n(62),e.exports.DEFAULT_FULL_SCHEMA=n(93),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(61),e.exports.MINIMAL_SCHEMA=n(92),e.exports.SAFE_SCHEMA=n(62),e.exportLine truncated
|
*/Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.timeout"):60113;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case a:case l:case s:return e;default:switch(e=e&&e.$$typeof){case u:case f:case c:return e;default:return t}}case i:return t}}}t.typeOf=h,t.AsyncMode=p,t.ContextConsumer=u,t.ContextProvider=c,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Profiler=l,t.Portal=i,t.StrictMode=s,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===l||e===s||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===u||e.$$typeof===f)},t.isAsyncMode=function(e){return h(e)===p},t.isContextConsumer=function(e){return h(e)===u},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return h(e)===f},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===l},t.isPortal=function(e){return h(e)===i},t.isStrictMode=function(e){return h(e)===s}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,p=0;p<u;p+=4)t=o[e.charCodeAt(p)]<<18|o[e.charCodeAt(p+1)]<<12|o[e.charCodeAt(p+2)]<<6|o[e.charCodeAt(p+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=o[e.charCodeAt(p)]<<2|o[e.charCodeAt(p+1)]>>4,s[l++]=255&t);1===a&&(t=o[e.charCodeAt(p)]<<10|o[e.charCodeAt(p+1)]<<4|o[e.charCodeAt(p+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(p(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,p=n?o-1:0,f=n?-1:1,d=e[t+p];for(p+=f,i=d&(1<<-u)-1,d>>=-u,u+=s;u>0;i=256*i+e[t+p],p+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+p],p+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=c}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,p=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+p>=1?f/l:f*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=u?(s=0,a=u):a+p>=1?(s=(t*l-1)*Math.pow(2,o),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t,n){"use strict";(function(t){e.exports={order:100,allowEmpty:!0,canParse:".json",parse:function(e){return new Promise(function(n,r){var o=e.data;t.isBuffer(o)&&(o=o.toString()),"string"==typeof o?0===o.trim().length?n(void 0):n(JSON.parse(o)):n(o)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";(function(t){var r=n(115);e.exports={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],parse:function(e){return new Promise(function(n,o){var i=e.data;t.isBuffer(i)&&(i=i.toString()),n("string"==typeof i?r.parse(i):i)})}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";var r=n(215),o=n(234);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(7),e.exports.Schema=n(37),e.exports.FAILSAFE_SCHEMA=n(82),e.exports.JSON_SCHEMA=n(117),e.exports.CORE_SCHEMA=n(116),e.exports.DEFAULT_SAFE_SCHEMA=n(56),e.exports.DEFAULT_FULL_SCHEMA=n(83),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(55),e.exports.MINIMAL_SCHEMA=n(82),e.exports.SAFE_SCHEMA=n(56),e.exportLine truncated
|
||||||
/*!
|
/*!
|
||||||
* Stickyfill -- `position: sticky` polyfill
|
* Stickyfill -- `position: sticky` polyfill
|
||||||
* v. 1.1.1 | https://github.com/wilddeer/stickyfill
|
* v. 1.1.1 | https://github.com/wilddeer/stickyfill
|
||||||
@@ -108,11 +96,11 @@ object-assign
|
|||||||
*
|
*
|
||||||
* MIT License
|
* MIT License
|
||||||
*/
|
*/
|
||||||
e.exports=function(e,t){e||(e=document),t||(t=window);var n,r,o=[],i=!1,a=e.documentElement,s=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||d();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),f=u.length-1;f>=0;f--){try{p.style.position=u[f]+"sticky"}catch(e){}""!=p.style.position&&d()}function d(){P=L=j=R=I=N=s}function h(e){return parseFloat(e)||0}function m(){n={top:t.pageYOffset,left:t.pageXOffset}}function g(){if(t.pageXOffset!=n.left)return m(),void j();t.pageYOffset!=n.top&&(m(),y())}function v(e){setTimeout(function(){t.pageYOffset!=n.top&&(n.top=t.pageYOffset,y())},0)}function y(){for(var e=o.length-1;e>=0;e--)b(o[e])}function b(e){if(e.inited){var t=n.top<=e.limit.start?0:n.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}(e,t)}}function w(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),b(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=S(e.clone))}function x(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var n=o.length-1;n>=0;n--)if(o[n].node!==e.node&&o[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function k(){for(var e=o.length-1;e>=0;e--)w(o[e])}function _(){for(var e=o.length-1;e>=0;e--)x(o[e])}function E(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),o=e.style.position;e.style.position="relative";var i={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},s={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=O(e),u=O(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:h(r.borderLeftWidth),borderRightWidth:h(r.borderRightWidth),borderTopWidth:h(r.borderTopWidth),borderBottomWidth:h(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:a.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:i,numeric:s,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-s.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}}}function S(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function O(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function C(){r=setInterval(function(){!function(){for(var e=o.length-1;e>=0;e--)if(o[e].inited){var t=Math.abs(S(o[e].clone)-o[e].docOffsetTop),n=Math.abs(o[e].parent.node.offsetHeight-o[e].parent.height);if(t>=2||n>=2)return!1}return!0}()&&j()},500)}function T(){clearInterval(r)}function A(){i&&(document[l]?T():C())}function P(){i||(m(),k(),t.addEventListener("scroll",g),t.addEventListener("wheel",v),t.addEventListener("resize",j),t.addEventListener("orientationchange",j),e.addEventListener(c,A),C(),i=!0)}function j(){if(i){_();for(var e=o.length-1;e>=0;e--)o[e]=E(o[e].node);k()}}function R(){t.removeEventListener("scroll",g),t.removeEventListener("wheel",v),t.removeEventListener("resize",j),t.removeEventListener("orientationchange",j),e.removeEventListener(c,A),T(),i=!1}functiLine truncated
|
e.exports=function(e,t){e||(e=document),t||(t=window);var n,r,o=[],i=!1,a=e.documentElement,s=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||d();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),f=u.length-1;f>=0;f--){try{p.style.position=u[f]+"sticky"}catch(e){}""!=p.style.position&&d()}function d(){P=L=I=R=j=N=s}function h(e){return parseFloat(e)||0}function m(){n={top:t.pageYOffset,left:t.pageXOffset}}function g(){if(t.pageXOffset!=n.left)return m(),void I();t.pageYOffset!=n.top&&(m(),y())}function v(e){setTimeout(function(){t.pageYOffset!=n.top&&(n.top=t.pageYOffset,y())},0)}function y(){for(var e=o.length-1;e>=0;e--)b(o[e])}function b(e){if(e.inited){var t=n.top<=e.limit.start?0:n.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}(e,t)}}function w(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),b(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=S(e.clone))}function x(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var n=o.length-1;n>=0;n--)if(o[n].node!==e.node&&o[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function k(){for(var e=o.length-1;e>=0;e--)w(o[e])}function E(){for(var e=o.length-1;e>=0;e--)x(o[e])}function _(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),o=e.style.position;e.style.position="relative";var i={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},s={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=O(e),u=O(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:h(r.borderLeftWidth),borderRightWidth:h(r.borderRightWidth),borderTopWidth:h(r.borderTopWidth),borderBottomWidth:h(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:a.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:i,numeric:s,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-s.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}}}function S(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function O(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function C(){r=setInterval(function(){!function(){for(var e=o.length-1;e>=0;e--)if(o[e].inited){var t=Math.abs(S(o[e].clone)-o[e].docOffsetTop),n=Math.abs(o[e].parent.node.offsetHeight-o[e].parent.height);if(t>=2||n>=2)return!1}return!0}()&&I()},500)}function T(){clearInterval(r)}function A(){i&&(document[l]?T():C())}function P(){i||(m(),k(),t.addEventListener("scroll",g),t.addEventListener("wheel",v),t.addEventListener("resize",I),t.addEventListener("orientationchange",I),e.addEventListener(c,A),C(),i=!0)}function I(){if(i){E();for(var e=o.length-1;e>=0;e--)o[e]=_(o[e].node);k()}}function R(){t.removeEventListener("scroll",g),t.removeEventListener("wheel",v),t.removeEventListener("resize",I),t.removeEventListener("orientationchange",I),e.removeEventListener(c,A),T(),i=!1}functiLine truncated
|
||||||
/*!
|
/*!
|
||||||
* perfect-scrollbar v1.4.0
|
* perfect-scrollbar v1.4.0
|
||||||
* (c) 2018 Hyunje Jun
|
* (c) 2018 Hyunje Jun
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
function at(e){return getComputedStyle(e)}function st(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function lt(e){var t=document.createElement("div");return t.className=e,t}var ct="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function ut(e,t){if(!ct)throw new Error("No element matching method supported");return ct.call(e,t)}function pt(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function ft(e,t){return Array.prototype.filter.call(e.children,function(e){return ut(e,t)})}var dt={main:"ps",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},ht={x:null,y:null};function mt(e,t){var n=e.element.classList,r=dt.state.scrolling(t);n.contains(r)?clearTimeout(ht[t]):n.add(r)}function gt(e,t){ht[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(dt.state.scrolling(t))},e.settings.scrollingThreshold)}var vt=function(e){this.element=e,this.handlers={}},yt={isEmpty:{configurable:!0}};vt.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},vt.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)})},vt.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},yt.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(vt.prototype,yt);var bt=function(){this.eventElements=[]};function wt(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}bt.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new vt(e),this.eventElements.push(t)),t},bt.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},bt.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},bt.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},bt.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var xt=function(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start");p[s]>e[i]-e[a]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(wt("ps-scroll-"+l)),t<0?p.dispatchEvent(wt("ps-scroll-"+c)):t>0&&p.dispatchEvent(wt("ps-scroll-"+u)),r&&function(e,t){mt(e,t),gt(e,t)}(e,l));e.reach[l]&&(t||o)&&p.dispatchEvent(wt("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)};function kt(e){return parseInt(e,10)||0}var _t={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},Et=function(e){var t=e.element,n=Math.floor(t.scrollTop);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(ft(t,dt.element.rail("x")).forEach(function(e){return pt(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(ft(t,dt.element.rail("y")).forEach(function(e){return pt(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=St(e,kt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=kt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=St(e,kt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTLine truncated
|
function kn(e){return getComputedStyle(e)}function En(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function _n(e){var t=document.createElement("div");return t.className=e,t}var Sn="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function On(e,t){if(!Sn)throw new Error("No element matching method supported");return Sn.call(e,t)}function Cn(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function Tn(e,t){return Array.prototype.filter.call(e.children,function(e){return On(e,t)})}var An={main:"ps",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},Pn={x:null,y:null};function In(e,t){var n=e.element.classList,r=An.state.scrolling(t);n.contains(r)?clearTimeout(Pn[t]):n.add(r)}function Rn(e,t){Pn[t]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(An.state.scrolling(t))},e.settings.scrollingThreshold)}var jn=function(e){this.element=e,this.handlers={}},Nn={isEmpty:{configurable:!0}};jn.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},jn.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter(function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)})},jn.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Nn.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(t){return 0===e.handlers[t].length})},Object.defineProperties(jn.prototype,Nn);var Ln=function(){this.eventElements=[]};function Mn(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}Ln.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return t||(t=new jn(e),this.eventElements.push(t)),t},Ln.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},Ln.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Ln.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]},Ln.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var Dn=function(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start");p[s]>e[i]-e[a]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(Mn("ps-scroll-"+l)),t<0?p.dispatchEvent(Mn("ps-scroll-"+c)):t>0&&p.dispatchEvent(Mn("ps-scroll-"+u)),r&&function(e,t){In(e,t),Rn(e,t)}(e,l));e.reach[l]&&(t||o)&&p.dispatchEvent(Mn("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)};function Fn(e){return parseInt(e,10)||0}var Un={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},Bn=function(e){var t=e.element,n=Math.floor(t.scrollTop);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(Tn(t,An.element.rail("x")).forEach(function(e){return Cn(e)}),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(Tn(t,An.element.rail("y")).forEach(function(e){return Cn(e)}),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=zn(e,Fn(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Fn((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=zn(e,Fn(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTLine truncated
|
||||||
//# sourceMappingURL=redoc.standalone.js.map
|
//# sourceMappingURL=redoc.standalone.js.map
|
||||||
@@ -19,10 +19,6 @@ body.swagger-body {
|
|||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
#django-session-auth {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}("undefined"!=typeof self?self:this,function(){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,{configurable:!1,enumerable:!0,get: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="/dist",n(n.s=446)}([function(e,t,n){"use strict";e.exports=n(74)},function(e,t,n){e.exports=n(853)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(262),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(766),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(45),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(768)),o=a(n(350)),i=a(n(45));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r;r=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return u(e)?e:Y(e)}function o(e){return s(e)?e:K(e)}function i(e){return a(e)&&!l(e)?e:G(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return u(e)||s(e)}function c(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=l,n.isOrdered=c,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",d="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",v=5,m=1<<v,y=m-1,g={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function x(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(A)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function A(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return M(e,t,0)}function T(e,t){return M(e,t,t)}function M(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,j=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function B(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null===e||void 0===e?ie():a(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function Y(e){return null===e||void 0===e?ie().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():ae(e)}function K(e){return null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e:ue(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=I,U.VALUES=j,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=Line truncated
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}("undefined"!=typeof self?self:this,function(){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,{configurable:!1,enumerable:!0,get: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="/dist",n(n.s=445)}([function(e,t,n){"use strict";e.exports=n(75)},function(e,t,n){e.exports=n(855)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(262),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(768),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(45),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(770)),o=a(n(349)),i=a(n(45));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r;r=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return u(e)?e:Y(e)}function o(e){return s(e)?e:K(e)}function i(e){return a(e)&&!l(e)?e:G(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return u(e)||s(e)}function c(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=l,n.isOrdered=c,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",d="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",v=5,m=1<<v,g=m-1,y={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function x(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(A)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function A(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return M(e,t,0)}function T(e,t){return M(e,t,t)}function M(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,j=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function B(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null===e||void 0===e?ie():a(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function Y(e){return null===e||void 0===e?ie().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():ae(e)}function K(e){return null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e:ue(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=I,U.VALUES=j,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=Line truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(u[a[c]]=n[a[c]])}}return u}},function(e,t,n){"use strict";var r=n(9),o=n(87),i=n(351),a=(n(8),o.ID_ATTRIBUTE_NAME),u=i,s="__reactInternalInstance$"+Math.random().toString(36).slice(2);function l(e,t){return 1===e.nodeType&&e.getAttribute(a)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function c(e){for(var t;t=e._renderedComponent;)e=t;return e}function f(e,t){var n=c(e);n._hostNode=t,t[s]=n}function p(e,t){if(!(e._flags&u.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=c(a)._domID;if(0!==s){for(;null!==o;o=o.nextSibling)if(l(o,s)){f(a,o);continue e}r("32",s)}}e._flags|=u.hasCachedChildNodes}}function d(e){if(e[s])return e[s];for(var t,n,r=[];!e[s];){if(r.push(e),!e.parentNode)return null;e=e.parentNode}for(;e&&(n=e[s]);e=r.pop())t=n,r.length&&p(n,e);return t}var h={getClosestInstanceFromNode:d,getInstanceFromNode:function(e){var t=d(e);return null!=t&&t._hostNode===e?t:null},getNodeFromInstance:function(e){if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())p(e,e._hostNode);return e._hostNode},precacheChildNodes:p,precacheNode:f,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[s],e._hostNode=null)}};e.exports=h},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(108),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(243)("wks"),o=n(168),i=n(28).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(570)),o=i(n(91));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){var r=n(162)("wks"),o=n(116),i=n(21).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),o=n(15),i=n(49),a=n(50),u=function(e,t,n){var s,l,c,f=e&u.F,p=e&u.G,d=e&u.S,h=e&u.P,v=e&u.B,m=e&u.W,y=p?o:o[t]||(o[t]={}),g=y.prototype,b=p?r:d?r[t]:(r[t]||{}).prototype;for(s in p&&(n=t),n)(l=!f&&b&&void 0!==b[s])&&s in y||(c=l?b[s]:n[s],y[s]=p&&"function"!=typeof b[s]?n[s]:v&&l?i(c,r):m&&b[s]==c?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):h&&"function"==typeof c?i(Function.call,c):c,h&&((y.virtual||(y.virtual={}))[s]=c,e&u.R&&g&&!g[s]&&a(g,s,c)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("returLine truncated
|
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(u[a[c]]=n[a[c]])}}return u}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(10),o=n(87),i=n(350),a=(n(8),o.ID_ATTRIBUTE_NAME),u=i,s="__reactInternalInstance$"+Math.random().toString(36).slice(2);function l(e,t){return 1===e.nodeType&&e.getAttribute(a)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function c(e){for(var t;t=e._renderedComponent;)e=t;return e}function f(e,t){var n=c(e);n._hostNode=t,t[s]=n}function p(e,t){if(!(e._flags&u.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=c(a)._domID;if(0!==s){for(;null!==o;o=o.nextSibling)if(l(o,s)){f(a,o);continue e}r("32",s)}}e._flags|=u.hasCachedChildNodes}}function d(e){if(e[s])return e[s];for(var t,n,r=[];!e[s];){if(r.push(e),!e.parentNode)return null;e=e.parentNode}for(;e&&(n=e[s]);e=r.pop())t=n,r.length&&p(n,e);return t}var h={getClosestInstanceFromNode:d,getInstanceFromNode:function(e){var t=d(e);return null!=t&&t._hostNode===e?t:null},getNodeFromInstance:function(e){if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())p(e,e._hostNode);return e._hostNode},precacheChildNodes:p,precacheNode:f,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[s],e._hostNode=null)}};e.exports=h},function(e,t,n){"use strict";var r=n(108),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(243)("wks"),o=n(168),i=n(29).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(569)),o=i(n(91));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(162)("wks"),o=n(116),i=n(19).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(19),o=n(14),i=n(49),a=n(50),u=n(52),s=function(e,t,n){var l,c,f,p=e&s.F,d=e&s.G,h=e&s.S,v=e&s.P,m=e&s.B,g=e&s.W,y=d?o:o[t]||(o[t]={}),b=y.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(c=!p&&_&&void 0!==_[l])&&u(y,l)||(f=c?_[l]:n[l],y[l]=d&&"function"!=typeof _[l]?n[l]:m&&c?i(f,r):g&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&a(b,l,f)))};s.F=1,s.G=2,s.SLine truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(530),o=n(531),i=n(261);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=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(s.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(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=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,u=e.length,s=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,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;i<u;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;p<s;p++)if(l(e,i+p)!==l(t,p)){f=!1;break}if(f)return i}return-1}function g(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return B(z(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&l)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128=Line truncated
|
var r=n(529),o=n(530),i=n(261);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=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(s.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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(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=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=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,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;i<u;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;p<s;p++)if(l(e,i+p)!==l(t,p)){f=!1;break}if(f)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(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<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return B(z(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&l)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128=Line truncated
|
||||||
/*!
|
/*!
|
||||||
Copyright (c) 2017 Jed Watson.
|
Copyright (c) 2017 Jed Watson.
|
||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
@@ -21,7 +21,7 @@ var r=n(530),o=n(531),i=n(261);function a(){return s.TYPED_ARRAY_SUPPORT?2147483
|
|||||||
Licensed under the MIT License (MIT), see
|
Licensed under the MIT License (MIT), see
|
||||||
http://jedwatson.github.io/classnames
|
http://jedwatson.github.io/classnames
|
||||||
*/
|
*/
|
||||||
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=this.__rules__.length,n=-1;t--;)if(this.__rules__[++n].name===e)return n;return-1},r.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},r.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){e=Array.isArray(e)?e:[e],t&&this.__rules__.forEach(function(e){e.enabled=!1}),e.forEach(function(e){var t=this.__find__(e);if(t<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[t].enabled=!0},this),this.__cache__=null},r.prototype.disable=function(e){(e=Array.isArray(e)?e:[e]).forEach(function(e){var t=this.__find__(e);if(t<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[t].enabled=!1},this),this.__cache__=null},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i=-1,a=e.posMax,u=e.pos,s=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=t+1,e.isInLabel=!0,n=1;e.pos<a;){if(91===(o=e.src.charCodeAt(e.pos)))n++;else if(93===o&&0===--n){r=!0;break}e.parser.skipToken(e)}return r?(i=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=n-1,e.pos=u,e.isInLabel=s,i}},function(e,t,n){var r=n(93);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(33),o=n(21).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(33);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){e.exports=n(50)},function(e,t,n){var r=n(35),o=n(453),i=n(163),a=n(161)("IE_PROTO"),u=function(){},s=function(){var e,t=n(156)("iframe"),r=i.length;for(t.style.display="none",n(241).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(162)("keys"),o=n(116);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(21),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(165),o=n(19)("iterator"),i=n(69);e.exports=n(15).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(93),o=n(19)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(99),o=n(17)("toStringTag"),i="Arguments"==r(function(){return arguments}());Line truncated
|
!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}void 0!==e&&e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(160),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(60),o=n(459),i=n(460),a=Object.defineProperty;t.f=n(101)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(121);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){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){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(465),o=n(54);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(59),o=n(73),i=n(102),a=n(54),u=n(17);e.exports=function(e,t,n){var s=u(e),l=n(a,s,""[e]),c=l[0],f=l[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,s,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){var r=n(116)("meta"),o=n(28),i=n(52),a=n(39).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(51)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&s(e)&&!i(e,r)&&c(e),e}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR_BY=t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR_BATCH=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=function(e){return{type:a,payload:(0,i.default)(e)}},t.newThrownErrBatch=function(e){return{type:u,payload:e}},t.newSpecErr=function(e){return{type:s,payload:e}},t.newSpecErrBatch=function(e){return{type:l,payload:e}},t.newAuthErr=function(e){return{type:c,payload:e}},t.clear=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:f,payload:e}},t.clearBy=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}};var r,o=n(180),i=(r=o)&&r.__esModule?r:{default:r};var a=t.NEW_THROWN_ERR="err_new_thrown_err",u=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",s=t.NEW_SPEC_ERR="err_new_spec_err",l=t.NEW_SPEC_ERR_BATCH="err_new_spec_err_batch",c=t.NEW_AUTH_ERR="err_new_auth_err",f=t.CLEAR="err_clear",p=t.CLEAR_BY="err_clear_by"},function(e,t,n){var r=n(62),o=n(47),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(63)(Object,"create");e.exports=r},function(e,t,n){var r=n(601),o=n(602),i=n(603),a=n(604),u=n(605);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(106);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(607);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(612),o=n(640),i=n(192),a=n(24),u=n(645);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?n:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},fLine truncated
|
||||||
/*!
|
/*!
|
||||||
* @description Recursive object extending
|
* @description Recursive object extending
|
||||||
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
||||||
@@ -48,7 +48,7 @@ var r=n(530),o=n(531),i=n(261);function a(){return s.TYPED_ARRAY_SUPPORT?2147483
|
|||||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(s){return t=o(a,s),(e=o(u,s))===a?void 0:"object"!=typeof e||null===e?void(a[s]=e):Array.isArray(e)?void(a[s]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):n(t)?o[a]=r(t):o[a]=i({},t):o[a]=t}),o}(e)):n(e)?void(a[s]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[s]=i({},e)):void(a[s]=i(t,e))})}),a}}).call(t,n(55).Buffer)},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?function e(t,n){var r;r=Array.isArray(t)?[]:{};n.push(t);Object.keys(t).forEach(function(o){var i=t[o];"function"!=typeof i&&(i&&"object"==typeof i?-1!==n.indexOf(t[o])?r[o]="[Circular]":r[o]=e(t[o],n.slice(0)):r[o]=i)});"string"==typeof t.name&&(r.name=t.name);"string"==typeof t.message&&(r.message=t.message);"string"==typeof t.stack&&(r.stack=t.stack);return r}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){var r=n(590),o=n(606),i=n(608),a=n(609),u=n(610);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(62)(n(36),"Map");e.exports=r},function(e,t,n){var r=n(130),o=n(614),i=n(615),a=n(616),u=n(617),s=n(618);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(628),o=n(295),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=u},function(e,t,n){var r=n(630),o=n(47),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(36),o=n(631),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(t,n(105)(e))},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(278),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(t,n(105)(e))},function(e,t,n){var r=n(24),o=n(128),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoizedSampleFromSchema=t.memoizedCreateXMLExample=t.sampleXmlFromSchema=t.inferSchema=t.sampleFromSchema=void 0,t.createXMLExample=f;var r=n(11),o=a(n(657)),i=a(n(669));function a(e){return e&&e.__esModule?e:{default:e}}var u={string:function(){return"string"},string_email:function(){return"user@example.com"},"string_date-time":function(){return(new Date).toISOString()},number:function(){return 0},number_float:function(){return 0},integer:function(){return 0},boolean:function(e){return"boolean"!=typeof e.default||e.default}},s=function(e){var t=e=(0,r.objectify)(e),n=t.type,o=t.format,i=u[n+"_"+o]||u[n];return(0,r.isFunc)(i)?i(e):"Unknown Type: "+e.type},l=t.sampleFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,r.objectify)(t),i=o.type,a=o.example,u=o.properties,l=o.additionalProperties,c=o.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==a)return(0,r.deeplyStripKey)(a,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!i)if(u)i="object";else{if(!c)return;i="array"}if("object"===i){var d=(0,r.objectify)(u),h={};for(var v in d)d[v]&&d[v].readOnly&&!f||d[v]&&d[v].writeOnly&&!p||(h[v]=e(d[v],n));if(!0===l)h.additionalProp1={}Line truncated
|
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(s){return t=o(a,s),(e=o(u,s))===a?void 0:"object"!=typeof e||null===e?void(a[s]=e):Array.isArray(e)?void(a[s]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):n(t)?o[a]=r(t):o[a]=i({},t):o[a]=t}),o}(e)):n(e)?void(a[s]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[s]=i({},e)):void(a[s]=i(t,e))})}),a}}).call(t,n(55).Buffer)},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?function e(t,n){var r;r=Array.isArray(t)?[]:{};n.push(t);Object.keys(t).forEach(function(o){var i=t[o];"function"!=typeof i&&(i&&"object"==typeof i?-1!==n.indexOf(t[o])?r[o]="[Circular]":r[o]=e(t[o],n.slice(0)):r[o]=i)});"string"==typeof t.name&&(r.name=t.name);"string"==typeof t.message&&(r.message=t.message);"string"==typeof t.stack&&(r.stack=t.stack);return r}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){var r=n(590),o=n(606),i=n(608),a=n(609),u=n(610);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(63)(n(36),"Map");e.exports=r},function(e,t,n){var r=n(130),o=n(614),i=n(615),a=n(616),u=n(617),s=n(618);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(628),o=n(294),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=u},function(e,t,n){var r=n(630),o=n(47),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(36),o=n(631),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(t,n(134)(e))},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(278),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(t,n(134)(e))},function(e,t,n){var r=n(24),o=n(128),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoizedSampleFromSchema=t.memoizedCreateXMLExample=t.sampleXmlFromSchema=t.inferSchema=t.sampleFromSchema=void 0,t.createXMLExample=f;var r=n(9),o=a(n(657)),i=a(n(670));function a(e){return e&&e.__esModule?e:{default:e}}var u={string:function(){return"string"},string_email:function(){return"user@example.com"},"string_date-time":function(){return(new Date).toISOString()},number:function(){return 0},number_float:function(){return 0},integer:function(){return 0},boolean:function(e){return"boolean"!=typeof e.default||e.default}},s=function(e){var t=e=(0,r.objectify)(e),n=t.type,o=t.format,i=u[n+"_"+o]||u[n];return(0,r.isFunc)(i)?i(e):"Unknown Type: "+e.type},l=t.sampleFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,r.objectify)(t),i=o.type,a=o.example,u=o.properties,l=o.additionalProperties,c=o.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==a)return(0,r.deeplyStripKey)(a,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!i)if(u)i="object";else{if(!c)return;i="array"}if("object"===i){var d=(0,r.objectify)(u),h={};for(var v in d)d[v]&&d[v].deprecated||d[v]&&d[v].readOnly&&!f||d[v]&&d[v].writeOnly&&!p||(h[v]=e(d[v],n));if(!0===Line truncated
|
||||||
/**
|
/**
|
||||||
* Checks if an event is supported in the current execution environment.
|
* Checks if an event is supported in the current execution environment.
|
||||||
*
|
*
|
||||||
@@ -62,24 +62,24 @@ function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}func
|
|||||||
* @return {boolean} True if the event is supported.
|
* @return {boolean} True if the event is supported.
|
||||||
* @internal
|
* @internal
|
||||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||||
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},function(e,t,n){"use strict";var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}e.exports=function(e){return o}},function(e,t,n){"use strict";var r=n(89),o=n(789),i=(n(14),n(38),n(219)),a=n(148),u=n(360);function s(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i(function(e,t,n){e.insertBefore(t,n)});function c(e,t,n){r.insertTreeBefore(e,t,n)}function f(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function p(e,t){if(Array.isArray(t)){var n=t[1];d(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function d(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h=o.dangerouslyReplaceNodeWithMarkup;var v={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(u(o,n),d(r,o,t)):d(r,e,t)},processUpdates:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];switch(r.type){case"INSERT_MARKUP":c(e,r.content,s(e,r.afterNode));break;case"MOVE_EXISTING":f(e,r.fromNode,s(e,r.afterNode));break;case"SET_MARKUP":a(e,r.content);break;case"TEXT_CONTENT":u(e,r.content);break;case"REMOVE_NODE":p(e,r.fromNode)}}}};e.exports=v},function(e,t,n){"use strict";e.exports={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}},function(e,t,n){"use strict";e.exports=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}},function(e,t,n){"use strict";var r=n(9),o=n(807),i=n(268)(n(74).isValidElement),a=(n(8),n(10),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function u(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function s(e){u(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){u(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},f={};function p(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var d={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;p(n)}}},getValue:function(e){return e.valueLink?(s(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(s(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(9),o=(n(8),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o&&r("104"),i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(9),o=(n(46),n(113)),i
Line truncated
|
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},function(e,t,n){"use strict";var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}e.exports=function(e){return o}},function(e,t,n){"use strict";var r=n(89),o=n(791),i=(n(15),n(38),n(219)),a=n(149),u=n(359);function s(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i(function(e,t,n){e.insertBefore(t,n)});function c(e,t,n){r.insertTreeBefore(e,t,n)}function f(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function p(e,t){if(Array.isArray(t)){var n=t[1];d(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function d(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h=o.dangerouslyReplaceNodeWithMarkup;var v={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(u(o,n),d(r,o,t)):d(r,e,t)},processUpdates:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];switch(r.type){case"INSERT_MARKUP":c(e,r.content,s(e,r.afterNode));break;case"MOVE_EXISTING":f(e,r.fromNode,s(e,r.afterNode));break;case"SET_MARKUP":a(e,r.content);break;case"TEXT_CONTENT":u(e,r.content);break;case"REMOVE_NODE":p(e,r.fromNode)}}}};e.exports=v},function(e,t,n){"use strict";e.exports={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}},function(e,t,n){"use strict";e.exports=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}},function(e,t,n){"use strict";var r=n(10),o=n(809),i=n(268)(n(75).isValidElement),a=(n(8),n(12),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function u(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function s(e){u(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){u(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},f={};function p(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var d={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;p(n)}}},getValue:function(e){return e.valueLink?(s(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(s(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(10),o=(n(8),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o&&r("104"),i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(10),o=(n(46),n(113)
Line truncated
|
||||||
/*!
|
/*!
|
||||||
* https://github.com/Starcounter-Jack/JSON-Patch
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
||||||
* (c) 2017 Joachim Wester
|
* (c) 2017 Joachim Wester
|
||||||
* MIT license
|
* MIT license
|
||||||
*/function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var n;for(var r in e)if(o(e,r)){if(e[r]===t)return a(r)+"/";if("object"==typeof e[r]&&""!=(n=u(e[r],t)))return a(r)+"/"+n}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=u,t.getPath=function(e,t){if(e===t)return"/";var n=u(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(n=0;n<a;n++)if(e(t[o[n]]))return!0}return!1};var s=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return n(t,e),t}(Error);t.PatchError=s},function(e,t,n){var r=n(49),o=n(154),i=n(71),a=n(115),u=n(917);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,m,y=i(t),g=o(y),b=r(u,h,3),_=a(g.length),w=0,E=n?d(t,_):s?d(t,0):void 0;_>w;w++)if((p||w in g)&&(m=b(v=g[w],w,y),e))if(n)E[w]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return f?-1:l||c?c:E}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeRequest=t.authorizeAccessCodeWithBasicAuthentication=t.authorizeAccessCodeWithFormParams=t.authorizeApplication=t.authorizePassword=t.preAuthorizeImplicit=t.CONFIGURE_AUTH=t.VALIDATE=t.AUTHORIZE_OAUTH2=t.PRE_AUTHORIZE_OAUTH2=t.LOGOUT=t.AUTHORIZE=t.SHOW_AUTH_POPUP=void 0;var r=l(n(45)),o=l(n(23)),i=l(n(40));t.showDefinitions=function(e){return{type:c,payload:e}},t.authorize=function(e){return{type:f,payload:e}},t.logout=function(e){return{type:p,payload:e}},t.authorizeOauth2=function(e){return{type:d,payload:e}},t.configureAuth=function(e){return{type:h,payload:e}};var a=l(n(210)),u=l(n(32)),s=n(11);function l(e){return e&&e.__esModule?e:{default:e}}var c=t.SHOW_AUTH_POPUP="show_popup",f=t.AUTHORIZE="authorize",p=t.LOGOUT="logout",d=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),h=(t.VALIDATE="validate",t.CONFIGURE_AUTH="configure_auth");t.preAuthorizeImplicit=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,l=o.schema,c=o.name,f=l.get("flow");delete u.default.swaggerUIRedirectOauth2,"accessCode"===f||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:(0,i.default)(a)}):n.authorizeOauth2({auth:o,token:a})}};t.authorizePassword=function(e){return function(t){var n=t.authActions,r=e.schema,i=e.name,a=e.username,u=e.password,l=e.passwordType,c=e.clientId,f=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" ")},d={},h={};return"basic"===l?h.Authorization="Basic "+(0,s.btoa)(a+":"+u):((0,o.default)(p,{username:a},{password:u}),"query"===l?(c&&(d.client_id=c),f&&(d.client_secret=f)):h.Authorization="Basic "+(0,s.btoa)(c+":"+f)),n.authorizeRequest({body:(0,s.buildFormData)(p),url:r.get("tokenUrl"),name:i,headers:h,query:d,auth:e})}},t.authorizeApplication=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:l})}},t.authorizeAccessCodeWithFormParams=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(l),name:i,url:o.get("tokenUrl"),auth:t})}},t.authorizeAccessCodeWithBasicAuthentication=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:l})}},t.authorizeRequest=function(Line truncated
|
*/function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var n;for(var r in e)if(o(e,r)){if(e[r]===t)return a(r)+"/";if("object"==typeof e[r]&&""!=(n=u(e[r],t)))return a(r)+"/"+n}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=u,t.getPath=function(e,t){if(e===t)return"/";var n=u(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(n=0;n<a;n++)if(e(t[o[n]]))return!0}return!1};var s=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return n(t,e),t}(Error);t.PatchError=s},function(e,t,n){var r=n(49),o=n(154),i=n(72),a=n(115),u=n(919);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,m,g=i(t),y=o(g),b=r(u,h,3),_=a(y.length),w=0,E=n?d(t,_):s?d(t,0):void 0;_>w;w++)if((p||w in y)&&(m=b(v=y[w],w,g),e))if(n)E[w]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return f?-1:l||c?c:E}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeRequest=t.authorizeAccessCodeWithBasicAuthentication=t.authorizeAccessCodeWithFormParams=t.authorizeApplication=t.authorizePassword=t.preAuthorizeImplicit=t.CONFIGURE_AUTH=t.VALIDATE=t.AUTHORIZE_OAUTH2=t.PRE_AUTHORIZE_OAUTH2=t.LOGOUT=t.AUTHORIZE=t.SHOW_AUTH_POPUP=void 0;var r=l(n(45)),o=l(n(23)),i=l(n(40));t.showDefinitions=function(e){return{type:c,payload:e}},t.authorize=function(e){return{type:f,payload:e}},t.logout=function(e){return{type:p,payload:e}},t.authorizeOauth2=function(e){return{type:d,payload:e}},t.configureAuth=function(e){return{type:h,payload:e}};var a=l(n(210)),u=l(n(33)),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}var c=t.SHOW_AUTH_POPUP="show_popup",f=t.AUTHORIZE="authorize",p=t.LOGOUT="logout",d=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),h=(t.VALIDATE="validate",t.CONFIGURE_AUTH="configure_auth");t.preAuthorizeImplicit=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,l=o.schema,c=o.name,f=l.get("flow");delete u.default.swaggerUIRedirectOauth2,"accessCode"===f||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:(0,i.default)(a)}):n.authorizeOauth2({auth:o,token:a})}};t.authorizePassword=function(e){return function(t){var n=t.authActions,r=e.schema,i=e.name,a=e.username,u=e.password,l=e.passwordType,c=e.clientId,f=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" ")},d={},h={};return"basic"===l?h.Authorization="Basic "+(0,s.btoa)(a+":"+u):((0,o.default)(p,{username:a},{password:u}),"query"===l?(c&&(d.client_id=c),f&&(d.client_secret=f)):h.Authorization="Basic "+(0,s.btoa)(c+":"+f)),n.authorizeRequest({body:(0,s.buildFormData)(p),url:r.get("tokenUrl"),name:i,headers:h,query:d,auth:e})}},t.authorizeApplication=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:l})}},t.authorizeAccessCodeWithFormParams=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(l),name:i,url:o.get("tokenUrl"),auth:t})}},t.authorizeAccessCodeWithBasicAuthentication=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:l})}},t.authorizeRequest=function(eLine truncated
|
||||||
/*!
|
/*!
|
||||||
* cookie
|
* cookie
|
||||||
* Copyright(c) 2012-2014 Roman Shtylman
|
* Copyright(c) 2012-2014 Roman Shtylman
|
||||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||||
* MIT Licensed
|
* MIT Licensed
|
||||||
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),s=o.decode||r,l=0;l<a.length;l++){var c=a[l],f=c.indexOf("=");if(!(f<0)){var p=c.substr(0,f).trim(),d=c.substr(++f,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[p]&&(n[p]=u(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var u=i(t);if(u&&!a.test(u))throw new TypeError("argument val is invalid");var s=e+"="+u;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){var c="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function u(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){var i=1024*(r-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){var e;function n(e,t){function n(e,t,n){if(!r(e))return n;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<n))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function r(e){return a.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(i.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!r(e))return t;for(var n=o(),i=0;null!==n.exec(e)&&!(n.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:n(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),o=a.exec(r);return null===o?r[0]:o[0]},e.charCodeAt=function(e,t){var r=function(e,t){return n(e,new RegExp(i.source,"g"),t)}(e,t);if(r<0)return NaN;var o=e.charCodeAt(r);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(r+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),o=e.indexOf(t,r);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var o=this.findByteIndex(e,n);r=e.lastIndexOf(t,o)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(o,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),o=[];r>0;)o.push(255&r),r>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n]<<8|e[n+1];t.push(String.fromCharCode(r))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}void 0!==t&&null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},n(e,[]),n(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t){e.exports='---\nurl: "https://
Line truncated
|
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),s=o.decode||r,l=0;l<a.length;l++){var c=a[l],f=c.indexOf("=");if(!(f<0)){var p=c.substr(0,f).trim(),d=c.substr(++f,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[p]&&(n[p]=u(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var u=i(t);if(u&&!a.test(u))throw new TypeError("argument val is invalid");var s=e+"="+u;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){var c="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function u(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){var i=1024*(r-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){var e;function n(e,t){function n(e,t,n){if(!r(e))return n;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<n))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function r(e){return a.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(i.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!r(e))return t;for(var n=o(),i=0;null!==n.exec(e)&&!(n.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:n(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),o=a.exec(r);return null===o?r[0]:o[0]},e.charCodeAt=function(e,t){var r=function(e,t){return n(e,new RegExp(i.source,"g"),t)}(e,t);if(r<0)return NaN;var o=e.charCodeAt(r);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(r+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),o=e.indexOf(t,r);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var o=this.findByteIndex(e,n);r=e.lastIndexOf(t,o)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(o,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),o=[];r>0;)o.push(255&r),r>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n]<<8|e[n+1];t.push(String.fromCharCode(r))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}void 0!==t&&null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},n(e,[]),n(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t){e.exports='---\nurl: "https://
Line truncated
|
||||||
/*!
|
/*!
|
||||||
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||||
* Licensed under the MIT License.
|
* Licensed under the MIT License.
|
||||||
*/var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,n)}},function(e,t,n){var r=n(283)(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()});e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),f(n(12)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e,t,n){var r=i.props;(0,r.specActions.changeParamByIdentity)(r.onChangeKey,e,t,n)},i.onChangeConsumesWrapper=function(e){var t=i.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,r=t.onCancelClick,o=t.parameters,i=t.allowTryItOut,a=t.tryItOutEnabled,u=t.specPath,s=t.fn,f=t.getComponent,p=t.getConfigs,d=t.specSelectors,h=t.pathMethod,v=f("parameterRow"),m=f("TryItOutButton"),y=a&&i;return l.default.createElement("div",{className:"opblock-section"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Parameters")),i?l.default.createElement(m,{enabled:a,onCancelClick:r,onTryoutClick:n}):null),o.count()?l.default.createElement("div",{className:"table-container"},l.default.createElement("table",{className:"parameters"},l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),l.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),l.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(c.default.Map.isMap).map(t)}(o,function(t,n){return l.default.createElement(v,{fn:s,specPath:u.push(n.toString()),getComponent:f,getConfigs:p,rawParam:t,param:d.parameterWithMetaByIdentity(h,t),key:t.get("in")+"."+t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:d,pathMethod:h,isExecute:y})}).toArray()))):l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("p",null,"No parameters")))}}]),t}(s.Component);p.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterExt=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.ParameterExt=function(e){var t=e.xKey,n=e.xVal;return r.default.createElement("div",{className:"parameter__extension"},t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=n(0),l=d(s),c=n(7),f=(d(n(1)),d(n(12)),d(n(32))),p=n(11);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.onChangeWrapper=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props;return(0,n.onChange)(n.rawParam,e,t)},i.setDefaultValue=function(){var e=i.props,t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.parameterWithMetaByIdentity(n,r);if(void 0===o.get("value")&&"body"!==o.get("in")){var a=void 0;t.isSwagger2()?a=o.get("x-example")||o.getIn(["default"])||o.getIn(["schema","example"])||o.getIn(["schema","default"]):t.isOAS3()&&(a=o.get("example")||o.getIn(["schema","example"])||o.getIn(["schema","default"])),void 0!==a&&i.onChangeWrapper((0,p.numberToString)(a))}},i.setDefaultValue(),i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.isOAS3,i=t.parameterWithMetaByIdentity(n,r);i=i.isEmpty()?r:i;var a=void 0;o()?a=(i.get("schema")||(0,c.Map)()).get("enum"):a=i?i.get("enum"):void 0;var u=i?i.get("value"):void 0,s=void 0;void 0!==u?s=u:r.get("required")&&a&&a.size&&(s=a.first()),void 0!==s&&s!==u&&this.onChangeWrapper((0,p.numberToString)(s)),this.setDefaultValue()}},{key:"render",value:function(){var e=this.props,t=e.param,n=e.rawParam,r=e.getComponent,o=e.getConfigs,i=e.isExecute,a=e.fn,u=e.onChangeConsumes,s=e.specSelectors,c=e.pathMethod,d=e.specPath,h=s.isOAS3,v=o(),m=v.showExtensions,y=v.showCommonExtensions,g=r("JsonSchemaForm"),b=r("ParamBody"),_=t.get("in"),w="body"!==_?nLine truncated
|
*/var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,n)}},function(e,t,n){var r=n(61);e.exports=function(e){return r(e).toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),f(n(11)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e,t,n){var r=i.props;(0,r.specActions.changeParamByIdentity)(r.onChangeKey,e,t,n)},i.onChangeConsumesWrapper=function(e){var t=i.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,r=t.onCancelClick,o=t.parameters,i=t.allowTryItOut,a=t.tryItOutEnabled,u=t.specPath,s=t.fn,f=t.getComponent,p=t.getConfigs,d=t.specSelectors,h=t.specActions,v=t.pathMethod,m=f("parameterRow"),g=f("TryItOutButton"),y=a&&i;return l.default.createElement("div",{className:"opblock-section"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Parameters")),i?l.default.createElement(g,{enabled:a,onCancelClick:r,onTryoutClick:n}):null),o.count()?l.default.createElement("div",{className:"table-container"},l.default.createElement("table",{className:"parameters"},l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),l.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),l.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(c.default.Map.isMap).map(t)}(o,function(t,n){return l.default.createElement(m,{fn:s,specPath:u.push(n.toString()),getComponent:f,getConfigs:p,rawParam:t,param:d.parameterWithMetaByIdentity(v,t),key:t.get("in")+"."+t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:d,specActions:h,pathMethod:v,isExecute:y})}).toArray()))):l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("p",null,"No parameters")))}}]),t}(s.Component);p.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterExt=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.ParameterExt=function(e){var t=e.xKey,n=e.xVal;return r.default.createElement("div",{className:"parameter__extension"},t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterIncludeEmpty=void 0;var r=i(n(0)),o=i(n(114));i(n(1)),i(n(11));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.ParameterIncludeEmpty=function(e){var t=e.param,n=e.isIncluded,i=e.onChange,a=e.isDisabled;return t.get("allowEmptyValue")?r.default.createElement("div",{className:(0,o.default)("parameter__empty_value_toggle",{disabled:a})},r.default.createElement("input",{type:"checkbox",disabled:a,checked:!a&&n,onChange:function(e){i(e.target.checked)}}),"Send empty value"):null};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=n(0),l=d(s),c=n(7),f=(d(n(1)),d(n(11)),d(n(33))),p=n(9);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.onChangeWrapper=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props;return(0,n.onChange)(n.rawParam,""===e||e&&0===e.size?null:e,t)},i.onChangeIncludeEmpty=function(e){var t=i.props,n=t.specActions,r=t.param,o=t.pathMethod,a=r.get("name"),u=r.get("in");return n.updateEmptyParamInclusion(o,a,u,e)},i.setDefaultValue=function(){var e=i.props,t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.parameterWithMetaByIdentity(n,r);if(void 0===o.get("value")&&"body"!==o.get("in")){var a=void 0;t.isSwagger2()?a=o.get("x-example")||o.getIn(["default"])||o.getIn(["schema","example"])||o.getIn(["schema","default"]):t.isOAS3()&&(a=o.get("example")||o.getIn(["schema","example"])||o.getIn(["schema","default"])),void 0!==a&&i.onChangeWrapper((0,p.numberToString)(a))}},i.setDefaultValue(),i}return(Line truncated
|
||||||
/*!
|
/*!
|
||||||
* Autolinker.js
|
* Autolinker.js
|
||||||
* 0.15.3
|
* 0.15.3
|
||||||
@@ -89,5 +89,5 @@ function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}func
|
|||||||
*
|
*
|
||||||
* https://github.com/gregjacobs/Autolinker.js
|
* https://github.com/gregjacobs/Autolinker.js
|
||||||
*/
|
*/
|
||||||
var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=a.getType(),s=a.getText();if("element"===u)"a"===a.getTagName()&&(a.isClosing()?n=Math.max(n-1,0):n++),r.push(s);else if("entity"===u)r.push(s);else if(0===n){var l=this.linkifyStr(s);r.push(l)}else r.push(s)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof o.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new o.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new o.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new o.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},o.link=function(e,t){return new o(t).link(e)},o.match={},o.htmlParser={},o.matchParser={},o.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,i=function(){};i.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new i;return a.constructor=n,a.superclass=r,delete t.constructor,o.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},o.HtmlTag=o.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){o.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return o.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);t=u.shift();)-1===i(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);a.length&&(t=u.shift());){var s=i(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),o.AnchorTagBuilder=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},build:function(e){return new o.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref()),innerHtml:this.processAnchorText(e.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(e){return o.Util.ellipsis(e,this.truncate||Number.POSITIVE_INFINITY)}}),o.htmlParser.HtmlParser=o.Util.extend(Object,{htmlRegex:(e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?",new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","\\s+",t,")*","\\s*/?",">",")"].join(""),"gi")),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var a=t[0],u=t[1]||t[3],s=!!t[2],l=e.substring(o,t.index)Line truncated
|
var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=a.getType(),s=a.getText();if("element"===u)"a"===a.getTagName()&&(a.isClosing()?n=Math.max(n-1,0):n++),r.push(s);else if("entity"===u)r.push(s);else if(0===n){var l=this.linkifyStr(s);r.push(l)}else r.push(s)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof o.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new o.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new o.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new o.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},o.link=function(e,t){return new o(t).link(e)},o.match={},o.htmlParser={},o.matchParser={},o.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,i=function(){};i.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new i;return a.constructor=n,a.superclass=r,delete t.constructor,o.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},o.HtmlTag=o.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){o.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return o.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);t=u.shift();)-1===i(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);a.length&&(t=u.shift());){var s=i(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),o.AnchorTagBuilder=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},build:function(e){return new o.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref()),innerHtml:this.processAnchorText(e.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(e){return o.Util.ellipsis(e,this.truncate||Number.POSITIVE_INFINITY)}}),o.htmlParser.HtmlParser=o.Util.extend(Object,{htmlRegex:(e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?",new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","\\s+",t,")*","\\s*/?",">",")"].join(""),"gi")),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var a=t[0],u=t[1]||t[3],s=!!t[2],l=e.substring(o,t.index)Line truncated
|
||||||
//# sourceMappingURL=swagger-ui-bundle.js.map
|
//# sourceMappingURL=swagger-ui-bundle.js.map
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=206)}([function(t,e,n){"use strict";var r=n(52),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,u;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,u={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){u[String(e)]=t})}),u),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},function(t,e,n){var r=n(133)("wks"),i=n(97),o=n(3).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(3),i=n(10),o=n(18),u=n(28),a=n(60),s=function(t,e,n){var c,f,l,p,h=t&s.F,d=t&s.G,v=t&s.S,y=t&s.P,g=t&s.B,m=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(c in d&&(n=e),n)l=((f=!h&&m&&void 0!==m[c])?m:n)[c],p=g&&f?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,m&&u(m,c,l,t&s.U),_[c]!=l&&o(_,c,p),y&&b[c]!=l&&(b[c]=l)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(4),i=n(42),o=n(11),u=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(u,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){var r=n(91)("wks"),i=n(55),o=n(9).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(169),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){var r=n(9),i=n(2),o=n(126),u=n(25),a=function(t,e,n){var s,c,f,l=t&a.F,p=t&a.G,h=t&a.S,d=t&a.P,v=t&a.B,y=t&a.W,g=p?i:i[e]||(i[e]={}),m=g.prototype,_=p?r:h?r[e]:(r[e]||{}).prototype;for(s in p&&(n=e),n)(c=!l&&_&&void 0!==_[s])&&s in g||(f=c?_[s]:n[s],g[s]=p&&"function"!=typeof _[s]?n[s]:v&&c?o(f,r):y&&_[s]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):d&&"function"==typeof f?o(Function.call,f):f,d&&((g.virtual||(g.virtual={}))[s]=f,t&a.R&&m&&!m[s]&&u(m,s,f)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(26),i=n(127),o=n(87),u=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}Line truncated
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=206)}([function(t,e,n){"use strict";var r=n(52),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.exports=function(t,e){var n,u;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===i.indexOf(e))throw new r('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(n=e.styleAliases||null,u={},null!==n&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){u[String(e)]=t})}),u),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},function(t,e,n){var r=n(133)("wks"),i=n(97),o=n(3).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(3),i=n(10),o=n(18),u=n(29),a=n(61),s=function(t,e,n){var c,f,l,p,h=t&s.F,d=t&s.G,v=t&s.S,y=t&s.P,g=t&s.B,m=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(c in d&&(n=e),n)l=((f=!h&&m&&void 0!==m[c])?m:n)[c],p=g&&f?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,m&&u(m,c,l,t&s.U),_[c]!=l&&o(_,c,p),y&&b[c]!=l&&(b[c]=l)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(4),i=n(42),o=n(11),u=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(u,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){var r=n(91)("wks"),i=n(56),o=n(9).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(169),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){var r=n(9),i=n(2),o=n(126),u=n(25),a=n(17),s=function(t,e,n){var c,f,l,p=t&s.F,h=t&s.G,d=t&s.S,v=t&s.P,y=t&s.B,g=t&s.W,m=h?i:i[e]||(i[e]={}),_=m.prototype,b=h?r:d?r[e]:(r[e]||{}).prototype;for(c in h&&(n=e),n)(f=!p&&b&&void 0!==b[c])&&a(m,c)||(l=f?b[c]:n[c],m[c]=h&&"function"!=typeof b[c]?n[c]:y&&f?o(l,r):g&&b[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[c]=l,t&s.R&&_&&!_[c]&&u(_,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(26),i=n(127),o=n(87),u=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(28)(function(){return 7!=Object.defineProperty({},"a",{get:function(){rLine truncated
|
||||||
/*
|
/*
|
||||||
object-assign
|
object-assign
|
||||||
(c) Sindre Sorhus
|
(c) Sindre Sorhus
|
||||||
@license MIT
|
@license MIT
|
||||||
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,a=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))i.call(n,c)&&(a[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(a[u[f]]=n[u[f]])}}return a}},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,u,a,s){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,i,o,u,a,s],l=0;(c=new Error(e.replace(/%s/g,function(){return f[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(344);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(67),i=n(346),o=n(347),u="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:u:s&&s in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(66).Buffer)},function(t,e,n){"use strict";function r(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=r},function(t,e,n){"use strict";var r=n(36);t.exports=new r({include:[n(202)],implicit:[n(531),n(532)],explicit:[n(533),n(534),n(535),n(536)]})},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(85);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(19),i=n(224),o=n(225),u=Object.defineProperty;e.f=n(41)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(61);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(230),i=n(11);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(18),i=n(28),o=n(42),u=n(11),a=n(1);t.exports=function(t,e,n){var s=a(t),c=n(u,s,""[t]),f=c[0],l=c[1];o(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,s,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},functioLine truncated
|
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,u,a=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))i.call(n,c)&&(a[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)o.call(n,u[f])&&(a[u[f]]=n[u[f]])}}return a}},function(t,e,n){"use strict";var r=function(t){};t.exports=function(t,e,n,i,o,u,a,s){if(r(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,i,o,u,a,s],l=0;(c=new Error(e.replace(/%s/g,function(){return f[l++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(t,e,n){var r=n(344);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(68),i=n(346),o=n(347),u="[object Null]",a="[object Undefined]",s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:u:s&&s in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,n(67).Buffer)},function(t,e,n){"use strict";function r(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=r},function(t,e,n){"use strict";var r=n(37);t.exports=new r({include:[n(202)],implicit:[n(532),n(533)],explicit:[n(534),n(535),n(536),n(537)]})},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(86);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(19),i=n(224),o=n(225),u=Object.defineProperty;e.f=n(41)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(62);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(230),i=n(11);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(18),i=n(29),o=n(42),u=n(11),a=n(1);t.exports=function(t,e,n){var s=a(t),c=n(u,s,""[t]),f=c[0],l=c[1];o(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,s,2==e?function(t,e){return l.call(t,this,e)}:function(t){returnLine truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var r=n(326),i=n(327),o=n(167);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(s.isBuffer(e)){var n=0|h(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=a(t,e<0?0:0|h(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,u=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,n/=2}function c(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[n+u]=a}return u}function _(t,e,n,r){return q(U(e,t.length-n),t,n,r)}function b(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function x(t,e,n,r){return q(B(e),t,n,r)}function S(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)n=t.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,u,a,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],u=t[i+2],128=Line truncated
|
var r=n(326),i=n(327),o=n(167);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(s.isBuffer(e)){var n=0|h(e.length);return 0===(t=a(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=a(t,e<0?0:0|h(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|h(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,u=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,n/=2}function c(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}if(i){var f=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(t,o+p)!==c(e,p)){l=!1;break}if(l)return o}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[n+u]=a}return u}function _(t,e,n,r){return q(U(e,t.length-n),t,n,r)}function b(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return b(t,e,n,r)}function x(t,e,n,r){return q(B(e),t,n,r)}function S(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)n=t.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,u,a,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],u=t[i+2],128=Line truncated
|
||||||
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
|
//# sourceMappingURL=swagger-ui-standalone-preset.js.map
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
.swagger-ui{
|
.swagger-ui{
|
||||||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif;color:#3b4151}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54Line truncated
|
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */font-family:sans-serif;color:#3b4151}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54Line truncated
|
||||||
/*# sourceMappingURL=swagger-ui.css.map*/
|
/*# sourceMappingURL=swagger-ui.css.map*/
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["SwaggerUICore"]=factory();else root["SwaggerUICore"]=factory()})(typeof self!=="undefined"?self:this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="/dist";return __webpack_require__(__webpack_require__.s=288)}([function(module,exports){module.exports=require("react")},function(module,exports){module.exports=require("prop-types")},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;exports.default=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _defineProperty=__webpack_require__(179);var _defineProperty2=_interopRequireDefault(_defineProperty);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;(0,_defineProperty2.default)(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}()},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(529),__esModule:true}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _typeof2=__webpack_require__(36);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&((typeof call==="undefined"?"undefined":(0,_typeof3.default)(call))==="object"||typeof call==="function")?call:self}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _setPrototypeOf=__webpack_require__(531);var _setPrototypeOf2=_interopRequireDefault(_setPrototypeOf);var _create=__webpack_require__(535);var _create2=_interopRequireDefault(_create);var _typeof2=__webpack_require__(36);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+(typeof superClass==="undefined"?"undefined":(0,_typeof3.default)(superClass)))}subClass.prototype=(0,_create2.default)(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(subClass,superClass):subClass.__proto__=superClass}},function(module,exports){module.exports=require("immutable")},function(module,exports,__webpack_require__){"use strict";(function(Buffer){Object.defineProperty(exports,"__esModule",{value:true});exports.getCommonExtensions=exports.getExtensions=exports.escapeDeepLinkPath=exports.createDeepLinkPath=exports.shallowEqualKeys=exports.buildFormData=exports.sorters=exports.btoa=exports.serializeSearch=exports.parseSearch=exports.getSampleSchema=exports.validateParam=exports.validatePattern=exports.validateMinLength=exports.validateMaxLength=exports.validateGuid=exports.validateDateTime=exports.validateString=exports.validateBoolean=exports.validateFile=exports.validateInteger=exports.validateNumber=exports.validateMinimum=exports.validateMaximum=exports.propChecker=exports.memoize=exports.isImmutable=undefined;var _stringify=__webpack_require__(30);var _stringify2=_interopRequireDefault(_stringiLine truncated
|
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["SwaggerUICore"]=factory();else root["SwaggerUICore"]=factory()})(typeof self!=="undefined"?self:this,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="/dist";return __webpack_require__(__webpack_require__.s=287)}([function(module,exports){module.exports=require("react")},function(module,exports){module.exports=require("prop-types")},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;exports.default=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _defineProperty=__webpack_require__(179);var _defineProperty2=_interopRequireDefault(_defineProperty);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;(0,_defineProperty2.default)(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}()},function(module,exports,__webpack_require__){module.exports={default:__webpack_require__(530),__esModule:true}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _typeof2=__webpack_require__(37);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&((typeof call==="undefined"?"undefined":(0,_typeof3.default)(call))==="object"||typeof call==="function")?call:self}},function(module,exports,__webpack_require__){"use strict";exports.__esModule=true;var _setPrototypeOf=__webpack_require__(532);var _setPrototypeOf2=_interopRequireDefault(_setPrototypeOf);var _create=__webpack_require__(536);var _create2=_interopRequireDefault(_create);var _typeof2=__webpack_require__(37);var _typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default=function(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+(typeof superClass==="undefined"?"undefined":(0,_typeof3.default)(superClass)))}subClass.prototype=(0,_create2.default)(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)_setPrototypeOf2.default?(0,_setPrototypeOf2.default)(subClass,superClass):subClass.__proto__=superClass}},function(module,exports){module.exports=require("immutable")},function(module,exports,__webpack_require__){"use strict";(function(Buffer){Object.defineProperty(exports,"__esModule",{value:true});exports.getCommonExtensions=exports.getExtensions=exports.escapeDeepLinkPath=exports.createDeepLinkPath=exports.shallowEqualKeys=exports.buildFormData=exports.sorters=exports.btoa=exports.serializeSearch=exports.parseSearch=exports.getSampleSchema=exports.validateParam=exports.validatePattern=exports.validateMinLength=exports.validateMaxLength=exports.validateGuid=exports.validateDateTime=exports.validateString=exports.validateBoolean=exports.validateFile=exports.validateInteger=exports.validateNumber=exports.validateMinimum=exports.validateMaximum=exports.propChecker=exports.memoize=exports.isImmutable=undefined;var _stringify=__webpack_require__(30);var _stringify2=_interopRequireDefault(_stringiLine truncated
|
||||||
/*!
|
/*!
|
||||||
* The buffer module from node.js, for the browser.
|
* The buffer module from node.js, for the browser.
|
||||||
*
|
*
|
||||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
var base64=__webpack_require__(384);var ieee754=__webpack_require__(385);var isArray=__webpack_require__(386);exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){returnLine truncated
|
var base64=__webpack_require__(383);var ieee754=__webpack_require__(384);var isArray=__webpack_require__(385);exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){returnLine truncated
|
||||||
//# sourceMappingURL=swagger-ui.js.map
|
//# sourceMappingURL=swagger-ui.js.map
|
||||||
@@ -6,6 +6,11 @@ function patchSwaggerUi() {
|
|||||||
var authWrapper = document.querySelector('.auth-wrapper');
|
var authWrapper = document.querySelector('.auth-wrapper');
|
||||||
var authorizeButton = document.querySelector('.auth-wrapper .authorize');
|
var authorizeButton = document.querySelector('.auth-wrapper .authorize');
|
||||||
var djangoSessionAuth = document.querySelector('#django-session-auth');
|
var djangoSessionAuth = document.querySelector('#django-session-auth');
|
||||||
|
if (!djangoSessionAuth) {
|
||||||
|
console.log("WARNING: session auth disabled");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (document.querySelector('.auth-wrapper #django-session-auth')) {
|
if (document.querySelector('.auth-wrapper #django-session-auth')) {
|
||||||
console.log("WARNING: session auth already patched; skipping patchSwaggerUi()");
|
console.log("WARNING: session auth already patched; skipping patchSwaggerUi()");
|
||||||
return;
|
return;
|
||||||
@@ -27,7 +32,6 @@ function initSwaggerUi() {
|
|||||||
var swaggerConfig = {
|
var swaggerConfig = {
|
||||||
url: specURL,
|
url: specURL,
|
||||||
dom_id: '#swagger-ui',
|
dom_id: '#swagger-ui',
|
||||||
displayOperationId: true,
|
|
||||||
displayRequestDuration: true,
|
displayRequestDuration: true,
|
||||||
presets: [
|
presets: [
|
||||||
SwaggerUIBundle.presets.apis,
|
SwaggerUIBundle.presets.apis,
|
||||||
@@ -57,7 +61,7 @@ function initSwaggerUi() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(swaggerSettings);
|
console.log('swaggerSettings', swaggerSettings);
|
||||||
for (var p in swaggerSettings) {
|
for (var p in swaggerSettings) {
|
||||||
if (swaggerSettings.hasOwnProperty(p)) {
|
if (swaggerSettings.hasOwnProperty(p)) {
|
||||||
swaggerConfig[p] = swaggerSettings[p];
|
swaggerConfig[p] = swaggerSettings[p];
|
||||||
@@ -66,7 +70,7 @@ function initSwaggerUi() {
|
|||||||
window.ui = SwaggerUIBundle(swaggerConfig);
|
window.ui = SwaggerUIBundle(swaggerConfig);
|
||||||
|
|
||||||
var oauth2Config = JSON.parse(document.getElementById('oauth2-config').innerHTML);
|
var oauth2Config = JSON.parse(document.getElementById('oauth2-config').innerHTML);
|
||||||
console.log(oauth2Config);
|
console.log('oauth2Config', oauth2Config);
|
||||||
window.ui.initOAuth(oauth2Config);
|
window.ui.initOAuth(oauth2Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
||||||
|
|
||||||
|
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
||||||
|
<script src="{% static 'drf-yasg/redoc-init.js' %}"> </script>
|
||||||
|
<script src="{% static 'drf-yasg/redoc-old/redoc.min.js' %}"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -7,12 +7,18 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/style.css' %}"/>
|
||||||
|
{% block extra_styles %}
|
||||||
|
{# -- Add any additional CSS scripts here -- #}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
||||||
|
|
||||||
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/redoc-init.js' %}"> </script>
|
<script src="{% static 'drf-yasg/redoc-init.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/redoc/redoc.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/redoc/redoc.min.js' %}"></script>
|
||||||
|
{% block extra_scripts %}
|
||||||
|
{# -- Add any additional scripts here -- #}
|
||||||
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -11,53 +11,14 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/swagger-ui-dist/swagger-ui.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'drf-yasg/swagger-ui-dist/swagger-ui.css' %}">
|
||||||
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-32x32.png' %}" sizes="32x32"/>
|
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-32x32.png' %}" sizes="32x32"/>
|
||||||
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-16x16.png' %}" sizes="16x16"/>
|
<link rel="icon" type="image/png" href="{% static 'drf-yasg/swagger-ui-dist/favicon-16x16.png' %}" sizes="16x16"/>
|
||||||
|
{% block extra_styles %}
|
||||||
|
{# -- Add any additional CSS scripts here -- #}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="swagger-body">
|
<body class="swagger-body">
|
||||||
|
|
||||||
<svg class="swagger-defs" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<defs>
|
|
||||||
<symbol viewBox="0 0 20 20" id="unlocked">
|
|
||||||
<path
|
|
||||||
d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 20 20" id="locked">
|
|
||||||
<path
|
|
||||||
d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 20 20" id="close">
|
|
||||||
<path
|
|
||||||
d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 20 20" id="large-arrow">
|
|
||||||
<path
|
|
||||||
d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 20 20" id="large-arrow-down">
|
|
||||||
<path
|
|
||||||
d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 24 24" id="jump-to">
|
|
||||||
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
<symbol viewBox="0 0 24 24" id="expand">
|
|
||||||
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"></path>
|
|
||||||
</symbol>
|
|
||||||
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
<div id="swagger-ui"></div>
|
<div id="swagger-ui"></div>
|
||||||
<div id="spec-error" class="hidden alert alert-danger"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<script id="swagger-settings" type="application/json">{{ swagger_settings | safe }}</script>
|
<script id="swagger-settings" type="application/json">{{ swagger_settings | safe }}</script>
|
||||||
<script id="oauth2-config" type="application/json">{{ oauth2_config | safe }}</script>
|
<script id="oauth2-config" type="application/json">{{ oauth2_config | safe }}</script>
|
||||||
@@ -66,33 +27,43 @@
|
|||||||
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js' %}"></script>
|
<script src="{% static 'drf-yasg/swagger-ui-dist/swagger-ui-standalone-preset.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
<script src="{% static 'drf-yasg/insQ.min.js' %}"></script>
|
||||||
<script src="{% static 'drf-yasg/swagger-ui-init.js' %}"></script>
|
<script src="{% static 'drf-yasg/swagger-ui-init.js' %}"></script>
|
||||||
|
{% block extra_scripts %}
|
||||||
|
{# -- Add any additional scripts here -- #}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
<a id="oauth2-redirect-url" href="{% static 'drf-yasg/swagger-ui-dist/oauth2-redirect.html' %}" class="hidden"></a>
|
<a id="oauth2-redirect-url" href="{% static 'drf-yasg/swagger-ui-dist/oauth2-redirect.html' %}" class="hidden"></a>
|
||||||
|
|
||||||
<div id="django-session-auth" class="hidden">
|
{% if USE_SESSION_AUTH %}
|
||||||
{% if USE_SESSION_AUTH %}
|
<div id="django-session-auth" class="hidden">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{% block user_context_message %}
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<div class="hello">
|
<div class="hello">
|
||||||
<span class="django-session">Django</span> <span class="label label-primary">{{ request.user }}</span>
|
<span class="django-session">Django</span> <span class="label label-primary">{{ request.user }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
<div class='btn authorize'>
|
<div class='btn authorize'>
|
||||||
<a id="auth" class="header__btn" href="{{ LOGOUT_URL }}?next={{ request.path }}" data-sw-translate>
|
<a id="auth" class="header__btn" href="{{ LOGOUT_URL }}?next={{ request.path }}" data-sw-translate>
|
||||||
|
{% block django_logout_message %}
|
||||||
Django Logout
|
Django Logout
|
||||||
|
{% endblock %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class='btn authorize'>
|
<div class='btn authorize'>
|
||||||
<a id="auth" class="header__btn" href="{{ LOGIN_URL }}?next={{ request.path }}" data-sw-translate>
|
<a id="auth" class="header__btn" href="{{ LOGIN_URL }}?next={{ request.path }}" data-sw-translate>
|
||||||
|
{% block django_login_message %}
|
||||||
Django Login
|
Django Login
|
||||||
|
{% endblock %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+118
-18
@@ -8,8 +8,11 @@ from rest_framework import serializers, status
|
|||||||
from rest_framework.mixins import DestroyModelMixin, RetrieveModelMixin, UpdateModelMixin
|
from rest_framework.mixins import DestroyModelMixin, RetrieveModelMixin, UpdateModelMixin
|
||||||
from rest_framework.request import is_form_media_type
|
from rest_framework.request import is_form_media_type
|
||||||
from rest_framework.settings import api_settings as rest_framework_settings
|
from rest_framework.settings import api_settings as rest_framework_settings
|
||||||
|
from rest_framework.utils import encoders, json
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
|
|
||||||
|
from .app_settings import swagger_settings
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -24,9 +27,9 @@ class unset(object):
|
|||||||
|
|
||||||
|
|
||||||
def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_body=None, query_serializer=None,
|
def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_body=None, query_serializer=None,
|
||||||
manual_parameters=None, operation_id=None, operation_description=None, security=None,
|
manual_parameters=None, operation_id=None, operation_description=None, operation_summary=None,
|
||||||
responses=None, field_inspectors=None, filter_inspectors=None, paginator_inspectors=None,
|
security=None, deprecated=None, responses=None, field_inspectors=None, filter_inspectors=None,
|
||||||
**extra_overrides):
|
paginator_inspectors=None, **extra_overrides):
|
||||||
"""Decorate a view method to customize the :class:`.Operation` object generated from it.
|
"""Decorate a view method to customize the :class:`.Operation` object generated from it.
|
||||||
|
|
||||||
`method` and `methods` are mutually exclusive and must only be present when decorating a view method that accepts
|
`method` and `methods` are mutually exclusive and must only be present when decorating a view method that accepts
|
||||||
@@ -47,7 +50,7 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
the `manual_parameters` argument.
|
the `manual_parameters` argument.
|
||||||
|
|
||||||
If a ``Serializer`` class or instance is given, it will be automatically converted into a :class:`.Schema`
|
If a ``Serializer`` class or instance is given, it will be automatically converted into a :class:`.Schema`
|
||||||
used as a ``body`` :class:`.Parameter`, or into a list of ``form`` :class:`.Parameter`\ s, as appropriate.
|
used as a ``body`` :class:`.Parameter`, or into a list of ``form`` :class:`.Parameter`\\ s, as appropriate.
|
||||||
|
|
||||||
:param .Serializer query_serializer: if you use a ``Serializer`` to parse query parameters, you can pass it here
|
:param .Serializer query_serializer: if you use a ``Serializer`` to parse query parameters, you can pass it here
|
||||||
and have :class:`.Parameter` objects be generated automatically from it.
|
and have :class:`.Parameter` objects be generated automatically from it.
|
||||||
@@ -60,16 +63,18 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
|
|
||||||
:param list[.Parameter] manual_parameters: a list of manual parameters to override the automatically generated ones
|
:param list[.Parameter] manual_parameters: a list of manual parameters to override the automatically generated ones
|
||||||
|
|
||||||
:class:`.Parameter`\ s are identified by their (``name``, ``in``) combination, and any parameters given
|
:class:`.Parameter`\\ s are identified by their (``name``, ``in``) combination, and any parameters given
|
||||||
here will fully override automatically generated parameters if they collide.
|
here will fully override automatically generated parameters if they collide.
|
||||||
|
|
||||||
It is an error to supply ``form`` parameters when the request does not consume form-data.
|
It is an error to supply ``form`` parameters when the request does not consume form-data.
|
||||||
|
|
||||||
:param str operation_id: operation ID override; the operation ID must be unique accross the whole API
|
:param str operation_id: operation ID override; the operation ID must be unique accross the whole API
|
||||||
:param str operation_description: operation description override
|
:param str operation_description: operation description override
|
||||||
|
:param str operation_summary: operation summary string
|
||||||
:param list[dict] security: security requirements override; used to specify which authetication mechanism
|
:param list[dict] security: security requirements override; used to specify which authetication mechanism
|
||||||
is requried to call this API; an empty list marks the endpoint as unauthenticated (i.e. removes all accepted
|
is requried to call this API; an empty list marks the endpoint as unauthenticated (i.e. removes all accepted
|
||||||
authentication schemes), and ``None`` will inherit the top-level secuirty requirements
|
authentication schemes), and ``None`` will inherit the top-level secuirty requirements
|
||||||
|
:param bool deprecated: deprecation status for operation
|
||||||
:param dict[str,(.Schema,.SchemaRef,.Response,str,Serializer)] responses: a dict of documented manual responses
|
:param dict[str,(.Schema,.SchemaRef,.Response,str,Serializer)] responses: a dict of documented manual responses
|
||||||
keyed on response status code. If no success (``2xx``) response is given, one will automatically be
|
keyed on response status code. If no success (``2xx``) response is given, one will automatically be
|
||||||
generated from the request body and http method. If any ``2xx`` response is given the automatic response is
|
generated from the request body and http method. If any ``2xx`` response is given the automatic response is
|
||||||
@@ -102,6 +107,8 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
'query_serializer': query_serializer,
|
'query_serializer': query_serializer,
|
||||||
'manual_parameters': manual_parameters,
|
'manual_parameters': manual_parameters,
|
||||||
'operation_id': operation_id,
|
'operation_id': operation_id,
|
||||||
|
'operation_summary': operation_summary,
|
||||||
|
'deprecated': deprecated,
|
||||||
'operation_description': operation_description,
|
'operation_description': operation_description,
|
||||||
'security': security,
|
'security': security,
|
||||||
'responses': responses,
|
'responses': responses,
|
||||||
@@ -115,21 +122,24 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
data.update(extra_overrides)
|
data.update(extra_overrides)
|
||||||
if not data: # pragma: no cover
|
if not data: # pragma: no cover
|
||||||
# no overrides to set, no use in doing more work
|
# no overrides to set, no use in doing more work
|
||||||
return
|
return view_method
|
||||||
|
|
||||||
# if the method is an @action, it will have a bind_to_methods attribute
|
# if the method is an @action, it will have a bind_to_methods attribute, or a mapping attribute for drf>3.8
|
||||||
bind_to_methods = getattr(view_method, 'bind_to_methods', [])
|
bind_to_methods = getattr(view_method, 'bind_to_methods', [])
|
||||||
|
mapping = getattr(view_method, 'mapping', {})
|
||||||
|
mapping_methods = [mth for mth, name in mapping.items() if name == view_method.__name__]
|
||||||
|
action_http_methods = bind_to_methods + mapping_methods
|
||||||
|
|
||||||
# if the method is actually a function based view (@api_view), it will have a 'cls' attribute
|
# if the method is actually a function based view (@api_view), it will have a 'cls' attribute
|
||||||
view_cls = getattr(view_method, 'cls', None)
|
view_cls = getattr(view_method, 'cls', None)
|
||||||
http_method_names = [m for m in getattr(view_cls, 'http_method_names', []) if hasattr(view_cls, m)]
|
api_view_http_methods = [m for m in getattr(view_cls, 'http_method_names', []) if hasattr(view_cls, m)]
|
||||||
|
|
||||||
available_methods = http_method_names + bind_to_methods
|
available_http_methods = api_view_http_methods + action_http_methods
|
||||||
existing_data = getattr(view_method, '_swagger_auto_schema', {})
|
existing_data = getattr(view_method, '_swagger_auto_schema', {})
|
||||||
|
|
||||||
_methods = methods
|
_methods = methods
|
||||||
if methods or method:
|
if methods or method:
|
||||||
assert available_methods or http_method_names, "`method` or `methods` can only be specified " \
|
assert available_http_methods, "`method` or `methods` can only be specified on @action or @api_view views"
|
||||||
"on @action or @api_view views"
|
|
||||||
assert bool(methods) != bool(method), "specify either method or methods"
|
assert bool(methods) != bool(method), "specify either method or methods"
|
||||||
assert not isinstance(methods, str), "`methods` expects to receive a list of methods;" \
|
assert not isinstance(methods, str), "`methods` expects to receive a list of methods;" \
|
||||||
" use `method` for a single argument"
|
" use `method` for a single argument"
|
||||||
@@ -137,20 +147,20 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
_methods = [method.lower()]
|
_methods = [method.lower()]
|
||||||
else:
|
else:
|
||||||
_methods = [mth.lower() for mth in methods]
|
_methods = [mth.lower() for mth in methods]
|
||||||
assert all(mth in available_methods for mth in _methods), "http method not bound to view"
|
assert all(mth in available_http_methods for mth in _methods), "http method not bound to view"
|
||||||
assert not any(mth in existing_data for mth in _methods), "http method defined multiple times"
|
assert not any(mth in existing_data for mth in _methods), "http method defined multiple times"
|
||||||
|
|
||||||
if available_methods:
|
if available_http_methods:
|
||||||
# action or api_view
|
# action or api_view
|
||||||
assert bool(http_method_names) != bool(bind_to_methods), "this should never happen"
|
assert bool(api_view_http_methods) != bool(action_http_methods), "this should never happen"
|
||||||
|
|
||||||
if len(available_methods) > 1:
|
if len(available_http_methods) > 1:
|
||||||
assert _methods, \
|
assert _methods, \
|
||||||
"on multi-method api_view, action, detail_route or list_route, you must specify " \
|
"on multi-method api_view, action, detail_route or list_route, you must specify " \
|
||||||
"swagger_auto_schema on a per-method basis using one of the `method` or `methods` arguments"
|
"swagger_auto_schema on a per-method basis using one of the `method` or `methods` arguments"
|
||||||
else:
|
else:
|
||||||
# for a single-method view we assume that single method as the decorator target
|
# for a single-method view we assume that single method as the decorator target
|
||||||
_methods = _methods or available_methods
|
_methods = _methods or available_http_methods
|
||||||
|
|
||||||
assert not any(hasattr(getattr(view_cls, mth, None), '_swagger_auto_schema') for mth in _methods), \
|
assert not any(hasattr(getattr(view_cls, mth, None), '_swagger_auto_schema') for mth in _methods), \
|
||||||
"swagger_auto_schema applied twice to method"
|
"swagger_auto_schema applied twice to method"
|
||||||
@@ -170,6 +180,23 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo
|
|||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
|
def swagger_serializer_method(serializer_or_field):
|
||||||
|
"""
|
||||||
|
Decorates the method of a serializers.SerializerMethodField
|
||||||
|
to hint as to how Swagger should be generated for this field.
|
||||||
|
|
||||||
|
:param serializer_or_field: ``Serializer``/``Field`` class or instance
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
|
||||||
|
def decorator(serializer_method):
|
||||||
|
# stash the serializer for SerializerMethodFieldInspector to find
|
||||||
|
serializer_method._swagger_serializer = serializer_or_field
|
||||||
|
return serializer_method
|
||||||
|
|
||||||
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
def is_list_view(path, method, view):
|
def is_list_view(path, method, view):
|
||||||
"""Check if the given path/method appears to represent a list view (as opposed to a detail/instance view).
|
"""Check if the given path/method appears to represent a list view (as opposed to a detail/instance view).
|
||||||
|
|
||||||
@@ -227,6 +254,22 @@ def param_list_to_odict(parameters):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def merge_params(parameters, overrides):
|
||||||
|
"""Merge `overrides` into `parameters`. This is the same as appending `overrides` to `parameters`, but any element
|
||||||
|
of `parameters` whose ``(name, in_)`` tuple collides with an element in `overrides` is replaced by it.
|
||||||
|
|
||||||
|
Raises an ``AssertionError`` if either list contains duplicate parameters.
|
||||||
|
|
||||||
|
:param list[.Parameter] parameters: initial parameters
|
||||||
|
:param list[.Parameter] overrides: overriding parameters
|
||||||
|
:return: merged list
|
||||||
|
:rtype: list[.Parameter]
|
||||||
|
"""
|
||||||
|
parameters = param_list_to_odict(parameters)
|
||||||
|
parameters.update(param_list_to_odict(overrides))
|
||||||
|
return list(parameters.values())
|
||||||
|
|
||||||
|
|
||||||
def filter_none(obj):
|
def filter_none(obj):
|
||||||
"""Remove ``None`` values from tuples, lists or dictionaries. Return other objects as-is.
|
"""Remove ``None`` values from tuples, lists or dictionaries. Return other objects as-is.
|
||||||
|
|
||||||
@@ -251,6 +294,7 @@ def force_serializer_instance(serializer):
|
|||||||
|
|
||||||
:param serializer: serializer class or instance
|
:param serializer: serializer class or instance
|
||||||
:return: serializer instance
|
:return: serializer instance
|
||||||
|
:rtype: serializers.BaseSerializer
|
||||||
"""
|
"""
|
||||||
if inspect.isclass(serializer):
|
if inspect.isclass(serializer):
|
||||||
assert issubclass(serializer, serializers.BaseSerializer), "Serializer required, not %s" % serializer.__name__
|
assert issubclass(serializer, serializers.BaseSerializer), "Serializer required, not %s" % serializer.__name__
|
||||||
@@ -261,6 +305,26 @@ def force_serializer_instance(serializer):
|
|||||||
return serializer
|
return serializer
|
||||||
|
|
||||||
|
|
||||||
|
def get_serializer_class(serializer):
|
||||||
|
"""Given a ``Serializer`` class or intance, return the ``Serializer`` class. If `serializer` is not a ``Serializer``
|
||||||
|
class or instance, raises an assertion error.
|
||||||
|
|
||||||
|
:param serializer: serializer class or instance, or ``None``
|
||||||
|
:return: serializer class
|
||||||
|
:rtype: type[serializers.BaseSerializer]
|
||||||
|
"""
|
||||||
|
if serializer is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if inspect.isclass(serializer):
|
||||||
|
assert issubclass(serializer, serializers.BaseSerializer), "Serializer required, not %s" % serializer.__name__
|
||||||
|
return serializer
|
||||||
|
|
||||||
|
assert isinstance(serializer, serializers.BaseSerializer), \
|
||||||
|
"Serializer class or instance required, not %s" % type(serializer).__name__
|
||||||
|
return type(serializer)
|
||||||
|
|
||||||
|
|
||||||
def get_consumes(parser_classes):
|
def get_consumes(parser_classes):
|
||||||
"""Extract ``consumes`` MIME types from a list of parser classes.
|
"""Extract ``consumes`` MIME types from a list of parser classes.
|
||||||
|
|
||||||
@@ -284,7 +348,8 @@ def get_produces(renderer_classes):
|
|||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
"""
|
"""
|
||||||
media_types = [renderer.media_type for renderer in renderer_classes or []]
|
media_types = [renderer.media_type for renderer in renderer_classes or []]
|
||||||
media_types = [encoding for encoding in media_types if 'html' not in encoding]
|
media_types = [encoding for encoding in media_types
|
||||||
|
if not any(excluded in encoding for excluded in swagger_settings.EXCLUDED_MEDIA_TYPES)]
|
||||||
return media_types
|
return media_types
|
||||||
|
|
||||||
|
|
||||||
@@ -313,7 +378,7 @@ def get_serializer_ref_name(serializer):
|
|||||||
if hasattr(serializer_meta, 'ref_name'):
|
if hasattr(serializer_meta, 'ref_name'):
|
||||||
ref_name = serializer_meta.ref_name
|
ref_name = serializer_meta.ref_name
|
||||||
elif serializer_name == 'NestedSerializer' and isinstance(serializer, serializers.ModelSerializer):
|
elif serializer_name == 'NestedSerializer' and isinstance(serializer, serializers.ModelSerializer):
|
||||||
logger.debug("Forcing inline output for ModelSerializer named 'NestedSerializer': " + str(serializer))
|
logger.debug("Forcing inline output for ModelSerializer named 'NestedSerializer':\n" + str(serializer))
|
||||||
ref_name = None
|
ref_name = None
|
||||||
else:
|
else:
|
||||||
ref_name = serializer_name
|
ref_name = serializer_name
|
||||||
@@ -334,3 +399,38 @@ def force_real_str(s, encoding='utf-8', strings_only=False, errors='strict'):
|
|||||||
s = '' + s
|
s = '' + s
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
def get_field_default(field):
|
||||||
|
"""
|
||||||
|
Get the default value for a field, converted to a JSON-compatible value while properly handling callables.
|
||||||
|
|
||||||
|
:param field: field instance
|
||||||
|
:return: default value
|
||||||
|
"""
|
||||||
|
default = getattr(field, 'default', serializers.empty)
|
||||||
|
if default is not serializers.empty:
|
||||||
|
if callable(default):
|
||||||
|
try:
|
||||||
|
if hasattr(default, 'set_context'):
|
||||||
|
default.set_context(field)
|
||||||
|
default = default()
|
||||||
|
except Exception: # pragma: no cover
|
||||||
|
logger.warning("default for %s is callable but it raised an exception when "
|
||||||
|
"called; 'default' will not be set on schema", field, exc_info=True)
|
||||||
|
default = serializers.empty
|
||||||
|
|
||||||
|
if default is not serializers.empty and default is not None:
|
||||||
|
try:
|
||||||
|
default = field.to_representation(default)
|
||||||
|
# JSON roundtrip ensures that the value is valid JSON;
|
||||||
|
# for example, sets and tuples get transformed into lists
|
||||||
|
default = json.loads(json.dumps(default, cls=encoders.JSONEncoder))
|
||||||
|
if decimal_as_float(field):
|
||||||
|
default = float(default)
|
||||||
|
except Exception: # pragma: no cover
|
||||||
|
logger.warning("'default' on schema for %s will not be set because "
|
||||||
|
"to_representation raised an exception", field, exc_info=True)
|
||||||
|
default = serializers.empty
|
||||||
|
|
||||||
|
return default
|
||||||
+10
-5
@@ -11,12 +11,15 @@ from rest_framework.settings import api_settings
|
|||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
|
|
||||||
from .app_settings import swagger_settings
|
from .app_settings import swagger_settings
|
||||||
from .renderers import OpenAPIRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer
|
from .renderers import (
|
||||||
|
OpenAPIRenderer, ReDocOldRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer
|
||||||
|
)
|
||||||
|
|
||||||
SPEC_RENDERERS = (SwaggerYAMLRenderer, SwaggerJSONRenderer, OpenAPIRenderer)
|
SPEC_RENDERERS = (SwaggerYAMLRenderer, SwaggerJSONRenderer, OpenAPIRenderer)
|
||||||
UI_RENDERERS = {
|
UI_RENDERERS = {
|
||||||
'swagger': (SwaggerUIRenderer, ReDocRenderer),
|
'swagger': (SwaggerUIRenderer, ReDocRenderer),
|
||||||
'redoc': (ReDocRenderer, SwaggerUIRenderer),
|
'redoc': (ReDocRenderer, SwaggerUIRenderer),
|
||||||
|
'redoc-old': (ReDocOldRenderer, ReDocRenderer, SwaggerUIRenderer),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -45,9 +48,7 @@ def deferred_never_cache(view_func):
|
|||||||
|
|
||||||
|
|
||||||
def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=False, validators=None,
|
def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=False, validators=None,
|
||||||
generator_class=swagger_settings.DEFAULT_GENERATOR_CLASS,
|
generator_class=None, authentication_classes=None, permission_classes=None):
|
||||||
authentication_classes=api_settings.DEFAULT_AUTHENTICATION_CLASSES,
|
|
||||||
permission_classes=api_settings.DEFAULT_PERMISSION_CLASSES):
|
|
||||||
"""Create a SchemaView class with default renderers and generators.
|
"""Create a SchemaView class with default renderers and generators.
|
||||||
|
|
||||||
:param .Info info: information about the API; if omitted, defaults to :ref:`DEFAULT_INFO <default-swagger-settings>`
|
:param .Info info: information about the API; if omitted, defaults to :ref:`DEFAULT_INFO <default-swagger-settings>`
|
||||||
@@ -63,9 +64,13 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
|
|||||||
:rtype: type[.SchemaView]
|
:rtype: type[.SchemaView]
|
||||||
"""
|
"""
|
||||||
_public = public
|
_public = public
|
||||||
_generator_class = generator_class
|
_generator_class = generator_class or swagger_settings.DEFAULT_GENERATOR_CLASS
|
||||||
_auth_classes = authentication_classes
|
_auth_classes = authentication_classes
|
||||||
|
if _auth_classes is None:
|
||||||
|
_auth_classes = api_settings.DEFAULT_AUTHENTICATION_CLASSES
|
||||||
_perm_classes = permission_classes
|
_perm_classes = permission_classes
|
||||||
|
if _perm_classes is None:
|
||||||
|
_perm_classes = api_settings.DEFAULT_PERMISSION_CLASSES
|
||||||
info = info or swagger_settings.DEFAULT_INFO
|
info = info or swagger_settings.DEFAULT_INFO
|
||||||
validators = validators or []
|
validators = validators or []
|
||||||
_spec_renderers = tuple(renderer.with_validators(validators) for renderer in SPEC_RENDERERS)
|
_spec_renderers = tuple(renderer.with_validators(validators) for renderer in SPEC_RENDERERS)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from articles.models import Article
|
|||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
from drf_yasg.app_settings import swagger_settings
|
from drf_yasg.app_settings import swagger_settings
|
||||||
from drf_yasg.inspectors import CoreAPICompatInspector, FieldInspector, NotHandled, SwaggerAutoSchema
|
from drf_yasg.inspectors import CoreAPICompatInspector, FieldInspector, NotHandled, SwaggerAutoSchema
|
||||||
from drf_yasg.utils import swagger_auto_schema
|
from drf_yasg.utils import no_body, swagger_auto_schema
|
||||||
|
|
||||||
|
|
||||||
class DjangoFilterDescriptionInspector(CoreAPICompatInspector):
|
class DjangoFilterDescriptionInspector(CoreAPICompatInspector):
|
||||||
@@ -133,11 +133,13 @@ class ArticleViewSet(viewsets.ModelViewSet):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@swagger_auto_schema(request_body=no_body, operation_id='no_body_test')
|
||||||
def update(self, request, *args, **kwargs):
|
def update(self, request, *args, **kwargs):
|
||||||
"""update method docstring"""
|
"""update method docstring"""
|
||||||
return super(ArticleViewSet, self).update(request, *args, **kwargs)
|
return super(ArticleViewSet, self).update(request, *args, **kwargs)
|
||||||
|
|
||||||
@swagger_auto_schema(operation_description="partial_update description override", responses={404: 'slug not found'})
|
@swagger_auto_schema(operation_description="partial_update description override", responses={404: 'slug not found'},
|
||||||
|
operation_summary='partial_update summary', deprecated=True)
|
||||||
def partial_update(self, request, *args, **kwargs):
|
def partial_update(self, request, *args, **kwargs):
|
||||||
"""partial_update method docstring"""
|
"""partial_update method docstring"""
|
||||||
return super(ArticleViewSet, self).partial_update(request, *args, **kwargs)
|
return super(ArticleViewSet, self).partial_update(request, *args, **kwargs)
|
||||||
|
|||||||
Regular → Executable
File mode changed.
@@ -0,0 +1,28 @@
|
|||||||
|
# Generated by Django 2.1 on 2018-08-06 13:34
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('people', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='identity',
|
||||||
|
name='lastName',
|
||||||
|
field=models.CharField(help_text="<strong>Here's some HTML!</strong>", max_length=30, null=True),
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='identity',
|
||||||
|
old_name='firstName',
|
||||||
|
new_name='first_name',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='identity',
|
||||||
|
old_name='lastName',
|
||||||
|
new_name='last_name',
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -3,8 +3,8 @@ from django.utils.safestring import mark_safe
|
|||||||
|
|
||||||
|
|
||||||
class Identity(models.Model):
|
class Identity(models.Model):
|
||||||
firstName = models.CharField(max_length=30, null=True)
|
first_name = models.CharField(max_length=30, null=True)
|
||||||
lastName = models.CharField(max_length=30, null=True, help_text=mark_safe("<strong>Here's some HTML!</strong>"))
|
last_name = models.CharField(max_length=30, null=True, help_text=mark_safe("<strong>Here's some HTML!</strong>"))
|
||||||
|
|
||||||
|
|
||||||
class Person(models.Model):
|
class Person(models.Model):
|
||||||
|
|||||||
@@ -23,12 +23,34 @@ class ExampleProjectSerializer(serializers.Serializer):
|
|||||||
ref_name = 'Project'
|
ref_name = 'Project'
|
||||||
|
|
||||||
|
|
||||||
|
class UnixTimestampField(serializers.DateTimeField):
|
||||||
|
def to_representation(self, value):
|
||||||
|
""" Return epoch time for a datetime object or ``None``"""
|
||||||
|
from django.utils.dateformat import format
|
||||||
|
try:
|
||||||
|
return int(format(value, 'U'))
|
||||||
|
except (AttributeError, TypeError):
|
||||||
|
return None
|
||||||
|
|
||||||
|
def to_internal_value(self, value):
|
||||||
|
import datetime
|
||||||
|
return datetime.datetime.fromtimestamp(int(value))
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
swagger_schema_fields = {
|
||||||
|
'format': 'integer',
|
||||||
|
'title': 'Client date time suu',
|
||||||
|
'description': 'Date time in unix timestamp format',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class SnippetSerializer(serializers.Serializer):
|
class SnippetSerializer(serializers.Serializer):
|
||||||
"""SnippetSerializer classdoc
|
"""SnippetSerializer classdoc
|
||||||
|
|
||||||
create: docstring for create from serializer classdoc
|
create: docstring for create from serializer classdoc
|
||||||
"""
|
"""
|
||||||
id = serializers.IntegerField(read_only=True, help_text="id serializer help text")
|
id = serializers.IntegerField(read_only=True, help_text="id serializer help text")
|
||||||
|
created = UnixTimestampField(read_only=True)
|
||||||
owner = serializers.PrimaryKeyRelatedField(
|
owner = serializers.PrimaryKeyRelatedField(
|
||||||
queryset=get_user_model().objects.all(),
|
queryset=get_user_model().objects.all(),
|
||||||
default=serializers.CurrentUserDefault(),
|
default=serializers.CurrentUserDefault(),
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ class SnippetList(generics.ListCreateAPIView):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
def delete(self, *args, **kwargs):
|
def delete(self, *args, **kwargs):
|
||||||
|
"""summary from docstring
|
||||||
|
|
||||||
|
description body is here, summary is not included
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
@@ -91,7 +93,7 @@ REST_FRAMEWORK = {
|
|||||||
# drf-yasg
|
# drf-yasg
|
||||||
|
|
||||||
SWAGGER_SETTINGS = {
|
SWAGGER_SETTINGS = {
|
||||||
'LOGIN_URL': '/admin/login',
|
'LOGIN_URL': reverse_lazy('admin:login'),
|
||||||
'LOGOUT_URL': '/admin/logout',
|
'LOGOUT_URL': '/admin/logout',
|
||||||
|
|
||||||
'DEFAULT_INFO': 'testproj.urls.swagger_info',
|
'DEFAULT_INFO': 'testproj.urls.swagger_info',
|
||||||
@@ -108,6 +110,10 @@ SWAGGER_SETTINGS = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REDOC_SETTINGS = {
|
||||||
|
'SPEC_URL': ('schema-json', {'format': '.json'}),
|
||||||
|
}
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ urlpatterns = [
|
|||||||
url(r'^swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
|
url(r'^swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=0), name='schema-json'),
|
||||||
url(r'^swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
url(r'^swagger/$', SchemaView.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||||
url(r'^redoc/$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
url(r'^redoc/$', SchemaView.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||||
|
url(r'^redoc-old/$', SchemaView.with_ui('redoc-old', cache_timeout=0), name='schema-redoc-old'),
|
||||||
|
|
||||||
url(r'^cached/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=None), name='cschema-json'),
|
url(r'^cached/swagger(?P<format>.json|.yaml)$', SchemaView.without_ui(cache_timeout=None), name='cschema-json'),
|
||||||
url(r'^cached/swagger/$', SchemaView.with_ui('swagger', cache_timeout=None), name='cschema-swagger-ui'),
|
url(r'^cached/swagger/$', SchemaView.with_ui('swagger', cache_timeout=None), name='cschema-swagger-ui'),
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
import datetime
|
||||||
|
import decimal
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
from rest_framework import serializers
|
||||||
|
|
||||||
|
|
||||||
|
class Unknown(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MethodFieldExampleSerializer(serializers.Serializer):
|
||||||
|
"""
|
||||||
|
Implementation of SerializerMethodField using type hinting for Python >= 3.5
|
||||||
|
"""
|
||||||
|
|
||||||
|
hinted_bool = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a bool")
|
||||||
|
|
||||||
|
def get_hinted_bool(self, obj) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
hinted_int = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be an integer")
|
||||||
|
|
||||||
|
def get_hinted_int(self, obj) -> int:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
hinted_float = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a number")
|
||||||
|
|
||||||
|
def get_hinted_float(self, obj) -> float:
|
||||||
|
return 1.0
|
||||||
|
|
||||||
|
hinted_decimal = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a decimal")
|
||||||
|
|
||||||
|
def get_hinted_decimal(self, obj) -> decimal.Decimal:
|
||||||
|
return decimal.Decimal(1)
|
||||||
|
|
||||||
|
hinted_datetime = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a datetime")
|
||||||
|
|
||||||
|
def get_hinted_datetime(self, obj) -> datetime.datetime:
|
||||||
|
return datetime.datetime.now()
|
||||||
|
|
||||||
|
hinted_date = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a date")
|
||||||
|
|
||||||
|
def get_hinted_date(self, obj) -> datetime.date:
|
||||||
|
return datetime.date.today()
|
||||||
|
|
||||||
|
hinted_uuid = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a uuid")
|
||||||
|
|
||||||
|
def get_hinted_uuid(self, obj) -> uuid.UUID:
|
||||||
|
return uuid.uuid4()
|
||||||
|
|
||||||
|
hinted_unknown = serializers.SerializerMethodField(
|
||||||
|
help_text="type hint is unknown, so is expected to fallback to string")
|
||||||
|
|
||||||
|
def get_hinted_unknown(self, obj) -> Unknown:
|
||||||
|
return Unknown()
|
||||||
|
|
||||||
|
non_hinted_number = serializers.SerializerMethodField(
|
||||||
|
help_text="No hint on the method, so this is expected to fallback to string")
|
||||||
|
|
||||||
|
def get_non_hinted_number(self, obj):
|
||||||
|
return 1.0
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
import datetime
|
||||||
|
import decimal
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
from rest_framework import serializers
|
||||||
|
|
||||||
|
from drf_yasg.utils import swagger_serializer_method
|
||||||
|
|
||||||
|
|
||||||
|
class Unknown(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MethodFieldExampleSerializer(serializers.Serializer):
|
||||||
|
"""
|
||||||
|
Fallback implementation of SerializerMethodField type hinting for Python < 3.5
|
||||||
|
|
||||||
|
`->` syntax isn't supported, instead decorate with a serializer that returns the same type
|
||||||
|
a bit of a hack, but it provides a cross-check between hinting and decorator functionality.
|
||||||
|
"""
|
||||||
|
|
||||||
|
hinted_bool = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a bool")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.BooleanField)
|
||||||
|
def get_hinted_bool(self, obj):
|
||||||
|
return True
|
||||||
|
|
||||||
|
hinted_int = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be an integer")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.IntegerField)
|
||||||
|
def get_hinted_int(self, obj):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
hinted_float = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a number")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.FloatField)
|
||||||
|
def get_hinted_float(self, obj):
|
||||||
|
return 1.0
|
||||||
|
|
||||||
|
hinted_decimal = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a decimal")
|
||||||
|
|
||||||
|
# note that in this case an instance is required since DecimalField has required arguments
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.DecimalField(max_digits=6, decimal_places=4))
|
||||||
|
def get_hinted_decimal(self, obj):
|
||||||
|
return decimal.Decimal(1)
|
||||||
|
|
||||||
|
hinted_datetime = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a datetime")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.DateTimeField)
|
||||||
|
def get_hinted_datetime(self, obj):
|
||||||
|
return datetime.datetime.now()
|
||||||
|
|
||||||
|
hinted_date = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a date")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.DateField)
|
||||||
|
def get_hinted_date(self, obj):
|
||||||
|
return datetime.date.today()
|
||||||
|
|
||||||
|
hinted_uuid = serializers.SerializerMethodField(
|
||||||
|
help_text="the type hint on the method should determine this to be a uuid")
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.UUIDField)
|
||||||
|
def get_hinted_uuid(self, obj):
|
||||||
|
return uuid.uuid4()
|
||||||
|
|
||||||
|
hinted_unknown = serializers.SerializerMethodField(
|
||||||
|
help_text="type hint is unknown, so is expected to fallback to string")
|
||||||
|
|
||||||
|
def get_hinted_unknown(self, obj):
|
||||||
|
return Unknown()
|
||||||
|
|
||||||
|
non_hinted_number = serializers.SerializerMethodField(
|
||||||
|
help_text="No hint on the method, so this is expected to fallback to string")
|
||||||
|
|
||||||
|
def get_non_hinted_number(self, obj):
|
||||||
|
return 1.0
|
||||||
@@ -1,8 +1,19 @@
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
|
from drf_yasg.utils import swagger_serializer_method
|
||||||
from snippets.models import Snippet
|
from snippets.models import Snippet
|
||||||
|
|
||||||
|
try:
|
||||||
|
import typing # noqa: F401
|
||||||
|
from .method_serializers_with_typing import MethodFieldExampleSerializer
|
||||||
|
except ImportError:
|
||||||
|
from .method_serializers_without_typing import MethodFieldExampleSerializer
|
||||||
|
|
||||||
|
|
||||||
|
class OtherStuffSerializer(serializers.Serializer):
|
||||||
|
foo = serializers.CharField()
|
||||||
|
|
||||||
|
|
||||||
class UserSerializerrr(serializers.ModelSerializer):
|
class UserSerializerrr(serializers.ModelSerializer):
|
||||||
snippets = serializers.PrimaryKeyRelatedField(many=True, queryset=Snippet.objects.all())
|
snippets = serializers.PrimaryKeyRelatedField(many=True, queryset=Snippet.objects.all())
|
||||||
@@ -10,10 +21,61 @@ class UserSerializerrr(serializers.ModelSerializer):
|
|||||||
last_connected_ip = serializers.IPAddressField(help_text="i'm out of ideas", protocol='ipv4', read_only=True)
|
last_connected_ip = serializers.IPAddressField(help_text="i'm out of ideas", protocol='ipv4', read_only=True)
|
||||||
last_connected_at = serializers.DateField(help_text="really?", read_only=True)
|
last_connected_at = serializers.DateField(help_text="really?", read_only=True)
|
||||||
|
|
||||||
|
other_stuff = serializers.SerializerMethodField(
|
||||||
|
help_text="the decorator should determine the serializer class for this")
|
||||||
|
|
||||||
|
hint_example = MethodFieldExampleSerializer()
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=OtherStuffSerializer)
|
||||||
|
def get_other_stuff(self, obj):
|
||||||
|
"""
|
||||||
|
method_field that uses a serializer internally.
|
||||||
|
|
||||||
|
By using the decorator, we can tell drf-yasg how to represent this in Swagger
|
||||||
|
:param obj:
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return OtherStuffSerializer().data
|
||||||
|
|
||||||
|
help_text_example_1 = serializers.SerializerMethodField(
|
||||||
|
help_text="help text on field is set, so this should appear in swagger"
|
||||||
|
)
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.IntegerField(
|
||||||
|
help_text="decorated instance help_text shouldn't appear in swagger because field has priority"))
|
||||||
|
def get_help_text_example_1(self):
|
||||||
|
"""
|
||||||
|
method docstring shouldn't appear in swagger because field has priority
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return 1
|
||||||
|
|
||||||
|
help_text_example_2 = serializers.SerializerMethodField()
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.IntegerField(
|
||||||
|
help_text="instance help_text is set, so should appear in swagger"))
|
||||||
|
def get_help_text_example_2(self):
|
||||||
|
"""
|
||||||
|
method docstring shouldn't appear in swagger because decorator has priority
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return 1
|
||||||
|
|
||||||
|
help_text_example_3 = serializers.SerializerMethodField()
|
||||||
|
|
||||||
|
@swagger_serializer_method(serializer_or_field=serializers.IntegerField())
|
||||||
|
def get_help_text_example_3(self):
|
||||||
|
"""
|
||||||
|
docstring is set so should appear in swagger as fallback
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return 1
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
fields = ('id', 'username', 'email', 'articles', 'snippets',
|
fields = ('id', 'username', 'email', 'articles', 'snippets',
|
||||||
'last_connected_ip', 'last_connected_at', 'article_slugs')
|
'last_connected_ip', 'last_connected_at', 'article_slugs', 'other_stuff', 'hint_example',
|
||||||
|
'help_text_example_1', 'help_text_example_2', 'help_text_example_3')
|
||||||
|
|
||||||
|
|
||||||
class UserListQuerySerializer(serializers.Serializer):
|
class UserListQuerySerializer(serializers.Serializer):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from rest_framework.response import Response
|
|||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
|
|
||||||
from drf_yasg import openapi
|
from drf_yasg import openapi
|
||||||
from drf_yasg.utils import no_body, swagger_auto_schema
|
from drf_yasg.utils import swagger_auto_schema
|
||||||
from users.serializers import UserListQuerySerializer, UserSerializerrr
|
from users.serializers import UserListQuerySerializer, UserSerializerrr
|
||||||
|
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class UserList(APIView):
|
|||||||
serializer.save()
|
serializer.save()
|
||||||
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||||
|
|
||||||
@swagger_auto_schema(request_body=no_body, operation_id="users_dummy", operation_description="dummy operation")
|
@swagger_auto_schema(operation_id="users_dummy", operation_description="dummy operation")
|
||||||
def patch(self, request):
|
def patch(self, request):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
+131
-12
@@ -134,14 +134,9 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- articles
|
- articles
|
||||||
put:
|
put:
|
||||||
operationId: articles_update
|
operationId: no_body_test
|
||||||
description: update method docstring
|
description: update method docstring
|
||||||
parameters:
|
parameters: []
|
||||||
- name: data
|
|
||||||
in: body
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/Article'
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: ''
|
description: ''
|
||||||
@@ -151,6 +146,7 @@ paths:
|
|||||||
- articles
|
- articles
|
||||||
patch:
|
patch:
|
||||||
operationId: articles_partial_update
|
operationId: articles_partial_update
|
||||||
|
summary: partial_update summary
|
||||||
description: partial_update description override
|
description: partial_update description override
|
||||||
parameters:
|
parameters:
|
||||||
- name: data
|
- name: data
|
||||||
@@ -167,6 +163,7 @@ paths:
|
|||||||
description: slug not found
|
description: slug not found
|
||||||
tags:
|
tags:
|
||||||
- articles
|
- articles
|
||||||
|
deprecated: true
|
||||||
delete:
|
delete:
|
||||||
operationId: articles_delete
|
operationId: articles_delete
|
||||||
description: destroy method docstring
|
description: destroy method docstring
|
||||||
@@ -192,6 +189,8 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: ''
|
description: ''
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Article'
|
||||||
consumes:
|
consumes:
|
||||||
- multipart/form-data
|
- multipart/form-data
|
||||||
tags:
|
tags:
|
||||||
@@ -228,6 +227,8 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
description: ''
|
description: ''
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ImageUpload'
|
||||||
consumes:
|
consumes:
|
||||||
- multipart/form-data
|
- multipart/form-data
|
||||||
tags:
|
tags:
|
||||||
@@ -390,7 +391,8 @@ paths:
|
|||||||
- snippets
|
- snippets
|
||||||
delete:
|
delete:
|
||||||
operationId: snippetsDeleteBulk
|
operationId: snippetsDeleteBulk
|
||||||
description: SnippetList classdoc
|
summary: summary from docstring
|
||||||
|
description: description body is here, summary is not included
|
||||||
parameters:
|
parameters:
|
||||||
- name: data
|
- name: data
|
||||||
in: body
|
in: body
|
||||||
@@ -890,6 +892,32 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
ImageUpload:
|
||||||
|
required:
|
||||||
|
- image_styles
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
what_am_i_doing:
|
||||||
|
description: test
|
||||||
|
type: string
|
||||||
|
pattern: ^69$
|
||||||
|
default: '69'
|
||||||
|
minLength: 1
|
||||||
|
image_styles:
|
||||||
|
description: Parameter with Items
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- wide
|
||||||
|
- tall
|
||||||
|
- thumb
|
||||||
|
- social
|
||||||
|
upload:
|
||||||
|
description: image serializer help_text
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
|
format: uri
|
||||||
Identity:
|
Identity:
|
||||||
title: Identity
|
title: Identity
|
||||||
type: object
|
type: object
|
||||||
@@ -898,13 +926,13 @@ definitions:
|
|||||||
title: ID
|
title: ID
|
||||||
type: integer
|
type: integer
|
||||||
readOnly: true
|
readOnly: true
|
||||||
firstName:
|
first_name:
|
||||||
title: FirstName
|
title: First name
|
||||||
type: string
|
type: string
|
||||||
maxLength: 30
|
maxLength: 30
|
||||||
minLength: 1
|
minLength: 1
|
||||||
lastName:
|
last_name:
|
||||||
title: LastName
|
title: Last name
|
||||||
description: <strong>Here's some HTML!</strong>
|
description: <strong>Here's some HTML!</strong>
|
||||||
type: string
|
type: string
|
||||||
maxLength: 30
|
maxLength: 30
|
||||||
@@ -947,6 +975,12 @@ definitions:
|
|||||||
description: id serializer help text
|
description: id serializer help text
|
||||||
type: integer
|
type: integer
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
created:
|
||||||
|
title: Client date time suu
|
||||||
|
type: string
|
||||||
|
format: integer
|
||||||
|
readOnly: true
|
||||||
|
description: Date time in unix timestamp format
|
||||||
owner:
|
owner:
|
||||||
title: Owner
|
title: Owner
|
||||||
description: The ID of the user that created this snippet; if none is provided,
|
description: The ID of the user that created this snippet; if none is provided,
|
||||||
@@ -1582,11 +1616,76 @@ definitions:
|
|||||||
todo:
|
todo:
|
||||||
title: child
|
title: child
|
||||||
todo: null
|
todo: null
|
||||||
|
OtherStuff:
|
||||||
|
title: Other stuff
|
||||||
|
description: the decorator should determine the serializer class for this
|
||||||
|
required:
|
||||||
|
- foo
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
foo:
|
||||||
|
title: Foo
|
||||||
|
type: string
|
||||||
|
minLength: 1
|
||||||
|
MethodFieldExample:
|
||||||
|
title: Hint example
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
hinted_bool:
|
||||||
|
title: Hinted bool
|
||||||
|
description: the type hint on the method should determine this to be a bool
|
||||||
|
type: boolean
|
||||||
|
readOnly: true
|
||||||
|
hinted_int:
|
||||||
|
title: Hinted int
|
||||||
|
description: the type hint on the method should determine this to be an integer
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
hinted_float:
|
||||||
|
title: Hinted float
|
||||||
|
description: the type hint on the method should determine this to be a number
|
||||||
|
type: number
|
||||||
|
readOnly: true
|
||||||
|
hinted_decimal:
|
||||||
|
title: Hinted decimal
|
||||||
|
description: the type hint on the method should determine this to be a decimal
|
||||||
|
type: string
|
||||||
|
format: decimal
|
||||||
|
readOnly: true
|
||||||
|
hinted_datetime:
|
||||||
|
title: Hinted datetime
|
||||||
|
description: the type hint on the method should determine this to be a datetime
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
readOnly: true
|
||||||
|
hinted_date:
|
||||||
|
title: Hinted date
|
||||||
|
description: the type hint on the method should determine this to be a date
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
readOnly: true
|
||||||
|
hinted_uuid:
|
||||||
|
title: Hinted uuid
|
||||||
|
description: the type hint on the method should determine this to be a uuid
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
readOnly: true
|
||||||
|
hinted_unknown:
|
||||||
|
title: Hinted unknown
|
||||||
|
description: type hint is unknown, so is expected to fallback to string
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
|
non_hinted_number:
|
||||||
|
title: Non hinted number
|
||||||
|
description: No hint on the method, so this is expected to fallback to string
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
UserSerializerrr:
|
UserSerializerrr:
|
||||||
required:
|
required:
|
||||||
- username
|
- username
|
||||||
- articles
|
- articles
|
||||||
- snippets
|
- snippets
|
||||||
|
- hint_example
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
@@ -1637,3 +1736,23 @@ definitions:
|
|||||||
pattern: ^[-a-zA-Z0-9_]+$
|
pattern: ^[-a-zA-Z0-9_]+$
|
||||||
readOnly: true
|
readOnly: true
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
|
other_stuff:
|
||||||
|
$ref: '#/definitions/OtherStuff'
|
||||||
|
hint_example:
|
||||||
|
$ref: '#/definitions/MethodFieldExample'
|
||||||
|
help_text_example_1:
|
||||||
|
title: Help text example 1
|
||||||
|
description: help text on field is set, so this should appear in swagger
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
help_text_example_2:
|
||||||
|
title: Help text example 2
|
||||||
|
description: instance help_text is set, so should appear in swagger
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
|
help_text_example_3:
|
||||||
|
title: Help text example 3
|
||||||
|
description: "\n docstring is set so should appear in swagger as fallback\n\
|
||||||
|
\ :return:\n "
|
||||||
|
type: integer
|
||||||
|
readOnly: true
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
from six import StringIO
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ def test_validator_url(swagger_settings, swagger):
|
|||||||
swagger_settings['VALIDATOR_URL'] = None
|
swagger_settings['VALIDATOR_URL'] = None
|
||||||
_check_swagger_setting(swagger, 'validatorUrl', None)
|
_check_swagger_setting(swagger, 'validatorUrl', None)
|
||||||
|
|
||||||
swagger_settings['VALIDATOR_URL'] = 'not none'
|
swagger_settings['VALIDATOR_URL'] = 'http://not.none/'
|
||||||
_check_swagger_setting(swagger, 'validatorUrl', 'not none')
|
_check_swagger_setting(swagger, 'validatorUrl', 'http://not.none/')
|
||||||
|
|
||||||
with pytest.raises(KeyError):
|
with pytest.raises(KeyError):
|
||||||
swagger_settings['VALIDATOR_URL'] = ''
|
swagger_settings['VALIDATOR_URL'] = ''
|
||||||
|
|||||||
@@ -147,3 +147,46 @@ def test_url_order():
|
|||||||
|
|
||||||
# get_endpoints only includes one endpoint
|
# get_endpoints only includes one endpoint
|
||||||
assert len(generator.get_endpoints(None)['/test/'][1]) == 1
|
assert len(generator.get_endpoints(None)['/test/'][1]) == 1
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from rest_framework.decorators import action, MethodMapper
|
||||||
|
except ImportError:
|
||||||
|
action = MethodMapper = None
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(not MethodMapper or not action, reason="action.mapping test (djangorestframework>=3.9 required)")
|
||||||
|
def test_action_mapping():
|
||||||
|
class ActionViewSet(viewsets.ViewSet):
|
||||||
|
@swagger_auto_schema(method='get', operation_id='mapping_get')
|
||||||
|
@swagger_auto_schema(method='delete', operation_id='mapping_delete')
|
||||||
|
@action(detail=False, methods=['get', 'delete'], url_path='test')
|
||||||
|
def action_main(self, request):
|
||||||
|
"""mapping docstring get/delete"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
@swagger_auto_schema(operation_id='mapping_post')
|
||||||
|
@action_main.mapping.post
|
||||||
|
def action_post(self, request):
|
||||||
|
"""mapping docstring post"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
router = routers.DefaultRouter()
|
||||||
|
router.register(r'action', ActionViewSet, base_name='action')
|
||||||
|
|
||||||
|
generator = OpenAPISchemaGenerator(
|
||||||
|
info=openapi.Info(title="Test generator", default_version="v1"),
|
||||||
|
version="v2",
|
||||||
|
url='',
|
||||||
|
patterns=router.urls
|
||||||
|
)
|
||||||
|
|
||||||
|
for _ in range(3):
|
||||||
|
swagger = generator.get_schema(None, True)
|
||||||
|
action_ops = swagger['paths']['/test/']
|
||||||
|
methods = ['get', 'post', 'delete']
|
||||||
|
assert all(mth in action_ops for mth in methods)
|
||||||
|
assert all(action_ops[mth]['operationId'] == 'mapping_' + mth for mth in methods)
|
||||||
|
assert action_ops['post']['description'] == 'mapping docstring post'
|
||||||
|
assert action_ops['get']['description'] == 'mapping docstring get/delete'
|
||||||
|
assert action_ops['delete']['description'] == 'mapping docstring get/delete'
|
||||||
@@ -1,28 +1,26 @@
|
|||||||
[tox]
|
[tox]
|
||||||
|
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
|
||||||
envlist =
|
envlist =
|
||||||
py27-django111-drf37,
|
py{27,34,35,36}-django111-drf{37,38},
|
||||||
py{34,35,36}-django{111,20}-drf{37,38},
|
py{34,35,36,37}-django20-drf{37,38},
|
||||||
py36-django20-drfmaster,
|
py{35,36,37}-django21-drf{37,38},
|
||||||
lint, docs
|
djmaster, lint, docs
|
||||||
|
|
||||||
[travis:env]
|
|
||||||
DRF =
|
|
||||||
3.7: drf37
|
|
||||||
3.8: drf38
|
|
||||||
master: drfmaster
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
django111: Django>=1.11,<2.0
|
django111: Django>=1.11,<2.0
|
||||||
django20: Django>=2.0,<2.1
|
django20: Django>=2.0,<2.1
|
||||||
|
django21: Django>=2.1,<2.2
|
||||||
|
|
||||||
drf37: djangorestframework>=3.7.7,<3.8
|
drf37: djangorestframework>=3.7.7,<3.8
|
||||||
drf38: djangorestframework>=3.8.0,<3.9
|
drf38: djangorestframework>=3.8.0,<3.9
|
||||||
|
|
||||||
# test with the latest build of django-rest-framework to get early warning of compatibility issues
|
# test with the latest build of django-rest-framework to get early warning of compatibility issues
|
||||||
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
|
||||||
|
djmaster: https://github.com/django/django/archive/master.tar.gz
|
||||||
|
|
||||||
# other dependencies
|
# other dependencies
|
||||||
|
-rrequirements/setup.txt
|
||||||
-rrequirements/validation.txt
|
-rrequirements/validation.txt
|
||||||
-rrequirements/test.txt
|
-rrequirements/test.txt
|
||||||
|
|
||||||
@@ -32,12 +30,14 @@ commands =
|
|||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
deps =
|
deps =
|
||||||
|
-rrequirements/setup.txt
|
||||||
-rrequirements/lint.txt
|
-rrequirements/lint.txt
|
||||||
commands =
|
commands =
|
||||||
flake8 src/drf_yasg testproj tests setup.py
|
flake8 src/drf_yasg testproj tests setup.py
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
|
-rrequirements/setup.txt
|
||||||
-rrequirements/docs.txt
|
-rrequirements/docs.txt
|
||||||
commands =
|
commands =
|
||||||
python setup.py check --restructuredtext --metadata --strict
|
python setup.py check --restructuredtext --metadata --strict
|
||||||
@@ -46,7 +46,7 @@ commands =
|
|||||||
[pytest]
|
[pytest]
|
||||||
DJANGO_SETTINGS_MODULE = testproj.settings.local
|
DJANGO_SETTINGS_MODULE = testproj.settings.local
|
||||||
python_paths = testproj
|
python_paths = testproj
|
||||||
addopts = -n 3 --ignore=node_modules
|
addopts = -n 2 --ignore=node_modules
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
@@ -54,13 +54,13 @@ exclude = **/migrations/*
|
|||||||
ignore = F405
|
ignore = F405
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
skip = .eggs,.tox,docs,env,venv
|
skip = .eggs,.tox,docs,env,venv,node_modules
|
||||||
skip_glob = **/migrations/*
|
skip_glob = **/migrations/*
|
||||||
not_skip = __init__.py
|
not_skip = __init__.py
|
||||||
atomic = true
|
atomic = true
|
||||||
multi_line_output = 5
|
multi_line_output = 5
|
||||||
line_length = 120
|
line_length = 120
|
||||||
known_future_library = future,six
|
known_future_library = six
|
||||||
known_standard_library =
|
known_standard_library =
|
||||||
collections,copy,distutils,functools,inspect,io,json,logging,operator,os,pkg_resources,re,setuptools,sys,
|
collections,copy,distutils,functools,inspect,io,json,logging,operator,os,pkg_resources,re,setuptools,sys,
|
||||||
types,warnings
|
types,warnings
|
||||||
|
|||||||
Regular → Executable
+2
@@ -3,6 +3,8 @@ set -ev
|
|||||||
npm update
|
npm update
|
||||||
|
|
||||||
cp node_modules/redoc/bundles/redoc.standalone.js src/drf_yasg/static/drf-yasg/redoc/redoc.min.js
|
cp node_modules/redoc/bundles/redoc.standalone.js src/drf_yasg/static/drf-yasg/redoc/redoc.min.js
|
||||||
|
wget https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js -O src/drf_yasg/static/drf-yasg/redoc-old/redoc.min.js
|
||||||
|
|
||||||
cp -r node_modules/swagger-ui-dist src/drf_yasg/static/drf-yasg/
|
cp -r node_modules/swagger-ui-dist src/drf_yasg/static/drf-yasg/
|
||||||
pushd src/drf_yasg/static/drf-yasg/swagger-ui-dist/ >/dev/null
|
pushd src/drf_yasg/static/drf-yasg/swagger-ui-dist/ >/dev/null
|
||||||
rm -f package.json .npmignore README.md
|
rm -f package.json .npmignore README.md
|
||||||
|
|||||||
Reference in new issue
Block a user