From 49bb0ec81d73d2ade26cb26a494389669a83c514 Mon Sep 17 00:00:00 2001 From: timwis Date: Tue, 15 Nov 2022 07:12:24 +0000 Subject: [PATCH 01/77] Add basic Netlify CMS configuration for discussion --- manage/config.yml | 70 +++++++++++++++++++++++++++++++++++++++++++++++ manage/index.html | 16 +++++++++++ 2 files changed, 86 insertions(+) create mode 100644 manage/config.yml create mode 100644 manage/index.html diff --git a/manage/config.yml b/manage/config.yml new file mode 100644 index 000000000..01105972a --- /dev/null +++ b/manage/config.yml @@ -0,0 +1,70 @@ +backend: + name: git-gateway + branch: gh-pages + +local_backend: true + +media_folder: "img/uploads" + +collections: + - name: dataset + label: Dataset + folder: _datasets + create: true + fields: + - label: Title + name: title + widget: string + + - label: Organization + name: organization + widget: relation + collection: organization + value_field: "title" + search_fields: + - title + + - label: Description + name: notes + widget: text + + - label: Resources + name: resources + widget: list + fields: + - label: Resource Name + name: name + widget: string + - label: URL + name: url + widget: string + - label: Format + name: format + widget: select + options: + - api + - csv + - json + - geojson + - html + - kml + - kmz + - shp + - xml + + - name: organization + label: Organization + folder: _organizations + create: true + fields: + - label: Title + name: title + widget: string + + - label: Description + name: description + widget: text + + - label: Logo + name: logo + widget: string diff --git a/manage/index.html b/manage/index.html new file mode 100644 index 000000000..befe09001 --- /dev/null +++ b/manage/index.html @@ -0,0 +1,16 @@ + + + + + + + Content Manager + + + + + + + + + From 08ed5724df4e19df63901dbb1fed32e0ea79943f Mon Sep 17 00:00:00 2001 From: timwis Date: Wed, 16 Nov 2022 07:59:10 +0000 Subject: [PATCH 02/77] Allow grouping datasets by organization for easier navigation in Netlify CMS --- manage/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manage/config.yml b/manage/config.yml index 01105972a..a67abcd45 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -11,6 +11,10 @@ collections: label: Dataset folder: _datasets create: true + summary: "{{title}} ({{organization}})" + view_groups: + - label: Organization + field: organization fields: - label: Title name: title From d4f738394c568f701bed902a085971abd4ce381e Mon Sep 17 00:00:00 2001 From: timwis Date: Wed, 16 Nov 2022 07:59:56 +0000 Subject: [PATCH 03/77] Allow editing site settings in Netlify CMS --- manage/config.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/manage/config.yml b/manage/config.yml index a67abcd45..1648ec1d3 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -72,3 +72,30 @@ collections: - label: Logo name: logo widget: string + + - name: settings + label: Settings + delete: false + editor: + preview: false + files: + - name: config + label: Site settings + file: _config.yml + fields: + - label: Site Title + name: title + widget: string + + - label: Site Greeting + name: greeting + description: Displayed on the homepage + widget: string + + - label: Site Description + name: description + widget: text + + - label: Base URL + name: baseurl + widget: string From d1348544fb5c263cad09330aa58713e7631eefd2 Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 18 Nov 2022 14:57:52 +0000 Subject: [PATCH 04/77] Allow uploading organization logo --- _layouts/dataset.html | 2 +- _layouts/organization.html | 2 +- manage/config.yml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/_layouts/dataset.html b/_layouts/dataset.html index bd4a714e0..91f87683a 100644 --- a/_layouts/dataset.html +++ b/_layouts/dataset.html @@ -19,7 +19,7 @@
{% if organization.logo and organization.logo != empty %} - {{ organization.title }} logo + {{ organization.title }} logo {% endif %}
diff --git a/_layouts/organization.html b/_layouts/organization.html index 5b675f604..ad45e0ee8 100644 --- a/_layouts/organization.html +++ b/_layouts/organization.html @@ -8,7 +8,7 @@
{% if page.logo and page.logo != empty %}
- {{ page.title }} logo + {{ page.title }} logo
{% else %} diff --git a/manage/config.yml b/manage/config.yml index 1648ec1d3..64b9fc8fd 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -71,7 +71,9 @@ collections: - label: Logo name: logo - widget: string + widget: image + allow_multiple: false + media_folder: /img/organizations - name: settings label: Settings From e8d771af0dcddd42264d68bec3c9e6698b8df36d Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 18 Nov 2022 16:21:44 +0000 Subject: [PATCH 05/77] Provide variable config to Netlify CMS from Jekyll --- manage/config.yml | 10 ++++++---- manage/index.html | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/manage/config.yml b/manage/config.yml index 64b9fc8fd..3f6b34c33 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -1,8 +1,8 @@ -backend: - name: git-gateway - branch: gh-pages +# Note that several config options are provided by JavaScript +# in index.html. Those options are merged into these options. -local_backend: true +backend: + name: github media_folder: "img/uploads" @@ -12,6 +12,7 @@ collections: folder: _datasets create: true summary: "{{title}} ({{organization}})" + preview_path: "datasets/{{slug}}" view_groups: - label: Organization field: organization @@ -60,6 +61,7 @@ collections: label: Organization folder: _organizations create: true + preview_path: "organizations/{{slug}}" fields: - label: Title name: title diff --git a/manage/index.html b/manage/index.html index befe09001..4ef072daf 100644 --- a/manage/index.html +++ b/manage/index.html @@ -1,3 +1,5 @@ +--- +--- @@ -10,7 +12,22 @@ + + From afb8ae7dedfb1e7b1e88a0baaaf720d307ddc851 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 21 Nov 2022 08:16:06 +0000 Subject: [PATCH 06/77] Wrap licenses.yml and categories.yml in a top-level 'items' key This was necessary to support editing in Netlify CMS. See #207. I've added a line in index.html that should provide backwards compatibility. Note that this commit breaks editing. This could be fixed as well, but since it's being removed as part of the Netlify CMS milestone, I haven't included it here. --- _data/categories.yml | 105 +++++++++++++++++++++--------------------- _data/licenses.yml | 25 ++++++---- _layouts/dataset.html | 3 +- index.html | 5 +- manage/config.yml | 49 ++++++++++++++++++++ 5 files changed, 125 insertions(+), 62 deletions(-) diff --git a/_data/categories.yml b/_data/categories.yml index 4ae16e91c..4136fbe3d 100644 --- a/_data/categories.yml +++ b/_data/categories.yml @@ -1,52 +1,53 @@ -- name: Arts / Culture / History - logo: /img/categories/arts-culture-history.svg - featured: true -- name: Budget / Finance - logo: /img/categories/budget-finance.svg - logo_credit: Renan Ferreira Santos from the Noun Project - featured: true -- name: Economy - logo: /img/categories/economy.svg - logo_credit: Vectors Market from the Noun Project - featured: true -- name: Education - logo: /img/categories/education.svg - logo_credit: Sergey Patutin from the Noun Project - featured: true -- name: Elections / Politics - logo: /img/categories/elections-politics.svg - logo_credit: Jean Soo from the Noun Project - featured: true -- name: Environment - logo: /img/categories/environment.svg - featured: true -- name: Food - logo: /img/categories/food.svg - logo_credit: Creative Stall from the Noun Project - featured: true -- name: Health / Human Services - logo: /img/categories/health-human-services.svg - logo_credit: Timothy Miller from the Noun Project - featured: true -- name: Parks / Recreation - logo: /img/categories/parks-recreation.svg - logo_credit: Pipe Rosas Licht from the Noun Project - featured: true -- name: Planning / Zoning - logo: /img/categories/planning-zoning.svg - featured: true -- name: Public Safety - logo: /img/categories/public-safety.svg - logo_credit: Rohith M S from the Noun Project - featured: true -- name: Real Estate / Land Records - logo: /img/categories/real-estate-land-records.svg - featured: true -- name: Transportation - logo: /img/categories/transportation.svg - logo_credit: Dmitry Baranovskiy from the Noun Project - featured: true -- name: Uncategorized - logo: /img/categories/uncategorized.svg - logo_credit: Edward Boatman from the Noun Project - featured: true \ No newline at end of file +items: + - name: Arts / Culture / History + logo: /img/categories/arts-culture-history.svg + featured: true + - name: Budget / Finance + logo: /img/categories/budget-finance.svg + logo_credit: Renan Ferreira Santos from the Noun Project + featured: true + - name: Economy + logo: /img/categories/economy.svg + logo_credit: Vectors Market from the Noun Project + featured: true + - name: Education + logo: /img/categories/education.svg + logo_credit: Sergey Patutin from the Noun Project + featured: true + - name: Elections / Politics + logo: /img/categories/elections-politics.svg + logo_credit: Jean Soo from the Noun Project + featured: true + - name: Environment + logo: /img/categories/environment.svg + featured: true + - name: Food + logo: /img/categories/food.svg + logo_credit: Creative Stall from the Noun Project + featured: true + - name: Health / Human Services + logo: /img/categories/health-human-services.svg + logo_credit: Timothy Miller from the Noun Project + featured: true + - name: Parks / Recreation + logo: /img/categories/parks-recreation.svg + logo_credit: Pipe Rosas Licht from the Noun Project + featured: true + - name: Planning / Zoning + logo: /img/categories/planning-zoning.svg + featured: true + - name: Public Safety + logo: /img/categories/public-safety.svg + logo_credit: Rohith M S from the Noun Project + featured: true + - name: Real Estate / Land Records + logo: /img/categories/real-estate-land-records.svg + featured: true + - name: Transportation + logo: /img/categories/transportation.svg + logo_credit: Dmitry Baranovskiy from the Noun Project + featured: true + - name: Uncategorized + logo: /img/categories/uncategorized.svg + logo_credit: Edward Boatman from the Noun Project + featured: true diff --git a/_data/licenses.yml b/_data/licenses.yml index e2b89b32b..e9b14ce70 100644 --- a/_data/licenses.yml +++ b/_data/licenses.yml @@ -1,8 +1,17 @@ -'https://creativecommons.org/licenses/by/4.0/': Creative Commons Attribution -'https://creativecommons.org/licenses/by-sa/4.0/': Creative Commons Attribution Share-Alike -'https://creativecommons.org/publicdomain/zero/1.0/': Creative Commons CCZero -'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/': UK Open Government Licence -'http://www.opendefinition.org/licenses/odc-by': Open Data Commons Attribution License -'http://www.opendefinition.org/licenses/odc-odbl': Open Data Commons Open Database License (ODbL) -'http://www.opendefinition.org/licenses/odc-pddl': Open Data Commons Public Domain Dedication and Licence (PDDL) -'': Not Applicable +items: + - name: Creative Commons Attribution + url: https://creativecommons.org/licenses/by/4.0/ + - name: Creative Commons Attribution Share-Alike + url: https://creativecommons.org/licenses/by-sa/4.0/ + - name: Creative Commons CCZero + url: https://creativecommons.org/publicdomain/zero/1.0/ + - name: UK Open Government Licence + url: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/ + - name: Open Data Commons Attribution License + url: http://www.opendefinition.org/licenses/odc-by + - name: Open Data Commons Open Database License (ODbL) + url: http://www.opendefinition.org/licenses/odc-odbl + - name: Open Data Commons Public Domain Dedication and Licence (PDDL) + url: http://www.opendefinition.org/licenses/odc-pddl + - name: Not Applicable + url: "" diff --git a/_layouts/dataset.html b/_layouts/dataset.html index 91f87683a..9bbdbedf1 100644 --- a/_layouts/dataset.html +++ b/_layouts/dataset.html @@ -79,11 +79,12 @@

Resources

Additional Info

{% if page.license and page.license != empty %} + {% assign license = site.data.licenses.items | where:"url",page.license | first %} diff --git a/index.html b/index.html index 41fda9414..ddc69c0b3 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,10 @@

{{ site.greeting }}

Browse by Category

-{% for category in site.data.categories %} +{% assign categories = site.data.categories.items %} +{% if categories == nil %}{% assign categories = site.data.categories %}{% endif %} + +{% for category in categories %} {% if category.featured == true %} {% capture logo_alt %}{{ category.name }}{% if category.logo_credit and category.logo_credit != empty %} logo by {{ category.logo_credit }}{% endif %}{% endcapture %} diff --git a/manage/config.yml b/manage/config.yml index 3f6b34c33..dcce7e7e0 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -103,3 +103,52 @@ collections: - label: Base URL name: baseurl widget: string + + - name: licenses + label: Licenses + description: Dataset licenses + file: _data/licenses.yml + fields: + - label: Licenses + name: items + label_singular: License + widget: list + fields: + - label: Name + name: name + widget: string + + - label: URL + name: url + required: false + widget: string + + - name: categories + label: Categories + file: _data/categories.yml + description: Dataset categories + fields: + - name: items + label: Categories + label_singular: Category + widget: list + fields: + - label: Name + name: name + widget: string + + - label: Logo + name: logo + required: false + widget: image + allow_multiple: false + media_folder: /img/categories + + - label: Logo Credit + name: logo_credit + required: false + widget: string + + - label: Featured on Homepage + name: featured + widget: boolean From 7332234505d62849c259b5cad82f35e25d6317a8 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 21 Nov 2022 08:16:39 +0000 Subject: [PATCH 07/77] Make most fields optional in Netlify CMS form --- manage/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manage/config.yml b/manage/config.yml index dcce7e7e0..edc958461 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -23,6 +23,7 @@ collections: - label: Organization name: organization + required: false widget: relation collection: organization value_field: "title" @@ -31,6 +32,7 @@ collections: - label: Description name: notes + required: false widget: text - label: Resources @@ -45,6 +47,7 @@ collections: widget: string - label: Format name: format + required: false widget: select options: - api @@ -69,10 +72,12 @@ collections: - label: Description name: description + required: false widget: text - label: Logo name: logo + required: false widget: image allow_multiple: false media_folder: /img/organizations From 4f568f62cc43fc047d6e812393cd304a95b1bf89 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 21 Nov 2022 08:17:10 +0000 Subject: [PATCH 08/77] Add remaining fields in Netlify CMS form license, category, maintainer, maintainer_email --- manage/config.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/manage/config.yml b/manage/config.yml index edc958461..412e403f3 100644 --- a/manage/config.yml +++ b/manage/config.yml @@ -60,6 +60,37 @@ collections: - shp - xml + - label: License + name: license + required: false + hint: Not sure what license to use? See [licenses.opendefinition.org](https://licenses.opendefinition.org/) + widget: relation + collection: settings + file: licenses + value_field: "items.*.url" + search_fields: ["items.*.name"] + display_fields: ["items.*.name"] + + - label: Category + name: category + required: false + widget: relation + multiple: true + collection: settings + file: categories + value_field: "items.*.name" + search_fields: ["items.*.name"] + + - label: Maintainer + name: maintainer + required: false + widget: string + + - label: Maintainer Email + name: maintainer_email + required: false + widget: string + - name: organization label: Organization folder: _organizations From a29d2a736ac15f23f4a36452d9c0fe71de792b5e Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 21 Nov 2022 08:20:27 +0000 Subject: [PATCH 09/77] Point 'Edit' buttons to Netlify CMS for datasets and organizations, and always show them Closes #208 --- _layouts/dataset.html | 2 +- _layouts/organization.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/dataset.html b/_layouts/dataset.html index 9bbdbedf1..615e92ffc 100644 --- a/_layouts/dataset.html +++ b/_layouts/dataset.html @@ -43,7 +43,7 @@

{% endif %}

{{ page.title }} - Edit + Edit

{{ page.notes }}

diff --git a/_layouts/organization.html b/_layouts/organization.html index ad45e0ee8..bd909b307 100644 --- a/_layouts/organization.html +++ b/_layouts/organization.html @@ -16,7 +16,7 @@ {% endif %}

{{ page.title }} - Edit + Edit

{{ page.description }}

From 4926e227b245e429034d97c0765492aa7367bc8b Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 21 Nov 2022 08:21:05 +0000 Subject: [PATCH 10/77] Support relative organization logo urls on organizations list --- organizations.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/organizations.html b/organizations.html index 79b2df70f..f4c59b726 100644 --- a/organizations.html +++ b/organizations.html @@ -13,7 +13,7 @@
{% if organization.logo and organization.logo != empty %} - {{ organization.title }} + {{ organization.title }} {% endif %}
From 1dc6188c9ba8117b613d921a4ac26bee42a5a21a Mon Sep 17 00:00:00 2001 From: timwis Date: Sat, 26 Nov 2022 13:15:24 -0500 Subject: [PATCH 11/77] Remove built-in editing UI --- _includes/admin-form-category.html | 11 - _includes/admin-form-license.html | 9 - _includes/dataset-form-resource.html | 11 - _includes/dataset-form.html | 62 --- _includes/form/category.html | 8 - _includes/form/checkbox.html | 6 - _includes/form/dropdown.html | 9 - _includes/form/license.html | 10 - _includes/form/organization.html | 14 - _includes/form/text.html | 4 - _includes/form/textarea.html | 4 - _includes/head.html | 2 - _includes/header.html | 14 - _includes/organization-form.html | 30 -- _layouts/dataset.html | 12 +- _layouts/organization.html | 12 - add-dataset.html | 22 -- add-organization.html | 22 -- admin.html | 148 ------- css/main.css | 42 +- datasets.html | 1 - organizations.html | 2 - package-lock.json | 382 +------------------ package.json | 10 +- scripts/dist/bundle.js | 2 +- scripts/src/components/admin-form.js | 40 -- scripts/src/components/categories-form.js | 9 - scripts/src/components/dataset-form.js | 13 - scripts/src/components/delete-page-button.js | 37 -- scripts/src/components/editable-list.js | 41 -- scripts/src/components/form.js | 64 ---- scripts/src/components/licenses-form.js | 15 - scripts/src/components/navigation.js | 53 --- scripts/src/components/theme-gallery.js | 39 -- scripts/src/components/view-switcher.js | 22 -- scripts/src/index.js | 52 +-- scripts/src/models/file.js | 58 --- scripts/src/models/user.js | 97 ----- scripts/src/util.js | 22 -- setup.md | 59 --- 40 files changed, 24 insertions(+), 1446 deletions(-) delete mode 100644 _includes/admin-form-category.html delete mode 100644 _includes/admin-form-license.html delete mode 100644 _includes/dataset-form-resource.html delete mode 100644 _includes/dataset-form.html delete mode 100644 _includes/form/category.html delete mode 100644 _includes/form/checkbox.html delete mode 100644 _includes/form/dropdown.html delete mode 100644 _includes/form/license.html delete mode 100644 _includes/form/organization.html delete mode 100644 _includes/form/text.html delete mode 100644 _includes/form/textarea.html delete mode 100644 _includes/organization-form.html delete mode 100644 add-dataset.html delete mode 100644 add-organization.html delete mode 100644 admin.html delete mode 100644 scripts/src/components/admin-form.js delete mode 100644 scripts/src/components/categories-form.js delete mode 100644 scripts/src/components/dataset-form.js delete mode 100644 scripts/src/components/delete-page-button.js delete mode 100644 scripts/src/components/editable-list.js delete mode 100644 scripts/src/components/form.js delete mode 100644 scripts/src/components/licenses-form.js delete mode 100644 scripts/src/components/navigation.js delete mode 100644 scripts/src/components/theme-gallery.js delete mode 100644 scripts/src/components/view-switcher.js delete mode 100644 scripts/src/models/file.js delete mode 100644 scripts/src/models/user.js delete mode 100644 setup.md diff --git a/_includes/admin-form-category.html b/_includes/admin-form-category.html deleted file mode 100644 index 9bf84495e..000000000 --- a/_includes/admin-form-category.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
- {% for field in category_fields %} - {% assign template = field.form_template | default: "form/text.html" %} - {% capture field_name %}categories[][{{ field.field_name }}]{% endcapture %} - {% assign value = category[field[field_name]] %} - {% include {{ template }} field=field field_name=field_name value=value %} - {% endfor %} -
- -
\ No newline at end of file diff --git a/_includes/admin-form-license.html b/_includes/admin-form-license.html deleted file mode 100644 index 16135967f..000000000 --- a/_includes/admin-form-license.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
- {% assign name = license[1] %} - {% include form/text.html field_label='License Name' field_name='licenses[][license_name]' value=name %} - {% assign url = license[0] %} - {% include form/text.html field_label='License URL' field_name='licenses[][license_url]' value=url %} -
- -
diff --git a/_includes/dataset-form-resource.html b/_includes/dataset-form-resource.html deleted file mode 100644 index 3a85333f2..000000000 --- a/_includes/dataset-form-resource.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
- {% for field in resource_fields %} - {% assign template = field.form_template | default: "form/text.html" %} - {% capture field_name %}resources[][{{ field.field_name }}]{% endcapture %} - {% assign value = resource[field[field_name]] %} - {% include {{ template }} field=field field_name=field_name value=value %} - {% endfor %} -
- -
\ No newline at end of file diff --git a/_includes/dataset-form.html b/_includes/dataset-form.html deleted file mode 100644 index 065b804e7..000000000 --- a/_includes/dataset-form.html +++ /dev/null @@ -1,62 +0,0 @@ -{% assign schema = include.dataset.schema | default: site.schema %} -{% assign dataset_fields = site.data.schemas[schema].dataset_fields %} -{% assign resource_fields = site.data.schemas[schema].resource_fields %} -{% assign dataset_system_fields = "title|organization|notes" | split: "|" %} -{% assign datasets = site.collections | where:"label","datasets" | first %} -
- - -
- {% for field in dataset_fields %} - {% if dataset_system_fields contains field.field_name %} - {% assign template = field.form_template | default: "form/text.html" %} - {% assign field_name = field.field_name %} - {% assign value = include.dataset[field_name] %} - {% include {{ template }} field=field field_name=field_name value=value %} - {% endif %} - {% endfor %} -
- -

Resources

-
-
- {% for resource in include.dataset.resources %} - {% include dataset-form-resource.html %} - {% endfor %} -
- - - - -
- -
-

Additional Info

- - {% for field in dataset_fields %} - {% unless dataset_system_fields contains field.field_name %} - {% assign template = field.form_template | default: "form/text.html" %} - {% assign field_name = field.field_name %} - {% assign value = include.dataset[field_name] %} - {% include {{ template }} field=field field_name=field_name value=value %} - {% endunless %} - {% endfor %} - -
- - - {% if include.dataset %} - - {% endif %} - Cancel - diff --git a/_includes/form/category.html b/_includes/form/category.html deleted file mode 100644 index f307c8dda..000000000 --- a/_includes/form/category.html +++ /dev/null @@ -1,8 +0,0 @@ -
- - -
\ No newline at end of file diff --git a/_includes/form/checkbox.html b/_includes/form/checkbox.html deleted file mode 100644 index 03a254167..000000000 --- a/_includes/form/checkbox.html +++ /dev/null @@ -1,6 +0,0 @@ -
- -
\ No newline at end of file diff --git a/_includes/form/dropdown.html b/_includes/form/dropdown.html deleted file mode 100644 index baa01eab6..000000000 --- a/_includes/form/dropdown.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - -
\ No newline at end of file diff --git a/_includes/form/license.html b/_includes/form/license.html deleted file mode 100644 index ecca0fb83..000000000 --- a/_includes/form/license.html +++ /dev/null @@ -1,10 +0,0 @@ -
- - -
Not sure what license to use? See http://licenses.opendefinition.org/
-
diff --git a/_includes/form/organization.html b/_includes/form/organization.html deleted file mode 100644 index ecc6f7983..000000000 --- a/_includes/form/organization.html +++ /dev/null @@ -1,14 +0,0 @@ -
- -
- - - - -
-
\ No newline at end of file diff --git a/_includes/form/text.html b/_includes/form/text.html deleted file mode 100644 index c3915ab51..000000000 --- a/_includes/form/text.html +++ /dev/null @@ -1,4 +0,0 @@ -
- - -
diff --git a/_includes/form/textarea.html b/_includes/form/textarea.html deleted file mode 100644 index 0441d89cf..000000000 --- a/_includes/form/textarea.html +++ /dev/null @@ -1,4 +0,0 @@ -
- - -
\ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html index 9ba0010f4..80b2809c1 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -14,8 +14,6 @@ {% endif %} - - diff --git a/_includes/header.html b/_includes/header.html index 1ce35dcb0..0eafcf629 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -15,20 +15,6 @@ {% endif %} {% endfor %} - - -
diff --git a/_includes/organization-form.html b/_includes/organization-form.html deleted file mode 100644 index 84ef41de5..000000000 --- a/_includes/organization-form.html +++ /dev/null @@ -1,30 +0,0 @@ -{% assign schema = page.schema | default: site.schema %} -{% assign organization_fields = site.data.schemas[schema].organization_fields %} -{% assign organization_system_fields = "title|description|logo" | split: "|" %} -{% assign organizations = site.collections | where: "label", "organizations" | first %} - - - -
- {% for field in organization_fields %} - {% assign template = field.form_template | default: "form/text.html" %} - {% assign field_name = field.field_name %} - {% assign value = include.organization[field_name] %} - {% include {{ template }} field=field field_name=field_name value=value %} - {% endfor %} -
- - - {% if include.organization %} - - {% endif %} - Cancel - diff --git a/_layouts/dataset.html b/_layouts/dataset.html index 615e92ffc..78ba73165 100644 --- a/_layouts/dataset.html +++ b/_layouts/dataset.html @@ -11,8 +11,7 @@ {% assign organization = site.organizations | where:"title",page.organization | first %} {% capture organization_url %}{{ site.baseurl }}/datasets/?organization={{ organization.title | slugify }}{% endcapture %}
-
-
+
{% if organization %}
@@ -109,14 +108,5 @@

Additional Info

- -
-
-
- {% include dataset-form.html dataset=page %} -
-
-
-
diff --git a/_layouts/organization.html b/_layouts/organization.html index bd909b307..ee66e5e3c 100644 --- a/_layouts/organization.html +++ b/_layouts/organization.html @@ -3,8 +3,6 @@ --- {% include breadcrumbs.html parent="Organizations" %}
-
-
{% if page.logo and page.logo != empty %}
@@ -29,15 +27,5 @@

Open in GitHub
-
- -
-
-
- {% include organization-form.html organization=page %} -
-
-
-
diff --git a/add-dataset.html b/add-dataset.html deleted file mode 100644 index 53d72bff3..000000000 --- a/add-dataset.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: default -title: Add Dataset -permalink: /add-dataset/ ---- -{% include breadcrumbs.html parent="Datasets" %} - - - - - -
-
-

Add Dataset

- {% include dataset-form.html %} -
-
diff --git a/add-organization.html b/add-organization.html deleted file mode 100644 index c628409fe..000000000 --- a/add-organization.html +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: default -title: Add Organization -permalink: /add-organization/ ---- -{% include breadcrumbs.html parent="Organizations" %} - - - - - -
-
-

Add Organization

- {% include organization-form.html %} -
-
diff --git a/admin.html b/admin.html deleted file mode 100644 index bee1f70bd..000000000 --- a/admin.html +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: Administration -layout: default -permalink: /admin/ ---- -{% include breadcrumbs.html %} - - - -
-
-

General

-
- -
- -
- - -
- -
- - -

Displayed on the homepage

-
- -
- - -
- -
- - -
- - - -
- - -
- -
-

Authentication

-
- -
- -
- - -

Register a Github application to get a Client ID

-
- -
- - -

Authentication server you deployed

-
- - - -
- - -
- -
-

Categories

- {% assign category_fields = site.data.schemas[site[schema]].category_fields %} -
-
- {% for category in site.data.categories %} - {% include admin-form-category.html %} - {% endfor %} -
-
- -
- - - - - -
- -
-

Licenses

-
-
- {% for license in site.data.licenses %} - {% unless license[1] == 'Not Applicable' %} - {% include admin-form-license.html %} - {% endunless %} - {% endfor %} -
-
- -
- - - - - - - - - - -
- -
-

Theme

- - Themes provided by Bootswatch via BootstrapCDN. -
- -
-

Site Maintenance

- Check for updates -
-
diff --git a/css/main.css b/css/main.css index de9d8ee08..dc15f5bb7 100644 --- a/css/main.css +++ b/css/main.css @@ -21,24 +21,10 @@ dataset { font-size: 90%; } -.select2 { - margin-bottom: 10px; -} - .datasets-count { display: inline-block; } -.add-dataset-btn { - margin-top: 15px; -} - -/* Hidden from guests */ -.user-issue, -.admin-only { - display: none; -} - .resource-details, .show-resource-details { display: none; @@ -48,22 +34,12 @@ dataset { font-size: 80%; } -.user-issue { - color: red; -} - -[data-component~=view-switcher] [data-hook~=view] { - display: none; -} - -.homepage-categories, -.theme-gallery { +.homepage-categories { text-align: justify; } /* allows last line of categories to be justify aligned */ -.homepage-categories:after, -.theme-gallery:after { +.homepage-categories:after { display: inline-block; width: 100%; content: ''; @@ -86,20 +62,6 @@ dataset { color: #000; } -.theme-gallery .card { - display: inline-block; - max-width: 250px; - text-align: center; -} - -.theme-gallery .card img { - width: 100%; -} - -.theme-gallery .card-primary { - border-width: 5px; -} - .view-code-link { margin: 1em; } \ No newline at end of file diff --git a/datasets.html b/datasets.html index 698471054..00b08d7d4 100644 --- a/datasets.html +++ b/datasets.html @@ -16,7 +16,6 @@

Organizations

diff --git a/organizations.html b/organizations.html index f4c59b726..d4573cd86 100644 --- a/organizations.html +++ b/organizations.html @@ -5,8 +5,6 @@ --- {% include breadcrumbs.html %} - Add Organization - {% for organization in site.organizations %} {% assign dataset_count = site.datasets | where:"organization", organization.title | size %}
diff --git a/package-lock.json b/package-lock.json index 98d2f21a9..210c7944b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,18 +9,10 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "ampersand-state": "^5.0.3", "bootstrap": "^4.3.1", - "github-api": "^3.2.2", "jquery": "^3.4.1", "jquery-deparam": "^0.5.3", - "jquery-serializejson": "^2.9.0", - "js-cookie": "^2.2.0", - "js-yaml": "^3.13.1", - "lodash": "^4.17.11", - "notie": "github:timwis/notie#string-types", - "popper.js": "^1.15.0", - "select2": "^4.0.7" + "lodash": "^4.17.11" }, "devDependencies": { "@babel/core": "^7.5.0", @@ -2282,36 +2274,6 @@ "ajv": "^6.9.1" } }, - "node_modules/ampersand-events": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ampersand-events/-/ampersand-events-2.0.2.tgz", - "integrity": "sha512-pPnVEJviRxXi9YhZA9j3GwGGBTlDLi+YIoBvrpKXgce+CO1nMlZU2aOV8OJogNuR2YPbptAUHNz7SKX+MvLj8A==", - "dependencies": { - "ampersand-version": "^1.0.2", - "lodash": "^4.6.1" - } - }, - "node_modules/ampersand-state": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ampersand-state/-/ampersand-state-5.0.3.tgz", - "integrity": "sha512-sr904K5zvw6mkGjFHhTcfBIdpoJ6mn/HrFg7OleRmBpw3apLb3Z0gVrgRTb7kK1wOLI34vs4S+IXqNHUeqWCzw==", - "dependencies": { - "ampersand-events": "^2.0.1", - "ampersand-version": "^1.0.0", - "array-next": "~0.0.1", - "key-tree-store": "^1.3.0", - "lodash": "^4.12.0" - } - }, - "node_modules/ampersand-version": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ampersand-version/-/ampersand-version-1.0.2.tgz", - "integrity": "sha512-FVVLY7Pghtgc8pQl0rF3A3+OS/CZ+/ILLMIYIaO1cA9v5SRkainqUMfSot3fu32svuThIsYK3q9iCsH9W5+mWQ==", - "dependencies": { - "find-root": "^0.1.1", - "through2": "^0.6.3" - } - }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -2349,33 +2311,12 @@ "node": ">= 8" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, - "node_modules/array-next": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-next/-/array-next-0.0.1.tgz", - "integrity": "sha512-sBOC/Iaz2hCcYi2XlyRfyZCRUxamlE5NJXEFjE9BTx23HALnWAFsPjGtfrAclt9o3G/38Het2yyeyOd3CEY7lg==" - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, "node_modules/babel-loader": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", @@ -2893,7 +2834,8 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", @@ -3088,18 +3030,6 @@ "node": ">=8.0.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -3344,11 +3274,6 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, - "node_modules/find-root": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz", - "integrity": "sha512-GyDxVgA61TZcrgDJPqOqGBpi80Uf2yIstubgizi7AjC9yPdRrqBR+Y0MvK4kXnYlaoz3d+SGxDHMYVkwI/yd2w==" - }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -3366,6 +3291,7 @@ "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, "funding": [ { "type": "individual", @@ -3466,30 +3392,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/github-api": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/github-api/-/github-api-3.4.0.tgz", - "integrity": "sha512-2yYqYS6Uy4br1nw0D3VrlYWxtGTkUhIZrumBrcBwKdBOzMT8roAe8IvI6kjIOkxqxapKR5GkEsHtz3Du/voOpA==", - "dependencies": { - "axios": "^0.21.1", - "debug": "^2.2.0", - "js-base64": "^2.1.9", - "utf8": "^2.1.1" - } - }, - "node_modules/github-api/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/github-api/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -3755,7 +3657,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/interpret": { "version": "2.2.0", @@ -3892,11 +3795,6 @@ "node": ">=8" } }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3960,39 +3858,12 @@ "resolved": "https://registry.npmjs.org/jquery-deparam/-/jquery-deparam-0.5.3.tgz", "integrity": "sha512-R+X/F4echMhrcy2ko2I0Ek6nNN0ffnoK3VbwECEQ4hVmUu87sGjsxlLet/4nK/HtsG4ZHN/2SqqC2PkH/nKngg==" }, - "node_modules/jquery-serializejson": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/jquery-serializejson/-/jquery-serializejson-2.9.0.tgz", - "integrity": "sha512-xR7rjl0tRKIVioV5lOkOSv7K8BHMvGzYzC7Ech1iAYuZiYf0ksEpLC8OqjA5VApXf/qn/49O9hTmW70+/EA0vA==" - }, - "node_modules/js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" - }, - "node_modules/js-cookie": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", - "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4029,11 +3900,6 @@ "node": ">=6" } }, - "node_modules/key-tree-store": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/key-tree-store/-/key-tree-store-1.3.0.tgz", - "integrity": "sha512-qXk+lR+LXvGos3wqMxIMWweKDgCx8ZKWM6BEPm7iZkOKug5ggi66vUt+3vbtKJLBrAyOxQ4S8JRwK++Q4XZRmw==" - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4277,11 +4143,6 @@ "node": ">=0.10.0" } }, - "node_modules/notie": { - "version": "3.0.0", - "resolved": "git+ssh://git@github.com/timwis/notie.git#c776aa054a916d1bdbcb093b9cad06304e93e970", - "license": "MIT" - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -4503,6 +4364,7 @@ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -4593,17 +4455,6 @@ "node": ">= 0.8" } }, - "node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4832,11 +4683,6 @@ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", "dev": true }, - "node_modules/select2": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/select2/-/select2-4.0.13.tgz", - "integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw==" - }, "node_modules/selfsigned": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", @@ -5147,11 +4993,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -5161,11 +5002,6 @@ "node": ">= 0.8" } }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -5278,15 +5114,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==", - "dependencies": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -5420,11 +5247,6 @@ "punycode": "^2.1.0" } }, - "node_modules/utf8": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha512-QXo+O/QkLP/x1nyi54uQiG0XrODxdysuQvE5dtVqv7F5K2Qb6FsN+qbr6KhF5wQ20tfcV3VQp0/2x1e1MRSPWg==" - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5886,14 +5708,6 @@ "optional": true } } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } } }, "dependencies": { @@ -7571,36 +7385,6 @@ "dev": true, "requires": {} }, - "ampersand-events": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ampersand-events/-/ampersand-events-2.0.2.tgz", - "integrity": "sha512-pPnVEJviRxXi9YhZA9j3GwGGBTlDLi+YIoBvrpKXgce+CO1nMlZU2aOV8OJogNuR2YPbptAUHNz7SKX+MvLj8A==", - "requires": { - "ampersand-version": "^1.0.2", - "lodash": "^4.6.1" - } - }, - "ampersand-state": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/ampersand-state/-/ampersand-state-5.0.3.tgz", - "integrity": "sha512-sr904K5zvw6mkGjFHhTcfBIdpoJ6mn/HrFg7OleRmBpw3apLb3Z0gVrgRTb7kK1wOLI34vs4S+IXqNHUeqWCzw==", - "requires": { - "ampersand-events": "^2.0.1", - "ampersand-version": "^1.0.0", - "array-next": "~0.0.1", - "key-tree-store": "^1.3.0", - "lodash": "^4.12.0" - } - }, - "ampersand-version": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ampersand-version/-/ampersand-version-1.0.2.tgz", - "integrity": "sha512-FVVLY7Pghtgc8pQl0rF3A3+OS/CZ+/ILLMIYIaO1cA9v5SRkainqUMfSot3fu32svuThIsYK3q9iCsH9W5+mWQ==", - "requires": { - "find-root": "^0.1.1", - "through2": "^0.6.3" - } - }, "ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -7626,33 +7410,12 @@ "picomatch": "^2.0.4" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "~1.0.2" - } - }, "array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, - "array-next": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-next/-/array-next-0.0.1.tgz", - "integrity": "sha512-sBOC/Iaz2hCcYi2XlyRfyZCRUxamlE5NJXEFjE9BTx23HALnWAFsPjGtfrAclt9o3G/38Het2yyeyOd3CEY7lg==" - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, "babel-loader": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", @@ -8055,7 +7818,8 @@ "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true }, "cross-spawn": { "version": "7.0.3", @@ -8199,11 +7963,6 @@ "estraverse": "^4.1.1" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, "esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -8409,11 +8168,6 @@ "pkg-dir": "^4.1.0" } }, - "find-root": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz", - "integrity": "sha512-GyDxVgA61TZcrgDJPqOqGBpi80Uf2yIstubgizi7AjC9yPdRrqBR+Y0MvK4kXnYlaoz3d+SGxDHMYVkwI/yd2w==" - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -8427,7 +8181,8 @@ "follow-redirects": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true }, "forwarded": { "version": "0.2.0", @@ -8489,32 +8244,6 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, - "github-api": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/github-api/-/github-api-3.4.0.tgz", - "integrity": "sha512-2yYqYS6Uy4br1nw0D3VrlYWxtGTkUhIZrumBrcBwKdBOzMT8roAe8IvI6kjIOkxqxapKR5GkEsHtz3Du/voOpA==", - "requires": { - "axios": "^0.21.1", - "debug": "^2.2.0", - "js-base64": "^2.1.9", - "utf8": "^2.1.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -8726,7 +8455,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "interpret": { "version": "2.2.0", @@ -8815,11 +8545,6 @@ "is-docker": "^2.0.0" } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8870,36 +8595,12 @@ "resolved": "https://registry.npmjs.org/jquery-deparam/-/jquery-deparam-0.5.3.tgz", "integrity": "sha512-R+X/F4echMhrcy2ko2I0Ek6nNN0ffnoK3VbwECEQ4hVmUu87sGjsxlLet/4nK/HtsG4ZHN/2SqqC2PkH/nKngg==" }, - "jquery-serializejson": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/jquery-serializejson/-/jquery-serializejson-2.9.0.tgz", - "integrity": "sha512-xR7rjl0tRKIVioV5lOkOSv7K8BHMvGzYzC7Ech1iAYuZiYf0ksEpLC8OqjA5VApXf/qn/49O9hTmW70+/EA0vA==" - }, - "js-base64": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", - "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==" - }, - "js-cookie": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", - "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -8924,11 +8625,6 @@ "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true }, - "key-tree-store": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/key-tree-store/-/key-tree-store-1.3.0.tgz", - "integrity": "sha512-qXk+lR+LXvGos3wqMxIMWweKDgCx8ZKWM6BEPm7iZkOKug5ggi66vUt+3vbtKJLBrAyOxQ4S8JRwK++Q4XZRmw==" - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -9112,10 +8808,6 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "notie": { - "version": "git+ssh://git@github.com/timwis/notie.git#c776aa054a916d1bdbcb093b9cad06304e93e970", - "from": "notie@github:timwis/notie#string-types" - }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -9275,7 +8967,8 @@ "popper.js": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "peer": true }, "process-nextick-args": { "version": "2.0.1", @@ -9343,17 +9036,6 @@ } } }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -9521,11 +9203,6 @@ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", "dev": true }, - "select2": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/select2/-/select2-4.0.13.tgz", - "integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw==" - }, "selfsigned": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", @@ -9799,22 +9476,12 @@ } } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -9880,15 +9547,6 @@ } } }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha512-RkK/CCESdTKQZHdmKICijdKKsCRVHs5KsLZ6pACAmF/1GPUQhonHSXWNERctxEp7RmvjdNbZTL5z9V7nSCXKcg==", - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - }, "thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -9979,11 +9637,6 @@ "punycode": "^2.1.0" } }, - "utf8": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", - "integrity": "sha512-QXo+O/QkLP/x1nyi54uQiG0XrODxdysuQvE5dtVqv7F5K2Qb6FsN+qbr6KhF5wQ20tfcV3VQp0/2x1e1MRSPWg==" - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -10298,11 +9951,6 @@ "integrity": "sha512-+s49uSmZpvtAsd2h37vIPy1RBusaLawVe8of+GyEPsaJTCMpj/2v8NpeK1SHXjBlQ95lQTmQofOJnFiLoaN3yw==", "dev": true, "requires": {} - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" } } } diff --git a/package.json b/package.json index ee6cb0798..9a38907c9 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,9 @@ "webpack-dev-server": "^4.11.1" }, "dependencies": { - "ampersand-state": "^5.0.3", "bootstrap": "^4.3.1", - "github-api": "^3.2.2", "jquery": "^3.4.1", "jquery-deparam": "^0.5.3", - "jquery-serializejson": "^2.9.0", - "js-cookie": "^2.2.0", - "js-yaml": "^3.13.1", - "lodash": "^4.17.11", - "notie": "github:timwis/notie#string-types", - "popper.js": "^1.15.0", - "select2": "^4.0.7" + "lodash": "^4.17.11" } } diff --git a/scripts/dist/bundle.js b/scripts/dist/bundle.js index 016bfea60..5899ed1a5 100644 --- a/scripts/dist/bundle.js +++ b/scripts/dist/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var t={49740:(t,e,n)=>{var r=n(51463),i=n(3674),o=n(41609),s=n(28583),a=n(84486),u=Array.prototype.slice,c=n(25668),l={on:function(t,e,n){return c.eventsApi(this,"on",t,[e,n])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:n,ctx:n||this}),this):this},once:function(t,e,n){if(!c.eventsApi(this,"once",t,[e,n])||!e)return this;var i=this,o=r((function(){i.off(t,o),e.apply(this,arguments)}));return o._callback=e,this.on(t,o,n)},off:function(t,e,n){var r,o,s,a,u,l,h,f;if(!this._events||!c.eventsApi(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events=void 0,this;for(u=0,l=(a=t?[t]:i(this._events)).length;u{var r=n(73955),i=/\s+/;e.triggerEvents=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++r{"use strict";var r=n(73955),i=n(28583),o=function(t){return i({},t)},s=n(57557),a=n(7187),u=n(2525),c=n(64721),l=n(47037),h=n(13218),f=n(47960),p=n(23560),d=n(18446),v=n(18721),m=n(58613),g=n(93386),y=n(49740),x=n(78414),b=n(72185),_=/^change:/,w=function(){};function E(t,e){e||(e={}),this.cid||(this.cid=r("state")),this._events={},this._values={},this._eventBubblingHandlerCache={},this._definition=Object.create(this._definition),e.parse&&(t=this.parse(t,e)),this.parent=e.parent,this.collection=e.collection,this._keyTree=new x,this._initCollections(),this._initChildren(),this._cache={},this._previousAttributes={},t&&this.set(t,i({silent:!0,initial:!0},e)),this._changed={},this._derived&&this._initDerived(),!1!==e.init&&this.initialize.apply(this,arguments)}function D(t,e,n,r){var i,o,s=t._definition[e]={};if(l(n))(i=t._ensureValidType(n))&&(s.type=i);else{if(Array.isArray(n)&&(n={type:(o=n)[0],required:o[1],default:o[2]}),(i=t._ensureValidType(n.type))&&(s.type=i),n.required&&(s.required=!0),n.default&&"object"==typeof n.default)throw new TypeError("The default value for "+e+" cannot be an object/array, must be a value or a function which returns a value/object/array");s.default=n.default,s.allowNull=!!n.allowNull&&n.allowNull,n.setOnce&&(s.setOnce=!0),s.required&&void 0===s.default&&!s.setOnce&&(s.default=t._getDefaultForType(i)),s.test=n.test,s.values=n.values}return r&&(s.session=!0),i||(i=l(n)?n:n.type,console.warn("Invalid data type of `"+i+"` for `"+e+"` property. Use one of the default types or define your own")),Object.defineProperty(t,e,{set:function(t){this.set(e,t)},get:function(){if(!this._values)throw Error('You may be trying to `extend` a state object with "'+e+'" which has been defined in `props` on the object being extended');var t=this._values[e],n=this._dataTypes[s.type];if(void 0!==t)return n&&n.get&&(t=n.get(t)),t;var r=m(s,"default");return this._values[e]=r,void 0!==r&&this._getOnChangeForType(s.type)(r,t,e),r}}),s}function A(t,e,n){(t._derived[e]={fn:p(n)?n:n.fn,cache:!1!==n.cache,depList:n.deps||[]}).depList.forEach((function(n){t._deps[n]=g(t._deps[n]||[],[e])})),Object.defineProperty(t,e,{get:function(){return this._getDerivedProperty(e)},set:function(){throw new TypeError("`"+e+"` is a derived property, it can't be set directly.")}})}i(E.prototype,y,{extraProperties:"ignore",idAttribute:"id",namespaceAttribute:"namespace",typeAttribute:"modelType",initialize:function(){return this},getId:function(){return this[this.idAttribute]},getNamespace:function(){return this[this.namespaceAttribute]},getType:function(){return this[this.typeAttribute]},isNew:function(){return null==this.getId()},escape:function(t){return a(this.get(t))},isValid:function(t){return this._validate({},i(t||{},{validate:!0}))},parse:function(t,e){return t},serialize:function(t){var e=i({props:!0},t),n=this.getAttributes(e,!0),r=function(t,e){n[e]=this[e].serialize()}.bind(this);return u(this._children,r),u(this._collections,r),n},set:function(t,e,n){var r,i,o,s,a,u,l,f,p,d,v,g,y,x,b,_,w,E=this,D=this.extraProperties;if(h(t)||null===t?(p=t,n=e):(p={})[t]=e,n=n||{},!this._validate(p,n))return!1;g=n.unset,v=n.silent,x=n.initial,r=this._changing,this._changing=!0,i=[],x?this._previousAttributes={}:r||(this._previousAttributes=this.attributes,this._changed={});for(var A=0,C=Object.keys(p),S=C.length;A{t.exports=function(t,e){var n=t.length,r=t.indexOf(e)+1;return r>n-1&&(r=0),t[r]}},9669:(t,e,n)=>{t.exports=n(51609)},55448:(t,e,n)=>{"use strict";var r=n(64867),i=n(36026),o=n(4372),s=n(15327),a=n(94097),u=n(84109),c=n(67985),l=n(85061);t.exports=function(t){return new Promise((function(e,n){var h=t.data,f=t.headers,p=t.responseType;r.isFormData(h)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var v=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(v+":"+m)}var g=a(t.baseURL,t.url);function y(){if(d){var r="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,o={data:p&&"text"!==p&&"json"!==p?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:t,request:d};i(e,n,o),d=null}}if(d.open(t.method.toUpperCase(),s(g,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,"onloadend"in d?d.onloadend=y:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(y)},d.onabort=function(){d&&(n(l("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(l("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var x=(t.withCredentials||c(g))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;x&&(f[t.xsrfHeaderName]=x)}"setRequestHeader"in d&&r.forEach(f,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),p&&"json"!==p&&(d.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),n(t),d=null)})),h||(h=null),d.send(h)}))}},51609:(t,e,n)=>{"use strict";var r=n(64867),i=n(91849),o=n(30321),s=n(47185);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(45655));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(65263),u.CancelToken=n(14972),u.isCancel=n(26502),u.all=function(t){return Promise.all(t)},u.spread=n(8713),u.isAxiosError=n(16268),t.exports=u,t.exports.default=u},65263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},14972:(t,e,n)=>{"use strict";var r=n(65263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},26502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},30321:(t,e,n)=>{"use strict";var r=n(64867),i=n(15327),o=n(80782),s=n(13572),a=n(47185),u=n(54875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var l=[s,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var h=t;n.length;){var f=n.shift(),p=n.shift();try{h=f(h)}catch(t){p(t);break}}try{i=s(h)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=l},80782:(t,e,n)=>{"use strict";var r=n(64867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},94097:(t,e,n)=>{"use strict";var r=n(91793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},85061:(t,e,n)=>{"use strict";var r=n(80481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},13572:(t,e,n)=>{"use strict";var r=n(64867),i=n(18527),o=n(26502),s=n(45655);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return a(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(a(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},80481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},47185:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(s).concat(a),h=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(h,c),n}},36026:(t,e,n)=>{"use strict";var r=n(85061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},18527:(t,e,n)=>{"use strict";var r=n(64867),i=n(45655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},45655:(t,e,n)=>{"use strict";var r=n(64867),i=n(16016),o=n(80481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(55448)),u),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},91849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(64867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},16268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},67985:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},16016:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},84109:(t,e,n)=>{"use strict";var r=n(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},54875:(t,e,n)=>{"use strict";var r=n(88593),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={},s=r.version.split(".");function a(t,e){for(var n=e?e.split("."):s,r=t.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]0;){var o=r[i],s=e[o];if(s){var a=t[o],u=void 0===a||s(a,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},64867:(t,e,n)=>{"use strict";var r=n(91849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n0&&(this._selector=a,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e,n,c,y=t.prototype;return y.toggle=function(){r.default(this._element).hasClass(l)?this.hide():this.show()},y.show=function(){var e,n,o=this;if(!(this._isTransitioning||r.default(this._element).hasClass(l)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains(h)}))).length&&(e=null),e&&(n=r.default(e).not(this._selector).data(u))&&n._isTransitioning))){var s=r.default.Event("show.bs.collapse");if(r.default(this._element).trigger(s),!s.isDefaultPrevented()){e&&(t._jQueryInterface.call(r.default(e).not(this._selector),"hide"),n||r.default(e).data(u,null));var a=this._getDimension();r.default(this._element).removeClass(h).addClass(f),this._element.style[a]=0,this._triggerArray.length&&r.default(this._triggerArray).removeClass(p).attr("aria-expanded",!0),this.setTransitioning(!0);var c="scroll"+(a[0].toUpperCase()+a.slice(1)),d=i.default.getTransitionDurationFromElement(this._element);r.default(this._element).one(i.default.TRANSITION_END,(function(){r.default(o._element).removeClass(f).addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),r.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(d),this._element.style[a]=this._element[c]+"px"}}},y.hide=function(){var t=this;if(!this._isTransitioning&&r.default(this._element).hasClass(l)){var e=r.default.Event("hide.bs.collapse");if(r.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",i.default.reflow(this._element),r.default(this._element).addClass(f).removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s0},f._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=u({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},f._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),u({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(l);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(l,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(_)),r=0,o=n.length;r0&&s--,40===e.which&&s

'}),d=s({},i.default.DefaultType,{content:"(string|element|function)"}),v={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},m=function(t){function e(){return t.apply(this,arguments)||this}var n,i;i=t,(n=e).prototype=Object.create(i.prototype),n.prototype.constructor=n,a(n,i);var s,h,m,g=e.prototype;return g.isWithContent=function(){return this.getTitle()||this._getContent()},g.addAttachmentClass=function(t){r.default(this.getTipElement()).addClass("bs-popover-"+t)},g.getTipElement=function(){return this.tip=this.tip||r.default(this.config.template)[0],this.tip},g.setContent=function(){var t=r.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},g._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},g._cleanTipClass=function(){var t=r.default(this.getTipElement()),e=t.attr("class").match(f);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this).data(c),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,i),r.default(this).data(c,n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},s=e,m=[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return u}},{key:"DATA_KEY",get:function(){return c}},{key:"Event",get:function(){return v}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return d}}],(h=null)&&o(s.prototype,h),m&&o(s,m),Object.defineProperty(s,"prototype",{writable:!1}),e}(i.default);return r.default.fn[u]=m._jQueryInterface,r.default.fn[u].Constructor=m,r.default.fn[u].noConflict=function(){return r.default.fn[u]=h,m._jQueryInterface},m}(n(65311),n(33824))},8471:function(t,e,n){t.exports=function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(t),i=n(e);function o(t,e){for(var n=0;n li > .active",p=function(){function t(t){this._element=t}var e,n,a,p=t.prototype;return p.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&r.default(this._element).hasClass(u)||r.default(this._element).hasClass("disabled")||this._element.hasAttribute("disabled"))){var e,n,o=r.default(this._element).closest(".nav, .list-group")[0],s=i.default.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?f:h;n=(n=r.default.makeArray(r.default(o).find(a)))[n.length-1]}var c=r.default.Event("hide.bs.tab",{relatedTarget:this._element}),l=r.default.Event("show.bs.tab",{relatedTarget:n});if(n&&r.default(n).trigger(c),r.default(this._element).trigger(l),!l.isDefaultPrevented()&&!c.isDefaultPrevented()){s&&(e=document.querySelector(s)),this._activate(this._element,o);var p=function(){var e=r.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=r.default.Event("shown.bs.tab",{relatedTarget:n});r.default(n).trigger(e),r.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,p):p()}}},p.dispose=function(){r.default.removeData(this._element,s),this._element=null},p._activate=function(t,e,n){var o=this,s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?r.default(e).children(h):r.default(e).find(f))[0],a=n&&s&&r.default(s).hasClass(c),u=function(){return o._transitionComplete(t,s,n)};if(s&&a){var p=i.default.getTransitionDurationFromElement(s);r.default(s).removeClass(l).one(i.default.TRANSITION_END,u).emulateTransitionEnd(p)}else u()},p._transitionComplete=function(t,e,n){if(e){r.default(e).removeClass(u);var o=r.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&r.default(o).removeClass(u),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}r.default(t).addClass(u),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),i.default.reflow(t),t.classList.contains(c)&&t.classList.add(l);var s=t.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&r.default(s).hasClass("dropdown-menu")){var a=r.default(t).closest(".dropdown")[0];if(a){var h=[].slice.call(a.querySelectorAll(".dropdown-toggle"));r.default(h).addClass(u)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=r.default(this),i=n.data(s);if(i||(i=new t(this),n.data(s,i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},e=t,a=[{key:"VERSION",get:function(){return"4.6.2"}}],(n=null)&&o(e.prototype,n),a&&o(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();return r.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),p._jQueryInterface.call(r.default(this),"show")})),r.default.fn.tab=p._jQueryInterface,r.default.fn.tab.Constructor=p,r.default.fn.tab.noConflict=function(){return r.default.fn.tab=a,p._jQueryInterface},p}(n(65311),n(66801))},33824:function(t,e,n){t.exports=function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(t),o=r(e),s=r(n);function a(t,e){for(var n=0;n
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},S={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},k={HIDE:"hide"+v,HIDDEN:"hidden"+v,SHOW:"show"+v,SHOWN:"shown"+v,INSERTED:"inserted"+v,CLICK:"click"+v,FOCUSIN:"focusin"+v,FOCUSOUT:"focusout"+v,MOUSEENTER:"mouseenter"+v,MOUSELEAVE:"mouseleave"+v},F=function(){function t(t,e){if(void 0===o.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e,n,r,c=t.prototype;return c.enable=function(){this._isEnabled=!0},c.disable=function(){this._isEnabled=!1},c.toggleEnabled=function(){this._isEnabled=!this._isEnabled},c.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(b))return void this._leave(null,this);this._enter(null,this)}},c.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},c.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=s.default.findShadowRoot(this.element),r=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!r)return;var a=this.getTipElement(),u=s.default.getUID(this.constructor.NAME);a.setAttribute("id",u),this.element.setAttribute("aria-describedby",u),this.setContent(),this.config.animation&&i.default(a).addClass(x);var c="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,l=this._getAttachment(c);this.addAttachmentClass(l);var h=this._getContainer();i.default(a).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(a).appendTo(h),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new o.default(this.element,a,this._getPopperConfig(l)),i.default(a).addClass(b),i.default(a).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var f=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===w&&t._leave(null,t)};if(i.default(this.tip).hasClass(x)){var p=s.default.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(s.default.TRANSITION_END,f).emulateTransitionEnd(p)}else f()}},c.hide=function(t){var e=this,n=this.getTipElement(),r=i.default.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==_&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(r),!r.isDefaultPrevented()){if(i.default(n).removeClass(b),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass(x)){var a=s.default.getTransitionDurationFromElement(n);i.default(n).one(s.default.TRANSITION_END,o).emulateTransitionEnd(a)}else o();this._hoverState=""}},c.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},c.isWithContent=function(){return Boolean(this.getTitle())},c.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},c.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},c.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},c.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=f(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},c.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},c._getPopperConfig=function(t){var e=this;return u({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},c._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=u({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},c._getContainer=function(){return!1===this.config.container?document.body:s.default.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},c._getAttachment=function(t){return A[t.toUpperCase()]},c._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===E?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,r=e===E?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(r,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=u({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},c._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},c._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?D:E]=!0),i.default(e.getTipElement()).hasClass(b)||e._hoverState===_?e._hoverState=_:(clearTimeout(e._timeout),e._hoverState=_,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===_&&e.show()}),e.config.delay.show):e.show())},c._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?D:E]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=w,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===w&&e.hide()}),e.config.delay.hide):e.hide())},c._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},c._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==y.indexOf(t)&&delete e[t]})),"number"==typeof(t=u({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),s.default.typeCheckConfig(p,t,this.constructor.DefaultType),t.sanitize&&(t.template=f(t.template,t.whiteList,t.sanitizeFn)),t},c._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},c._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(g);null!==e&&e.length&&t.removeClass(e.join(""))},c._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},c._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(x),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),r=n.data(d),o="object"==typeof e&&e;if((r||!/dispose|hide/.test(e))&&(r||(r=new t(this,o),n.data(d,r)),"string"==typeof e)){if(void 0===r[e])throw new TypeError('No method named "'+e+'"');r[e]()}}))},e=t,r=[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return C}},{key:"NAME",get:function(){return p}},{key:"DATA_KEY",get:function(){return d}},{key:"Event",get:function(){return k}},{key:"EVENT_KEY",get:function(){return v}},{key:"DefaultType",get:function(){return S}}],(n=null)&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();return i.default.fn[p]=F._jQueryInterface,i.default.fn[p].Constructor=F,i.default.fn[p].noConflict=function(){return i.default.fn[p]=m,F._jQueryInterface},F}(n(65311),n(28981),n(66801))},66801:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="transitionend";function i(t){var e=this,r=!1;return n.default(this).one(o.TRANSITION_END,(function(){r=!0})),setTimeout((function(){r||o.triggerTransitionEnd(e)}),t),this}var o={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=n.default(t).css("transition-duration"),r=n.default(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(r);return i||o?(e=e.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(e)+parseFloat(r))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){n.default(t).trigger(r)},supportsTransitionEnd:function(){return Boolean(r)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r],s=e[r],a=s&&o.isElement(s)?"element":null==(u=s)?""+u:{}.toString.call(u).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(a))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+a+'" but expected type "'+i+'".')}var u},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?o.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===n.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=n.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};return o.jQueryDetection(),n.default.fn.emulateTransitionEnd=i,n.default.event.special[o.TRANSITION_END]={bindType:r,delegateType:r,handle:function(t){if(n.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},o}(n(65311))},7694:(t,e,n)=>{n(61761),t.exports=n(25645).RegExp.escape},24963:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},83365:(t,e,n)=>{var r=n(92032);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},17722:(t,e,n)=>{var r=n(86314)("unscopables"),i=Array.prototype;null==i[r]&&n(87728)(i,r,{}),t.exports=function(t){i[r][t]=!0}},76793:(t,e,n)=>{"use strict";var r=n(24496)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},83328:t=>{t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},27007:(t,e,n)=>{var r=n(55286);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},5216:(t,e,n)=>{"use strict";var r=n(20508),i=n(92337),o=n(10875);t.exports=[].copyWithin||function(t,e){var n=r(this),s=o(n.length),a=i(t,s),u=i(e,s),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?s:i(c,s))-u,s-a),h=1;for(u0;)u in n?n[a]=n[u]:delete n[a],a+=h,u+=h;return n}},46852:(t,e,n)=>{"use strict";var r=n(20508),i=n(92337),o=n(10875);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>a;)e[a++]=t;return e}},9490:(t,e,n)=>{var r=n(3531);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},79315:(t,e,n)=>{var r=n(22110),i=n(10875),o=n(92337);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},10050:(t,e,n)=>{var r=n(741),i=n(49797),o=n(20508),s=n(10875),a=n(16886);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,h=6==t,f=5==t||h,p=e||a;return function(e,a,d){for(var v,m,g=o(e),y=i(g),x=r(a,d,3),b=s(y.length),_=0,w=n?p(e,b):u?p(e,0):void 0;b>_;_++)if((f||_ in y)&&(m=x(v=y[_],_,g),t))if(n)w[_]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:w.push(v)}else if(l)return!1;return h?-1:c||l?l:w}}},37628:(t,e,n)=>{var r=n(24963),i=n(20508),o=n(49797),s=n(10875);t.exports=function(t,e,n,a,u){r(e);var c=i(t),l=o(c),h=s(c.length),f=u?h-1:0,p=u?-1:1;if(n<2)for(;;){if(f in l){a=l[f],f+=p;break}if(f+=p,u?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:h>f;f+=p)f in l&&(a=e(a,l[f],f,c));return a}},42736:(t,e,n)=>{var r=n(55286),i=n(4302),o=n(86314)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},16886:(t,e,n)=>{var r=n(42736);t.exports=function(t,e){return new(r(t))(e)}},34398:(t,e,n)=>{"use strict";var r=n(24963),i=n(55286),o=n(97242),s=[].slice,a={},u=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i{var r=n(92032),i=n(86314)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},92032:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9824:(t,e,n)=>{"use strict";var r=n(99275).f,i=n(42503),o=n(24408),s=n(741),a=n(83328),u=n(3531),c=n(42923),l=n(15436),h=n(2974),f=n(67057),p=n(84728).fastKey,d=n(1616),v=f?"_s":"size",m=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){a(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&u(r,n,t[c],t)}));return o(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=d(this,e),r=m(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){d(this,e);for(var n,r=s(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(d(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return d(this,e)[v]}}),l},def:function(t,e,n){var r,i,o=m(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:m,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=d(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?l(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,l(1))}),n?"entries":"values",!n,!0),h(e)}}},86132:(t,e,n)=>{var r=n(41488),i=n(9490);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},23657:(t,e,n)=>{"use strict";var r=n(24408),i=n(84728).getWeak,o=n(27007),s=n(55286),a=n(83328),u=n(3531),c=n(10050),l=n(79181),h=n(1616),f=c(5),p=c(6),d=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},g=function(t,e){return f(t.a,(function(t){return t[0]===e}))};m.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t((function(t,r){a(t,c,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=r&&u(r,n,t[o],t)}));return r(c.prototype,{delete:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(h(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(h(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},45795:(t,e,n)=>{"use strict";var r=n(3816),i=n(42985),o=n(77234),s=n(24408),a=n(84728),u=n(3531),c=n(83328),l=n(55286),h=n(74253),f=n(7462),p=n(22943),d=n(40266);t.exports=function(t,e,n,v,m,g){var y=r[t],x=y,b=m?"set":"add",_=x&&x.prototype,w={},E=function(t){var e=_[t];o(_,t,"delete"==t||"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof x&&(g||_.forEach&&!h((function(){(new x).entries().next()})))){var D=new x,A=D[b](g?{}:-0,1)!=D,C=h((function(){D.has(1)})),S=f((function(t){new x(t)})),k=!g&&h((function(){for(var t=new x,e=5;e--;)t[b](e,e);return!t.has(-0)}));S||((x=e((function(e,n){c(e,x,t);var r=d(new y,e,x);return null!=n&&u(n,m,r[b],r),r}))).prototype=_,_.constructor=x),(C||k)&&(E("delete"),E("has"),m&&E("get")),(k||A)&&E(b),g&&_.clear&&delete _.clear}else x=v.getConstructor(e,t,m,b),s(x.prototype,n),a.NEED=!0;return p(x,t),w[t]=x,i(i.G+i.W+i.F*(x!=y),w),g||v.setStrong(x,t,m),x}},25645:t=>{var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},92811:(t,e,n)=>{"use strict";var r=n(99275),i=n(90681);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},741:(t,e,n)=>{var r=n(24963);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)}}},53537:(t,e,n)=>{"use strict";var r=n(74253),i=Date.prototype.getTime,o=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}:o},870:(t,e,n)=>{"use strict";var r=n(27007),i=n(21689),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),t!=o)}},91355:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},67057:(t,e,n)=>{t.exports=!n(74253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},62457:(t,e,n)=>{var r=n(55286),i=n(3816).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},74430:t=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5541:(t,e,n)=>{var r=n(47184),i=n(64548),o=n(14682);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},42985:(t,e,n)=>{var r=n(3816),i=n(25645),o=n(87728),s=n(77234),a=n(741),u=function(t,e,n){var c,l,h,f,p=t&u.F,d=t&u.G,v=t&u.S,m=t&u.P,g=t&u.B,y=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,x=d?i:i[e]||(i[e]={}),b=x.prototype||(x.prototype={});for(c in d&&(n=e),n)h=((l=!p&&y&&void 0!==y[c])?y:n)[c],f=g&&l?a(h,r):m&&"function"==typeof h?a(Function.call,h):h,y&&s(y,c,h,t&u.U),x[c]!=h&&o(x,c,f),m&&b[c]!=h&&(b[c]=h)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},8852:(t,e,n)=>{var r=n(86314)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},74253:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},28082:(t,e,n)=>{"use strict";n(18269);var r=n(77234),i=n(87728),o=n(74253),s=n(91355),a=n(86314),u=n(21165),c=a("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),h=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=a(t),p=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),d=p?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!p||!d||"replace"===t&&!l||"split"===t&&!h){var v=/./[f],m=n(s,f,""[t],(function(t,e,n,r,i){return e.exec===u?p&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=m[0],y=m[1];r(String.prototype,t,g),i(RegExp.prototype,f,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},53218:(t,e,n)=>{"use strict";var r=n(27007);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},13325:(t,e,n)=>{"use strict";var r=n(4302),i=n(55286),o=n(10875),s=n(741),a=n(86314)("isConcatSpreadable");t.exports=function t(e,n,u,c,l,h,f,p){for(var d,v,m=l,g=0,y=!!f&&s(f,p,3);g0)m=t(e,n,d,o(d.length),m,h-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=d}m++}g++}return m}},3531:(t,e,n)=>{var r=n(741),i=n(28851),o=n(86555),s=n(27007),a=n(10875),u=n(69002),c={},l={},h=t.exports=function(t,e,n,h,f){var p,d,v,m,g=f?function(){return t}:u(t),y=r(n,h,e?2:1),x=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>x;x++)if((m=e?y(s(d=t[x])[0],d[1]):y(t[x]))===c||m===l)return m}else for(v=g.call(t);!(d=v.next()).done;)if((m=i(v,y,d.value,e))===c||m===l)return m};h.BREAK=c,h.RETURN=l},40018:(t,e,n)=>{t.exports=n(3825)("native-function-to-string",Function.toString)},3816:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},79181:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},87728:(t,e,n)=>{var r=n(99275),i=n(90681);t.exports=n(67057)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},40639:(t,e,n)=>{var r=n(3816).document;t.exports=r&&r.documentElement},1734:(t,e,n)=>{t.exports=!n(67057)&&!n(74253)((function(){return 7!=Object.defineProperty(n(62457)("div"),"a",{get:function(){return 7}}).a}))},40266:(t,e,n)=>{var r=n(55286),i=n(27375).set;t.exports=function(t,e,n){var o,s=e.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},97242:t=>{t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},49797:(t,e,n)=>{var r=n(92032);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},86555:(t,e,n)=>{var r=n(87234),i=n(86314)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},4302:(t,e,n)=>{var r=n(92032);t.exports=Array.isArray||function(t){return"Array"==r(t)}},18367:(t,e,n)=>{var r=n(55286),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},55286:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},55364:(t,e,n)=>{var r=n(55286),i=n(92032),o=n(86314)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},28851:(t,e,n)=>{var r=n(27007);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},49988:(t,e,n)=>{"use strict";var r=n(42503),i=n(90681),o=n(22943),s={};n(87728)(s,n(86314)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},42923:(t,e,n)=>{"use strict";var r=n(4461),i=n(42985),o=n(77234),s=n(87728),a=n(87234),u=n(49988),c=n(22943),l=n(468),h=n(86314)("iterator"),f=!([].keys&&"next"in[].keys()),p="keys",d="values",v=function(){return this};t.exports=function(t,e,n,m,g,y,x){u(n,e,m);var b,_,w,E=function(t){if(!f&&t in S)return S[t];switch(t){case p:case d:return function(){return new n(this,t)}}return function(){return new n(this,t)}},D=e+" Iterator",A=g==d,C=!1,S=t.prototype,k=S[h]||S["@@iterator"]||g&&S[g],F=k||E(g),T=g?A?E("entries"):F:void 0,O="Array"==e&&S.entries||k;if(O&&(w=l(O.call(new t)))!==Object.prototype&&w.next&&(c(w,D,!0),r||"function"==typeof w[h]||s(w,h,v)),A&&k&&k.name!==d&&(C=!0,F=function(){return k.call(this)}),r&&!x||!f&&!C&&S[h]||s(S,h,F),a[e]=F,a[D]=v,g)if(b={values:A?F:E(d),keys:y?F:E(p),entries:T},x)for(_ in b)_ in S||o(S,_,b[_]);else i(i.P+i.F*(f||C),e,b);return b}},7462:(t,e,n)=>{var r=n(86314)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},15436:t=>{t.exports=function(t,e){return{value:e,done:!!t}}},87234:t=>{t.exports={}},4461:t=>{t.exports=!1},13086:t=>{var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},34934:(t,e,n)=>{var r=n(61801),i=Math.pow,o=i(2,-52),s=i(2,-23),a=i(2,127)*(2-s),u=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=r(t);return ia||n!=n?c*(1/0):c*n}},46206:t=>{t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},68757:t=>{t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},61801:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},84728:(t,e,n)=>{var r=n(93953)("meta"),i=n(55286),o=n(79181),s=n(99275).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(74253)((function(){return u(Object.preventExtensions({}))})),l=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,r)&&l(t),t}}},50133:(t,e,n)=>{var r=n(88416),i=n(42985),o=n(3825)("metadata"),s=o.store||(o.store=new(n(30147))),a=function(t,e,n){var i=s.get(t);if(!i){if(!n)return;s.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o};t.exports={store:s,map:a,has:function(t,e,n){var r=a(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=a(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){a(n,r,!0).set(t,e)},keys:function(t,e){var n=a(t,e,!1),r=[];return n&&n.forEach((function(t,e){r.push(e)})),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},14351:(t,e,n)=>{var r=n(3816),i=n(74193).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(92032)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var l=a.resolve(void 0);n=function(){l.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},43499:(t,e,n)=>{"use strict";var r=n(24963);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},35345:(t,e,n)=>{"use strict";var r=n(67057),i=n(47184),o=n(64548),s=n(14682),a=n(20508),u=n(49797),c=Object.assign;t.exports=!c||n(74253)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=a(t),c=arguments.length,l=1,h=o.f,f=s.f;c>l;)for(var p,d=u(arguments[l++]),v=h?i(d).concat(h(d)):i(d),m=v.length,g=0;m>g;)p=v[g++],r&&!f.call(d,p)||(n[p]=d[p]);return n}:c},42503:(t,e,n)=>{var r=n(27007),i=n(35588),o=n(74430),s=n(69335)("IE_PROTO"),a=function(){},u=function(){var t,e=n(62457)("iframe"),r=o.length;for(e.style.display="none",n(40639).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" - * - */ -import $ from 'jquery' -import notie from 'notie' - -import {queryByHook} from '../util' - -export default class { - constructor (opts) { - const elements = { - itemTemplate: queryByHook('item-template', opts.el), - items: queryByHook('items', opts.el), - addBtn: queryByHook('add-item-btn', opts.el) - } - const ItemTemplate = elements.itemTemplate.html() - const itemLabel = opts.el.data('item-label') || 'item' - - // Add button - elements.addBtn.on('click', function (e) { - elements.items.append(ItemTemplate) - }) - - // "Remove resource" buttons - elements.items.on('click', '[data-hook~=remove-item-btn]', (e) => { - notie.confirm(`Delete this ${itemLabel}?`, 'Yes', 'Cancel', () => { - $(e.currentTarget).closest('[data-hook~=item]').remove() - }) - }) - } -} diff --git a/scripts/src/components/form.js b/scripts/src/components/form.js deleted file mode 100644 index 07c32a08c..000000000 --- a/scripts/src/components/form.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Usage: - *
{ - e.preventDefault() - const formData = opts.el.serializeJSON({useIntKeysAsArrayIndex: true}) - let commitMsg - - // If editing existing file - if (file.filePath) { - commitMsg = `Updated ${file.fileName}` - // If creating new file, set file path and page url - } else { - if (!formData.title) return notie.alert('error', 'Title is required') - const fileSlug = slugify(formData.title) - file.filePath = (fileDir ? fileDir + '/' : '') + `${fileSlug}.md` - file.renderPath = `/${renderDir}/${fileSlug}/` - commitMsg = `Created ${file.fileName}` // computed by file model when filePath is set - } - - const yaml = this._formatData(formData) - file.save(yaml, commitMsg) - .then((response) => { - const commitUrl = response.commit.html_url - let successMsg = `This page has been
saved` - if (file.renderPath) successMsg += `and will be available momentarily at ${file.renderPath}.` - notie.alert('success', successMsg) - }).catch((msg) => { - notie.alert('error', 'There was an error saving the page') - console.error(msg) - }) - }) - } - - _formatData (formData) { - return `---\n${jsyaml.safeDump(formData).trim()}\n---` - } -} diff --git a/scripts/src/components/licenses-form.js b/scripts/src/components/licenses-form.js deleted file mode 100644 index bd7adc3d3..000000000 --- a/scripts/src/components/licenses-form.js +++ /dev/null @@ -1,15 +0,0 @@ -import jsyaml from 'js-yaml' - -import Form from './form' - -export default class extends Form { - _formatData (formData) { - const list = {} - for (let license of formData.licenses) { - if (license.license_name !== '') { - list[license.license_url] = license.license_name - } - } - return jsyaml.safeDump(list) - } -} diff --git a/scripts/src/components/navigation.js b/scripts/src/components/navigation.js deleted file mode 100644 index cd7c63b98..000000000 --- a/scripts/src/components/navigation.js +++ /dev/null @@ -1,53 +0,0 @@ -import 'bootstrap/js/dist/dropdown' -import 'bootstrap/js/dist/tooltip' -import 'bootstrap/js/dist/popover' -import 'bootstrap/js/dist/collapse' - -import {queryByHook} from '../util' - -export default class { - constructor (opts) { - const elements = { - loginLink: queryByHook('login-link', opts.el), - logoutLink: queryByHook('logout-link', opts.el), - adminLinkListItem: queryByHook('admin-link-list-item', opts.el), - userName: queryByHook('user-name', opts.el), - userDropdown: queryByHook('user-dropdown', opts.el), - userDropdownLink: queryByHook('user-dropdown-link', opts.el), - userIssue: queryByHook('user-issue', opts.el) - } - - elements.loginLink.on('click', function (e) { - opts.user.initiateLogin() - e.preventDefault() - }) - - elements.logoutLink.on('click', function (e) { - opts.user.logout() - window.location.reload(true) - e.preventDefault() - }) - - if (opts.user.username) this._setUserInfo(opts.user, elements) - opts.user.on('change', (user) => { - if (user.username) this._setUserInfo(user, elements) - }) - } - - _setUserInfo (user, elements) { - elements.loginLink.hide() - elements.userName.text(user.username) - elements.userDropdown.removeClass('hidden') - if (user.isCollaborator) { - elements.adminLinkListItem.show() - } else if (user.isCollaborator === false) { // don't catch undefined - elements.userIssue.show() - elements.userDropdownLink.popover({ - content: 'You do not have collaborator access to this repository, so you will not be able to make any changes.', - placement: 'bottom', - trigger: 'hover', - container: 'body' - }) - } - } -} diff --git a/scripts/src/components/theme-gallery.js b/scripts/src/components/theme-gallery.js deleted file mode 100644 index 9e1741bbc..000000000 --- a/scripts/src/components/theme-gallery.js +++ /dev/null @@ -1,39 +0,0 @@ -/* global settings */ -import $ from 'jquery' -import notie from 'notie' -import 'jquery-serializejson' - -import FileModel from '../models/file' -import {queryByHook, updateYamlString} from '../util' - -export default class { - constructor (opts) { - const file = new FileModel({ - user: opts.user, - repoOwner: settings.REPO_OWNER, - repoName: settings.REPO_NAME, - repoBranch: settings.REPO_BRANCH, - filePath: opts.el.data('file-path') - }) - - const activateBtn = queryByHook('activate-btn') - activateBtn.on('click', (e) => { - const theme = $(e.currentTarget).data('theme') - file.read() - .then((contents) => { - const newContents = updateYamlString(contents, { jkan_theme: theme }) - file.save(newContents) - .then((response) => { - const commitUrl = response.commit.html_url - notie.alert('success', ` - The configuration has been saved - and the site is regenerating. - `) - }).catch((msg) => { - notie.alert('error', 'There was an error saving the configuration') - console.error(msg) - }) - }).catch((err) => console.error(err)) - }) - } -} diff --git a/scripts/src/components/view-switcher.js b/scripts/src/components/view-switcher.js deleted file mode 100644 index abe59c74d..000000000 --- a/scripts/src/components/view-switcher.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Usage: - * Append ?view=edit querystring to URL to toggle views. If querystring - * isn't present, the first view is shown. - * Requires CSS rule: [data-component~=view-switcher] [data-hook~=view] {display: none;} - * - *
- *
- *
- *
- */ -import $ from 'jquery' - -export default class { - constructor (opts) { - if (opts.params.view) { - $(`[data-hook~=view][data-view~=${opts.params.view}]`).show() - } else { - $(`[data-hook~=view][data-view]:first`).show() - } - } -} diff --git a/scripts/src/index.js b/scripts/src/index.js index d70fd67e2..35381bb63 100644 --- a/scripts/src/index.js +++ b/scripts/src/index.js @@ -1,63 +1,19 @@ /* global settings */ import $ from 'jquery' import 'jquery-deparam' -import 'bootstrap/js/dist/tab' -import 'popper.js' -import {omit} from 'lodash' +import 'bootstrap/js/dist/collapse' -import UserModel from './models/user' -import Navigation from './components/navigation' import DatasetsList from './components/datasets-list' import CategoriesFilter from './components/categories-filter' import OrganizationsFilter from './components/organizations-filter' -import Form from './components/form' -import DatasetForm from './components/dataset-form' -import AdminForm from './components/admin-form' -import CategoriesForm from './components/categories-form' -import LicensesForm from './components/licenses-form' import DatasetDisplay from './components/dataset-display' -import DeletePageButton from './components/delete-page-button' -import EditableList from './components/editable-list' -import ViewSwitcher from './components/view-switcher' -import ThemeGallery from './components/theme-gallery' -import {queryByComponent, setParams} from './util' +import {queryByComponent} from './util' const params = $.deparam(window.location.search.substr(1)) -// Initialize user -const user = new UserModel({ - clientId: params.clientId || settings.GITHUB_CLIENT_ID, - proxyHost: params.proxyHost || settings.GATEKEEPER_HOST, - repoOwner: settings.REPO_OWNER, - repoName: settings.REPO_NAME -}) - -// If user is mid-login, finish the login process -if (params.code) { - setParams(omit(params, 'code')) - user.finishLogin(params.code) -} - -// Show administrator elements if/when logged in and a collaborator -const adminOnlyEls = $('.admin-only') -if (user.username && user.isCollaborator) adminOnlyEls.show() -user.on('change', (changedUser) => { - if (changedUser.username && changedUser.isCollaborator) adminOnlyEls.show() -}) - // Check for these components on the page and initialize them const components = [ - {tag: 'navigation', class: Navigation}, - {tag: 'form', class: Form}, - {tag: 'dataset-form', class: DatasetForm}, - {tag: 'admin-form', class: AdminForm}, - {tag: 'categories-form', class: CategoriesForm}, - {tag: 'licenses-form', class: LicensesForm}, {tag: 'dataset-display', class: DatasetDisplay}, - {tag: 'delete-page-button', class: DeletePageButton}, - {tag: 'editable-list', class: EditableList}, - {tag: 'view-switcher', class: ViewSwitcher}, - {tag: 'theme-gallery', class: ThemeGallery}, {tag: 'datasets-list', class: DatasetsList, usesDatasets: true}, {tag: 'categories-filter', class: CategoriesFilter, usesDatasets: true}, {tag: 'organizations-filter', class: OrganizationsFilter, usesDatasets: true} @@ -68,11 +24,11 @@ for (let component of components) { // If the component depends on datasets.json, fetch it first (once per page) and pass it if (component.usesDatasets) { getDatasets().then((datasets) => { - els.each((index, el) => new component.class({el: $(el), user, params, datasets})) // eslint-disable-line + els.each((index, el) => new component.class({el: $(el), params, datasets})) // eslint-disable-line }) // Otherwise simply initialize the component } else { - els.each((index, el) => new component.class({el: $(el), user, params})) // eslint-disable-line + els.each((index, el) => new component.class({el: $(el), params})) // eslint-disable-line } } } diff --git a/scripts/src/models/file.js b/scripts/src/models/file.js deleted file mode 100644 index 6c59e11e0..000000000 --- a/scripts/src/models/file.js +++ /dev/null @@ -1,58 +0,0 @@ -import State from 'ampersand-state' -import Github from 'github-api' - -export default State.extend({ - props: { - repoOwner: 'string', - repoName: 'string', - repoBranch: 'string', - filePath: 'string', - renderPath: 'string' - }, - session: { - user: 'state' - }, - derived: { - fileName: { - deps: ['filePath'], - fn: function () { - return this.filePath.split('/').pop() - } - }, - repo: { - deps: ['user.oauthToken', 'repoOwner', 'repoName'], - fn: function () { - const github = new Github({ - token: this.user.oauthToken, - auth: 'oauth' - }) - return github.getRepo(this.repoOwner, this.repoName) - } - } - }, - read: function () { - return new Promise((resolve, reject) => { - this.repo.getContents(this.repoBranch, this.filePath, true, (err, contents) => { - if (err) reject(err) - else resolve(contents) - }) - }) - }, - save: function (contents, commitMsg) { - return new Promise((resolve, reject) => { - if (!commitMsg) commitMsg = `Updated ${this.fileName}` - this.repo.writeFile(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => { - if (err) reject(err) - else resolve(data) - }) - }) - }, - remove: function () { - return new Promise((resolve, reject) => { - this.repo.deleteFile(this.repoBranch, this.filePath, (err, data) => { - if (err) reject(err) - else resolve(data) - }) - }) - } -}) diff --git a/scripts/src/models/user.js b/scripts/src/models/user.js deleted file mode 100644 index 9fef96b33..000000000 --- a/scripts/src/models/user.js +++ /dev/null @@ -1,97 +0,0 @@ -import State from 'ampersand-state' -import Cookies from 'js-cookie' -import Github from 'github-api' -import $ from 'jquery' -import 'jquery-deparam' - -const githubLoginUrl = 'https://github.com/login/oauth/authorize' - -export default State.extend({ - props: { - oauthToken: 'string', - username: 'string', - isCollaborator: 'boolean' - }, - session: { - repoOwner: 'string', - repoName: 'string', - clientId: 'string', - proxyHost: 'string' - }, - initialize: function () { - // If login cookies saved, set the user model to them - this.set(Cookies.getJSON('jkan')) - }, - initiateLogin: function () { - const redirectParams = { - client_id: this.clientId, - redirect_uri: window.location.href.split('?')[0], - scope: 'public_repo' - } - window.location.href = githubLoginUrl + '?' + $.param(redirectParams) - }, - finishLogin: function (authCode) { - return this._verify(authCode) - .then((oauthToken) => { - this.set('oauthToken', oauthToken) - Cookies.set('jkan', this.serialize()) - - this._getUser(oauthToken) - .then((userData) => { - this.set('username', userData.login) - Cookies.set('jkan', this.serialize()) - this._isCollaborator(userData.login) - .then(() => { - this.set('isCollaborator', true) - Cookies.set('jkan', this.serialize()) - }).catch(() => { - this.set('isCollaborator', false) - Cookies.set('jkan', this.serialize()) - }) - }).catch(() => console.error('Error fetching user info')) - }).catch(() => console.error('Error verifying auth code')) - }, - // Use authCode from step 1 to fetch auth token - _verify: function (authCode) { - return new Promise((resolve, reject) => { - const proxyUrl = `${this.proxyHost}/authenticate/${authCode}` - - $.getJSON(proxyUrl, (data) => { - if (data && data.token) { - resolve(data.token) - } else { - reject('Authentication failed') - } - }) - }) - }, - logout: function () { - Cookies.remove('jkan') - }, - _getUser: function () { - return new Promise((resolve, reject) => { - const github = new Github({ - token: this.oauthToken, - auth: 'oauth' - }) - const user = github.getUser() - user.getProfile((err, userData) => { - if (err) reject(err) - else resolve(userData) - }) - }) - }, - _isCollaborator: function (username) { - return new Promise((resolve, reject) => { - const github = new Github({ - token: this.oauthToken, - auth: 'oauth' - }) - const repo = github.getRepo(this.repoOwner, this.repoName) - repo.isCollaborator(username, (err) => { - if (err) reject(err) - else resolve() - }) - }) - } -}) diff --git a/scripts/src/util.js b/scripts/src/util.js index 43473a5ae..fabe5882a 100644 --- a/scripts/src/util.js +++ b/scripts/src/util.js @@ -1,5 +1,4 @@ import $ from 'jquery' -import {isEmpty} from 'lodash' export function queryByHook (hook, container) { return $(`[data-hook~=${hook}]`, container) @@ -13,12 +12,6 @@ export function setContent (container, content) { return container.empty().append(content) } -export function setParams (params) { - let newUrl = window.location.href.split('?')[0] - if (!isEmpty(params)) newUrl += '?' + $.param(params) - window.history.replaceState(null, null, newUrl) -} - // Meant to mimic Jekyll's slugify function // https://github.com/jekyll/jekyll/blob/master/lib/jekyll/utils.rb#L142 export function slugify (text) { @@ -28,7 +21,6 @@ export function slugify (text) { .replace(/^\-|\-$/i, '') // Remove leading/trailing hyphen } - // Given an object of filters to use, returns a function to be used by _.filter() export function createDatasetFilters (filters) { return function (dataset) { @@ -62,17 +54,3 @@ export function collapseListGroup (container, show) { container.append(showMoreButton) } } - -// Applies a basic regex replace on a YAML string for each property in a data object -export function updateYamlString (yamlString, updateObject) { - for (let key in updateObject) { - const regex = new RegExp(`^( *${key}: +?).*`, 'm') - const match = yamlString.match(regex) - if (match) { - yamlString = yamlString.replace(regex, match[1] + updateObject[key]) - } else { - yamlString += `\n${key}: ${updateObject[key]}` - } - } - return yamlString -} diff --git a/setup.md b/setup.md deleted file mode 100644 index 591569eed..000000000 --- a/setup.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Setup -permalink: /setup/ -layout: default ---- -{% include breadcrumbs.html parent="Administration" %} - - - - - -# Setup - -## Step 1 -[Register your application](https://github.com/settings/applications/new) with GitHub. Set the `Callback URL` -to the URL of your JKAN site (ie. `https://.github.io/jkan`. After clicking `Register`, you'll -be given a `Client ID` and a `Client Secret`. Enter the `Client ID` below. - -
-
-
- - -

-
-
-
- -## Step 2 -In order to authenticate with GitHub, setup [Gatekeeper](https://github.com/prose/gatekeeper), an -open-source authentication tool. [Heroku](http://heroku.com) provides free hosting. - -[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2Fprose%2Fgatekeeper&template=https%3A%2F%2Fgithub.com%2Fprose%2Fgatekeeper) - -Pick an `App Name`, and fill in your `Client ID` and `Client Secret`. Enter the `App Name` you chose below. - -
-
-
- - -

-
-
-
- -## Step 3 -Login to this site via GitHub to save these settings. - - Sign in with GitHub - -## Step 4 -Save these settings to `_config.yml`. - - Save From f8f196d63ef069d88b910bbd894f0a92fe1fb8f5 Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 13 Jan 2023 13:37:52 +0000 Subject: [PATCH 12/77] Rename Netlify CMS directory and config file Closes #209 --- _layouts/dataset.html | 2 +- _layouts/organization.html | 2 +- {manage => editor}/index.html | 1 + manage/config.yml => editor/netlify-cms.yml | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename {manage => editor}/index.html (93%) rename manage/config.yml => editor/netlify-cms.yml (100%) diff --git a/_layouts/dataset.html b/_layouts/dataset.html index 615e92ffc..8908b5013 100644 --- a/_layouts/dataset.html +++ b/_layouts/dataset.html @@ -43,7 +43,7 @@

{% endif %}

{{ page.title }} - Edit + Edit

{{ page.notes }}

diff --git a/_layouts/organization.html b/_layouts/organization.html index bd909b307..0a35a8dcd 100644 --- a/_layouts/organization.html +++ b/_layouts/organization.html @@ -16,7 +16,7 @@ {% endif %}

{{ page.title }} - Edit + Edit

{{ page.description }}

diff --git a/manage/index.html b/editor/index.html similarity index 93% rename from manage/index.html rename to editor/index.html index 4ef072daf..2f4f41dee 100644 --- a/manage/index.html +++ b/editor/index.html @@ -8,6 +8,7 @@ Content Manager + diff --git a/manage/config.yml b/editor/netlify-cms.yml similarity index 100% rename from manage/config.yml rename to editor/netlify-cms.yml From 895c6b61ed4c3b8d6af0c710039ccbc3c4c1191f Mon Sep 17 00:00:00 2001 From: timwis Date: Sun, 15 Jan 2023 08:04:05 +0000 Subject: [PATCH 13/77] Add basic netlify config Without this, netlify assumes this is a Node.js application. I think if we add jekyll to Gemfile, Netlify would auto-detect properly, and we wouldn't need this file. But I don't want the jekyll version to get out of sync with the github-pages gem, so let's stick with this for now. --- netlify.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..313b39cf7 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,2 @@ +[build] + command = "jekyll build" From b0281854a361b9993a1a0288a5fb31c74f100417 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 16 Jan 2023 06:51:12 +0000 Subject: [PATCH 14/77] Add jekyll as explicit dependency --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 0c8671cde..c733d20c0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source "https://rubygems.org" gem "github-pages", group: :jekyll_plugins +gem "jekyll", "~> 3.9" diff --git a/Gemfile.lock b/Gemfile.lock index 612e73f9d..6f7f48be8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -264,6 +264,7 @@ PLATFORMS DEPENDENCIES github-pages + jekyll (~> 3.9) BUNDLED WITH 2.1.4 From d2090c14339a76351560ab17df52dc384022dd6f Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 16 Jan 2023 07:15:17 +0000 Subject: [PATCH 15/77] Remove netlify.toml This should be unnecessary now that we explicitly declare jekyll as a dependency in Gemfile --- netlify.toml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 313b39cf7..000000000 --- a/netlify.toml +++ /dev/null @@ -1,2 +0,0 @@ -[build] - command = "jekyll build" From 4a3135b06865640c7e601f128b98a7c50611a6f6 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 16 Jan 2023 07:24:32 +0000 Subject: [PATCH 16/77] Add .ruby-version Troubleshooting netlify build --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..ef538c281 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.2 From 22ee0aa7aeb0340698512c1fea33b90bffdef24a Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 20 Jan 2023 07:30:55 +0000 Subject: [PATCH 17/77] Add x86_64-linux platform to Gemfile.lock Per https://github.com/rubygems/rubygems/issues/4269 --- Gemfile.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 6f7f48be8..788e3679f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -219,6 +219,8 @@ GEM racc (~> 1.4) nokogiri (1.13.9-x64-mingw32) racc (~> 1.4) + nokogiri (1.13.9-x86_64-linux) + racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) @@ -261,6 +263,7 @@ GEM PLATFORMS ruby x64-mingw32 + x86_64-linux DEPENDENCIES github-pages From 928ea5e54684f285e5b09baeea114b3798c88a7f Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 20 Jan 2023 07:41:13 +0000 Subject: [PATCH 18/77] Remove default baseurl setting from _config.yml This no longer makes sense as a default setting when the recommended hosting platform is Netlify. It may also be the case that GitHub Pages now automatically adds this setting anyway, which I will test. --- _config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_config.yml b/_config.yml index 3c2dd30d7..8566b9443 100644 --- a/_config.yml +++ b/_config.yml @@ -1,7 +1,6 @@ title: JKAN greeting: Welcome to JKAN description: A lightweight, backend-free open data portal, powered by Jekyll. -baseurl: /jkan logo: /img/jkan.png # Site theme From 1c73a1e6042812368c9883c38313ea4124a52a6c Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 20 Jan 2023 07:41:52 +0000 Subject: [PATCH 19/77] Fix insecure content warning in sample dataset --- _organizations/sample-department.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_organizations/sample-department.md b/_organizations/sample-department.md index f9cc0e8b9..e5df1af8a 100644 --- a/_organizations/sample-department.md +++ b/_organizations/sample-department.md @@ -1,5 +1,5 @@ --- title: Sample Department description: This is an example department provided with a new installation of JKAN -logo: http://i.imgur.com/mrC5xVT.png +logo: https://i.imgur.com/mrC5xVT.png --- From 57e5033fa4d2fcfa56e3a7a536ff9958a414ce17 Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 20 Jan 2023 08:22:56 +0000 Subject: [PATCH 20/77] Support nil baseurl in JavaScript Previously, the JavaScript expected baseurl to have a value - at least an empty string. But baseurl should be able to be omitted completely, per https://ben.balter.com/jekyll-style-guide/config/#baseurl --- _includes/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/head.html b/_includes/head.html index 80b2809c1..897dfc8b7 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -44,7 +44,7 @@ From 90c1fafd657b1ec912e62f3f3c9958e3bb6a3dd2 Mon Sep 17 00:00:00 2001 From: timwis Date: Sun, 22 Jan 2023 12:04:15 +0000 Subject: [PATCH 22/77] Remove Netlify Identity JavaScript library This is only necessary when using the git-gateway backend for Netlify CMS. Since we're recommending using the GitHub (OAuth) backend, I think we should remove it by default. --- editor/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/editor/index.html b/editor/index.html index 2f4f41dee..f9da05587 100644 --- a/editor/index.html +++ b/editor/index.html @@ -7,7 +7,6 @@ Content Manager - From 028a57916595fb5a8e646965f9cf67354391b381 Mon Sep 17 00:00:00 2001 From: timwis Date: Sun, 22 Jan 2023 12:04:45 +0000 Subject: [PATCH 23/77] Add Netlify deployment instructions to the README --- README.md | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3e4f62115..4676003c1 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,38 @@ basic purpose of providing links to download data really isn't that complicated. that allows a small, resource-strapped government agency to stand-up an open data portal by simply [clicking the fork button](https://help.github.com/articles/fork-a-repo/). -Please note this is still a work in progress! Check out the [issues](https://github.com/timwis/jkan/issues) to help -out or give feedback. - [Demo site](https://demo.jkan.io) ## Installation Options +We recommend running JKAN on Netlify, but you can also run it on GitHub Pages, +Vercel, or any other static website host. + +### Running on Netlify +Before you start, make sure you have a [GitHub][github-signup] account and a [Netlify][netlify-signup] account. JKAN runs fine on the free tier of both. + +1. Create your own copy of JKAN by clicking [fork][jkan-fork] +2. [Create a new site][netlify-new-site] on Netlify. Click the **GitHub** button, then select your JKAN copy from the list. +3. Netlify will pre-fill the basic site settings for you, but make sure the **Build command** is set to `jekyll build` then click **Deploy site.** + +Netlify will then deploy your site, and generate a random URL for it, e.g. `https://genuine-tapioca-7d69fa.netlify.app`. You can change the URL or add a custom domain in the Netlify settings. + +If you're happy to build your JKAN site by editing YAML files directly, you're finished! If you'd like to use JKAN's Editing UI, you'll need a couple more steps. In order to let your site's users sign in with their GitHub account, you'll need to register an OAuth application with GitHub, and then give Netlify those application credentials. -1. See [Get Started](https://jkan.io/#get-started) on [jkan.io](https://jkan.io) for an installation wizard, -2. follow the [manual installation](https://github.com/timwis/jkan/wiki/Manual-Installation) instructions yourself. -3. Do a manual fork and do not install gatekeeper at all (login bits won't work, but Heroku is no longer free) +4. In a new browser tab, [register an OAuth application][github-new-oauth] on GitHub +> - Application name: Whatever your site will be called (e.g. JKAN) +> - Homepage URL: The URL of your site, e.g. `https://genuine-tapioca-7d69fa.netlify.app` or your custom domain +> - Application description: Whatever you like - users will see this when they sign in to your JKAN site +> - Authorization callback URL: `https://api.netlify.com/auth/done` (Note: it won't work if this one is wrong) + +5. On the next page, take note of the **Client ID**, as you'll need that in a moment. +6. Under the **Client secrets** header, click **Generate a new client secret**. You'll need this in a moment as well, but be careful where you copy and paste it because it should be _treated like a password_. +7. Back in your Netlify browser tab, go to your **Site settings**, then select **Access control**, then **OAuth**. +8. Click **Install provider**, select `GitHub` as the Provider, and copy your **Client ID** and **Client Secret** from your GitHub browser tab, then click Install. + +You should now be able to sign in to your JKAN site's Editor UI by going to `/editor`, e.g. `https://genuine-tapioca-7d69fa.netlify.app/editor` and signing in with your GitHub account. + +## Configuration For configuration details, see the [wiki](https://github.com/timwis/jkan/wiki) ## Development @@ -41,4 +62,10 @@ jkan-jekyll-1 | Server running... press ctrl-c to stop. Then connect to http://0.0.0.0:4000/jkan/ via a web browser. -Read more about the [Architecture](https://github.com/timwis/jkan/wiki/Architecture) on the Wiki. \ No newline at end of file +Read more about the [Architecture](https://github.com/timwis/jkan/wiki/Architecture) on the Wiki. + +[github-signup]: https://github.com/signup +[netlify-signup]: https://app.netlify.com/signup +[netlify-new-site]: https://app.netlify.com/start +[jkan-fork]: https://github.com/timwis/jkan/fork +[github-new-oauth]: https://github.com/settings/applications/new From 9b9bc985b7adc3c9a3dc39f98ec03ef2e248eb2f Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 23 Jan 2023 07:05:56 +0000 Subject: [PATCH 24/77] Add netlify.toml to automatically set build command --- netlify.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..6fa7a6b15 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] + command = "jekyll build" + publish = "_site" From 98a812b0c020e09882f3f07f3e03bbb9b89e499d Mon Sep 17 00:00:00 2001 From: timwis Date: Tue, 24 Jan 2023 07:44:48 +0000 Subject: [PATCH 25/77] Add Netlify Build plugin to generate metadata normally provided by github-metadata gem --- _config.yml | 1 + netlify.toml | 5 ++++- netlify/plugins/netlify-jekyll-metadata/index.js | 12 ++++++++++++ netlify/plugins/netlify-jekyll-metadata/manifest.yml | 1 + netlify/plugins/netlify-jekyll-metadata/package.json | 6 ++++++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 netlify/plugins/netlify-jekyll-metadata/index.js create mode 100644 netlify/plugins/netlify-jekyll-metadata/manifest.yml create mode 100644 netlify/plugins/netlify-jekyll-metadata/package.json diff --git a/_config.yml b/_config.yml index 8566b9443..b70ae873f 100644 --- a/_config.yml +++ b/_config.yml @@ -85,3 +85,4 @@ exclude: - webpack.config.js - README.md - LICENSE + - netlify diff --git a/netlify.toml b/netlify.toml index 6fa7a6b15..2cfe0df40 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,6 @@ [build] - command = "jekyll build" + command = "jekyll build --config _config.yml,_config_override.yml" publish = "_site" + +[[plugins]] + package = "/netlify/plugins/netlify-jekyll-metadata" diff --git a/netlify/plugins/netlify-jekyll-metadata/index.js b/netlify/plugins/netlify-jekyll-metadata/index.js new file mode 100644 index 000000000..b6b70568b --- /dev/null +++ b/netlify/plugins/netlify-jekyll-metadata/index.js @@ -0,0 +1,12 @@ +import fs from 'node:fs' +import url from 'node:url' + +export const onPreBuild = async function () { + const siteUrl = process.env.URL + const repoUrl = new URL(process.env.REPOSITORY_URL || '') + const repoNameWithOwner = repoUrl.pathname.replace(/^\/+/, '') + + const fileName = '_config_override.yml' + const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}` + return fs.promises.writeFile(fileName, fileContents) +} diff --git a/netlify/plugins/netlify-jekyll-metadata/manifest.yml b/netlify/plugins/netlify-jekyll-metadata/manifest.yml new file mode 100644 index 000000000..7c76c7292 --- /dev/null +++ b/netlify/plugins/netlify-jekyll-metadata/manifest.yml @@ -0,0 +1 @@ +name: netlify-jekyll-metadata diff --git a/netlify/plugins/netlify-jekyll-metadata/package.json b/netlify/plugins/netlify-jekyll-metadata/package.json new file mode 100644 index 000000000..4649ece2f --- /dev/null +++ b/netlify/plugins/netlify-jekyll-metadata/package.json @@ -0,0 +1,6 @@ +{ + "name": "netlify-jekyll-metadata", + "description": "Netlify Build Plugin to populate a Jekyll site with the metadata normally provided by the github-metadata gem", + "type": "module", + "exports": "./index.js" +} From b8462a2c046076292489856d13d955f990251cf0 Mon Sep 17 00:00:00 2001 From: timwis Date: Wed, 25 Jan 2023 08:13:34 +0000 Subject: [PATCH 26/77] Set baseurl to empty string in _config_override.yml This should prevent the github-metadata plugin from setting baseurl to "/jkan" because the source repository is a "user page" --- _config.yml | 1 + netlify.toml | 1 + netlify/plugins/netlify-jekyll-metadata/index.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index b70ae873f..09662591e 100644 --- a/_config.yml +++ b/_config.yml @@ -86,3 +86,4 @@ exclude: - README.md - LICENSE - netlify + - netlify.toml diff --git a/netlify.toml b/netlify.toml index 2cfe0df40..2824968fc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,7 @@ [build] command = "jekyll build --config _config.yml,_config_override.yml" publish = "_site" + environment = { JEKYLL_ENV = "production" } [[plugins]] package = "/netlify/plugins/netlify-jekyll-metadata" diff --git a/netlify/plugins/netlify-jekyll-metadata/index.js b/netlify/plugins/netlify-jekyll-metadata/index.js index b6b70568b..a35eb5828 100644 --- a/netlify/plugins/netlify-jekyll-metadata/index.js +++ b/netlify/plugins/netlify-jekyll-metadata/index.js @@ -7,6 +7,6 @@ export const onPreBuild = async function () { const repoNameWithOwner = repoUrl.pathname.replace(/^\/+/, '') const fileName = '_config_override.yml' - const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}` + const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}\nbaseurl: ""` return fs.promises.writeFile(fileName, fileContents) } From 34c9dba0e5b5e93b7057b60fe78a2ddf7de8f4a0 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 26 Jan 2023 07:33:03 +0000 Subject: [PATCH 27/77] Save netlify branch to site.branch, and use that in editor config, defaulting to site.github branch This is necessary because `site.github.source.branch` refers to the upstream repo's branch, not the fork. See #227. --- editor/index.html | 2 +- netlify/plugins/netlify-jekyll-metadata/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/index.html b/editor/index.html index f9da05587..bd63aea8c 100644 --- a/editor/index.html +++ b/editor/index.html @@ -21,7 +21,7 @@ config: { backend: { repo: {{ site.github.repository_nwo | jsonify }}, - branch: {{ site.github.source.branch | jsonify }} + branch: {{ site.branch | default: site.github.source.branch | jsonify }} }, local_backend: {% if jekyll.environment == "production" %}false{% else %}true{% endif %}, site_url: {{ "" | absolute_url | jsonify }} diff --git a/netlify/plugins/netlify-jekyll-metadata/index.js b/netlify/plugins/netlify-jekyll-metadata/index.js index a35eb5828..a56c1c7d3 100644 --- a/netlify/plugins/netlify-jekyll-metadata/index.js +++ b/netlify/plugins/netlify-jekyll-metadata/index.js @@ -5,8 +5,9 @@ export const onPreBuild = async function () { const siteUrl = process.env.URL const repoUrl = new URL(process.env.REPOSITORY_URL || '') const repoNameWithOwner = repoUrl.pathname.replace(/^\/+/, '') + const branch = process.env.BRANCH const fileName = '_config_override.yml' - const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}\nbaseurl: ""` + const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}\nbranch: ${branch}\nbaseurl: ""` return fs.promises.writeFile(fileName, fileContents) } From 7674ce7dcf7146ad08468bb5002bd2326cad71a4 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 26 Jan 2023 07:37:47 +0000 Subject: [PATCH 28/77] Switch order config files are loaded in netlify build This allows admins to override anything generated by the netlify build plugin in _config.yml Whereas previously, the generated values would override anything specified in _config.yml --- .gitignore | 1 + netlify.toml | 2 +- netlify/plugins/netlify-jekyll-metadata/index.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f200ceadc..aa14c1570 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ _site _config.dev.yml node_modules *.map +_config.ci.yml diff --git a/netlify.toml b/netlify.toml index 2824968fc..b462aff1d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build] - command = "jekyll build --config _config.yml,_config_override.yml" + command = "jekyll build --config _config.ci.yml,_config.yml" publish = "_site" environment = { JEKYLL_ENV = "production" } diff --git a/netlify/plugins/netlify-jekyll-metadata/index.js b/netlify/plugins/netlify-jekyll-metadata/index.js index a56c1c7d3..8d1349d24 100644 --- a/netlify/plugins/netlify-jekyll-metadata/index.js +++ b/netlify/plugins/netlify-jekyll-metadata/index.js @@ -7,7 +7,7 @@ export const onPreBuild = async function () { const repoNameWithOwner = repoUrl.pathname.replace(/^\/+/, '') const branch = process.env.BRANCH - const fileName = '_config_override.yml' const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}\nbranch: ${branch}\nbaseurl: ""` + const fileName = '_config.ci.yml' return fs.promises.writeFile(fileName, fileContents) } From 48e2d2909c69df9c4202187a094c3fd922d136be Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 26 Jan 2023 07:55:29 +0000 Subject: [PATCH 29/77] Improve readability of config generation in netlify build plugin --- netlify/plugins/netlify-jekyll-metadata/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netlify/plugins/netlify-jekyll-metadata/index.js b/netlify/plugins/netlify-jekyll-metadata/index.js index 8d1349d24..d2a8ac458 100644 --- a/netlify/plugins/netlify-jekyll-metadata/index.js +++ b/netlify/plugins/netlify-jekyll-metadata/index.js @@ -1,5 +1,4 @@ import fs from 'node:fs' -import url from 'node:url' export const onPreBuild = async function () { const siteUrl = process.env.URL @@ -7,7 +6,12 @@ export const onPreBuild = async function () { const repoNameWithOwner = repoUrl.pathname.replace(/^\/+/, '') const branch = process.env.BRANCH - const fileContents = `repository: ${repoNameWithOwner}\nurl: ${siteUrl}\nbranch: ${branch}\nbaseurl: ""` + const fileContents = ` +repository: ${repoNameWithOwner} +url: ${siteUrl} +branch: ${branch} +baseurl: "" +` const fileName = '_config.ci.yml' - return fs.promises.writeFile(fileName, fileContents) + return fs.promises.writeFile(fileName, fileContents.trim()) } From 722fe495f4bdccf2752e168f0bb81636f9d41e84 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 26 Jan 2023 08:08:05 +0000 Subject: [PATCH 30/77] Remove instructions in README to change build command Now that we use a more complex build command in netlify (which is specified in netlify.toml), this is no longer correct. See #227. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4676003c1..3278e9184 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Before you start, make sure you have a [GitHub][github-signup] account and a [Ne 1. Create your own copy of JKAN by clicking [fork][jkan-fork] 2. [Create a new site][netlify-new-site] on Netlify. Click the **GitHub** button, then select your JKAN copy from the list. -3. Netlify will pre-fill the basic site settings for you, but make sure the **Build command** is set to `jekyll build` then click **Deploy site.** +3. Netlify will pre-fill the basic site settings for you. Click **Deploy site.** Netlify will then deploy your site, and generate a random URL for it, e.g. `https://genuine-tapioca-7d69fa.netlify.app`. You can change the URL or add a custom domain in the Netlify settings. From 00458bd7d21840bad1e57bd67b6f8070f771fc62 Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 27 Jan 2023 08:02:56 +0000 Subject: [PATCH 31/77] Add GitHub Pages / self hosting docs Closes #221 --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index 3278e9184..7d5ec9712 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,42 @@ If you're happy to build your JKAN site by editing YAML files directly, you're f You should now be able to sign in to your JKAN site's Editor UI by going to `/editor`, e.g. `https://genuine-tapioca-7d69fa.netlify.app/editor` and signing in with your GitHub account. +### Running on GitHub Pages (or self-hosting) +Before you start, make sure you have a [GitHub][github-signup] account. + +1. Create your own copy of JKAN by clicking [fork][jkan-fork] + +GitHub will automatically deploy your JKAN site. You can find its URL and set a custom domain by going to **Settings**, then **Pages** on your forked repository. + +If you're happy to build your JKAN site by editing YAML files directly, you're finished! If you'd like to use JKAN's Editing UI, you'll need a couple more steps. In order to let your site's users sign in with their GitHub account, you'll need to register an OAuth application with GitHub, and then run a tiny OAuth server to handle the sign in process. There are [plenty of options][oauth-server-list], but we'll use one that runs on Vercel's free tier, so make sure you have a [Vercel][vercel-signup] account before you start. + +2. [Register an OAuth application][github-new-oauth] on GitHub + +> - Application name: Whatever your site will be called (e.g. JKAN) +> - Homepage URL: The URL of your site, e.g. `https://username.github.io/jkan` or your custom domain +> - Application description: Whatever you like - users will see this when they sign in to your JKAN site +> - Authorization callback URL: `https://github.com` (Note: This is a temporary value - we'll come back and change this) + +3. On the next page, take note of the **Client ID**, as you'll need that in a moment. +4. Under the **Client secrets** header, click **Generate a new client secret**. You'll need this in a moment as well, but be careful where you copy and paste it because it should be _treated like a password_. +5. In a new browser tab, navigate to the OAuth server repository we'll be deploying, [ublabs/netlify-cms-auth][oauth-server], and click the big blue **Deploy** button. +6. In Vercel's **Get Started** section, click the **GitHub** button. Vercel will then want to copy the repository to your GitHub account, and ask you to name the repository. Fill in a name, e.g. `netlify-cms-oauth`. +7. In the next section, copy your **Client ID** from an earlier step into the box next to `OAUTH_GITHUB_CLIENT_ID`, and copy your **Client Secret** into `OAUTH_GITHUB_CLIENT_SECRET`. +8. The other two boxes are not relevant, but they're required to have a value, so enter any value into them, such as what you had for breakfast this morning, then click **Deploy**. +9. Once your server is deployed, click on the image preview of the site to navigate to it, and make a note of the URL. +10. Back in the tab with your [GitHub OAuth application][github-oauth-list], edit your app and change the `Authorization callback URL` to your vercel app URL. +11. In your JKAN repository, edit the file `editor/netlify-cms.yml` to add `base_url: ` under the `backend` section: + +```yaml +backend: + name: github + base_url: https://your-netlify-cms-oauth-app.vercel.app +``` + +11. Click **Commit changes** (directly to the branch) + +You should now be able to sign in to your JKAN site's Editor UI by going to `/editor`, and signing in with your GitHub account. + ## Configuration For configuration details, see the [wiki](https://github.com/timwis/jkan/wiki) @@ -66,6 +102,11 @@ Read more about the [Architecture](https://github.com/timwis/jkan/wiki/Architect [github-signup]: https://github.com/signup [netlify-signup]: https://app.netlify.com/signup +[vercel-signup]: https://vercel.com/signup [netlify-new-site]: https://app.netlify.com/start [jkan-fork]: https://github.com/timwis/jkan/fork [github-new-oauth]: https://github.com/settings/applications/new +[github-oauth-list]: https://github.com/settings/developers +[oauth-server-list]: https://www.netlifycms.org/docs/external-oauth-clients/ +[oauth-server]: https://github.com/ublabs/netlify-cms-oauth +[oauth-server-fork]: https://github.com/ublabs/netlify-cms-oauth/fork From 8d22f8828dd1cc69466f5eb73358d70d785dd452 Mon Sep 17 00:00:00 2001 From: Luke McKinstry Date: Thu, 15 Dec 2022 17:51:58 -0500 Subject: [PATCH 32/77] Add categories list and category page template --- _config.yml | 10 ++++++ _includes/display/category.html | 4 +-- _layouts/category.html | 61 +++++++++++++++++++++++++++++++++ categories.html | 25 ++++++++++++++ index.html | 2 +- 5 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 _layouts/category.html create mode 100644 categories.html diff --git a/_config.yml b/_config.yml index 09662591e..e8ae4e187 100644 --- a/_config.yml +++ b/_config.yml @@ -19,6 +19,8 @@ navigation: url: /datasets/ - title: Organizations url: /organizations/ + - title: Categories + url: /categories/ # Collections collections: @@ -28,9 +30,17 @@ collections: organizations: output: true permalink: /organizations/:path/ + categories: + output: true + permalink: /categories/:path/ # Collections (cont'd) defaults: + - scope: + path: "" + type: categories + values: + layout: category - scope: path: "" type: datasets diff --git a/_includes/display/category.html b/_includes/display/category.html index c5f13b245..962318f5c 100644 --- a/_includes/display/category.html +++ b/_includes/display/category.html @@ -3,9 +3,9 @@
\ No newline at end of file diff --git a/_layouts/category.html b/_layouts/category.html new file mode 100644 index 000000000..b3a70e390 --- /dev/null +++ b/_layouts/category.html @@ -0,0 +1,61 @@ +--- +layout: default +--- +{% include breadcrumbs.html parent="categories" %} +{% assign datasets = '' | split: "" %} +{% for ds in site.datasets %} + {% if ds.category.first %} + {% if ds.category contains page.name %} + {% assign datasets = datasets | push: ds %} + {% continue %} + {% endif %} + {% else %} + {% assign cat = ds.category %} + {% if cat == page.name %} + {% assign datasets = datasets | push: ds %} + {% endif %} + {% endif %} +{% endfor %} + +{% assign datasets_count = datasets | size %} +
+
+
+
+ {% if page.logo and page.logo != empty %} +
+ {{ page.title }} logo +
+
+ {% else %} +
+ {% endif %} +

+ {{ page.name }} + Edit +

+

{{ page.description }}

+
+

{{ datasets_count }} + {% if datasets_count == 1 %}dataset{% else %}datasets{% endif %}

+ +
+ {% for dataset in datasets %} + +

{{ dataset.title }}

+ {{ dataset.notes }} + +
+ {% endfor %} +
+
+
+ +
+
+ +
+
+
diff --git a/categories.html b/categories.html new file mode 100644 index 000000000..78b6f3d4f --- /dev/null +++ b/categories.html @@ -0,0 +1,25 @@ +--- +title: Categories +layout: default +permalink: /categories/ +--- +{% include breadcrumbs.html %} + + Add category + +{% for category in site.categories %} +
+
+ {% if category.logo and category.logo != empty %} + + {{ category.title }} + + {% endif %} +
+
+

{{ category.title }}

+

{{ category.description }}

+

{{ category.datasetcount }} datasets

+
+
+{% endfor %} \ No newline at end of file diff --git a/index.html b/index.html index ddc69c0b3..590a6a40e 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@

Browse by Category

{% for category in categories %} {% if category.featured == true %} {% capture logo_alt %}{{ category.name }}{% if category.logo_credit and category.logo_credit != empty %} logo by {{ category.logo_credit }}{% endif %}{% endcapture %} - + {% if category.logo and category.logo != empty %} {{ logo_alt }} {% endif %} From 90d019561ef76fa29b5e8149087d5d0dbcf9b9cf Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 2 Feb 2023 07:07:39 +0000 Subject: [PATCH 33/77] Fix logos on categories list, and use site.categories on homepage --- categories.html | 2 +- css/main.css | 3 ++- index.html | 5 +---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/categories.html b/categories.html index 78b6f3d4f..ca54dc2ff 100644 --- a/categories.html +++ b/categories.html @@ -12,7 +12,7 @@ diff --git a/css/main.css b/css/main.css index dc15f5bb7..2f110a4d9 100644 --- a/css/main.css +++ b/css/main.css @@ -1,4 +1,5 @@ -.organization-thumbnail img { +.organization-thumbnail img, +.category-thumbnail img { width: 64px; } diff --git a/index.html b/index.html index 590a6a40e..43e8d1cc0 100644 --- a/index.html +++ b/index.html @@ -13,10 +13,7 @@

{{ site.greeting }}

Browse by Category

-{% assign categories = site.data.categories.items %} -{% if categories == nil %}{% assign categories = site.data.categories %}{% endif %} - -{% for category in categories %} +{% for category in site.categories %} {% if category.featured == true %} {% capture logo_alt %}{{ category.name }}{% if category.logo_credit and category.logo_credit != empty %} logo by {{ category.logo_credit }}{% endif %}{% endcapture %} From eb73a60d44438cea7820413e7e5cfda034331277 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 2 Feb 2023 07:08:54 +0000 Subject: [PATCH 34/77] Populate category datasets from basic where clause --- _layouts/category.html | 17 ++--------------- categories.html | 3 ++- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/_layouts/category.html b/_layouts/category.html index b3a70e390..c1d7ba719 100644 --- a/_layouts/category.html +++ b/_layouts/category.html @@ -2,22 +2,9 @@ layout: default --- {% include breadcrumbs.html parent="categories" %} -{% assign datasets = '' | split: "" %} -{% for ds in site.datasets %} - {% if ds.category.first %} - {% if ds.category contains page.name %} - {% assign datasets = datasets | push: ds %} - {% continue %} - {% endif %} - {% else %} - {% assign cat = ds.category %} - {% if cat == page.name %} - {% assign datasets = datasets | push: ds %} - {% endif %} - {% endif %} -{% endfor %} - +{% assign datasets = site.datasets | where: "category", page.name %} {% assign datasets_count = datasets | size %} +
diff --git a/categories.html b/categories.html index ca54dc2ff..6199b1cdc 100644 --- a/categories.html +++ b/categories.html @@ -8,6 +8,7 @@ Add category {% for category in site.categories %} + {% assign dataset_count = site.datasets | where:"category", category.name | size %}
{% if category.logo and category.logo != empty %} @@ -19,7 +20,7 @@
{% endfor %} \ No newline at end of file From 44a365cb971d34d12aa5030263ea3cedc060d883 Mon Sep 17 00:00:00 2001 From: timwis Date: Thu, 2 Feb 2023 07:10:00 +0000 Subject: [PATCH 35/77] Migrate _data/categories.yml into individual files in _categories collection --- _categories/arts-culture-history.md | 5 +++ _categories/budget-finance.md | 6 +++ _categories/economy.md | 6 +++ _categories/education.md | 6 +++ _categories/elections-politics.md | 6 +++ _categories/environment.md | 5 +++ _categories/food.md | 6 +++ _categories/health-human-services.md | 6 +++ _categories/parks-recreation.md | 6 +++ _categories/planning-zoning.md | 5 +++ _categories/public-safety.md | 6 +++ _categories/real-estate-land-records.md | 5 +++ _categories/transportation.md | 6 +++ _categories/uncategorized.md | 6 +++ _data/categories.yml | 53 ------------------------- 15 files changed, 80 insertions(+), 53 deletions(-) create mode 100644 _categories/arts-culture-history.md create mode 100644 _categories/budget-finance.md create mode 100644 _categories/economy.md create mode 100644 _categories/education.md create mode 100644 _categories/elections-politics.md create mode 100644 _categories/environment.md create mode 100644 _categories/food.md create mode 100644 _categories/health-human-services.md create mode 100644 _categories/parks-recreation.md create mode 100644 _categories/planning-zoning.md create mode 100644 _categories/public-safety.md create mode 100644 _categories/real-estate-land-records.md create mode 100644 _categories/transportation.md create mode 100644 _categories/uncategorized.md delete mode 100644 _data/categories.yml diff --git a/_categories/arts-culture-history.md b/_categories/arts-culture-history.md new file mode 100644 index 000000000..50c7bef65 --- /dev/null +++ b/_categories/arts-culture-history.md @@ -0,0 +1,5 @@ +--- +name: Arts / Culture / History +logo: "/img/categories/arts-culture-history.svg" +featured: true +--- diff --git a/_categories/budget-finance.md b/_categories/budget-finance.md new file mode 100644 index 000000000..ae075090e --- /dev/null +++ b/_categories/budget-finance.md @@ -0,0 +1,6 @@ +--- +name: Budget / Finance +logo: "/img/categories/budget-finance.svg" +logo_credit: Renan Ferreira Santos from the Noun Project +featured: true +--- diff --git a/_categories/economy.md b/_categories/economy.md new file mode 100644 index 000000000..e5c335b80 --- /dev/null +++ b/_categories/economy.md @@ -0,0 +1,6 @@ +--- +name: Economy +logo: "/img/categories/economy.svg" +logo_credit: Vectors Market from the Noun Project +featured: true +--- diff --git a/_categories/education.md b/_categories/education.md new file mode 100644 index 000000000..46412a366 --- /dev/null +++ b/_categories/education.md @@ -0,0 +1,6 @@ +--- +name: Education +logo: "/img/categories/education.svg" +logo_credit: Sergey Patutin from the Noun Project +featured: true +--- diff --git a/_categories/elections-politics.md b/_categories/elections-politics.md new file mode 100644 index 000000000..61e5f59f8 --- /dev/null +++ b/_categories/elections-politics.md @@ -0,0 +1,6 @@ +--- +name: Elections / Politics +logo: "/img/categories/elections-politics.svg" +logo_credit: Jean Soo from the Noun Project +featured: true +--- diff --git a/_categories/environment.md b/_categories/environment.md new file mode 100644 index 000000000..82886e4f8 --- /dev/null +++ b/_categories/environment.md @@ -0,0 +1,5 @@ +--- +name: Environment +logo: "/img/categories/environment.svg" +featured: true +--- diff --git a/_categories/food.md b/_categories/food.md new file mode 100644 index 000000000..e70afa979 --- /dev/null +++ b/_categories/food.md @@ -0,0 +1,6 @@ +--- +name: Food +logo: "/img/categories/food.svg" +logo_credit: Creative Stall from the Noun Project +featured: true +--- diff --git a/_categories/health-human-services.md b/_categories/health-human-services.md new file mode 100644 index 000000000..227b55012 --- /dev/null +++ b/_categories/health-human-services.md @@ -0,0 +1,6 @@ +--- +name: Health / Human Services +logo: "/img/categories/health-human-services.svg" +logo_credit: Timothy Miller from the Noun Project +featured: true +--- diff --git a/_categories/parks-recreation.md b/_categories/parks-recreation.md new file mode 100644 index 000000000..5000b1d8c --- /dev/null +++ b/_categories/parks-recreation.md @@ -0,0 +1,6 @@ +--- +name: Parks / Recreation +logo: "/img/categories/parks-recreation.svg" +logo_credit: Pipe Rosas Licht from the Noun Project +featured: true +--- diff --git a/_categories/planning-zoning.md b/_categories/planning-zoning.md new file mode 100644 index 000000000..2e470b15c --- /dev/null +++ b/_categories/planning-zoning.md @@ -0,0 +1,5 @@ +--- +name: Planning / Zoning +logo: "/img/categories/planning-zoning.svg" +featured: true +--- diff --git a/_categories/public-safety.md b/_categories/public-safety.md new file mode 100644 index 000000000..973bab061 --- /dev/null +++ b/_categories/public-safety.md @@ -0,0 +1,6 @@ +--- +name: Public Safety +logo: "/img/categories/public-safety.svg" +logo_credit: Rohith M S from the Noun Project +featured: true +--- diff --git a/_categories/real-estate-land-records.md b/_categories/real-estate-land-records.md new file mode 100644 index 000000000..404ef6d14 --- /dev/null +++ b/_categories/real-estate-land-records.md @@ -0,0 +1,5 @@ +--- +name: Real Estate / Land Records +logo: "/img/categories/real-estate-land-records.svg" +featured: true +--- diff --git a/_categories/transportation.md b/_categories/transportation.md new file mode 100644 index 000000000..adab1d153 --- /dev/null +++ b/_categories/transportation.md @@ -0,0 +1,6 @@ +--- +name: Transportation +logo: "/img/categories/transportation.svg" +logo_credit: Dmitry Baranovskiy from the Noun Project +featured: true +--- diff --git a/_categories/uncategorized.md b/_categories/uncategorized.md new file mode 100644 index 000000000..eb39e19d6 --- /dev/null +++ b/_categories/uncategorized.md @@ -0,0 +1,6 @@ +--- +name: Uncategorized +logo: "/img/categories/uncategorized.svg" +logo_credit: Edward Boatman from the Noun Project +featured: true +--- diff --git a/_data/categories.yml b/_data/categories.yml deleted file mode 100644 index 4136fbe3d..000000000 --- a/_data/categories.yml +++ /dev/null @@ -1,53 +0,0 @@ -items: - - name: Arts / Culture / History - logo: /img/categories/arts-culture-history.svg - featured: true - - name: Budget / Finance - logo: /img/categories/budget-finance.svg - logo_credit: Renan Ferreira Santos from the Noun Project - featured: true - - name: Economy - logo: /img/categories/economy.svg - logo_credit: Vectors Market from the Noun Project - featured: true - - name: Education - logo: /img/categories/education.svg - logo_credit: Sergey Patutin from the Noun Project - featured: true - - name: Elections / Politics - logo: /img/categories/elections-politics.svg - logo_credit: Jean Soo from the Noun Project - featured: true - - name: Environment - logo: /img/categories/environment.svg - featured: true - - name: Food - logo: /img/categories/food.svg - logo_credit: Creative Stall from the Noun Project - featured: true - - name: Health / Human Services - logo: /img/categories/health-human-services.svg - logo_credit: Timothy Miller from the Noun Project - featured: true - - name: Parks / Recreation - logo: /img/categories/parks-recreation.svg - logo_credit: Pipe Rosas Licht from the Noun Project - featured: true - - name: Planning / Zoning - logo: /img/categories/planning-zoning.svg - featured: true - - name: Public Safety - logo: /img/categories/public-safety.svg - logo_credit: Rohith M S from the Noun Project - featured: true - - name: Real Estate / Land Records - logo: /img/categories/real-estate-land-records.svg - featured: true - - name: Transportation - logo: /img/categories/transportation.svg - logo_credit: Dmitry Baranovskiy from the Noun Project - featured: true - - name: Uncategorized - logo: /img/categories/uncategorized.svg - logo_credit: Edward Boatman from the Noun Project - featured: true From 78926acfd5e2713dd900a9a0d6808d25d229e5a5 Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 3 Feb 2023 07:38:57 +0000 Subject: [PATCH 36/77] Fix edit button in category layout, and remove legacy view switcher --- _layouts/category.html | 66 +++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/_layouts/category.html b/_layouts/category.html index c1d7ba719..d625ac621 100644 --- a/_layouts/category.html +++ b/_layouts/category.html @@ -6,43 +6,37 @@ {% assign datasets_count = datasets | size %}
-
-
-
- {% if page.logo and page.logo != empty %} -
- {{ page.title }} logo -
-
- {% else %} -
- {% endif %} -

- {{ page.name }} - Edit -

-

{{ page.description }}

-
-

{{ datasets_count }} - {% if datasets_count == 1 %}dataset{% else %}datasets{% endif %}

- -
- {% for dataset in datasets %} - -

{{ dataset.title }}

- {{ dataset.notes }} - -
- {% endfor %} -
-
-
-
From 035ec0f2cbf1a127b70b0d36091bf3628a5c4d2b Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 3 Feb 2023 07:40:17 +0000 Subject: [PATCH 37/77] Update Netlify CMS config to use categories collection instead of data file --- editor/netlify-cms.yml | 59 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/editor/netlify-cms.yml b/editor/netlify-cms.yml index 412e403f3..7477fdb85 100644 --- a/editor/netlify-cms.yml +++ b/editor/netlify-cms.yml @@ -113,6 +113,35 @@ collections: allow_multiple: false media_folder: /img/organizations + - name: categories + label: Categories + folder: _categories + description: Dataset categories + create: true + preview_path: "categories/{{slug}}" + identifier_field: name + fields: + - label: Name + name: name + widget: string + + - label: Logo + name: logo + required: false + widget: image + allow_multiple: false + media_folder: /img/categories + + - label: Logo Credit + name: logo_credit + required: false + widget: string + + - label: Featured on Homepage + name: featured + widget: boolean + required: false + - name: settings label: Settings delete: false @@ -158,33 +187,3 @@ collections: name: url required: false widget: string - - - name: categories - label: Categories - file: _data/categories.yml - description: Dataset categories - fields: - - name: items - label: Categories - label_singular: Category - widget: list - fields: - - label: Name - name: name - widget: string - - - label: Logo - name: logo - required: false - widget: image - allow_multiple: false - media_folder: /img/categories - - - label: Logo Credit - name: logo_credit - required: false - widget: string - - - label: Featured on Homepage - name: featured - widget: boolean From 100413f082babe424af267aa8653d8db49d08422 Mon Sep 17 00:00:00 2001 From: timwis Date: Mon, 6 Feb 2023 07:33:21 +0000 Subject: [PATCH 38/77] Rename categories collection to dataset_categories Jekyll comes with a built-in `site.categories` collection, so we're renaming this to avoid conflict, should any JKAN users want to take advantage of the built-in collection. --- _config.yml | 4 ++-- .../arts-culture-history.md | 0 .../budget-finance.md | 0 .../economy.md | 0 .../education.md | 0 .../elections-politics.md | 0 .../environment.md | 0 {_categories => _dataset_categories}/food.md | 0 .../health-human-services.md | 0 .../parks-recreation.md | 0 .../planning-zoning.md | 0 .../public-safety.md | 0 .../real-estate-land-records.md | 0 .../transportation.md | 0 .../uncategorized.md | 0 categories.html | 2 +- editor/netlify-cms.yml | 23 +++++++++++-------- index.html | 2 +- 18 files changed, 17 insertions(+), 14 deletions(-) rename {_categories => _dataset_categories}/arts-culture-history.md (100%) rename {_categories => _dataset_categories}/budget-finance.md (100%) rename {_categories => _dataset_categories}/economy.md (100%) rename {_categories => _dataset_categories}/education.md (100%) rename {_categories => _dataset_categories}/elections-politics.md (100%) rename {_categories => _dataset_categories}/environment.md (100%) rename {_categories => _dataset_categories}/food.md (100%) rename {_categories => _dataset_categories}/health-human-services.md (100%) rename {_categories => _dataset_categories}/parks-recreation.md (100%) rename {_categories => _dataset_categories}/planning-zoning.md (100%) rename {_categories => _dataset_categories}/public-safety.md (100%) rename {_categories => _dataset_categories}/real-estate-land-records.md (100%) rename {_categories => _dataset_categories}/transportation.md (100%) rename {_categories => _dataset_categories}/uncategorized.md (100%) diff --git a/_config.yml b/_config.yml index e8ae4e187..e797acb51 100644 --- a/_config.yml +++ b/_config.yml @@ -30,7 +30,7 @@ collections: organizations: output: true permalink: /organizations/:path/ - categories: + dataset_categories: output: true permalink: /categories/:path/ @@ -38,7 +38,7 @@ collections: defaults: - scope: path: "" - type: categories + type: dataset_categories values: layout: category - scope: diff --git a/_categories/arts-culture-history.md b/_dataset_categories/arts-culture-history.md similarity index 100% rename from _categories/arts-culture-history.md rename to _dataset_categories/arts-culture-history.md diff --git a/_categories/budget-finance.md b/_dataset_categories/budget-finance.md similarity index 100% rename from _categories/budget-finance.md rename to _dataset_categories/budget-finance.md diff --git a/_categories/economy.md b/_dataset_categories/economy.md similarity index 100% rename from _categories/economy.md rename to _dataset_categories/economy.md diff --git a/_categories/education.md b/_dataset_categories/education.md similarity index 100% rename from _categories/education.md rename to _dataset_categories/education.md diff --git a/_categories/elections-politics.md b/_dataset_categories/elections-politics.md similarity index 100% rename from _categories/elections-politics.md rename to _dataset_categories/elections-politics.md diff --git a/_categories/environment.md b/_dataset_categories/environment.md similarity index 100% rename from _categories/environment.md rename to _dataset_categories/environment.md diff --git a/_categories/food.md b/_dataset_categories/food.md similarity index 100% rename from _categories/food.md rename to _dataset_categories/food.md diff --git a/_categories/health-human-services.md b/_dataset_categories/health-human-services.md similarity index 100% rename from _categories/health-human-services.md rename to _dataset_categories/health-human-services.md diff --git a/_categories/parks-recreation.md b/_dataset_categories/parks-recreation.md similarity index 100% rename from _categories/parks-recreation.md rename to _dataset_categories/parks-recreation.md diff --git a/_categories/planning-zoning.md b/_dataset_categories/planning-zoning.md similarity index 100% rename from _categories/planning-zoning.md rename to _dataset_categories/planning-zoning.md diff --git a/_categories/public-safety.md b/_dataset_categories/public-safety.md similarity index 100% rename from _categories/public-safety.md rename to _dataset_categories/public-safety.md diff --git a/_categories/real-estate-land-records.md b/_dataset_categories/real-estate-land-records.md similarity index 100% rename from _categories/real-estate-land-records.md rename to _dataset_categories/real-estate-land-records.md diff --git a/_categories/transportation.md b/_dataset_categories/transportation.md similarity index 100% rename from _categories/transportation.md rename to _dataset_categories/transportation.md diff --git a/_categories/uncategorized.md b/_dataset_categories/uncategorized.md similarity index 100% rename from _categories/uncategorized.md rename to _dataset_categories/uncategorized.md diff --git a/categories.html b/categories.html index 6199b1cdc..85396abb8 100644 --- a/categories.html +++ b/categories.html @@ -7,7 +7,7 @@ Add category -{% for category in site.categories %} +{% for category in site.dataset_categories %} {% assign dataset_count = site.datasets | where:"category", category.name | size %}
diff --git a/editor/netlify-cms.yml b/editor/netlify-cms.yml index 7477fdb85..d850f39af 100644 --- a/editor/netlify-cms.yml +++ b/editor/netlify-cms.yml @@ -7,8 +7,9 @@ backend: media_folder: "img/uploads" collections: - - name: dataset - label: Dataset + - name: datasets + label: Datasets + label_singular: Dataset folder: _datasets create: true summary: "{{title}} ({{organization}})" @@ -25,7 +26,7 @@ collections: name: organization required: false widget: relation - collection: organization + collection: organizations value_field: "title" search_fields: - title @@ -75,11 +76,11 @@ collections: name: category required: false widget: relation + collection: categories multiple: true - collection: settings - file: categories - value_field: "items.*.name" - search_fields: ["items.*.name"] + value_field: "name" + search_fields: + - name - label: Maintainer name: maintainer @@ -91,8 +92,9 @@ collections: required: false widget: string - - name: organization - label: Organization + - name: organizations + label: Organizations + label_singular: Organization folder: _organizations create: true preview_path: "organizations/{{slug}}" @@ -115,7 +117,8 @@ collections: - name: categories label: Categories - folder: _categories + label_singular: Category + folder: _dataset_categories description: Dataset categories create: true preview_path: "categories/{{slug}}" diff --git a/index.html b/index.html index 43e8d1cc0..4c2669785 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

{{ site.greeting }}

Browse by Category

-{% for category in site.categories %} +{% for category in site.dataset_categories %} {% if category.featured == true %} {% capture logo_alt %}{{ category.name }}{% if category.logo_credit and category.logo_credit != empty %} logo by {{ category.logo_credit }}{% endif %}{% endcapture %} From 4cd3ddf93dcc500ce3ebcf9032cd8135d969fdda Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 28 Mar 2018 11:21:47 +0100 Subject: [PATCH 39/77] Organization pages now show data without JS. --- _layouts/organization.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/_layouts/organization.html b/_layouts/organization.html index e8d2678c5..6c3f94ec1 100644 --- a/_layouts/organization.html +++ b/_layouts/organization.html @@ -2,6 +2,9 @@ layout: default --- {% include breadcrumbs.html parent="Organizations" %} +{% assign datasets = site.datasets | where:"organization", page.title %} +{% assign datasets_count = datasets | size %} +
License - {{ site.data.licenses[page.license] }} + {{ license.name }}
{% if include.value.size %} {% for category in include.value %} - {{ category }}{% unless forloop.last %}, {% endunless %} + {{ category }}{% unless forloop.last %}, {% endunless %} {% endfor %} {% else %} - {{ include.value }} + {{ include.value }} {% endif %}
","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&j(t,e)?x.merge([t],n):n}function mt(t,e){for(var n=0,r=t.length;n-1)i&&i.push(o);else if(c=ot(o),u=yt(f.appendChild(o),"script"),c&&mt(u),n)for(l=0;o=u[l++];)gt.test(o.type||"")&&n.push(o);return f}_t=r.createDocumentFragment().appendChild(r.createElement("div")),(bt=r.createElement("input")).setAttribute("type","radio"),bt.setAttribute("checked","checked"),bt.setAttribute("name","t"),_t.appendChild(bt),d.checkClone=_t.cloneNode(!0).cloneNode(!0).lastChild.checked,_t.innerHTML="",d.noCloneChecked=!!_t.cloneNode(!0).lastChild.defaultValue;var Tt=/^key/,Ct=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function St(){return!1}function jt(t,e){return t===function(){try{return r.activeElement}catch(t){}}()==("focus"===e)}function kt(t,e,n,r,i,o){var u,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)kt(t,a,n,r,e[a],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=St;else if(!i)return t;return 1===o&&(u=i,i=function(t){return x().off(t),u.apply(this,arguments)},i.guid=u.guid||(u.guid=x.guid++)),t.each((function(){x.event.add(this,e,i,r,n)}))}function Dt(t,e,n){n?(G.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var r,i,u=G.get(this,e);if(1&t.isTrigger&&this[e]){if(u.length)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(u=o.call(arguments),G.set(this,e,u),r=n(this,e),this[e](),u!==(i=G.get(this,e))||r?G.set(this,e,!1):i={},u!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else u.length&&(G.set(this,e,{value:x.event.trigger(x.extend(u[0],x.Event.prototype),u.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===G.get(t,e)&&x.event.add(t,e,Et)}x.event={global:{},add:function(t,e,n,r,i){var o,u,a,s,c,l,f,p,h,d,g,v=G.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&x.find.matchesSelector(it,i),n.guid||(n.guid=x.guid++),(s=v.events)||(s=v.events={}),(u=v.handle)||(u=v.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(I)||[""]).length;c--;)h=g=(a=At.exec(e[c])||[])[1],d=(a[2]||"").split(".").sort(),h&&(f=x.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=x.event.special[h]||{},l=x.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:d.join(".")},o),(p=s[h])||((p=s[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,d,u)||t.addEventListener&&t.addEventListener(h,u)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),x.event.global[h]=!0)},remove:function(t,e,n,r,i){var o,u,a,s,c,l,f,p,h,d,g,v=G.hasData(t)&&G.get(t);if(v&&(s=v.events)){for(c=(e=(e||"").match(I)||[""]).length;c--;)if(h=g=(a=At.exec(e[c])||[])[1],d=(a[2]||"").split(".").sort(),h){for(f=x.event.special[h]||{},p=s[h=(r?f.delegateType:f.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;o--;)l=p[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));u&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,d,v.handle)||x.removeEvent(t,h,v.handle),delete s[h])}else for(h in s)x.event.remove(t,h+e[c],n,r,!0);x.isEmptyObject(s)&&G.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,u,a=x.event.fix(t),s=new Array(arguments.length),c=(G.get(this,"events")||{})[a.type]||[],l=x.event.special[a.type]||{};for(s[0]=a,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],u={},n=0;n-1:x.find(i,this,null,[c]).length),u[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Ot=/\s*$/g;function qt(t,e){return j(t,"table")&&j(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ht(t,e){var n,r,i,o,u,a,s,c;if(1===e.nodeType){if(G.hasData(t)&&(o=G.access(t),u=G.set(e,o),c=o.events))for(i in delete u.handle,u.events={},c)for(n=0,r=c[i].length;n1&&"string"==typeof v&&!d.checkClone&&Lt.test(v))return t.each((function(i){var o=t.eq(i);y&&(e[0]=v.call(this,i,o.html())),zt(o,e,n,r)}));if(p&&(o=(i=wt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=x.map(yt(i,"script"),It)).length;f")},clone:function(t,e,n){var r,i,o,u,a=t.cloneNode(!0),s=ot(t);if(!(d.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(u=yt(a),r=0,i=(o=yt(t)).length;r0&&mt(u,!s&&yt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=x.event.special,o=0;void 0!==(n=t[o]);o++)if(Q(n)){if(e=n[G.expando]){if(e.events)for(r in e.events)i[r]?x.event.remove(n,r):x.removeEvent(n,r,e.handle);n[G.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),x.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return $(this,(function(t){return void 0===t?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return zt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qt(this,t).appendChild(t)}))},prepend:function(){return zt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=qt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return x.clone(this,t,e)}))},html:function(t){return $(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ot.test(t)&&!vt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n=0&&(s+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-s-a-.5))||0),s}function re(t,e,n){var r=$t(t),i=(!d.boxSizingReliable()||n)&&"border-box"===x.css(t,"boxSizing",!1,r),o=i,u=Ut(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Mt.test(u)){if(!n)return u;u="auto"}return(!d.boxSizingReliable()&&i||"auto"===u||!parseFloat(u)&&"inline"===x.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===x.css(t,"boxSizing",!1,r),(o=a in t)&&(u=t[a])),(u=parseFloat(u)||0)+ne(t,e,n||(i?"border":"content"),o,r,u)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ut(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,u,a=V(e),s=Zt.test(e),c=t.style;if(s||(e=Gt(a)),u=x.cssHooks[e]||x.cssHooks[a],void 0===n)return u&&"get"in u&&void 0!==(i=u.get(t,!1,r))?i:c[e];"string"===(o=typeof n)&&(i=nt.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||s||(n+=i&&i[3]||(x.cssNumber[a]?"":"px")),d.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),u&&"set"in u&&void 0===(n=u.set(t,n,r))||(s?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,u,a=V(e);return Zt.test(e)||(e=Gt(a)),(u=x.cssHooks[e]||x.cssHooks[a])&&"get"in u&&(i=u.get(t,!0,n)),void 0===i&&(i=Ut(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),x.each(["height","width"],(function(t,e){x.cssHooks[e]={get:function(t,n,r){if(n)return!Yt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):st(t,Kt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=$t(t),u=!d.scrollboxSize()&&"absolute"===o.position,a=(u||r)&&"border-box"===x.css(t,"boxSizing",!1,o),s=r?ne(t,e,r,a,o):0;return a&&u&&(s-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),s&&(i=nt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),ee(0,n,s)}}})),x.cssHooks.marginLeft=Xt(d.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Ut(t,"marginLeft"))||t.getBoundingClientRect().left-st(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(t,e){x.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+rt[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(x.cssHooks[t+e].set=ee)})),x.fn.extend({css:function(t,e){return $(this,(function(t,e,n){var r,i,o={},u=0;if(Array.isArray(e)){for(r=$t(t),i=e.length;u1)}}),x.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Gt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=ie.prototype.init,x.fx.step={};var oe,ue,ae=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ce(){ue&&(!1===r.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(ce):t.setTimeout(ce,x.fx.interval),x.fx.tick())}function le(){return t.setTimeout((function(){oe=void 0})),oe=Date.now()}function fe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=rt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function pe(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,u=i.length;o1)},removeAttr:function(t){return this.each((function(){x.removeAttr(this,t)}))}}),x.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?x.prop(t,e,n):(1===o&&x.isXMLDoc(t)||(i=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?de:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=x.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!d.radioValue&&"radio"===e&&j(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(I);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),de={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ge[e]||x.find.attr;ge[e]=function(t,e,r){var i,o,u=e.toLowerCase();return r||(o=ge[u],ge[u]=i,i=null!=n(t,e,r)?u:null,ge[u]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ye=/^(?:a|area)$/i;function me(t){return(t.match(I)||[]).join(" ")}function _e(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(I)||[]}x.fn.extend({prop:function(t,e){return $(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[x.propFix[t]||t]}))}}),x.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(t)||(e=x.propFix[e]||e,i=x.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ye.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(t){var e,n,r,i,o,u,a,s=0;if(g(t))return this.each((function(e){x(this).addClass(t.call(this,e,_e(this)))}));if((e=be(t)).length)for(;n=this[s++];)if(i=_e(n),r=1===n.nodeType&&" "+me(i)+" "){for(u=0;o=e[u++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=me(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,u,a,s=0;if(g(t))return this.each((function(e){x(this).removeClass(t.call(this,e,_e(this)))}));if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;n=this[s++];)if(i=_e(n),r=1===n.nodeType&&" "+me(i)+" "){for(u=0;o=e[u++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=me(r))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){x(this).toggleClass(t.call(this,n,_e(this),e),e)})):this.each((function(){var e,i,o,u;if(r)for(i=0,o=x(this),u=be(t);e=u[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=_e(this))&&G.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":G.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+me(_e(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;x.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,x(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,(function(t){return null==t?"":t+""}))),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:me(x.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,u="select-one"===t.type,a=u?null:[],s=u?o+1:i.length;for(r=o<0?s:u?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},d.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),d.focusin="onfocusin"in t;var we=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,n,i,o){var u,a,s,c,l,p,h,d,y=[i||r],m=f.call(e,"type")?e.type:e,_=f.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!we.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(_=m.split("."),m=_.shift(),_.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[x.expando]?e:new x.Event(m,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:x.makeArray(n,[e]),h=x.event.special[m]||{},o||!h.trigger||!1!==h.trigger.apply(i,n))){if(!o&&!h.noBubble&&!v(i)){for(c=h.delegateType||m,we.test(c+m)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(i.ownerDocument||r)&&y.push(s.defaultView||s.parentWindow||t)}for(u=0;(a=y[u++])&&!e.isPropagationStopped();)d=a,e.type=u>1?c:h.bindType||m,(p=(G.get(a,"events")||{})[e.type]&&G.get(a,"handle"))&&p.apply(a,n),(p=l&&a[l])&&p.apply&&Q(a)&&(e.result=p.apply(a,n),!1===e.result&&e.preventDefault());return e.type=m,o||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(y.pop(),n)||!Q(i)||l&&g(i[m])&&!v(i)&&((s=i[l])&&(i[l]=null),x.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Te),i[m](),e.isPropagationStopped()&&d.removeEventListener(m,Te),x.event.triggered=void 0,s&&(i[l]=s)),e.result}},simulate:function(t,e,n){var r=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(r,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each((function(){x.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}}),d.focusin||x.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=G.access(r,e);i||r.addEventListener(t,n,!0),G.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=G.access(r,e)-1;i?G.access(r,e,i):(r.removeEventListener(t,n,!0),G.remove(r,e))}}}));var Ce=t.location,Ae=Date.now(),Ee=/\?/;x.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),n};var Se=/\[\]$/,je=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,De=/^(?:input|select|textarea|keygen)/i;function Ne(t,e,n,r){var i;if(Array.isArray(e))x.each(e,(function(e,i){n||Se.test(t)?r(t,i):Ne(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==_(e))r(t,e);else for(i in e)Ne(t+"["+i+"]",e[i],n,r)}x.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,(function(){i(this.name,this.value)}));else for(n in t)Ne(n,t[n],e,i);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&De.test(this.nodeName)&&!ke.test(t)&&(this.checked||!ht.test(t))})).map((function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,(function(t){return{name:e.name,value:t.replace(je,"\r\n")}})):{name:e.name,value:n.replace(je,"\r\n")}})).get()}});var Oe=/%20/g,Le=/#.*$/,Re=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Pe=/^\/\//,He={},We={},ze="*/".concat("*"),Be=r.createElement("a");function Me(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(I)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function $e(t,e,n,r){var i={},o=t===We;function u(a){var s;return i[a]=!0,x.each(t[a]||[],(function(t,a){var c=a(e,n,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(e.dataTypes.unshift(c),u(c),!1)})),s}return u(e.dataTypes[0])||!i["*"]&&u("*")}function Fe(t,e){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&x.extend(!0,t,r),t}Be.href=Ce.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ce.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ce.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Fe(Fe(t,x.ajaxSettings),e):Fe(x.ajaxSettings,t)},ajaxPrefilter:Me(He),ajaxTransport:Me(We),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,o,u,a,s,c,l,f,p,h,d=x.ajaxSetup({},n),g=d.context||d,v=d.context&&(g.nodeType||g.jquery)?x(g):x.event,y=x.Deferred(),m=x.Callbacks("once memory"),_=d.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=qe.exec(u);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?u:null},setRequestHeader:function(t,e){return null==l&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==l&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)_[e]=[_[e],t[e]];return this},abort:function(t){var e=t||T;return i&&i.abort(e),A(0,e),this}};if(y.promise(C),d.url=((e||d.url||Ce.href)+"").replace(Pe,Ce.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(I)||[""],null==d.crossDomain){c=r.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=Be.protocol+"//"+Be.host!=c.protocol+"//"+c.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=x.param(d.data,d.traditional)),$e(He,d,n,C),l)return C;for(p in(f=x.event&&d.global)&&0==x.active++&&x.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ie.test(d.type),o=d.url.replace(Le,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Oe,"+")):(h=d.url.slice(o.length),d.data&&(d.processData||"string"==typeof d.data)&&(o+=(Ee.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(Re,"$1"),h=(Ee.test(o)?"&":"?")+"_="+Ae+++h),d.url=o+h),d.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+ze+"; q=0.01":""):d.accepts["*"]),d.headers)C.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(!1===d.beforeSend.call(g,C,d)||l))return C.abort();if(T="abort",m.add(d.complete),C.done(d.success),C.fail(d.error),i=$e(We,d,n,C)){if(C.readyState=1,f&&v.trigger("ajaxSend",[C,d]),l)return C;d.async&&d.timeout>0&&(s=t.setTimeout((function(){C.abort("timeout")}),d.timeout));try{l=!1,i.send(b,A)}catch(t){if(l)throw t;A(-1,t)}}else A(-1,"No Transport");function A(e,n,r,a){var c,p,h,b,w,T=n;l||(l=!0,s&&t.clearTimeout(s),i=void 0,u=a||"",C.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(b=function(t,e,n){for(var r,i,o,u,a=t.contents,s=t.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||t.converters[i+" "+s[0]]){o=i;break}u||(u=i)}o=o||u}if(o)return o!==s[0]&&s.unshift(o),n[o]}(d,C,r)),b=function(t,e,n,r){var i,o,u,a,s,c={},l=t.dataTypes.slice();if(l[1])for(u in t.converters)c[u.toLowerCase()]=t.converters[u];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!s&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(u=c[s+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(u=c[s+" "+a[0]]||c["* "+a[0]])){!0===u?u=c[i]:!0!==c[i]&&(o=a[0],l.unshift(a[1]));break}if(!0!==u)if(u&&t.throws)e=u(e);else try{e=u(e)}catch(t){return{state:"parsererror",error:u?t:"No conversion from "+s+" to "+o}}}return{state:"success",data:e}}(d,b,C,c),c?(d.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(x.etag[o]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,c=!(h=b.error))):(h=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(n||T)+"",c?y.resolveWith(g,[p,T,C]):y.rejectWith(g,[C,T,h]),C.statusCode(_),_=void 0,f&&v.trigger(c?"ajaxSuccess":"ajaxError",[C,d,c?p:h]),m.fireWith(g,[C,T]),f&&(v.trigger("ajaxComplete",[C,d]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],(function(t,e){x[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:i,data:n,success:r},x.isPlainObject(t)&&t))}})),x._evalUrl=function(t,e){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){x(this).wrapInner(t.call(this,e))})):this.each((function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){x(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ue={0:200,1223:204},Xe=x.ajaxSettings.xhr();d.cors=!!Xe&&"withCredentials"in Xe,d.ajax=Xe=!!Xe,x.ajaxTransport((function(e){var n,r;if(d.cors||Xe&&!e.crossDomain)return{send:function(i,o){var u,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(u in e.xhrFields)a[u]=e.xhrFields[u];for(u in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(u,i[u]);n=function(t){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ue[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){n&&r()}))},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}})),x.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),x.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=x("