+{% include "footer.html" %}
+
+{%- endblock body %}
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/affi_index.html b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/affi_index.html
new file mode 100644
index 0000000..09c5ea3
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/affi_index.html
@@ -0,0 +1,88 @@
+{% extends "base.html" %}
+
+{%- block body %}
+{% include "header.html" %}
+
+
+
+
+
+
+
+
+ {%- block page_body_tabs %}
+ {% from "admin_setting/_macros.html" import tabs_selector with context %}
+ {{ tabs_selector('setting') }}
+ {%- endblock page_body_tabs %}
+
+
+
+
0
+
+
+
+
+
+
+
+
+ 機関名
+
+
+ {%- if current_user.role == "図書館員" -%}
+
+ {%- endif -%}
+ {%- if current_user.role == "管理者" -%}
+
+ {%- for affiliation_id in affiliation_id_list -%}
+ {{ affiliation_id.affiliation_name }}
+ {%- endfor -%}
+
+ {%- endif -%}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% include "footer.html" %}
+
+{%- endblock body %}
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/permission_required.html b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/permission_required.html
new file mode 100644
index 0000000..e4bb73b
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/admin_setting/permission_required.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+
+{%- block body %}
+{% include "header.html" %}
+
+
+
+
+
+
+
+
Permission required
+
You do not have sufficient permissions to view this page.
+
+
+
+
+
+
+{% include "footer.html" %}
+{%- endblock body%}
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/templates/base.html b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/base.html
new file mode 100644
index 0000000..cbb1897
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/base.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+ {% block css %}
+
+
+
+
+ {% endblock %}
+ {%- block body %}
+
+ {%- endblock body %}
+
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/templates/footer.html b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/footer.html
new file mode 100644
index 0000000..d198abe
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/footer.html
@@ -0,0 +1,12 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/templates/header.html b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/header.html
new file mode 100644
index 0000000..84e9461
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/templates/header.html
@@ -0,0 +1,23 @@
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/depositor_admin_setting/views.py b/app/modules/depositor_admin_setting/depositor_admin_setting/views.py
new file mode 100644
index 0000000..4565b66
--- /dev/null
+++ b/app/modules/depositor_admin_setting/depositor_admin_setting/views.py
@@ -0,0 +1,113 @@
+from flask import Flask, render_template, redirect, url_for, request, flash, session ,current_app, jsonify, Blueprint, json
+from flask_login import login_user, current_user, logout_user, login_required
+from flask_wtf import FlaskForm
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+from depositor_login.views import index_login
+
+blueprint = Blueprint(
+ "admin_setting",
+ __name__,
+ url_prefix="/admin_setting",
+ template_folder="templates",
+ static_folder="static")
+
+@blueprint.route("/", methods=['GET', 'POST'])
+def index_affili():
+ if not current_user.is_authenticated:
+ return redirect(url_for('login.index_login'))
+ if request.method == "POST":
+ try:
+ affiliation_name = request.json.get("affiliation_name")
+ repository_url = request.json.get("repository_url")
+ access_token = request.json.get("access_token")
+ if all([affiliation_name,repository_url,access_token]):
+ if current_user.role == "管理者":
+ affiliation_id_info = Affiliation_Id_manager.get_affiliation_id_by_id(affiliation_name)
+ else:
+ affiliation_id_info = Affiliation_Id_manager.get_affiliation_id_by_affiliation_name(affiliation_name)
+ affiliation_repository_info = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(affiliation_id_info.id)
+ if affiliation_repository_info:
+ aff_repository = {"id":affiliation_repository_info.id,
+ "affiliation_id":affiliation_id_info.id,
+ "repository_url":repository_url,
+ "access_token":access_token}
+ Affiliation_Repository_manager.upt_aff_repository(aff_repository)
+ return jsonify(success=True),200
+ else:
+ aff_repository = Affiliation_Repository(affiliation_id=affiliation_id_info.id, repository_url=repository_url, access_token=access_token)
+ Affiliation_Repository_manager.create_aff_repository(aff_repository)
+ return jsonify(success=True),200
+ else:
+ current_app.logger.error(
+ 'ERROR affliation settings: settings is not exist.')
+ return jsonify(success=False),400
+ except Exception as e:
+ current_app.logger.error(
+ 'ERROR affliation settings: {}'.format(e))
+ return jsonify(success=False),400
+ else:
+ role = current_user.role
+ try:
+ if role == "図書館員" or role == "管理者":
+ repository_url = ""
+ access_token = ""
+ if role == "管理者":
+ affiliation_name = "default"
+ affiliation_id_info = Affiliation_Id_manager.get_affiliation_id_by_affiliation_name(affiliation_name)
+ affiliation_repository_info = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(affiliation_id_info.id)
+ else:
+ affiliation_id_info = Affiliation_Id_manager.get_affiliation_id_by_id(current_user.affiliation_id)
+ affiliation_name = affiliation_id_info.affiliation_name
+ affiliation_repository_info = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(affiliation_id_info.id)
+ if affiliation_repository_info:
+ repository_url = affiliation_repository_info.repository_url
+ access_token = affiliation_repository_info.access_token
+ affiliation_id_list = Affiliation_Id_manager.get_affiliation_id_list()
+ affiliation_repository_list = Affiliation_Repository_manager.get_affiliation_repository_list()
+ aff_repository_dict = {}
+ for affiliation_repository in affiliation_repository_list:
+ aff_repository_dict[affiliation_repository.affiliation_id] = {"repository_url":affiliation_repository.repository_url, "access_token":affiliation_repository.access_token}
+ form = FlaskForm(request.form)
+ return render_template("admin_setting/affi_index.html",
+ form = form,
+ affiliation_id_list = affiliation_id_list,
+ aff_repository_dict = json.dumps(aff_repository_dict),
+ affiliation_name = affiliation_name,
+ repository_url = repository_url,
+ access_token = access_token)
+ else:
+ form = FlaskForm(request.form)
+ return render_template("admin_setting/permission_required.html", form = form)
+ except Exception as e:
+ current_app.logger.error(
+ 'ERROR affliation settings: {}'.format(e))
+ return jsonify(success=False),400
+
+@blueprint.route("/add", methods=['GET', 'POST'])
+def add_affili():
+ if not current_user.is_authenticated:
+ return redirect(url_for('login.index_login'))
+ if request.method == "POST":
+ affiliation_name = request.json.get("affiliation_name")
+ affiliation_idp_url = request.json.get("affiliation_idp_url")
+ is_affiattion_name = Affiliation_Id_manager.get_affiliation_id_by_affiliation_name(affiliation_name)
+ is_affiation_idp_url = Affiliation_Id_manager.get_affiliation_id_by_idp_url(affiliation_idp_url)
+ try:
+ if not any([is_affiattion_name, is_affiation_idp_url]):
+ aff_id = Affiliation_Id(affiliation_idp_url=affiliation_idp_url, affiliation_name=affiliation_name)
+ Affiliation_Id_manager.create_affiliation_id(aff_id)
+ return jsonify(success=True),200
+ else:
+ return jsonify(success=False),400
+ except Exception as e:
+ current_app.logger.error(
+ 'ERROR affliation settings: {}'.format(e))
+ return jsonify(success=False),400
+ else:
+ if current_user.role == "管理者":
+ form = FlaskForm(request.form)
+ return render_template("admin_setting/add_affili.html", form = form)
+ else:
+ form = FlaskForm(request.form)
+ return render_template("admin_setting/permission_required.html", form = form)
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/requirements.txt b/app/modules/depositor_admin_setting/requirements.txt
new file mode 100644
index 0000000..67bcd6d
--- /dev/null
+++ b/app/modules/depositor_admin_setting/requirements.txt
@@ -0,0 +1,38 @@
+
+-e ../depositor_admin_setting
+-e ../depositor_item_register
+-e ../depositor_login
+-e ../depositor_models
+-e ../../../src/grobid_client
+email-validator
+Flask==2.2.0
+Flask-Admin==1.6.1
+Flask-Alembic==2.0.1
+Flask-Assets==2.1.0
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==2.1.0
+Flask-Collect==1.3.2
+Flask-Cors==4.0.0
+Flask-Login==0.6.3
+# Flask-OAuthlib==0.9.6
+Flask-WTF
+Flask-Security==3.0.0
+Flask-SQLAlchemy==3.0.2
+flask-marshmallow==0.14.0
+github3.py==1.1.0
+itsdangerous==2.1.2
+mock == 5.1.0
+pytest-mock == 3.12.0
+psycopg2==2.9.9
+pytz
+requests==2.31.0
+requests-oauthlib==1.3.1
+SQLAlchemy==2.0.27
+SQLAlchemy-Continuum==1.4.0
+SQLAlchemy-Utils==0.41.1
+# fpdf==1.7.2
+sword3common==0.1.1
+uWSGI==2.0.24
+wtforms==3.1.2
+Werkzeug==2.3.7
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/setup.py b/app/modules/depositor_admin_setting/setup.py
new file mode 100644
index 0000000..10e0035
--- /dev/null
+++ b/app/modules/depositor_admin_setting/setup.py
@@ -0,0 +1,14 @@
+from setuptools import setup, find_packages
+
+setup(
+ name='depositor_admin_setting',
+ version='1.0.0',
+ author='Your Name',
+ author_email='your.email@example.com',
+ description='A short description of your package',
+ packages=find_packages(),
+ install_requires=[
+ ],
+ entry_points={
+ },
+)
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/tests/__init__.py b/app/modules/depositor_admin_setting/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/app/modules/depositor_admin_setting/tests/conftest.py b/app/modules/depositor_admin_setting/tests/conftest.py
new file mode 100644
index 0000000..de9bfb9
--- /dev/null
+++ b/app/modules/depositor_admin_setting/tests/conftest.py
@@ -0,0 +1,107 @@
+import pytest
+import os
+from flask import Flask, url_for
+from flask_login import LoginManager
+from sqlalchemy_utils.functions import create_database, database_exists, drop_database
+from depositor_admin_setting import AdminSettingApp
+from depositor_item_register import ItemRegisterApp
+from depositor_login import LoginApp
+from depositor_models.db_setting import db as db_
+from depositor_models.db_setting import DATABASE_URI, init_db
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+from depositor_models.user import User, User_manager
+
+@pytest.fixture()
+def base_app():
+ app_ = Flask("testapp")
+ login_manager = LoginManager()
+ login_manager.init_app(app_)
+ app_.config["SQLALCHEMY_DATABASE_URI"]=DATABASE_URI
+ app_.config["TESTING"]="True"
+ app_.config["SECRET_KEY"]="SECRET_KEY"
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+
+ @login_manager.user_loader
+ def load_user(user_id):
+ user=User_manager.get_user_by_id(user_id)
+ return user
+ return app_
+
+@pytest.fixture()
+def base_app_none():
+ app_=None
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+ return app_
+
+
+@pytest.yield_fixture()
+def app(base_app):
+ with base_app.app_context():
+ yield base_app
+
+@pytest.yield_fixture()
+def db(app):
+ print()
+ init_db(app)
+ if not database_exists(DATABASE_URI):
+ create_database(DATABASE_URI)
+ db_.create_all()
+ yield db_
+ db_.session.remove()
+ db_.drop_all()
+
+
+@pytest.yield_fixture()
+def client(app):
+ """Get test client."""
+ with app.test_client() as client:
+ yield client
+
+@pytest.fixture()
+def users(app, db):
+ test_admin = User(id=0, user_id="test_admin", affiliation_id=-1, user_orcid = "test_admin", role = "管理者")
+ test_cont = User(id=1, user_id="test_cont", affiliation_id=101, user_orcid = "test_cont", role = "図書館員")
+ test_user_1 = User(id=2, user_id="test_user1A", affiliation_id=101, user_orcid = "test_user1", role = "")
+ test_user_2 = User(id=3, user_id="test_user2A", affiliation_id=102, user_orcid = "test_user2", role = "")
+ test_user_3 = User(id=4, user_id="test_user3A", affiliation_id=102, user_orcid = "test_user2", role = "図書館員")
+ test_user_4 = User(id=5, user_id="test_user4A", affiliation_id=103, user_orcid = "test_user3", role = "図書館員")
+
+ User_manager.create_user(test_admin)
+ User_manager.create_user(test_cont)
+ User_manager.create_user(test_user_1)
+ User_manager.create_user(test_user_2)
+ User_manager.create_user(test_user_3)
+ User_manager.create_user(test_user_4)
+
+ return [test_admin,
+ test_cont,
+ test_user_1,
+ test_user_2,
+ test_user_3,
+ test_user_4]
+
+@pytest.fixture()
+def Affiliation_Id_settings(db):
+ settings = list()
+ settings.append(Affiliation_Id(id=-1,affiliation_idp_url="-",affiliation_name="default"))
+ settings.append(Affiliation_Id(id=101,affiliation_idp_url="https://example/idp_url/test",affiliation_name="affiliation_test"))
+ settings.append(Affiliation_Id(id=102,affiliation_idp_url="https://example/idp_url/test2",affiliation_name="affiliation_test2"))
+ settings.append(Affiliation_Id(id=103,affiliation_idp_url="https://example/idp_url/test3",affiliation_name="affiliation_test3"))
+ db.session.add_all(settings)
+ db.session.add_all(settings)
+ db.session.commit()
+ return settings
+
+@pytest.fixture()
+def Affiliation_Repository_settings(db):
+ settings = list()
+ settings.append(Affiliation_Repository(id=1001,affiliation_id=-1,repository_url="https://example/repository_url/default",access_token="default_token"))
+ settings.append(Affiliation_Repository(id=1002,affiliation_id=101,repository_url="https://example/repository_url/test",access_token="test_token"))
+ db.session.add_all(settings)
+ db.session.commit()
+ return settings
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/tests/test_views.py b/app/modules/depositor_admin_setting/tests/test_views.py
new file mode 100644
index 0000000..ebefb84
--- /dev/null
+++ b/app/modules/depositor_admin_setting/tests/test_views.py
@@ -0,0 +1,259 @@
+from mock import patch,MagicMock
+import pytest
+import os
+from flask import Flask, render_template, redirect, url_for, request, flash, session ,current_app, jsonify, Blueprint, json,make_response
+from flask_login import login_user, current_user, logout_user, login_required,LoginManager
+from flask_wtf import FlaskForm
+from sqlalchemy_utils.functions import create_database, database_exists, drop_database
+from depositor_admin_setting import AdminSettingApp
+from depositor_item_register import ItemRegisterApp
+from depositor_login import LoginApp
+from depositor_models.db_setting import db as db_
+from depositor_models.db_setting import DATABASE_URI, init_db
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+from depositor_login.views import index_login
+
+# ext.pyのcoverage用
+def test_app_none(base_app_none):
+ assert 1
+
+def test_index_affili(app, db, users, client,mocker,Affiliation_Id_settings,Affiliation_Repository_settings):
+ url = "/admin_setting/"
+ #no login
+ with app.test_request_context(url):
+ res = app.test_client().get(url)
+ assert res.status_code == 302
+ assert res.location == url_for('login.index_login')
+
+
+ #一般ユーザー
+ user = User_manager.get_user_by_id(2)
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args, kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/permission_required.html"
+
+ #get
+
+ #管理者
+
+ user = User_manager.get_user_by_id(0)
+ repository_list = Affiliation_Id_manager.get_affiliation_id_list()
+ aff_repository = {"-1": {"access_token": "default_token", "repository_url": "https://example/repository_url/default"}, "101": {"access_token": "test_token", "repository_url": "https://example/repository_url/test"}}
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args, kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/affi_index.html"
+ assert kwargs["affiliation_id_list"] == repository_list
+ assert kwargs["aff_repository_dict"] == json.dumps(aff_repository)
+ assert kwargs["affiliation_name"] == "default"
+ assert kwargs["repository_url"] == "https://example/repository_url/default"
+ assert kwargs["access_token"] == "default_token"
+
+
+ #図書館員
+
+ user = User_manager.get_user_by_id(5)
+ repository_list = Affiliation_Id_manager.get_affiliation_id_list()
+ aff_repository = {"-1": {"access_token": "default_token", "repository_url": "https://example/repository_url/default"}, "101": {"access_token": "test_token", "repository_url": "https://example/repository_url/test"}}
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args, kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/affi_index.html"
+ assert kwargs["affiliation_id_list"] == repository_list
+ assert kwargs["aff_repository_dict"] == json.dumps(aff_repository)
+ assert kwargs["affiliation_name"] == "affiliation_test3"
+ assert kwargs["repository_url"] == ""
+ assert kwargs["access_token"] == ""
+
+ user = User_manager.get_user_by_id(1)
+ repository_list = Affiliation_Id_manager.get_affiliation_id_list()
+ aff_repository = {"-1": {"access_token": "default_token", "repository_url": "https://example/repository_url/default"}, "101": {"access_token": "test_token", "repository_url": "https://example/repository_url/test"}}
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args, kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/affi_index.html"
+ assert kwargs["affiliation_id_list"] == repository_list
+ assert kwargs["aff_repository_dict"] == json.dumps(aff_repository)
+ assert kwargs["affiliation_name"] == "affiliation_test"
+ assert kwargs["repository_url"] == 'https://example/repository_url/test'
+ assert kwargs["access_token"] == "test_token"
+
+ #Exception
+ user = User_manager.get_user_by_id(0)
+ with app.test_request_context(url):
+ with patch("depositor_admin_setting.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_id",side_effect=Exception("test_error")):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 400
+
+ #post
+
+ #管理者
+ #項目が空
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"-1","repository_url":"","access_token":""}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ #Affiliation_Repository更新
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"-1","repository_url":"https://example/repository_url/default/update","access_token":"update_default_token"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 200
+ setting = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(-1)
+ assert setting.repository_url == "https://example/repository_url/default/update"
+ assert setting.access_token == "update_default_token"
+
+ #図書館員 affiliation_id=1
+ #Affiliation_Repository更新
+ user = User_manager.get_user_by_id(1)
+ data = {"affiliation_name":"affiliation_test","repository_url":"https://example/repository_url/test/update","access_token":"update_test_token"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 200
+ setting = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(101)
+ assert setting.repository_url == "https://example/repository_url/test/update"
+ assert setting.access_token == "update_test_token"
+
+ #管理者
+ #Affiliation_Repository新規登録
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"103","repository_url":"https://example/repository_url/test3","access_token":"test_token3"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 200
+ setting = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(103)
+ assert setting.repository_url == "https://example/repository_url/test3"
+ assert setting.access_token == "test_token3"
+
+ #図書館員 affiliation_id=2
+ #Affiliation_Repository新規登録
+ user = User_manager.get_user_by_id(4)
+ data = {"affiliation_name":"affiliation_test2","repository_url":"https://example/repository_url/test2","access_token":"test_token2"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 200
+ setting = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(102)
+ assert setting.repository_url == "https://example/repository_url/test2"
+ assert setting.access_token == "test_token2"
+
+ #管理者
+ #Affiliation_IDに未登録
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"404","repository_url":"https://example/repository_url/test404","access_token":"test_token404"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ #図書館員
+ #Affiliation_IDに未登録
+ user = User_manager.get_user_by_id(1)
+ data = {"affiliation_name":"affiliation_test404","repository_url":"https://example/repository_url/test404","access_token":"test_token404"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ #Exception
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"-1","repository_url":"https://example/repository_url/default/update","access_token":"update_default_token"}
+ with app.test_request_context(url):
+ with patch("depositor_admin_setting.views.Affiliation_Repository_manager.upt_aff_repository",side_effect=Exception("test_error")):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+
+def test_add_affili(app, db, users, client,mocker,Affiliation_Id_settings,Affiliation_Repository_settings):
+ url = "/admin_setting/add"
+ #no login
+ with app.test_request_context(url):
+ res = app.test_client().get(url)
+ assert res.status_code == 302
+ assert res.location == url_for('login.index_login')
+
+ #get
+ #管理者以外
+ user = User_manager.get_user_by_id(1)
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args,kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/permission_required.html"
+
+ #管理者
+ user = User_manager.get_user_by_id(0)
+ mock_render = mocker.patch("depositor_admin_setting.views.render_template", return_value=make_response())
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().get(url)
+ assert res.status_code == 200
+ args,kwargs = mock_render.call_args
+ assert args[0] == "admin_setting/add_affili.html"
+
+ #post
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"affiliation_test4","affiliation_idp_url":"https://example/idp_url/test4"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 200
+ setting = Affiliation_Id_manager.get_affiliation_id_by_affiliation_name("affiliation_test4")
+ assert setting.affiliation_name == "affiliation_test4"
+ assert setting.affiliation_idp_url == "https://example/idp_url/test4"
+
+ #Affiliation_ID登録済み
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"affiliation_test","affiliation_idp_url":"https://example/idp_url/test5"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"affiliation_test5","affiliation_idp_url":"https://example/idp_url/test"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"affiliation_test","affiliation_idp_url":"https://example/idp_url/test"}
+ with app.test_request_context(url):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
+
+ #Exception
+ user = User_manager.get_user_by_id(0)
+ data = {"affiliation_name":"affiliation_test5","affiliation_idp_url":"https://example/idp_url/test5"}
+ with app.test_request_context(url):
+ with patch("depositor_admin_setting.views.Affiliation_Id_manager.create_affiliation_id",side_effect=Exception("test_error")):
+ login_user(user)
+ res = app.test_client().post(url,json=data)
+ assert res.status_code == 400
\ No newline at end of file
diff --git a/app/modules/depositor_admin_setting/tox.ini b/app/modules/depositor_admin_setting/tox.ini
new file mode 100644
index 0000000..ab61d92
--- /dev/null
+++ b/app/modules/depositor_admin_setting/tox.ini
@@ -0,0 +1,45 @@
+[tox]
+envlist = c1
+
+skip_missing_interpreters = true
+
+[tool:pytest]
+minversion = 3.0
+testpaths = tests
+
+[coverage:run]
+source =
+ depositor_admin
+ tests
+
+[coverage:paths]
+source =
+ depositor_admin
+ tests
+ .tox/*/lib/python*/site-packages/depositor_admin_setting
+ .tox/*/lib/python*/site-packages/depositor_admin_setting/tests
+
+
+[isort]
+profile=black
+
+[tool:isort]
+line_length = 119
+
+[testenv:c1]
+passenv = LANG
+setenv =
+ DEPOSITOR_WEB_HOST=127.0.0.1
+ DEPOSITOR_POSTGRESQL_HOST=postgresql
+ DEPOSITOR_POSTGRESQL_DBNAME=depositer_test
+ DEPOSITOR_POSTGRESQL_DBUSER=depositor
+ DEPOSITOR_POSTGRESQL_DBPASS=dbpass123
+ TMPORARY_FILE_PATH=./tmp/
+ MOCK_PASSWORD=testpass
+deps =
+ pytest>=3
+ pytest-cov
+ -rrequirements.txt
+ setuptools
+commands =
+ pytest --cov=depositor_admin_setting tests -v -s -vv --cov-branch --cov-report=term --cov-report=xml --cov-report=html --cov-config=tox.ini --basetemp="{envtmpdir}" {posargs}
diff --git a/app/modules/depositor_item_register/depositor_item_register/__init__.py b/app/modules/depositor_item_register/depositor_item_register/__init__.py
new file mode 100644
index 0000000..2579417
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/__init__.py
@@ -0,0 +1,3 @@
+
+from .ext import ItemRegisterApp
+__all__ = ('ItemRegisterApp')
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/depositor_item_register/ext.py b/app/modules/depositor_item_register/depositor_item_register/ext.py
new file mode 100644
index 0000000..085afd0
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/ext.py
@@ -0,0 +1,12 @@
+from .views import blueprint
+
+class ItemRegisterApp(object):
+ def __init__(self, app=None):
+ if app:
+ self.init_app(app)
+
+ def init_app(self, app):
+ app.register_blueprint(blueprint)
+ app.extensions['itemregister'] = self
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/depositor_item_register/static/js/app.js b/app/modules/depositor_item_register/depositor_item_register/static/js/app.js
new file mode 100644
index 0000000..82fda65
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/static/js/app.js
@@ -0,0 +1,1413 @@
+import React, { useState, useRef, createContext, useContext, useEffect } from 'react';
+import { createRoot } from 'react-dom/client';
+import Modal from 'react-modal';
+// import { DatePicker } from 'react-datepicker';
+const OVER_100MB_MESSAGE = "ファイルサイズが100MBを超えています。";
+const FETCH_ERROR_MESSAGE = "There was a problem with the fetch operation";
+const NETWORK_ERROR_MESSAGE = "'Network response was not ok'";
+
+const contentFilesContext = createContext([]);
+const setContentFilesContext = createContext(null);
+const thumbnailContext = createContext([]);
+const setThumbnailContext = createContext(null);
+const metadataContext = createContext({});
+const setMetadataContext = createContext(null);
+const changeMetadataContext = createContext(null);
+const editMetadataContext = createContext(null);
+const addFileContext = createContext(null);
+const autoInfoEntryContext = createContext(null);
+const autoInfoEntrySetContext = createContext(null);
+
+const modalIsOpenContext = createContext(false);
+const setModalIsOpenContext = createContext();
+const modalContentContext = createContext();
+const setModalContentContext = createContext();
+const modalHeaderContext = createContext();
+const setModalHeaderContext = createContext();
+
+const FileProvider = ({ children }) => {
+ const [contentFiles, setContentFiles] = useState([]);
+ const [thumbnail, setThumbnail] = useState([]);
+ const [metadata, setMetadata] = useState({})
+ const [isAutoInput, setIsAutoInput] = useState(false)
+ const setModalIsOpen = useModalIsOpenSetValue();
+ const setModalContent = useModalContentSetValue();
+ const setModalHeader = useModalHeaderSetValue();
+
+ /**
+ この関数はkeyが表す位置の辞書metadataの値を変更します。
+ また、keyが表す位置の辞書のキーがない場合、キーを作成します。
+ その後、再レンダリングをおこないます。
+ @param {string} key 追加するkeyです。 例:"dc:title[0].dc:title"
+ @param {string} value keyに対応するvalueです。 例 "タイトル"
+ @return なし
+ */
+ function changeMetadata(key, value) {
+ /*
+ */
+
+ let tmpMetadata = structuredClone(metadata)
+ let keyList = key.split(".")
+ let meta = tmpMetadata
+ for (let i = 0; i < keyList.length; i++) {
+ // リスト最後の場合
+ if (i === keyList.length - 1) {
+ meta[keyList[i]] = value
+ // それ以外
+ } else {
+ let tmpId = keyList[i].split("[")[0]
+ let tmpIdIndex = keyList[i].split("[")[1].replace("]", "")
+ // metadataにキーが存在しない場合
+ if (!meta.hasOwnProperty(tmpId)) {
+ meta[tmpId] = []
+ }
+ // オブジェクトを参照
+ meta = meta[tmpId]
+
+ // tmpIdIndex番目の配列がないなら作る
+ if (meta.length < tmpIdIndex - 1 || meta[tmpIdIndex] === undefined) {
+ meta[tmpIdIndex] = {}
+ }
+ meta = meta[tmpIdIndex]
+ }
+ }
+ setMetadata(tmpMetadata)
+ }
+
+ /**
+ * このメソッドは渡された辞書tmpMetadataにkey,valueを追加、または上書きします。
+ * 参照渡しされた辞書を編集するので返り値はありません。
+ * このメソッドでは再レンダリングを行いません。
+ * メソッド後のtmpMetadata:tmpMetadata = {"dc:title":[{"dc:title":"タイトル"},null,{}]}
+ * @param {dict} tmpMetadata 編集する辞書を想定しています。
+ * @param {string} key 追加するkeyです。 例:"dc:title[0].dc:title"
+ * @param {string} value keyに対応するvalueです。 例 "タイトル"
+ * @return なし
+ */
+ function editMetadata(tmpMetadata, key, value) {
+ let keyList = key.split(".")
+ let meta = tmpMetadata
+ for (let i = 0; i < keyList.length; i++) {
+ // リスト最後の場合
+ if (i === keyList.length - 1) {
+ meta[keyList[i]] = value
+ // それ以外
+ } else {
+ let tmpId = keyList[i].split("[")[0]
+ let tmpIdIndex = keyList[i].split("[")[1].replace("]", "")
+ // metadataにキーが存在しない場合
+ if (!meta.hasOwnProperty(tmpId)) {
+ meta[tmpId] = []
+ }
+ // オブジェクトを参照
+ meta = meta[tmpId]
+
+ // tmpIdIndex番目の配列がないなら作る
+ if (meta.length < tmpIdIndex - 1 || !meta[tmpIdIndex]) {
+ meta[tmpIdIndex] = {}
+ }
+ meta = meta[tmpIdIndex]
+ }
+ }
+ }
+
+ /**
+ * このメソッドは受け取ったFileListオブジェクトをFileオブジェクトに分割し、
+ * contentFilesに入れることを目的にしています。
+ * また、contentFilesに入ったFileオブジェクトから各情報を取り出し、ファイル情報に自動入力します。
+ * @param {FileList} files
+ * @return なし
+ */
+ function addFiles(files) {
+ const fileProperty = schema.file_info
+ const contentFileNames = contentFiles.map(contentfile => contentfile.name)
+ // 一時的なリストをdeepcopyで生成
+ let tmpFiles = contentFiles.map(contentfile => contentfile)
+ let tmpMetadata = structuredClone(metadata)
+ // リストに名前が存在しないなら一時リストにプッシュ
+ Array.from(files).forEach(file => {
+ if (checkFilesizeOver100MB(file)) {
+ setModalIsOpen(true);
+ setModalHeader(OVER_100MB_MESSAGE);
+ setModalContent(
+ ファイル名:{file.name}
+ )
+ } else if (!(contentFileNames.includes(file.name))) {
+ contentFileNames.push(file.name)
+ tmpFiles.push(file)
+ }
+ })
+ // ファイルを埋め込んだ時ファイルの名前、サイズ、mimetypeをtmpMetadataに埋め込む
+ for (let i = 0; i < tmpFiles.length; i++) {
+ let file = tmpFiles[i];
+ const idx = "[" + String(i) + "]"
+ editMetadata(tmpMetadata, fileProperty.file_name.replace("[]", idx), file.name)
+ editMetadata(tmpMetadata, fileProperty.file_url.replace("[]", idx), "data/contentfiles/" + file.name)
+ editMetadata(tmpMetadata, fileProperty.file_label.replace("[]", idx), file.name)
+ editMetadata(tmpMetadata, fileProperty.file_format.replace("[]", idx), file.type)
+ editMetadata(tmpMetadata, fileProperty.file_size.replace("[]", idx), String(Math.round(file.size / 1024)) + " KB")
+ editMetadata(tmpMetadata, fileProperty.file_type.replace("[]", idx), "other")
+ }
+ // 一時的なリストからレンダー
+ setContentFiles(tmpFiles);
+ setMetadata(tmpMetadata);
+ setIsAutoInput(true);
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {children}
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+const useFilesValue = () => useContext(contentFilesContext);
+const useFilesSetValue = () => useContext(setContentFilesContext);
+const useThumbnailValue = () => useContext(thumbnailContext);
+const useThumbnailSetValue = () => useContext(setThumbnailContext);
+const useMetadataValue = () => useContext(metadataContext);
+const useMetadataSetValue = () => useContext(setMetadataContext);
+const useMetadataChangeValue = () => useContext(changeMetadataContext);
+const useMetadataEditValue = () => useContext(editMetadataContext);
+const useAddFileValue = () => useContext(addFileContext);
+const useAutoInfoEntryValue = () => useContext(autoInfoEntryContext);
+const useAutoInfoEntrySetValue = () => useContext(autoInfoEntrySetContext);
+
+const ModalProvider = ({ children }) => {
+ const [modalIsOpen, setModalIsOpen] = useState(false);
+ const [content, setContent] = useState(""); //HTML
+ const [header, setHeader] = useState(""); //文字列
+ return (
+
+
+
+
+
+
+ {children}
+
+
+
+
+
+ )
+}
+
+const useModalIsOpenValue = () => useContext(modalIsOpenContext);
+const useModalIsOpenSetValue = () => useContext(setModalIsOpenContext);
+const useModalHeaderValue = () => useContext(modalHeaderContext);
+const useModalHeaderSetValue = () => useContext(setModalHeaderContext);
+const useModalContentValue = () => useContext(modalContentContext);
+const useModalContentSetValue = () => useContext(setModalContentContext);
+
+function ItemRegisterTabPage({ }) {
+ let count = 0;
+ const inputForms = [];
+ const SYSTEM_PROP = "system_prop"
+ forms.filter((form) => !(SYSTEM_PROP in schema.properties[form.key] && schema.properties[form.key][SYSTEM_PROP] === true))
+ .forEach(form => {
+ inputForms.push(
+
+ )
+ count++;
+ });
+ return (
+
+
+
+
+
+
+ {inputForms}
+
+
+
+
+ )
+}
+
+
+
+function WrappedModal() {
+ const modalIsOpen = useModalIsOpenValue();
+ const setModalIsOpen = useModalIsOpenSetValue();
+ const content = useModalContentValue();
+ const setContent = useModalContentSetValue(); //HTML
+ const header = useModalHeaderValue();
+ const setHeader = useModalHeaderSetValue();
+
+ const customStyles = {
+ content: {
+ top: '50%',
+ left: '50%',
+ right: 'auto',
+ bottom: 'auto',
+ width: 'auto',
+ height: 'auto',
+ marginRight: '-50%',
+ transform: 'translate(-50%, -50%)',
+ backgroundColor: 'rgba(0, 0, 0, 0)',
+ border: '0px'
+ },
+ overlay: {
+ backgroundColor: 'rgba(0, 0, 0, 0.5)' // モーダルの背景色を半透明に設定
+ }
+ };
+
+ return (
+
+
setModalIsOpen(false)}
+ style={customStyles}
+ contentLabel="Example Modal">
+
+
+
+
+ setModalIsOpen(false)}>
+ 閉じる
+
+
+
+
+
+
+ );
+}
+
+function PDFform({ }) {
+ const [pdfFile, setPdfFile] = useState([]);
+ const addFiles = useAddFileValue();
+ const [disabled, setDisabled] = useState(false);
+ const pdfProperty = schema.pdf_info
+ const metadata = useMetadataValue();
+ const setIsAutoInput = useAutoInfoEntrySetValue();
+ const setMetadata = useMetadataSetValue();
+ const setModalIsOpen = useModalIsOpenSetValue();
+ const setModalContent = useModalContentSetValue();
+ const setModalHeader = useModalHeaderSetValue();
+ const editMetadata = useMetadataEditValue();
+
+ /**
+ * このメソッドは引数filesから一番目のPDFファイルをFileオブジェクトとして取り出すことを目的にしています。
+ * 取り出されたFileオブジェクトはpdfFile、contentFilesに追加、上書きされます。
+ * @param {FileList} files
+ */
+ function addFilesForPdf(files) {
+ if (files.length > 0) {
+ const firstFile = files[0];
+ if (checkFilesizeOver100MB(firstFile)) {
+ setModalIsOpen(true);
+ setModalHeader(OVER_100MB_MESSAGE);
+ setModalContent(
+ ファイル名:{firstFile.name}
+ )
+ } else if (firstFile.type === "application/pdf") {
+ addFiles([firstFile])
+ if (pdfFile.length === 0 || pdfFile[0].name !== firstFile.name) {
+ setPdfFile([firstFile])
+ }
+ } else {
+ setModalIsOpen(true);
+ setModalHeader("PDFファイルではありません。");
+ setModalContent(
+ ファイル名:{firstFile.name}
+ )
+ }
+ } else {
+ console.log("ドロップされたファイルはありません");
+ }
+ }
+ /**
+ * このメソッドはpdfFileのFileオブジェクトを削除することを目的にしています。
+ */
+ function deleteFile() {
+ setPdfFile([]);
+ }
+
+ /**
+ * このメソッドはFileオブジェクトをBase64にエンコードすることを目的にしています。
+ * ただ、返り値はPromiseです。
+ * @param {File} file
+ * @returns {Promise}
+ */
+ function encodeFileToBase64(file) {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.onload = function (event) {
+ const base64Data = event.target.result.split(",")[1];
+ resolve({ "name": file.name, "base64": base64Data });
+ };
+ reader.onerror = function (error) {
+ reject(error);
+ };
+ reader.readAsDataURL(file);
+ });
+ }
+
+ /**
+ * このメソッドはFileオブジェクトのリストをまとめてBase64にエンコードすることを目的にしています。
+ * encodeFileToBase64は返り値がPromiseなのでPromise.allをして返り値を返しています。
+ * @param {Array} files
+ * @returns {result}
+ */
+ function encodeFilesToBase64(files) {
+ const promises = files.map(file => {
+ return encodeFileToBase64(file)
+ });
+ return Promise.all(promises);
+ }
+
+ /**
+ * このメソッドはpdfFileにあるPDFをエンコードし、pythonに送ることを目的にしています。
+ * @return
+ */
+ function readPdf() {
+ let files = [];
+ setDisabled(true);
+ encodeFilesToBase64(pdfFile).then(base64files => {
+ files = base64files.map(base64file => base64file)
+ return requestPython(files)
+ }).catch(error => {
+ setModalIsOpen(true);
+ setModalHeader("自動入力に失敗しました。")
+ setModalContent(<>
+
{error.status + " " + error.statusText}
+
{JSON.parse(error.responseText).error}
+ >)
+ setDisabled(false);
+ }).finally(
+ );
+ }
+
+ /**
+ * このメソッドはbase64エンコードされたPDFファイルから抽出した情報を自動入力することを目的にしています。
+ * POSTrequest送信後responseとしてはPDFファイルから抽出した情報が返ってきます。
+ * {"title":"タイトル", "author":[], "date":{"object":"", "value":""}}などが考えられます。
+ * @param {Array} files
+ * @returns
+ */
+ function requestPython(files) {
+ const dataForRequest = { "contentfiles": files }
+
+ return $.ajax({
+ url: "/item_register/pdf_reader",
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ data: JSON.stringify(dataForRequest),
+ success: function (response) {
+
+ let tmpMetadata = structuredClone(metadata)
+ let fileInfo = structuredClone(tmpMetadata[schema.file_info.property_name])
+ let PDFresult = []
+
+ // pdf自動入力される可能性があるmetadataを初期化
+ Object.keys(pdfProperty.properties).forEach((key) => {
+ delete tmpMetadata[pdfProperty.properties[key]]
+ })
+ tmpMetadata[schema.file_info.property_name] = fileInfo
+
+ // title
+ if (response.title !== null && response.title !== undefined) {
+ editMetadata(tmpMetadata, pdfProperty.title.title.replace("[]", "[0]"), response.title)
+ PDFresult.push(
{"・" +
+ document.getElementById(pdfProperty.properties.title).querySelector('a.panel-toggle').textContent + ":" + response.title} )
+ }
+
+ // author
+ if (Array.isArray(response.author) && response.author.length !== 0) {
+ let authorList = []
+ response.author.forEach((val, index) => {
+ Object.entries(val).forEach(([k, v]) => {
+ editMetadata(tmpMetadata, pdfProperty.author[k].replace("[]", "[" + String(index) + "]"), v)
+ })
+ authorList.push(val.creatorName)
+ })
+ PDFresult.push(
{"・" +
+ document.getElementById(pdfProperty.properties.author).querySelector('a.panel-toggle').textContent + ":" + authorList.join(", ")} )
+ }
+
+ // date
+ if (typeof response.date === "object" && Object.keys(response.date).length !== 0 && response.date.value !== null) {
+ editMetadata(tmpMetadata, pdfProperty.date.type.replace("[]", "[0]"), response.date.type)
+ editMetadata(tmpMetadata, pdfProperty.date.value.replace("[]", "[0]"), response.date.value)
+ PDFresult.push(
{"・" +
+ document.getElementById(pdfProperty.properties.date).querySelector('a.panel-toggle').textContent + ":" + response.date.value} )
+ }
+
+
+ // publisher
+ if (response.publisher !== null && response.publisher !== undefined) {
+ editMetadata(tmpMetadata, pdfProperty.publisher.publisher.replace("[]", "[0]"), response.publisher)
+ PDFresult.push(
{"・" +
+ document.getElementById(pdfProperty.properties.publisher).querySelector('a.panel-toggle').textContent + ":" + response.publisher} )
+ }
+
+ // lang
+ if (response.lang !== null && response.lang !== undefined) {
+ // 出力される文字コード(ISO-639-1)が違うためjpcoarのスキーマと違うためできない。ISO-639-3である必要がある。
+ // editMetadata(tmpMetadata, pdfProperty.lang.lang.replace("[]", "[0]"), response.lang)
+ pdfProperty.lang.subproperties.forEach((k) => {
+ if (tmpMetadata[k.split(".")[0].replace("[]", "")] !== undefined) {
+
+ for (let i = 0; i < tmpMetadata[k.split(".")[0].replace("[]", "")].length; i++) {
+ editMetadata(tmpMetadata, k.replace("[]", "[" + i + "]"), response.lang)
+ }
+ }
+ })
+ PDFresult.push(
{"・" +
+ document.getElementById(pdfProperty.properties.lang).querySelector('a.panel-toggle').textContent + ":" + response.lang} )
+ }
+
+ setMetadata(tmpMetadata)
+ setIsAutoInput(true)
+ setModalIsOpen(true);
+ setModalHeader("自動入力完了");
+ setModalContent(<>
+ {PDFresult}
+ >)
+ setDisabled(false);
+ },
+ error: function (status) {
+ setDisabled(false);
+ }
+ })
+ }
+
+ return (
+
+
+
pdf自動入力フォーム
+
+
登録可能なファイルは「pdf」のみ
+
+
+
+ PDFからメタデータの自動入力
+
+
+ {(pdfFile.length !== 0) &&
}
+
+
+
+ )
+}
+
+function SubmitButton() {
+ const contentFiles = useFilesValue();
+ const thumbnail = useThumbnailValue();
+ const [disabled, setDisabled] = useState(false);
+
+ const setModalIsOpen = useModalIsOpenSetValue();
+ const setModalContent = useModalContentSetValue();
+ const setModalHeader = useModalHeaderSetValue();
+
+ /**
+ * このメソッドはFileオブジェクトをBase64にエンコードすることを目的にしています。
+ * ただ、返り値はPromiseです。
+ * @param {File} file
+ * @returns {Promise}
+ */
+ function encodeFileToBase64(file) {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.onload = function (event) {
+ const base64Data = event.target.result.split(",")[1];
+ resolve({ "name": file.name, "base64": base64Data });
+ };
+ reader.onerror = function (error) {
+ reject(error);
+ };
+ reader.readAsDataURL(file);
+ });
+ }
+
+ /**
+ * このメソッドはFileオブジェクトのリストをまとめてBase64にエンコードすることを目的にしています。
+ * encodeFileToBase64は返り値がPromiseなのでPromise.allをして返り値を返しています。
+ * @param {Array} files
+ * @returns {result}
+ */
+ function encodeFilesToBase64(files) {
+ const promises = files.map(file => {
+ return encodeFileToBase64(file)
+ });
+ return Promise.all(promises);
+ }
+
+ /**
+ * 入力されたmetadata、files、thumbをpythonに送ることを目的にしています。
+ * POSTrequest送信後ステータスコード200の場合responseとしては登録したリポジトリのURLが返ってきます。
+ * @param {dict} metadata 画面に入力された情報を辞書型で成形したものです。
+ * @param {Array} files contentFilesに入っていたFileオブジェクトをlistにいれたものです。
+ * @param {Array} thumb thumbnailに入っていたFileオブジェクトをlistにいれたものです。
+ * @returns
+ */
+ function requestPython(metadata, files, thumb) {
+ const dataForRequest = { "item_metadata": metadata, "contentfiles": files, "thumbnail": thumb }
+ return $.ajax({
+ url: "/item_register/register",
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ data: JSON.stringify(dataForRequest),
+ success: function (response) {
+ setModalIsOpen(true);
+ setModalHeader("登録成功");
+ setModalContent(<>
+ 登録先URL:
{response.links[0]["@id"]}
+ >)
+ setDisabled(false);
+ },
+ error: function (status) {
+ console.log(status)
+ setDisabled(false);
+ }
+ })
+ }
+
+ /**
+ * このメソッドは入力された情報をreadMetadataメソッドであつめ、pythonに送ることを目的にしています。
+ * なお、必須事項のチェックがcheckRequiredで入ります。
+ * @returns
+ */
+ function itemRegister() {
+ const requiredButNoValue = checkRequired(schema.required)
+ if (requiredButNoValue.length !== 0) {
+ setModalIsOpen(true)
+ setModalHeader("必須項目が入力されていません。")
+ setModalContent(<>
+ {requiredButNoValue.map((e) => (
+
{"・" + document.getElementById(e).querySelector('a.panel-toggle').textContent}
+ ))}>
+ )
+ return 0
+ }
+ setDisabled(true);
+ let metadata = readMetadata();
+ let files = [];
+ let thumb = null;
+ encodeFilesToBase64(contentFiles).then(base64files => {
+ files = base64files.map(base64file => base64file) // 全てのファイルのBase64データの配列が表示される
+ return encodeFilesToBase64(thumbnail)
+ }).then(thumbnail => {
+ thumb = thumbnail.map(base64thumbnail => base64thumbnail)
+ return requestPython(metadata, files, thumb)
+ }).catch(error => {
+ console.error(error);
+ setModalIsOpen(true);
+ setModalHeader(error.status + " " + error.statusText);
+ setModalContent(
{error.responseText} )
+ setDisabled(false);
+ });
+
+
+ }
+ return (
+
)
+}
+
+function FileUploadForm({ addArray, deleteArray }) {
+ const contentFiles = useFilesValue();
+ const setContentFiles = useFilesSetValue();
+ const metadata = useMetadataValue();
+ const setMetadata = useMetadataSetValue();
+ const addFiles = useAddFileValue();
+ const setIsAutoInput = useAutoInfoEntrySetValue();
+
+
+ function deleteFile(filename, index) {
+ const fileProperty = schema.file_info
+ let tmpFiles = contentFiles.map(contentfile => contentfile).filter(file => file.name !== filename)
+ let tmpMetadata = structuredClone(metadata)
+ tmpMetadata[fileProperty.property_name].splice(index, 1)
+ deleteArray()
+ // 一時的なリストからレンダー
+ setIsAutoInput(true)
+ setContentFiles(tmpFiles);
+ setMetadata(tmpMetadata)
+ }
+
+ return (
+
+
+
+ {(contentFiles.length !== 0) &&
}
+
+
+
+ )
+}
+
+//jpcoar2.0では使わない
+/*
+function ThumbnailUploadForm() {
+ const thumbnail = useThumbnailValue();
+ const setThumbnail = useThumbnailSetValue();
+ const files = useFilesValue();
+ function addFiles(files) {
+ if (files.length > 0) {
+ const firstFile = files[0];
+ if (checkFilesizeOver100MB(firstFile)) {
+ console.log(OVER_100MB_MESSAGE)
+ setModalIsOpen(true);
+ setModalHeader(OVER_100MB_MESSAGE);
+ setModalContent(
+ ファイル名:{firstFile.name}
+ )
+ } else if (!(firstFile.type.startsWith('image/'))) {
+ console.log("画像ファイルではありません。")
+ setModalIsOpen(true);
+ setModalHeader("画像ファイルではありません。");
+ setModalContent(
+ ファイル名:{firstFile.name}
+ )
+ } else {
+ setThumbnail([firstFile]);
+ }
+ } else {
+ console.log("ドロップされたファイルはありません");
+ }
+ }
+ function deleteFile(filename) {
+ setThumbnail([]);
+ }
+
+ return (
+
+
+
+
登録可能なファイルは「gif, jpg, jpe, jpeg, png, bmp」
+ {(thumbnail.length !== 0) &&
}
+
+
+
+ )
+}
+*/
+
+function FileNameform({ parentId, order, value, item }) {
+ return (
+
+ )
+}
+
+function Datalist({ contentFiles, deleteFile }) {
+ return (
+
+ )
+}
+
+function DropFileArea({ addFiles }) {
+
+ function dragOverHandler(event) {
+ event.preventDefault()
+ }
+
+ function dropFile(event) {
+ event.preventDefault();
+ let isFiles = true;
+ if (event.dataTransfer.files) {
+ [...event.dataTransfer.items].forEach((item) => {
+ // ドロップしたものがファイルでない場合は拒否する
+ if (item.kind !== "file") {
+ isFiles = false;
+ }
+ })
+ } else {
+ console.log("no files");
+ isFiles = false;
+ }
+ if (isFiles === true) {
+ addFiles(event.dataTransfer.files)
+ }
+ }
+
+ return (
+
{ dragOverHandler(e) }} onDrop={(e) => { dropFile(e) }}>
+
+ Drop files or folders here
+
+ )
+}
+
+function AddFileButton({ addFiles, acceptFileType, addArray }) {
+ const self = useRef();
+ function fileAddAction() {
+ self.current.click();
+ }
+ return (
+
+
+ Click to select
+
+ { addFiles(e.target.files, addArray); e.target.value = ""; }} />
+
+ )
+}
+
+function Panelform({ parentId, form }) {
+ let formLastKey = form.key.split(".")[form.key.split(".").length - 1]
+ let childId = parentId !== undefined ? parentId + "." + formLastKey : formLastKey
+ let isRequired = false
+ // ネスト1段目のidがrequiredに含まれるならパネルを畳まない
+ if (schema !== undefined && schema.required.includes(childId)) {
+ isRequired = true
+ }
+ const [count, setCount] = useState(1);
+ const [inputlists, setInputlists] = useState([
]);
+ const [toggle, setToggle] = useState(isRequired ? "" : " hidden");
+ const files = useFilesValue()
+ const metadata = useMetadataValue();
+ const setMetadata = useMetadataSetValue();
+ const isAutoInput = useAutoInfoEntryValue();
+ const setIsAutoInput = useAutoInfoEntrySetValue();
+ let isArray = false;
+ useEffect(() => {
+ if (form.type === "contentfile") {
+ let defaultInputlists = []
+ for (let i = 0; i < files.length; i++) {
+ defaultInputlists.push(
)
+ }
+ setInputlists(defaultInputlists)
+ setCount(files.length)
+ }
+ }, [])
+ useEffect(() => {
+ if (isAutoInput === true) {
+ deleteArray()
+ setIsAutoInput(false)
+ } else {
+ let tmpMetadata = structuredClone(metadata)
+ let keyList = childId.split(".")
+ let tmpMeta = tmpMetadata
+ try {
+ for (let i = 0; i < keyList.length; i++) {
+ // リスト最後の場合
+ if (i === keyList.length - 1) {
+ tmpMeta = tmpMeta[keyList[i]]
+ } else {
+ let [tmpId, tmpIdIndex] = keyList[i].split("[")
+ tmpIdIndex = tmpIdIndex.replace("]", "")
+ tmpMeta = tmpMeta[tmpId][tmpIdIndex]
+ }
+ }
+
+ let defaultInputlists = []
+ for (let i = 0; i < tmpMeta.length; i++) {
+ if (tmpMeta[i] !== undefined) {
+ defaultInputlists.push(
)
+ }
+ }
+ setToggle("")
+ setInputlists(defaultInputlists)
+ setCount(tmpMeta.length)
+
+
+ } catch (error) {
+ setCount(1)
+ setInputlists([
])
+ } finally {
+ }
+ }
+
+ }, [isAutoInput])
+
+ if (form.add === "New") {
+ isArray = true;
+ }
+
+
+ function addArray() {
+ setInputlists(prevComponents => [...prevComponents,
+ (
+ )]);
+ setCount(count + 1);
+ }
+
+ function reducearray(key) {
+ let tmpMetadata = structuredClone(metadata)
+ let keyList = childId.split(".")
+ let tmpMeta = tmpMetadata
+ try {
+ for (let i = 0; i < keyList.length; i++) {
+ // リスト最後の場合
+ if (i === keyList.length - 1) {
+ tmpMeta = tmpMeta[keyList[i]]
+ } else {
+ let [tmpId, tmpIdIndex] = keyList[i].split("[")
+ tmpIdIndex = tmpIdIndex.replace("]", "")
+ tmpMeta = tmpMeta[tmpId][tmpIdIndex] //outbounds,undefinedのエラーが起きる場合、削除対象の値がありません。
+ }
+ }
+ delete tmpMeta[key.split("[")[key.split("[").length - 1].replace("]", "")]
+ setMetadata(tmpMetadata)
+ } catch (error) {
+ //pass ここに入る場合、削除する値がありません。
+ } finally {
+ setInputlists(prevItems => prevItems.filter(inputlist => inputlist.key !== key))
+ }
+ }
+
+ function deleteArray() {
+ setCount(0)
+ setInputlists([])
+
+ }
+
+ function togglePanel() {
+ // toggleの値をclassに入れるので空白を入れています。
+ if (toggle === " hidden") {
+ setToggle("")
+ } else {
+ setToggle(" hidden")
+ }
+ }
+
+ return (
+
+
+
+
+
+
+ {(form.type === "contentfile") &&
}
+ {(form.type === "thumbnail") &&
}
+ {inputlists.map((inputlist, index) => (
+
+ {isArray &&
+ (
+ reducearray(inputlist.key)}>
+ ×
+
+
)}
+ {inputlist}
+
+ ))}
+
+ {isArray &&
+ (
addArray()} type="button" className={"btn btn-success pull-right"}>
+
+ New
+ )}
+
+
+
+
+ )
+}
+
+function Inputlist({ form, count, childId }) {
+ const inputField = [];
+ let childIdWithIndex = childId + "[" + count + "]"
+ if (!("items" in form)) {
+ inputField.push(
);
+ } else {
+ form.items.forEach(item => {
+ if ("type" in item) {
+ if (item.type === "text") {
+ inputField.push(
+
+ );
+ } else if (item.type === "textarea") {
+ inputField.push(
+
+ );
+ } else if (item.type === "select") {
+ inputField.push(
+
+ );
+ } else if (item.type === "radios") {
+ inputField.push(
+
+ );
+ } else if (item.type === "fieldset") {
+ inputField.push(
);
+ } else if (item.type === "contentfile" || item.type === "thumbnail") {
+ inputField.push(
);
+ } else if (item.type === "template") {
+ if ("templateUrl" in item) {
+ let template = item.templateUrl.split('/').pop()
+ if (template === "datepicker.html" || template === "datepicker_multi_format.html") {
+ inputField.push(
);
+ } else if (template === "datalist.html") {
+ inputField.push(
);
+ } else if (template === "checkboxes.html") {
+ inputField.push(
)
+ }
+ } else if ("template" in item) {
+ inputField.push(
);
+ }
+ } else {
+ inputField.push(
);
+ }
+
+ } else {
+ inputField.push(
);
+ }
+ })
+ };
+ return (
+
+ {inputField}
+
+ );
+}
+
+function Metadatatitle({ item }) {
+ let required = false;
+ let title = ("title_i18n" in item) && ("ja" in item.title_i18n) ? item.title_i18n.ja : item.title
+ let classValue;
+ if (schema.required.includes(item.key.split(".")[0].replace("[]", ""))) {
+ required = true;
+ }
+ if (required) {
+ classValue = "col-sm-3 control-label field-required";
+ } else {
+ classValue = "col-sm-3 control-label";
+ }
+ return (
+
+ {title}
+
+ )
+}
+
+function Textform({ item, parentId }) {
+ const metadata = useMetadataValue();
+ const changeMetadata = useMetadataChangeValue();
+ const formId = parentId + "." + item.key.split(".")[item.key.split(".").length - 1]
+ let readOnly = false;
+
+ if ("readonly" in item && item.readonly === true) {
+ readOnly = true;
+ }
+ return (
+
+
+
+ changeMetadata(formId, e.target.value)}
+ >
+
+
+ );
+}
+
+
+function Selectform({ parentId, map, item }) {
+ const metadata = useMetadataValue();
+ const editMetadata = useMetadataEditValue();
+ const setMetadata = useMetadataSetValue();
+ const titleMap = [];
+ const formId = parentId + "." + item.key.split(".")[item.key.split(".").length - 1]
+ function selectOnChange(formId, value) {
+ // change select value
+ let tmpMetadata = structuredClone(metadata)
+ editMetadata(tmpMetadata, formId, value)
+ // use onChange
+ if (item.hasOwnProperty("onChange")) {
+ const onChange = item.onChange
+ editMetadata(tmpMetadata, parentId + "." + onChange.changekey, onChange.keyvalue[value])
+ }
+ setMetadata(tmpMetadata)
+ }
+ map.forEach(element => {
+ titleMap.push(
+
+ );
+ })
+ return (
+
+
+
+ selectOnChange(formId, e.target.value)}>
+
+ {titleMap}
+
+
+
+
+ )
+}
+
+
+function Datepickerform({ parentId, item }) {
+ const changeMetadata = useMetadataChangeValue();
+ const metadata = useMetadataValue();
+ const formId = parentId + "." + item.key.split(".")[item.key.split(".").length - 1]
+ return (
+
+
+
+
+ changeMetadata(formId, e.target.value)}
+ >
+
+
+ )
+}
+
+function Textareaform({ parentId, item }) {
+ const changeMetadata = useMetadataChangeValue();
+ const metadata = useMetadataValue();
+ const formId = parentId + "." + item.key.split(".")[item.key.split(".").length - 1]
+ return (
+
+ );
+}
+
+
+
+// 未完成jpcoar2.0では使わない
+function Radioform({ parentId, map, order, value, item }) {
+ const titleMap = [];
+ map.forEach(element => {
+ titleMap.push(
+
+
+
+ {element.name_i18n.ja}
+
+
+ );
+ })
+
+ return (
+
+ )
+}
+
+
+
+
+// 未完成jpcoar2.0では使わない
+function Checkboxesform({ parentId, order, value, item }) {
+ const titleMap = [];
+ map = item.titleMap
+ map.forEach(element => {
+ titleMap.push(
+
+
+ {element.name}
+
+ );
+ })
+ return (
+
+ )
+}
+
+/**
+ * このメソッドは引数metadataから引数keyの値を取り出すことを目的にしています。
+ * @param {string} key
+ * @param {dict} metadata
+ * @returns
+ */
+function getMetadata(key, metadata) {
+ let keyList = key.split(".")
+ let tmpMeta = metadata
+ try {
+ for (let i = 0; i < keyList.length; i++) {
+ // リスト最後の場合
+ if (i === keyList.length - 1) {
+ return tmpMeta[keyList[i]]
+ } else {
+ let [tmpId, tmpIdIndex] = keyList[i].split("[")
+ tmpIdIndex = tmpIdIndex.replace("]", "")
+ tmpMeta = tmpMeta[tmpId][tmpIdIndex]
+ }
+ }
+ } catch (error) {
+ return undefined
+ }
+ return tmpMeta
+}
+
+/**
+ * 引数のHTMLごとに辞書を作成していくことを目的にしているメソッドです。
+ * @param {HTMLElement} panel
+ * @param {dict} property
+ * @param {int} nest
+ */
+function readPanel(panel, property, nest) {
+ panel.querySelectorAll('.schema-form-fieldset').forEach(function (element) {
+ if (element.id.split(".").length === nest) {
+ property[element.name] = []
+ let propers = property[element.name]
+ element.querySelectorAll('li.list-group-item.ui-sortable').forEach(function (elem) {
+ if (elem.id.split(".").length === nest) {
+ let proper = {}
+ elem.querySelectorAll('.input-form.form-control').forEach(function (e) {
+ if (e.id.split('.').length <= nest + 1) {
+ if (e.value !== "")
+ proper[e.name] = e.value;
+ }
+ })
+ if (elem.querySelector('li.list-group-item.ui-sortable') != null) {
+ readPanel(elem, proper, nest + 1)
+ }
+ if (Object.keys(proper).length) {
+ propers.push(proper)
+ }
+ }
+ })
+ // 入力がない項目のキーを削除
+ if (!(propers.length)) {
+ delete property[element.name];
+ }
+ }
+ })
+}
+
+/**
+ * このメソッドは画面に入力された情報を取り出し、想定されている形の辞書型に成形することを目的にしています。
+ * @returns {dict}
+ */
+function readMetadata() {
+ let itemMetadata = {}
+ // 項目ごとにHTMLを取得
+ document.querySelectorAll('.form_metadata_property').forEach(function (element) {
+
+ //項目の大枠を取得
+ let metadataProperty = element.querySelector('.schema-form-fieldset');
+
+ // itemMetadataに項目のキーを追加し、操作できるようにする。
+ itemMetadata[metadataProperty.name] = []
+
+ let properties = itemMetadata[metadataProperty.name]
+
+ metadataProperty.querySelectorAll('li.list-group-item.ui-sortable').forEach(function (elemen) {
+ if (elemen.id.split(".").length === 1) {
+ let property = {}
+ elemen.querySelectorAll('.input-form.form-control').forEach(function (e) {
+ if (e.id.split('.').length <= 2) {
+ if (e.value != "") {
+ property[e.name] = e.value;
+ }
+ }
+ })
+
+ readPanel(elemen, property, 2)
+ if (Object.keys(property).length) {
+ properties.push(property)
+ }
+ }
+ })
+ // 入力がない項目のキーを削除
+ if (!(properties.length)) {
+ delete itemMetadata[metadataProperty.name];
+ }
+ })
+
+ return itemMetadata
+}
+
+/**
+ * このメソッドは引数required_listに入っている項目の値が入力されているかどうかを確認することを目的にしています。
+ * 入力されていなかった場合、その項目の入力欄を赤くハイライトさせます。
+ * また、その項目を返り値のarrayにいれます。
+ * @param {Array} required_list
+ * @returns {Array}
+ */
+function checkRequired(required_list) {
+ let requiredButNoValueList = new Set();
+ required_list.forEach(function (element) {
+ const required_panel = document.getElementById(element);
+ required_panel.querySelectorAll('.input-form.form-control').forEach(function (ele) {
+ if (ele.value === undefined || ele.value === "") {
+ ele.style.border = '1px solid #a94442';// 赤
+ requiredButNoValueList.add(element);
+ } else {
+ ele.style.border = '';
+ }
+ })
+ })
+ return Array.from(requiredButNoValueList);
+}
+
+/**
+ * このメソッドは引数Fileオブジェクトが100MBを超えているかどうかを確認することを目的にしています。
+ * 超えていた場合Trueを超えていない場合Falseを返します。
+ * @param {File} file
+ * @returns
+ */
+function checkFilesizeOver100MB(file) {
+ /// ファイルサイズ取得
+ const fileSize = file.size;
+ /// MB単位のファイルサイズ計算
+ const fileMib = fileSize / 1024 ** 2;
+ return !(fileMib < 100)
+}
+
+const root = createRoot(document.getElementById('input_form_container'));
+Modal.setAppElement(document.getElementById('input_form_container'));
+let forms = null;
+let schema = null;
+const urls = ['/static/json/form.json', '/static/json/jsonschema.json']
+
+const promises = urls.map(url =>
+ fetch(url)
+ .then(response => {
+ if (!response.ok) {
+ throw new Error(NETWORK_ERROR_MESSAGE);
+ }
+ return response.json();
+ })
+ .catch(error => {
+ console.error(FETCH_ERROR_MESSAGE + ':', error);
+ alert(FETCH_ERROR_MESSAGE)
+ })
+);
+
+Promise.all(promises)
+ .then(response => {
+ forms = response[0]
+ schema = response[1]
+ root.render(
);
+ })
+ .catch(error => {
+ console.error(FETCH_ERROR_MESSAGE + ':', error);
+ alert(FETCH_ERROR_MESSAGE)
+ });
+
+
diff --git a/app/modules/depositor_item_register/depositor_item_register/templates/item_register/_macros.html b/app/modules/depositor_item_register/depositor_item_register/templates/item_register/_macros.html
new file mode 100644
index 0000000..ad059ee
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/templates/item_register/_macros.html
@@ -0,0 +1,9 @@
+{% macro tabs_selector(tab_value='top') %}
+{%- if current_user.role == "管理者" %}
+
{{ ('登録先追加') }}
+{%- endif %}
+{%- if current_user.role == "管理者" or current_user.role == "図書館員" %}
+
{{ ('登録先設定') }}
+{%- endif %}
+
{{ ('アイテム登録') }}
+{% endmacro %}
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/depositor_item_register/templates/item_register/item_index.html b/app/modules/depositor_item_register/depositor_item_register/templates/item_register/item_index.html
new file mode 100644
index 0000000..4e262b8
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/templates/item_register/item_index.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+ {{ form.csrf_token }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% include "header.html" %}
+
+
+
+
+
+
+
+
+
+ {%- block page_body_tabs %}
+ {% from "item_register/_macros.html" import tabs_selector with context %}
+ {{ tabs_selector('item_index') }}
+ {%- endblock page_body_tabs %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/depositor_item_register/utils.py b/app/modules/depositor_item_register/depositor_item_register/utils.py
new file mode 100644
index 0000000..bb5922a
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/utils.py
@@ -0,0 +1,124 @@
+# -*- coding: utf-8 -*-
+
+import json
+import xml.etree.ElementTree as ET
+
+# 現在jpcoar2.0のみ
+metadata_list ={
+ "jpcoar2.0":[
+ "dc:title",
+ "dcterms:alternative",
+ "jpcoar:creator",
+ "jpcoar:contributor",
+ "dcterms:accessRights",
+ "dc:rights",
+ "jpcoar:rightsHolder",
+ "jpcoar:subject",
+ "datacite:description",
+ "dc:publisher",
+ "jpcoar:publisher",
+ "datacite:date",
+ "dcterms:date",
+ "dc:language",
+ "dc:type",
+ "datacite:version",
+ "oaire:version",
+ "jpcoar:identifier",
+ "jpcoar:identifierRegistration",
+ "jpcoar:relation",
+ "dcterms:temporal",
+ "datacite:geoLocation",
+ "jpcoar:fundingReference",
+ "jpcoar:sourceIdentifier",
+ "jpcoar:sourceTitle",
+ "jpcoar:volume",
+ "jpcoar:issue",
+ "jpcoar:numPages",
+ "jpcoar:pageStart",
+ "jpcoar:pageEnd",
+ "dcndl:dissertationNumber",
+ "dcndl:degreeName",
+ "dcndl:dateGranted",
+ "jpcoar:degreeGrantor",
+ "jpcoar:conference",
+ "dcndl:edition",
+ "dcndl:volumeTitle",
+ "dcndl:originalLanguage",
+ "dcterms:extent",
+ "jpcoar:format",
+ "jpcoar:holdingAgent",
+ "jpcoar:datasetSeries",
+ "jpcoar:file",
+ "jpcoar:catalog"]
+}
+
+# xml用namespace
+namespace_list={"jpcoar2.0":{
+ "xmlns:jpcoar":"https://github.com/JPCOAR/schema/blob/master/2.0/",
+ "xmlns:dc":"http://purl.org/dc/elements/1.1/",
+ "xmlns:dcterms":"http://purl.org/dc/terms/",
+ "xmlns:datacite":"https://schema.datacite.org/meta/kernel-4/",
+ "xmlns:oaire":"http://namespace.openaire.eu/schema/oaire/",
+ "xmlns:dcndl":"http://ndl.go.jp/dcndl/terms/",
+ "xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+ "xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance",
+ "xsi:schemaLocation":"https://github.com/JPCOAR/schema/blob/master/2.0/ jpcoar_scm.xsd"
+}}
+
+# xml用タグ判別用
+tag_list = {"jpcoar2.0":[
+ "jpcoar",
+ "datacite",
+ "dc",
+ "dcterms"
+ ]
+}
+
+
+# xml用roottag設定用
+root_tag={"jpcoar2.0":"jpcoar:jpcoar"}
+
+def dicttoxmlforsword(kindofproperty, item_metadata):
+ def listtoxml(property_key, property_value, root):
+ for proper in property_value:
+ child = ET.SubElement(root, property_key)
+ for proper_key, proper_value in proper.items():
+ # strならxmlに値を入力する。
+ if isinstance(proper_value, str):
+ # リストに対応するキーとキーが一致するならそれは値
+ if proper_key==property_key:
+ child.text = proper_value
+ # キーとキーが一致しないが、taglistと合致するならこれも値
+ elif proper_key.split(":")[0] in tag_list.get(kindofproperty,"") :
+ grandchild = ET.SubElement(child, proper_key)
+ grandchild.text = proper_value
+ # リストに対応するキーでないならそれは属性
+ else:
+ child.set(proper_key, proper_value)
+ # listならxmlを入れ子にする。
+ elif isinstance(proper_value, list):
+ listtoxml(proper_key, proper_value, child)
+
+ # rootのタグ名とnamespaceを設定
+ root = ET.Element(root_tag.get(kindofproperty,""))
+ for key,value in namespace_list.get(kindofproperty,{}).items():
+ root.set(key, value)
+
+ json_data = item_metadata
+
+ # kindofpropertyに対応するメタデータの項目を持ってくる。
+ for title in metadata_list.get(kindofproperty, []):
+ properties = json_data.get(title, None)
+ if not(properties):
+ continue
+ listtoxml(title, properties, root)
+
+ # XMLデータを保存
+ # tree = ET.ElementTree(root)
+ # # item_register/tmp下にxmlファイルを書きだす
+ # tree.write('modules/item_register/tmp/data.xml', encoding="utf-8", xml_declaration=True)
+ xml_string = ET.tostring(root, encoding="utf-8", method="xml")
+
+ return xml_string
+
+
diff --git a/app/modules/depositor_item_register/depositor_item_register/views.py b/app/modules/depositor_item_register/depositor_item_register/views.py
new file mode 100644
index 0000000..88aa5a1
--- /dev/null
+++ b/app/modules/depositor_item_register/depositor_item_register/views.py
@@ -0,0 +1,227 @@
+import base64
+import zipfile
+import io
+import os
+import shutil
+import time
+import uuid
+import requests
+import xml.etree.ElementTree as ET
+from flask import Flask, render_template, redirect, url_for, request, flash, session ,current_app, jsonify, Blueprint
+from flask_login import login_user, current_user, logout_user
+from flask_wtf import FlaskForm
+from grobid_client.grobid_client import GrobidClient, ServerUnavailableException
+from depositor_models.affiliation_repository import Affiliation_Repository_manager
+from .utils import dicttoxmlforsword # zip_folder
+
+blueprint = Blueprint(
+ "item_register",
+ __name__,
+ url_prefix="/item_register",
+ template_folder="templates",
+ static_folder="static")
+
+@blueprint.route("/", methods=['GET'])
+def index_item():
+ if current_user.is_anonymous:
+ return redirect(url_for('login.index_login'))
+ form = FlaskForm(request.form)
+ return render_template("item_register/item_index.html", form = form)
+
+
+@blueprint.route("/register", methods=['POST'])
+def register():
+ # まだ、リクエストする方ができていないのでモック
+ # 想定としては入力されたアイテムのメタデータ項目がrequestで投げられる。
+
+ """
+ post_dataの例:
+ {"item_metadata;{}, "contentfiles": [{"name":"file.png", "base64":"aaaaa"}, "thumbneil":[{"name":"thumb.png", "base64":"bbbb"}] ]}
+ """
+ if current_user.is_anonymous:
+ return redirect(url_for('login.index_login'))
+ tmp_file_path = os.environ.get("TMPORARY_FILE_PATH")
+
+ post_data = request.get_json()
+
+ tmp_zip_name = str(uuid.uuid4())+".zip"
+
+ # app/tmpディレクトリがないなら生成
+ if not(os.path.exists(tmp_file_path)):
+ os.mkdir(tmp_file_path)
+ with zipfile.ZipFile(tmp_file_path+tmp_zip_name, mode="w") as zipf:
+ # xml書き出し
+ xml_string = dicttoxmlforsword("jpcoar2.0", post_data.get("item_metadata"))
+ zipf.writestr("data/metadata.xml", xml_string)
+
+ # コンテンツファイル書き込み
+ for file in post_data.get("contentfiles"):
+ binary_data = base64.b64decode(file.get("base64", ""))
+ zipf.writestr("data/contentfiles/"+file.get("name",""), binary_data)
+
+ # サムネイル書き込み
+ for file in post_data.get("thumbnail"):
+ binary_data = base64.b64decode(file.get("base64", ""))
+ zipf.writestr("data/thumbnail/"+file.get("name",""), binary_data)
+
+ # current_userよりaffiliation_idをとってaffiliaiton_repositoryテーブルからリポジトリURLをとる処理
+ current_affiliation_id = current_user.affiliation_id
+ aff_repository = Affiliation_Repository_manager.get_aff_repository_by_affiliation_id(current_affiliation_id)
+ # 設定されている場合
+ if aff_repository and not(aff_repository.repository_url=="" or aff_repository.access_token==""):
+ repository_url=aff_repository.repository_url
+ access_token=aff_repository.access_token
+ else:
+ aff_repository = Affiliation_Repository_manager.get_aff_repository_by_affiliation_name("default")
+ repository_url=aff_repository.repository_url
+ access_token=aff_repository.access_token
+
+ sword_api_url = repository_url+"/sword/service-document"
+
+ # 送信するデータ(辞書形式)
+ data = {
+ 'file': '@'+tmp_zip_name+";type=application/zip"
+ }
+
+ # ヘッダーを定義
+ headers = {
+ 'Authorization': 'Bearer '+access_token,
+ 'Content-Disposition': 'attachment; filename='+tmp_zip_name,
+ "Packaging":"http://purl.org/net/sword/3.0/package/SimpleZip",
+ }
+
+ # 送信するファイル
+ files = {'file': open(tmp_file_path+tmp_zip_name, 'rb')} # ファイルのパスを指定してファイルを開く
+
+ # POSTリクエストを送信
+ # 該当リポジトリのswordapiにzipを投げる処理
+ try:
+ # current_app.logger.info(sword_api_url)
+ # current_app.logger.info(data)
+ # current_app.logger.info(headers)
+ # current_app.logger.info(files)
+ response = requests.post(url=sword_api_url, data=data, headers=headers, files=files, verify=False)
+ if response.status_code == 404:
+ return response.text, 404
+ return jsonify(response.json()), response.status_code
+ except requests.exceptions.RequestException as ex:
+ current_app.logger.info(str(ex))
+ return jsonify({"error":str(ex)}), 504
+ except Exception as ex:
+ current_app.logger.info(str(ex))
+ return jsonify({"error":str(ex)}), 500
+ finally:
+ current_app.logger.info("一時zipファイル削除:"+tmp_zip_name)
+ os.remove(tmp_file_path+tmp_zip_name)
+
+@blueprint.route("/pdf_reader", methods=['POST'])
+def pdf_reader():
+ tmp_file_path = os.environ.get("TMPORARY_FILE_PATH")
+ XMLNS="{http://www.tei-c.org/ns/1.0}"
+
+ def read_title(data, root):
+ for child in root:
+ if child.tag.endswith("titleStmt"):
+ data["title"] = child.find(f"{XMLNS}title").text
+ else:
+ read_title(data, child)
+ return
+
+ def read_date(data, root):
+ for child in root:
+ if child.tag.endswith("publicationStmt"):
+ data["date"] = {}
+ data["date"]["type"] = "Available"
+ data["date"]["value"] = child.find(f"{XMLNS}date").attrib["when"]
+ else:
+ read_date(data, child)
+ return
+
+ def read_lang(data, root):
+ for child in root:
+ if child.tag.endswith("text"):
+ for key, value in child.attrib.items():
+ if key.endswith("lang"):
+ data["lang"] = value
+ break
+ else:
+ read_lang(data, child)
+ return
+
+ def read_publisher(data, root):
+ for child in root:
+ if child.tag.endswith("publicationStmt"):
+ data["publisher"] = child.find(f"{XMLNS}publisher").text
+ else:
+ read_publisher(data, child)
+ return
+
+ def read_author(data, root):
+ for child in root:
+ if child.tag.endswith("author"):
+ name = child.find(f"{XMLNS}persName")
+ if name:
+ author_data = {
+ "familyName":name.find(f"{XMLNS}surname").text,
+ "givenName":name.find(f"{XMLNS}forename").text
+ }
+ author_data["creatorName"] = author_data["familyName"] + " " + author_data["givenName"]
+ data["author"].append(author_data)
+ else:
+ read_author(data, child)
+ return
+ print("pdf read")
+ if current_user.is_anonymous:
+ return redirect(url_for('login.index_login'))
+ current_app.logger.info(current_user.affiliation_id)
+ # get and save PDF
+ try:
+ post_data = request.get_json()
+ file_uuid = str(uuid.uuid4())
+ file_name = None
+ file_path = os.path.join(tmp_file_path, file_uuid)
+ output_path = os.path.join(file_path, "output")
+
+ # seetup PDF from json
+ if not(os.path.exists(tmp_file_path)):
+ os.mkdir(tmp_file_path)
+ os.mkdir(file_path)
+ with zipfile.ZipFile(os.path.join(file_path, "contents.zip"), mode="w") as zipf:
+ for file in post_data.get("contentfiles"):
+ if file.get("name","").endswith(".pdf"):
+ file_name = file.get("name","").replace(".pdf", ".grobid.tei.xml")
+ binary_data = base64.b64decode(file.get("base64", ""))
+ zipf.writestr(f"{file.get("name","")}", binary_data)
+ break
+ with zipfile.ZipFile(os.path.join(file_path, "contents.zip")) as zf:
+ zf.extractall(f"{file_path}/data")
+
+ # PDF to XML by Grobid
+ client = GrobidClient(config_path="./app/config.json")
+ client.process("processHeaderDocument", file_path, output=output_path, consolidate_citations=True, tei_coordinates=True, force=True)
+
+ # read XML
+ tree = ET.parse(f"{output_path}/data/{file_name}")
+ root = tree.getroot()
+ data = {}
+ data["author"] = []
+ read_title(data, root)
+ read_lang(data, root)
+ read_date(data, root)
+ read_publisher(data, root)
+ read_author(data, root)
+ print(data)
+
+ return jsonify(data), 200
+ except OSError as ex:
+ current_app.logger.info(str(ex))
+ return jsonify({"error":"PDFが適切ではない、またはPDFファイルが存在しない可能性があります。"}), 500
+ except ServerUnavailableException as ex:
+ current_app.logger.info(str(ex))
+ return jsonify({"error":"PDF情報抽出機能との接続ができません。"}), 500
+ except Exception as ex:
+ current_app.logger.info(str(ex))
+ return jsonify({"error":str(ex)}), 500
+ finally:
+ # remove tmp file
+ shutil.rmtree(file_path)
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/requirements.txt b/app/modules/depositor_item_register/requirements.txt
new file mode 100644
index 0000000..67bcd6d
--- /dev/null
+++ b/app/modules/depositor_item_register/requirements.txt
@@ -0,0 +1,38 @@
+
+-e ../depositor_admin_setting
+-e ../depositor_item_register
+-e ../depositor_login
+-e ../depositor_models
+-e ../../../src/grobid_client
+email-validator
+Flask==2.2.0
+Flask-Admin==1.6.1
+Flask-Alembic==2.0.1
+Flask-Assets==2.1.0
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==2.1.0
+Flask-Collect==1.3.2
+Flask-Cors==4.0.0
+Flask-Login==0.6.3
+# Flask-OAuthlib==0.9.6
+Flask-WTF
+Flask-Security==3.0.0
+Flask-SQLAlchemy==3.0.2
+flask-marshmallow==0.14.0
+github3.py==1.1.0
+itsdangerous==2.1.2
+mock == 5.1.0
+pytest-mock == 3.12.0
+psycopg2==2.9.9
+pytz
+requests==2.31.0
+requests-oauthlib==1.3.1
+SQLAlchemy==2.0.27
+SQLAlchemy-Continuum==1.4.0
+SQLAlchemy-Utils==0.41.1
+# fpdf==1.7.2
+sword3common==0.1.1
+uWSGI==2.0.24
+wtforms==3.1.2
+Werkzeug==2.3.7
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/setup.py b/app/modules/depositor_item_register/setup.py
new file mode 100644
index 0000000..4f75151
--- /dev/null
+++ b/app/modules/depositor_item_register/setup.py
@@ -0,0 +1,14 @@
+from setuptools import setup, find_packages
+
+setup(
+ name='depositor_item_register',
+ version='1.0.0',
+ author='Your Name',
+ author_email='your.email@example.com',
+ description='A short description of your package',
+ packages=find_packages(),
+ install_requires=[
+ ],
+ entry_points={
+ },
+)
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/tests/__init__.py b/app/modules/depositor_item_register/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/app/modules/depositor_item_register/tests/conftest.py b/app/modules/depositor_item_register/tests/conftest.py
new file mode 100644
index 0000000..3ad1919
--- /dev/null
+++ b/app/modules/depositor_item_register/tests/conftest.py
@@ -0,0 +1,121 @@
+import pytest
+import os
+from flask import Flask, url_for
+from flask_login import LoginManager
+from sqlalchemy_utils.functions import create_database, database_exists, drop_database
+from depositor_admin_setting import AdminSettingApp
+from depositor_item_register import ItemRegisterApp
+from depositor_login import LoginApp
+from depositor_models.db_setting import db as db_
+from depositor_models.db_setting import DATABASE_URI, init_db
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+
+@pytest.fixture()
+def base_app():
+ app_ = Flask("testapp")
+ login_manager = LoginManager()
+ login_manager.init_app(app_)
+ app_.config["SQLALCHEMY_DATABASE_URI"]=DATABASE_URI
+ app_.config["TESTING"]="True"
+ app_.config["SECRET_KEY"]="SECRET_KEY"
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+
+ @login_manager.user_loader
+ def load_user(user_id):
+ user=User_manager.get_user_by_id(user_id)
+ return user
+ return app_
+
+
+@pytest.fixture()
+def base_app_none():
+ app_=None
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+ return app_
+
+@pytest.yield_fixture()
+def app(base_app):
+ with base_app.app_context():
+ yield base_app
+
+@pytest.yield_fixture()
+def db(app):
+ print()
+ init_db(app)
+ if not database_exists(DATABASE_URI):
+ create_database(DATABASE_URI)
+ db_.create_all()
+ yield db_
+ db_.session.remove()
+ db_.drop_all()
+
+
+@pytest.yield_fixture()
+def client(app):
+ """Get test client."""
+ with app.test_client() as client:
+ yield client
+
+@pytest.fixture()
+def users(app, db):
+ test_admin = User(id=0, user_id="test_admin", affiliation_id=1, user_orcid = "test_admin", role = "管理者")
+ test_cont = User(id=1, user_id="test_cont", affiliation_id=2, user_orcid = "test_cont", role = "図書館員")
+ test_user_1 = User(id=2, user_id="test_user1A", affiliation_id=1, user_orcid = "test_user1", role = "")
+ test_user_2 = User(id=3, user_id="test_user2A", affiliation_id=2, user_orcid = "test_user2", role = "")
+ test_user_3 = User(id=4, user_id="test_user3", affiliation_id=3, user_orcid = "test_user3", role = "図書館員")
+ test_user_4 = User(id=5, user_id="test_user4", affiliation_id=4, user_orcid = "test_user4", role = "")
+ test_user_5 = User(id=6, user_id="test_user5", affiliation_id=5, user_orcid = "test_user5", role = "")
+
+
+ User_manager.create_user(test_admin)
+ User_manager.create_user(test_cont)
+ User_manager.create_user(test_user_1)
+ User_manager.create_user(test_user_2)
+ User_manager.create_user(test_user_3)
+ User_manager.create_user(test_user_4)
+ User_manager.create_user(test_user_5)
+
+ return [test_admin,
+ test_cont,
+ test_user_1,
+ test_user_2,
+ test_user_3,
+ test_user_4,
+ test_user_5]
+
+@pytest.fixture()
+def affiliation_ids(app, db):
+ test_default = Affiliation_Id(id=0, affiliation_idp_url="-", affiliation_name ="default")
+ test_alpha = Affiliation_Id(id=1, affiliation_idp_url="https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO", affiliation_name ="alpha")
+
+ Affiliation_Id_manager.create_affiliation_id(test_default)
+ Affiliation_Id_manager.create_affiliation_id(test_alpha)
+
+ return [test_default,
+ test_alpha]
+
+@pytest.fixture()
+def affiliation_repositories(app, db):
+ test_default = Affiliation_Repository(id = 1, affiliation_id=0, repository_url= "https://defaultdefault.ac.jp", access_token = "test")
+ test_alpha = Affiliation_Repository(id = 2, affiliation_id=1, repository_url= "https://alphaalpha.ac.jp", access_token = "test")
+ test_gamma = Affiliation_Repository(id = 3, affiliation_id=3, repository_url= "", access_token = "")
+ test_delta = Affiliation_Repository(id = 4, affiliation_id=4, repository_url= "", access_token = "test")
+ test_epsilon = Affiliation_Repository(id = 5, affiliation_id=5, repository_url= "https://deltadelta.ac.jp", access_token = "")
+
+ Affiliation_Repository_manager.create_aff_repository(test_default)
+ Affiliation_Repository_manager.create_aff_repository(test_alpha)
+ Affiliation_Repository_manager.create_aff_repository(test_gamma)
+ Affiliation_Repository_manager.create_aff_repository(test_delta)
+ Affiliation_Repository_manager.create_aff_repository(test_epsilon)
+
+ return [test_default,
+ test_alpha,
+ test_gamma,
+ test_delta,
+ test_epsilon]
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/tests/data/france.png b/app/modules/depositor_item_register/tests/data/france.png
new file mode 100644
index 0000000..3c90df5
Binary files /dev/null and b/app/modules/depositor_item_register/tests/data/france.png differ
diff --git a/app/modules/depositor_item_register/tests/data/test.grobid.tei.xml b/app/modules/depositor_item_register/tests/data/test.grobid.tei.xml
new file mode 100644
index 0000000..c29cbbb
--- /dev/null
+++ b/app/modules/depositor_item_register/tests/data/test.grobid.tei.xml
@@ -0,0 +1,126 @@
+
+
+
+
+
+ Multi-contact functional electrical stimulation for hand opening: electrophysiologically driven identification of the optimal stimulation site
+
+
+ Springer Science and Business Media LLC
+ Copyright Springer Science and Business Media LLC
+
+ 2016-03-08
+
+
+
+
+
+ Cristiano De Marchis
+ cristiano.demarchis@uniroma3.it
+
+ Division of Functional and Restorative Neurosurgery
+ Department of Neurosurgery
+ Eberhard Karls University
+
+ Otfried-Mueller-Str.45
+ 72076
+ Tübingen
+ Germany
+
+
+
+
+
+
+ Cristina Simon-Martinez
+
+ Division of Functional and Restorative Neurosurgery
+ Department of Neurosurgery
+ Eberhard Karls University
+
+ Otfried-Mueller-Str.45
+ 72076
+ Tübingen
+ Germany
+
+
+
+
+ Silvia Conforto
+
+ Division of Functional and Restorative Neurosurgery
+ Department of Neurosurgery
+ Eberhard Karls University
+
+ Otfried-Mueller-Str.45
+ 72076
+ Tübingen
+ Germany
+
+
+
+
+ Alireza Gharabaghi
+ alireza.gharabaghi@uni-tuebingen.de
+
+ Division of Functional and Restorative Neurosurgery
+ Department of Neurosurgery
+ Eberhard Karls University
+
+ Otfried-Mueller-Str.45
+ 72076
+ Tübingen
+ Germany
+
+
+
+ Multi-contact functional electrical stimulation for hand opening: electrophysiologically driven identification of the optimal stimulation site
+
+
+ Journal of NeuroEngineering and Rehabilitation
+ J NeuroEngineering Rehabil
+ 1743-0003
+
+ Springer Science and Business Media LLC
+ 13
+ 1
+
+
+
+ ADF9B2C06A6F99930D17D335369ECA4F
+ 10.1186/s12984-016-0129-6
+
+
+
+
+
+
+ GROBID - A machine learning software for extracting information from scholarly documents
+
+
+
+
+
+
+
+ Neuromuscular electrical stimulation
+ Multi-contact stimulation
+ EMG
+ M-wave
+ Hand function
+ Neurorehabilitation
+
+
+
+ Background: Functional Electrical Stimulation (FES) is increasingly applied in neurorehabilitation. Particularly, the use of electrode arrays may allow for selective muscle recruitment. However, detecting the best electrode configuration constitutes still a challenge. Methods: A multi-contact setup with thirty electrodes was applied for combined FES and electromyography (EMG) recording of the forearm. A search procedure scanned all electrode configurations by applying single, sub-threshold stimulation pulses while recording M-waves of the extensor digitorum communis (EDC), extensor carpi radialis (ECR) and extensor carpi ulnaris (ECU) muscles. The electrode contacts with the best electrophysiological response were then selected for stimulation with FES bursts while capturing finger/wrist extension and radial/ulnar deviation with a kinematic glove. Results: The stimulation electrodes chosen on the basis of M-waves of the EDC/ECR/ECU muscles were able to effectively elicit the respective finger/wrist movements for the targeted extension and/or deviation with high specificity in two different hand postures. Conclusions: A subset of functionally relevant stimulation electrodes could be selected fast, automatic and nonpainful from a multi-contact array on the basis of muscle responses to subthreshold stimulation pulses. The selectivity of muscle recruitment predicted the kinematic pattern. This electrophysiologically driven approach would thus allow for an operator-independent positioning of the electrode array in neurorehabilitation.
+
+
+
+
+
+
+
+
diff --git a/app/modules/depositor_item_register/tests/data/test.pdf b/app/modules/depositor_item_register/tests/data/test.pdf
new file mode 100644
index 0000000..2112f9b
Binary files /dev/null and b/app/modules/depositor_item_register/tests/data/test.pdf differ
diff --git a/app/modules/depositor_item_register/tests/test_utils.py b/app/modules/depositor_item_register/tests/test_utils.py
new file mode 100644
index 0000000..3e84883
--- /dev/null
+++ b/app/modules/depositor_item_register/tests/test_utils.py
@@ -0,0 +1,53 @@
+from depositor_item_register.utils import dicttoxmlforsword
+
+def test_dicttoxmlforsword():
+ test_data={
+ "dc:title": [{
+ "dc:title": "test",
+ "xml:lang": "fr"
+ }],
+ "dc:type": [{
+ "dc:type": "data paper",
+ "rdf:resource": "http://purl.org/coar/resource_type/c_beb9"
+ }],
+ "datacite:geoLocation":[{
+ "datacite:geoLocationPoint": [
+ {
+ "datacite:pointLongitude": "経度",
+ "datacite:pointLatitude": "緯度"
+ }
+ ],
+ "datacite:geoLocationBox": [
+ {
+ "datacite:westBoundLongitude": "西部経度",
+ "datacite:eastBoundLongitude": "東部経度",
+ "datacite:southBoundLongitude": "南部緯度",
+ "datacite:northBoundLongitude": "北部緯度"
+ }
+ ],
+ "datacite:geoLocationPlace": [
+ {
+ "datacite:geoLocationPlace": "位置情報(自由記述)"
+ }
+ ]
+ }],
+ "jpcoar:file":[{
+ "filename": "metadata.pdf",
+ "jpcoar:mimeType": "application/pdf",
+ "jpcoar:URI": [
+ {
+ "jpcoar:URI": "data/contentfiles/metadata.pdf",
+ "label": "metadata.pdf",
+ "objectType": "other"
+ }
+ ],
+ "jpcoar:extent": [
+ {
+ "jpcoar:extent": "1 KB"
+ }
+ ],
+ "jpcoar:test":{}
+ }]
+ }
+ result = dicttoxmlforsword("jpcoar2.0", test_data).decode("utf-8")
+ assert result == '
test data paper 経度 緯度 西部経度 東部経度 南部緯度 北部緯度 位置情報(自由記述) application/pdf data/contentfiles/metadata.pdf 1 KB '
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/tests/test_views.py b/app/modules/depositor_item_register/tests/test_views.py
new file mode 100644
index 0000000..17fac3b
--- /dev/null
+++ b/app/modules/depositor_item_register/tests/test_views.py
@@ -0,0 +1,201 @@
+import pytest
+import base64
+import shutil
+import os
+from requests import Response
+from mock import patch, MagicMock
+from flask import session, url_for
+from flask_login import current_user, login_user, logout_user
+from depositor_login.views import generate_random_str,login
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+from grobid_client.grobid_client import ServerUnavailableException
+
+# ext.pyのcoverage用
+def test_app_none(base_app_none):
+ assert 1
+
+def test_index_item(app, db, users):
+ user = User_manager.get_user_by_id(1)
+ with app.test_request_context("/item_register/"):
+ # ログインしていない
+ response = app.test_client().get("/item_register/")
+ assert response.status_code == 302
+ assert response.location == url_for('login.index_login')
+
+ # ログインしている
+ with patch("depositor_item_register.views.render_template") as render :
+ login_user(user)
+ response = app.test_client().get("/item_register/")
+ render.assert_called()
+
+def test_register(app, db, users, affiliation_ids, affiliation_repositories):
+ def encode_to_base64(file_path):
+ try:
+ with open(file_path, "rb") as file:
+ encoded_pdf = base64.b64encode(file.read())# .decode('utf-8')
+ return encoded_pdf
+ except FileNotFoundError:
+ print("File not found.")
+ return None
+
+ alpha_user = users[0]
+ beta_user = users[3]
+ gamma_user = users[4]
+ delta_user = users[5]
+ epsilon_user = users[6]
+
+ with app.test_request_context("/item_register/register"):
+ # ログインしていない
+ response = app.test_client().post("/item_register/register")
+ assert response.status_code == 302
+ assert response.location == url_for('login.index_login')
+
+ login_user(beta_user)
+ folder_path="./tests/tmp"
+ if os.path.exists(folder_path):
+ shutil.rmtree(folder_path)
+ data = {"item_metadata":{},
+ "contentfiles":[{"name":"france.png", "base64":encode_to_base64("./tests/data/france.png")}],
+ "thumbnail":[{"name":"france.png", "base64":encode_to_base64("./tests/data/france.png")}]}
+ with patch("flask.Request.get_json", return_value= data):
+ mockresponse=Response()
+ mockresponse.status_code = 200
+ mockresponse._content = b'{"message": "Hello, world!"}'
+ # ログインしているが、ユーザーのaffiliation_idではaff_repoが登録されていない。
+ # tmpフォルダがない、contentsfile,thumbnailはついている responseは404以外
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ with patch("requests.post", return_value=mockresponse):
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_called()
+ assert response.status_code != 404 and response.status_code != 504
+
+ # ログインしており、affiliation_idでaff_repoが登録されているがrepo_url,tokenが設定されていない。
+ logout_user()
+ login_user(gamma_user)
+ data = {"item_metadata":{},
+ "contentfiles":[],
+ "thumbnail":[]}
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_called()
+ assert response.status_code != 404
+
+ # ログインしており、affiliation_idでaff_repoが登録されているがrepo_urlが設定されていない。
+ logout_user()
+ login_user(delta_user)
+ data = {"item_metadata":{},
+ "contentfiles":[],
+ "thumbnail":[]}
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_called()
+ assert response.status_code != 404
+
+ # ログインしており、affiliation_idでaff_repoが登録されているがtokenが設定されていない。
+ logout_user()
+ login_user(epsilon_user)
+ data = {"item_metadata":{},
+ "contentfiles":[],
+ "thumbnail":[]}
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_called()
+ assert response.status_code != 404
+
+ # ログインしており、affiliaton_idでaff_repoが登録されており、repo_url,access_tokenが設定されている。
+ logout_user()
+ login_user(alpha_user)
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_not_called()
+ assert response.status_code != 404
+
+ # 異常系 ステータスコードが404である。
+ with patch("flask.Request.get_json", return_value= data):
+ mockresponse=Response()
+ mockresponse.status_code = 404
+ mockresponse._content = b'{"message": "Hello, world!"}'
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ with patch("requests.post", return_value=mockresponse):
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_not_called()
+ assert response.status_code == 404
+
+ # 異常系 Exception
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("depositor_item_register.views.Affiliation_Repository_manager.get_aff_repository_by_affiliation_name") as get_aff_by_name:
+ with patch("requests.post", side_effect=Exception()):
+ response = app.test_client().post("/item_register/register")
+ get_aff_by_name.assert_not_called()
+ assert response.status_code == 500
+
+
+def test_pdf_reader(app, users):
+ def encode_to_base64(file_path):
+ try:
+ with open(file_path, "rb") as file:
+ encoded_pdf = base64.b64encode(file.read())# .decode('utf-8')
+ return encoded_pdf
+ except FileNotFoundError:
+ print("File not found.")
+ return None
+
+ class MockGrobidClass(MagicMock):
+ def process(a, b, c, **args):
+ return 1
+ user = users[0]
+ with app.test_request_context("/item_register/pdf_reader"):
+ # ログインしていない
+ response = app.test_client().post("/item_register/pdf_reader")
+ assert response.status_code == 302
+ assert response.location == url_for('login.index_login')
+
+ login_user(user)
+ # ログインしている。正常系
+ folder_path="./tests/tmp"
+ os.makedirs("./tests/tmp/test/output/data")
+ shutil.copy("./tests/data/test.grobid.tei.xml", "./tests/tmp/test/output/data")
+ os.makedirs("./tests/tmp/test/data", exist_ok=True)
+ shutil.copy("./tests/data/test.pdf", "./tests/tmp/test/data")
+ data = {"item_metadata":{},
+ "contentfiles":[{"name":"test.pdf", "base64":encode_to_base64("./tests/data/test.pdf")}]}
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("uuid.uuid4", return_value="test"):
+ with patch("depositor_item_register.views.GrobidClient", return_value = MockGrobidClass()):
+ with patch("os.mkdir"):
+ response = app.test_client().post("/item_register/pdf_reader")
+ assert response.status_code == 200
+ assert response.data.decode('unicode_escape') == '{"author":[{"creatorName":"De Marchis Cristiano","familyName":"De Marchis","givenName":"Cristiano"},{"creatorName":"Simon-Martinez Cristina","familyName":"Simon-Martinez","givenName":"Cristina"},{"creatorName":"Conforto Silvia","familyName":"Conforto","givenName":"Silvia"},{"creatorName":"Gharabaghi Alireza","familyName":"Gharabaghi","givenName":"Alireza"}],"date":{"type":"Available","value":"2016-03-08"},"lang":"en","publisher":"Springer Science and Business Media LLC","title":"Multi-contact functional electrical stimulation for hand opening: electrophysiologically driven identification of the optimal stimulation site"}\n'
+
+ # 異常系 OSError
+ if os.path.exists(folder_path):
+ shutil.rmtree(folder_path)
+ data = {"item_metadata":{},
+ "contentfiles":[{"name":"test.png", "base64":encode_to_base64("./tests/data/test.pdf")}]}
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("uuid.uuid4", return_value="test"):
+ with patch("depositor_item_register.views.GrobidClient", side_effect = MockGrobidClass()):
+ response = app.test_client().post("/item_register/pdf_reader")
+ assert response.status_code == 500
+ assert response.data.decode('unicode_escape') == '{"error":"PDFが適切ではない、またはPDFファイルが存在しない可能性があります。"}\n'
+
+ # 異常系 ServerUnavailableException
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("uuid.uuid4", return_value="test"):
+ with patch("depositor_item_register.views.GrobidClient", side_effect = ServerUnavailableException()):
+ response = app.test_client().post("/item_register/pdf_reader")
+ assert response.status_code == 500
+ assert response.data.decode('unicode_escape') == '{"error":"PDF情報抽出機能との接続ができません。"}\n'
+
+ # 異常系 Exception
+ with patch("flask.Request.get_json", return_value= data):
+ with patch("uuid.uuid4", return_value="test"):
+ with patch("depositor_item_register.views.GrobidClient", side_effect = Exception()):
+ response = app.test_client().post("/item_register/pdf_reader")
+ assert response.status_code == 500
\ No newline at end of file
diff --git a/app/modules/depositor_item_register/tox.ini b/app/modules/depositor_item_register/tox.ini
new file mode 100644
index 0000000..0f977c7
--- /dev/null
+++ b/app/modules/depositor_item_register/tox.ini
@@ -0,0 +1,45 @@
+[tox]
+envlist = c1
+
+skip_missing_interpreters = true
+
+[tool:pytest]
+minversion = 3.0
+testpaths = tests
+
+[coverage:run]
+source =
+ depositor_item_register
+ tests
+
+[coverage:paths]
+source =
+ depositor_item_register
+ tests
+ .tox/*/lib/python*/site-packages/depositor_item_register
+ .tox/*/lib/python*/site-packages/depositor_item_register/tests
+
+
+[isort]
+profile=black
+
+[tool:isort]
+line_length = 119
+
+[testenv:c1]
+passenv = LANG
+setenv =
+ DEPOSITOR_WEB_HOST=127.0.0.1
+ DEPOSITOR_POSTGRESQL_HOST=postgresql
+ DEPOSITOR_POSTGRESQL_DBNAME=depositer_test
+ DEPOSITOR_POSTGRESQL_DBUSER=depositor
+ DEPOSITOR_POSTGRESQL_DBPASS=dbpass123
+ TMPORARY_FILE_PATH=./tests/tmp/
+ MOCK_PASSWORD=testpass
+deps =
+ pytest>=3
+ pytest-cov
+ -rrequirements.txt
+ setuptools
+commands =
+ pytest --cov=depositor_item_register tests -v -s -vv --cov-branch --cov-report=term --cov-report=xml --cov-report=html --cov-config=tox.ini --basetemp="{envtmpdir}" {posargs}
diff --git a/app/modules/depositor_login/depositor_login/__init__.py b/app/modules/depositor_login/depositor_login/__init__.py
new file mode 100644
index 0000000..91050f2
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/__init__.py
@@ -0,0 +1,3 @@
+
+from .ext import LoginApp
+__all__ = ('LoginApp')
\ No newline at end of file
diff --git a/app/modules/depositor_login/depositor_login/config.py b/app/modules/depositor_login/depositor_login/config.py
new file mode 100644
index 0000000..aa08fe2
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/config.py
@@ -0,0 +1,42 @@
+# class AppConfig(object):
+# # セッション Cookie に安全に署名するために使用される秘密キー
+# SECRET_KEY = 'fbc0b8ddc8deba4769b780a959405de3370c883f6c6b47499487e364e17b24a1'
+
+# # セッション Cookieの名前
+# SESSION_COOKIE_NAME = 'flask_login_app'
+
+MOCK_SHIB_DATA={"testuser1A@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser1A",
+ "OrganizationName":"alpha",
+ "wekoSocietyAffiliation":"",
+ "eduPersonOrcid":"orcid_testuser1"},
+ "testuser2A@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser2A",
+ "OrganizationName":"alpha",
+ "wekoSocietyAffiliation":"",
+ "eduPersonOrcid":"orcid_testuser2"},
+ "testuser3A@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser3A",
+ "OrganizationName":"alpha",
+ "wekoSocietyAffiliation":"図書館員",
+ "eduPersonOrcid":""},
+ "testuser1B@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.betabeta.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser1B",
+ "OrganizationName":"beta",
+ "wekoSocietyAffiliation":"",
+ "eduPersonOrcid":"orcid_testuser1"},
+ "testuser2B@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.betabeta.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser2B",
+ "OrganizationName":"beta",
+ "wekoSocietyAffiliation":"",
+ "eduPersonOrcid":"orcid_testuser2"},
+ "testuser3B@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.betabeta.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser3B",
+ "OrganizationName":"beta",
+ "wekoSocietyAffiliation":"図書館員",
+ "eduPersonOrcid":""},
+ "testadmin@nii.ac.jp":{"affiliation_idp_url":"https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO",
+ "eduPersonPrincipalName":"testuser4",
+ "OrganizationName":"alpha",
+ "wekoSocietyAffiliation":"管理者",
+ "eduPersonOrcid":""}}
\ No newline at end of file
diff --git a/app/modules/depositor_login/depositor_login/ext.py b/app/modules/depositor_login/depositor_login/ext.py
new file mode 100644
index 0000000..f0e901d
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/ext.py
@@ -0,0 +1,12 @@
+from .views import blueprint
+
+class LoginApp(object):
+ def __init__(self, app=None):
+ if app:
+ self.init_app(app)
+
+ def init_app(self, app):
+ app.register_blueprint(blueprint)
+ app.extensions['login'] = self
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_login/depositor_login/templates/login/_macros.html b/app/modules/depositor_login/depositor_login/templates/login/_macros.html
new file mode 100644
index 0000000..1298ead
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/templates/login/_macros.html
@@ -0,0 +1,33 @@
+{% macro render_field(field, icon="", autofocus=False, errormsg=True, size="form-group-lg") %}
+
+ {%- set extras = dict(autofocus="") if autofocus else dict() %}
+ {{field(class_="form-control", placeholder=(field.label.text | string), **extras)}}
+ {%- if icon %}
+
+ {%- endif%}
+
+ {%- if field.errors and errormsg %}
+
+ {%- for error in field.errors %}
+
{{error}}
+ {%- endfor %}
+
+ {%- endif %}
+{% endmacro %}
+
+{% macro form_errors(form) %}
+ {%- if form.errors %}
+
+
×
+ {%- for key,err_obj in form.errors.items() recursive%}
+ {% if err_obj is mapping %}
+ {{ loop(err_obj.items()) }}
+ {% else %}
+ {% for single_message in err_obj %}
+
{{ single_message }}
+ {% endfor %}
+ {% endif %}
+ {%- endfor %}
+
+ {%- endif %}
+{% endmacro %}
\ No newline at end of file
diff --git a/app/modules/depositor_login/depositor_login/templates/login/login_index.html b/app/modules/depositor_login/depositor_login/templates/login/login_index.html
new file mode 100644
index 0000000..73cfac3
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/templates/login/login_index.html
@@ -0,0 +1,68 @@
+{#
+# This file is part of WEKO3.
+# Copyright (C) 2017 National Institute of Informatics.
+#
+# WEKO3 is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# WEKO3 is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with WEKO3; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307, USA.
+#}
+
+
+
+
+
+ {% block page_header %}
+
+ {% endblock page_header%}
+
+ {%- block css %}
+
+
+ {%- endblock css %}
+
+
+ {% from "login/_macros.html" import render_field, form_errors %}
+
+
+
+ {%- block form_header %}
+
{{('Log in to account') }}
+ {%- endblock form_header %}
+ {%- block form_outer %}
+ {%- with form = login_user_form %}
+
+ {%- block registerable %}
+
+ {%- endblock %}
+
+ {%- block recoverable %}
+ {%- endblock %}
+
+
+
+
diff --git a/app/modules/depositor_login/depositor_login/views.py b/app/modules/depositor_login/depositor_login/views.py
new file mode 100644
index 0000000..e529f2b
--- /dev/null
+++ b/app/modules/depositor_login/depositor_login/views.py
@@ -0,0 +1,86 @@
+
+import random
+import string
+import os
+from flask import Flask, render_template, redirect, url_for, request, flash, session ,current_app, jsonify, Blueprint
+from flask_login import login_user, current_user, logout_user
+from flask_wtf import FlaskForm
+from wtforms import StringField, SubmitField ,PasswordField
+from .config import MOCK_SHIB_DATA
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+
+blueprint = Blueprint(
+ "login",
+ __name__,
+ url_prefix="/",
+ template_folder="templates",
+ static_folder="static")
+
+class LoginForm(FlaskForm):
+ email = StringField('メールアドレス')
+ password = PasswordField('パスワード')
+ submit = SubmitField('ログイン')
+
+@blueprint.route("", methods=['GET'])
+def top():
+ return index_login()
+
+@blueprint.route("/login", methods=['GET'])
+def index_login():
+ if not current_user.is_anonymous:
+ return redirect(url_for('item_register.index_item'))
+ csrf_random = generate_random_str(length=64)
+ session['csrf_random'] = csrf_random
+ login_user_form = LoginForm()
+
+ return render_template("login/login_index.html", login_user_form = login_user_form)
+
+@blueprint.route("/login", methods=['POST'])
+def login():
+ mock_password = os.environ.get("MOCK_PASSWORD")
+ form=LoginForm()
+ if form.validate_on_submit():
+ # shibbolethで返ってくる値を固定値とする。パスワードは環境変数で固定
+ if form.password.data == mock_password:
+ shib_data = MOCK_SHIB_DATA.get(form.email.data)
+ if shib_data :
+ affiliation_idp_url = shib_data.get("affiliation_idp_url",None)
+ affiliation_id = Affiliation_Id_manager.get_affiliation_id_by_idp_url(affiliation_idp_url)
+ if not affiliation_id:
+ affiliation_name = shib_data.get("OrganizationName",None)
+ aff_id = Affiliation_Id(affiliation_idp_url=affiliation_idp_url, affiliation_name=affiliation_name)
+ affiliation_id = Affiliation_Id_manager.create_affiliation_id(aff_id)
+ affiliation_id_id = affiliation_id.id
+ user_id = shib_data.get("eduPersonPrincipalName",None)
+ user=User_manager.get_user_by_user_id(user_id)
+ if not user :
+ user_orcid = shib_data.get("eduPersonOrcid",None)
+ role = shib_data.get("wekoSocietyAffiliation", None)
+ user = User(
+ user_id = user_id,
+ affiliation_id = affiliation_id_id,
+ user_orcid = user_orcid,
+ role = role
+ )
+ User_manager.create_user(user)
+ login_user(user)
+ return redirect(url_for("item_register.index_item"))
+ flash("Missing SHIB_ATTRs!", category='error')
+ return index_login()
+
+
+@blueprint.route("/logout", methods=['GET'])
+def logout():
+ logout_user()
+ return redirect(url_for('login.top'))
+
+
+def generate_random_str(length=128):
+ """Generate secret key."""
+ rng = random.SystemRandom()
+
+ return ''.join(
+ rng.choice(string.ascii_letters + string.digits)
+ for _ in range(0, length)
+ )
diff --git a/app/modules/depositor_login/requirements.txt b/app/modules/depositor_login/requirements.txt
new file mode 100644
index 0000000..303a1fe
--- /dev/null
+++ b/app/modules/depositor_login/requirements.txt
@@ -0,0 +1,39 @@
+
+-e ../depositor_admin_setting
+-e ../depositor_item_register
+-e ../depositor_login
+-e ../depositor_models
+-e ../../../src/grobid_client
+email-validator
+Flask==2.2.0
+Flask-Admin==1.6.1
+Flask-Alembic==2.0.1
+Flask-Assets==2.1.0
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==2.1.0
+Flask-Collect==1.3.2
+Flask-Cors==4.0.0
+Flask-Login==0.6.3
+# Flask-OAuthlib==0.9.6
+Flask-WTF
+Flask-Security==3.0.0
+Flask-SQLAlchemy==3.0.2
+flask-marshmallow==0.14.0
+github3.py==1.1.0
+itsdangerous==2.1.2
+mock == 5.1.0
+pytest-mock == 3.12.0
+psycopg2==2.9.9
+pytz
+requests==2.31.0
+requests-oauthlib==1.3.1
+SQLAlchemy==2.0.27
+SQLAlchemy-Continuum==1.4.0
+SQLAlchemy-Utils==0.41.1
+# fpdf==1.7.2
+sword3common==0.1.1
+uWSGI==2.0.24
+wtforms==3.1.2
+Werkzeug==2.3.7
+# -e ../../
\ No newline at end of file
diff --git a/app/modules/depositor_login/setup.py b/app/modules/depositor_login/setup.py
new file mode 100644
index 0000000..a938920
--- /dev/null
+++ b/app/modules/depositor_login/setup.py
@@ -0,0 +1,14 @@
+from setuptools import setup, find_packages
+
+setup(
+ name='depositor_login',
+ version='1.0.0',
+ author='Your Name',
+ author_email='your.email@example.com',
+ description='A short description of your package',
+ packages=find_packages(),
+ install_requires=[
+ ],
+ entry_points={
+ },
+)
\ No newline at end of file
diff --git a/app/modules/depositor_login/tests/__init__.py b/app/modules/depositor_login/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/app/modules/depositor_login/tests/conftest.py b/app/modules/depositor_login/tests/conftest.py
new file mode 100644
index 0000000..f3e59c2
--- /dev/null
+++ b/app/modules/depositor_login/tests/conftest.py
@@ -0,0 +1,95 @@
+import pytest
+import os
+from flask import Flask, url_for
+from flask_login import LoginManager
+from sqlalchemy_utils.functions import create_database, database_exists, drop_database
+from depositor_admin_setting import AdminSettingApp
+from depositor_item_register import ItemRegisterApp
+from depositor_login import LoginApp
+from depositor_models.db_setting import db as db_
+from depositor_models.db_setting import DATABASE_URI, init_db
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+
+@pytest.fixture()
+def base_app():
+ app_ = Flask("testapp")
+ login_manager = LoginManager()
+ login_manager.init_app(app_)
+ app_.config["SQLALCHEMY_DATABASE_URI"]=DATABASE_URI
+ app_.config["TESTING"]="True"
+ app_.config["SECRET_KEY"]="SECRET_KEY"
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+
+ @login_manager.user_loader
+ def load_user(user_id):
+ user=User_manager.get_user_by_id(user_id)
+ return user
+ return app_
+
+@pytest.fixture()
+def base_app_none():
+ app_ = Flask("testapp")
+ app_.config["SQLALCHEMY_DATABASE_URI"]=DATABASE_URI
+ app_=None
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+ return app_
+
+@pytest.yield_fixture()
+def app(base_app):
+ with base_app.app_context():
+ yield base_app
+
+@pytest.yield_fixture()
+def db(app):
+ print()
+ init_db(app)
+ if not database_exists(DATABASE_URI):
+ create_database(DATABASE_URI)
+ db_.create_all()
+ yield db_
+ db_.session.remove()
+ db_.drop_all()
+
+
+@pytest.yield_fixture()
+def client(app):
+ """Get test client."""
+ with app.test_client() as client:
+ yield client
+
+@pytest.fixture()
+def users(app, db):
+ test_admin = User(id=0, user_id="test_admin", affiliation_id=1, user_orcid = "test_admin", role = "管理者")
+ test_cont = User(id=1, user_id="test_cont", affiliation_id=2, user_orcid = "test_cont", role = "図書館員")
+ test_user_1 = User(id=2, user_id="test_user1A", affiliation_id=1, user_orcid = "test_user1", role = "")
+ test_user_2 = User(id=3, user_id="test_user2A", affiliation_id=2, user_orcid = "test_user2", role = "")
+ test_user_3 = User(id=4, user_id="test_user3A", affiliation_id=2, user_orcid = "test_user2", role = "図書館員")
+
+ User_manager.create_user(test_admin)
+ User_manager.create_user(test_cont)
+ User_manager.create_user(test_user_1)
+ User_manager.create_user(test_user_2)
+ User_manager.create_user(test_user_3)
+
+ return [test_admin,
+ test_cont,
+ test_user_1,
+ test_user_2,
+ test_user_3]
+
+@pytest.fixture()
+def affiliation_ids(app, db):
+ test_default = Affiliation_Id(id=0, affiliation_idp_url="-", affiliation_name ="default")
+ test_alpha = Affiliation_Id(id=1, affiliation_idp_url="https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO", affiliation_name ="alpha")
+
+ Affiliation_Id_manager.create_affiliation_id(test_default)
+ Affiliation_Id_manager.create_affiliation_id(test_alpha)
+
+ return [test_default,
+ test_alpha]
+
\ No newline at end of file
diff --git a/app/modules/depositor_login/tests/test_views.py b/app/modules/depositor_login/tests/test_views.py
new file mode 100644
index 0000000..b2b75dc
--- /dev/null
+++ b/app/modules/depositor_login/tests/test_views.py
@@ -0,0 +1,88 @@
+from mock import patch,MagicMock
+import pytest
+from flask import session, url_for
+from flask_login import current_user, login_user
+from depositor_login.views import generate_random_str,login
+from depositor_models.user import User, User_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+
+# ext.pyのcoverage用
+def test_app_none(base_app_none):
+ assert 1
+
+def test_generate_random_str(app, db, users, client):
+ assert len(generate_random_str()) == 128
+ assert len(generate_random_str(91)) == 91
+
+def test_top(app, db, users):
+ user = User_manager.get_user_by_id(1)
+ with app.test_request_context("/"):
+ with patch("depositor_login.views.index_login") as index_login:
+ login_user(user)
+ response = app.test_client().get("/")
+ index_login.assert_called()
+
+def test_index_login(app, db, users):
+ user = User_manager.get_user_by_id(1)
+ with app.test_request_context("/login"):
+ with patch("depositor_login.views.render_template") as render :
+ response = app.test_client().get("/login")
+ render.assert_called()
+ login_user(user)
+ response = app.test_client().get("/login")
+ assert response.status_code == 302
+ assert response.location == url_for('item_register.index_item')
+
+def test_login(app, db, mocker):
+ with app.test_request_context("/login"):
+ # リクエストボディなし
+ with patch("depositor_login.views.index_login") as index_login :
+ response = app.test_client().post("/login")
+ index_login.assert_called()
+
+ # パスワードミス
+ with patch("depositor_login.views.index_login") as index_login :
+ with patch("flask_wtf.FlaskForm.validate_on_submit", return_value=True):
+ request_data = {"email":"exam@exam.com", "password":"mistake"}
+ response = app.test_client().post("/login", data=request_data)
+ index_login.assert_called()
+
+ # メールアドレスミス
+ with patch("depositor_login.views.index_login") as index_login :
+ with patch("flask_wtf.FlaskForm.validate_on_submit", return_value=True):
+ request_data = {"email":"exam@exam.com", "password":"testpass"}
+ response = app.test_client().post("/login", data=request_data)
+ index_login.assert_called()
+
+ # affiliation_idが見つからず、userも見つからない。
+ with patch("depositor_login.views.index_login") as index_login :
+ with patch("flask_wtf.FlaskForm.validate_on_submit", return_value=True):
+ request_data = {"email":"testuser1A@nii.ac.jp", "password":"testpass"}
+ response = app.test_client().post("/login", data=request_data)
+ response.status_code == 302
+ response.location == url_for("item_register.index_item")
+
+ # affiliation_id、userが見つかる。
+ with patch("depositor_login.views.index_login") as index_login :
+ with patch("flask_wtf.FlaskForm.validate_on_submit", return_value=True):
+ create_user = mocker.patch("depositor_login.views.Affiliation_Id_manager.create_affiliation_id")
+ create_aff_id = mocker.patch("depositor_login.views.User_manager.create_user")
+ request_data = {"email":"testuser1A@nii.ac.jp", "password":"testpass"}
+ response = app.test_client().post("/login", data=request_data)
+
+ response.status_code == 302
+ response.location == url_for("item_register.index_item")
+ create_user.assert_not_called()
+ create_aff_id.assert_not_called()
+
+
+def test_logout(app, db, users):
+ user = User_manager.get_user_by_id(1)
+ with app.test_request_context("/logout"):
+ with patch("depositor_login.views.logout_user") as logout :
+ login_user(user)
+ response = app.test_client().get("/logout")
+ logout.assert_called()
+ assert response.status_code == 302
+ assert response.location == url_for('login.top')
+
\ No newline at end of file
diff --git a/app/modules/depositor_login/tox.ini b/app/modules/depositor_login/tox.ini
new file mode 100644
index 0000000..15e4abc
--- /dev/null
+++ b/app/modules/depositor_login/tox.ini
@@ -0,0 +1,45 @@
+[tox]
+envlist = c1
+
+skip_missing_interpreters = true
+
+[tool:pytest]
+minversion = 3.0
+testpaths = tests
+
+[coverage:run]
+source =
+ depositor_login
+ tests
+
+[coverage:paths]
+source =
+ depositor_login
+ tests
+ .tox/*/lib/python*/site-packages/depositor_login
+ .tox/*/lib/python*/site-packages/depositor_login/tests
+
+
+[isort]
+profile=black
+
+[tool:isort]
+line_length = 119
+
+[testenv:c1]
+setenv =
+ DEPOSITOR_WEB_HOST=127.0.0.1
+ DEPOSITOR_POSTGRESQL_HOST=postgresql
+ DEPOSITOR_POSTGRESQL_DBNAME=depositer_test
+ DEPOSITOR_POSTGRESQL_DBUSER=depositor
+ DEPOSITOR_POSTGRESQL_DBPASS=dbpass123
+ TMPORARY_FILE_PATH=./tmp/
+ MOCK_PASSWORD=testpass
+passenv = LANG
+deps =
+ pytest>=3
+ pytest-cov
+ -rrequirements.txt
+ setuptools
+commands =
+ pytest --cov=depositor_login tests -v -s -vv --cov-branch --cov-report=term --cov-report=xml --cov-report=html --cov-config=tox.ini --basetemp="{envtmpdir}" {posargs}
diff --git a/app/modules/depositor_models/depositor_models/__init__.py b/app/modules/depositor_models/depositor_models/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/app/modules/depositor_models/depositor_models/affiliation_id.py b/app/modules/depositor_models/depositor_models/affiliation_id.py
new file mode 100644
index 0000000..97efdd1
--- /dev/null
+++ b/app/modules/depositor_models/depositor_models/affiliation_id.py
@@ -0,0 +1,69 @@
+from flask import current_app
+from sqlalchemy import Column, Integer, String, Float, DateTime, Sequence, asc
+from .db_setting import db, Timestamp
+
+class Affiliation_Id(db.Model, Timestamp):
+ """Affiliation ID data model"""
+
+ __tablename__ = "affiliation_id"
+
+ __table_args__={'extend_existing': True}
+
+ id = db.Column(Integer, primary_key=True, nullable = False, unique=True, autoincrement=True, default=Sequence("affiliation_id_id_seq"))
+
+ affiliation_idp_url = db.Column(String(80), nullable=False)
+
+ affiliation_name = db.Column(String(80), nullable=False)
+
+
+class Affiliation_Id_manager(object):
+ """
+ operated on the Affiliation ID
+ """
+ @classmethod
+ def create_affiliation_id(cls, affiliation_id):
+ """
+ create new affiliation_id
+ :param affiliation_id: class Affiliation_Id
+ :return:
+ """
+ assert affiliation_id
+ try:
+ with db.session.begin_nested():
+ db.session.add(affiliation_id)
+ db.session.commit()
+ except Exception as ex:
+ db.session.rollback()
+ current_app.logger.error(ex)
+ raise ex
+
+ return affiliation_id
+
+ @classmethod
+ def get_affiliation_id_by_id(cls, affiliation_id):
+ # with db.session.no_autoflush():
+ query = Affiliation_Id.query.filter_by(id = affiliation_id)
+ return query.one_or_none()
+
+ @classmethod
+ def get_affiliation_id_by_idp_url(cls, affiliation_idp_url):
+ # with db.session.no_autoflush():
+ query = Affiliation_Id.query.filter_by(affiliation_idp_url = affiliation_idp_url)
+ return query.one_or_none()
+
+ @classmethod
+ def get_affiliation_id_by_affiliation_name(cls, affiliation_name):
+ # with db.session.no_autoflush():
+ query = Affiliation_Id.query.filter_by(affiliation_name = affiliation_name)
+ return query.one_or_none()
+
+ @classmethod
+ def get_affiliation_id_list(cls):
+ """Get affiliation_name list info.
+
+ :return:
+ """
+ with db.session.no_autoflush:
+ query = Affiliation_Id.query.filter_by().order_by(asc(Affiliation_Id.id))
+ return query.all()
+
diff --git a/app/modules/depositor_models/depositor_models/affiliation_repository.py b/app/modules/depositor_models/depositor_models/affiliation_repository.py
new file mode 100644
index 0000000..26b57cb
--- /dev/null
+++ b/app/modules/depositor_models/depositor_models/affiliation_repository.py
@@ -0,0 +1,87 @@
+from flask import current_app
+from sqlalchemy import Column, Integer, String, and_, asc, desc, func, or_, Sequence
+from .db_setting import db, Timestamp
+from .affiliation_id import Affiliation_Id_manager
+
+class Affiliation_Repository(db.Model, Timestamp):
+ """Affiliationrepository data model"""
+
+ __tablename__ = "affiliation_repository"
+
+ __table_args__={'extend_existing': True}
+
+ id = db.Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True, default=Sequence("affiliation_repository_id_seq"))
+
+ affiliation_id = db.Column(Integer, nullable=False)
+
+ repository_url = db.Column(String(80), nullable=False)
+
+ access_token = db.Column(String(80), nullable=False)
+
+
+class Affiliation_Repository_manager(object):
+ """operated on the Affiliation repository"""
+ @classmethod
+ def create_aff_repository(cls, aff_repository):
+ """
+ create new aff_repository
+ :param aff_repository:
+ :return:
+ """
+ assert aff_repository
+ try:
+ with db.session.begin_nested():
+ db.session.add(aff_repository)
+ db.session.commit()
+ except Exception as ex:
+ db.session.rollback()
+ current_app.logger.error(ex)
+ raise ex
+
+ return aff_repository
+
+ @classmethod
+ def upt_aff_repository(cls, aff_repository):
+ assert aff_repository
+ try:
+ with db.session.begin_nested():
+ _aff_repository = Affiliation_Repository.query.filter_by(id=aff_repository.get('id')).one_or_none()
+ if _aff_repository:
+ _aff_repository.affiliation_id = aff_repository.get('affiliation_id')
+ _aff_repository.repository_url = aff_repository.get('repository_url')
+ _aff_repository.access_token = aff_repository.get('access_token')
+ db.session.merge(_aff_repository)
+ db.session.commit()
+ except Exception as ex:
+ db.session.rollback()
+ current_app.logger.error(ex)
+ raise
+
+ return _aff_repository
+
+ @classmethod
+ def get_aff_repository_by_affiliation_id(cls, affiliation_id):
+ with db.session.no_autoflush:
+ query = Affiliation_Repository.query.filter_by(affiliation_id=affiliation_id)
+ return query.one_or_none()
+
+ @classmethod
+ def get_aff_repository_by_affiliation_name(cls, affiliation_name):
+ with db.session.no_autoflush:
+ affiliation_id = Affiliation_Id_manager.get_affiliation_id_by_affiliation_name(affiliation_name)
+ if affiliation_id:
+ aff_repository = cls.get_aff_repository_by_affiliation_id(affiliation_id.id)
+ else :
+ return None
+ return aff_repository
+
+ @classmethod
+ def get_affiliation_repository_list(cls):
+ """Get affiliation_repository list info.
+
+ :return:
+ """
+ with db.session.no_autoflush:
+ query = Affiliation_Repository.query.filter_by().order_by(asc(Affiliation_Repository.id))
+ return query.all()
+
diff --git a/app/modules/depositor_models/depositor_models/db_setting.py b/app/modules/depositor_models/depositor_models/db_setting.py
new file mode 100644
index 0000000..cd13bb2
--- /dev/null
+++ b/app/modules/depositor_models/depositor_models/db_setting.py
@@ -0,0 +1,68 @@
+import os
+
+from typing import NoReturn
+
+from flask_sqlalchemy import SQLAlchemy
+from sqlalchemy import create_engine
+from sqlalchemy.engine import Engine
+from sqlalchemy.orm import Session, sessionmaker, scoped_session
+from sqlalchemy.pool import QueuePool
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy import MetaData, event, util, DateTime
+from werkzeug.local import LocalProxy
+from werkzeug.utils import import_string
+from datetime import datetime
+from sqlalchemy.dialects import mysql, postgresql
+
+HOST_NAME=os.environ.get("DEPOSITOR_POSTGRESQL_HOST") #postgresql
+DBNAME=os.environ.get("DEPOSITOR_POSTGRESQL_DBNAME") #depositor
+DBPASS=os.environ.get("DEPOSITOR_POSTGRESQL_DBPASS") #dbpass123
+DBUSER=os.environ.get("DEPOSITOR_POSTGRESQL_DBUSER") #depositor
+# 接続先DBの設定
+DATABASE_URI = HOST_NAME+"://"+DBUSER+":"+DBPASS+"@"+HOST_NAME+":5432/"+ DBNAME
+# DATABASE = 'postgresql://depositor:dbpass123@postgresql:5432/depositor'
+
+Engine = create_engine(
+ DATABASE_URI,
+ echo=False
+)
+
+session = scoped_session(sessionmaker(bind = Engine))
+NAMING_CONVENTION = util.immutabledict({
+ 'ix': 'ix_%(column_0_label)s',
+ 'uq': 'uq_%(table_name)s_%(column_0_name)s',
+ 'ck': 'ck_%(table_name)s_%(constraint_name)s',
+ 'fk': 'fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s',
+ 'pk': 'pk_%(table_name)s',
+})
+"""Configuration for constraint naming conventions."""
+
+metadata = MetaData(naming_convention=NAMING_CONVENTION)
+"""Default database metadata object holding associated schema constructs."""
+
+
+db = SQLAlchemy(metadata=metadata)
+
+class Timestamp(object):
+ """Timestamp model mix-in with fractional seconds support.
+
+ SQLAlchemy-Utils timestamp model does not have support for
+ fractional seconds.
+ """
+
+ created = db.Column(
+ DateTime().with_variant(mysql.DATETIME(fsp=6), 'mysql'),
+ default=datetime.utcnow,
+ nullable=False
+ )
+ updated = db.Column(
+ DateTime().with_variant(mysql.DATETIME(fsp=6), 'mysql'),
+ default=datetime.utcnow,
+ nullable=False
+ )
+
+Base = declarative_base()
+Base.query = session.query_property()
+
+def init_db(app):
+ db.init_app(app)
\ No newline at end of file
diff --git a/app/modules/depositor_models/depositor_models/user.py b/app/modules/depositor_models/depositor_models/user.py
new file mode 100644
index 0000000..ecbe4aa
--- /dev/null
+++ b/app/modules/depositor_models/depositor_models/user.py
@@ -0,0 +1,66 @@
+from flask import current_app
+from flask_security import RoleMixin, UserMixin
+from sqlalchemy import Column, Integer, String, Float, DateTime, Sequence
+from .db_setting import Engine, Base, db, Timestamp
+
+
+
+class User(db.Model, UserMixin, Timestamp):
+ """User data model."""
+
+ __tablename__ = "user"
+
+ __table_args__={'extend_existing': True}
+
+ id = db.Column(Integer, primary_key=True, nullable=False, unique=True, autoincrement=True, default=Sequence("user_id_seq"))
+
+ is_active = True
+
+ user_id = db.Column(String(80), nullable=False)
+
+ affiliation_id = db.Column(Integer, nullable=False)
+
+ user_orcid = db.Column(String(80))
+
+ role = db.Column(String(80))
+
+
+class User_manager(object):
+ """operated on the user"""
+ @classmethod
+ def create_user(cls, user):
+ """ create new user
+ :param user:
+ :return:
+ """
+ assert user
+ try:
+ with db.session.begin_nested():
+ db.session.add(user)
+ db.session.commit()
+ except Exception as ex:
+ db.session.rollback()
+ current_app.logger.error(ex)
+ raise ex
+
+ return user
+
+ @classmethod
+ def get_user_by_id(cls, id):
+ with db.session.no_autoflush:
+ query = User.query.filter_by(id=id)
+ return query.one_or_none()
+
+ @classmethod
+ def get_user_by_user_id(cls, user_id):
+ with db.session.no_autoflush:
+ query = User.query.filter_by(user_id=user_id)
+ return query.one_or_none()
+
+ @classmethod
+ def get_users_by_affiliation_id(cls, affiliation_id):
+ with db.session.no_autoflush:
+ query = User.query.filter_by(affiliation_id=affiliation_id)
+ return query.all()
+
+
\ No newline at end of file
diff --git a/app/modules/depositor_models/requirements.txt b/app/modules/depositor_models/requirements.txt
new file mode 100644
index 0000000..67bcd6d
--- /dev/null
+++ b/app/modules/depositor_models/requirements.txt
@@ -0,0 +1,38 @@
+
+-e ../depositor_admin_setting
+-e ../depositor_item_register
+-e ../depositor_login
+-e ../depositor_models
+-e ../../../src/grobid_client
+email-validator
+Flask==2.2.0
+Flask-Admin==1.6.1
+Flask-Alembic==2.0.1
+Flask-Assets==2.1.0
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==2.1.0
+Flask-Collect==1.3.2
+Flask-Cors==4.0.0
+Flask-Login==0.6.3
+# Flask-OAuthlib==0.9.6
+Flask-WTF
+Flask-Security==3.0.0
+Flask-SQLAlchemy==3.0.2
+flask-marshmallow==0.14.0
+github3.py==1.1.0
+itsdangerous==2.1.2
+mock == 5.1.0
+pytest-mock == 3.12.0
+psycopg2==2.9.9
+pytz
+requests==2.31.0
+requests-oauthlib==1.3.1
+SQLAlchemy==2.0.27
+SQLAlchemy-Continuum==1.4.0
+SQLAlchemy-Utils==0.41.1
+# fpdf==1.7.2
+sword3common==0.1.1
+uWSGI==2.0.24
+wtforms==3.1.2
+Werkzeug==2.3.7
\ No newline at end of file
diff --git a/app/modules/depositor_models/setup.py b/app/modules/depositor_models/setup.py
new file mode 100644
index 0000000..d53a81f
--- /dev/null
+++ b/app/modules/depositor_models/setup.py
@@ -0,0 +1,14 @@
+from setuptools import setup, find_packages
+
+setup(
+ name='depositor_models',
+ version='1.0.0',
+ author='Your Name',
+ author_email='your.email@example.com',
+ description='A short description of your package',
+ packages=find_packages(),
+ install_requires=[
+ ],
+ entry_points={
+ },
+)
\ No newline at end of file
diff --git a/app/modules/depositor_models/tests/__init__.py b/app/modules/depositor_models/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/app/modules/depositor_models/tests/conftest.py b/app/modules/depositor_models/tests/conftest.py
new file mode 100644
index 0000000..6f20e99
--- /dev/null
+++ b/app/modules/depositor_models/tests/conftest.py
@@ -0,0 +1,41 @@
+import pytest
+import os
+from flask import Flask, url_for
+from sqlalchemy_utils.functions import create_database, database_exists, drop_database
+from depositor_admin_setting import AdminSettingApp
+from depositor_item_register import ItemRegisterApp
+from depositor_login import LoginApp
+from depositor_models.db_setting import db as db_
+from depositor_models.db_setting import DATABASE_URI, init_db
+
+@pytest.fixture()
+def base_app():
+ app_ = Flask("testapp")
+ app_.config["SQLALCHEMY_DATABASE_URI"]=DATABASE_URI
+ AdminSettingApp(app_)
+ ItemRegisterApp(app_)
+ LoginApp(app_)
+ return app_
+
+@pytest.yield_fixture()
+def app(base_app):
+ with base_app.app_context():
+ yield base_app
+
+@pytest.yield_fixture()
+def db(app):
+ print()
+ init_db(app)
+ if not database_exists(DATABASE_URI):
+ create_database(DATABASE_URI)
+ db_.create_all()
+ yield db_
+ db_.session.remove()
+ db_.drop_all()
+
+
+@pytest.yield_fixture()
+def client(app):
+ """Get test client."""
+ with app.test_client() as client:
+ yield client
diff --git a/app/modules/depositor_models/tests/test_affiliation_id.py b/app/modules/depositor_models/tests/test_affiliation_id.py
new file mode 100644
index 0000000..cf4b5f8
--- /dev/null
+++ b/app/modules/depositor_models/tests/test_affiliation_id.py
@@ -0,0 +1,40 @@
+from mock import patch,MagicMock
+import pytest
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+
+
+def test_Affiliation_Id_manager(app, db):
+ manager = Affiliation_Id_manager()
+ aff_idp_url_1 = "https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO"
+ aff_idp_url_2 = "https://idp.auth.betabeta.ac.jp/idp/profile/SAML2/Redirect/SSO"
+ test_affiliation_id_1 = Affiliation_Id(id=1, affiliation_idp_url=aff_idp_url_1, affiliation_name="alpha")
+ test_affiliation_id_2 = Affiliation_Id(id=2, affiliation_idp_url=aff_idp_url_2, affiliation_name="beta")
+ # 正常系
+ result = manager.create_affiliation_id(test_affiliation_id_1)
+ db_result = manager.get_affiliation_id_by_id(1)
+ assert (test_affiliation_id_1.id == result.id and test_affiliation_id_1.affiliation_idp_url == result.affiliation_idp_url and test_affiliation_id_1.affiliation_name == result.affiliation_name)
+ assert (test_affiliation_id_1.id == db_result.id and test_affiliation_id_1.affiliation_idp_url == db_result.affiliation_idp_url and test_affiliation_id_1.affiliation_name == db_result.affiliation_name)
+ # 異常系
+ with pytest.raises(Exception) as ex:
+ result = manager.create_affiliation_id("test_affiliation_id_1")
+
+ result = manager.create_affiliation_id(test_affiliation_id_2)
+ db_result = manager.get_affiliation_id_by_id(2)
+ assert (test_affiliation_id_2.id == result.id and test_affiliation_id_2.affiliation_idp_url == result.affiliation_idp_url and test_affiliation_id_2.affiliation_name == result.affiliation_name)
+ assert (test_affiliation_id_2.id == db_result.id and test_affiliation_id_2.affiliation_idp_url == db_result.affiliation_idp_url and test_affiliation_id_2.affiliation_name == db_result.affiliation_name)
+
+ assert manager.get_affiliation_id_by_id(99999)==None
+
+ result = manager.get_affiliation_id_by_affiliation_name(test_affiliation_id_1.affiliation_name)
+ assert (test_affiliation_id_1.id == result.id and test_affiliation_id_1.affiliation_idp_url == result.affiliation_idp_url and test_affiliation_id_1.affiliation_name == result.affiliation_name)
+
+ assert manager.get_affiliation_id_by_affiliation_name("Not exist") == None
+
+ result = manager.get_affiliation_id_by_idp_url(test_affiliation_id_1.affiliation_idp_url)
+ assert (test_affiliation_id_1.id == result.id and test_affiliation_id_1.affiliation_idp_url == result.affiliation_idp_url and test_affiliation_id_1.affiliation_name == result.affiliation_name)
+
+ assert manager.get_affiliation_id_by_idp_url("Not exist") == None
+
+ result = manager.get_affiliation_id_list()
+ assert result == [test_affiliation_id_1, test_affiliation_id_2]
+
\ No newline at end of file
diff --git a/app/modules/depositor_models/tests/test_affiliation_repository.py b/app/modules/depositor_models/tests/test_affiliation_repository.py
new file mode 100644
index 0000000..7fe3782
--- /dev/null
+++ b/app/modules/depositor_models/tests/test_affiliation_repository.py
@@ -0,0 +1,66 @@
+from mock import patch,MagicMock
+import pytest
+from depositor_models.affiliation_repository import Affiliation_Repository, Affiliation_Repository_manager
+from depositor_models.affiliation_id import Affiliation_Id, Affiliation_Id_manager
+
+def test_Affiliation_Repository_manager(app, db):
+
+ aff_idp_url_1 = "https://idp.auth.alphaalpha.ac.jp/idp/profile/SAML2/Redirect/SSO"
+ test_affiliation_id_1 = Affiliation_Id(id=1, affiliation_idp_url=aff_idp_url_1, affiliation_name="alpha")
+ # 正常系
+ Affiliation_Id_manager.create_affiliation_id(test_affiliation_id_1)
+
+ manager = Affiliation_Repository_manager()
+ aff_url_1 = "https://idp.auth.alphaalpha.ac.jp"
+ aff_url_2 = "https://idp.auth.betabeta.ac.jp"
+ test_affiliation_repository_1 = Affiliation_Repository(id=1, affiliation_id=1, repository_url=aff_url_1, access_token = "aaaaa")
+ test_affiliation_repository_2 = Affiliation_Repository(id=2, affiliation_id=2, repository_url=aff_url_2, access_token = "bbbbb")
+ # 正常系
+ result = manager.create_aff_repository(test_affiliation_repository_1)
+ assert (test_affiliation_repository_1.id == result.id and test_affiliation_repository_1.affiliation_id == result.affiliation_id and test_affiliation_repository_1.repository_url == result.repository_url and test_affiliation_repository_1.access_token == result.access_token)
+ # 異常系
+ with pytest.raises(Exception) as ex:
+ result = manager.create_aff_repository("test_affiliation_repository_1")
+
+ # 正常系
+ aff_repository = {"id":test_affiliation_repository_1.id,
+ "affiliation_id":test_affiliation_repository_1.id,
+ "repository_url":test_affiliation_repository_1.repository_url,
+ "access_token":"ccccc"}
+ result = manager.upt_aff_repository(aff_repository)
+ db_result = manager.get_aff_repository_by_affiliation_id(test_affiliation_repository_1.affiliation_id)
+ assert result == db_result
+
+ aff_repository["id"] = 5
+ result = manager.upt_aff_repository(aff_repository)
+ db_result = manager.get_aff_repository_by_affiliation_id(test_affiliation_repository_1.affiliation_id)
+ assert result != db_result
+
+ aff_repository["id"] = 1
+ aff_repository["access_token"] = "aaaaa"
+ result = manager.upt_aff_repository(aff_repository)
+ db_result = manager.get_aff_repository_by_affiliation_id(test_affiliation_repository_1.affiliation_id)
+ assert result == db_result
+
+ # 異常系
+ with pytest.raises(Exception) as ex:
+ result = manager.upt_aff_repository("test_affiliation_repository_1")
+
+ result = manager.create_aff_repository(test_affiliation_repository_2)
+ assert (test_affiliation_repository_2.id == result.id and test_affiliation_repository_2.affiliation_id == result.affiliation_id and test_affiliation_repository_2.repository_url == result.repository_url and test_affiliation_repository_2.access_token == result.access_token)
+
+ result = manager.get_aff_repository_by_affiliation_id(test_affiliation_repository_1.affiliation_id)
+ assert (test_affiliation_repository_1.id == result.id and test_affiliation_repository_1.affiliation_id == result.affiliation_id and test_affiliation_repository_1.repository_url == result.repository_url and test_affiliation_repository_1.access_token == result.access_token)
+
+ assert manager.get_aff_repository_by_affiliation_id(999999) == None
+
+
+
+ result = manager.get_aff_repository_by_affiliation_name(test_affiliation_id_1.affiliation_name)
+ assert (test_affiliation_repository_1.id == result.id and test_affiliation_repository_1.affiliation_id == result.affiliation_id and test_affiliation_repository_1.repository_url == result.repository_url and test_affiliation_repository_1.access_token == result.access_token)
+
+ assert manager.get_aff_repository_by_affiliation_name("Not exist") == None
+
+ result = manager.get_affiliation_repository_list()
+ assert result == [test_affiliation_repository_1, test_affiliation_repository_2]
+
\ No newline at end of file
diff --git a/app/modules/depositor_models/tests/test_user.py b/app/modules/depositor_models/tests/test_user.py
new file mode 100644
index 0000000..d41a7aa
--- /dev/null
+++ b/app/modules/depositor_models/tests/test_user.py
@@ -0,0 +1,35 @@
+from mock import patch,MagicMock
+import pytest
+from depositor_models.user import User, User_manager
+
+
+def test_User_manager(app, db):
+ manager = User_manager()
+ test_user_1 = User(id=1, user_id="test_user@test.com", affiliation_id=1, user_orcid = "test_user", role = "")
+ test_user_2 =User(id=2, user_id="TEST_USER@test.com", affiliation_id=1, user_orcid = "test_user", role = "Admin")
+ # 正常系
+ result = manager.create_user(test_user_1)
+ db_result = manager.get_user_by_id(1)
+ assert (test_user_1.id == result.id and test_user_1.user_id == result.user_id and test_user_1.affiliation_id == result.affiliation_id and test_user_1.user_orcid == result.user_orcid)
+ assert (test_user_1.id == db_result.id and test_user_1.user_id == db_result.user_id and test_user_1.affiliation_id == db_result.affiliation_id and test_user_1.user_orcid == db_result.user_orcid)
+ # 異常系
+ with pytest.raises(Exception) as ex:
+ # test_user_1 =User(id="あああ", user_id="test_user@test.com", affiliation_id=1, user_orcid = "test_user", role = "")
+ result = manager.create_user("test_user_1")
+
+ result = manager.create_user(test_user_2)
+ db_result = manager.get_user_by_id(2)
+ assert (test_user_2.id == result.id and test_user_2.user_id == result.user_id and test_user_2.affiliation_id == result.affiliation_id and test_user_2.user_orcid == result.user_orcid)
+ assert (test_user_2.id == db_result.id and test_user_2.user_id == db_result.user_id and test_user_2.affiliation_id == db_result.affiliation_id and test_user_2.user_orcid == db_result.user_orcid)
+
+ assert manager.get_user_by_id(999999) == None
+
+ result = manager.get_user_by_user_id(test_user_1.user_id)
+ assert (test_user_1.id == result.id and test_user_1.user_id == result.user_id and test_user_1.affiliation_id == result.affiliation_id and test_user_1.user_orcid == result.user_orcid)
+
+ assert manager.get_user_by_user_id("Not exist") == None
+
+ result = manager.get_users_by_affiliation_id(1)
+ assert result == [test_user_1,test_user_2]
+
+ assert manager.get_users_by_affiliation_id(9999999) == []
\ No newline at end of file
diff --git a/app/modules/depositor_models/tox.ini b/app/modules/depositor_models/tox.ini
new file mode 100644
index 0000000..4c8c21b
--- /dev/null
+++ b/app/modules/depositor_models/tox.ini
@@ -0,0 +1,45 @@
+[tox]
+envlist = c1
+
+skip_missing_interpreters = true
+
+[tool:pytest]
+minversion = 3.0
+testpaths = tests
+
+[coverage:run]
+source =
+ depositor_models
+ tests
+
+[coverage:paths]
+source =
+ depositor_models
+ tests
+ .tox/*/lib/python*/site-packages/depositor_models
+ .tox/*/lib/python*/site-packages/depositor_models/tests
+
+
+[isort]
+profile=black
+
+[tool:isort]
+line_length = 119
+
+[testenv:c1]
+passenv = LANG
+setenv =
+ DEPOSITOR_WEB_HOST=127.0.0.1
+ DEPOSITOR_POSTGRESQL_HOST=postgresql
+ DEPOSITOR_POSTGRESQL_DBNAME=depositer_test
+ DEPOSITOR_POSTGRESQL_DBUSER=depositor
+ DEPOSITOR_POSTGRESQL_DBPASS=dbpass123
+ TMPORARY_FILE_PATH=./tmp/
+ MOCK_PASSWORD=testpass
+deps =
+ pytest>=3
+ pytest-cov
+ -rrequirements.txt
+ setuptools
+commands =
+ pytest --cov=depositor_models tests -v -s -vv --cov-branch --cov-report=term --cov-report=xml --cov-report=html --cov-config=tox.ini --basetemp="{envtmpdir}" {posargs}
diff --git a/app/requirements-depositor-modules.txt b/app/requirements-depositor-modules.txt
new file mode 100644
index 0000000..5e4f21a
--- /dev/null
+++ b/app/requirements-depositor-modules.txt
@@ -0,0 +1,5 @@
+/code/modules/depositor_admin_setting
+/code/modules/depositor_grobid_client
+/code/modules/depositor_item_register
+/code/modules/depositor_login
+/code/modules/depositor_models
\ No newline at end of file
diff --git a/app/requirements.txt b/app/requirements.txt
new file mode 100644
index 0000000..7e09d91
--- /dev/null
+++ b/app/requirements.txt
@@ -0,0 +1,30 @@
+email-validator
+Flask==2.2.0
+Flask-Admin==1.6.1
+Flask-Alembic==2.0.1
+Flask-Assets==2.1.0
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==2.1.0
+Flask-Collect==1.3.2
+Flask-Cors==4.0.0
+Flask-Login==0.6.3
+# Flask-OAuthlib==0.9.6
+Flask-WTF
+Flask-Security==3.0.0
+Flask-SQLAlchemy==3.0.2
+flask-marshmallow==0.14.0
+github3.py==1.1.0
+itsdangerous==2.1.2
+psycopg2==2.9.9
+pytz
+requests==2.31.0
+requests-oauthlib==1.3.1
+SQLAlchemy==2.0.27
+SQLAlchemy-Continuum==1.4.0
+SQLAlchemy-Utils==0.41.1
+# fpdf==1.7.2
+sword3common==0.1.1
+uWSGI==2.0.24
+wtforms==3.1.2
+Werkzeug==2.3.7
\ No newline at end of file
diff --git a/app/static/css/admin.css b/app/static/css/admin.css
new file mode 100644
index 0000000..a944b80
--- /dev/null
+++ b/app/static/css/admin.css
@@ -0,0 +1,963 @@
+/*!
+ * Quill Editor v1.3.6
+ * https://quilljs.com/
+ * Copyright (c) 2014, Jason Chen
+ * Copyright (c) 2013, salesforce.com
+ */
+ .ql-container {
+ box-sizing: border-box;
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ height: 100%;
+ margin: 0px;
+ position: relative;
+ }
+ .ql-container.ql-disabled .ql-tooltip {
+ visibility: hidden;
+ }
+ .ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
+ pointer-events: none;
+ }
+ .ql-clipboard {
+ left: -100000px;
+ height: 1px;
+ overflow-y: hidden;
+ position: absolute;
+ top: 50%;
+ }
+ .ql-clipboard p {
+ margin: 0;
+ padding: 0;
+ }
+ .ql-editor {
+ box-sizing: border-box;
+ line-height: 1.42;
+ height: 100%;
+ outline: none;
+ overflow-y: auto;
+ padding: 12px 15px;
+ tab-size: 4;
+ -moz-tab-size: 4;
+ text-align: left;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ }
+ .ql-editor > * {
+ cursor: text;
+ }
+ .ql-editor p,
+ .ql-editor ol,
+ .ql-editor ul,
+ .ql-editor pre,
+ .ql-editor blockquote,
+ .ql-editor h1,
+ .ql-editor h2,
+ .ql-editor h3,
+ .ql-editor h4,
+ .ql-editor h5,
+ .ql-editor h6 {
+ margin: 0;
+ padding: 0;
+ counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol,
+ .ql-editor ul {
+ padding-left: 1.5em;
+ }
+ .ql-editor ol > li,
+ .ql-editor ul > li {
+ list-style-type: none;
+ }
+ .ql-editor ul > li::before {
+ content: '\2022';
+ }
+ .ql-editor ul[data-checked=true],
+ .ql-editor ul[data-checked=false] {
+ pointer-events: none;
+ }
+ .ql-editor ul[data-checked=true] > li *,
+ .ql-editor ul[data-checked=false] > li * {
+ pointer-events: all;
+ }
+ .ql-editor ul[data-checked=true] > li::before,
+ .ql-editor ul[data-checked=false] > li::before {
+ color: #777;
+ cursor: pointer;
+ pointer-events: all;
+ }
+ .ql-editor ul[data-checked=true] > li::before {
+ content: '\2611';
+ }
+ .ql-editor ul[data-checked=false] > li::before {
+ content: '\2610';
+ }
+ .ql-editor li::before {
+ display: inline-block;
+ white-space: nowrap;
+ width: 1.2em;
+ }
+ .ql-editor li:not(.ql-direction-rtl)::before {
+ margin-left: -1.5em;
+ margin-right: 0.3em;
+ text-align: right;
+ }
+ .ql-editor li.ql-direction-rtl::before {
+ margin-left: 0.3em;
+ margin-right: -1.5em;
+ }
+ .ql-editor ol li:not(.ql-direction-rtl),
+ .ql-editor ul li:not(.ql-direction-rtl) {
+ padding-left: 1.5em;
+ }
+ .ql-editor ol li.ql-direction-rtl,
+ .ql-editor ul li.ql-direction-rtl {
+ padding-right: 1.5em;
+ }
+ .ql-editor ol li {
+ counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
+ counter-increment: list-0;
+ }
+ .ql-editor ol li:before {
+ content: counter(list-0, decimal) '. ';
+ }
+ .ql-editor ol li.ql-indent-1 {
+ counter-increment: list-1;
+ }
+ .ql-editor ol li.ql-indent-1:before {
+ content: counter(list-1, lower-alpha) '. ';
+ }
+ .ql-editor ol li.ql-indent-1 {
+ counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-2 {
+ counter-increment: list-2;
+ }
+ .ql-editor ol li.ql-indent-2:before {
+ content: counter(list-2, lower-roman) '. ';
+ }
+ .ql-editor ol li.ql-indent-2 {
+ counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-3 {
+ counter-increment: list-3;
+ }
+ .ql-editor ol li.ql-indent-3:before {
+ content: counter(list-3, decimal) '. ';
+ }
+ .ql-editor ol li.ql-indent-3 {
+ counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-4 {
+ counter-increment: list-4;
+ }
+ .ql-editor ol li.ql-indent-4:before {
+ content: counter(list-4, lower-alpha) '. ';
+ }
+ .ql-editor ol li.ql-indent-4 {
+ counter-reset: list-5 list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-5 {
+ counter-increment: list-5;
+ }
+ .ql-editor ol li.ql-indent-5:before {
+ content: counter(list-5, lower-roman) '. ';
+ }
+ .ql-editor ol li.ql-indent-5 {
+ counter-reset: list-6 list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-6 {
+ counter-increment: list-6;
+ }
+ .ql-editor ol li.ql-indent-6:before {
+ content: counter(list-6, decimal) '. ';
+ }
+ .ql-editor ol li.ql-indent-6 {
+ counter-reset: list-7 list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-7 {
+ counter-increment: list-7;
+ }
+ .ql-editor ol li.ql-indent-7:before {
+ content: counter(list-7, lower-alpha) '. ';
+ }
+ .ql-editor ol li.ql-indent-7 {
+ counter-reset: list-8 list-9;
+ }
+ .ql-editor ol li.ql-indent-8 {
+ counter-increment: list-8;
+ }
+ .ql-editor ol li.ql-indent-8:before {
+ content: counter(list-8, lower-roman) '. ';
+ }
+ .ql-editor ol li.ql-indent-8 {
+ counter-reset: list-9;
+ }
+ .ql-editor ol li.ql-indent-9 {
+ counter-increment: list-9;
+ }
+ .ql-editor ol li.ql-indent-9:before {
+ content: counter(list-9, decimal) '. ';
+ }
+ .ql-editor .ql-indent-1:not(.ql-direction-rtl) {
+ padding-left: 3em;
+ }
+ .ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
+ padding-left: 4.5em;
+ }
+ .ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
+ padding-right: 3em;
+ }
+ .ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
+ padding-right: 4.5em;
+ }
+ .ql-editor .ql-indent-2:not(.ql-direction-rtl) {
+ padding-left: 6em;
+ }
+ .ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
+ padding-left: 7.5em;
+ }
+ .ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
+ padding-right: 6em;
+ }
+ .ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
+ padding-right: 7.5em;
+ }
+ .ql-editor .ql-indent-3:not(.ql-direction-rtl) {
+ padding-left: 9em;
+ }
+ .ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
+ padding-left: 10.5em;
+ }
+ .ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
+ padding-right: 9em;
+ }
+ .ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
+ padding-right: 10.5em;
+ }
+ .ql-editor .ql-indent-4:not(.ql-direction-rtl) {
+ padding-left: 12em;
+ }
+ .ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
+ padding-left: 13.5em;
+ }
+ .ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
+ padding-right: 12em;
+ }
+ .ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
+ padding-right: 13.5em;
+ }
+ .ql-editor .ql-indent-5:not(.ql-direction-rtl) {
+ padding-left: 15em;
+ }
+ .ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
+ padding-left: 16.5em;
+ }
+ .ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
+ padding-right: 15em;
+ }
+ .ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
+ padding-right: 16.5em;
+ }
+ .ql-editor .ql-indent-6:not(.ql-direction-rtl) {
+ padding-left: 18em;
+ }
+ .ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
+ padding-left: 19.5em;
+ }
+ .ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
+ padding-right: 18em;
+ }
+ .ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
+ padding-right: 19.5em;
+ }
+ .ql-editor .ql-indent-7:not(.ql-direction-rtl) {
+ padding-left: 21em;
+ }
+ .ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
+ padding-left: 22.5em;
+ }
+ .ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
+ padding-right: 21em;
+ }
+ .ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
+ padding-right: 22.5em;
+ }
+ .ql-editor .ql-indent-8:not(.ql-direction-rtl) {
+ padding-left: 24em;
+ }
+ .ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
+ padding-left: 25.5em;
+ }
+ .ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
+ padding-right: 24em;
+ }
+ .ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
+ padding-right: 25.5em;
+ }
+ .ql-editor .ql-indent-9:not(.ql-direction-rtl) {
+ padding-left: 27em;
+ }
+ .ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
+ padding-left: 28.5em;
+ }
+ .ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
+ padding-right: 27em;
+ }
+ .ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
+ padding-right: 28.5em;
+ }
+ .ql-editor .ql-video {
+ display: block;
+ max-width: 100%;
+ }
+ .ql-editor .ql-video.ql-align-center {
+ margin: 0 auto;
+ }
+ .ql-editor .ql-video.ql-align-right {
+ margin: 0 0 0 auto;
+ }
+ .ql-editor .ql-bg-black {
+ background-color: #000;
+ }
+ .ql-editor .ql-bg-red {
+ background-color: #e60000;
+ }
+ .ql-editor .ql-bg-orange {
+ background-color: #f90;
+ }
+ .ql-editor .ql-bg-yellow {
+ background-color: #ff0;
+ }
+ .ql-editor .ql-bg-green {
+ background-color: #008a00;
+ }
+ .ql-editor .ql-bg-blue {
+ background-color: #06c;
+ }
+ .ql-editor .ql-bg-purple {
+ background-color: #93f;
+ }
+ .ql-editor .ql-color-white {
+ color: #fff;
+ }
+ .ql-editor .ql-color-red {
+ color: #e60000;
+ }
+ .ql-editor .ql-color-orange {
+ color: #f90;
+ }
+ .ql-editor .ql-color-yellow {
+ color: #ff0;
+ }
+ .ql-editor .ql-color-green {
+ color: #008a00;
+ }
+ .ql-editor .ql-color-blue {
+ color: #06c;
+ }
+ .ql-editor .ql-color-purple {
+ color: #93f;
+ }
+ .ql-editor .ql-font-serif {
+ font-family: Georgia, Times New Roman, serif;
+ }
+ .ql-editor .ql-font-monospace {
+ font-family: Monaco, Courier New, monospace;
+ }
+ .ql-editor .ql-size-small {
+ font-size: 0.75em;
+ }
+ .ql-editor .ql-size-large {
+ font-size: 1.5em;
+ }
+ .ql-editor .ql-size-huge {
+ font-size: 2.5em;
+ }
+ .ql-editor .ql-direction-rtl {
+ direction: rtl;
+ text-align: inherit;
+ }
+ .ql-editor .ql-align-center {
+ text-align: center;
+ }
+ .ql-editor .ql-align-justify {
+ text-align: justify;
+ }
+ .ql-editor .ql-align-right {
+ text-align: right;
+ }
+ .ql-editor.ql-blank::before {
+ color: rgba(0,0,0,0.6);
+ content: attr(data-placeholder);
+ font-style: italic;
+ left: 15px;
+ pointer-events: none;
+ position: absolute;
+ right: 15px;
+ }
+ .ql-snow.ql-toolbar:after,
+ .ql-snow .ql-toolbar:after {
+ clear: both;
+ content: '';
+ display: table;
+ }
+ .ql-snow.ql-toolbar button,
+ .ql-snow .ql-toolbar button {
+ background: none;
+ border: none;
+ cursor: pointer;
+ display: inline-block;
+ float: left;
+ height: 24px;
+ padding: 3px 5px;
+ width: 28px;
+ }
+ .ql-snow.ql-toolbar button svg,
+ .ql-snow .ql-toolbar button svg {
+ float: left;
+ height: 100%;
+ }
+ .ql-snow.ql-toolbar button:active:hover,
+ .ql-snow .ql-toolbar button:active:hover {
+ outline: none;
+ }
+ .ql-snow.ql-toolbar input.ql-image[type=file],
+ .ql-snow .ql-toolbar input.ql-image[type=file] {
+ display: none;
+ }
+ .ql-snow.ql-toolbar button:hover,
+ .ql-snow .ql-toolbar button:hover,
+ .ql-snow.ql-toolbar button:focus,
+ .ql-snow .ql-toolbar button:focus,
+ .ql-snow.ql-toolbar button.ql-active,
+ .ql-snow .ql-toolbar button.ql-active,
+ .ql-snow.ql-toolbar .ql-picker-label:hover,
+ .ql-snow .ql-toolbar .ql-picker-label:hover,
+ .ql-snow.ql-toolbar .ql-picker-label.ql-active,
+ .ql-snow .ql-toolbar .ql-picker-label.ql-active,
+ .ql-snow.ql-toolbar .ql-picker-item:hover,
+ .ql-snow .ql-toolbar .ql-picker-item:hover,
+ .ql-snow.ql-toolbar .ql-picker-item.ql-selected,
+ .ql-snow .ql-toolbar .ql-picker-item.ql-selected {
+ color: #06c;
+ }
+ .ql-snow.ql-toolbar button:hover .ql-fill,
+ .ql-snow .ql-toolbar button:hover .ql-fill,
+ .ql-snow.ql-toolbar button:focus .ql-fill,
+ .ql-snow .ql-toolbar button:focus .ql-fill,
+ .ql-snow.ql-toolbar button.ql-active .ql-fill,
+ .ql-snow .ql-toolbar button.ql-active .ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
+ .ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
+ .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
+ fill: #06c;
+ }
+ .ql-snow.ql-toolbar button:hover .ql-stroke,
+ .ql-snow .ql-toolbar button:hover .ql-stroke,
+ .ql-snow.ql-toolbar button:focus .ql-stroke,
+ .ql-snow .ql-toolbar button:focus .ql-stroke,
+ .ql-snow.ql-toolbar button.ql-active .ql-stroke,
+ .ql-snow .ql-toolbar button.ql-active .ql-stroke,
+ .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
+ .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
+ .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
+ .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
+ .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
+ .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
+ .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
+ .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
+ .ql-snow.ql-toolbar button:hover .ql-stroke-miter,
+ .ql-snow .ql-toolbar button:hover .ql-stroke-miter,
+ .ql-snow.ql-toolbar button:focus .ql-stroke-miter,
+ .ql-snow .ql-toolbar button:focus .ql-stroke-miter,
+ .ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
+ .ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
+ .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
+ .ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
+ .ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
+ .ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
+ .ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
+ .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
+ .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
+ .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
+ stroke: #06c;
+ }
+ @media (pointer: coarse) {
+ .ql-snow.ql-toolbar button:hover:not(.ql-active),
+ .ql-snow .ql-toolbar button:hover:not(.ql-active) {
+ color: #444;
+ }
+ .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,
+ .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,
+ .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,
+ .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {
+ fill: #444;
+ }
+ .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,
+ .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,
+ .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,
+ .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {
+ stroke: #444;
+ }
+ }
+ .ql-snow {
+ box-sizing: border-box;
+ }
+ .ql-snow * {
+ box-sizing: border-box;
+ }
+ .ql-snow .ql-hidden {
+ display: none;
+ }
+ .ql-snow .ql-out-bottom,
+ .ql-snow .ql-out-top {
+ visibility: hidden;
+ }
+ .ql-snow .ql-tooltip {
+ position: absolute;
+ transform: translateY(10px);
+ }
+ .ql-snow .ql-tooltip a {
+ cursor: pointer;
+ text-decoration: none;
+ }
+ .ql-snow .ql-tooltip.ql-flip {
+ transform: translateY(-10px);
+ }
+ .ql-snow .ql-formats {
+ display: inline-block;
+ vertical-align: middle;
+ }
+ .ql-snow .ql-formats:after {
+ clear: both;
+ content: '';
+ display: table;
+ }
+ .ql-snow .ql-stroke {
+ fill: none;
+ stroke: #444;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+ stroke-width: 2;
+ }
+ .ql-snow .ql-stroke-miter {
+ fill: none;
+ stroke: #444;
+ stroke-miterlimit: 10;
+ stroke-width: 2;
+ }
+ .ql-snow .ql-fill,
+ .ql-snow .ql-stroke.ql-fill {
+ fill: #444;
+ }
+ .ql-snow .ql-empty {
+ fill: none;
+ }
+ .ql-snow .ql-even {
+ fill-rule: evenodd;
+ }
+ .ql-snow .ql-thin,
+ .ql-snow .ql-stroke.ql-thin {
+ stroke-width: 1;
+ }
+ .ql-snow .ql-transparent {
+ opacity: 0.4;
+ }
+ .ql-snow .ql-direction svg:last-child {
+ display: none;
+ }
+ .ql-snow .ql-direction.ql-active svg:last-child {
+ display: inline;
+ }
+ .ql-snow .ql-direction.ql-active svg:first-child {
+ display: none;
+ }
+ .ql-snow .ql-editor h1 {
+ font-size: 2em;
+ }
+ .ql-snow .ql-editor h2 {
+ font-size: 1.5em;
+ }
+ .ql-snow .ql-editor h3 {
+ font-size: 1.17em;
+ }
+ .ql-snow .ql-editor h4 {
+ font-size: 1em;
+ }
+ .ql-snow .ql-editor h5 {
+ font-size: 0.83em;
+ }
+ .ql-snow .ql-editor h6 {
+ font-size: 0.67em;
+ }
+ .ql-snow .ql-editor a {
+ text-decoration: underline;
+ }
+ .ql-snow .ql-editor blockquote {
+ border-left: 4px solid #ccc;
+ margin-bottom: 5px;
+ margin-top: 5px;
+ padding-left: 16px;
+ }
+ .ql-snow .ql-editor code,
+ .ql-snow .ql-editor pre {
+ background-color: #f0f0f0;
+ border-radius: 3px;
+ }
+ .ql-snow .ql-editor pre {
+ white-space: pre-wrap;
+ margin-bottom: 5px;
+ margin-top: 5px;
+ padding: 5px 10px;
+ }
+ .ql-snow .ql-editor code {
+ font-size: 85%;
+ padding: 2px 4px;
+ }
+ .ql-snow .ql-editor pre.ql-syntax {
+ background-color: #23241f;
+ color: #f8f8f2;
+ overflow: visible;
+ }
+ .ql-snow .ql-editor img {
+ max-width: 100%;
+ }
+ .ql-snow .ql-picker {
+ color: #444;
+ display: inline-block;
+ float: left;
+ font-size: 14px;
+ font-weight: 500;
+ height: 24px;
+ position: relative;
+ vertical-align: middle;
+ }
+ .ql-snow .ql-picker-label {
+ cursor: pointer;
+ display: inline-block;
+ height: 100%;
+ padding-left: 8px;
+ padding-right: 2px;
+ position: relative;
+ width: 100%;
+ }
+ .ql-snow .ql-picker-label::before {
+ display: inline-block;
+ line-height: 22px;
+ }
+ .ql-snow .ql-picker-options {
+ background-color: #fff;
+ display: none;
+ min-width: 100%;
+ padding: 4px 8px;
+ position: absolute;
+ white-space: nowrap;
+ }
+ .ql-snow .ql-picker-options .ql-picker-item {
+ cursor: pointer;
+ display: block;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ }
+ .ql-snow .ql-picker.ql-expanded .ql-picker-label {
+ color: #ccc;
+ z-index: 2;
+ }
+ .ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
+ fill: #ccc;
+ }
+ .ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
+ stroke: #ccc;
+ }
+ .ql-snow .ql-picker.ql-expanded .ql-picker-options {
+ display: block;
+ margin-top: -1px;
+ top: 100%;
+ z-index: 1;
+ }
+ .ql-snow .ql-color-picker,
+ .ql-snow .ql-icon-picker {
+ width: 28px;
+ }
+ .ql-snow .ql-color-picker .ql-picker-label,
+ .ql-snow .ql-icon-picker .ql-picker-label {
+ padding: 2px 4px;
+ }
+ .ql-snow .ql-color-picker .ql-picker-label svg,
+ .ql-snow .ql-icon-picker .ql-picker-label svg {
+ right: 4px;
+ }
+ .ql-snow .ql-icon-picker .ql-picker-options {
+ padding: 4px 0px;
+ }
+ .ql-snow .ql-icon-picker .ql-picker-item {
+ height: 24px;
+ width: 24px;
+ padding: 2px 4px;
+ }
+ .ql-snow .ql-color-picker .ql-picker-options {
+ padding: 3px 5px;
+ width: 152px;
+ }
+ .ql-snow .ql-color-picker .ql-picker-item {
+ border: 1px solid transparent;
+ float: left;
+ height: 16px;
+ margin: 2px;
+ padding: 0px;
+ width: 16px;
+ }
+ .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
+ position: absolute;
+ margin-top: -9px;
+ right: 0;
+ top: 50%;
+ width: 18px;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
+ .ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
+ .ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
+ content: attr(data-label);
+ }
+ .ql-snow .ql-picker.ql-header {
+ width: 98px;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item::before {
+ content: 'Normal';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+ content: 'Heading 1';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+ content: 'Heading 2';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+ content: 'Heading 3';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+ content: 'Heading 4';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+ content: 'Heading 5';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+ content: 'Heading 6';
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+ font-size: 2em;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+ font-size: 1.5em;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+ font-size: 1.17em;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+ font-size: 1em;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+ font-size: 0.83em;
+ }
+ .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+ font-size: 0.67em;
+ }
+ .ql-snow .ql-picker.ql-font {
+ width: 108px;
+ }
+ .ql-snow .ql-picker.ql-font .ql-picker-label::before,
+ .ql-snow .ql-picker.ql-font .ql-picker-item::before {
+ content: 'Sans Serif';
+ }
+ .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
+ .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
+ content: 'Serif';
+ }
+ .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
+ .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
+ content: 'Monospace';
+ }
+ .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
+ font-family: Georgia, Times New Roman, serif;
+ }
+ .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
+ font-family: Monaco, Courier New, monospace;
+ }
+ .ql-snow .ql-picker.ql-size {
+ width: 98px;
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-label::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-item::before {
+ content: 'Normal';
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
+ content: 'Small';
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
+ content: 'Large';
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
+ content: 'Huge';
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
+ font-size: 10px;
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
+ font-size: 18px;
+ }
+ .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
+ font-size: 32px;
+ }
+ .ql-snow .ql-color-picker.ql-background .ql-picker-item {
+ background-color: #fff;
+ }
+ .ql-snow .ql-color-picker.ql-color .ql-picker-item {
+ background-color: #000;
+ }
+ .ql-toolbar.ql-snow {
+ border: 1px solid #ccc;
+ box-sizing: border-box;
+ font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
+ padding: 8px;
+ }
+ .ql-toolbar.ql-snow .ql-formats {
+ margin-right: 15px;
+ }
+ .ql-toolbar.ql-snow .ql-picker-label {
+ border: 1px solid transparent;
+ }
+ .ql-toolbar.ql-snow .ql-picker-options {
+ border: 1px solid transparent;
+ box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
+ }
+ .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
+ border-color: #ccc;
+ }
+ .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
+ border-color: #ccc;
+ }
+ .ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
+ .ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
+ border-color: #000;
+ }
+ .ql-toolbar.ql-snow + .ql-container.ql-snow {
+ border-top: 0px;
+ }
+ .ql-snow .ql-tooltip {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ box-shadow: 0px 0px 5px #ddd;
+ color: #444;
+ padding: 5px 12px;
+ white-space: nowrap;
+ }
+ .ql-snow .ql-tooltip::before {
+ content: "Visit URL:";
+ line-height: 26px;
+ margin-right: 8px;
+ }
+ .ql-snow .ql-tooltip input[type=text] {
+ display: none;
+ border: 1px solid #ccc;
+ font-size: 13px;
+ height: 26px;
+ margin: 0px;
+ padding: 3px 5px;
+ width: 170px;
+ }
+ .ql-snow .ql-tooltip a.ql-preview {
+ display: inline-block;
+ max-width: 200px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ vertical-align: top;
+ }
+ .ql-snow .ql-tooltip a.ql-action::after {
+ border-right: 1px solid #ccc;
+ content: 'Edit';
+ margin-left: 16px;
+ padding-right: 8px;
+ }
+ .ql-snow .ql-tooltip a.ql-remove::before {
+ content: 'Remove';
+ margin-left: 8px;
+ }
+ .ql-snow .ql-tooltip a {
+ line-height: 26px;
+ }
+ .ql-snow .ql-tooltip.ql-editing a.ql-preview,
+ .ql-snow .ql-tooltip.ql-editing a.ql-remove {
+ display: none;
+ }
+ .ql-snow .ql-tooltip.ql-editing input[type=text] {
+ display: inline-block;
+ }
+ .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
+ border-right: 0px;
+ content: 'Save';
+ padding-right: 0px;
+ }
+ .ql-snow .ql-tooltip[data-mode=link]::before {
+ content: "Enter link:";
+ }
+ .ql-snow .ql-tooltip[data-mode=formula]::before {
+ content: "Enter formula:";
+ }
+ .ql-snow .ql-tooltip[data-mode=video]::before {
+ content: "Enter video:";
+ }
+ .ql-snow a {
+ color: #06c;
+ }
+ .ql-container.ql-snow {
+ border: 1px solid #ccc;
+ }
+ .alert-success {
+ border-color: #008d4c
+}
+.alert-danger,.alert-error,.alert-info,.alert-success,.alert-warning,.bg-aqua,.bg-aqua-active,.bg-black,.bg-black-active,.bg-blue,.bg-blue-active,.bg-fuchsia,.bg-fuchsia-active,.bg-green,.bg-green-active,.bg-light-blue,.bg-light-blue-active,.bg-lime,.bg-lime-active,.bg-maroon,.bg-maroon-active,.bg-navy,.bg-navy-active,.bg-olive,.bg-olive-active,.bg-orange,.bg-orange-active,.bg-purple,.bg-purple-active,.bg-red,.bg-red-active,.bg-teal,.bg-teal-active,.bg-yellow,.bg-yellow-active,.callout.callout-danger,.callout.callout-info,.callout.callout-success,.callout.callout-warning,.label-danger,.label-info,.label-primary,.label-success,.label-warning,.modal-danger .modal-body,.modal-danger .modal-footer,.modal-danger .modal-header,.modal-info .modal-body,.modal-info .modal-footer,.modal-info .modal-header,.modal-primary .modal-body,.modal-primary .modal-footer,.modal-primary .modal-header,.modal-success .modal-body,.modal-success .modal-footer,.modal-success .modal-header,.modal-warning .modal-body,.modal-warning .modal-footer,.modal-warning .modal-header {
+ color: #fff!important
+}
+.alert-success,.bg-green,.callout.callout-success,.label-success,.modal-success .modal-body {
+ background-color: #00a65a!important;
+}
+.alert .close {
+ color: #000;
+ opacity: .2;
+ filter: alpha(opacity=20)
+}
+.alert .close:hover {
+ opacity: .5;
+ filter: alpha(opacity=50)
+}
\ No newline at end of file
diff --git a/app/static/css/buttons.css b/app/static/css/buttons.css
new file mode 100644
index 0000000..abef561
--- /dev/null
+++ b/app/static/css/buttons.css
@@ -0,0 +1,265 @@
+.scroll {
+ overflow: auto;
+ white-space: nowrap;
+ }
+
+ /* CSS */
+ .testimonial-group>.row {
+ overflow-x: auto;
+ white-space: normal;
+ }
+
+ .testimonial-group>.row>.col-xs-4 {
+ display: inline-block;
+ float: none;
+ }
+
+ .testimonial-group .col-sm-3:nth-child(4n+1) {
+ clear: both;
+ }
+
+ @media (min-width: 768px) {
+ .testimonial-group {
+ max-width: 750px;
+ width: 100%;
+ }
+ }
+
+ @media (min-width: 992px) {
+ .testimonial-group {
+ max-width: 970px;
+ }
+ }
+
+ @media (min-width: 1200px) {
+ .testimonial-group {
+ max-width: 1170px;
+ }
+ }
+ /* END */
+
+ .workflow-span {
+ display: block;
+ word-break: break-word;
+ }
+
+ .workflow-ul {
+ width: 200px;
+ display: table;
+ table-layout: fixed;
+ }
+
+ .back-button, .done-button {
+ width: 120px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .save-button, .delete-button, .edit-button, .action-button, .next-button, .detail-button {
+ width: 120px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .save-flow-button {
+ width: 150px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .cancel-button, .close-button {
+ width: auto;
+ min-width: 100px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .add-button {
+ background-color:#008000;
+ border-color: #9ACD32;
+ color: white;
+ width: 100px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .more-big-button, .create-big-button, .add-big-button {
+ background-color:#008000;
+ border-color: #9ACD32;
+ color: white;
+ width: 150px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .more-button,.create-button {
+ background-color:#008000;
+ border-color: #9ACD32;
+ color: white;
+ width: 120px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ button#btn_quit.done-button {
+ width: 120px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .ok-button {
+ width: 70px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .send-button{
+ background-color: #32CD32;
+ border-color: #808000;
+ color: white;
+ width: 120px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .update-button, .sighup-button,.login-button, .logout-button {
+ width: 130px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .action-big-button, .update-profile-button, .mapping-button, .property-button {
+ width: 150px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ .ten-pixel-margin {
+ margin: 10px;
+ }
+
+ .ten-pixel-bottom-margin {
+ margin-bottom: 10px;
+ }
+
+ .ten-pixel-right-margin {
+ margin-right: 10px;
+ }
+
+ .ten-pixel-left-margin {
+ margin-left: 10px;
+ }
+
+ .ten-pixel-top-margin {
+ margin-top: 10px;
+ }
+
+ .five-pixel-margin {
+ margin: 5px;
+ }
+
+ .five-pixel-right-margin {
+ margin-right: 5px;
+ }
+
+ .ten-pixel-bottom-margin {
+ margin-bottom: 10px;
+ }
+
+ .twentyfive-pixel-bottom-margin {
+ margin-bottom: 25px;
+ }
+
+ .twentyeight-pixel-right-margin {
+ margin-right: 28px;
+ }
+
+ .ten-pixel-bottom-margin {
+ margin-bottom: 10px;
+ }
+
+ .detail-lable {
+ text-align: center;
+ }
+
+ .gray-color-class {
+ border-color: #D3D3D3;
+ }
+
+ .withdraw-button{
+ width: 200px;
+ height: 40px;
+ font-size: 15px;
+ }
+
+ #add-icon {
+ color: white;
+ position: relative;
+ left: -15.5em;
+ top:1.2em;
+ }
+
+ #delete-icon {
+ color: white;
+ position: relative;
+ right: 9em;
+ top:1.2em;
+ }
+
+ #delete-icon-two {
+ color: white;
+ position: relative;
+ right: -2em;
+ top:.2em;
+ }
+
+ #alert-style {
+ background-color: #00a65a;
+ border-color: #008d4c;
+ border-radius: 3px;
+ color: white;
+ }
+
+ .alert-danger {
+ background-color: #dd4b39!important;
+ color: black;
+ }
+
+ label.field-required::after {
+ content: "*";
+ color: red;
+ }
+
+ .padding-display-hide {
+ padding: 0!important;
+ }
+
+ #detail_search_main {
+ background-color: #1b8391;
+ width: 110px;
+ }
+
+ #top-search-btn {
+ width: 110px;
+ }
+
+ .detail-search-close {
+ display: none;
+ }
+
+ .daterange-text-notice {
+ display: none;
+ color: #a94442;
+ }
+
+ .invalid-date {
+ border: 2px solid #a94442 !important;
+ }
+
+ .hidden-invalid-date-notice {
+ display: none;
+ }
+
+ .invalid-date-notice-txt {
+ color: #a94442;
+ }
\ No newline at end of file
diff --git a/app/static/css/deposit.css b/app/static/css/deposit.css
new file mode 100644
index 0000000..aa6c179
--- /dev/null
+++ b/app/static/css/deposit.css
@@ -0,0 +1,10 @@
+/*!
+ * ui-select
+ * http://github.com/angular-ui/ui-select
+ * Version: 0.18.1 - 2016-07-10T00:30:49.466Z
+ * License: MIT
+ */.ui-select-highlight{font-weight:700}.ui-select-offscreen{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.ui-select-choices-row:hover{background-color:#f5f5f5}.ng-dirty.ng-invalid>a.select2-choice{border-color:#D44950}.select2-result-single{padding-left:0}.select-locked>.ui-select-match-close,.select2-locked>.select2-search-choice-close{display:none}body>.select2-container.open{z-index:9999}.ui-select-container.select2.direction-up .ui-select-match,.ui-select-container[theme=select2].direction-up .ui-select-match{border-radius:0 0 4px 4px}.ui-select-container.select2.direction-up .ui-select-dropdown,.ui-select-container[theme=select2].direction-up .ui-select-dropdown{border-radius:4px 4px 0 0;border-top-width:1px;border-top-style:solid;box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-4px}.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search,.ui-select-container[theme=select2].direction-up .ui-select-dropdown .select2-search{margin-top:4px}.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match,.ui-select-container[theme=select2].direction-up.select2-dropdown-open .ui-select-match{border-bottom-color:#5897fb}.selectize-input.selectize-focus{border-color:#007FBB!important}.selectize-control>.selectize-dropdown,.selectize-control>.selectize-input>input{width:100%}.ng-dirty.ng-invalid>div.selectize-input{border-color:#D44950}.ui-select-container[theme=selectize].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-2px}.btn-default-focus{color:#333;background-color:#EBEBEB;border-color:#ADADAD;text-decoration:none;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.ui-select-bootstrap .ui-select-toggle{position:relative}.ui-select-bootstrap .ui-select-toggle>.caret{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.input-group>.ui-select-bootstrap.dropdown{position:static}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control{border-radius:4px 0 0 4px}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control.direction-up{border-radius:4px 0 0 4px!important}.ui-select-bootstrap>.ui-select-match>.btn{text-align:left!important}.ui-select-bootstrap>.ui-select-match>.caret{position:absolute;top:45%;right:15px}.ui-select-bootstrap>.ui-select-choices,.ui-select-bootstrap>.ui-select-no-choice{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:-1px}body>.ui-select-bootstrap.open{z-index:1000}.ui-select-multiple.ui-select-bootstrap{height:auto;padding:3px 3px 0}.ui-select-multiple.ui-select-bootstrap input.ui-select-search{background-color:transparent!important;border:none;outline:0;height:1.666666em;margin-bottom:3px}.ui-select-multiple.ui-select-bootstrap .ui-select-match .close{font-size:1.6em;line-height:.75}.ui-select-multiple.ui-select-bootstrap .ui-select-match-item{outline:0;margin:0 3px 3px 0}.ui-select-multiple .ui-select-match-item{position:relative}.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close{pointer-events:none}.ui-select-multiple:hover .ui-select-match-item.dropping-before:before{content:"";position:absolute;top:0;right:100%;height:100%;margin-right:2px;border-left:1px solid #428bca}.ui-select-multiple:hover .ui-select-match-item.dropping-after:after{content:"";position:absolute;top:0;left:100%;height:100%;margin-left:2px;border-right:1px solid #428bca}.ui-select-bootstrap .ui-select-choices-row>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-bootstrap .ui-select-choices-row>a:focus,.ui-select-bootstrap .ui-select-choices-row>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.ui-select-bootstrap .ui-select-choices-row.active>a{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.ui-select-bootstrap .ui-select-choices-row.active.disabled>a,.ui-select-bootstrap .ui-select-choices-row.disabled>a{color:#777;cursor:not-allowed;background-color:#fff}.ui-select-match.ng-hide-add,.ui-select-search.ng-hide-add{display:none!important}.ui-select-bootstrap.ng-dirty.ng-invalid>button.btn.ui-select-match{border-color:#D44950}.ui-select-container[theme=bootstrap].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25)}/*! jQuery UI - v1.11.1 - 2014-08-13
+* http://jqueryui.com
+* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */.ui-helper-reset,.ui-menu{outline:0;list-style:none}.ui-button,.ui-spinner,.ui-spinner-input{vertical-align:middle}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-zfix,.ui-widget-overlay{top:0;left:0;width:100%;height:100%}.ui-helper-reset{margin:0;padding:0;border:0;line-height:1.3;text-decoration:none;font-size:100%}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons,.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;text-align:center;overflow:visible}.ui-button,.ui-button:active,.ui-button:hover,.ui-button:link,.ui-button:visited{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-icons-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-icons-only .ui-button-icon-primary,.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary{left:.5em}.ui-button-icons-only .ui-button-icon-secondary,.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner,input.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-multi .ui-datepicker-group,.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{padding:0;margin:0;display:block}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-state-active,.ui-menu .ui-state-focus{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-slider-vertical .ui-slider-range-min,.ui-spinner-down{bottom:0}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:700;line-height:1.5;padding:2px .4em;margin:.5em 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:.4em 2.1em .4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0}.ui-spinner-input{border:none;background:0 0;color:inherit;padding:0;margin:.2em 22px .2em .4em}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0 0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:url(/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x #eee;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:url(/images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x #f6a828;color:#fff;font-weight:700}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:url(/images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x #f6f6f6;font-weight:700;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #fbcb09;background:url(/images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x #fdf5ce;font-weight:700;color:#c77405}.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:url(/images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x #fff;font-weight:700;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:url(/images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x #ffe45c;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:url(/images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% #b81900;color:#fff}.ui-state-error a,.ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error a,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(/images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(/images/ui-icons_ffffff_256x240.png)}.ui-state-active .ui-icon,.ui-state-default .ui-icon,.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(/images/ui-icons_ef8c08_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(/images/ui-icons_228ef1_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(/images/ui-icons_ffd27a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-first,.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:4px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:4px}.ui-widget-overlay{background:url(/images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% #666;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:url(/images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x #000;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px}.ng-ckeditor{border:0}
\ No newline at end of file
diff --git a/app/static/css/item_register.css b/app/static/css/item_register.css
new file mode 100644
index 0000000..daf10b2
--- /dev/null
+++ b/app/static/css/item_register.css
@@ -0,0 +1,24 @@
+.custom-modal {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ height: 50%;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ }
+
+ .custom-overlay {
+ background-color: rgba(0, 0, 0, 0.5);
+ }
+
+ .modal-content {
+ padding: 16px;
+ }
+
+ .modal-footer {
+ background-color: #f2f2f2;
+ padding: 16px;
+ text-align: right;
+ }
+
\ No newline at end of file
diff --git a/app/static/css/login/style.css b/app/static/css/login/style.css
new file mode 100644
index 0000000..3e86244
--- /dev/null
+++ b/app/static/css/login/style.css
@@ -0,0 +1,28 @@
+body.cover-page {
+ background-color: rgba(13,95,137,.8);
+ text-align: center;
+}
+.row {
+ margin:80px;
+}
+
+.panel-body {
+ padding-left: 40px;
+ padding-right: 40px;
+ padding-bottom: 40px;
+}
+
+.container {
+ width: 1170px;
+}
+.container, .container-fluid {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
+.panel {
+ color: #000;
+ border-radius: 12px;
+}
\ No newline at end of file
diff --git a/app/static/css/style.css b/app/static/css/style.css
new file mode 100644
index 0000000..f538f3f
--- /dev/null
+++ b/app/static/css/style.css
@@ -0,0 +1,71 @@
+.rightFoward_font{
+ font-size: 50px;
+ color: silver;
+ top:40px !important;
+}
+.align_right{
+ text-align: right;
+}
+
+.style_li{
+ background-color:#ff8800;
+}
+.style_a{
+ color: white;
+}
+
+.modal-info {
+ vertical-align: middle;
+ margin: 0 10px;
+}
+
+.schema-form-section .form-control.ng-invalid {
+ border-color: #843534;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;
+}
+
+/* Custom popup Author */
+.remove-padding-right {
+ padding-right: 0;
+ margin-bottom: 5px;
+}
+.remove-padding-left {
+ padding-left: 0;
+}
+.panel-padding {
+ padding: 15px;
+}
+.modal-xlg {
+ width: 1140px;
+}
+.add-author-surname {
+ width: 28% !important;
+ float: left;
+ margin-right: 2%;
+}
+.add-author-name {
+ width: 28% !important;
+ float: left;
+ margin-right: 2%;
+}
+.add-author-lang-option {
+ width: 14%;
+ float: left;
+ margin-right: 2%;
+}
+.add-author-name-option {
+ width: 24%;
+}
+
+.term-and-condition {
+ padding-left: 20px;
+ margin-top: -5px;
+ margin-bottom: -5px;
+}
+
+.clear-activitylog {
+ color: #fff;
+ background-color: #dc3545;
+ border-color: #dc3545;
+}
\ No newline at end of file
diff --git a/app/static/css/styles.css b/app/static/css/styles.css
new file mode 100644
index 0000000..d06cc03
--- /dev/null
+++ b/app/static/css/styles.css
@@ -0,0 +1,8 @@
+@charset "UTF-8";/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.breadcrumb,.carousel-indicators,.dropdown-menu,.media-list,.nav,.pager{list-style:none}.invisible,.ng-animate-shim{visibility:hidden}.label,sub,sup{vertical-align:baseline}.badge,.btn,.btn-group,.btn-group-vertical,.caret,.checkbox-inline,.radio-inline,img{vertical-align:middle}hr,img{border:0}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.img-responsive,.img-thumbnail,.table,label{max-width:100%}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.btn-danger.dropdown-toggle,.open>.btn-default.dropdown-toggle,.open>.btn-info.dropdown-toggle,.open>.btn-primary.dropdown-toggle,.open>.btn-success.dropdown-toggle,.open>.btn-warning.dropdown-toggle{background-image:none}.img-thumbnail,body{background-color:#fff}@font-face{font-family:'Glyphicons Halflings';src:url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot);src:url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix) format("embedded-opentype"),url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2) format("woff2"),url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.woff) format("woff"),url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf) format("truetype"),url(/static/node_modules/bootstrap-sass/assets/fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format("svg")}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.img-responsive{display:block;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}.badge,.label,dt,kbd kbd,label{font-weight:700}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.initialism,.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dd,dt{line-height:1.42857}dd{margin-left:0}.dl-horizontal dd:after,.dl-horizontal dd:before{content:" ";display:table}.dl-horizontal dd:after{clear:both}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.checkbox-input:nth-child(3n+1),.clearfix:after,.container-fluid:after,.container:after,.dropdown-menu>li>a,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857;color:#777}legend,pre{color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{font-style:normal;line-height:1.42857}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container-fluid:after,.container-fluid:before,.container:after,.container:before,.row:after,.row:before{display:table;content:" "}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{margin:0;min-width:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],.input-group-sm>.input-group-btn>input[type=date].btn,.input-group-sm>.input-group-btn>input[type=datetime-local].btn,.input-group-sm>.input-group-btn>input[type=month].btn,.input-group-sm>.input-group-btn>input[type=time].btn,.input-group-sm>input[type=date].form-control,.input-group-sm>input[type=date].input-group-addon,.input-group-sm>input[type=datetime-local].form-control,.input-group-sm>input[type=datetime-local].input-group-addon,.input-group-sm>input[type=month].form-control,.input-group-sm>input[type=month].input-group-addon,.input-group-sm>input[type=time].form-control,.input-group-sm>input[type=time].input-group-addon,input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],.input-group-lg>.input-group-btn>input[type=date].btn,.input-group-lg>.input-group-btn>input[type=datetime-local].btn,.input-group-lg>.input-group-btn>input[type=month].btn,.input-group-lg>.input-group-btn>input[type=time].btn,.input-group-lg>input[type=date].form-control,.input-group-lg>input[type=date].input-group-addon,.input-group-lg>input[type=datetime-local].form-control,.input-group-lg>input[type=datetime-local].input-group-addon,.input-group-lg>input[type=month].form-control,.input-group-lg>input[type=month].input-group-addon,.input-group-lg>input[type=time].form-control,.input-group-lg>input[type=time].input-group-addon,input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-btn>select.btn,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,select.input-sm{height:30px;line-height:30px}.input-group-sm>.input-group-btn>select[multiple].btn,.input-group-sm>.input-group-btn>textarea.btn,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.input-group-lg>.input-group-btn>select.btn,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,select.input-lg{height:46px;line-height:46px}.input-group-lg>.input-group-btn>select[multiple].btn,.input-group-lg>.input-group-btn>textarea.btn,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.btn-block,input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:after,.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.btn-default.dropdown-toggle{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.btn-default.dropdown-toggle.focus,.open>.btn-default.dropdown-toggle:focus,.open>.btn-default.dropdown-toggle:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.btn-primary.dropdown-toggle.focus,.open>.btn-primary.dropdown-toggle:focus,.open>.btn-primary.dropdown-toggle:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.btn-success.dropdown-toggle.focus,.open>.btn-success.dropdown-toggle:focus,.open>.btn-success.dropdown-toggle:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.btn-info.dropdown-toggle.focus,.open>.btn-info.dropdown-toggle:focus,.open>.btn-info.dropdown-toggle:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.btn-warning.dropdown-toggle.focus,.open>.btn-warning.dropdown-toggle:focus,.open>.btn-warning.dropdown-toggle:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.btn-danger.dropdown-toggle.focus,.open>.btn-danger.dropdown-toggle:focus,.open>.btn-danger.dropdown-toggle:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block}.btn-block+.btn-block{margin-top:5px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.badge,.input-group-addon,.label,.pager,.progress-bar{text-align:center}.dropdown-menu-right,.dropdown-menu.pull-right{left:auto;right:0}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar:after,.btn-toolbar:before{content:" ";display:table}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group-lg.btn-group>.btn+.dropdown-toggle,.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn-group-lg>.btn .caret,.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-group-lg>.btn .caret,.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before{content:" ";display:table}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn,.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group,.input-group-btn,.input-group-btn>.btn,.nav>li,.nav>li>a,.navbar{position:relative}.input-group{display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0}.nav:after,.nav:before{content:" ";display:table}.nav>li,.nav>li>a{display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li,.nav-tabs.nav-justified>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified,.nav-tabs.nav-justified{width:100%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs-justified,.nav-tabs.nav-justified{border-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li,.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before{display:table;content:" "}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{min-height:60px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:60px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:13px;margin-bottom:13px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:10px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:20px;padding-bottom:20px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:13px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:13px;margin-bottom:13px}.btn-group-sm>.navbar-btn.btn,.navbar-btn.btn-sm{margin-top:15px;margin-bottom:15px}.btn-group-xs>.navbar-btn.btn,.navbar-btn.btn-xs{margin-top:19px;margin-bottom:19px}.navbar-text{margin-top:20px;margin-bottom:20px}.navbar-default{background-color:rgba(13,95,137,.8);border-color:rgba(9,63,90,.8)}.navbar-default .navbar-brand{color:#fff}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#e6e6e6;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:rgba(10,74,107,.8)}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:rgba(9,63,90,.8)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:rgba(10,74,107,.8);color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:rgba(10,74,107,.8)}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#090909}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#090909;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{content:"/ ";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.list-group-item>.badge,.pager .next>a,.pager .next>span{float:right}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{line-height:1;white-space:nowrap}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0}.pager:after,.pager:before{content:" ";display:table}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#333}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-info,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-bar-warning{background-color:#f0ad4e}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:0px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-content,.popover{background-clip:padding-box}.modal{display:none;position:fixed;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before{display:table;content:" "}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;text-align:left;text-align:start;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;text-align:start;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-indicators,.fa-fw,.fa-li,.fa-stack-1x,.fa-stack-2x,.marketing .col-lg-4,body.cover-page{text-align:center}.carousel-caption,.carousel-control{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.6);text-align:center}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.left>.arrow:after,.popover.right>.arrow:after{content:" ";bottom:-10px}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{left:1px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;max-width:100%;height:auto;line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;background-color:transparent}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\9;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before{content:" ";display:table}.center-block{display:block;margin-left:auto;margin-right:auto}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.fa-inverse,.text-white,.text-white a,.text-white a:focus,.text-white a:hover,a.text-white,a.text-white:focus,a.text-white:hover{color:#fff}.navbar-gradient,.navbar-inverse,body.cover-page{background-color:rgba(13,95,137,.8)}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}}.fa,.fa-stack{display:inline-block}/*!
+ * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:FontAwesome;src:url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.eot?v=4.4.0);src:url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(/static/node_modules/font-awesome/fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.navbar-brand,.site-wrapper .masthead-brand{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.navbar-brand{font-size:30px;line-height:30px;padding:10px 15px}.error-page.container .row{margin-left:50px;margin-top:100px;margin-bottom:100px}.marketing{padding-top:50px;padding-bottom:50px}.marketing h1,.marketing h2{font-weight:400;color:rgba(13,95,137,.8)}.marketing h2{padding-bottom:15px}.marketing h1{padding-bottom:50px}body.cover-page,html.cover-page{height:100%;position:relative}.site-wrapper{width:100%;height:100%;min-height:100%}.site-wrapper .masthead-brand{margin:80px 0}.site-wrapper .panel{color:#000;border-radius:12px}.site-wrapper .panel-free-title{margin:40px 0}.site-wrapper .panel-body{padding-left:40px;padding-right:40px;padding-bottom:40px}.site-wrapper .panel-footer{border-bottom-left-radius:12px;border-bottom-right-radius:12px;background-color:#e5e5e5;padding:20px 40px}.site-wrapper .panel-container a.text-muted{color:#fff;text-decoration:none}.site-wrapper .panel-container a.text-muted:hover{text-decoration:underline}header .alert{margin-top:-20px;border-radius:0}header .frontpage-search{padding-bottom:50px}header .frontpage-search h1{color:#fff;padding-bottom:15px}#footer{color:#242424;background-color:#0d5f89}.left-inner-addon{position:relative}.left-inner-addon input{padding-left:30px}.left-inner-addon i{position:absolute;padding:10px 12px;pointer-events:none}.right-inner-addon{position:relative}.right-inner-addon input{padding-right:30px}.right-inner-addon i{position:absolute;right:0;padding:10px 12px;pointer-events:none}.community-default{background-color:#0d5f89;padding-left:0;padding-right:0}.ng-cloak,.ng-hide:not(.ng-hide-animate),.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}ng\:form{display:block}.ng-anchor{position:absolute}.bg-transparent{background-color:rgba(255,255,255,0);border-color:rgba(255,255,255,0)}.modal-backdrop.am-fade{opacity:.5;transition:opacity .15s linear}.modal-backdrop.am-fade.ng-enter{opacity:0}.modal-backdrop.am-fade.ng-enter.ng-enter-active,.modal-backdrop.am-fade.ng-leave{opacity:.5}.modal-backdrop.am-fade.ng-leave.ng-leave-active{opacity:0}.loader{display:flex;height:60vh;justify-content:center;align-items:center}.spinner-wheel{height:25vh;width:25vh;border:3px solid rgba(0,0,0,.2);border-top-color:rgba(0,174,239,.8);border-radius:100%;animation:rotation 1.5s infinite linear .25s;opacity:0}@keyframes rotation{from{opacity:1;transform:rotate(0)}to{opacity:1;transform:rotate(359deg)}}.detail-table th{background-color:#f9f9f9!important;white-space:normal!important}.detail-table td{background-color:#fff!important;word-break:break-word;white-space:normal!important}.detail-table{table-layout:fixed;overflow-wrap:break-word;word-wrap:break-word}.detail-table tr th:nth-child(1){width:30%}.detail-table td.multiple-line{white-space:pre-wrap!important}.scroll_y{max-height:350px;overflow-y:auto}#popup_approve .col_empty{display:none}.label_email{padding-top:8px;padding-right:0;font-weight:700}.table-mt{margin:15px 0 0}.btn_close{border:none;background:0 0;opacity:.7;font-size:20px;margin-top:-10px}.btn_close:focus,.btn_close:hover{opacity:1;font-weight:700;outline:0}.send-mail-modal{width:750px}.send-mail-modal .modal-footer{padding:15px 15px 0}.popup_notice{width:30%;margin-top:14%}#loading{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(168,168,168,.5)}#icon_loading{margin:30px auto;width:200px;height:200px}#btn_success{margin-top:30px}.options{margin:5px 0 0;float:left}.pagination a{color:#000;float:left;padding:8px 12px;text-decoration:none;transition:background-color .3s;border:1px solid #ddd}.pagination a:hover:not(.active-page){background-color:#ddd}.pagination>.active-page,.pagination>.active-page:focus,.pagination>.active-page:hover{z-index:3;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.spinner{border:10px solid #d4d4d4;border-radius:50%;border-top:10px solid #000;width:30px;height:30px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;margin:0 auto}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.row-0{margin-left:0;margin-right:0}.row-0>div{padding-right:0;padding-left:0}.row-4{margin-left:-2px;margin-right:-2px}.row-4>div{padding-right:2px;padding-left:2px}.row-10{margin-left:-5px;margin-right:-5px}.row-10>div{padding-right:5px;padding-left:5px}.row-20{margin-left:-10px;margin-right:-10px}.row-20>div{padding-right:10px;padding-left:10px}.row-30{margin-left:-15px;margin-right:-15px}.row-30>div{padding-right:15px;padding-left:15px}.row-40{margin-left:-20px;margin-right:-20px}.row-40>div{padding-right:20px;padding-left:20px}.row-50{margin-left:-25px;margin-right:-25px}.row-50>div{padding-right:25px;padding-left:25px}.panel-default-2{margin-bottom:2px}.navbar-form2,.well2{margin-bottom:0}.panel-body2{padding:2px}.navbar-form2{margin-top:0;padding:0}.navbar-form2>a{font-size:12px;padding-left:10px;padding-right:10px;width:auto}.form-group2,.form-group2>.form-control{height:auto!important;font-size:12px!important}.navbar-form2>.login-button,.signup-button{height:auto!important}.form-group2>.form-control{padding:4px 10px}.container-fluid2{padding-left:15px;padding-right:15px}.navbar-nav>a{padding-bottom:15px!important;padding-top:15px!important}.detail-table>tbody>tr>td,.detail-table>tbody>tr>th{padding:2px}
\ No newline at end of file
diff --git a/app/static/css/theme.css b/app/static/css/theme.css
new file mode 100644
index 0000000..e5d8b63
--- /dev/null
+++ b/app/static/css/theme.css
@@ -0,0 +1 @@
+.break-word,.table-bordered td,.table-bordered th,dl dd{word-break:break-all}.break-word,dl dd{word-wrap:break-word}.p-left-5,dl dd{padding-left:5px}.btn-menu{color:#333;background-color:#fff;border-color:#ccc}.btn-menu:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-menu:active,.btn-menu:focus,.btn-menu:visited{color:#fff;background-color:#337ab7;border-color:#2e6da4}.row{margin-top:5px}.row>hr{margin:5px 15px}.pagination{margin:-10px 0}.badge{font-size:10px}span.indent{margin-left:10px;margin-right:10px}.panel_bread .breadcrumb{margin-bottom:5px}.close-container{height:21px}.flow-root{display:flow-root}.p-left-10{padding-left:10px}.p-top-20{padding-top:20px}.m-top-5,.row-line-space{margin-top:5px}.m-top-20{margin-top:20px}.del-col-space{margin-left:-30px}.max-width-64{max-width:64px}table .license{width:120px}div .pre-scrollable{overflow-x:hidden}td .list-group{margin-bottom:0}.list-group .list-group-item .radio{margin-top:0;margin-bottom:0}.fileupload-buttonbar .btn,.fileupload-buttonbar .toggle{margin-bottom:5px}.fileinput-button{position:relative;overflow:hidden;display:inline-block}.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:'alpha(opacity=0)';font-size:200px!important;direction:ltr;cursor:pointer}@media screen\9{.fileinput-button input{filter:alpha(opacity=0);font-size:100%;height:100%}}tree-internal .tree .folding.weko-node-leaf{display:none}tree-internal .tree .folding.weko-node-empty:before{content:'\25B7';color:#757575}tree-internal ul .more{-webkit-text-fill-color:#337ab7;text-decoration:underline}tree-internal ul .value-container{font-size:15px}tree-internal ul .tree{margin-left:0;padding-left:1em;text-indent:0;padding-inline-start:1em}tree-internal .rootless{margin:-1em;text-indent:0}.hide-on-collapsed{display:block}.panel-toggle.collapsed .hide-on-collapsed,.show-on-collapsed{display:none}.panel-toggle.collapsed .show-on-collapsed{display:block}.rss_icon{background-color:orange;padding:5px;padding-top:3px!important;padding-bottom:3px!important;text-decoration:none;border-radius:25%;color:#fff}@media print{@page{size:auto;margin:0}body{padding:72px}a,a:link:after,a:visited{text-decoration:underline}a[href]:after,abbr[title]:after{content:none!important}}.node-menu .node-menu-content,tree-internal .tree{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.node-menu{position:relative;width:150px}.node-menu .node-menu-content{width:100%;padding:5px;position:absolute;border:1px solid #bdbdbd;border-radius:5%;box-shadow:0 0 5px #bdbdbd;background-color:#eee;color:#212121;z-index:999}.node-menu .node-menu-content li.node-menu-item{list-style:none;padding:3px}.node-menu .node-menu-content .node-menu-item:hover{border-radius:5%;opacity:unset;cursor:pointer;background-color:#bdbdbd;transition:background-color .2s ease-out}.node-menu .node-menu-content .node-menu-item .node-menu-item-icon{display:inline-block;width:16px}.node-menu .node-menu-content .node-menu-item .node-menu-item-icon.new-tag:before{content:'\25CF'}.node-menu .node-menu-content .node-menu-item .node-menu-item-icon.new-folder:before{content:'\25B6'}.node-menu .node-menu-content .node-menu-item .node-menu-item-icon.rename:before{content:'\270E'}.node-menu .node-menu-content .node-menu-item .node-menu-item-icon.remove:before{content:'\2716'}.node-menu .node-menu-content .node-menu-item .node-menu-item-value{margin-left:5px}tree-internal ul{padding:3px 0 3px 25px}tree-internal li{padding:0;margin:0;list-style:none}tree-internal .over-drop-target-sibling::before{content:"Drop here..."!important;color:#fff!important;display:block;border:4px solid #757575;transition:padding .2s ease-out;padding:5px;border-radius:5px}tree-internal .over-drop-target-sibling{border:0 solid transparent;transition:padding .2s ease-out;padding:0;border-radius:5%}tree-internal .over-drop-target{border:4px solid #757575;transition:padding .2s ease-out;padding:5px;border-radius:5%}tree-internal .tree{box-sizing:border-box}tree-internal .tree li{list-style:none;cursor:default}tree-internal .tree .folding.node-collapsed,tree-internal .tree .folding.node-expanded{cursor:pointer}tree-internal .tree li div{display:inline-block;box-sizing:border-box}tree-internal .tree .node-value{display:inline-block;color:#212121}tree-internal .tree .node-value:after{display:block;width:0;height:2px;background-color:#212121;content:'';transition:width .3s}tree-internal .tree .node-value:hover:after{width:100%}tree-internal .tree .node-left-menu{display:inline-block;height:100%;width:auto}tree-internal .tree .node-left-menu span:before{content:'\2026';color:#757575}tree-internal .tree .node-selected:after{width:100%}tree-internal .tree .folding{width:25px;display:inline-block;line-height:1px;padding:0 5px;font-weight:700}tree-internal .tree .folding.node-collapsed:before{content:'\25B6';color:#757575}tree-internal .tree .folding.node-expanded:before{content:'\25BC';color:#757575}tree-internal .tree .folding.node-empty{color:#212121;text-align:center;font-size:.89em}tree-internal .tree .folding.node-empty:before{content:'\25B6';color:#757575}tree-internal .tree .folding.node-leaf{color:#212121;text-align:center;font-size:.89em}tree-internal .tree .folding.node-leaf:before{content:'\25CF';color:#757575}tree-internal ul.rootless{padding:0}tree-internal div.rootless{display:none!important}tree-internal .loading-children:after{content:' loading ...';color:#6a1b9a;font-style:italic;font-size:.9em;-webkit-animation-name:loading-children;animation-name:loading-children;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes loading-children{0%{color:#f3e5f5}12.5%{color:#e1bee7}25%{color:#ce93d8}37.5%{color:#ba68c8}50%{color:#ab47bc}62.5%{color:#9c27b0}75%{color:#8e24aa}87.5%{color:#7b1fa2}100%{color:#6a1b9a}}@keyframes loading-children{0%{color:#f3e5f5}12.5%{color:#e1bee7}25%{color:#ce93d8}37.5%{color:#ba68c8}50%{color:#ab47bc}62.5%{color:#9c27b0}75%{color:#8e24aa}87.5%{color:#7b1fa2}100%{color:#6a1b9a}}
\ No newline at end of file
diff --git a/app/static/css/widget.css b/app/static/css/widget.css
new file mode 100644
index 0000000..d78ad9a
--- /dev/null
+++ b/app/static/css/widget.css
@@ -0,0 +1,255 @@
+:root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{border:1px dashed #d3d3d3;margin:0;position:absolute;top:0;left:10px;right:10px;bottom:0;width:auto;z-index:0!important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;top:0;left:10px;right:10px;bottom:0;width:auto;z-index:0;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item.ui-draggable-dragging,.grid-stack>.grid-stack-item.ui-resizable-resizing{z-index:100}.grid-stack>.grid-stack-item.ui-draggable-dragging>.grid-stack-item-content,.grid-stack>.grid-stack-item.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,.2);opacity:.8}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);background-repeat:no-repeat;background-position:center;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.grid-stack>.grid-stack-item>.ui-resizable-se{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.grid-stack>.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;left:10px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;right:10px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;right:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;right:10px;bottom:0}.grid-stack>.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;left:10px;bottom:0}.grid-stack>.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;left:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack>.grid-stack-item[data-gs-width='1']{width:8.3333333333%}.grid-stack>.grid-stack-item[data-gs-x='1']{left:8.3333333333%}.grid-stack>.grid-stack-item[data-gs-min-width='1']{min-width:8.3333333333%}.grid-stack>.grid-stack-item[data-gs-max-width='1']{max-width:8.3333333333%}.grid-stack>.grid-stack-item[data-gs-width='2']{width:16.6666666667%}.grid-stack>.grid-stack-item[data-gs-x='2']{left:16.6666666667%}.grid-stack>.grid-stack-item[data-gs-min-width='2']{min-width:16.6666666667%}.grid-stack>.grid-stack-item[data-gs-max-width='2']{max-width:16.6666666667%}.grid-stack>.grid-stack-item[data-gs-width='3']{width:25%}.grid-stack>.grid-stack-item[data-gs-x='3']{left:25%}.grid-stack>.grid-stack-item[data-gs-min-width='3']{min-width:25%}.grid-stack>.grid-stack-item[data-gs-max-width='3']{max-width:25%}.grid-stack>.grid-stack-item[data-gs-width='4']{width:33.3333333333%}.grid-stack>.grid-stack-item[data-gs-x='4']{left:33.3333333333%}.grid-stack>.grid-stack-item[data-gs-min-width='4']{min-width:33.3333333333%}.grid-stack>.grid-stack-item[data-gs-max-width='4']{max-width:33.3333333333%}.grid-stack>.grid-stack-item[data-gs-width='5']{width:41.6666666667%}.grid-stack>.grid-stack-item[data-gs-x='5']{left:41.6666666667%}.grid-stack>.grid-stack-item[data-gs-min-width='5']{min-width:41.6666666667%}.grid-stack>.grid-stack-item[data-gs-max-width='5']{max-width:41.6666666667%}.grid-stack>.grid-stack-item[data-gs-width='6']{width:50%}.grid-stack>.grid-stack-item[data-gs-x='6']{left:50%}.grid-stack>.grid-stack-item[data-gs-min-width='6']{min-width:50%}.grid-stack>.grid-stack-item[data-gs-max-width='6']{max-width:50%}.grid-stack>.grid-stack-item[data-gs-width='7']{width:58.3333333333%}.grid-stack>.grid-stack-item[data-gs-x='7']{left:58.3333333333%}.grid-stack>.grid-stack-item[data-gs-min-width='7']{min-width:58.3333333333%}.grid-stack>.grid-stack-item[data-gs-max-width='7']{max-width:58.3333333333%}.grid-stack>.grid-stack-item[data-gs-width='8']{width:66.6666666667%}.grid-stack>.grid-stack-item[data-gs-x='8']{left:66.6666666667%}.grid-stack>.grid-stack-item[data-gs-min-width='8']{min-width:66.6666666667%}.grid-stack>.grid-stack-item[data-gs-max-width='8']{max-width:66.6666666667%}.grid-stack>.grid-stack-item[data-gs-width='9']{width:75%}.grid-stack>.grid-stack-item[data-gs-x='9']{left:75%}.grid-stack>.grid-stack-item[data-gs-min-width='9']{min-width:75%}.grid-stack>.grid-stack-item[data-gs-max-width='9']{max-width:75%}.grid-stack>.grid-stack-item[data-gs-width='10']{width:83.3333333333%}.grid-stack>.grid-stack-item[data-gs-x='10']{left:83.3333333333%}.grid-stack>.grid-stack-item[data-gs-min-width='10']{min-width:83.3333333333%}.grid-stack>.grid-stack-item[data-gs-max-width='10']{max-width:83.3333333333%}.grid-stack>.grid-stack-item[data-gs-width='11']{width:91.6666666667%}.grid-stack>.grid-stack-item[data-gs-x='11']{left:91.6666666667%}.grid-stack>.grid-stack-item[data-gs-min-width='11']{min-width:91.6666666667%}.grid-stack>.grid-stack-item[data-gs-max-width='11']{max-width:91.6666666667%}.grid-stack>.grid-stack-item[data-gs-width='12']{width:100%}.grid-stack>.grid-stack-item[data-gs-x='12']{left:100%}.grid-stack>.grid-stack-item[data-gs-min-width='12']{min-width:100%}.grid-stack>.grid-stack-item[data-gs-max-width='12']{max-width:100%}.grid-stack.grid-stack-animate,.grid-stack.grid-stack-animate .grid-stack-item{-webkit-transition:left .3s,top .3s,height .3s,width .3s;-moz-transition:left .3s,top .3s,height .3s,width .3s;-ms-transition:left .3s,top .3s,height .3s,width .3s;-o-transition:left .3s,top .3s,height .3s,width .3s;transition:left .3s,top .3s,height .3s,width .3s}.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing{-webkit-transition:left 0s,top 0s,height 0s,width 0s;-moz-transition:left 0s,top 0s,height 0s,width 0s;-ms-transition:left 0s,top 0s,height 0s,width 0s;-o-transition:left 0s,top 0s,height 0s,width 0s;transition:left 0s,top 0s,height 0s,width 0s}.grid-stack.grid-stack-one-column-mode{height:auto!important}.grid-stack.grid-stack-one-column-mode>.grid-stack-item{position:relative!important;width:auto!important;left:0!important;top:auto!important;margin-bottom:20px;max-width:none!important}.grid-stack.grid-stack-one-column-mode>.grid-stack-item>.ui-resizable-handle{display:none}
+.grid-stack-item {
+ overflow: auto;
+}
+
+.header-footer-type {
+ left: 0 !important;
+ right: 0 !important;
+ padding-left: 15px;
+ padding-right: 15px;
+ overflow: hidden !important;
+ border-radius: 0% !important;
+}
+
+.widget {
+ border-radius: 0px !important;
+ left: 15px !important;
+ right: 15px !important;
+ /*margin-top: 5px !important;*/
+ overflow-y: hidden !important;
+ overflow-x: auto !important;
+}
+
+.widget-header {
+ z-index: 999;
+}
+
+.writeMoreNoT {
+ cursor: pointer !important;
+}
+
+.writeMoreNoT:hover {
+ text-decoration: underline;
+}
+
+.widget-footer {
+ left: 0;
+ bottom: 0;
+ width: 100%;
+}
+
+.widget-header-position {
+ position: inherit;
+ width: 100%;
+ top: 0;
+}
+
+.no-pad-top-30 {
+ padding-top: 0px !important;
+}
+
+.no-li-style {
+ list-style-type: none;
+}
+
+.rss {
+ padding-left: 0px;
+ padding-right: 0px;
+}
+
+.rss a {
+ background-color: orange;
+ padding: 5px;
+ padding-top: 3px !important;
+ padding-bottom: 3px !important;
+ text-decoration: none;
+ border-radius: 25%;
+}
+
+.rss a:hover {
+ text-decoration: none;
+}
+
+.rss a > i {
+ color: white;
+}
+
+.arrival-scale {
+ text-overflow: ellipsis;
+ width: 100%;
+ white-space: nowrap;
+ display: block;
+ overflow: hidden;
+}
+
+.no-padding-col {
+ padding-left: 0px !important;
+ padding-right: 0px !important;
+}
+
+.widget-resize {
+ position: absolute !important;
+}
+
+.drop-line-span span {
+ display: inline-block;
+}
+
+.counter-container {
+ word-wrap: break-word;
+ margin-top: -15px;
+}
+
+.text-access-counter {
+ font-size: 15px;
+ font-weight: bold;
+ margin-bottom: -3px;
+}
+
+.no-before-content::before {
+ display: none;
+}
+
+.no-padding-side {
+ padding-left: 4px !important;
+ padding-right: 4px !important;
+}
+
+.widget-nav {
+ white-space: pre-line !important;
+ /* margin-top: 25px; */
+ border-radius: 4px !important;
+}
+
+#header_content {
+ padding: 0 !important;
+ margin: 0 !important;
+}
+
+.header-footer-type {
+ border: none;
+}
+
+.grid-stack-item {
+ box-shadow: none;
+}
+
+#title-main-content {
+ margin: 0 0 1px !important;
+}
+
+/* #panel-heading-main-contents {
+ margin-top: 1px !important;
+} */
+
+.navbar-nav > li > a {
+ /* font-size: 14px; */
+ font-size: 15px;
+}
+
+.pull-left > li > a {
+ /* font-size: 14px; */
+ font-size: 15px;
+}
+
+.navbar-header > a.navbar-brand {
+ /* font-size: 14px !important; */
+ font-size: 15px !important;
+ padding-top: 20px !important;
+ padding-bottom: 20px !important;
+ line-height: 20px !important;
+}
+
+.trumbowyg-editor {
+ height: 100%;
+ min-height: 0 !important;
+ margin: unset !important;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/* 隱イ鬘� #32415 */
+/* overwrite cursor: move with cursor: default */
+.trumbowyg-editor img {
+ max-width: none !important;
+ cursor: default !important;
+}
+
+.lds-ring-background {
+ width: 100vw;
+ height: 100vh;
+ z-index: 1000;
+ background-color: white;
+ opacity: 1;
+ position: fixed;
+}
+
+.lds-ring {
+ position: fixed;
+ height: 20vh;
+ width: 20vh;
+ z-index: 1001;
+ right: calc(50% - 10vh);
+ top: 40vh;
+ border: 5px solid rgba(0, 0, 0, 0.2);
+ border-top-color: rgba(0, 174, 239, 0.8);
+ border-radius: 100%;
+ animation: rotation 1.5s infinite linear 0.25s;
+ opacity: 1;
+}
+
+.widgetIE{
+ height: auto !important;
+}
+
+.ie .counter-container {
+ word-wrap: break-word;
+ margin-top: 0px;
+ padding: 15px 0;
+}
+
+.ie .trumbowyg-editor {
+ white-space: normal;
+ word-wrap: break-word;
+}
+
+.ie .scroll_x.trumbowyg-editor{
+ overflow-x: auto;
+ margin: 0 !important;
+}
+
+@-ms-viewport{
+ width:auto!important;
+}
+
+@keyframes rotation {
+ from {
+ opacity: 1;
+ transform: rotate(0deg);
+ }
+ to {
+ opacity: 1;
+ transform: rotate(359deg);
+ }
+}
+
+.panel-body.without-after-element:after {
+ content: none;
+}
+
+#header {
+ overflow: initial !important;
+ overflow: inherit !important;
+}
+
+.widget-header > strong {
+ font-size: 15px;
+}
+
+.nav-tabs > li > a {
+ font-size: 15px;
+}
+
+/** Trumbowyg v2.21.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
+#trumbowyg-icons,#trumbowyg-icons svg{height:0;width:0}#trumbowyg-icons{overflow:hidden;visibility:hidden}.trumbowyg-box *,.trumbowyg-box ::after,.trumbowyg-box ::before,.trumbowyg-modal *,.trumbowyg-modal ::after,.trumbowyg-modal ::before{box-sizing:border-box}.trumbowyg-box svg,.trumbowyg-modal svg{width:17px;height:100%;fill:#222}.trumbowyg-box,.trumbowyg-editor{display:block;position:relative;border:1px solid #DDD;width:100%;min-height:300px;margin:17px auto}.trumbowyg-box .trumbowyg-editor{margin:0 auto}.trumbowyg-box.trumbowyg-fullscreen{background:#FEFEFE;border:none!important}.trumbowyg-editor,.trumbowyg-textarea{position:relative;box-sizing:border-box;padding:20px;min-height:300px;width:100%;border-style:none;resize:none;outline:0;overflow:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.trumbowyg-editor.trumbowyg-autogrow-on-enter,.trumbowyg-textarea.trumbowyg-autogrow-on-enter{transition:height .3s ease-out}.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:transparent!important;text-shadow:0 0 7px #333}@media screen and (min-width:0 \0){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}.trumbowyg-box-blur .trumbowyg-editor hr,.trumbowyg-box-blur .trumbowyg-editor img{opacity:.2}.trumbowyg-textarea{position:relative;display:block;overflow:auto;border:none;font-size:14px;font-family:Inconsolata,Consolas,Courier,"Courier New",sans-serif;line-height:18px}.trumbowyg-box.trumbowyg-editor-visible .trumbowyg-textarea{height:1px!important;width:25%;min-height:0!important;padding:0!important;background:0 0;opacity:0!important}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-textarea{display:block;margin-bottom:1px}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-editor{display:none}.trumbowyg-box.trumbowyg-disabled .trumbowyg-textarea{opacity:.8;background:0 0}.trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before{content:attr(placeholder);color:#999;pointer-events:none}.trumbowyg-button-pane{width:100%;min-height:36px;background:#ecf0f1;border-bottom:1px solid #d7e0e2;margin:0;padding:0 5px;position:relative;list-style-type:none;line-height:10px;backface-visibility:hidden;z-index:11}.trumbowyg-button-pane::after{content:" ";display:block;position:absolute;top:36px;left:0;right:0;width:100%;height:1px;background:#d7e0e2}.trumbowyg-button-pane .trumbowyg-button-group{display:inline-block}.trumbowyg-button-pane .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-button-pane .trumbowyg-button-group::after{content:" ";display:inline-block;width:1px;background:#d7e0e2;margin:0 5px;height:35px;vertical-align:top}.trumbowyg-button-pane .trumbowyg-button-group:last-child::after{content:none}.trumbowyg-button-pane button{display:inline-block;position:relative;width:35px;height:35px;padding:1px 6px!important;margin-bottom:1px;overflow:hidden;border:none;cursor:pointer;background:0 0;vertical-align:middle;transition:background-color 150ms,opacity 150ms}.trumbowyg-button-pane button.trumbowyg-textual-button{width:auto;line-height:35px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.trumbowyg-button-pane button.trumbowyg-disable,.trumbowyg-button-pane.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active),.trumbowyg-disabled .trumbowyg-button-pane button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button){opacity:.2;cursor:default}.trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before,.trumbowyg-disabled .trumbowyg-button-pane .trumbowyg-button-group::before{background:#e3e9eb}.trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#FFF;outline:0}.trumbowyg-button-pane .trumbowyg-open-dropdown::after{display:block;content:" ";position:absolute;top:25px;right:3px;height:0;width:0;border:3px solid transparent;border-top-color:#555}.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button{padding-left:10px!important;padding-right:18px!important}.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button::after{top:17px;right:7px}.trumbowyg-button-pane .trumbowyg-right{float:right}.trumbowyg-dropdown{max-width:300px;max-height:250px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;border:1px solid #ecf0f1;padding:5px 0;border-top:none;background:#FFF;margin-left:-1px;box-shadow:rgba(0,0,0,.1) 0 2px 3px;z-index:12}.trumbowyg-dropdown button{display:block;width:100%;height:35px;line-height:35px;text-decoration:none;background:#FFF;padding:0 20px 0 10px;color:#333!important;border:none;cursor:pointer;text-align:left;font-size:15px;transition:all 150ms}.trumbowyg-dropdown button:focus,.trumbowyg-dropdown button:hover{background:#ecf0f1}.trumbowyg-dropdown button svg{float:left;margin-right:14px}.trumbowyg-modal{position:absolute;top:0;left:50%;transform:translateX(-50%);max-width:520px;width:100%;height:350px;z-index:12;overflow:hidden;backface-visibility:hidden}.trumbowyg-modal-box{position:absolute;top:0;left:50%;transform:translateX(-50%);max-width:500px;width:calc(100% - 20px);padding-bottom:45px;z-index:1;background-color:#FFF;text-align:center;font-size:14px;box-shadow:rgba(0,0,0,.2) 0 2px 3px;backface-visibility:hidden}.trumbowyg-modal-box .trumbowyg-modal-title{font-size:24px;font-weight:700;margin:0 0 20px;padding:15px 0 13px;display:block;border-bottom:1px solid #EEE;color:#333;background:#fbfcfc}.trumbowyg-modal-box .trumbowyg-progress{width:100%;height:3px;position:absolute;top:58px}.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar{background:#2BC06A;width:0;height:100%;transition:width 150ms linear}.trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:29px;line-height:29px;overflow:hidden}.trumbowyg-modal-box label .trumbowyg-input-infos{display:block;text-align:left;height:25px;line-height:25px;transition:all 150ms}.trumbowyg-modal-box label .trumbowyg-input-infos span{display:block;color:#69878f;background-color:#fbfcfc;border:1px solid #DEDEDE;padding:0 7px;width:150px}.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-modal-box label.trumbowyg-input-error textarea{border:1px solid #e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos{margin-top:-27px}.trumbowyg-modal-box label input{position:absolute;top:0;right:0;height:27px;line-height:27px;border:1px solid #DEDEDE;background:#fff;font-size:14px;max-width:330px;width:70%;padding:0 7px;transition:all 150ms}.trumbowyg-modal-box label input:focus,.trumbowyg-modal-box label input:hover{outline:0;border:1px solid #95a5a6}.trumbowyg-modal-box label input:focus{background:#fbfcfc}.trumbowyg-modal-box label input[type=checkbox]{left:6px;top:6px;right:auto;height:16px;width:16px}.trumbowyg-modal-box label input[type=checkbox]+.trumbowyg-input-infos span{width:auto;padding-left:25px}.trumbowyg-modal-box .error{margin-top:25px;display:block;color:red}.trumbowyg-modal-box .trumbowyg-modal-button{position:absolute;bottom:10px;right:0;text-decoration:none;color:#FFF;display:block;width:100px;height:35px;line-height:33px;margin:0 10px;background-color:#333;border:none;cursor:pointer;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif;font-size:16px;transition:all 150ms}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{right:110px;background:#2bc06a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#40d47e;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#25a25a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{color:#555;background:#e6e6e6}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#fbfbfb;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#d5d5d5}.trumbowyg-overlay{position:absolute;background-color:rgba(255,255,255,.5);height:100%;width:100%;left:0;display:none;top:0;z-index:10}body.trumbowyg-body-fullscreen{overflow:hidden}.trumbowyg-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:99999}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen.trumbowyg-box{border:none}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen .trumbowyg-textarea{height:calc(100% - 37px)!important;overflow:auto}.trumbowyg-fullscreen .trumbowyg-overlay{height:100%!important}.trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:#222;fill:transparent}.trumbowyg-editor embed,.trumbowyg-editor img,.trumbowyg-editor object,.trumbowyg-editor video{max-width:100%}.trumbowyg-editor img,.trumbowyg-editor video{height:auto}.trumbowyg-editor img{cursor:move}.trumbowyg-editor canvas:focus{outline:0}.trumbowyg-editor.trumbowyg-reset-css{background:#FEFEFE!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;line-height:1.45em!important;color:#333}.trumbowyg-editor.trumbowyg-reset-css a{color:#15c!important;text-decoration:underline!important}.trumbowyg-editor.trumbowyg-reset-css blockquote,.trumbowyg-editor.trumbowyg-reset-css div,.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css p,.trumbowyg-editor.trumbowyg-reset-css ul{box-shadow:none!important;background:0 0!important;margin:0 0 15px!important;line-height:1.4em!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;border:none}.trumbowyg-editor.trumbowyg-reset-css hr,.trumbowyg-editor.trumbowyg-reset-css iframe,.trumbowyg-editor.trumbowyg-reset-css object{margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css blockquote{margin-left:32px!important;font-style:italic!important;color:#555}.trumbowyg-editor.trumbowyg-reset-css ul{list-style:disc}.trumbowyg-editor.trumbowyg-reset-css ol{list-style:decimal}.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css ul{padding-left:20px!important}.trumbowyg-editor.trumbowyg-reset-css ol ol,.trumbowyg-editor.trumbowyg-reset-css ol ul,.trumbowyg-editor.trumbowyg-reset-css ul ol,.trumbowyg-editor.trumbowyg-reset-css ul ul{border:none;margin:2px!important;padding:0 0 0 24px!important}.trumbowyg-editor.trumbowyg-reset-css hr{display:block;height:1px;border:none;border-top:1px solid #CCC}.trumbowyg-editor.trumbowyg-reset-css h1,.trumbowyg-editor.trumbowyg-reset-css h2,.trumbowyg-editor.trumbowyg-reset-css h3,.trumbowyg-editor.trumbowyg-reset-css h4{color:#111;background:0 0;margin:0!important;padding:0!important;font-weight:700}.trumbowyg-editor.trumbowyg-reset-css h1{font-size:32px!important;line-height:38px!important;margin-bottom:20px!important}.trumbowyg-editor.trumbowyg-reset-css h2{font-size:26px!important;line-height:34px!important;margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css h3{font-size:22px!important;line-height:28px!important;margin-bottom:7px!important}.trumbowyg-editor.trumbowyg-reset-css h4{font-size:16px!important;line-height:22px!important;margin-bottom:7px!important}.trumbowyg-dark .trumbowyg-textarea{background:#111;color:#ddd}.trumbowyg-dark .trumbowyg-box{border:1px solid #343434}.trumbowyg-dark .trumbowyg-box.trumbowyg-fullscreen{background:#111}.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{text-shadow:0 0 7px #ccc}@media screen and (min-width:0 \0){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}.trumbowyg-dark .trumbowyg-box svg{fill:#ecf0f1;color:#ecf0f1}.trumbowyg-dark .trumbowyg-button-pane{background-color:#222;border-bottom-color:#343434}.trumbowyg-dark .trumbowyg-button-pane::after{background:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::after{background-color:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-dark .trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::after{background-color:#2a2a2a}.trumbowyg-dark .trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#333}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-open-dropdown::after{border-top-color:#fff}.trumbowyg-dark .trumbowyg-fullscreen .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg{color:#ecf0f1;fill:transparent}.trumbowyg-dark .trumbowyg-dropdown{border-color:#222;background:#333;box-shadow:rgba(0,0,0,.3) 0 2px 3px}.trumbowyg-dark .trumbowyg-dropdown button{background:#333;color:#fff!important}.trumbowyg-dark .trumbowyg-dropdown button:focus,.trumbowyg-dark .trumbowyg-dropdown button:hover{background:#222}.trumbowyg-dark .trumbowyg-modal-box{background-color:#222}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-title{border-bottom:1px solid #555;color:#fff;background:#3c3c3c}.trumbowyg-dark .trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:27px;line-height:27px;overflow:hidden}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span{color:#eee;background-color:#2f2f2f;border-color:#222}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error textarea{border-color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label input{border-color:#222;color:#eee;background:#333}.trumbowyg-dark .trumbowyg-modal-box label input:focus,.trumbowyg-dark .trumbowyg-modal-box label input:hover{border-color:#626262}.trumbowyg-dark .trumbowyg-modal-box label input:focus{background-color:#2f2f2f}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{background:#1b7943}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#25a25a}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#176437}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{background:#333;color:#ccc}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#444}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#111}.trumbowyg-dark .trumbowyg-overlay{background-color:rgba(15,15,15,.6)}
\ No newline at end of file
diff --git a/app/static/favicon.ico b/app/static/favicon.ico
new file mode 100644
index 0000000..321db00
Binary files /dev/null and b/app/static/favicon.ico differ
diff --git a/app/static/favicon_default.ico b/app/static/favicon_default.ico
new file mode 100644
index 0000000..5177ab3
Binary files /dev/null and b/app/static/favicon_default.ico differ
diff --git a/app/static/images/weko-logo.png b/app/static/images/weko-logo.png
new file mode 100644
index 0000000..be18a58
Binary files /dev/null and b/app/static/images/weko-logo.png differ
diff --git a/app/static/js/jquery/jquery-3.7.1.js b/app/static/js/jquery/jquery-3.7.1.js
new file mode 100644
index 0000000..1a86433
--- /dev/null
+++ b/app/static/js/jquery/jquery-3.7.1.js
@@ -0,0 +1,10716 @@
+/*!
+ * jQuery JavaScript Library v3.7.1
+ * https://jquery.com/
+ *
+ * Copyright OpenJS Foundation and other contributors
+ * Released under the MIT license
+ * https://jquery.org/license
+ *
+ * Date: 2023-08-28T13:37Z
+ */
+( function( global, factory ) {
+
+ "use strict";
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket trac-14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
+// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
+// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
+// enough that all such attempts are guarded in a try block.
+"use strict";
+
+var arr = [];
+
+var getProto = Object.getPrototypeOf;
+
+var slice = arr.slice;
+
+var flat = arr.flat ? function( array ) {
+ return arr.flat.call( array );
+} : function( array ) {
+ return arr.concat.apply( [], array );
+};
+
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var fnToString = hasOwn.toString;
+
+var ObjectFunctionString = fnToString.call( Object );
+
+var support = {};
+
+var isFunction = function isFunction( obj ) {
+
+ // Support: Chrome <=57, Firefox <=52
+ // In some browsers, typeof returns "function" for HTML
elements
+ // (i.e., `typeof document.createElement( "object" ) === "function"`).
+ // We don't want to classify *any* DOM node as a function.
+ // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
+ // Plus for old WebKit, typeof returns "function" for HTML collections
+ // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
+ return typeof obj === "function" && typeof obj.nodeType !== "number" &&
+ typeof obj.item !== "function";
+ };
+
+
+var isWindow = function isWindow( obj ) {
+ return obj != null && obj === obj.window;
+ };
+
+
+var document = window.document;
+
+
+
+ var preservedScriptAttributes = {
+ type: true,
+ src: true,
+ nonce: true,
+ noModule: true
+ };
+
+ function DOMEval( code, node, doc ) {
+ doc = doc || document;
+
+ var i, val,
+ script = doc.createElement( "script" );
+
+ script.text = code;
+ if ( node ) {
+ for ( i in preservedScriptAttributes ) {
+
+ // Support: Firefox 64+, Edge 18+
+ // Some browsers don't support the "nonce" property on scripts.
+ // On the other hand, just using `getAttribute` is not enough as
+ // the `nonce` attribute is reset to an empty string whenever it
+ // becomes browsing-context connected.
+ // See https://github.com/whatwg/html/issues/2369
+ // See https://html.spec.whatwg.org/#nonce-attributes
+ // The `node.getAttribute` check was added for the sake of
+ // `jQuery.globalEval` so that it can fake a nonce-containing node
+ // via an object.
+ val = node[ i ] || node.getAttribute && node.getAttribute( i );
+ if ( val ) {
+ script.setAttribute( i, val );
+ }
+ }
+ }
+ doc.head.appendChild( script ).parentNode.removeChild( script );
+ }
+
+
+function toType( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+
+ // Support: Android <=2.3 only (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call( obj ) ] || "object" :
+ typeof obj;
+}
+/* global Symbol */
+// Defining this global in .eslintrc.json would create a danger of using the global
+// unguarded in another place, it seems safer to define global only for this module
+
+
+
+var version = "3.7.1",
+
+ rhtmlSuffix = /HTML$/i,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ };
+
+jQuery.fn = jQuery.prototype = {
+
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+
+ // Return all the elements in a clean array
+ if ( num == null ) {
+ return slice.call( this );
+ }
+
+ // Return just the one element from the set
+ return num < 0 ? this[ num + this.length ] : this[ num ];
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ each: function( callback ) {
+ return jQuery.each( this, callback );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map( this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ } ) );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ even: function() {
+ return this.pushStack( jQuery.grep( this, function( _elem, i ) {
+ return ( i + 1 ) % 2;
+ } ) );
+ },
+
+ odd: function() {
+ return this.pushStack( jQuery.grep( this, function( _elem, i ) {
+ return i % 2;
+ } ) );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor();
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[ 0 ] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !isFunction( target ) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+
+ // Only deal with non-null/undefined values
+ if ( ( options = arguments[ i ] ) != null ) {
+
+ // Extend the base object
+ for ( name in options ) {
+ copy = options[ name ];
+
+ // Prevent Object.prototype pollution
+ // Prevent never-ending loop
+ if ( name === "__proto__" || target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+ ( copyIsArray = Array.isArray( copy ) ) ) ) {
+ src = target[ name ];
+
+ // Ensure proper type for the source value
+ if ( copyIsArray && !Array.isArray( src ) ) {
+ clone = [];
+ } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
+ clone = {};
+ } else {
+ clone = src;
+ }
+ copyIsArray = false;
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend( {
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isPlainObject: function( obj ) {
+ var proto, Ctor;
+
+ // Detect obvious negatives
+ // Use toString instead of jQuery.type to catch host objects
+ if ( !obj || toString.call( obj ) !== "[object Object]" ) {
+ return false;
+ }
+
+ proto = getProto( obj );
+
+ // Objects with no prototype (e.g., `Object.create( null )`) are plain
+ if ( !proto ) {
+ return true;
+ }
+
+ // Objects with prototype are plain iff they were constructed by a global Object function
+ Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
+ return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ // Evaluates a script in a provided context; falls back to the global one
+ // if not specified.
+ globalEval: function( code, options, doc ) {
+ DOMEval( code, { nonce: options && options.nonce }, doc );
+ },
+
+ each: function( obj, callback ) {
+ var length, i = 0;
+
+ if ( isArrayLike( obj ) ) {
+ length = obj.length;
+ for ( ; i < length; i++ ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ }
+
+ return obj;
+ },
+
+
+ // Retrieve the text value of an array of DOM nodes
+ text: function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+
+ // If no nodeType, this is expected to be an array
+ while ( ( node = elem[ i++ ] ) ) {
+
+ // Do not traverse comment nodes
+ ret += jQuery.text( node );
+ }
+ }
+ if ( nodeType === 1 || nodeType === 11 ) {
+ return elem.textContent;
+ }
+ if ( nodeType === 9 ) {
+ return elem.documentElement.textContent;
+ }
+ if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArrayLike( Object( arr ) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ isXMLDoc: function( elem ) {
+ var namespace = elem && elem.namespaceURI,
+ docElem = elem && ( elem.ownerDocument || elem ).documentElement;
+
+ // Assume HTML when documentElement doesn't yet exist, such as inside
+ // document fragments.
+ return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
+ },
+
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var length, value,
+ i = 0,
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArrayLike( elems ) ) {
+ length = elems.length;
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return flat( ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+} );
+
+if ( typeof Symbol === "function" ) {
+ jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+ function( _i, name ) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+ } );
+
+function isArrayLike( obj ) {
+
+ // Support: real iOS 8.2 only (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = !!obj && "length" in obj && obj.length,
+ type = toType( obj );
+
+ if ( isFunction( obj ) || isWindow( obj ) ) {
+ return false;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+
+
+function nodeName( elem, name ) {
+
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+
+}
+var pop = arr.pop;
+
+
+var sort = arr.sort;
+
+
+var splice = arr.splice;
+
+
+var whitespace = "[\\x20\\t\\r\\n\\f]";
+
+
+var rtrimCSS = new RegExp(
+ "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
+ "g"
+);
+
+
+
+
+// Note: an element does not contain itself
+jQuery.contains = function( a, b ) {
+ var bup = b && b.parentNode;
+
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+
+ // Support: IE 9 - 11+
+ // IE doesn't have `contains` on SVG.
+ a.contains ?
+ a.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ) );
+};
+
+
+
+
+// CSS string/identifier serialization
+// https://drafts.csswg.org/cssom/#common-serializing-idioms
+var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
+
+function fcssescape( ch, asCodePoint ) {
+ if ( asCodePoint ) {
+
+ // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+ if ( ch === "\0" ) {
+ return "\uFFFD";
+ }
+
+ // Control characters and (dependent upon position) numbers get escaped as code points
+ return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+ }
+
+ // Other potentially-special ASCII characters get backslash-escaped
+ return "\\" + ch;
+}
+
+jQuery.escapeSelector = function( sel ) {
+ return ( sel + "" ).replace( rcssescape, fcssescape );
+};
+
+
+
+
+var preferredDoc = document,
+ pushNative = push;
+
+( function() {
+
+var i,
+ Expr,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+ push = pushNative,
+
+ // Local document vars
+ document,
+ documentElement,
+ documentIsHTML,
+ rbuggyQSA,
+ matches,
+
+ // Instance-specific data
+ expando = jQuery.expando,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ nonnativeSelectorCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
+ "loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
+ identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
+ "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
+
+ // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
+
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
+ whitespace + "*\\]",
+
+ pseudos = ":(" + identifier + ")(?:\\((" +
+
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
+ whitespace + "*" ),
+ rdescend = new RegExp( whitespace + "|>" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ ID: new RegExp( "^#(" + identifier + ")" ),
+ CLASS: new RegExp( "^\\.(" + identifier + ")" ),
+ TAG: new RegExp( "^(" + identifier + "|[*])" ),
+ ATTR: new RegExp( "^" + attributes ),
+ PSEUDO: new RegExp( "^" + pseudos ),
+ CHILD: new RegExp(
+ "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
+ whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
+ whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
+
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ needsContext: new RegExp( "^" + whitespace +
+ "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+ "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+
+ // CSS escapes
+ // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
+ "?|\\\\([^\\r\\n\\f])", "g" ),
+ funescape = function( escape, nonHex ) {
+ var high = "0x" + escape.slice( 1 ) - 0x10000;
+
+ if ( nonHex ) {
+
+ // Strip the backslash prefix from a non-hex escape sequence
+ return nonHex;
+ }
+
+ // Replace a hexadecimal escape sequence with the encoded Unicode code point
+ // Support: IE <=11+
+ // For values outside the Basic Multilingual Plane (BMP), manually construct a
+ // surrogate pair
+ return high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes; see `setDocument`.
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE/Edge.
+ unloadHandler = function() {
+ setDocument();
+ },
+
+ inDisabledFieldset = addCombinator(
+ function( elem ) {
+ return elem.disabled === true && nodeName( elem, "fieldset" );
+ },
+ { dir: "parentNode", next: "legend" }
+ );
+
+// Support: IE <=9 only
+// Accessing document.activeElement can throw unexpectedly
+// https://bugs.jquery.com/ticket/13393
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ ( arr = slice.call( preferredDoc.childNodes ) ),
+ preferredDoc.childNodes
+ );
+
+ // Support: Android <=4.0
+ // Detect silently failing push.apply
+ // eslint-disable-next-line no-unused-expressions
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = {
+ apply: function( target, els ) {
+ pushNative.apply( target, slice.call( els ) );
+ },
+ call: function( target ) {
+ pushNative.apply( target, slice.call( arguments, 1 ) );
+ }
+ };
+}
+
+function find( selector, context, results, seed ) {
+ var m, i, elem, nid, match, groups, newSelector,
+ newContext = context && context.ownerDocument,
+
+ // nodeType defaults to 9, since context defaults to document
+ nodeType = context ? context.nodeType : 9;
+
+ results = results || [];
+
+ // Return early from calls with invalid selector or context
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ // Try to shortcut find operations (as opposed to filters) in HTML documents
+ if ( !seed ) {
+ setDocument( context );
+ context = context || document;
+
+ if ( documentIsHTML ) {
+
+ // If the selector is sufficiently simple, try using a "get*By*" DOM method
+ // (excepting DocumentFragment context, where the methods don't exist)
+ if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {
+
+ // ID selector
+ if ( ( m = match[ 1 ] ) ) {
+
+ // Document context
+ if ( nodeType === 9 ) {
+ if ( ( elem = context.getElementById( m ) ) ) {
+
+ // Support: IE 9 only
+ // getElementById can match elements by name instead of ID
+ if ( elem.id === m ) {
+ push.call( results, elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+
+ // Element context
+ } else {
+
+ // Support: IE 9 only
+ // getElementById can match elements by name instead of ID
+ if ( newContext && ( elem = newContext.getElementById( m ) ) &&
+ find.contains( context, elem ) &&
+ elem.id === m ) {
+
+ push.call( results, elem );
+ return results;
+ }
+ }
+
+ // Type selector
+ } else if ( match[ 2 ] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Class selector
+ } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // Take advantage of querySelectorAll
+ if ( !nonnativeSelectorCache[ selector + " " ] &&
+ ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
+
+ newSelector = selector;
+ newContext = context;
+
+ // qSA considers elements outside a scoping root when evaluating child or
+ // descendant combinators, which is not what we want.
+ // In such cases, we work around the behavior by prefixing every selector in the
+ // list with an ID selector referencing the scope context.
+ // The technique has to be used as well when a leading combinator is used
+ // as such selectors are not recognized by querySelectorAll.
+ // Thanks to Andrew Dupont for this technique.
+ if ( nodeType === 1 &&
+ ( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
+
+ // Expand context for sibling selectors
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
+ context;
+
+ // We can use :scope instead of the ID hack if the browser
+ // supports it & if we're not changing the context.
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when
+ // strict-comparing two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( newContext != context || !support.scope ) {
+
+ // Capture the context ID, setting it first if necessary
+ if ( ( nid = context.getAttribute( "id" ) ) ) {
+ nid = jQuery.escapeSelector( nid );
+ } else {
+ context.setAttribute( "id", ( nid = expando ) );
+ }
+ }
+
+ // Prefix every selector in the list
+ groups = tokenize( selector );
+ i = groups.length;
+ while ( i-- ) {
+ groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +
+ toSelector( groups[ i ] );
+ }
+ newSelector = groups.join( "," );
+ }
+
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch ( qsaError ) {
+ nonnativeSelectorCache( selector, true );
+ } finally {
+ if ( nid === expando ) {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {function(string, object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+
+ // Use (key + " ") to avoid collision with native prototype properties
+ // (see https://github.com/jquery/sizzle/issues/157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return ( cache[ key + " " ] = value );
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by jQuery selector module
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created element and returns a boolean result
+ */
+function assert( fn ) {
+ var el = document.createElement( "fieldset" );
+
+ try {
+ return !!fn( el );
+ } catch ( e ) {
+ return false;
+ } finally {
+
+ // Remove from its parent by default
+ if ( el.parentNode ) {
+ el.parentNode.removeChild( el );
+ }
+
+ // release memory in IE
+ el = null;
+ }
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ return nodeName( elem, "input" ) && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
+ elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for :enabled/:disabled
+ * @param {Boolean} disabled true for :disabled; false for :enabled
+ */
+function createDisabledPseudo( disabled ) {
+
+ // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+ return function( elem ) {
+
+ // Only certain elements can match :enabled or :disabled
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
+ // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
+ if ( "form" in elem ) {
+
+ // Check for inherited disabledness on relevant non-disabled elements:
+ // * listed form-associated elements in a disabled fieldset
+ // https://html.spec.whatwg.org/multipage/forms.html#category-listed
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
+ // * option elements in a disabled optgroup
+ // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
+ // All such elements have a "form" property.
+ if ( elem.parentNode && elem.disabled === false ) {
+
+ // Option elements defer to a parent optgroup if present
+ if ( "label" in elem ) {
+ if ( "label" in elem.parentNode ) {
+ return elem.parentNode.disabled === disabled;
+ } else {
+ return elem.disabled === disabled;
+ }
+ }
+
+ // Support: IE 6 - 11+
+ // Use the isDisabled shortcut property to check for disabled fieldset ancestors
+ return elem.isDisabled === disabled ||
+
+ // Where there is no isDisabled, check manually
+ elem.isDisabled !== !disabled &&
+ inDisabledFieldset( elem ) === disabled;
+ }
+
+ return elem.disabled === disabled;
+
+ // Try to winnow out elements that can't be disabled before trusting the disabled property.
+ // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
+ // even exist on them, let alone have a boolean value.
+ } else if ( "label" in elem ) {
+ return elem.disabled === disabled;
+ }
+
+ // Remaining elements are neither :enabled nor :disabled
+ return false;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction( function( argument ) {
+ argument = +argument;
+ return markFunction( function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ ( j = matchIndexes[ i ] ) ] ) {
+ seed[ j ] = !( matches[ j ] = seed[ j ] );
+ }
+ }
+ } );
+ } );
+}
+
+/**
+ * Checks a node for validity as a jQuery selector context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [node] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+function setDocument( node ) {
+ var subWindow,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // Return early if doc is invalid or already selected
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Update global variables
+ document = doc;
+ documentElement = document.documentElement;
+ documentIsHTML = !jQuery.isXMLDoc( document );
+
+ // Support: iOS 7 only, IE 9 - 11+
+ // Older browsers didn't support unprefixed `matches`.
+ matches = documentElement.matches ||
+ documentElement.webkitMatchesSelector ||
+ documentElement.msMatchesSelector;
+
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ // Accessing iframe documents after unload throws "permission denied" errors
+ // (see trac-13936).
+ // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
+ // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
+ if ( documentElement.msMatchesSelector &&
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ preferredDoc != document &&
+ ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
+
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ subWindow.addEventListener( "unload", unloadHandler );
+ }
+
+ // Support: IE <10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programmatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert( function( el ) {
+ documentElement.appendChild( el ).id = jQuery.expando;
+ return !document.getElementsByName ||
+ !document.getElementsByName( jQuery.expando ).length;
+ } );
+
+ // Support: IE 9 only
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node.
+ support.disconnectedMatch = assert( function( el ) {
+ return matches.call( el, "*" );
+ } );
+
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ // IE/Edge don't support the :scope pseudo-class.
+ support.scope = assert( function() {
+ return document.querySelectorAll( ":scope" );
+ } );
+
+ // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
+ // Make sure the `:has()` argument is parsed unforgivingly.
+ // We include `*` in the test to detect buggy implementations that are
+ // _selectively_ forgiving (specifically when the list includes at least
+ // one valid selector).
+ // Note that we treat complete lack of support for `:has()` as if it were
+ // spec-compliant support, which is fine because use of `:has()` in such
+ // environments will fail in the qSA path and fall back to jQuery traversal
+ // anyway.
+ support.cssHas = assert( function() {
+ try {
+ document.querySelector( ":has(*,:jqfake)" );
+ return false;
+ } catch ( e ) {
+ return true;
+ }
+ } );
+
+ // ID filter and find
+ if ( support.getById ) {
+ Expr.filter.ID = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute( "id" ) === attrId;
+ };
+ };
+ Expr.find.ID = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var elem = context.getElementById( id );
+ return elem ? [ elem ] : [];
+ }
+ };
+ } else {
+ Expr.filter.ID = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" &&
+ elem.getAttributeNode( "id" );
+ return node && node.value === attrId;
+ };
+ };
+
+ // Support: IE 6 - 7 only
+ // getElementById is not reliable as a find shortcut
+ Expr.find.ID = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var node, i, elems,
+ elem = context.getElementById( id );
+
+ if ( elem ) {
+
+ // Verify the id attribute
+ node = elem.getAttributeNode( "id" );
+ if ( node && node.value === id ) {
+ return [ elem ];
+ }
+
+ // Fall back on getElementsByName
+ elems = context.getElementsByName( id );
+ i = 0;
+ while ( ( elem = elems[ i++ ] ) ) {
+ node = elem.getAttributeNode( "id" );
+ if ( node && node.value === id ) {
+ return [ elem ];
+ }
+ }
+ }
+
+ return [];
+ }
+ };
+ }
+
+ // Tag
+ Expr.find.TAG = function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else {
+ return context.querySelectorAll( tag );
+ }
+ };
+
+ // Class
+ Expr.find.CLASS = function( className, context ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ rbuggyQSA = [];
+
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert( function( el ) {
+
+ var input;
+
+ documentElement.appendChild( el ).innerHTML =
+ " " +
+ "" +
+ " ";
+
+ // Support: iOS <=7 - 8 only
+ // Boolean attributes and "value" are not treated correctly in some XML documents
+ if ( !el.querySelectorAll( "[selected]" ).length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: iOS <=7 - 8 only
+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push( "~=" );
+ }
+
+ // Support: iOS 8 only
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibling-combinator selector` fails
+ if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push( ".#.+[+~]" );
+ }
+
+ // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
+ // In some of the document kinds, these selectors wouldn't work natively.
+ // This is probably OK but for backwards compatibility we want to maintain
+ // handling them through jQuery traversal in jQuery 3.x.
+ if ( !el.querySelectorAll( ":checked" ).length ) {
+ rbuggyQSA.push( ":checked" );
+ }
+
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ input = document.createElement( "input" );
+ input.setAttribute( "type", "hidden" );
+ el.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE 9 - 11+
+ // IE's :disabled selector does not pick up the children of disabled fieldsets
+ // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
+ // In some of the document kinds, these selectors wouldn't work natively.
+ // This is probably OK but for backwards compatibility we want to maintain
+ // handling them through jQuery traversal in jQuery 3.x.
+ documentElement.appendChild( el ).disabled = true;
+ if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Support: IE 11+, Edge 15 - 18+
+ // IE 11/Edge don't find elements on a `[name='']` query in some cases.
+ // Adding a temporary attribute to the document before the selection works
+ // around the issue.
+ // Interestingly, IE 10 & older don't seem to have the issue.
+ input = document.createElement( "input" );
+ input.setAttribute( "name", "" );
+ el.appendChild( input );
+ if ( !el.querySelectorAll( "[name='']" ).length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
+ whitespace + "*(?:''|\"\")" );
+ }
+ } );
+
+ if ( !support.cssHas ) {
+
+ // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
+ // Our regular `try-catch` mechanism fails to detect natively-unsupported
+ // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
+ // in browsers that parse the `:has()` argument as a forgiving selector list.
+ // https://drafts.csswg.org/selectors/#relational now requires the argument
+ // to be parsed unforgivingly, but browsers have not yet fully adjusted.
+ rbuggyQSA.push( ":has" );
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {
+
+ // Choose the first element that is related to our preferred document
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( a === document || a.ownerDocument == preferredDoc &&
+ find.contains( preferredDoc, a ) ) {
+ return -1;
+ }
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( b === document || b.ownerDocument == preferredDoc &&
+ find.contains( preferredDoc, b ) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ };
+
+ return document;
+}
+
+find.matches = function( expr, elements ) {
+ return find( expr, null, null, elements );
+};
+
+find.matchesSelector = function( elem, expr ) {
+ setDocument( elem );
+
+ if ( documentIsHTML &&
+ !nonnativeSelectorCache[ expr + " " ] &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch ( e ) {
+ nonnativeSelectorCache( expr, true );
+ }
+ }
+
+ return find( expr, document, null, [ elem ] ).length > 0;
+};
+
+find.contains = function( context, elem ) {
+
+ // Set document vars if needed
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( ( context.ownerDocument || context ) != document ) {
+ setDocument( context );
+ }
+ return jQuery.contains( context, elem );
+};
+
+
+find.attr = function( elem, name ) {
+
+ // Set document vars if needed
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( ( elem.ownerDocument || elem ) != document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+
+ // Don't get fooled by Object.prototype properties (see trac-13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ if ( val !== undefined ) {
+ return val;
+ }
+
+ return elem.getAttribute( name );
+};
+
+find.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+jQuery.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ //
+ // Support: Android <=4.0+
+ // Testing for detecting duplicates is unpredictable so instead assume we can't
+ // depend on duplicate detection in all browsers without a stable sort.
+ hasDuplicate = !support.sortStable;
+ sortInput = !support.sortStable && slice.call( results, 0 );
+ sort.call( results, sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( ( elem = results[ i++ ] ) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ splice.call( results, duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+jQuery.fn.uniqueSort = function() {
+ return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
+};
+
+Expr = jQuery.expr = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ ATTR: function( match ) {
+ match[ 1 ] = match[ 1 ].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
+ .replace( runescape, funescape );
+
+ if ( match[ 2 ] === "~=" ) {
+ match[ 3 ] = " " + match[ 3 ] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ CHILD: function( match ) {
+
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[ 1 ] = match[ 1 ].toLowerCase();
+
+ if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {
+
+ // nth-* requires argument
+ if ( !match[ 3 ] ) {
+ find.error( match[ 0 ] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[ 4 ] = +( match[ 4 ] ?
+ match[ 5 ] + ( match[ 6 ] || 1 ) :
+ 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
+ );
+ match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[ 3 ] ) {
+ find.error( match[ 0 ] );
+ }
+
+ return match;
+ },
+
+ PSEUDO: function( match ) {
+ var excess,
+ unquoted = !match[ 6 ] && match[ 2 ];
+
+ if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[ 3 ] ) {
+ match[ 2 ] = match[ 4 ] || match[ 5 ] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+
+ // Get excess from tokenize (recursively)
+ ( excess = tokenize( unquoted, true ) ) &&
+
+ // advance to the next closing parenthesis
+ ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {
+
+ // excess is a negative index
+ match[ 0 ] = match[ 0 ].slice( 0, excess );
+ match[ 2 ] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ TAG: function( nodeNameSelector ) {
+ var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() {
+ return true;
+ } :
+ function( elem ) {
+ return nodeName( elem, expectedNodeName );
+ };
+ },
+
+ CLASS: function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ ( pattern = new RegExp( "(^|" + whitespace + ")" + className +
+ "(" + whitespace + "|$)" ) ) &&
+ classCache( className, function( elem ) {
+ return pattern.test(
+ typeof elem.className === "string" && elem.className ||
+ typeof elem.getAttribute !== "undefined" &&
+ elem.getAttribute( "class" ) ||
+ ""
+ );
+ } );
+ },
+
+ ATTR: function( name, operator, check ) {
+ return function( elem ) {
+ var result = find.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ if ( operator === "=" ) {
+ return result === check;
+ }
+ if ( operator === "!=" ) {
+ return result !== check;
+ }
+ if ( operator === "^=" ) {
+ return check && result.indexOf( check ) === 0;
+ }
+ if ( operator === "*=" ) {
+ return check && result.indexOf( check ) > -1;
+ }
+ if ( operator === "$=" ) {
+ return check && result.slice( -check.length ) === check;
+ }
+ if ( operator === "~=" ) {
+ return ( " " + result.replace( rwhitespace, " " ) + " " )
+ .indexOf( check ) > -1;
+ }
+ if ( operator === "|=" ) {
+ return result === check || result.slice( 0, check.length + 1 ) === check + "-";
+ }
+
+ return false;
+ };
+ },
+
+ CHILD: function( type, what, _argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, _context, xml ) {
+ var cache, outerCache, node, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType,
+ diff = false;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( ( node = node[ dir ] ) ) {
+ if ( ofType ?
+ nodeName( node, name ) :
+ node.nodeType === 1 ) {
+
+ return false;
+ }
+ }
+
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || ( parent[ expando ] = {} );
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+ diff = nodeIndex && cache[ 2 ];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( ( node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ ( diff = nodeIndex = 0 ) || start.pop() ) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ } else {
+
+ // Use previously-cached element index if available
+ if ( useCache ) {
+ outerCache = elem[ expando ] || ( elem[ expando ] = {} );
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
+ diff = nodeIndex;
+ }
+
+ // xml :nth-child(...)
+ // or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ if ( diff === false ) {
+
+ // Use the same loop as above to seek `elem` from the start
+ while ( ( node = ++nodeIndex && node && node[ dir ] ||
+ ( diff = nodeIndex = 0 ) || start.pop() ) ) {
+
+ if ( ( ofType ?
+ nodeName( node, name ) :
+ node.nodeType === 1 ) &&
+ ++diff ) {
+
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ outerCache = node[ expando ] ||
+ ( node[ expando ] = {} );
+ outerCache[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ PSEUDO: function( pseudo, argument ) {
+
+ // pseudo-class names are case-insensitive
+ // https://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ find.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as jQuery does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction( function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[ i ] );
+ seed[ idx ] = !( matches[ idx ] = matched[ i ] );
+ }
+ } ) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+
+ // Potentially complex pseudos
+ not: markFunction( function( selector ) {
+
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrimCSS, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction( function( seed, matches, _context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( ( elem = unmatched[ i ] ) ) {
+ seed[ i ] = !( matches[ i ] = elem );
+ }
+ }
+ } ) :
+ function( elem, _context, xml ) {
+ input[ 0 ] = elem;
+ matcher( input, null, xml, results );
+
+ // Don't keep the element
+ // (see https://github.com/jquery/sizzle/issues/299)
+ input[ 0 ] = null;
+ return !results.pop();
+ };
+ } ),
+
+ has: markFunction( function( selector ) {
+ return function( elem ) {
+ return find( selector, elem ).length > 0;
+ };
+ } ),
+
+ contains: markFunction( function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
+ };
+ } ),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // https://www.w3.org/TR/selectors/#lang-pseudo
+ lang: markFunction( function( lang ) {
+
+ // lang value must be a valid identifier
+ if ( !ridentifier.test( lang || "" ) ) {
+ find.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( ( elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );
+ return false;
+ };
+ } ),
+
+ // Miscellaneous
+ target: function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ root: function( elem ) {
+ return elem === documentElement;
+ },
+
+ focus: function( elem ) {
+ return elem === safeActiveElement() &&
+ document.hasFocus() &&
+ !!( elem.type || elem.href || ~elem.tabIndex );
+ },
+
+ // Boolean properties
+ enabled: createDisabledPseudo( false ),
+ disabled: createDisabledPseudo( true ),
+
+ checked: function( elem ) {
+
+ // In CSS3, :checked should return both checked and selected elements
+ // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ return ( nodeName( elem, "input" ) && !!elem.checked ) ||
+ ( nodeName( elem, "option" ) && !!elem.selected );
+ },
+
+ selected: function( elem ) {
+
+ // Support: IE <=11+
+ // Accessing the selectedIndex property
+ // forces the browser to treat the default option as
+ // selected when in an optgroup.
+ if ( elem.parentNode ) {
+ // eslint-disable-next-line no-unused-expressions
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ empty: function( elem ) {
+
+ // https://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ parent: function( elem ) {
+ return !Expr.pseudos.empty( elem );
+ },
+
+ // Element/input types
+ header: function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ input: function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ button: function( elem ) {
+ return nodeName( elem, "input" ) && elem.type === "button" ||
+ nodeName( elem, "button" );
+ },
+
+ text: function( elem ) {
+ var attr;
+ return nodeName( elem, "input" ) && elem.type === "text" &&
+
+ // Support: IE <10 only
+ // New HTML5 attribute values (e.g., "search") appear
+ // with elem.type === "text"
+ ( ( attr = elem.getAttribute( "type" ) ) == null ||
+ attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ first: createPositionalPseudo( function() {
+ return [ 0 ];
+ } ),
+
+ last: createPositionalPseudo( function( _matchIndexes, length ) {
+ return [ length - 1 ];
+ } ),
+
+ eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ } ),
+
+ even: createPositionalPseudo( function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ } ),
+
+ odd: createPositionalPseudo( function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ } ),
+
+ lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
+ var i;
+
+ if ( argument < 0 ) {
+ i = argument + length;
+ } else if ( argument > length ) {
+ i = length;
+ } else {
+ i = argument;
+ }
+
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ } ),
+
+ gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ } )
+ }
+};
+
+Expr.pseudos.nth = Expr.pseudos.eq;
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || ( match = rcomma.exec( soFar ) ) ) {
+ if ( match ) {
+
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[ 0 ].length ) || soFar;
+ }
+ groups.push( ( tokens = [] ) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+
+ // Cast descendant combinators to space
+ type: match[ 0 ].replace( rtrimCSS, " " )
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||
+ ( match = preFilters[ type ]( match ) ) ) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+ type: type,
+ matches: match
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ if ( parseOnly ) {
+ return soFar.length;
+ }
+
+ return soFar ?
+ find.error( selector ) :
+
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[ i ].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ skip = combinator.next,
+ key = skip || dir,
+ checkNonElements = base && key === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( ( elem = elem[ dir ] ) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ return false;
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
+ if ( xml ) {
+ while ( ( elem = elem[ dir ] ) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( ( elem = elem[ dir ] ) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || ( elem[ expando ] = {} );
+
+ if ( skip && nodeName( elem, skip ) ) {
+ elem = elem[ dir ] || elem;
+ } else if ( ( oldCache = outerCache[ key ] ) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return ( newCache[ 2 ] = oldCache[ 2 ] );
+ } else {
+
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ key ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[ i ]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[ 0 ];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ find( selector, contexts[ i ], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( ( elem = unmatched[ i ] ) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction( function( seed, results, context, xml ) {
+ var temp, i, elem, matcherOut,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed ||
+ multipleContexts( selector || "*",
+ context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems;
+
+ if ( matcher ) {
+
+ // If we have a postFinder, or filtered seed, or non-seed postFilter
+ // or preexisting results,
+ matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results;
+
+ // Find primary matches
+ matcher( matcherIn, matcherOut, context, xml );
+ } else {
+ matcherOut = matcherIn;
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( ( elem = temp[ i ] ) ) {
+ matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( ( elem = matcherOut[ i ] ) ) {
+
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( ( matcherIn[ i ] = elem ) );
+ }
+ }
+ postFinder( null, ( matcherOut = [] ), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( ( elem = matcherOut[ i ] ) &&
+ ( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
+
+ seed[ temp ] = !( results[ temp ] = elem );
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ } );
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[ 0 ].type ],
+ implicitRelative = leadingRelative || Expr.relative[ " " ],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
+ ( checkContext = context ).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+
+ // Avoid hanging onto element
+ // (see https://github.com/jquery/sizzle/issues/299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {
+ matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+ } else {
+ matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[ j ].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 )
+ .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
+ ).replace( rtrimCSS, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find.TAG( "*", outermost ),
+
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
+ len = elems.length;
+
+ if ( outermost ) {
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ outermostContext = context == document || context || outermost;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Support: iOS <=7 - 9 only
+ // Tolerate NodeList properties (IE: "length"; Safari: ) matching
+ // elements by id. (see trac-14142)
+ for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( !context && elem.ownerDocument != document ) {
+ setDocument( elem );
+ xml = !documentIsHTML;
+ }
+ while ( ( matcher = elementMatchers[ j++ ] ) ) {
+ if ( matcher( elem, context || document, xml ) ) {
+ push.call( results, elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+
+ // They will have gone through all possible matchers
+ if ( ( elem = !matcher && elem ) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // `i` is now the count of elements visited above, and adding it to `matchedCount`
+ // makes the latter nonnegative.
+ matchedCount += i;
+
+ // Apply set filters to unmatched elements
+ // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
+ // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
+ // no element matchers and no seed.
+ // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
+ // case, which will result in a "00" `matchedCount` that differs from `i` but is also
+ // numerically zero.
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( ( matcher = setMatchers[ j++ ] ) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !( unmatched[ i ] || setMatched[ i ] ) ) {
+ setMatched[ i ] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ jQuery.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+function compile( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[ i ] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector,
+ matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+}
+
+/**
+ * A low-level selection function that works with jQuery's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with jQuery selector compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( ( selector = compiled.selector || selector ) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is only one selector in the list and no seed
+ // (the latter of which guarantees us context)
+ if ( match.length === 1 ) {
+
+ // Reduce context if the leading compound selector is an ID
+ tokens = match[ 0 ] = match[ 0 ].slice( 0 );
+ if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
+ context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
+
+ context = ( Expr.find.ID(
+ token.matches[ 0 ].replace( runescape, funescape ),
+ context
+ ) || [] )[ 0 ];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[ i ];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ ( type = token.type ) ] ) {
+ break;
+ }
+ if ( ( find = Expr.find[ type ] ) ) {
+
+ // Search, expanding context for leading sibling combinators
+ if ( ( seed = find(
+ token.matches[ 0 ].replace( runescape, funescape ),
+ rsibling.test( tokens[ 0 ].type ) &&
+ testContext( context.parentNode ) || context
+ ) ) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+}
+
+// One-time assignments
+
+// Support: Android <=4.0 - 4.1+
+// Sort stability
+support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Android <=4.0 - 4.1+
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert( function( el ) {
+
+ // Should return 1, but returns 4 (following)
+ return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
+} );
+
+jQuery.find = find;
+
+// Deprecated
+jQuery.expr[ ":" ] = jQuery.expr.pseudos;
+jQuery.unique = jQuery.uniqueSort;
+
+// These have always been private, but they used to be documented as part of
+// Sizzle so let's maintain them for now for backwards compatibility purposes.
+find.compile = compile;
+find.select = select;
+find.setDocument = setDocument;
+find.tokenize = tokenize;
+
+find.escape = jQuery.escapeSelector;
+find.getText = jQuery.text;
+find.isXML = jQuery.isXMLDoc;
+find.selectors = jQuery.expr;
+find.support = jQuery.support;
+find.uniqueSort = jQuery.uniqueSort;
+
+ /* eslint-enable */
+
+} )();
+
+
+var dir = function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+};
+
+
+var siblings = function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+};
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
+
+
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ return !!qualifier.call( elem, i, elem ) !== not;
+ } );
+ }
+
+ // Single element
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ } );
+ }
+
+ // Arraylike of elements (jQuery, arguments, Array)
+ if ( typeof qualifier !== "string" ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
+ } );
+ }
+
+ // Filtered directly for both simple and complex selectors
+ return jQuery.filter( qualifier, elements, not );
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ if ( elems.length === 1 && elem.nodeType === 1 ) {
+ return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
+ }
+
+ return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ } ) );
+};
+
+jQuery.fn.extend( {
+ find: function( selector ) {
+ var i, ret,
+ len = this.length,
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter( function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ } ) );
+ }
+
+ ret = this.pushStack( [] );
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ return len > 1 ? jQuery.uniqueSort( ret ) : ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], false ) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], true ) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+} );
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over to avoid XSS via location.hash (trac-9521)
+ // Strict HTML recognition (trac-11290: must start with <)
+ // Shortcut simple #id case for speed
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
+
+ init = jQuery.fn.init = function( selector, context, root ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Method init() accepts an alternate rootjQuery
+ // so migrate can support jQuery.sub (gh-2101)
+ root = root || rootjQuery;
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[ 0 ] === "<" &&
+ selector[ selector.length - 1 ] === ">" &&
+ selector.length >= 3 ) {
+
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && ( match[ 1 ] || !context ) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[ 1 ] ) {
+ context = context instanceof jQuery ? context[ 0 ] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[ 1 ],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+
+ // Properties of context are called as methods if possible
+ if ( isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[ 2 ] );
+
+ if ( elem ) {
+
+ // Inject the element directly into the jQuery object
+ this[ 0 ] = elem;
+ this.length = 1;
+ }
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || root ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this[ 0 ] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( isFunction( selector ) ) {
+ return root.ready !== undefined ?
+ root.ready( selector ) :
+
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend( {
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter( function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[ i ] ) ) {
+ return true;
+ }
+ }
+ } );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ targets = typeof selectors !== "string" && jQuery( selectors );
+
+ // Positional selectors never match, since there's no _selection_ context
+ if ( !rneedsContext.test( selectors ) ) {
+ for ( ; i < l; i++ ) {
+ for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
+
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && ( targets ?
+ targets.index( cur ) > -1 :
+
+ // Don't pass non-elements to jQuery#find
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector( cur, selectors ) ) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.uniqueSort(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ }
+} );
+
+function sibling( cur, dir ) {
+ while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each( {
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, _i, until ) {
+ return dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, _i, until ) {
+ return dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, _i, until ) {
+ return dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return siblings( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return siblings( elem.firstChild );
+ },
+ contents: function( elem ) {
+ if ( elem.contentDocument != null &&
+
+ // Support: IE 11+
+ // elements with no `data` attribute has an object
+ // `contentDocument` with a `null` prototype.
+ getProto( elem.contentDocument ) ) {
+
+ return elem.contentDocument;
+ }
+
+ // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
+ // Treat the template element as a regular one in browsers that
+ // don't support it.
+ if ( nodeName( elem, "template" ) ) {
+ elem = elem.content || elem;
+ }
+
+ return jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.uniqueSort( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+} );
+var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
+
+
+
+// Convert String-formatted options into Object-formatted ones
+function createOptions( options ) {
+ var object = {};
+ jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ } );
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ createOptions( options ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+
+ // Last fire value for non-forgettable lists
+ memory,
+
+ // Flag to know if list was already fired
+ fired,
+
+ // Flag to prevent firing
+ locked,
+
+ // Actual callback list
+ list = [],
+
+ // Queue of execution data for repeatable lists
+ queue = [],
+
+ // Index of currently firing callback (modified by add/remove as needed)
+ firingIndex = -1,
+
+ // Fire callbacks
+ fire = function() {
+
+ // Enforce single-firing
+ locked = locked || options.once;
+
+ // Execute callbacks for all pending executions,
+ // respecting firingIndex overrides and runtime changes
+ fired = firing = true;
+ for ( ; queue.length; firingIndex = -1 ) {
+ memory = queue.shift();
+ while ( ++firingIndex < list.length ) {
+
+ // Run callback and check for early termination
+ if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
+ options.stopOnFalse ) {
+
+ // Jump to end and forget the data so .add doesn't re-fire
+ firingIndex = list.length;
+ memory = false;
+ }
+ }
+ }
+
+ // Forget the data if we're done with it
+ if ( !options.memory ) {
+ memory = false;
+ }
+
+ firing = false;
+
+ // Clean up if we're done firing for good
+ if ( locked ) {
+
+ // Keep an empty list if we have data for future add calls
+ if ( memory ) {
+ list = [];
+
+ // Otherwise, this object is spent
+ } else {
+ list = "";
+ }
+ }
+ },
+
+ // Actual Callbacks object
+ self = {
+
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+
+ // If we have memory from a past run, we should fire after adding
+ if ( memory && !firing ) {
+ firingIndex = list.length - 1;
+ queue.push( memory );
+ }
+
+ ( function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ if ( isFunction( arg ) ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && toType( arg ) !== "string" ) {
+
+ // Inspect recursively
+ add( arg );
+ }
+ } );
+ } )( arguments );
+
+ if ( memory && !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Remove a callback from the list
+ remove: function() {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+
+ // Handle firing indexes
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ } );
+ return this;
+ },
+
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ?
+ jQuery.inArray( fn, list ) > -1 :
+ list.length > 0;
+ },
+
+ // Remove all callbacks from the list
+ empty: function() {
+ if ( list ) {
+ list = [];
+ }
+ return this;
+ },
+
+ // Disable .fire and .add
+ // Abort any current/pending executions
+ // Clear all callbacks and values
+ disable: function() {
+ locked = queue = [];
+ list = memory = "";
+ return this;
+ },
+ disabled: function() {
+ return !list;
+ },
+
+ // Disable .fire
+ // Also disable .add unless we have memory (since it would have no effect)
+ // Abort any pending executions
+ lock: function() {
+ locked = queue = [];
+ if ( !memory && !firing ) {
+ list = memory = "";
+ }
+ return this;
+ },
+ locked: function() {
+ return !!locked;
+ },
+
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( !locked ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ queue.push( args );
+ if ( !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+function Identity( v ) {
+ return v;
+}
+function Thrower( ex ) {
+ throw ex;
+}
+
+function adoptValue( value, resolve, reject, noValue ) {
+ var method;
+
+ try {
+
+ // Check for promise aspect first to privilege synchronous behavior
+ if ( value && isFunction( ( method = value.promise ) ) ) {
+ method.call( value ).done( resolve ).fail( reject );
+
+ // Other thenables
+ } else if ( value && isFunction( ( method = value.then ) ) ) {
+ method.call( value, resolve, reject );
+
+ // Other non-thenables
+ } else {
+
+ // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
+ // * false: [ value ].slice( 0 ) => resolve( value )
+ // * true: [ value ].slice( 1 ) => resolve()
+ resolve.apply( undefined, [ value ].slice( noValue ) );
+ }
+
+ // For Promises/A+, convert exceptions into rejections
+ // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
+ // Deferred#then to conditionally suppress rejection.
+ } catch ( value ) {
+
+ // Support: Android 4.0 only
+ // Strict mode functions invoked without .call/.apply get global-object context
+ reject.apply( undefined, [ value ] );
+ }
+}
+
+jQuery.extend( {
+
+ Deferred: function( func ) {
+ var tuples = [
+
+ // action, add listener, callbacks,
+ // ... .then handlers, argument index, [final state]
+ [ "notify", "progress", jQuery.Callbacks( "memory" ),
+ jQuery.Callbacks( "memory" ), 2 ],
+ [ "resolve", "done", jQuery.Callbacks( "once memory" ),
+ jQuery.Callbacks( "once memory" ), 0, "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks( "once memory" ),
+ jQuery.Callbacks( "once memory" ), 1, "rejected" ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ "catch": function( fn ) {
+ return promise.then( null, fn );
+ },
+
+ // Keep pipe for back-compat
+ pipe: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+
+ return jQuery.Deferred( function( newDefer ) {
+ jQuery.each( tuples, function( _i, tuple ) {
+
+ // Map tuples (progress, done, fail) to arguments (done, fail, progress)
+ var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
+
+ // deferred.progress(function() { bind to newDefer or newDefer.notify })
+ // deferred.done(function() { bind to newDefer or newDefer.resolve })
+ // deferred.fail(function() { bind to newDefer or newDefer.reject })
+ deferred[ tuple[ 1 ] ]( function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && isFunction( returned.promise ) ) {
+ returned.promise()
+ .progress( newDefer.notify )
+ .done( newDefer.resolve )
+ .fail( newDefer.reject );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ](
+ this,
+ fn ? [ returned ] : arguments
+ );
+ }
+ } );
+ } );
+ fns = null;
+ } ).promise();
+ },
+ then: function( onFulfilled, onRejected, onProgress ) {
+ var maxDepth = 0;
+ function resolve( depth, deferred, handler, special ) {
+ return function() {
+ var that = this,
+ args = arguments,
+ mightThrow = function() {
+ var returned, then;
+
+ // Support: Promises/A+ section 2.3.3.3.3
+ // https://promisesaplus.com/#point-59
+ // Ignore double-resolution attempts
+ if ( depth < maxDepth ) {
+ return;
+ }
+
+ returned = handler.apply( that, args );
+
+ // Support: Promises/A+ section 2.3.1
+ // https://promisesaplus.com/#point-48
+ if ( returned === deferred.promise() ) {
+ throw new TypeError( "Thenable self-resolution" );
+ }
+
+ // Support: Promises/A+ sections 2.3.3.1, 3.5
+ // https://promisesaplus.com/#point-54
+ // https://promisesaplus.com/#point-75
+ // Retrieve `then` only once
+ then = returned &&
+
+ // Support: Promises/A+ section 2.3.4
+ // https://promisesaplus.com/#point-64
+ // Only check objects and functions for thenability
+ ( typeof returned === "object" ||
+ typeof returned === "function" ) &&
+ returned.then;
+
+ // Handle a returned thenable
+ if ( isFunction( then ) ) {
+
+ // Special processors (notify) just wait for resolution
+ if ( special ) {
+ then.call(
+ returned,
+ resolve( maxDepth, deferred, Identity, special ),
+ resolve( maxDepth, deferred, Thrower, special )
+ );
+
+ // Normal processors (resolve) also hook into progress
+ } else {
+
+ // ...and disregard older resolution values
+ maxDepth++;
+
+ then.call(
+ returned,
+ resolve( maxDepth, deferred, Identity, special ),
+ resolve( maxDepth, deferred, Thrower, special ),
+ resolve( maxDepth, deferred, Identity,
+ deferred.notifyWith )
+ );
+ }
+
+ // Handle all other returned values
+ } else {
+
+ // Only substitute handlers pass on context
+ // and multiple values (non-spec behavior)
+ if ( handler !== Identity ) {
+ that = undefined;
+ args = [ returned ];
+ }
+
+ // Process the value(s)
+ // Default process is resolve
+ ( special || deferred.resolveWith )( that, args );
+ }
+ },
+
+ // Only normal processors (resolve) catch and reject exceptions
+ process = special ?
+ mightThrow :
+ function() {
+ try {
+ mightThrow();
+ } catch ( e ) {
+
+ if ( jQuery.Deferred.exceptionHook ) {
+ jQuery.Deferred.exceptionHook( e,
+ process.error );
+ }
+
+ // Support: Promises/A+ section 2.3.3.3.4.1
+ // https://promisesaplus.com/#point-61
+ // Ignore post-resolution exceptions
+ if ( depth + 1 >= maxDepth ) {
+
+ // Only substitute handlers pass on context
+ // and multiple values (non-spec behavior)
+ if ( handler !== Thrower ) {
+ that = undefined;
+ args = [ e ];
+ }
+
+ deferred.rejectWith( that, args );
+ }
+ }
+ };
+
+ // Support: Promises/A+ section 2.3.3.3.1
+ // https://promisesaplus.com/#point-57
+ // Re-resolve promises immediately to dodge false rejection from
+ // subsequent errors
+ if ( depth ) {
+ process();
+ } else {
+
+ // Call an optional hook to record the error, in case of exception
+ // since it's otherwise lost when execution goes async
+ if ( jQuery.Deferred.getErrorHook ) {
+ process.error = jQuery.Deferred.getErrorHook();
+
+ // The deprecated alias of the above. While the name suggests
+ // returning the stack, not an error instance, jQuery just passes
+ // it directly to `console.warn` so both will work; an instance
+ // just better cooperates with source maps.
+ } else if ( jQuery.Deferred.getStackHook ) {
+ process.error = jQuery.Deferred.getStackHook();
+ }
+ window.setTimeout( process );
+ }
+ };
+ }
+
+ return jQuery.Deferred( function( newDefer ) {
+
+ // progress_handlers.add( ... )
+ tuples[ 0 ][ 3 ].add(
+ resolve(
+ 0,
+ newDefer,
+ isFunction( onProgress ) ?
+ onProgress :
+ Identity,
+ newDefer.notifyWith
+ )
+ );
+
+ // fulfilled_handlers.add( ... )
+ tuples[ 1 ][ 3 ].add(
+ resolve(
+ 0,
+ newDefer,
+ isFunction( onFulfilled ) ?
+ onFulfilled :
+ Identity
+ )
+ );
+
+ // rejected_handlers.add( ... )
+ tuples[ 2 ][ 3 ].add(
+ resolve(
+ 0,
+ newDefer,
+ isFunction( onRejected ) ?
+ onRejected :
+ Thrower
+ )
+ );
+ } ).promise();
+ },
+
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 5 ];
+
+ // promise.progress = list.add
+ // promise.done = list.add
+ // promise.fail = list.add
+ promise[ tuple[ 1 ] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(
+ function() {
+
+ // state = "resolved" (i.e., fulfilled)
+ // state = "rejected"
+ state = stateString;
+ },
+
+ // rejected_callbacks.disable
+ // fulfilled_callbacks.disable
+ tuples[ 3 - i ][ 2 ].disable,
+
+ // rejected_handlers.disable
+ // fulfilled_handlers.disable
+ tuples[ 3 - i ][ 3 ].disable,
+
+ // progress_callbacks.lock
+ tuples[ 0 ][ 2 ].lock,
+
+ // progress_handlers.lock
+ tuples[ 0 ][ 3 ].lock
+ );
+ }
+
+ // progress_handlers.fire
+ // fulfilled_handlers.fire
+ // rejected_handlers.fire
+ list.add( tuple[ 3 ].fire );
+
+ // deferred.notify = function() { deferred.notifyWith(...) }
+ // deferred.resolve = function() { deferred.resolveWith(...) }
+ // deferred.reject = function() { deferred.rejectWith(...) }
+ deferred[ tuple[ 0 ] ] = function() {
+ deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
+ return this;
+ };
+
+ // deferred.notifyWith = list.fireWith
+ // deferred.resolveWith = list.fireWith
+ // deferred.rejectWith = list.fireWith
+ deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
+ } );
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( singleValue ) {
+ var
+
+ // count of uncompleted subordinates
+ remaining = arguments.length,
+
+ // count of unprocessed arguments
+ i = remaining,
+
+ // subordinate fulfillment data
+ resolveContexts = Array( i ),
+ resolveValues = slice.call( arguments ),
+
+ // the primary Deferred
+ primary = jQuery.Deferred(),
+
+ // subordinate callback factory
+ updateFunc = function( i ) {
+ return function( value ) {
+ resolveContexts[ i ] = this;
+ resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( !( --remaining ) ) {
+ primary.resolveWith( resolveContexts, resolveValues );
+ }
+ };
+ };
+
+ // Single- and empty arguments are adopted like Promise.resolve
+ if ( remaining <= 1 ) {
+ adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
+ !remaining );
+
+ // Use .then() to unwrap secondary thenables (cf. gh-3000)
+ if ( primary.state() === "pending" ||
+ isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
+
+ return primary.then();
+ }
+ }
+
+ // Multiple arguments are aggregated like Promise.all array elements
+ while ( i-- ) {
+ adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
+ }
+
+ return primary.promise();
+ }
+} );
+
+
+// These usually indicate a programmer mistake during development,
+// warn about them ASAP rather than swallowing them by default.
+var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
+
+// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
+// captured before the async barrier to get the original error cause
+// which may otherwise be hidden.
+jQuery.Deferred.exceptionHook = function( error, asyncError ) {
+
+ // Support: IE 8 - 9 only
+ // Console exists when dev tools are open, which can happen at any time
+ if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
+ window.console.warn( "jQuery.Deferred exception: " + error.message,
+ error.stack, asyncError );
+ }
+};
+
+
+
+
+jQuery.readyException = function( error ) {
+ window.setTimeout( function() {
+ throw error;
+ } );
+};
+
+
+
+
+// The deferred used on DOM ready
+var readyList = jQuery.Deferred();
+
+jQuery.fn.ready = function( fn ) {
+
+ readyList
+ .then( fn )
+
+ // Wrap jQuery.readyException in a function so that the lookup
+ // happens at the time of error handling instead of callback
+ // registration.
+ .catch( function( error ) {
+ jQuery.readyException( error );
+ } );
+
+ return this;
+};
+
+jQuery.extend( {
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See trac-6781
+ readyWait: 1,
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+ }
+} );
+
+jQuery.ready.then = readyList.then;
+
+// The ready event handler and self cleanup method
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed );
+ window.removeEventListener( "load", completed );
+ jQuery.ready();
+}
+
+// Catch cases where $(document).ready() is called
+// after the browser event has already occurred.
+// Support: IE <=9 - 10 only
+// Older IE sometimes signals "interactive" too soon
+if ( document.readyState === "complete" ||
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
+
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ window.setTimeout( jQuery.ready );
+
+} else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed );
+}
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( toType( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ access( elems, fn, i, key[ i ], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, _key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn(
+ elems[ i ], key, raw ?
+ value :
+ value.call( elems[ i ], i, fn( elems[ i ], key ) )
+ );
+ }
+ }
+ }
+
+ if ( chainable ) {
+ return elems;
+ }
+
+ // Gets
+ if ( bulk ) {
+ return fn.call( elems );
+ }
+
+ return len ? fn( elems[ 0 ], key ) : emptyGet;
+};
+
+
+// Matches dashed string for camelizing
+var rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([a-z])/g;
+
+// Used by camelCase as callback to replace()
+function fcamelCase( _all, letter ) {
+ return letter.toUpperCase();
+}
+
+// Convert dashed to camelCase; used by the css and data modules
+// Support: IE <=9 - 11, Edge 12 - 15
+// Microsoft forgot to hump their vendor prefix (trac-9572)
+function camelCase( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+}
+var acceptData = function( owner ) {
+
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+
+
+function Data() {
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+
+ cache: function( owner ) {
+
+ // Check if the owner object already has a cache
+ var value = owner[ this.expando ];
+
+ // If not, create one
+ if ( !value ) {
+ value = {};
+
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see trac-8335.
+ // Always return an empty object.
+ if ( acceptData( owner ) ) {
+
+ // If it is a node unlikely to be stringify-ed or looped over
+ // use plain assignment
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = value;
+
+ // Otherwise secure it in a non-enumerable property
+ // configurable must be true to allow the property to be
+ // deleted when data is removed
+ } else {
+ Object.defineProperty( owner, this.expando, {
+ value: value,
+ configurable: true
+ } );
+ }
+ }
+ }
+
+ return value;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ cache = this.cache( owner );
+
+ // Handle: [ owner, key, value ] args
+ // Always use camelCase key (gh-2257)
+ if ( typeof data === "string" ) {
+ cache[ camelCase( data ) ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+
+ // Copy the properties one-by-one to the cache object
+ for ( prop in data ) {
+ cache[ camelCase( prop ) ] = data[ prop ];
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ return key === undefined ?
+ this.cache( owner ) :
+
+ // Always use camelCase key (gh-2257)
+ owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
+ },
+ access: function( owner, key, value ) {
+
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ( ( key && typeof key === "string" ) && value === undefined ) ) {
+
+ return this.get( owner, key );
+ }
+
+ // When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i,
+ cache = owner[ this.expando ];
+
+ if ( cache === undefined ) {
+ return;
+ }
+
+ if ( key !== undefined ) {
+
+ // Support array or space separated string of keys
+ if ( Array.isArray( key ) ) {
+
+ // If key is an array of keys...
+ // We always set camelCase keys, so remove that.
+ key = key.map( camelCase );
+ } else {
+ key = camelCase( key );
+
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ key = key in cache ?
+ [ key ] :
+ ( key.match( rnothtmlwhite ) || [] );
+ }
+
+ i = key.length;
+
+ while ( i-- ) {
+ delete cache[ key[ i ] ];
+ }
+ }
+
+ // Remove the expando if there's no more data
+ if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
+
+ // Support: Chrome <=35 - 45
+ // Webkit & Blink performance suffers when deleting properties
+ // from DOM nodes, so set to undefined instead
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = undefined;
+ } else {
+ delete owner[ this.expando ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ var cache = owner[ this.expando ];
+ return cache !== undefined && !jQuery.isEmptyObject( cache );
+ }
+};
+var dataPriv = new Data();
+
+var dataUser = new Data();
+
+
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /[A-Z]/g;
+
+function getData( data ) {
+ if ( data === "true" ) {
+ return true;
+ }
+
+ if ( data === "false" ) {
+ return false;
+ }
+
+ if ( data === "null" ) {
+ return null;
+ }
+
+ // Only convert to a number if it doesn't change the string
+ if ( data === +data + "" ) {
+ return +data;
+ }
+
+ if ( rbrace.test( data ) ) {
+ return JSON.parse( data );
+ }
+
+ return data;
+}
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = getData( data );
+ } catch ( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ dataUser.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend( {
+ hasData: function( elem ) {
+ return dataUser.hasData( elem ) || dataPriv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return dataUser.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ dataUser.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to dataPriv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return dataPriv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ dataPriv.remove( elem, name );
+ }
+} );
+
+jQuery.fn.extend( {
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = dataUser.get( elem );
+
+ if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE 11 only
+ // The attrs elements can be null (trac-14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = camelCase( name.slice( 5 ) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ dataPriv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each( function() {
+ dataUser.set( this, key );
+ } );
+ }
+
+ return access( this, function( value ) {
+ var data;
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+
+ // Attempt to get data from the cache
+ // The key will always be camelCased in Data
+ data = dataUser.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each( function() {
+
+ // We always store the camelCased key
+ dataUser.set( this, key, value );
+ } );
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each( function() {
+ dataUser.remove( this, key );
+ } );
+ }
+} );
+
+
+jQuery.extend( {
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = dataPriv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || Array.isArray( data ) ) {
+ queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+ empty: jQuery.Callbacks( "once memory" ).add( function() {
+ dataPriv.remove( elem, [ type + "queue", key ] );
+ } )
+ } );
+ }
+} );
+
+jQuery.fn.extend( {
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[ 0 ], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each( function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ } );
+ },
+ dequeue: function( type ) {
+ return this.each( function() {
+ jQuery.dequeue( this, type );
+ } );
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+} );
+var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
+
+var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
+
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var documentElement = document.documentElement;
+
+
+
+ var isAttached = function( elem ) {
+ return jQuery.contains( elem.ownerDocument, elem );
+ },
+ composed = { composed: true };
+
+ // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
+ // Check attachment across shadow DOM boundaries when possible (gh-3504)
+ // Support: iOS 10.0-10.2 only
+ // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
+ // leading to errors. We need to check for `getRootNode`.
+ if ( documentElement.getRootNode ) {
+ isAttached = function( elem ) {
+ return jQuery.contains( elem.ownerDocument, elem ) ||
+ elem.getRootNode( composed ) === elem.ownerDocument;
+ };
+ }
+var isHiddenWithinTree = function( elem, el ) {
+
+ // isHiddenWithinTree might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+
+ // Inline style trumps all
+ return elem.style.display === "none" ||
+ elem.style.display === "" &&
+
+ // Otherwise, check computed style
+ // Support: Firefox <=43 - 45
+ // Disconnected elements can have computed display: none, so first confirm that elem is
+ // in the document.
+ isAttached( elem ) &&
+
+ jQuery.css( elem, "display" ) === "none";
+ };
+
+
+
+function adjustCSS( elem, prop, valueParts, tween ) {
+ var adjusted, scale,
+ maxIterations = 20,
+ currentValue = tween ?
+ function() {
+ return tween.cur();
+ } :
+ function() {
+ return jQuery.css( elem, prop, "" );
+ },
+ initial = currentValue(),
+ unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ initialInUnit = elem.nodeType &&
+ ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+ rcssNum.exec( jQuery.css( elem, prop ) );
+
+ if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+
+ // Support: Firefox <=54
+ // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
+ initial = initial / 2;
+
+ // Trust units reported by jQuery.css
+ unit = unit || initialInUnit[ 3 ];
+
+ // Iteratively approximate from a nonzero starting point
+ initialInUnit = +initial || 1;
+
+ while ( maxIterations-- ) {
+
+ // Evaluate and update our best guess (doubling guesses that zero out).
+ // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
+ jQuery.style( elem, prop, initialInUnit + unit );
+ if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
+ maxIterations = 0;
+ }
+ initialInUnit = initialInUnit / scale;
+
+ }
+
+ initialInUnit = initialInUnit * 2;
+ jQuery.style( elem, prop, initialInUnit + unit );
+
+ // Make sure we update the tween properties later on
+ valueParts = valueParts || [];
+ }
+
+ if ( valueParts ) {
+ initialInUnit = +initialInUnit || +initial || 0;
+
+ // Apply relative offset (+=/-=) if specified
+ adjusted = valueParts[ 1 ] ?
+ initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+ +valueParts[ 2 ];
+ if ( tween ) {
+ tween.unit = unit;
+ tween.start = initialInUnit;
+ tween.end = adjusted;
+ }
+ }
+ return adjusted;
+}
+
+
+var defaultDisplayMap = {};
+
+function getDefaultDisplay( elem ) {
+ var temp,
+ doc = elem.ownerDocument,
+ nodeName = elem.nodeName,
+ display = defaultDisplayMap[ nodeName ];
+
+ if ( display ) {
+ return display;
+ }
+
+ temp = doc.body.appendChild( doc.createElement( nodeName ) );
+ display = jQuery.css( temp, "display" );
+
+ temp.parentNode.removeChild( temp );
+
+ if ( display === "none" ) {
+ display = "block";
+ }
+ defaultDisplayMap[ nodeName ] = display;
+
+ return display;
+}
+
+function showHide( elements, show ) {
+ var display, elem,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ // Determine new display value for elements that need to change
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ display = elem.style.display;
+ if ( show ) {
+
+ // Since we force visibility upon cascade-hidden elements, an immediate (and slow)
+ // check is required in this first loop unless we have a nonempty display value (either
+ // inline or about-to-be-restored)
+ if ( display === "none" ) {
+ values[ index ] = dataPriv.get( elem, "display" ) || null;
+ if ( !values[ index ] ) {
+ elem.style.display = "";
+ }
+ }
+ if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
+ values[ index ] = getDefaultDisplay( elem );
+ }
+ } else {
+ if ( display !== "none" ) {
+ values[ index ] = "none";
+
+ // Remember what we're overwriting
+ dataPriv.set( elem, "display", display );
+ }
+ }
+ }
+
+ // Set the display of the elements in a second loop to avoid constant reflow
+ for ( index = 0; index < length; index++ ) {
+ if ( values[ index ] != null ) {
+ elements[ index ].style.display = values[ index ];
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend( {
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each( function() {
+ if ( isHiddenWithinTree( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ } );
+ }
+} );
+var rcheckableType = ( /^(?:checkbox|radio)$/i );
+
+var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
+
+var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
+
+
+
+( function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Android 4.0 - 4.3 only
+ // Check state lost if the name is set (trac-11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (trac-14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Android <=4.1 only
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE <=11 only
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+
+ // Support: IE <=9 only
+ // IE <=9 replaces tags with their contents when inserted outside of
+ // the select element.
+ div.innerHTML = " ";
+ support.option = !!div.lastChild;
+} )();
+
+
+// We have to close these tags to support XHTML (trac-13200)
+var wrapMap = {
+
+ // XHTML parsers do not magically insert elements in the
+ // same way that tag soup parsers do. So we cannot shorten
+ // this by omitting or other required elements.
+ thead: [ 1, "" ],
+ col: [ 2, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+
+ _default: [ 0, "", "" ]
+};
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// Support: IE <=9 only
+if ( !support.option ) {
+ wrapMap.optgroup = wrapMap.option = [ 1, "", " " ];
+}
+
+
+function getAll( context, tag ) {
+
+ // Support: IE <=9 - 11 only
+ // Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
+ var ret;
+
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ ret = context.getElementsByTagName( tag || "*" );
+
+ } else if ( typeof context.querySelectorAll !== "undefined" ) {
+ ret = context.querySelectorAll( tag || "*" );
+
+ } else {
+ ret = [];
+ }
+
+ if ( tag === undefined || tag && nodeName( context, tag ) ) {
+ return jQuery.merge( [ context ], ret );
+ }
+
+ return ret;
+}
+
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ dataPriv.set(
+ elems[ i ],
+ "globalEval",
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+
+var rhtml = /<|?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+ var elem, tmp, tag, wrap, attached, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( toType( elem ) === "object" ) {
+
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (trac-12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( ( elem = nodes[ i++ ] ) ) {
+
+ // Skip elements already in the context collection (trac-4087)
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+ if ( ignored ) {
+ ignored.push( elem );
+ }
+ continue;
+ }
+
+ attached = isAttached( elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( attached ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( ( elem = tmp[ j++ ] ) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+}
+
+
+var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function on( elem, types, selector, data, fn, one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ on( elem, type, selector, data, types[ type ], one );
+ }
+ return elem;
+ }
+
+ if ( data == null && fn == null ) {
+
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return elem;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return elem.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ } );
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.get( elem );
+
+ // Only attach events to objects that accept data
+ if ( !acceptData( elem ) ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Ensure that invalid selectors throw exceptions at attach time
+ // Evaluate against documentElement in case elem is a non-element node (e.g., document)
+ if ( selector ) {
+ jQuery.find.matchesSelector( documentElement, selector );
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !( events = elemData.events ) ) {
+ events = elemData.events = Object.create( null );
+ }
+ if ( !( eventHandle = elemData.handle ) ) {
+ eventHandle = elemData.handle = function( e ) {
+
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend( {
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join( "." )
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !( handlers = events[ type ] ) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup ||
+ special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
+
+ if ( !elemData || !( events = elemData.events ) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[ 2 ] &&
+ new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector ||
+ selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown ||
+ special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove data and the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ dataPriv.remove( elem, "handle events" );
+ }
+ },
+
+ dispatch: function( nativeEvent ) {
+
+ var i, j, ret, matched, handleObj, handlerQueue,
+ args = new Array( arguments.length ),
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( nativeEvent ),
+
+ handlers = (
+ dataPriv.get( this, "events" ) || Object.create( null )
+ )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[ 0 ] = event;
+
+ for ( i = 1; i < arguments.length; i++ ) {
+ args[ i ] = arguments[ i ];
+ }
+
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( ( handleObj = matched.handlers[ j++ ] ) &&
+ !event.isImmediatePropagationStopped() ) {
+
+ // If the event is namespaced, then each handler is only invoked if it is
+ // specially universal or its namespaces are a superset of the event's.
+ if ( !event.rnamespace || handleObj.namespace === false ||
+ event.rnamespace.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
+ handleObj.handler ).apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( ( event.result = ret ) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, handleObj, sel, matchedHandlers, matchedSelectors,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ if ( delegateCount &&
+
+ // Support: IE <=9
+ // Black-hole SVG instance trees (trac-13180)
+ cur.nodeType &&
+
+ // Support: Firefox <=42
+ // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
+ // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
+ // Support: IE 11 only
+ // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
+ !( event.type === "click" && event.button >= 1 ) ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't check non-elements (trac-13208)
+ // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
+ if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
+ matchedHandlers = [];
+ matchedSelectors = {};
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (trac-13203)
+ sel = handleObj.selector + " ";
+
+ if ( matchedSelectors[ sel ] === undefined ) {
+ matchedSelectors[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) > -1 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matchedSelectors[ sel ] ) {
+ matchedHandlers.push( handleObj );
+ }
+ }
+ if ( matchedHandlers.length ) {
+ handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ cur = this;
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
+ }
+
+ return handlerQueue;
+ },
+
+ addProp: function( name, hook ) {
+ Object.defineProperty( jQuery.Event.prototype, name, {
+ enumerable: true,
+ configurable: true,
+
+ get: isFunction( hook ) ?
+ function() {
+ if ( this.originalEvent ) {
+ return hook( this.originalEvent );
+ }
+ } :
+ function() {
+ if ( this.originalEvent ) {
+ return this.originalEvent[ name ];
+ }
+ },
+
+ set: function( value ) {
+ Object.defineProperty( this, name, {
+ enumerable: true,
+ configurable: true,
+ writable: true,
+ value: value
+ } );
+ }
+ } );
+ },
+
+ fix: function( originalEvent ) {
+ return originalEvent[ jQuery.expando ] ?
+ originalEvent :
+ new jQuery.Event( originalEvent );
+ },
+
+ special: {
+ load: {
+
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ click: {
+
+ // Utilize native event to ensure correct state for checkable inputs
+ setup: function( data ) {
+
+ // For mutual compressibility with _default, replace `this` access with a local var.
+ // `|| data` is dead code meant only to preserve the variable through minification.
+ var el = this || data;
+
+ // Claim the first handler
+ if ( rcheckableType.test( el.type ) &&
+ el.click && nodeName( el, "input" ) ) {
+
+ // dataPriv.set( el, "click", ... )
+ leverageNative( el, "click", true );
+ }
+
+ // Return false to allow normal processing in the caller
+ return false;
+ },
+ trigger: function( data ) {
+
+ // For mutual compressibility with _default, replace `this` access with a local var.
+ // `|| data` is dead code meant only to preserve the variable through minification.
+ var el = this || data;
+
+ // Force setup before triggering a click
+ if ( rcheckableType.test( el.type ) &&
+ el.click && nodeName( el, "input" ) ) {
+
+ leverageNative( el, "click" );
+ }
+
+ // Return non-false to allow normal event-path propagation
+ return true;
+ },
+
+ // For cross-browser consistency, suppress native .click() on links
+ // Also prevent it if we're currently inside a leveraged native-event stack
+ _default: function( event ) {
+ var target = event.target;
+ return rcheckableType.test( target.type ) &&
+ target.click && nodeName( target, "input" ) &&
+ dataPriv.get( target, "click" ) ||
+ nodeName( target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ }
+};
+
+// Ensure the presence of an event listener that handles manually-triggered
+// synthetic events by interrupting progress until reinvoked in response to
+// *native* events that it fires directly, ensuring that state changes have
+// already occurred before other listeners are invoked.
+function leverageNative( el, type, isSetup ) {
+
+ // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
+ if ( !isSetup ) {
+ if ( dataPriv.get( el, type ) === undefined ) {
+ jQuery.event.add( el, type, returnTrue );
+ }
+ return;
+ }
+
+ // Register the controller as a special universal handler for all event namespaces
+ dataPriv.set( el, type, false );
+ jQuery.event.add( el, type, {
+ namespace: false,
+ handler: function( event ) {
+ var result,
+ saved = dataPriv.get( this, type );
+
+ if ( ( event.isTrigger & 1 ) && this[ type ] ) {
+
+ // Interrupt processing of the outer synthetic .trigger()ed event
+ if ( !saved ) {
+
+ // Store arguments for use when handling the inner native event
+ // There will always be at least one argument (an event object), so this array
+ // will not be confused with a leftover capture object.
+ saved = slice.call( arguments );
+ dataPriv.set( this, type, saved );
+
+ // Trigger the native event and capture its result
+ this[ type ]();
+ result = dataPriv.get( this, type );
+ dataPriv.set( this, type, false );
+
+ if ( saved !== result ) {
+
+ // Cancel the outer synthetic event
+ event.stopImmediatePropagation();
+ event.preventDefault();
+
+ return result;
+ }
+
+ // If this is an inner synthetic event for an event with a bubbling surrogate
+ // (focus or blur), assume that the surrogate already propagated from triggering
+ // the native event and prevent that from happening again here.
+ // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
+ // bubbling surrogate propagates *after* the non-bubbling base), but that seems
+ // less bad than duplication.
+ } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {
+ event.stopPropagation();
+ }
+
+ // If this is a native event triggered above, everything is now in order
+ // Fire an inner synthetic event with the original arguments
+ } else if ( saved ) {
+
+ // ...and capture the result
+ dataPriv.set( this, type, jQuery.event.trigger(
+ saved[ 0 ],
+ saved.slice( 1 ),
+ this
+ ) );
+
+ // Abort handling of the native event by all jQuery handlers while allowing
+ // native handlers on the same element to run. On target, this is achieved
+ // by stopping immediate propagation just on the jQuery event. However,
+ // the native event is re-wrapped by a jQuery one on each level of the
+ // propagation so the only way to stop it for jQuery is to stop it for
+ // everyone via native `stopPropagation()`. This is not a problem for
+ // focus/blur which don't bubble, but it does also stop click on checkboxes
+ // and radios. We accept this limitation.
+ event.stopPropagation();
+ event.isImmediatePropagationStopped = returnTrue;
+ }
+ }
+ } );
+}
+
+jQuery.removeEvent = function( elem, type, handle ) {
+
+ // This "if" is needed for plain objects
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+
+ // Allow instantiation without the 'new' keyword
+ if ( !( this instanceof jQuery.Event ) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+
+ // Support: Android <=2.3 only
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Create target properties
+ // Support: Safari <=6 - 7 only
+ // Target should not be a text node (trac-504, trac-13143)
+ this.target = ( src.target && src.target.nodeType === 3 ) ?
+ src.target.parentNode :
+ src.target;
+
+ this.currentTarget = src.currentTarget;
+ this.relatedTarget = src.relatedTarget;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || Date.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ constructor: jQuery.Event,
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+ isSimulated: false,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Includes all common event props including KeyEvent and MouseEvent specific props
+jQuery.each( {
+ altKey: true,
+ bubbles: true,
+ cancelable: true,
+ changedTouches: true,
+ ctrlKey: true,
+ detail: true,
+ eventPhase: true,
+ metaKey: true,
+ pageX: true,
+ pageY: true,
+ shiftKey: true,
+ view: true,
+ "char": true,
+ code: true,
+ charCode: true,
+ key: true,
+ keyCode: true,
+ button: true,
+ buttons: true,
+ clientX: true,
+ clientY: true,
+ offsetX: true,
+ offsetY: true,
+ pointerId: true,
+ pointerType: true,
+ screenX: true,
+ screenY: true,
+ targetTouches: true,
+ toElement: true,
+ touches: true,
+ which: true
+}, jQuery.event.addProp );
+
+jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
+
+ function focusMappedHandler( nativeEvent ) {
+ if ( document.documentMode ) {
+
+ // Support: IE 11+
+ // Attach a single focusin/focusout handler on the document while someone wants
+ // focus/blur. This is because the former are synchronous in IE while the latter
+ // are async. In other browsers, all those handlers are invoked synchronously.
+
+ // `handle` from private data would already wrap the event, but we need
+ // to change the `type` here.
+ var handle = dataPriv.get( this, "handle" ),
+ event = jQuery.event.fix( nativeEvent );
+ event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
+ event.isSimulated = true;
+
+ // First, handle focusin/focusout
+ handle( nativeEvent );
+
+ // ...then, handle focus/blur
+ //
+ // focus/blur don't bubble while focusin/focusout do; simulate the former by only
+ // invoking the handler at the lower level.
+ if ( event.target === event.currentTarget ) {
+
+ // The setup part calls `leverageNative`, which, in turn, calls
+ // `jQuery.event.add`, so event handle will already have been set
+ // by this point.
+ handle( event );
+ }
+ } else {
+
+ // For non-IE browsers, attach a single capturing handler on the document
+ // while someone wants focusin/focusout.
+ jQuery.event.simulate( delegateType, nativeEvent.target,
+ jQuery.event.fix( nativeEvent ) );
+ }
+ }
+
+ jQuery.event.special[ type ] = {
+
+ // Utilize native event if possible so blur/focus sequence is correct
+ setup: function() {
+
+ var attaches;
+
+ // Claim the first handler
+ // dataPriv.set( this, "focus", ... )
+ // dataPriv.set( this, "blur", ... )
+ leverageNative( this, type, true );
+
+ if ( document.documentMode ) {
+
+ // Support: IE 9 - 11+
+ // We use the same native handler for focusin & focus (and focusout & blur)
+ // so we need to coordinate setup & teardown parts between those events.
+ // Use `delegateType` as the key as `type` is already used by `leverageNative`.
+ attaches = dataPriv.get( this, delegateType );
+ if ( !attaches ) {
+ this.addEventListener( delegateType, focusMappedHandler );
+ }
+ dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
+ } else {
+
+ // Return false to allow normal processing in the caller
+ return false;
+ }
+ },
+ trigger: function() {
+
+ // Force setup before trigger
+ leverageNative( this, type );
+
+ // Return non-false to allow normal event-path propagation
+ return true;
+ },
+
+ teardown: function() {
+ var attaches;
+
+ if ( document.documentMode ) {
+ attaches = dataPriv.get( this, delegateType ) - 1;
+ if ( !attaches ) {
+ this.removeEventListener( delegateType, focusMappedHandler );
+ dataPriv.remove( this, delegateType );
+ } else {
+ dataPriv.set( this, delegateType, attaches );
+ }
+ } else {
+
+ // Return false to indicate standard teardown should be applied
+ return false;
+ }
+ },
+
+ // Suppress native focus or blur if we're currently inside
+ // a leveraged native-event stack
+ _default: function( event ) {
+ return dataPriv.get( event.target, type );
+ },
+
+ delegateType: delegateType
+ };
+
+ // Support: Firefox <=44
+ // Firefox doesn't have focus(in | out) events
+ // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+ //
+ // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
+ // focus(in | out) events fire after focus & blur events,
+ // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+ // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
+ //
+ // Support: IE 9 - 11+
+ // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
+ // attach a single handler for both events in IE.
+ jQuery.event.special[ delegateType ] = {
+ setup: function() {
+
+ // Handle: regular nodes (via `this.ownerDocument`), window
+ // (via `this.document`) & document (via `this`).
+ var doc = this.ownerDocument || this.document || this,
+ dataHolder = document.documentMode ? this : doc,
+ attaches = dataPriv.get( dataHolder, delegateType );
+
+ // Support: IE 9 - 11+
+ // We use the same native handler for focusin & focus (and focusout & blur)
+ // so we need to coordinate setup & teardown parts between those events.
+ // Use `delegateType` as the key as `type` is already used by `leverageNative`.
+ if ( !attaches ) {
+ if ( document.documentMode ) {
+ this.addEventListener( delegateType, focusMappedHandler );
+ } else {
+ doc.addEventListener( type, focusMappedHandler, true );
+ }
+ }
+ dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this.document || this,
+ dataHolder = document.documentMode ? this : doc,
+ attaches = dataPriv.get( dataHolder, delegateType ) - 1;
+
+ if ( !attaches ) {
+ if ( document.documentMode ) {
+ this.removeEventListener( delegateType, focusMappedHandler );
+ } else {
+ doc.removeEventListener( type, focusMappedHandler, true );
+ }
+ dataPriv.remove( dataHolder, delegateType );
+ } else {
+ dataPriv.set( dataHolder, delegateType, attaches );
+ }
+ }
+ };
+} );
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+jQuery.each( {
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mouseenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+} );
+
+jQuery.fn.extend( {
+
+ on: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn );
+ },
+ one: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ?
+ handleObj.origType + "." + handleObj.namespace :
+ handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each( function() {
+ jQuery.event.remove( this, types, fn, selector );
+ } );
+ }
+} );
+
+
+var
+
+ // Support: IE <=10 - 11, Edge 12 - 13 only
+ // In IE/Edge using regex groups here causes severe slowdowns.
+ // See https://connect.microsoft.com/IE/feedback/details/1736512/
+ rnoInnerhtml = /";
+ //header("HTTP/1.1 403 Forbidden");
+ //header("Location: ".$base);
+}else{
+ $url = $base."/weko/shib/login?next=%2F";
+ $curl = curl_init();
+ $post_args=[];
+ $post_args['SHIB_ATTR_USER_NAME']=$_SERVER['HTTP_WEKOID'];
+ $post_args["SHIB_ATTR_EPPN"]=$_SERVER['Remote-User'];
+ $post_args["SHIB_ATTR_MAIL"]=$_SERVER['mail'];
+ $post_args["SHIB_ATTR_SESSION_ID"]=$_SERVER['Shib-Session-ID'];
+ $post_args["SHIB_ATTR_ROLE_AUTHORITY_NAME"]=$_SERVER['HTTP_WEKOSOCIETYAFFILIATION'];
+ $options = array(
+ //Method
+ CURLOPT_POST => true,//POST
+ //body
+ CURLOPT_POSTFIELDS => http_build_query($post_args),
+ );
+ $cookie=tempnam(sys_get_temp_dir(),'cookie_');
+ //set options
+ curl_setopt($curl,CURLOPT_URL,$url);
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_setopt($curl, CURLOPT_COOKIESESSION, true);
+ curl_setopt_array($curl, $options);
+ curl_setopt($curl,CURLOPT_COOKIEJAR,$cookie);
+ curl_setopt($curl,CURLOPT_COOKIEFILE,$cookie);
+ // request
+ $result = curl_exec($curl);
+ $info = curl_getinfo($curl);
+ $errno = curl_errno($curl);
+ $error = curl_error($curl);
+ curl_close($curl);
+ if (CURLE_OK !== $errno) {
+ throw new RuntimeException($error, $errno);
+ }
+ header("HTTP/1.1 302 Found");
+ header("Location: ".$base.$result);
+ //var_dump($app_cookies[0]['value']);
+}
+?>
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
new file mode 100644
index 0000000..16d17f3
--- /dev/null
+++ b/nginx/nginx.conf
@@ -0,0 +1,57 @@
+
+user www-data;
+#worker_processes 1;
+worker_processes auto;
+
+#error_log /var/log/nginx/error.log warn;
+error_log /dev/stderr warn;
+pid /var/run/nginx.pid;
+
+events {
+ worker_connections 1024;
+}
+
+
+http {
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+ server_tokens off;
+
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
+ '$status $body_bytes_sent "$http_referer" "$http_authorization" "$http_www_authenticate" "$http_x_frame_options"'
+ '"$http_user_agent" "$http_x_forwarded_for"';
+ #access_log /var/log/nginx/access.log main;
+ access_log /dev/stdout main;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ keepalive_timeout 65;
+
+ #gzip on;
+
+ # Increase buffer size to prevent
+ # upstream sent too big header error with Shib attributes
+ # https://stackoverflow.com/questions/23844761/upstream-sent-too-big
+ #fastcgi_buffers 16 128k;
+ fastcgi_buffers 16 256k;
+ #fastcgi_buffer_size 256k;
+ fastcgi_buffer_size 512k;
+ #proxy_buffer_size 128k;
+ proxy_buffer_size 256k;
+ #proxy_buffers 4 256k;
+ proxy_buffers 4 512k;
+ #proxy_busy_buffers_size 256k;
+ proxy_busy_buffers_size 512k;
+
+ map_hash_bucket_size 256;
+ # 3600 sec = 60 min
+ proxy_connect_timeout 3600;
+ proxy_send_timeout 3600;
+ proxy_read_timeout 3600;
+ send_timeout 3600;
+ uwsgi_read_timeout 3600;
+
+ include /etc/nginx/conf.d/*.conf;
+}
diff --git a/nginx/phpinfo.php b/nginx/phpinfo.php
new file mode 100644
index 0000000..c9f5eeb
--- /dev/null
+++ b/nginx/phpinfo.php
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/nginx/redirect_list.map b/nginx/redirect_list.map
new file mode 100644
index 0000000..a3e4c09
--- /dev/null
+++ b/nginx/redirect_list.map
@@ -0,0 +1,2 @@
+# src dst;
+
diff --git a/nginx/shib_clear_headers b/nginx/shib_clear_headers
new file mode 100644
index 0000000..fbcdb2b
--- /dev/null
+++ b/nginx/shib_clear_headers
@@ -0,0 +1,30 @@
+# Ensure that you add directives to clear input headers for *all* attributes
+# that your backend application uses. This may also include variations on these
+# headers, such as differing capitalisations and replacing hyphens with
+# underscores etc -- it all depends on what your application is reading.
+#
+# Note that Nginx silently drops headers with underscores
+# unless the non-default `underscores_in_headers` is enabled.
+
+# Shib-* doesn't currently work because * isn't (yet) supported
+more_clear_input_headers
+ Auth-Type
+ Shib-Application-Id
+ Shib-Authentication-Instant
+ Shib-Authentication-Method
+ Shib-Authncontext-Class
+ Shib-Identity-Provider
+ Shib-Session-Id
+ Shib-Session-Index
+ Remote-User
+ EPPN
+ Affiliation
+ Unscoped-Affiliation
+ Entitlement
+ Targeted-Id
+ Persistent-Id
+ Transient-Name
+ Commonname
+ DisplayName
+ Email
+ OrganizationName;
diff --git a/nginx/shib_fastcgi_params b/nginx/shib_fastcgi_params
new file mode 100644
index 0000000..245be09
--- /dev/null
+++ b/nginx/shib_fastcgi_params
@@ -0,0 +1,130 @@
+# vim: set filetype=conf :
+
+# Replace `fastcgi_param` with `sgci_param`, `uwsgi_param` or similar
+# directive for use with different upstreams. Consult the relevant upstream
+# documentation for more information on environment parameters.
+#
+# Auth-Type is configured as authType in
+# https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPContentSettings.
+# Other default SP variables are as per
+# https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess#NativeSPAttributeAccess-CustomSPVariables
+
+shib_request_set $shib_auth_type $upstream_http_variable_auth_type;
+fastcgi_param Auth-Type $shib_auth_type;
+
+shib_request_set $shib_shib_application_id $upstream_http_variable_shib_application_id;
+fastcgi_param Shib-Application-ID $shib_shib_application_id;
+
+shib_request_set $shib_shib_authentication_instant $upstream_http_variable_shib_authentication_instant;
+fastcgi_param Shib-Authentication-Instant $shib_shib_authentication_instant;
+
+shib_request_set $shib_shib_authentication_method $upstream_http_variable_shib_authentication_method;
+fastcgi_param Shib-Authentication-Method $shib_shib_authentication_method;
+
+shib_request_set $shib_shib_authncontext_class $upstream_http_variable_shib_authncontext_class;
+fastcgi_param Shib-AuthnContext-Class $shib_shib_authncontext_class;
+
+shib_request_set $shib_shib_authncontext_decl $upstream_http_variable_shib_authncontext_decl;
+fastcgi_param Shib-AuthnContext-Decl $shib_shib_authncontext_decl;
+
+shib_request_set $shib_shib_identity_provider $upstream_http_variable_shib_identity_provider;
+fastcgi_param Shib-Identity-Provider $shib_shib_identity_provider;
+
+shib_request_set $shib_shib_session_id $upstream_http_variable_shib_session_id;
+fastcgi_param Shib-Session-ID $shib_shib_session_id;
+
+shib_request_set $shib_shib_session_index $upstream_http_variable_shib_session_index;
+fastcgi_param Shib-Session-Index $shib_shib_session_index;
+
+shib_request_set $shib_remote_user $upstream_http_variable_remote_user;
+fastcgi_param Remote-User $shib_remote_user;
+
+
+# Uncomment any of the following core attributes. Consult your Shibboleth
+# Service Provider (SP) attribute-map.xml file for details about attribute
+# IDs. Add additional directives for any Shibboleth attributes released to
+# your SP.
+
+shib_request_set $shib_eppn $upstream_http_variable_eppn;
+fastcgi_param eppn $shib_eppn;
+
+#
+# shib_request_set $shib_affliation $upstream_http_variable_affiliation;
+# fastcgi_param Affiliation $shib_affiliation;
+#
+# shib_request_set $shib_unscoped_affliation $upstream_http_variable_unscoped_affiliation;
+# fastcgi_param Unscoped-Affiliation $shib_unscoped_affiliation;
+#
+# shib_request_set $shib_entitlement $upstream_http_variable_entitlement;
+# fastcgi_param Entitlement $shib_entitlement;
+
+
+# shib_request_set $shib_targeted_id $upstream_http_variable_targeted_id;
+# fastcgi_param Targeted-Id $shib_targeted_id;
+#
+# shib_request_set $shib_persistent_id $upstream_http_variable_persistent_id;
+# fastcgi_param Persistent-Id $shib_persistent_id;
+#
+# shib_request_set $shib_transient_name $upstream_http_variable_transient_name;
+# fastcgi_param Transient-Name $shib_transient_name;
+
+
+# shib_request_set $shib_commonname $upstream_http_variable_commonname;
+# fastcgi_param Commonname $shib_commonname;
+#
+
+shib_request_set $shib_displayname $upstream_http_variable_displayname;
+fastcgi_param DisplayName $shib_displayname;
+
+#
+#shib_request_set $shib_email $upstream_http_variable_email;
+#fastcgi_param Email $shib_email;
+
+shib_request_set $shib_mail $upstream_http_variable_mail;
+fastcgi_param mail $shib_mail;
+
+#
+# shib_request_set $shib_organizationname $upstream_http_variable_organizationname;
+# fastcgi_param OrganizationName $shib_organizationname;
+
+shib_request_set $shib_eduPersonOrcid $upstream_http_variable_eduPersonOrcid;
+fastcgi_param eduPersonOrcid $shib_eduPersonOrcid;
+
+shib_request_set $shib_jasn $upstream_http_variable_jasn;
+fastcgi_param jasn $shib_jasn;
+
+shib_request_set $shib_jaGivenName $upstream_http_variable_jaGivenName;
+fastcgi_param jaGivenName $shib_jaGivenName;
+
+shib_request_set $shib_jaDisplayName $upstream_http_variable_jaDisplayName;
+fastcgi_param jaDisplayName $shib_jaDisplayName;
+
+shib_request_set $shib_jao $upstream_http_variable_jao;
+fastcgi_param jao $shib_jao;
+
+shib_request_set $shib_jaou $upstream_http_variable_jaou;
+fastcgi_param jaou $shib_jaou;
+
+shib_request_set $shib_isMemberOf $upstream_http_variable_isMemberOf;
+fastcgi_param isMemberOf $shib_isMemberOf;
+
+shib_request_set $shib_sn $upstream_http_variable_sn;
+fastcgi_param sn $shib_sn;
+
+shib_request_set $shib_o $upstream_http_variable_o;
+fastcgi_param o $shib_o;
+
+shib_request_set $shib_ou $upstream_http_variable_ou;
+fastcgi_param ou $shib_ou;
+
+shib_request_set $shib_givenName $upstream_http_variable_givenName;
+fastcgi_param givenName $shib_givenName;
+
+shib_request_set $shib_eduPersonAffiliation $upstream_http_variable_eduPersonAffiliation;
+fastcgi_param eduPersonAffiliation $shib_eduPersonAffiliation;
+
+shib_request_set $shib_eduPersonScopedAffiliation $upstream_http_variable_eduPersonScopedAffiliation;
+fastcgi_param eduPersonScopedAffiliation $shib_eduPersonScopedAffiliation;
+
+shib_request_set $shib_eduPersonTargetedID $upstream_http_variable_eduPersonTargetedID;
+fastcgi_param eduPersonTargetedID $shib_eduPersonTargetedID;
\ No newline at end of file
diff --git a/nginx/shibboleth2.xml b/nginx/shibboleth2.xml
new file mode 100644
index 0000000..fb10f05
--- /dev/null
+++ b/nginx/shibboleth2.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SAML2
+
+
+
+ SAML2 Local
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nginx/supervisord.conf b/nginx/supervisord.conf
new file mode 100644
index 0000000..2773a36
--- /dev/null
+++ b/nginx/supervisord.conf
@@ -0,0 +1,80 @@
+[unix_http_server]
+file=/var/run/supervisor.sock ; (the path to the socket file)
+chmod=0700 ; sockef file mode (default 0700)
+
+
+[supervisord]
+nodaemon=true
+user=root
+pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
+logfile=/dev/null
+logfile_maxbytes=0
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisorctl]
+serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
+
+
+[program:shibd]
+command=/usr/sbin/shibd -F -f -c /etc/shibboleth/shibboleth2.xml -p /tmp/shibd.pid -w 30
+user=_shibd
+group=_shibd
+stdout_logfile=/dev/stdout
+stderr_logfile=/dev/stderr
+stdout_logfile_maxbytes=0
+socket=unix:///tmp/shibd.sock
+socket_owner=_shibd:_shibd
+socket_mode=0777
+redirect_stderr=true
+priority=2
+
+[program:php-fpm]
+command =/usr/sbin/php-fpm7.4 -F
+autostart=true
+autorestart=true
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+socket_mode=0777
+
+[fcgi-program:shibauthorizer]
+command=/usr/lib/x86_64-linux-gnu/shibboleth/shibauthorizer
+user=_shibd
+socket=unix:///tmp/shibauthorizer.sock
+socket_owner=_shibd:_shibd
+socket_mode=0777
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+autorestart=true
+autostart=true
+
+
+[fcgi-program:shibresponder]
+command=/usr/lib/x86_64-linux-gnu/shibboleth/shibresponder
+user=_shibd
+socket=unix:///tmp/shibresponder.sock
+socket_owner=_shibd:_shibd
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+socket_mode=0777
+user=_shibd
+autorestart=true
+autostart=true
+
+[program:nginx]
+command=/usr/sbin/nginx -g "daemon off;"
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+autorestart=true
+autostart=true
+startretries=0
+
diff --git a/nginx/tip.tar.gz b/nginx/tip.tar.gz
new file mode 100644
index 0000000..94a0727
Binary files /dev/null and b/nginx/tip.tar.gz differ
diff --git a/packages.txt b/packages.txt
new file mode 100644
index 0000000..aea5386
--- /dev/null
+++ b/packages.txt
@@ -0,0 +1,39 @@
+Flask==1.0.4
+Flask-Admin==1.5.3
+Flask-Alembic==2.0.1
+Flask-Assets==0.12
+Flask-BabelEx==0.9.4
+Flask-Breadcrumbs==0.5.0
+Flask-Caching==1.10.1
+Flask-CeleryExt==0.3.4
+Flask-Collect==1.2.2
+Flask-Cors==3.0.3
+Flask-KVSession==0.6.2
+Flask-Limiter==1.1.0
+Flask-Login==0.4.1
+Flask-Mail==0.9.1
+Flask-Menu==0.6.0
+#Flask-OAuthlib==0.9.5
+-e git+https://github.com/RCOSDP/flask-oauthlib.git@add-redissentinel#egg=Flask-OAuthlib
+Flask-Principal==0.4.0
+Flask-RESTful==0.3.8
+Flask-Security==3.0.0
+flask-shell-ipython==0.4.1
+Flask-SQLAlchemy==2.3.2
+flask-talisman==0.4.1
+Flask-WTF==0.14.3
+flask-sitemap==0.4.0
+Flask-IIIF==0.6.1
+Flask-DebugToolbar==0.13.1
+Flask-Plugins==1.6.1
+github3.py==1.1.0
+requests==2.18.4
+requests-oauthlib==1.1.0
+SQLAlchemy==1.2.19
+SQLAlchemy-Continuum==1.3.6
+SQLAlchemy-Utils==0.35.0
+#fpdf==1.7.2
+-e git+https://github.com/RCOSDP/pyfpdf.git@fix/nii#egg=fpdf
+flask-marshmallow==0.14.0
+sword3common==0.1.1
+psycopg2==2.7.3.2
\ No newline at end of file
diff --git a/postgresql/overlay.sql b/postgresql/overlay.sql
new file mode 100644
index 0000000..e5cdad9
--- /dev/null
+++ b/postgresql/overlay.sql
@@ -0,0 +1,116 @@
+
+-- 新テーブルの作成 (affiliation_id)
+create table public.affiliation_id (
+ created timestamp(6) without time zone not null
+ , updated timestamp(6) without time zone not null
+ , id integer not null
+ , affiliation_idp_url character varying(80) not null
+ , affiliation_name character varying(80) not null
+);
+
+-- 主キーの作成
+alter table public.affiliation_id add constraint pk_affiliation_id primary key (id);
+
+-- インデックスとユニーク制約の作成
+create unique index uq_affiliation_idp_url on public.affiliation_id(affiliation_idp_url);
+create index ix_affiliation_name on public.affiliation_id(affiliation_name);
+
+-- 制約の作成
+alter table public.affiliation_id add constraint "id_not_null" check (id IS NOT NULL);
+alter table public.affiliation_id add constraint "affiliation_idp_url_not_null" check (affiliation_idp_url IS NOT NULL);
+alter table public.affiliation_id add constraint "affiliation_name_not_null" check (affiliation_name IS NOT NULL);
+
+-- シークエンス
+create sequence public.affiliation_id_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+alter sequence public.affiliation_id_id_seq owned by public.affiliation_id.id;
+
+-- 「default」レコードの追加
+insert into affiliation_id(created,updated,id,affiliation_idp_url,affiliation_name)
+values(CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,0,'-','default');
+
+
+-- 新テーブルの作成 (user)
+create table public.user (
+ created timestamp(6) without time zone not null
+ , updated timestamp(6) without time zone not null
+ , id integer not null
+ , user_id character varying(80) not null
+ , affiliation_id integer not null
+ , user_orcid character varying(80)
+ , role character varying(80)
+);
+
+-- 主キーの作成
+alter table public.user add constraint pk_user primary key (id);
+
+-- インデックスとユニーク制約の作成
+create index ix_user_id on public.user(user_id);
+create index ix_user_orcid on public.user(user_orcid);
+create index ix_role on public.user(role);
+
+-- 制約の作成
+alter table public.user add constraint "id_not_null" check (id IS NOT NULL);
+alter table public.user add constraint "user_id_not_null" check (user_id IS NOT NULL);
+alter table public.user add constraint "affiliation_id_not_null" check (affiliation_id IS NOT NULL);
+
+-- シークエンス
+create sequence public.user_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+alter sequence public.user_id_seq owned by public.user.id;
+
+-- 外部キー情報追加
+alter table public.user
+ add constraint fk_user_affiliation_id_affiliation_id foreign key (affiliation_id)
+ references public.affiliation_id(id);
+
+
+-- 新テーブルの作成(affiliation_repository)
+create table public.affiliation_repository (
+ created timestamp(6) without time zone not null
+ , updated timestamp(6) without time zone not null
+ , id integer not null
+ , affiliation_id integer not null
+ , repository_url character varying(80) not null
+ , access_token character varying(80) not null
+);
+
+-- 主キーの作成
+alter table public.affiliation_repository add constraint pk_affiliation_repository primary key (id);
+
+-- インデックスとユニーク制約の作成
+create index ix_repository_url on public.affiliation_repository(repository_url);
+create index ix_access_token on public.affiliation_repository(access_token);
+
+-- 制約の作成
+alter table public.affiliation_repository add constraint "id_not_null" check (id IS NOT NULL);
+alter table public.affiliation_repository add constraint "affiliation_id_not_null" check (affiliation_id IS NOT NULL);
+alter table public.affiliation_repository add constraint "repository_url_not_null" check (repository_url IS NOT NULL);
+alter table public.affiliation_repository add constraint "access_token_not_null" check (access_token IS NOT NULL);
+
+-- シークエンス
+create sequence public.affiliation_repository_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+alter sequence public.affiliation_repository_id_seq owned by public.affiliation_repository.id;
+
+alter table public.user
+ add constraint fk_affiliation_repository_affiliation_id_affiliation_id foreign key (affiliation_id)
+ references public.affiliation_id(id);
diff --git a/src/grobid_client/.gitignore b/src/grobid_client/.gitignore
new file mode 100644
index 0000000..2d6a3de
--- /dev/null
+++ b/src/grobid_client/.gitignore
@@ -0,0 +1,23 @@
+target
+.DS_Store
+.project
+.settings
+.classpath
+.idea
+*.iml
+*.log
+*.log.*
+*.old
+*.obj
+*.zip
+data/doi
+data/entries
+data/fail
+data/*.pdf
+data/*.png
+my_config.json
+__pycache__
+doc/
+build/
+dist/
+grobid_client_python.egg-info/
diff --git a/src/grobid_client/LICENSE b/src/grobid_client/LICENSE
new file mode 100644
index 0000000..67998c3
--- /dev/null
+++ b/src/grobid_client/LICENSE
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2018-2024 The Contributors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/src/grobid_client/MANIFEST.in b/src/grobid_client/MANIFEST.in
new file mode 100644
index 0000000..4bca278
--- /dev/null
+++ b/src/grobid_client/MANIFEST.in
@@ -0,0 +1 @@
+include Readme.md
\ No newline at end of file
diff --git a/src/grobid_client/Readme.md b/src/grobid_client/Readme.md
new file mode 100644
index 0000000..5c8aa05
--- /dev/null
+++ b/src/grobid_client/Readme.md
@@ -0,0 +1,186 @@
+[](https://badge.fury.io/py/grobid_client_python)
+[](https://archive.softwareheritage.org/browse/origin/https://github.com/kermitt2/grobid_client_python/)
+[](http://www.apache.org/licenses/LICENSE-2.0.html)
+
+# Simple python client for GROBID REST services
+
+This Python client can be used to process in an efficient concurrent manner a set of PDF in a given directory by the [GROBID](https://github.com/kermitt2/grobid) service. It includes a command line for processing PDF on a file system and write results in a given output directory and a library for import in other python scripts. The client can also process similarly a list of files with reference strings (one per line) and patents in XML ST36 formats.
+
+## Before you start
+
+Please be aware that, at the moment, [grobid does not support Windows](https://grobid.readthedocs.io/en/latest/Troubleshooting/#windows-related-issues).
+If you are a Windows user, don't worry. You can still [run grobid
+via Docker](https://grobid.readthedocs.io/en/latest/Grobid-docker/).
+
+## Build and run
+
+You need first a running *grobid* service, latest stable version, see the [documentation](http://grobid.readthedocs.io/) for installation.
+By default, it is assumed that the server will run on the address `http://localhost:8070`.
+You can change the server address by editing the file `config.json`, see below.
+
+## Requirements
+
+This client has been developed and was tested with Python `3.5`-`3.9` and should work with any higher `3.*` versions. It uses `requests` as dependency beyond the Standard Python Library.
+
+## Install
+
+Get the github repo:
+
+```console
+git clone https://github.com/kermitt2/grobid_client_python
+cd grobid_client_python
+python3 setup.py install
+```
+
+There is nothing more needed to start using the python command lines, see the next section.
+
+## Usage and options
+
+The call to the script can normally be realized interchangeably with `python3 -m grobid_client.grobid_client` or simply `grobid_client`.
+
+```
+usage: grobid_client [-h] [--input INPUT] [--output OUTPUT] [--config CONFIG]
+ [--n N] [--generateIDs] [--consolidate_header]
+ [--consolidate_citations] [--include_raw_citations]
+ [--include_raw_affiliations] [--force] [--teiCoordinates]
+ [--verbose]
+ service
+
+Client for GROBID services
+
+positional arguments:
+ service one of ['processFulltextDocument',
+ 'processHeaderDocument', 'processReferences',
+ 'processCitationList','processCitationPatentST36',
+ 'processCitationPatentPDF']
+
+optional arguments:
+ -h, --help show this help message and exit
+ --input INPUT path to the directory containing PDF files or .txt
+ (for processCitationList only, one reference per line)
+ to process
+ --output OUTPUT path to the directory where to put the results
+ (optional)
+ --config CONFIG path to the config file, default is ./config.json
+ --n N concurrency for service usage
+ --generateIDs generate random xml:id to textual XML elements of the
+ result files
+ --consolidate_header call GROBID with consolidation of the metadata
+ extracted from the header
+ --consolidate_citations
+ call GROBID with consolidation of the extracted
+ bibliographical references
+ --include_raw_citations
+ call GROBID requesting the extraction of raw citations
+ --include_raw_affiliations
+ call GROBID requestiong the extraciton of raw
+ affiliations
+ --force force re-processing pdf input files when tei output
+ files already exist
+ --teiCoordinates add the original PDF coordinates (bounding boxes) to
+ the extracted elements
+ --segmentSentences segment sentences in the text content of the document
+ with additional elements
+ --verbose print information about processed files in the console
+
+
+```
+
+Examples:
+
+```console
+> grobid_client --input ~/tmp/in2 --output ~/tmp/out processFulltextDocument
+```
+
+This command will process all the PDF files present under the input directory recursively (files with extension `.pdf` only) with the `processFulltextDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.grobid.tei.xml`), using the default `10` concurrent workers.
+
+If `--output` is omitted, the resulting XML TEI documents will be produced alongside the PDF in the `--input` directory.
+
+```console
+> grobid_client --input ~/tmp/in2 --output ~/tmp/out --n 20 processHeaderDocument
+```
+
+This command will process all the PDF files present in the input directory (files with extension `.pdf` only) with the `processHeaderDocument` service of GROBID, and write the resulting XML TEI files under the output directory, reusing the file name with a different file extension (`.grobid.tei.xml`), using `20` concurrent workers.
+
+By default if an existing `.grobid.tei.xml` file is present in the output directory corresponding to a PDF in the input directory, this PDF will be skipped to avoid reprocessing several times the same PDF. To force the processing of PDF and over-write of existing TEI files, use the parameter `--force`.
+
+`processCitationList` does not take a repertory of PDF as input, but a repertory of `.txt` files, with one reference raw string per line, for example:
+
+```console
+> grobid_client --input resources/test_txt/ --output resources/test_out/ --n 20 processCitationList
+```
+
+The following command example will process all the PDF files present in the input directory and add bounding box coordinates (`--teiCoordinates`) relative to the original PDFs for the elements listed in the config file. It will also segment the sentences (`--segmentSentences`, this is a "layout aware" sentence segmentation) in the identified paragraphs with bounding box coordinates for the sentences.
+
+```console
+> grobid_client --input ~/tmp/in2 --output ~/tmp/out --teiCoordinates --segmentSentences processFulltextDocument
+```
+
+The file `example.py` gives an example of usage as a library, from a another python script.
+
+## Using the client in your python
+
+Import and call the client as follow:
+
+```python
+from grobid_client.grobid_client import GrobidClient
+
+client = GrobidClient(config_path="./config.json")
+client.process("processFulltextDocument", "/mnt/data/covid/pdfs", n=20)
+```
+
+See also `example.py`.
+
+## Configuration of the client
+
+There are a few parameters that can be set with the `config.json` file.
+
+- `grobid_server` indicates the URL of the GROBID server to be used by the client.
+
+- `batch_size` is the the size of the pool of threads used by ThreadPoolExecutor, you normally don't want to change this. This should be a high number (default 1000) - but not too high to protect the memory on the machine running the client. This should not be confused with the concurrency parameter `n` which indicates how many parallel requests can be send to GROBID.
+
+- `sleep_time` indicates in seconds the time to wait for sending a new request to GROBID when the server indicates that all its threads are currently used. The client need to re-send the query after a wait time that will allow the server to free some threads. This wait time usually depends on the service and the capacities of the server, we suggest 5-10 seconds for the `processFulltextDocument` service and 2 seconds for `processHeaderDocument` service.
+
+- `timeout` is a client side timeout - the process on server side will still be running until the server finished the task or the server timeout is reached.
+
+- `coordinates` indicates the structure XML elements that should contains PDF coordinates when the parameters `--teiCoordinates` is used see [here](https://grobid.readthedocs.io/en/latest/Coordinates-in-PDF/) for more details.
+
+Here is the default `config.json` file for the client:
+
+```
+{
+ "grobid_server": "http://localhost:8070",
+ "batch_size": 1000,
+ "sleep_time": 5,
+ "timeout": 60,
+ "coordinates": [ "persName", "figure", "ref", "biblStruct", "formula", "s" ]
+}
+```
+
+## Benchmarking
+
+Full text processing of __136 PDF__ (total 3443 pages, in average 25 pages per PDF) on Intel Core i7-4790K CPU 4.00GHz, 4 cores (8 threads), 16GB memory, `n` being the concurrency parameter:
+
+| n | runtime (s)| s/PDF | PDF/s |
+|----|------------|-------|-------|
+| 1 | 209.0 | 1.54 | 0.65 |
+| 2 | 112.0 | 0.82 | 1.21 |
+| 3 | 80.4 | 0.59 | 1.69 |
+| 5 | 62.9 | 0.46 | 2.16 |
+| 8 | 55.7 | 0.41 | 2.44 |
+| 10 | 55.3 | 0.40 | 2.45 |
+
+
+
+As complementary info, GROBID processing of header of the 136 PDF and with `n=10` takes 3.74 s (15 times faster than the complete full text processing because only the two first pages of the PDF are considered), 36 PDF/s.
+
+In similar conditions, extraction and structuring of bibliographical references takes 26.9 s (5.1 PDF/s).
+
+Processing of 3500 raw bibliographical take 4.3 s with `n=10` (814 references parsed per second).
+
+
+## License and contact
+
+Distributed under [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
+
+Main author and contact: Patrice Lopez ()
diff --git a/src/grobid_client/config.json b/src/grobid_client/config.json
new file mode 100644
index 0000000..73bc064
--- /dev/null
+++ b/src/grobid_client/config.json
@@ -0,0 +1,7 @@
+{
+ "grobid_server": "http://grobid:8070",
+ "batch_size": 100,
+ "sleep_time": 5,
+ "timeout": 60,
+ "coordinates": [ "persName", "figure", "ref", "biblStruct", "formula", "s", "note", "title" ]
+}
diff --git a/src/grobid_client/example.py b/src/grobid_client/example.py
new file mode 100644
index 0000000..1db1f81
--- /dev/null
+++ b/src/grobid_client/example.py
@@ -0,0 +1,5 @@
+from grobid_client.grobid_client import GrobidClient
+
+if __name__ == "__main__":
+ client = GrobidClient(config_path="./config.json")
+ client.process("processFulltextDocument", "./resources/test_pdf", output="./resources/test_out/", consolidate_citations=True, tei_coordinates=True, force=True)
diff --git a/src/grobid_client/grobid_client/__init__.py b/src/grobid_client/grobid_client/__init__.py
new file mode 100755
index 0000000..e69de29
diff --git a/src/grobid_client/grobid_client/client.py b/src/grobid_client/grobid_client/client.py
new file mode 100755
index 0000000..5984282
--- /dev/null
+++ b/src/grobid_client/grobid_client/client.py
@@ -0,0 +1,197 @@
+""" Generic API Client """
+from copy import deepcopy
+import json
+import requests
+
+try:
+ from urlparse import urljoin
+except ImportError:
+ from urllib.parse import urljoin
+
+
+class ApiClient(object):
+ """Client to interact with a generic Rest API.
+
+ Subclasses should implement functionality accordingly with the provided
+ service methods, i.e. ``get``, ``post``, ``put`` and ``delete``.
+ """
+
+ accept_type = "application/xml"
+ api_base = None
+
+ def __init__(
+ self, base_url, username=None, api_key=None, status_endpoint=None, timeout=60
+ ):
+ """Initialise client.
+
+ Args:
+ base_url (str): The base URL to the service being used.
+ username (str): The username to authenticate with.
+ api_key (str): The API key to authenticate with.
+ timeout (int): Maximum time before timing out.
+ """
+ self.base_url = base_url
+ self.username = username
+ self.api_key = api_key
+ self.status_endpoint = urljoin(self.base_url, status_endpoint)
+ self.timeout = timeout
+
+ @staticmethod
+ def encode(request, data):
+ """Add request content data to request body, set Content-type header.
+
+ Should be overridden by subclasses if not using JSON encoding.
+
+ Args:
+ request (HTTPRequest): The request object.
+ data (dict, None): Data to be encoded.
+
+ Returns:
+ HTTPRequest: The request object.
+ """
+ if data is None:
+ return request
+
+ request.add_header("Content-Type", "application/json")
+ request.data = json.dumps(data)
+
+ return request
+
+ @staticmethod
+ def decode(response):
+ """Decode the returned data in the response.
+
+ Should be overridden by subclasses if something else than JSON is
+ expected.
+
+ Args:
+ response (HTTPResponse): The response object.
+
+ Returns:
+ dict or None.
+ """
+ try:
+ return response.json()
+ except ValueError as e:
+ return e.message
+
+ def get_credentials(self):
+ """Returns parameters to be added to authenticate the request.
+
+ This lives on its own to make it easier to re-implement it if needed.
+
+ Returns:
+ dict: A dictionary containing the credentials.
+ """
+ return {"username": self.username, "api_key": self.api_key}
+
+ def call_api(
+ self,
+ method,
+ url,
+ headers=None,
+ params=None,
+ data=None,
+ files=None,
+ timeout=None,
+ ):
+ """Call API.
+
+ This returns object containing data, with error details if applicable.
+
+ Args:
+ method (str): The HTTP method to use.
+ url (str): Resource location relative to the base URL.
+ headers (dict or None): Extra request headers to set.
+ params (dict or None): Query-string parameters.
+ data (dict or None): Request body contents for POST or PUT requests.
+ files (dict or None: Files to be passed to the request.
+ timeout (int): Maximum time before timing out.
+
+ Returns:
+ ResultParser or ErrorParser.
+ """
+ headers = deepcopy(headers) or {}
+ headers["Accept"] = self.accept_type
+ params = deepcopy(params) or {}
+ data = data or {}
+ files = files or {}
+ # if self.username is not None and self.api_key is not None:
+ # params.update(self.get_credentials())
+ r = requests.request(
+ method,
+ url,
+ headers=headers,
+ params=params,
+ files=files,
+ data=data,
+ timeout=timeout,
+ )
+
+ return r, r.status_code
+
+ def get(self, url, params=None, **kwargs):
+ """Call the API with a GET request.
+
+ Args:
+ url (str): Resource location relative to the base URL.
+ params (dict or None): Query-string parameters.
+
+ Returns:
+ ResultParser or ErrorParser.
+ """
+ return self.call_api("GET", url, params=params, **kwargs)
+
+ def delete(self, url, params=None, **kwargs):
+ """Call the API with a DELETE request.
+
+ Args:
+ url (str): Resource location relative to the base URL.
+ params (dict or None): Query-string parameters.
+
+ Returns:
+ ResultParser or ErrorParser.
+ """
+ return self.call_api("DELETE", url, params=params, **kwargs)
+
+ def put(self, url, params=None, data=None, files=None, **kwargs):
+ """Call the API with a PUT request.
+
+ Args:
+ url (str): Resource location relative to the base URL.
+ params (dict or None): Query-string parameters.
+ data (dict or None): Request body contents.
+ files (dict or None: Files to be passed to the request.
+
+ Returns:
+ An instance of ResultParser or ErrorParser.
+ """
+ return self.call_api(
+ "PUT", url, params=params, data=data, files=files, **kwargs
+ )
+
+ def post(self, url, params=None, data=None, files=None, **kwargs):
+ """Call the API with a POST request.
+
+ Args:
+ url (str): Resource location relative to the base URL.
+ params (dict or None): Query-string parameters.
+ data (dict or None): Request body contents.
+ files (dict or None: Files to be passed to the request.
+
+ Returns:
+ An instance of ResultParser or ErrorParser.
+ """
+ return self.call_api(
+ method="POST", url=url, params=params, data=data, files=files, **kwargs
+ )
+
+ def service_status(self, **kwargs):
+ """Call the API to get the status of the service.
+
+ Returns:
+ An instance of ResultParser or ErrorParser.
+ """
+ return self.call_api(
+ "GET", self.status_endpoint, params={"format": "json"}, **kwargs
+ )
diff --git a/src/grobid_client/grobid_client/grobid_client.py b/src/grobid_client/grobid_client/grobid_client.py
new file mode 100755
index 0000000..856e72f
--- /dev/null
+++ b/src/grobid_client/grobid_client/grobid_client.py
@@ -0,0 +1,492 @@
+"""
+
+Grobid Python Client
+
+This version uses the standard ThreadPoolExecutor for parallelizing the
+concurrent calls to the GROBID services. Given the limits of
+ThreadPoolExecutor (input stored in memory, blocking Executor.map until the
+whole input is acquired), it works with batches of PDF of a size indicated
+in the config.json file (default is 1000 entries). We are moving from first
+batch to the second one only when the first is entirely processed - which
+means it is slightly sub-optimal, but should scale better. Working without
+batch would mean acquiring a list of millions of files in directories and
+would require something scalable too (e.g. done in a separate thread),
+which is not implemented for the moment.
+
+"""
+import os
+import io
+import json
+import argparse
+import time
+import concurrent.futures
+import ntpath
+import requests
+import pathlib
+
+from .client import ApiClient
+
+
+class ServerUnavailableException(Exception):
+ pass
+
+class GrobidClient(ApiClient):
+
+ def __init__(self, grobid_server='http://grobid:8070',
+ batch_size=1000,
+ coordinates=["persName", "figure", "ref", "biblStruct", "formula", "s", "note", "title"],
+ sleep_time=5,
+ timeout=60,
+ config_path=None,
+ check_server=True):
+ self.config = {
+ 'grobid_server': grobid_server,
+ 'batch_size': batch_size,
+ 'coordinates': coordinates,
+ 'sleep_time': sleep_time,
+ 'timeout': timeout
+ }
+ if config_path:
+ self._load_config(config_path)
+ if check_server:
+ self._test_server_connection()
+
+ def _load_config(self, path="./config.json"):
+ """
+ Load the json configuration
+ """
+ config_json = open(path).read()
+ self.config = json.loads(config_json)
+
+ def _test_server_connection(self):
+ """Test if the server is up and running."""
+ the_url = self.get_server_url("isalive")
+ try:
+ r = requests.get(the_url)
+ except:
+ print("GROBID server does not appear up and running, the connection to the server failed")
+ raise ServerUnavailableException
+
+ status = r.status_code
+
+ if status != 200:
+ print("GROBID server does not appear up and running " + str(status))
+ else:
+ print("GROBID server is up and running")
+
+ def _output_file_name(self, input_file, input_path, output):
+ # we use ntpath here to be sure it will work on Windows too
+ if output is not None:
+ input_file_name = str(os.path.relpath(os.path.abspath(input_file), input_path))
+ filename = os.path.join(
+ output, os.path.splitext(input_file_name)[0] + ".grobid.tei.xml"
+ )
+ else:
+ input_file_name = ntpath.basename(input_file)
+ filename = os.path.join(
+ ntpath.dirname(input_file),
+ os.path.splitext(input_file_name)[0] + ".grobid.tei.xml",
+ )
+
+ return filename
+
+ def process(
+ self,
+ service,
+ input_path,
+ output=None,
+ n=10,
+ generateIDs=False,
+ consolidate_header=True,
+ consolidate_citations=False,
+ include_raw_citations=False,
+ include_raw_affiliations=False,
+ tei_coordinates=False,
+ segment_sentences=False,
+ force=True,
+ verbose=False,
+ ):
+ batch_size_pdf = self.config["batch_size"]
+ input_files = []
+
+ for (dirpath, dirnames, filenames) in os.walk(input_path):
+ for filename in filenames:
+ if filename.endswith(".pdf") or filename.endswith(".PDF") or \
+ (service == 'processCitationList' and (filename.endswith(".txt") or filename.endswith(".TXT"))) or \
+ (service == 'processCitationPatentST36' and (filename.endswith(".xml") or filename.endswith(".XML"))):
+ if verbose:
+ try:
+ print(filename)
+ except Exception:
+ # may happen on linux see https://stackoverflow.com/questions/27366479/python-3-os-walk-file-paths-unicodeencodeerror-utf-8-codec-cant-encode-s
+ pass
+ input_files.append(os.sep.join([dirpath, filename]))
+
+ if len(input_files) == batch_size_pdf:
+ self.process_batch(
+ service,
+ input_files,
+ input_path,
+ output,
+ n,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences,
+ force,
+ verbose,
+ )
+ input_files = []
+
+ # last batch
+ if len(input_files) > 0:
+ self.process_batch(
+ service,
+ input_files,
+ input_path,
+ output,
+ n,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences,
+ force,
+ verbose,
+ )
+
+ def process_batch(
+ self,
+ service,
+ input_files,
+ input_path,
+ output,
+ n,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences,
+ force,
+ verbose=False,
+ ):
+ if verbose:
+ print(len(input_files), "files to process in current batch")
+
+ # we use ThreadPoolExecutor and not ProcessPoolExecutor because it is an I/O intensive process
+ with concurrent.futures.ThreadPoolExecutor(max_workers=n) as executor:
+ #with concurrent.futures.ProcessPoolExecutor(max_workers=n) as executor:
+ results = []
+ for input_file in input_files:
+ # check if TEI file is already produced
+ filename = self._output_file_name(input_file, input_path, output)
+ if not force and os.path.isfile(filename):
+ print(filename, "already exist, skipping... (use --force to reprocess pdf input files)")
+ continue
+
+ selected_process = self.process_pdf
+ if service == 'processCitationList':
+ selected_process = self.process_txt
+
+ r = executor.submit(
+ selected_process,
+ service,
+ input_file,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences)
+
+ results.append(r)
+
+ for r in concurrent.futures.as_completed(results):
+ input_file, status, text = r.result()
+ filename = self._output_file_name(input_file, input_path, output)
+
+ if status != 200 or text is None:
+ print("Processing of", input_file, "failed with error", str(status), ",", text)
+ # writing error file with suffixed error code
+ try:
+ pathlib.Path(os.path.dirname(filename)).mkdir(parents=True, exist_ok=True)
+ with open(filename.replace(".grobid.tei.xml", "_"+str(status)+".txt"), 'w', encoding='utf8') as tei_file:
+ if text is not None:
+ tei_file.write(text)
+ else:
+ tei_file.write("")
+ except OSError:
+ print("Writing resulting TEI XML file", filename, "failed")
+ else:
+ # writing TEI file
+ try:
+ pathlib.Path(os.path.dirname(filename)).mkdir(parents=True, exist_ok=True)
+ with open(filename,'w',encoding='utf8') as tei_file:
+ tei_file.write(text)
+ except OSError:
+ print("Writing resulting TEI XML file", filename, "failed")
+
+ def process_pdf(
+ self,
+ service,
+ pdf_file,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences
+ ):
+ pdf_handle = open(pdf_file, "rb")
+ files = {
+ "input": (
+ pdf_file,
+ pdf_handle,
+ "application/pdf",
+ {"Expires": "0"},
+ )
+ }
+
+ the_url = self.get_server_url(service)
+
+ # set the GROBID parameters
+ the_data = {}
+ if generateIDs:
+ the_data["generateIDs"] = "1"
+ if consolidate_header:
+ the_data["consolidateHeader"] = "1"
+ if consolidate_citations:
+ the_data["consolidateCitations"] = "1"
+ if include_raw_citations:
+ the_data["includeRawCitations"] = "1"
+ if include_raw_affiliations:
+ the_data["includeRawAffiliations"] = "1"
+ if tei_coordinates:
+ the_data["teiCoordinates"] = self.config["coordinates"]
+ if segment_sentences:
+ the_data["segmentSentences"] = "1"
+
+ try:
+ res, status = self.post(
+ url=the_url, files=files, data=the_data, headers={"Accept": "text/plain"}, timeout=self.config['timeout']
+ )
+
+ if status == 503:
+ time.sleep(self.config["sleep_time"])
+ return self.process_pdf(
+ service,
+ pdf_file,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences
+ )
+ except requests.exceptions.ReadTimeout:
+ pdf_handle.close()
+ return (pdf_file, 408, None)
+
+ pdf_handle.close()
+ return (pdf_file, status, res.text)
+
+ def get_server_url(self, service):
+ return self.config['grobid_server'] + "/api/" + service
+
+ def process_txt(
+ self,
+ service,
+ txt_file,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences
+ ):
+ # create request based on file content
+ references = None
+ with open(txt_file) as f:
+ references = [line.rstrip() for line in f]
+
+ the_url = self.get_server_url(service)
+
+ # set the GROBID parameters
+ the_data = {}
+ if consolidate_citations:
+ the_data["consolidateCitations"] = "1"
+ if include_raw_citations:
+ the_data["includeRawCitations"] = "1"
+ the_data["citations"] = references
+ res, status = self.post(
+ url=the_url, data=the_data, headers={"Accept": "application/xml"}
+ )
+
+ if status == 503:
+ time.sleep(self.config["sleep_time"])
+ return self.process_txt(
+ service,
+ txt_file,
+ generateIDs,
+ consolidate_header,
+ consolidate_citations,
+ include_raw_citations,
+ include_raw_affiliations,
+ tei_coordinates,
+ segment_sentences
+ )
+
+ return (txt_file, status, res.text)
+
+def main():
+ valid_services = [
+ "processFulltextDocument",
+ "processHeaderDocument",
+ "processReferences",
+ "processCitationList",
+ "processCitationPatentST36",
+ "processCitationPatentPDF"
+ ]
+
+ parser = argparse.ArgumentParser(description="Client for GROBID services")
+ parser.add_argument(
+ "service",
+ help="one of " + str(valid_services),
+ )
+ parser.add_argument(
+ "--input", default=None, help="path to the directory containing files to process: PDF or .txt (for processCitationList only, one reference per line), or .xml for patents in ST36"
+ )
+ parser.add_argument(
+ "--output",
+ default=None,
+ help="path to the directory where to put the results (optional)",
+ )
+ parser.add_argument(
+ "--config",
+ default="./config.json",
+ help="path to the config file, default is ./config.json",
+ )
+ parser.add_argument("--n", default=10, help="concurrency for service usage")
+ parser.add_argument(
+ "--generateIDs",
+ action="store_true",
+ help="generate random xml:id to textual XML elements of the result files",
+ )
+ parser.add_argument(
+ "--consolidate_header",
+ action="store_true",
+ help="call GROBID with consolidation of the metadata extracted from the header",
+ )
+ parser.add_argument(
+ "--consolidate_citations",
+ action="store_true",
+ help="call GROBID with consolidation of the extracted bibliographical references",
+ )
+ parser.add_argument(
+ "--include_raw_citations",
+ action="store_true",
+ help="call GROBID requesting the extraction of raw citations",
+ )
+ parser.add_argument(
+ "--include_raw_affiliations",
+ action="store_true",
+ help="call GROBID requestiong the extraciton of raw affiliations",
+ )
+ parser.add_argument(
+ "--force",
+ action="store_true",
+ help="force re-processing pdf input files when tei output files already exist",
+ )
+ parser.add_argument(
+ "--teiCoordinates",
+ action="store_true",
+ help="add the original PDF coordinates (bounding boxes) to the extracted elements",
+ )
+ parser.add_argument(
+ "--segmentSentences",
+ action="store_true",
+ help="segment sentences in the text content of the document with additional elements",
+ )
+ parser.add_argument(
+ "--verbose",
+ action="store_true",
+ help="print information about processed files in the console",
+ )
+
+ args = parser.parse_args()
+
+ input_path = args.input
+ config_path = args.config
+ output_path = args.output
+
+ if args.n is not None:
+ try:
+ n = int(args.n)
+ except ValueError:
+ print("Invalid concurrency parameter n:", n, ", n = 10 will be used by default")
+ pass
+
+ # if output path does not exist, we create it
+ if output_path is not None and not os.path.isdir(output_path):
+ try:
+ print("output directory does not exist but will be created:", output_path)
+ os.makedirs(output_path)
+ except OSError:
+ print("Creation of the directory", output_path, "failed")
+ else:
+ print("Successfully created the directory", output_path)
+
+ service = args.service
+ generateIDs = args.generateIDs
+ consolidate_header = args.consolidate_header
+ consolidate_citations = args.consolidate_citations
+ include_raw_citations = args.include_raw_citations
+ include_raw_affiliations = args.include_raw_affiliations
+ force = args.force
+ tei_coordinates = args.teiCoordinates
+ segment_sentences = args.segmentSentences
+ verbose = args.verbose
+
+ if service is None or not service in valid_services:
+ print("Missing or invalid service, must be one of", valid_services)
+ exit(1)
+
+ try:
+ client = GrobidClient(config_path=config_path)
+ except ServerUnavailableException:
+ exit(1)
+
+ start_time = time.time()
+
+ client.process(
+ service,
+ input_path,
+ output=output_path,
+ n=n,
+ generateIDs=generateIDs,
+ consolidate_header=consolidate_header,
+ consolidate_citations=consolidate_citations,
+ include_raw_citations=include_raw_citations,
+ include_raw_affiliations=include_raw_affiliations,
+ tei_coordinates=tei_coordinates,
+ segment_sentences=segment_sentences,
+ force=force,
+ verbose=verbose,
+ )
+
+ runtime = round(time.time() - start_time, 3)
+ print("runtime: %s seconds " % (runtime))
+
+if __name__ == "__main__":
+ main()
diff --git a/src/grobid_client/setup.py b/src/grobid_client/setup.py
new file mode 100644
index 0000000..da62467
--- /dev/null
+++ b/src/grobid_client/setup.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+from setuptools import setup, find_packages
+
+setup(name='grobid_client_python',
+ version='0.0.8',
+ description='Simple python client for GROBID REST services',
+ author='kermitt2',
+ long_description=open("Readme.md", encoding='utf-8').read(),
+ long_description_content_type="text/markdown",
+ url="https://github.com/kermitt2/grobid_client_python",
+ packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
+ install_requires=['requests'],
+ entry_points={
+ 'console_scripts': ['grobid_client=grobid_client.grobid_client:main']
+ },
+ license='LICENSE',
+ )
\ No newline at end of file